Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type DavAccount
- func (c *DavAccount) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *DavAccount) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (da *DavAccount) QueryOwner() *UserQuery
- func (e *DavAccount) SetOwner(v *User)
- func (da *DavAccount) String() string
- func (da *DavAccount) Unwrap() *DavAccount
- func (da *DavAccount) Update() *DavAccountUpdateOne
- func (da *DavAccount) Value(name string) (ent.Value, error)
- type DavAccountClient
- func (c *DavAccountClient) Create() *DavAccountCreate
- func (c *DavAccountClient) CreateBulk(builders ...*DavAccountCreate) *DavAccountCreateBulk
- func (c *DavAccountClient) Delete() *DavAccountDelete
- func (c *DavAccountClient) DeleteOne(da *DavAccount) *DavAccountDeleteOne
- func (c *DavAccountClient) DeleteOneID(id int) *DavAccountDeleteOne
- func (c *DavAccountClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *DavAccountClient) Get(ctx context.Context, id int) (*DavAccount, error)
- func (c *DavAccountClient) GetX(ctx context.Context, id int) *DavAccount
- func (c *DavAccountClient) Hooks() []Hook
- func (c *DavAccountClient) Intercept(interceptors ...Interceptor)
- func (c *DavAccountClient) Interceptors() []Interceptor
- func (c *DavAccountClient) MapCreateBulk(slice any, setFunc func(*DavAccountCreate, int)) *DavAccountCreateBulk
- func (c *DavAccountClient) Query() *DavAccountQuery
- func (c *DavAccountClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *DavAccountClient) QueryOwner(da *DavAccount) *UserQuery
- func (c *DavAccountClient) Update() *DavAccountUpdate
- func (c *DavAccountClient) UpdateOne(da *DavAccount) *DavAccountUpdateOne
- func (c *DavAccountClient) UpdateOneID(id int) *DavAccountUpdateOne
- func (c *DavAccountClient) Use(hooks ...Hook)
- type DavAccountCreate
- func (dac *DavAccountCreate) Exec(ctx context.Context) error
- func (c *DavAccountCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dac *DavAccountCreate) ExecX(ctx context.Context)
- func (dac *DavAccountCreate) Mutation() *DavAccountMutation
- func (dac *DavAccountCreate) OnConflict(opts ...sql.ConflictOption) *DavAccountUpsertOne
- func (dac *DavAccountCreate) OnConflictColumns(columns ...string) *DavAccountUpsertOne
- func (c *DavAccountCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dac *DavAccountCreate) Save(ctx context.Context) (*DavAccount, error)
- func (dac *DavAccountCreate) SaveX(ctx context.Context) *DavAccount
- func (dac *DavAccountCreate) SetCreatedAt(t time.Time) *DavAccountCreate
- func (dac *DavAccountCreate) SetDeletedAt(t time.Time) *DavAccountCreate
- func (dac *DavAccountCreate) SetName(s string) *DavAccountCreate
- func (dac *DavAccountCreate) SetNillableCreatedAt(t *time.Time) *DavAccountCreate
- func (dac *DavAccountCreate) SetNillableDeletedAt(t *time.Time) *DavAccountCreate
- func (dac *DavAccountCreate) SetNillableUpdatedAt(t *time.Time) *DavAccountCreate
- func (dac *DavAccountCreate) SetOptions(bs *boolset.BooleanSet) *DavAccountCreate
- func (dac *DavAccountCreate) SetOwner(u *User) *DavAccountCreate
- func (dac *DavAccountCreate) SetOwnerID(i int) *DavAccountCreate
- func (dac *DavAccountCreate) SetPassword(s string) *DavAccountCreate
- func (dac *DavAccountCreate) SetProps(tap *types.DavAccountProps) *DavAccountCreate
- func (m *DavAccountCreate) SetRawID(t int) *DavAccountCreate
- func (dac *DavAccountCreate) SetURI(s string) *DavAccountCreate
- func (dac *DavAccountCreate) SetUpdatedAt(t time.Time) *DavAccountCreate
- type DavAccountCreateBulk
- func (dacb *DavAccountCreateBulk) Exec(ctx context.Context) error
- func (c *DavAccountCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dacb *DavAccountCreateBulk) ExecX(ctx context.Context)
- func (dacb *DavAccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *DavAccountUpsertBulk
- func (dacb *DavAccountCreateBulk) OnConflictColumns(columns ...string) *DavAccountUpsertBulk
- func (c *DavAccountCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dacb *DavAccountCreateBulk) Save(ctx context.Context) ([]*DavAccount, error)
- func (dacb *DavAccountCreateBulk) SaveX(ctx context.Context) []*DavAccount
- type DavAccountDelete
- func (dad *DavAccountDelete) Exec(ctx context.Context) (int, error)
- func (c *DavAccountDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dad *DavAccountDelete) ExecX(ctx context.Context) int
- func (c *DavAccountDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dad *DavAccountDelete) Where(ps ...predicate.DavAccount) *DavAccountDelete
- type DavAccountDeleteOne
- type DavAccountEdges
- type DavAccountGroupBy
- func (dagb *DavAccountGroupBy) Aggregate(fns ...AggregateFunc) *DavAccountGroupBy
- func (s *DavAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DavAccountGroupBy) BoolX(ctx context.Context) bool
- func (s *DavAccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DavAccountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DavAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DavAccountGroupBy) Float64X(ctx context.Context) float64
- func (s *DavAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DavAccountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DavAccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DavAccountGroupBy) IntX(ctx context.Context) int
- func (s *DavAccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DavAccountGroupBy) IntsX(ctx context.Context) []int
- func (dagb *DavAccountGroupBy) Scan(ctx context.Context, v any) error
- func (s *DavAccountGroupBy) ScanX(ctx context.Context, v any)
- func (s *DavAccountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DavAccountGroupBy) StringX(ctx context.Context) string
- func (s *DavAccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DavAccountGroupBy) StringsX(ctx context.Context) []string
- type DavAccountMutation
- func (m *DavAccountMutation) AddField(name string, value ent.Value) error
- func (m *DavAccountMutation) AddedEdges() []string
- func (m *DavAccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *DavAccountMutation) AddedFields() []string
- func (m *DavAccountMutation) AddedIDs(name string) []ent.Value
- func (m *DavAccountMutation) ClearDeletedAt()
- func (m *DavAccountMutation) ClearEdge(name string) error
- func (m *DavAccountMutation) ClearField(name string) error
- func (m *DavAccountMutation) ClearOwner()
- func (m *DavAccountMutation) ClearProps()
- func (m *DavAccountMutation) ClearedEdges() []string
- func (m *DavAccountMutation) ClearedFields() []string
- func (m DavAccountMutation) Client() *Client
- func (m *DavAccountMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DavAccountMutation) DeletedAt() (r time.Time, exists bool)
- func (m *DavAccountMutation) DeletedAtCleared() bool
- func (m *DavAccountMutation) EdgeCleared(name string) bool
- func (c *DavAccountMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *DavAccountMutation) Field(name string) (ent.Value, bool)
- func (m *DavAccountMutation) FieldCleared(name string) bool
- func (m *DavAccountMutation) Fields() []string
- func (m *DavAccountMutation) ID() (id int, exists bool)
- func (m *DavAccountMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DavAccountMutation) Name() (r string, exists bool)
- func (m *DavAccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DavAccountMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DavAccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DavAccountMutation) OldName(ctx context.Context) (v string, err error)
- func (m *DavAccountMutation) OldOptions(ctx context.Context) (v *boolset.BooleanSet, err error)
- func (m *DavAccountMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *DavAccountMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *DavAccountMutation) OldProps(ctx context.Context) (v *types.DavAccountProps, err error)
- func (m *DavAccountMutation) OldURI(ctx context.Context) (v string, err error)
- func (m *DavAccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DavAccountMutation) Op() Op
- func (m *DavAccountMutation) Options() (r *boolset.BooleanSet, exists bool)
- func (m *DavAccountMutation) OwnerCleared() bool
- func (m *DavAccountMutation) OwnerID() (r int, exists bool)
- func (m *DavAccountMutation) OwnerIDs() (ids []int)
- func (m *DavAccountMutation) Password() (r string, exists bool)
- func (m *DavAccountMutation) Props() (r *types.DavAccountProps, exists bool)
- func (m *DavAccountMutation) PropsCleared() bool
- func (c *DavAccountMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *DavAccountMutation) RemovedEdges() []string
- func (m *DavAccountMutation) RemovedIDs(name string) []ent.Value
- func (m *DavAccountMutation) ResetCreatedAt()
- func (m *DavAccountMutation) ResetDeletedAt()
- func (m *DavAccountMutation) ResetEdge(name string) error
- func (m *DavAccountMutation) ResetField(name string) error
- func (m *DavAccountMutation) ResetName()
- func (m *DavAccountMutation) ResetOptions()
- func (m *DavAccountMutation) ResetOwner()
- func (m *DavAccountMutation) ResetOwnerID()
- func (m *DavAccountMutation) ResetPassword()
- func (m *DavAccountMutation) ResetProps()
- func (m *DavAccountMutation) ResetURI()
- func (m *DavAccountMutation) ResetUpdatedAt()
- func (m *DavAccountMutation) SetCreatedAt(t time.Time)
- func (m *DavAccountMutation) SetDeletedAt(t time.Time)
- func (m *DavAccountMutation) SetField(name string, value ent.Value) error
- func (m *DavAccountMutation) SetName(s string)
- func (m *DavAccountMutation) SetOp(op Op)
- func (m *DavAccountMutation) SetOptions(bs *boolset.BooleanSet)
- func (m *DavAccountMutation) SetOwnerID(i int)
- func (m *DavAccountMutation) SetPassword(s string)
- func (m *DavAccountMutation) SetProps(tap *types.DavAccountProps)
- func (m *DavAccountMutation) SetRawID(t int)
- func (m *DavAccountMutation) SetURI(s string)
- func (m *DavAccountMutation) SetUpdatedAt(t time.Time)
- func (m DavAccountMutation) Tx() (*Tx, error)
- func (m *DavAccountMutation) Type() string
- func (m *DavAccountMutation) URI() (r string, exists bool)
- func (m *DavAccountMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DavAccountMutation) Where(ps ...predicate.DavAccount)
- func (m *DavAccountMutation) WhereP(ps ...func(*sql.Selector))
- type DavAccountQuery
- func (daq *DavAccountQuery) Aggregate(fns ...AggregateFunc) *DavAccountSelect
- func (daq *DavAccountQuery) All(ctx context.Context) ([]*DavAccount, error)
- func (daq *DavAccountQuery) AllX(ctx context.Context) []*DavAccount
- func (daq *DavAccountQuery) Clone() *DavAccountQuery
- func (daq *DavAccountQuery) Count(ctx context.Context) (int, error)
- func (daq *DavAccountQuery) CountX(ctx context.Context) int
- func (c *DavAccountQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (daq *DavAccountQuery) Exist(ctx context.Context) (bool, error)
- func (daq *DavAccountQuery) ExistX(ctx context.Context) bool
- func (daq *DavAccountQuery) First(ctx context.Context) (*DavAccount, error)
- func (daq *DavAccountQuery) FirstID(ctx context.Context) (id int, err error)
- func (daq *DavAccountQuery) FirstIDX(ctx context.Context) int
- func (daq *DavAccountQuery) FirstX(ctx context.Context) *DavAccount
- func (daq *DavAccountQuery) GroupBy(field string, fields ...string) *DavAccountGroupBy
- func (daq *DavAccountQuery) IDs(ctx context.Context) (ids []int, err error)
- func (daq *DavAccountQuery) IDsX(ctx context.Context) []int
- func (daq *DavAccountQuery) Limit(limit int) *DavAccountQuery
- func (daq *DavAccountQuery) Offset(offset int) *DavAccountQuery
- func (daq *DavAccountQuery) Only(ctx context.Context) (*DavAccount, error)
- func (daq *DavAccountQuery) OnlyID(ctx context.Context) (id int, err error)
- func (daq *DavAccountQuery) OnlyIDX(ctx context.Context) int
- func (daq *DavAccountQuery) OnlyX(ctx context.Context) *DavAccount
- func (daq *DavAccountQuery) Order(o ...davaccount.OrderOption) *DavAccountQuery
- func (c *DavAccountQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (daq *DavAccountQuery) QueryOwner() *UserQuery
- func (daq *DavAccountQuery) Select(fields ...string) *DavAccountSelect
- func (daq *DavAccountQuery) Unique(unique bool) *DavAccountQuery
- func (daq *DavAccountQuery) Where(ps ...predicate.DavAccount) *DavAccountQuery
- func (daq *DavAccountQuery) WithOwner(opts ...func(*UserQuery)) *DavAccountQuery
- type DavAccountSelect
- func (das *DavAccountSelect) Aggregate(fns ...AggregateFunc) *DavAccountSelect
- func (s *DavAccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DavAccountSelect) BoolX(ctx context.Context) bool
- func (s *DavAccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DavAccountSelect) BoolsX(ctx context.Context) []bool
- func (c DavAccountSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *DavAccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DavAccountSelect) Float64X(ctx context.Context) float64
- func (s *DavAccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DavAccountSelect) Float64sX(ctx context.Context) []float64
- func (s *DavAccountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DavAccountSelect) IntX(ctx context.Context) int
- func (s *DavAccountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DavAccountSelect) IntsX(ctx context.Context) []int
- func (c DavAccountSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (das *DavAccountSelect) Scan(ctx context.Context, v any) error
- func (s *DavAccountSelect) ScanX(ctx context.Context, v any)
- func (s *DavAccountSelect) String(ctx context.Context) (_ string, err error)
- func (s *DavAccountSelect) StringX(ctx context.Context) string
- func (s *DavAccountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DavAccountSelect) StringsX(ctx context.Context) []string
- type DavAccountUpdate
- func (dau *DavAccountUpdate) ClearDeletedAt() *DavAccountUpdate
- func (dau *DavAccountUpdate) ClearOwner() *DavAccountUpdate
- func (dau *DavAccountUpdate) ClearProps() *DavAccountUpdate
- func (dau *DavAccountUpdate) Exec(ctx context.Context) error
- func (c *DavAccountUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dau *DavAccountUpdate) ExecX(ctx context.Context)
- func (dau *DavAccountUpdate) Mutation() *DavAccountMutation
- func (c *DavAccountUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dau *DavAccountUpdate) Save(ctx context.Context) (int, error)
- func (dau *DavAccountUpdate) SaveX(ctx context.Context) int
- func (dau *DavAccountUpdate) SetDeletedAt(t time.Time) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetName(s string) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetNillableDeletedAt(t *time.Time) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetNillableName(s *string) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetNillableOwnerID(i *int) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetNillablePassword(s *string) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetNillableURI(s *string) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetOptions(bs *boolset.BooleanSet) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetOwner(u *User) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetOwnerID(i int) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetPassword(s string) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetProps(tap *types.DavAccountProps) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetURI(s string) *DavAccountUpdate
- func (dau *DavAccountUpdate) SetUpdatedAt(t time.Time) *DavAccountUpdate
- func (dau *DavAccountUpdate) Where(ps ...predicate.DavAccount) *DavAccountUpdate
- type DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) ClearDeletedAt() *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) ClearOwner() *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) ClearProps() *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) Exec(ctx context.Context) error
- func (c *DavAccountUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dauo *DavAccountUpdateOne) ExecX(ctx context.Context)
- func (dauo *DavAccountUpdateOne) Mutation() *DavAccountMutation
- func (c *DavAccountUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dauo *DavAccountUpdateOne) Save(ctx context.Context) (*DavAccount, error)
- func (dauo *DavAccountUpdateOne) SaveX(ctx context.Context) *DavAccount
- func (dauo *DavAccountUpdateOne) Select(field string, fields ...string) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetDeletedAt(t time.Time) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetName(s string) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetNillableDeletedAt(t *time.Time) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetNillableName(s *string) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetNillableOwnerID(i *int) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetNillablePassword(s *string) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetNillableURI(s *string) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetOptions(bs *boolset.BooleanSet) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetOwner(u *User) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetOwnerID(i int) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetPassword(s string) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetProps(tap *types.DavAccountProps) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetURI(s string) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) SetUpdatedAt(t time.Time) *DavAccountUpdateOne
- func (dauo *DavAccountUpdateOne) Where(ps ...predicate.DavAccount) *DavAccountUpdateOne
- type DavAccountUpsert
- func (u *DavAccountUpsert) ClearDeletedAt() *DavAccountUpsert
- func (u *DavAccountUpsert) ClearProps() *DavAccountUpsert
- func (u *DavAccountUpsert) SetDeletedAt(v time.Time) *DavAccountUpsert
- func (u *DavAccountUpsert) SetName(v string) *DavAccountUpsert
- func (u *DavAccountUpsert) SetOptions(v *boolset.BooleanSet) *DavAccountUpsert
- func (u *DavAccountUpsert) SetOwnerID(v int) *DavAccountUpsert
- func (u *DavAccountUpsert) SetPassword(v string) *DavAccountUpsert
- func (u *DavAccountUpsert) SetProps(v *types.DavAccountProps) *DavAccountUpsert
- func (u *DavAccountUpsert) SetURI(v string) *DavAccountUpsert
- func (u *DavAccountUpsert) SetUpdatedAt(v time.Time) *DavAccountUpsert
- func (u *DavAccountUpsert) UpdateDeletedAt() *DavAccountUpsert
- func (u *DavAccountUpsert) UpdateName() *DavAccountUpsert
- func (u *DavAccountUpsert) UpdateOptions() *DavAccountUpsert
- func (u *DavAccountUpsert) UpdateOwnerID() *DavAccountUpsert
- func (u *DavAccountUpsert) UpdatePassword() *DavAccountUpsert
- func (u *DavAccountUpsert) UpdateProps() *DavAccountUpsert
- func (u *DavAccountUpsert) UpdateURI() *DavAccountUpsert
- func (u *DavAccountUpsert) UpdateUpdatedAt() *DavAccountUpsert
- type DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) ClearDeletedAt() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) ClearProps() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) DoNothing() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) Exec(ctx context.Context) error
- func (u *DavAccountUpsertBulk) ExecX(ctx context.Context)
- func (u *DavAccountUpsertBulk) Ignore() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) SetDeletedAt(v time.Time) *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) SetName(v string) *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) SetOptions(v *boolset.BooleanSet) *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) SetOwnerID(v int) *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) SetPassword(v string) *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) SetProps(v *types.DavAccountProps) *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) SetURI(v string) *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) SetUpdatedAt(v time.Time) *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) Update(set func(*DavAccountUpsert)) *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) UpdateDeletedAt() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) UpdateName() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) UpdateNewValues() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) UpdateOptions() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) UpdateOwnerID() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) UpdatePassword() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) UpdateProps() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) UpdateURI() *DavAccountUpsertBulk
- func (u *DavAccountUpsertBulk) UpdateUpdatedAt() *DavAccountUpsertBulk
- type DavAccountUpsertOne
- func (u *DavAccountUpsertOne) ClearDeletedAt() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) ClearProps() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) DoNothing() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) Exec(ctx context.Context) error
- func (u *DavAccountUpsertOne) ExecX(ctx context.Context)
- func (u *DavAccountUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *DavAccountUpsertOne) IDX(ctx context.Context) int
- func (u *DavAccountUpsertOne) Ignore() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) SetDeletedAt(v time.Time) *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) SetName(v string) *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) SetOptions(v *boolset.BooleanSet) *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) SetOwnerID(v int) *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) SetPassword(v string) *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) SetProps(v *types.DavAccountProps) *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) SetURI(v string) *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) SetUpdatedAt(v time.Time) *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) Update(set func(*DavAccountUpsert)) *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) UpdateDeletedAt() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) UpdateName() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) UpdateNewValues() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) UpdateOptions() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) UpdateOwnerID() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) UpdatePassword() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) UpdateProps() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) UpdateURI() *DavAccountUpsertOne
- func (u *DavAccountUpsertOne) UpdateUpdatedAt() *DavAccountUpsertOne
- type DavAccounts
- type DirectLink
- func (c *DirectLink) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *DirectLink) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dl *DirectLink) QueryFile() *FileQuery
- func (e *DirectLink) SetFile(v *File)
- func (dl *DirectLink) String() string
- func (dl *DirectLink) Unwrap() *DirectLink
- func (dl *DirectLink) Update() *DirectLinkUpdateOne
- func (dl *DirectLink) Value(name string) (ent.Value, error)
- type DirectLinkClient
- func (c *DirectLinkClient) Create() *DirectLinkCreate
- func (c *DirectLinkClient) CreateBulk(builders ...*DirectLinkCreate) *DirectLinkCreateBulk
- func (c *DirectLinkClient) Delete() *DirectLinkDelete
- func (c *DirectLinkClient) DeleteOne(dl *DirectLink) *DirectLinkDeleteOne
- func (c *DirectLinkClient) DeleteOneID(id int) *DirectLinkDeleteOne
- func (c *DirectLinkClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *DirectLinkClient) Get(ctx context.Context, id int) (*DirectLink, error)
- func (c *DirectLinkClient) GetX(ctx context.Context, id int) *DirectLink
- func (c *DirectLinkClient) Hooks() []Hook
- func (c *DirectLinkClient) Intercept(interceptors ...Interceptor)
- func (c *DirectLinkClient) Interceptors() []Interceptor
- func (c *DirectLinkClient) MapCreateBulk(slice any, setFunc func(*DirectLinkCreate, int)) *DirectLinkCreateBulk
- func (c *DirectLinkClient) Query() *DirectLinkQuery
- func (c *DirectLinkClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *DirectLinkClient) QueryFile(dl *DirectLink) *FileQuery
- func (c *DirectLinkClient) Update() *DirectLinkUpdate
- func (c *DirectLinkClient) UpdateOne(dl *DirectLink) *DirectLinkUpdateOne
- func (c *DirectLinkClient) UpdateOneID(id int) *DirectLinkUpdateOne
- func (c *DirectLinkClient) Use(hooks ...Hook)
- type DirectLinkCreate
- func (dlc *DirectLinkCreate) Exec(ctx context.Context) error
- func (c *DirectLinkCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dlc *DirectLinkCreate) ExecX(ctx context.Context)
- func (dlc *DirectLinkCreate) Mutation() *DirectLinkMutation
- func (dlc *DirectLinkCreate) OnConflict(opts ...sql.ConflictOption) *DirectLinkUpsertOne
- func (dlc *DirectLinkCreate) OnConflictColumns(columns ...string) *DirectLinkUpsertOne
- func (c *DirectLinkCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dlc *DirectLinkCreate) Save(ctx context.Context) (*DirectLink, error)
- func (dlc *DirectLinkCreate) SaveX(ctx context.Context) *DirectLink
- func (dlc *DirectLinkCreate) SetCreatedAt(t time.Time) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetDeletedAt(t time.Time) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetDownloads(i int) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetFile(f *File) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetFileID(i int) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetName(s string) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetNillableCreatedAt(t *time.Time) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetNillableDeletedAt(t *time.Time) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetNillableUpdatedAt(t *time.Time) *DirectLinkCreate
- func (m *DirectLinkCreate) SetRawID(t int) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetSpeed(i int) *DirectLinkCreate
- func (dlc *DirectLinkCreate) SetUpdatedAt(t time.Time) *DirectLinkCreate
- type DirectLinkCreateBulk
- func (dlcb *DirectLinkCreateBulk) Exec(ctx context.Context) error
- func (c *DirectLinkCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dlcb *DirectLinkCreateBulk) ExecX(ctx context.Context)
- func (dlcb *DirectLinkCreateBulk) OnConflict(opts ...sql.ConflictOption) *DirectLinkUpsertBulk
- func (dlcb *DirectLinkCreateBulk) OnConflictColumns(columns ...string) *DirectLinkUpsertBulk
- func (c *DirectLinkCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dlcb *DirectLinkCreateBulk) Save(ctx context.Context) ([]*DirectLink, error)
- func (dlcb *DirectLinkCreateBulk) SaveX(ctx context.Context) []*DirectLink
- type DirectLinkDelete
- func (dld *DirectLinkDelete) Exec(ctx context.Context) (int, error)
- func (c *DirectLinkDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dld *DirectLinkDelete) ExecX(ctx context.Context) int
- func (c *DirectLinkDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dld *DirectLinkDelete) Where(ps ...predicate.DirectLink) *DirectLinkDelete
- type DirectLinkDeleteOne
- type DirectLinkEdges
- type DirectLinkGroupBy
- func (dlgb *DirectLinkGroupBy) Aggregate(fns ...AggregateFunc) *DirectLinkGroupBy
- func (s *DirectLinkGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DirectLinkGroupBy) BoolX(ctx context.Context) bool
- func (s *DirectLinkGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DirectLinkGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DirectLinkGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DirectLinkGroupBy) Float64X(ctx context.Context) float64
- func (s *DirectLinkGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DirectLinkGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DirectLinkGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DirectLinkGroupBy) IntX(ctx context.Context) int
- func (s *DirectLinkGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DirectLinkGroupBy) IntsX(ctx context.Context) []int
- func (dlgb *DirectLinkGroupBy) Scan(ctx context.Context, v any) error
- func (s *DirectLinkGroupBy) ScanX(ctx context.Context, v any)
- func (s *DirectLinkGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DirectLinkGroupBy) StringX(ctx context.Context) string
- func (s *DirectLinkGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DirectLinkGroupBy) StringsX(ctx context.Context) []string
- type DirectLinkMutation
- func (m *DirectLinkMutation) AddDownloads(i int)
- func (m *DirectLinkMutation) AddField(name string, value ent.Value) error
- func (m *DirectLinkMutation) AddSpeed(i int)
- func (m *DirectLinkMutation) AddedDownloads() (r int, exists bool)
- func (m *DirectLinkMutation) AddedEdges() []string
- func (m *DirectLinkMutation) AddedField(name string) (ent.Value, bool)
- func (m *DirectLinkMutation) AddedFields() []string
- func (m *DirectLinkMutation) AddedIDs(name string) []ent.Value
- func (m *DirectLinkMutation) AddedSpeed() (r int, exists bool)
- func (m *DirectLinkMutation) ClearDeletedAt()
- func (m *DirectLinkMutation) ClearEdge(name string) error
- func (m *DirectLinkMutation) ClearField(name string) error
- func (m *DirectLinkMutation) ClearFile()
- func (m *DirectLinkMutation) ClearedEdges() []string
- func (m *DirectLinkMutation) ClearedFields() []string
- func (m DirectLinkMutation) Client() *Client
- func (m *DirectLinkMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DirectLinkMutation) DeletedAt() (r time.Time, exists bool)
- func (m *DirectLinkMutation) DeletedAtCleared() bool
- func (m *DirectLinkMutation) Downloads() (r int, exists bool)
- func (m *DirectLinkMutation) EdgeCleared(name string) bool
- func (c *DirectLinkMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *DirectLinkMutation) Field(name string) (ent.Value, bool)
- func (m *DirectLinkMutation) FieldCleared(name string) bool
- func (m *DirectLinkMutation) Fields() []string
- func (m *DirectLinkMutation) FileCleared() bool
- func (m *DirectLinkMutation) FileID() (r int, exists bool)
- func (m *DirectLinkMutation) FileIDs() (ids []int)
- func (m *DirectLinkMutation) ID() (id int, exists bool)
- func (m *DirectLinkMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DirectLinkMutation) Name() (r string, exists bool)
- func (m *DirectLinkMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DirectLinkMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DirectLinkMutation) OldDownloads(ctx context.Context) (v int, err error)
- func (m *DirectLinkMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DirectLinkMutation) OldFileID(ctx context.Context) (v int, err error)
- func (m *DirectLinkMutation) OldName(ctx context.Context) (v string, err error)
- func (m *DirectLinkMutation) OldSpeed(ctx context.Context) (v int, err error)
- func (m *DirectLinkMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DirectLinkMutation) Op() Op
- func (c *DirectLinkMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *DirectLinkMutation) RemovedEdges() []string
- func (m *DirectLinkMutation) RemovedIDs(name string) []ent.Value
- func (m *DirectLinkMutation) ResetCreatedAt()
- func (m *DirectLinkMutation) ResetDeletedAt()
- func (m *DirectLinkMutation) ResetDownloads()
- func (m *DirectLinkMutation) ResetEdge(name string) error
- func (m *DirectLinkMutation) ResetField(name string) error
- func (m *DirectLinkMutation) ResetFile()
- func (m *DirectLinkMutation) ResetFileID()
- func (m *DirectLinkMutation) ResetName()
- func (m *DirectLinkMutation) ResetSpeed()
- func (m *DirectLinkMutation) ResetUpdatedAt()
- func (m *DirectLinkMutation) SetCreatedAt(t time.Time)
- func (m *DirectLinkMutation) SetDeletedAt(t time.Time)
- func (m *DirectLinkMutation) SetDownloads(i int)
- func (m *DirectLinkMutation) SetField(name string, value ent.Value) error
- func (m *DirectLinkMutation) SetFileID(i int)
- func (m *DirectLinkMutation) SetName(s string)
- func (m *DirectLinkMutation) SetOp(op Op)
- func (m *DirectLinkMutation) SetRawID(t int)
- func (m *DirectLinkMutation) SetSpeed(i int)
- func (m *DirectLinkMutation) SetUpdatedAt(t time.Time)
- func (m *DirectLinkMutation) Speed() (r int, exists bool)
- func (m DirectLinkMutation) Tx() (*Tx, error)
- func (m *DirectLinkMutation) Type() string
- func (m *DirectLinkMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DirectLinkMutation) Where(ps ...predicate.DirectLink)
- func (m *DirectLinkMutation) WhereP(ps ...func(*sql.Selector))
- type DirectLinkQuery
- func (dlq *DirectLinkQuery) Aggregate(fns ...AggregateFunc) *DirectLinkSelect
- func (dlq *DirectLinkQuery) All(ctx context.Context) ([]*DirectLink, error)
- func (dlq *DirectLinkQuery) AllX(ctx context.Context) []*DirectLink
- func (dlq *DirectLinkQuery) Clone() *DirectLinkQuery
- func (dlq *DirectLinkQuery) Count(ctx context.Context) (int, error)
- func (dlq *DirectLinkQuery) CountX(ctx context.Context) int
- func (c *DirectLinkQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dlq *DirectLinkQuery) Exist(ctx context.Context) (bool, error)
- func (dlq *DirectLinkQuery) ExistX(ctx context.Context) bool
- func (dlq *DirectLinkQuery) First(ctx context.Context) (*DirectLink, error)
- func (dlq *DirectLinkQuery) FirstID(ctx context.Context) (id int, err error)
- func (dlq *DirectLinkQuery) FirstIDX(ctx context.Context) int
- func (dlq *DirectLinkQuery) FirstX(ctx context.Context) *DirectLink
- func (dlq *DirectLinkQuery) GroupBy(field string, fields ...string) *DirectLinkGroupBy
- func (dlq *DirectLinkQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dlq *DirectLinkQuery) IDsX(ctx context.Context) []int
- func (dlq *DirectLinkQuery) Limit(limit int) *DirectLinkQuery
- func (dlq *DirectLinkQuery) Offset(offset int) *DirectLinkQuery
- func (dlq *DirectLinkQuery) Only(ctx context.Context) (*DirectLink, error)
- func (dlq *DirectLinkQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dlq *DirectLinkQuery) OnlyIDX(ctx context.Context) int
- func (dlq *DirectLinkQuery) OnlyX(ctx context.Context) *DirectLink
- func (dlq *DirectLinkQuery) Order(o ...directlink.OrderOption) *DirectLinkQuery
- func (c *DirectLinkQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dlq *DirectLinkQuery) QueryFile() *FileQuery
- func (dlq *DirectLinkQuery) Select(fields ...string) *DirectLinkSelect
- func (dlq *DirectLinkQuery) Unique(unique bool) *DirectLinkQuery
- func (dlq *DirectLinkQuery) Where(ps ...predicate.DirectLink) *DirectLinkQuery
- func (dlq *DirectLinkQuery) WithFile(opts ...func(*FileQuery)) *DirectLinkQuery
- type DirectLinkSelect
- func (dls *DirectLinkSelect) Aggregate(fns ...AggregateFunc) *DirectLinkSelect
- func (s *DirectLinkSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DirectLinkSelect) BoolX(ctx context.Context) bool
- func (s *DirectLinkSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DirectLinkSelect) BoolsX(ctx context.Context) []bool
- func (c DirectLinkSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *DirectLinkSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DirectLinkSelect) Float64X(ctx context.Context) float64
- func (s *DirectLinkSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DirectLinkSelect) Float64sX(ctx context.Context) []float64
- func (s *DirectLinkSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DirectLinkSelect) IntX(ctx context.Context) int
- func (s *DirectLinkSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DirectLinkSelect) IntsX(ctx context.Context) []int
- func (c DirectLinkSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dls *DirectLinkSelect) Scan(ctx context.Context, v any) error
- func (s *DirectLinkSelect) ScanX(ctx context.Context, v any)
- func (s *DirectLinkSelect) String(ctx context.Context) (_ string, err error)
- func (s *DirectLinkSelect) StringX(ctx context.Context) string
- func (s *DirectLinkSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DirectLinkSelect) StringsX(ctx context.Context) []string
- type DirectLinkUpdate
- func (dlu *DirectLinkUpdate) AddDownloads(i int) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) AddSpeed(i int) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) ClearDeletedAt() *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) ClearFile() *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) Exec(ctx context.Context) error
- func (c *DirectLinkUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dlu *DirectLinkUpdate) ExecX(ctx context.Context)
- func (dlu *DirectLinkUpdate) Mutation() *DirectLinkMutation
- func (c *DirectLinkUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dlu *DirectLinkUpdate) Save(ctx context.Context) (int, error)
- func (dlu *DirectLinkUpdate) SaveX(ctx context.Context) int
- func (dlu *DirectLinkUpdate) SetDeletedAt(t time.Time) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetDownloads(i int) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetFile(f *File) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetFileID(i int) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetName(s string) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetNillableDeletedAt(t *time.Time) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetNillableDownloads(i *int) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetNillableFileID(i *int) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetNillableName(s *string) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetNillableSpeed(i *int) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetSpeed(i int) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) SetUpdatedAt(t time.Time) *DirectLinkUpdate
- func (dlu *DirectLinkUpdate) Where(ps ...predicate.DirectLink) *DirectLinkUpdate
- type DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) AddDownloads(i int) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) AddSpeed(i int) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) ClearDeletedAt() *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) ClearFile() *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) Exec(ctx context.Context) error
- func (c *DirectLinkUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dluo *DirectLinkUpdateOne) ExecX(ctx context.Context)
- func (dluo *DirectLinkUpdateOne) Mutation() *DirectLinkMutation
- func (c *DirectLinkUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dluo *DirectLinkUpdateOne) Save(ctx context.Context) (*DirectLink, error)
- func (dluo *DirectLinkUpdateOne) SaveX(ctx context.Context) *DirectLink
- func (dluo *DirectLinkUpdateOne) Select(field string, fields ...string) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetDeletedAt(t time.Time) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetDownloads(i int) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetFile(f *File) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetFileID(i int) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetName(s string) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetNillableDeletedAt(t *time.Time) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetNillableDownloads(i *int) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetNillableFileID(i *int) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetNillableName(s *string) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetNillableSpeed(i *int) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetSpeed(i int) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) SetUpdatedAt(t time.Time) *DirectLinkUpdateOne
- func (dluo *DirectLinkUpdateOne) Where(ps ...predicate.DirectLink) *DirectLinkUpdateOne
- type DirectLinkUpsert
- func (u *DirectLinkUpsert) AddDownloads(v int) *DirectLinkUpsert
- func (u *DirectLinkUpsert) AddSpeed(v int) *DirectLinkUpsert
- func (u *DirectLinkUpsert) ClearDeletedAt() *DirectLinkUpsert
- func (u *DirectLinkUpsert) SetDeletedAt(v time.Time) *DirectLinkUpsert
- func (u *DirectLinkUpsert) SetDownloads(v int) *DirectLinkUpsert
- func (u *DirectLinkUpsert) SetFileID(v int) *DirectLinkUpsert
- func (u *DirectLinkUpsert) SetName(v string) *DirectLinkUpsert
- func (u *DirectLinkUpsert) SetSpeed(v int) *DirectLinkUpsert
- func (u *DirectLinkUpsert) SetUpdatedAt(v time.Time) *DirectLinkUpsert
- func (u *DirectLinkUpsert) UpdateDeletedAt() *DirectLinkUpsert
- func (u *DirectLinkUpsert) UpdateDownloads() *DirectLinkUpsert
- func (u *DirectLinkUpsert) UpdateFileID() *DirectLinkUpsert
- func (u *DirectLinkUpsert) UpdateName() *DirectLinkUpsert
- func (u *DirectLinkUpsert) UpdateSpeed() *DirectLinkUpsert
- func (u *DirectLinkUpsert) UpdateUpdatedAt() *DirectLinkUpsert
- type DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) AddDownloads(v int) *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) AddSpeed(v int) *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) ClearDeletedAt() *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) DoNothing() *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) Exec(ctx context.Context) error
- func (u *DirectLinkUpsertBulk) ExecX(ctx context.Context)
- func (u *DirectLinkUpsertBulk) Ignore() *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) SetDeletedAt(v time.Time) *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) SetDownloads(v int) *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) SetFileID(v int) *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) SetName(v string) *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) SetSpeed(v int) *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) SetUpdatedAt(v time.Time) *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) Update(set func(*DirectLinkUpsert)) *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) UpdateDeletedAt() *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) UpdateDownloads() *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) UpdateFileID() *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) UpdateName() *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) UpdateNewValues() *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) UpdateSpeed() *DirectLinkUpsertBulk
- func (u *DirectLinkUpsertBulk) UpdateUpdatedAt() *DirectLinkUpsertBulk
- type DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) AddDownloads(v int) *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) AddSpeed(v int) *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) ClearDeletedAt() *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) DoNothing() *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) Exec(ctx context.Context) error
- func (u *DirectLinkUpsertOne) ExecX(ctx context.Context)
- func (u *DirectLinkUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *DirectLinkUpsertOne) IDX(ctx context.Context) int
- func (u *DirectLinkUpsertOne) Ignore() *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) SetDeletedAt(v time.Time) *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) SetDownloads(v int) *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) SetFileID(v int) *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) SetName(v string) *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) SetSpeed(v int) *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) SetUpdatedAt(v time.Time) *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) Update(set func(*DirectLinkUpsert)) *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) UpdateDeletedAt() *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) UpdateDownloads() *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) UpdateFileID() *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) UpdateName() *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) UpdateNewValues() *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) UpdateSpeed() *DirectLinkUpsertOne
- func (u *DirectLinkUpsertOne) UpdateUpdatedAt() *DirectLinkUpsertOne
- type DirectLinks
- type Entities
- type Entity
- func (c *Entity) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Entity) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (e *Entity) QueryFile() *FileQuery
- func (e *Entity) QueryStoragePolicy() *StoragePolicyQuery
- func (e *Entity) QueryUser() *UserQuery
- func (e *Entity) SetFile(v []*File)
- func (e *Entity) SetStoragePolicy(v *StoragePolicy)
- func (e *Entity) SetUser(v *User)
- func (e *Entity) String() string
- func (e *Entity) Unwrap() *Entity
- func (e *Entity) Update() *EntityUpdateOne
- func (e *Entity) Value(name string) (ent.Value, error)
- type EntityClient
- func (c *EntityClient) Create() *EntityCreate
- func (c *EntityClient) CreateBulk(builders ...*EntityCreate) *EntityCreateBulk
- func (c *EntityClient) Delete() *EntityDelete
- func (c *EntityClient) DeleteOne(e *Entity) *EntityDeleteOne
- func (c *EntityClient) DeleteOneID(id int) *EntityDeleteOne
- func (c *EntityClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *EntityClient) Get(ctx context.Context, id int) (*Entity, error)
- func (c *EntityClient) GetX(ctx context.Context, id int) *Entity
- func (c *EntityClient) Hooks() []Hook
- func (c *EntityClient) Intercept(interceptors ...Interceptor)
- func (c *EntityClient) Interceptors() []Interceptor
- func (c *EntityClient) MapCreateBulk(slice any, setFunc func(*EntityCreate, int)) *EntityCreateBulk
- func (c *EntityClient) Query() *EntityQuery
- func (c *EntityClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *EntityClient) QueryFile(e *Entity) *FileQuery
- func (c *EntityClient) QueryStoragePolicy(e *Entity) *StoragePolicyQuery
- func (c *EntityClient) QueryUser(e *Entity) *UserQuery
- func (c *EntityClient) Update() *EntityUpdate
- func (c *EntityClient) UpdateOne(e *Entity) *EntityUpdateOne
- func (c *EntityClient) UpdateOneID(id int) *EntityUpdateOne
- func (c *EntityClient) Use(hooks ...Hook)
- type EntityCreate
- func (ec *EntityCreate) AddFile(f ...*File) *EntityCreate
- func (ec *EntityCreate) AddFileIDs(ids ...int) *EntityCreate
- func (ec *EntityCreate) Exec(ctx context.Context) error
- func (c *EntityCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ec *EntityCreate) ExecX(ctx context.Context)
- func (ec *EntityCreate) Mutation() *EntityMutation
- func (ec *EntityCreate) OnConflict(opts ...sql.ConflictOption) *EntityUpsertOne
- func (ec *EntityCreate) OnConflictColumns(columns ...string) *EntityUpsertOne
- func (c *EntityCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ec *EntityCreate) Save(ctx context.Context) (*Entity, error)
- func (ec *EntityCreate) SaveX(ctx context.Context) *Entity
- func (ec *EntityCreate) SetCreatedAt(t time.Time) *EntityCreate
- func (ec *EntityCreate) SetCreatedBy(i int) *EntityCreate
- func (ec *EntityCreate) SetDeletedAt(t time.Time) *EntityCreate
- func (ec *EntityCreate) SetNillableCreatedAt(t *time.Time) *EntityCreate
- func (ec *EntityCreate) SetNillableCreatedBy(i *int) *EntityCreate
- func (ec *EntityCreate) SetNillableDeletedAt(t *time.Time) *EntityCreate
- func (ec *EntityCreate) SetNillableReferenceCount(i *int) *EntityCreate
- func (ec *EntityCreate) SetNillableUpdatedAt(t *time.Time) *EntityCreate
- func (ec *EntityCreate) SetNillableUploadSessionID(u *uuid.UUID) *EntityCreate
- func (ec *EntityCreate) SetNillableUserID(id *int) *EntityCreate
- func (ec *EntityCreate) SetProps(tp *types.EntityProps) *EntityCreate
- func (m *EntityCreate) SetRawID(t int) *EntityCreate
- func (ec *EntityCreate) SetReferenceCount(i int) *EntityCreate
- func (ec *EntityCreate) SetSize(i int64) *EntityCreate
- func (ec *EntityCreate) SetSource(s string) *EntityCreate
- func (ec *EntityCreate) SetStoragePolicy(s *StoragePolicy) *EntityCreate
- func (ec *EntityCreate) SetStoragePolicyEntities(i int) *EntityCreate
- func (ec *EntityCreate) SetStoragePolicyID(id int) *EntityCreate
- func (ec *EntityCreate) SetType(i int) *EntityCreate
- func (ec *EntityCreate) SetUpdatedAt(t time.Time) *EntityCreate
- func (ec *EntityCreate) SetUploadSessionID(u uuid.UUID) *EntityCreate
- func (ec *EntityCreate) SetUser(u *User) *EntityCreate
- func (ec *EntityCreate) SetUserID(id int) *EntityCreate
- type EntityCreateBulk
- func (ecb *EntityCreateBulk) Exec(ctx context.Context) error
- func (c *EntityCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ecb *EntityCreateBulk) ExecX(ctx context.Context)
- func (ecb *EntityCreateBulk) OnConflict(opts ...sql.ConflictOption) *EntityUpsertBulk
- func (ecb *EntityCreateBulk) OnConflictColumns(columns ...string) *EntityUpsertBulk
- func (c *EntityCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ecb *EntityCreateBulk) Save(ctx context.Context) ([]*Entity, error)
- func (ecb *EntityCreateBulk) SaveX(ctx context.Context) []*Entity
- type EntityDelete
- func (ed *EntityDelete) Exec(ctx context.Context) (int, error)
- func (c *EntityDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ed *EntityDelete) ExecX(ctx context.Context) int
- func (c *EntityDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ed *EntityDelete) Where(ps ...predicate.Entity) *EntityDelete
- type EntityDeleteOne
- type EntityEdges
- type EntityGroupBy
- func (egb *EntityGroupBy) Aggregate(fns ...AggregateFunc) *EntityGroupBy
- func (s *EntityGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EntityGroupBy) BoolX(ctx context.Context) bool
- func (s *EntityGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EntityGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EntityGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EntityGroupBy) Float64X(ctx context.Context) float64
- func (s *EntityGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EntityGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EntityGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EntityGroupBy) IntX(ctx context.Context) int
- func (s *EntityGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EntityGroupBy) IntsX(ctx context.Context) []int
- func (egb *EntityGroupBy) Scan(ctx context.Context, v any) error
- func (s *EntityGroupBy) ScanX(ctx context.Context, v any)
- func (s *EntityGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EntityGroupBy) StringX(ctx context.Context) string
- func (s *EntityGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EntityGroupBy) StringsX(ctx context.Context) []string
- type EntityMutation
- func (m *EntityMutation) AddField(name string, value ent.Value) error
- func (m *EntityMutation) AddFileIDs(ids ...int)
- func (m *EntityMutation) AddReferenceCount(i int)
- func (m *EntityMutation) AddSize(i int64)
- func (m *EntityMutation) AddType(i int)
- func (m *EntityMutation) AddedEdges() []string
- func (m *EntityMutation) AddedField(name string) (ent.Value, bool)
- func (m *EntityMutation) AddedFields() []string
- func (m *EntityMutation) AddedIDs(name string) []ent.Value
- func (m *EntityMutation) AddedReferenceCount() (r int, exists bool)
- func (m *EntityMutation) AddedSize() (r int64, exists bool)
- func (m *EntityMutation) AddedType() (r int, exists bool)
- func (m *EntityMutation) ClearCreatedBy()
- func (m *EntityMutation) ClearDeletedAt()
- func (m *EntityMutation) ClearEdge(name string) error
- func (m *EntityMutation) ClearField(name string) error
- func (m *EntityMutation) ClearFile()
- func (m *EntityMutation) ClearProps()
- func (m *EntityMutation) ClearStoragePolicy()
- func (m *EntityMutation) ClearUploadSessionID()
- func (m *EntityMutation) ClearUser()
- func (m *EntityMutation) ClearedEdges() []string
- func (m *EntityMutation) ClearedFields() []string
- func (m EntityMutation) Client() *Client
- func (m *EntityMutation) CreatedAt() (r time.Time, exists bool)
- func (m *EntityMutation) CreatedBy() (r int, exists bool)
- func (m *EntityMutation) CreatedByCleared() bool
- func (m *EntityMutation) DeletedAt() (r time.Time, exists bool)
- func (m *EntityMutation) DeletedAtCleared() bool
- func (m *EntityMutation) EdgeCleared(name string) bool
- func (c *EntityMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *EntityMutation) Field(name string) (ent.Value, bool)
- func (m *EntityMutation) FieldCleared(name string) bool
- func (m *EntityMutation) Fields() []string
- func (m *EntityMutation) FileCleared() bool
- func (m *EntityMutation) FileIDs() (ids []int)
- func (m *EntityMutation) GetType() (r int, exists bool)
- func (m *EntityMutation) ID() (id int, exists bool)
- func (m *EntityMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EntityMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EntityMutation) OldCreatedBy(ctx context.Context) (v int, err error)
- func (m *EntityMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *EntityMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EntityMutation) OldProps(ctx context.Context) (v *types.EntityProps, err error)
- func (m *EntityMutation) OldReferenceCount(ctx context.Context) (v int, err error)
- func (m *EntityMutation) OldSize(ctx context.Context) (v int64, err error)
- func (m *EntityMutation) OldSource(ctx context.Context) (v string, err error)
- func (m *EntityMutation) OldStoragePolicyEntities(ctx context.Context) (v int, err error)
- func (m *EntityMutation) OldType(ctx context.Context) (v int, err error)
- func (m *EntityMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EntityMutation) OldUploadSessionID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *EntityMutation) Op() Op
- func (m *EntityMutation) Props() (r *types.EntityProps, exists bool)
- func (m *EntityMutation) PropsCleared() bool
- func (c *EntityMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *EntityMutation) ReferenceCount() (r int, exists bool)
- func (m *EntityMutation) RemoveFileIDs(ids ...int)
- func (m *EntityMutation) RemovedEdges() []string
- func (m *EntityMutation) RemovedFileIDs() (ids []int)
- func (m *EntityMutation) RemovedIDs(name string) []ent.Value
- func (m *EntityMutation) ResetCreatedAt()
- func (m *EntityMutation) ResetCreatedBy()
- func (m *EntityMutation) ResetDeletedAt()
- func (m *EntityMutation) ResetEdge(name string) error
- func (m *EntityMutation) ResetField(name string) error
- func (m *EntityMutation) ResetFile()
- func (m *EntityMutation) ResetProps()
- func (m *EntityMutation) ResetReferenceCount()
- func (m *EntityMutation) ResetSize()
- func (m *EntityMutation) ResetSource()
- func (m *EntityMutation) ResetStoragePolicy()
- func (m *EntityMutation) ResetStoragePolicyEntities()
- func (m *EntityMutation) ResetType()
- func (m *EntityMutation) ResetUpdatedAt()
- func (m *EntityMutation) ResetUploadSessionID()
- func (m *EntityMutation) ResetUser()
- func (m *EntityMutation) SetCreatedAt(t time.Time)
- func (m *EntityMutation) SetCreatedBy(i int)
- func (m *EntityMutation) SetDeletedAt(t time.Time)
- func (m *EntityMutation) SetField(name string, value ent.Value) error
- func (m *EntityMutation) SetOp(op Op)
- func (m *EntityMutation) SetProps(tp *types.EntityProps)
- func (m *EntityMutation) SetRawID(t int)
- func (m *EntityMutation) SetReferenceCount(i int)
- func (m *EntityMutation) SetSize(i int64)
- func (m *EntityMutation) SetSource(s string)
- func (m *EntityMutation) SetStoragePolicyEntities(i int)
- func (m *EntityMutation) SetStoragePolicyID(id int)
- func (m *EntityMutation) SetType(i int)
- func (m *EntityMutation) SetUpdatedAt(t time.Time)
- func (m *EntityMutation) SetUploadSessionID(u uuid.UUID)
- func (m *EntityMutation) SetUserID(id int)
- func (m *EntityMutation) Size() (r int64, exists bool)
- func (m *EntityMutation) Source() (r string, exists bool)
- func (m *EntityMutation) StoragePolicyCleared() bool
- func (m *EntityMutation) StoragePolicyEntities() (r int, exists bool)
- func (m *EntityMutation) StoragePolicyID() (id int, exists bool)
- func (m *EntityMutation) StoragePolicyIDs() (ids []int)
- func (m EntityMutation) Tx() (*Tx, error)
- func (m *EntityMutation) Type() string
- func (m *EntityMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *EntityMutation) UploadSessionID() (r uuid.UUID, exists bool)
- func (m *EntityMutation) UploadSessionIDCleared() bool
- func (m *EntityMutation) UserCleared() bool
- func (m *EntityMutation) UserID() (id int, exists bool)
- func (m *EntityMutation) UserIDs() (ids []int)
- func (m *EntityMutation) Where(ps ...predicate.Entity)
- func (m *EntityMutation) WhereP(ps ...func(*sql.Selector))
- type EntityQuery
- func (eq *EntityQuery) Aggregate(fns ...AggregateFunc) *EntitySelect
- func (eq *EntityQuery) All(ctx context.Context) ([]*Entity, error)
- func (eq *EntityQuery) AllX(ctx context.Context) []*Entity
- func (eq *EntityQuery) Clone() *EntityQuery
- func (eq *EntityQuery) Count(ctx context.Context) (int, error)
- func (eq *EntityQuery) CountX(ctx context.Context) int
- func (c *EntityQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (eq *EntityQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EntityQuery) ExistX(ctx context.Context) bool
- func (eq *EntityQuery) First(ctx context.Context) (*Entity, error)
- func (eq *EntityQuery) FirstID(ctx context.Context) (id int, err error)
- func (eq *EntityQuery) FirstIDX(ctx context.Context) int
- func (eq *EntityQuery) FirstX(ctx context.Context) *Entity
- func (eq *EntityQuery) GroupBy(field string, fields ...string) *EntityGroupBy
- func (eq *EntityQuery) IDs(ctx context.Context) (ids []int, err error)
- func (eq *EntityQuery) IDsX(ctx context.Context) []int
- func (eq *EntityQuery) Limit(limit int) *EntityQuery
- func (eq *EntityQuery) Offset(offset int) *EntityQuery
- func (eq *EntityQuery) Only(ctx context.Context) (*Entity, error)
- func (eq *EntityQuery) OnlyID(ctx context.Context) (id int, err error)
- func (eq *EntityQuery) OnlyIDX(ctx context.Context) int
- func (eq *EntityQuery) OnlyX(ctx context.Context) *Entity
- func (eq *EntityQuery) Order(o ...entity.OrderOption) *EntityQuery
- func (c *EntityQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (eq *EntityQuery) QueryFile() *FileQuery
- func (eq *EntityQuery) QueryStoragePolicy() *StoragePolicyQuery
- func (eq *EntityQuery) QueryUser() *UserQuery
- func (eq *EntityQuery) Select(fields ...string) *EntitySelect
- func (eq *EntityQuery) Unique(unique bool) *EntityQuery
- func (eq *EntityQuery) Where(ps ...predicate.Entity) *EntityQuery
- func (eq *EntityQuery) WithFile(opts ...func(*FileQuery)) *EntityQuery
- func (eq *EntityQuery) WithStoragePolicy(opts ...func(*StoragePolicyQuery)) *EntityQuery
- func (eq *EntityQuery) WithUser(opts ...func(*UserQuery)) *EntityQuery
- type EntitySelect
- func (es *EntitySelect) Aggregate(fns ...AggregateFunc) *EntitySelect
- func (s *EntitySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EntitySelect) BoolX(ctx context.Context) bool
- func (s *EntitySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EntitySelect) BoolsX(ctx context.Context) []bool
- func (c EntitySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *EntitySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EntitySelect) Float64X(ctx context.Context) float64
- func (s *EntitySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EntitySelect) Float64sX(ctx context.Context) []float64
- func (s *EntitySelect) Int(ctx context.Context) (_ int, err error)
- func (s *EntitySelect) IntX(ctx context.Context) int
- func (s *EntitySelect) Ints(ctx context.Context) ([]int, error)
- func (s *EntitySelect) IntsX(ctx context.Context) []int
- func (c EntitySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (es *EntitySelect) Scan(ctx context.Context, v any) error
- func (s *EntitySelect) ScanX(ctx context.Context, v any)
- func (s *EntitySelect) String(ctx context.Context) (_ string, err error)
- func (s *EntitySelect) StringX(ctx context.Context) string
- func (s *EntitySelect) Strings(ctx context.Context) ([]string, error)
- func (s *EntitySelect) StringsX(ctx context.Context) []string
- type EntityUpdate
- func (eu *EntityUpdate) AddFile(f ...*File) *EntityUpdate
- func (eu *EntityUpdate) AddFileIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) AddReferenceCount(i int) *EntityUpdate
- func (eu *EntityUpdate) AddSize(i int64) *EntityUpdate
- func (eu *EntityUpdate) AddType(i int) *EntityUpdate
- func (eu *EntityUpdate) ClearCreatedBy() *EntityUpdate
- func (eu *EntityUpdate) ClearDeletedAt() *EntityUpdate
- func (eu *EntityUpdate) ClearFile() *EntityUpdate
- func (eu *EntityUpdate) ClearProps() *EntityUpdate
- func (eu *EntityUpdate) ClearStoragePolicy() *EntityUpdate
- func (eu *EntityUpdate) ClearUploadSessionID() *EntityUpdate
- func (eu *EntityUpdate) ClearUser() *EntityUpdate
- func (eu *EntityUpdate) Exec(ctx context.Context) error
- func (c *EntityUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (eu *EntityUpdate) ExecX(ctx context.Context)
- func (eu *EntityUpdate) Mutation() *EntityMutation
- func (c *EntityUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (eu *EntityUpdate) RemoveFile(f ...*File) *EntityUpdate
- func (eu *EntityUpdate) RemoveFileIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) Save(ctx context.Context) (int, error)
- func (eu *EntityUpdate) SaveX(ctx context.Context) int
- func (eu *EntityUpdate) SetCreatedBy(i int) *EntityUpdate
- func (eu *EntityUpdate) SetDeletedAt(t time.Time) *EntityUpdate
- func (eu *EntityUpdate) SetNillableCreatedBy(i *int) *EntityUpdate
- func (eu *EntityUpdate) SetNillableDeletedAt(t *time.Time) *EntityUpdate
- func (eu *EntityUpdate) SetNillableReferenceCount(i *int) *EntityUpdate
- func (eu *EntityUpdate) SetNillableSize(i *int64) *EntityUpdate
- func (eu *EntityUpdate) SetNillableSource(s *string) *EntityUpdate
- func (eu *EntityUpdate) SetNillableStoragePolicyEntities(i *int) *EntityUpdate
- func (eu *EntityUpdate) SetNillableType(i *int) *EntityUpdate
- func (eu *EntityUpdate) SetNillableUploadSessionID(u *uuid.UUID) *EntityUpdate
- func (eu *EntityUpdate) SetNillableUserID(id *int) *EntityUpdate
- func (eu *EntityUpdate) SetProps(tp *types.EntityProps) *EntityUpdate
- func (eu *EntityUpdate) SetReferenceCount(i int) *EntityUpdate
- func (eu *EntityUpdate) SetSize(i int64) *EntityUpdate
- func (eu *EntityUpdate) SetSource(s string) *EntityUpdate
- func (eu *EntityUpdate) SetStoragePolicy(s *StoragePolicy) *EntityUpdate
- func (eu *EntityUpdate) SetStoragePolicyEntities(i int) *EntityUpdate
- func (eu *EntityUpdate) SetStoragePolicyID(id int) *EntityUpdate
- func (eu *EntityUpdate) SetType(i int) *EntityUpdate
- func (eu *EntityUpdate) SetUpdatedAt(t time.Time) *EntityUpdate
- func (eu *EntityUpdate) SetUploadSessionID(u uuid.UUID) *EntityUpdate
- func (eu *EntityUpdate) SetUser(u *User) *EntityUpdate
- func (eu *EntityUpdate) SetUserID(id int) *EntityUpdate
- func (eu *EntityUpdate) Where(ps ...predicate.Entity) *EntityUpdate
- type EntityUpdateOne
- func (euo *EntityUpdateOne) AddFile(f ...*File) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddFileIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddReferenceCount(i int) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddSize(i int64) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddType(i int) *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearCreatedBy() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearDeletedAt() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearFile() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearProps() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearStoragePolicy() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearUploadSessionID() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearUser() *EntityUpdateOne
- func (euo *EntityUpdateOne) Exec(ctx context.Context) error
- func (c *EntityUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (euo *EntityUpdateOne) ExecX(ctx context.Context)
- func (euo *EntityUpdateOne) Mutation() *EntityMutation
- func (c *EntityUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (euo *EntityUpdateOne) RemoveFile(f ...*File) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveFileIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) Save(ctx context.Context) (*Entity, error)
- func (euo *EntityUpdateOne) SaveX(ctx context.Context) *Entity
- func (euo *EntityUpdateOne) Select(field string, fields ...string) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetCreatedBy(i int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetDeletedAt(t time.Time) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableCreatedBy(i *int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableDeletedAt(t *time.Time) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableReferenceCount(i *int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableSize(i *int64) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableSource(s *string) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableStoragePolicyEntities(i *int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableType(i *int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableUploadSessionID(u *uuid.UUID) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableUserID(id *int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetProps(tp *types.EntityProps) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetReferenceCount(i int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetSize(i int64) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetSource(s string) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetStoragePolicy(s *StoragePolicy) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetStoragePolicyEntities(i int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetStoragePolicyID(id int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetType(i int) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetUpdatedAt(t time.Time) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetUploadSessionID(u uuid.UUID) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetUser(u *User) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetUserID(id int) *EntityUpdateOne
- func (euo *EntityUpdateOne) Where(ps ...predicate.Entity) *EntityUpdateOne
- type EntityUpsert
- func (u *EntityUpsert) AddReferenceCount(v int) *EntityUpsert
- func (u *EntityUpsert) AddSize(v int64) *EntityUpsert
- func (u *EntityUpsert) AddType(v int) *EntityUpsert
- func (u *EntityUpsert) ClearCreatedBy() *EntityUpsert
- func (u *EntityUpsert) ClearDeletedAt() *EntityUpsert
- func (u *EntityUpsert) ClearProps() *EntityUpsert
- func (u *EntityUpsert) ClearUploadSessionID() *EntityUpsert
- func (u *EntityUpsert) SetCreatedBy(v int) *EntityUpsert
- func (u *EntityUpsert) SetDeletedAt(v time.Time) *EntityUpsert
- func (u *EntityUpsert) SetProps(v *types.EntityProps) *EntityUpsert
- func (u *EntityUpsert) SetReferenceCount(v int) *EntityUpsert
- func (u *EntityUpsert) SetSize(v int64) *EntityUpsert
- func (u *EntityUpsert) SetSource(v string) *EntityUpsert
- func (u *EntityUpsert) SetStoragePolicyEntities(v int) *EntityUpsert
- func (u *EntityUpsert) SetType(v int) *EntityUpsert
- func (u *EntityUpsert) SetUpdatedAt(v time.Time) *EntityUpsert
- func (u *EntityUpsert) SetUploadSessionID(v uuid.UUID) *EntityUpsert
- func (u *EntityUpsert) UpdateCreatedBy() *EntityUpsert
- func (u *EntityUpsert) UpdateDeletedAt() *EntityUpsert
- func (u *EntityUpsert) UpdateProps() *EntityUpsert
- func (u *EntityUpsert) UpdateReferenceCount() *EntityUpsert
- func (u *EntityUpsert) UpdateSize() *EntityUpsert
- func (u *EntityUpsert) UpdateSource() *EntityUpsert
- func (u *EntityUpsert) UpdateStoragePolicyEntities() *EntityUpsert
- func (u *EntityUpsert) UpdateType() *EntityUpsert
- func (u *EntityUpsert) UpdateUpdatedAt() *EntityUpsert
- func (u *EntityUpsert) UpdateUploadSessionID() *EntityUpsert
- type EntityUpsertBulk
- func (u *EntityUpsertBulk) AddReferenceCount(v int) *EntityUpsertBulk
- func (u *EntityUpsertBulk) AddSize(v int64) *EntityUpsertBulk
- func (u *EntityUpsertBulk) AddType(v int) *EntityUpsertBulk
- func (u *EntityUpsertBulk) ClearCreatedBy() *EntityUpsertBulk
- func (u *EntityUpsertBulk) ClearDeletedAt() *EntityUpsertBulk
- func (u *EntityUpsertBulk) ClearProps() *EntityUpsertBulk
- func (u *EntityUpsertBulk) ClearUploadSessionID() *EntityUpsertBulk
- func (u *EntityUpsertBulk) DoNothing() *EntityUpsertBulk
- func (u *EntityUpsertBulk) Exec(ctx context.Context) error
- func (u *EntityUpsertBulk) ExecX(ctx context.Context)
- func (u *EntityUpsertBulk) Ignore() *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetCreatedBy(v int) *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetDeletedAt(v time.Time) *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetProps(v *types.EntityProps) *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetReferenceCount(v int) *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetSize(v int64) *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetSource(v string) *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetStoragePolicyEntities(v int) *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetType(v int) *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetUpdatedAt(v time.Time) *EntityUpsertBulk
- func (u *EntityUpsertBulk) SetUploadSessionID(v uuid.UUID) *EntityUpsertBulk
- func (u *EntityUpsertBulk) Update(set func(*EntityUpsert)) *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateCreatedBy() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateDeletedAt() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateNewValues() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateProps() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateReferenceCount() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateSize() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateSource() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateStoragePolicyEntities() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateType() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateUpdatedAt() *EntityUpsertBulk
- func (u *EntityUpsertBulk) UpdateUploadSessionID() *EntityUpsertBulk
- type EntityUpsertOne
- func (u *EntityUpsertOne) AddReferenceCount(v int) *EntityUpsertOne
- func (u *EntityUpsertOne) AddSize(v int64) *EntityUpsertOne
- func (u *EntityUpsertOne) AddType(v int) *EntityUpsertOne
- func (u *EntityUpsertOne) ClearCreatedBy() *EntityUpsertOne
- func (u *EntityUpsertOne) ClearDeletedAt() *EntityUpsertOne
- func (u *EntityUpsertOne) ClearProps() *EntityUpsertOne
- func (u *EntityUpsertOne) ClearUploadSessionID() *EntityUpsertOne
- func (u *EntityUpsertOne) DoNothing() *EntityUpsertOne
- func (u *EntityUpsertOne) Exec(ctx context.Context) error
- func (u *EntityUpsertOne) ExecX(ctx context.Context)
- func (u *EntityUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *EntityUpsertOne) IDX(ctx context.Context) int
- func (u *EntityUpsertOne) Ignore() *EntityUpsertOne
- func (u *EntityUpsertOne) SetCreatedBy(v int) *EntityUpsertOne
- func (u *EntityUpsertOne) SetDeletedAt(v time.Time) *EntityUpsertOne
- func (u *EntityUpsertOne) SetProps(v *types.EntityProps) *EntityUpsertOne
- func (u *EntityUpsertOne) SetReferenceCount(v int) *EntityUpsertOne
- func (u *EntityUpsertOne) SetSize(v int64) *EntityUpsertOne
- func (u *EntityUpsertOne) SetSource(v string) *EntityUpsertOne
- func (u *EntityUpsertOne) SetStoragePolicyEntities(v int) *EntityUpsertOne
- func (u *EntityUpsertOne) SetType(v int) *EntityUpsertOne
- func (u *EntityUpsertOne) SetUpdatedAt(v time.Time) *EntityUpsertOne
- func (u *EntityUpsertOne) SetUploadSessionID(v uuid.UUID) *EntityUpsertOne
- func (u *EntityUpsertOne) Update(set func(*EntityUpsert)) *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateCreatedBy() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateDeletedAt() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateNewValues() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateProps() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateReferenceCount() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateSize() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateSource() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateStoragePolicyEntities() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateType() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateUpdatedAt() *EntityUpsertOne
- func (u *EntityUpsertOne) UpdateUploadSessionID() *EntityUpsertOne
- type File
- func (c *File) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (f *File) QueryChildren() *FileQuery
- func (c *File) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (f *File) QueryDirectLinks() *DirectLinkQuery
- func (f *File) QueryEntities() *EntityQuery
- func (f *File) QueryMetadata() *MetadataQuery
- func (f *File) QueryOwner() *UserQuery
- func (f *File) QueryParent() *FileQuery
- func (f *File) QueryShares() *ShareQuery
- func (f *File) QueryStoragePolicies() *StoragePolicyQuery
- func (e *File) SetChildren(v []*File)
- func (e *File) SetDirectLinks(v []*DirectLink)
- func (e *File) SetEntities(v []*Entity)
- func (e *File) SetMetadata(v []*Metadata)
- func (e *File) SetOwner(v *User)
- func (e *File) SetParent(v *File)
- func (e *File) SetShares(v []*Share)
- func (e *File) SetStoragePolicies(v *StoragePolicy)
- func (f *File) String() string
- func (f *File) Unwrap() *File
- func (f *File) Update() *FileUpdateOne
- func (f *File) Value(name string) (ent.Value, error)
- type FileClient
- func (c *FileClient) Create() *FileCreate
- func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
- func (c *FileClient) Delete() *FileDelete
- func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
- func (c *FileClient) DeleteOneID(id int) *FileDeleteOne
- func (c *FileClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *FileClient) Get(ctx context.Context, id int) (*File, error)
- func (c *FileClient) GetX(ctx context.Context, id int) *File
- func (c *FileClient) Hooks() []Hook
- func (c *FileClient) Intercept(interceptors ...Interceptor)
- func (c *FileClient) Interceptors() []Interceptor
- func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
- func (c *FileClient) Query() *FileQuery
- func (c *FileClient) QueryChildren(f *File) *FileQuery
- func (c *FileClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *FileClient) QueryDirectLinks(f *File) *DirectLinkQuery
- func (c *FileClient) QueryEntities(f *File) *EntityQuery
- func (c *FileClient) QueryMetadata(f *File) *MetadataQuery
- func (c *FileClient) QueryOwner(f *File) *UserQuery
- func (c *FileClient) QueryParent(f *File) *FileQuery
- func (c *FileClient) QueryShares(f *File) *ShareQuery
- func (c *FileClient) QueryStoragePolicies(f *File) *StoragePolicyQuery
- func (c *FileClient) Update() *FileUpdate
- func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
- func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
- func (c *FileClient) Use(hooks ...Hook)
- type FileCreate
- func (fc *FileCreate) AddChildIDs(ids ...int) *FileCreate
- func (fc *FileCreate) AddChildren(f ...*File) *FileCreate
- func (fc *FileCreate) AddDirectLinkIDs(ids ...int) *FileCreate
- func (fc *FileCreate) AddDirectLinks(d ...*DirectLink) *FileCreate
- func (fc *FileCreate) AddEntities(e ...*Entity) *FileCreate
- func (fc *FileCreate) AddEntityIDs(ids ...int) *FileCreate
- func (fc *FileCreate) AddMetadata(m ...*Metadata) *FileCreate
- func (fc *FileCreate) AddMetadatumIDs(ids ...int) *FileCreate
- func (fc *FileCreate) AddShareIDs(ids ...int) *FileCreate
- func (fc *FileCreate) AddShares(s ...*Share) *FileCreate
- func (fc *FileCreate) Exec(ctx context.Context) error
- func (c *FileCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fc *FileCreate) ExecX(ctx context.Context)
- func (fc *FileCreate) Mutation() *FileMutation
- func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne
- func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne
- func (c *FileCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fc *FileCreate) Save(ctx context.Context) (*File, error)
- func (fc *FileCreate) SaveX(ctx context.Context) *File
- func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate
- func (fc *FileCreate) SetFileChildren(i int) *FileCreate
- func (fc *FileCreate) SetIsSymbolic(b bool) *FileCreate
- func (fc *FileCreate) SetName(s string) *FileCreate
- func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetNillableFileChildren(i *int) *FileCreate
- func (fc *FileCreate) SetNillableIsSymbolic(b *bool) *FileCreate
- func (fc *FileCreate) SetNillableParentID(id *int) *FileCreate
- func (fc *FileCreate) SetNillablePrimaryEntity(i *int) *FileCreate
- func (fc *FileCreate) SetNillableSize(i *int64) *FileCreate
- func (fc *FileCreate) SetNillableStoragePoliciesID(id *int) *FileCreate
- func (fc *FileCreate) SetNillableStoragePolicyFiles(i *int) *FileCreate
- func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetOwner(u *User) *FileCreate
- func (fc *FileCreate) SetOwnerID(i int) *FileCreate
- func (fc *FileCreate) SetParent(f *File) *FileCreate
- func (fc *FileCreate) SetParentID(id int) *FileCreate
- func (fc *FileCreate) SetPrimaryEntity(i int) *FileCreate
- func (fc *FileCreate) SetProps(tp *types.FileProps) *FileCreate
- func (m *FileCreate) SetRawID(t int) *FileCreate
- func (fc *FileCreate) SetSize(i int64) *FileCreate
- func (fc *FileCreate) SetStoragePolicies(s *StoragePolicy) *FileCreate
- func (fc *FileCreate) SetStoragePoliciesID(id int) *FileCreate
- func (fc *FileCreate) SetStoragePolicyFiles(i int) *FileCreate
- func (fc *FileCreate) SetType(i int) *FileCreate
- func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate
- type FileCreateBulk
- func (fcb *FileCreateBulk) Exec(ctx context.Context) error
- func (c *FileCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fcb *FileCreateBulk) ExecX(ctx context.Context)
- func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk
- func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk
- func (c *FileCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error)
- func (fcb *FileCreateBulk) SaveX(ctx context.Context) []*File
- type FileDelete
- func (fd *FileDelete) Exec(ctx context.Context) (int, error)
- func (c *FileDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fd *FileDelete) ExecX(ctx context.Context) int
- func (c *FileDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete
- type FileDeleteOne
- type FileEdges
- func (e FileEdges) ChildrenOrErr() ([]*File, error)
- func (e FileEdges) DirectLinksOrErr() ([]*DirectLink, error)
- func (e FileEdges) EntitiesOrErr() ([]*Entity, error)
- func (e FileEdges) MetadataOrErr() ([]*Metadata, error)
- func (e FileEdges) OwnerOrErr() (*User, error)
- func (e FileEdges) ParentOrErr() (*File, error)
- func (e FileEdges) SharesOrErr() ([]*Share, error)
- func (e FileEdges) StoragePoliciesOrErr() (*StoragePolicy, error)
- type FileGroupBy
- func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
- func (s *FileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileGroupBy) BoolX(ctx context.Context) bool
- func (s *FileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileGroupBy) Float64X(ctx context.Context) float64
- func (s *FileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FileGroupBy) IntX(ctx context.Context) int
- func (s *FileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FileGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
- func (s *FileGroupBy) ScanX(ctx context.Context, v any)
- func (s *FileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FileGroupBy) StringX(ctx context.Context) string
- func (s *FileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FileGroupBy) StringsX(ctx context.Context) []string
- type FileMutation
- func (m *FileMutation) AddChildIDs(ids ...int)
- func (m *FileMutation) AddDirectLinkIDs(ids ...int)
- func (m *FileMutation) AddEntityIDs(ids ...int)
- func (m *FileMutation) AddField(name string, value ent.Value) error
- func (m *FileMutation) AddMetadatumIDs(ids ...int)
- func (m *FileMutation) AddPrimaryEntity(i int)
- func (m *FileMutation) AddShareIDs(ids ...int)
- func (m *FileMutation) AddSize(i int64)
- func (m *FileMutation) AddType(i int)
- func (m *FileMutation) AddedEdges() []string
- func (m *FileMutation) AddedField(name string) (ent.Value, bool)
- func (m *FileMutation) AddedFields() []string
- func (m *FileMutation) AddedIDs(name string) []ent.Value
- func (m *FileMutation) AddedPrimaryEntity() (r int, exists bool)
- func (m *FileMutation) AddedSize() (r int64, exists bool)
- func (m *FileMutation) AddedType() (r int, exists bool)
- func (m *FileMutation) ChildrenCleared() bool
- func (m *FileMutation) ChildrenIDs() (ids []int)
- func (m *FileMutation) ClearChildren()
- func (m *FileMutation) ClearDirectLinks()
- func (m *FileMutation) ClearEdge(name string) error
- func (m *FileMutation) ClearEntities()
- func (m *FileMutation) ClearField(name string) error
- func (m *FileMutation) ClearFileChildren()
- func (m *FileMutation) ClearMetadata()
- func (m *FileMutation) ClearOwner()
- func (m *FileMutation) ClearParent()
- func (m *FileMutation) ClearPrimaryEntity()
- func (m *FileMutation) ClearProps()
- func (m *FileMutation) ClearShares()
- func (m *FileMutation) ClearStoragePolicies()
- func (m *FileMutation) ClearStoragePolicyFiles()
- func (m *FileMutation) ClearedEdges() []string
- func (m *FileMutation) ClearedFields() []string
- func (m FileMutation) Client() *Client
- func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FileMutation) DirectLinksCleared() bool
- func (m *FileMutation) DirectLinksIDs() (ids []int)
- func (m *FileMutation) EdgeCleared(name string) bool
- func (m *FileMutation) EntitiesCleared() bool
- func (m *FileMutation) EntitiesIDs() (ids []int)
- func (c *FileMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *FileMutation) Field(name string) (ent.Value, bool)
- func (m *FileMutation) FieldCleared(name string) bool
- func (m *FileMutation) Fields() []string
- func (m *FileMutation) FileChildren() (r int, exists bool)
- func (m *FileMutation) FileChildrenCleared() bool
- func (m *FileMutation) GetType() (r int, exists bool)
- func (m *FileMutation) ID() (id int, exists bool)
- func (m *FileMutation) IDs(ctx context.Context) ([]int, error)
- func (m *FileMutation) IsSymbolic() (r bool, exists bool)
- func (m *FileMutation) MetadataCleared() bool
- func (m *FileMutation) MetadataIDs() (ids []int)
- func (m *FileMutation) Name() (r string, exists bool)
- func (m *FileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FileMutation) OldFileChildren(ctx context.Context) (v int, err error)
- func (m *FileMutation) OldIsSymbolic(ctx context.Context) (v bool, err error)
- func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *FileMutation) OldPrimaryEntity(ctx context.Context) (v int, err error)
- func (m *FileMutation) OldProps(ctx context.Context) (v *types.FileProps, err error)
- func (m *FileMutation) OldSize(ctx context.Context) (v int64, err error)
- func (m *FileMutation) OldStoragePolicyFiles(ctx context.Context) (v int, err error)
- func (m *FileMutation) OldType(ctx context.Context) (v int, err error)
- func (m *FileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileMutation) Op() Op
- func (m *FileMutation) OwnerCleared() bool
- func (m *FileMutation) OwnerID() (r int, exists bool)
- func (m *FileMutation) OwnerIDs() (ids []int)
- func (m *FileMutation) ParentCleared() bool
- func (m *FileMutation) ParentID() (id int, exists bool)
- func (m *FileMutation) ParentIDs() (ids []int)
- func (m *FileMutation) PrimaryEntity() (r int, exists bool)
- func (m *FileMutation) PrimaryEntityCleared() bool
- func (m *FileMutation) Props() (r *types.FileProps, exists bool)
- func (m *FileMutation) PropsCleared() bool
- func (c *FileMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *FileMutation) RemoveChildIDs(ids ...int)
- func (m *FileMutation) RemoveDirectLinkIDs(ids ...int)
- func (m *FileMutation) RemoveEntityIDs(ids ...int)
- func (m *FileMutation) RemoveMetadatumIDs(ids ...int)
- func (m *FileMutation) RemoveShareIDs(ids ...int)
- func (m *FileMutation) RemovedChildrenIDs() (ids []int)
- func (m *FileMutation) RemovedDirectLinksIDs() (ids []int)
- func (m *FileMutation) RemovedEdges() []string
- func (m *FileMutation) RemovedEntitiesIDs() (ids []int)
- func (m *FileMutation) RemovedIDs(name string) []ent.Value
- func (m *FileMutation) RemovedMetadataIDs() (ids []int)
- func (m *FileMutation) RemovedSharesIDs() (ids []int)
- func (m *FileMutation) ResetChildren()
- func (m *FileMutation) ResetCreatedAt()
- func (m *FileMutation) ResetDirectLinks()
- func (m *FileMutation) ResetEdge(name string) error
- func (m *FileMutation) ResetEntities()
- func (m *FileMutation) ResetField(name string) error
- func (m *FileMutation) ResetFileChildren()
- func (m *FileMutation) ResetIsSymbolic()
- func (m *FileMutation) ResetMetadata()
- func (m *FileMutation) ResetName()
- func (m *FileMutation) ResetOwner()
- func (m *FileMutation) ResetOwnerID()
- func (m *FileMutation) ResetParent()
- func (m *FileMutation) ResetPrimaryEntity()
- func (m *FileMutation) ResetProps()
- func (m *FileMutation) ResetShares()
- func (m *FileMutation) ResetSize()
- func (m *FileMutation) ResetStoragePolicies()
- func (m *FileMutation) ResetStoragePolicyFiles()
- func (m *FileMutation) ResetType()
- func (m *FileMutation) ResetUpdatedAt()
- func (m *FileMutation) SetCreatedAt(t time.Time)
- func (m *FileMutation) SetField(name string, value ent.Value) error
- func (m *FileMutation) SetFileChildren(i int)
- func (m *FileMutation) SetIsSymbolic(b bool)
- func (m *FileMutation) SetName(s string)
- func (m *FileMutation) SetOp(op Op)
- func (m *FileMutation) SetOwnerID(i int)
- func (m *FileMutation) SetParentID(id int)
- func (m *FileMutation) SetPrimaryEntity(i int)
- func (m *FileMutation) SetProps(tp *types.FileProps)
- func (m *FileMutation) SetRawID(t int)
- func (m *FileMutation) SetSize(i int64)
- func (m *FileMutation) SetStoragePoliciesID(id int)
- func (m *FileMutation) SetStoragePolicyFiles(i int)
- func (m *FileMutation) SetType(i int)
- func (m *FileMutation) SetUpdatedAt(t time.Time)
- func (m *FileMutation) SharesCleared() bool
- func (m *FileMutation) SharesIDs() (ids []int)
- func (m *FileMutation) Size() (r int64, exists bool)
- func (m *FileMutation) StoragePoliciesCleared() bool
- func (m *FileMutation) StoragePoliciesID() (id int, exists bool)
- func (m *FileMutation) StoragePoliciesIDs() (ids []int)
- func (m *FileMutation) StoragePolicyFiles() (r int, exists bool)
- func (m *FileMutation) StoragePolicyFilesCleared() bool
- func (m FileMutation) Tx() (*Tx, error)
- func (m *FileMutation) Type() string
- func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FileMutation) Where(ps ...predicate.File)
- func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
- type FileQuery
- func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
- func (fq *FileQuery) All(ctx context.Context) ([]*File, error)
- func (fq *FileQuery) AllX(ctx context.Context) []*File
- func (fq *FileQuery) Clone() *FileQuery
- func (fq *FileQuery) Count(ctx context.Context) (int, error)
- func (fq *FileQuery) CountX(ctx context.Context) int
- func (c *FileQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fq *FileQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FileQuery) ExistX(ctx context.Context) bool
- func (fq *FileQuery) First(ctx context.Context) (*File, error)
- func (fq *FileQuery) FirstID(ctx context.Context) (id int, err error)
- func (fq *FileQuery) FirstIDX(ctx context.Context) int
- func (fq *FileQuery) FirstX(ctx context.Context) *File
- func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
- func (fq *FileQuery) IDs(ctx context.Context) (ids []int, err error)
- func (fq *FileQuery) IDsX(ctx context.Context) []int
- func (fq *FileQuery) Limit(limit int) *FileQuery
- func (fq *FileQuery) Offset(offset int) *FileQuery
- func (fq *FileQuery) Only(ctx context.Context) (*File, error)
- func (fq *FileQuery) OnlyID(ctx context.Context) (id int, err error)
- func (fq *FileQuery) OnlyIDX(ctx context.Context) int
- func (fq *FileQuery) OnlyX(ctx context.Context) *File
- func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery
- func (fq *FileQuery) QueryChildren() *FileQuery
- func (c *FileQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fq *FileQuery) QueryDirectLinks() *DirectLinkQuery
- func (fq *FileQuery) QueryEntities() *EntityQuery
- func (fq *FileQuery) QueryMetadata() *MetadataQuery
- func (fq *FileQuery) QueryOwner() *UserQuery
- func (fq *FileQuery) QueryParent() *FileQuery
- func (fq *FileQuery) QueryShares() *ShareQuery
- func (fq *FileQuery) QueryStoragePolicies() *StoragePolicyQuery
- func (fq *FileQuery) Select(fields ...string) *FileSelect
- func (fq *FileQuery) Unique(unique bool) *FileQuery
- func (fq *FileQuery) Where(ps ...predicate.File) *FileQuery
- func (fq *FileQuery) WithChildren(opts ...func(*FileQuery)) *FileQuery
- func (fq *FileQuery) WithDirectLinks(opts ...func(*DirectLinkQuery)) *FileQuery
- func (fq *FileQuery) WithEntities(opts ...func(*EntityQuery)) *FileQuery
- func (fq *FileQuery) WithMetadata(opts ...func(*MetadataQuery)) *FileQuery
- func (fq *FileQuery) WithOwner(opts ...func(*UserQuery)) *FileQuery
- func (fq *FileQuery) WithParent(opts ...func(*FileQuery)) *FileQuery
- func (fq *FileQuery) WithShares(opts ...func(*ShareQuery)) *FileQuery
- func (fq *FileQuery) WithStoragePolicies(opts ...func(*StoragePolicyQuery)) *FileQuery
- type FileSelect
- func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
- func (s *FileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileSelect) BoolX(ctx context.Context) bool
- func (s *FileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FileSelect) BoolsX(ctx context.Context) []bool
- func (c FileSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *FileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileSelect) Float64X(ctx context.Context) float64
- func (s *FileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileSelect) Float64sX(ctx context.Context) []float64
- func (s *FileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FileSelect) IntX(ctx context.Context) int
- func (s *FileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FileSelect) IntsX(ctx context.Context) []int
- func (c FileSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fs *FileSelect) Scan(ctx context.Context, v any) error
- func (s *FileSelect) ScanX(ctx context.Context, v any)
- func (s *FileSelect) String(ctx context.Context) (_ string, err error)
- func (s *FileSelect) StringX(ctx context.Context) string
- func (s *FileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FileSelect) StringsX(ctx context.Context) []string
- type FileUpdate
- func (fu *FileUpdate) AddChildIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) AddChildren(f ...*File) *FileUpdate
- func (fu *FileUpdate) AddDirectLinkIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) AddDirectLinks(d ...*DirectLink) *FileUpdate
- func (fu *FileUpdate) AddEntities(e ...*Entity) *FileUpdate
- func (fu *FileUpdate) AddEntityIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) AddMetadata(m ...*Metadata) *FileUpdate
- func (fu *FileUpdate) AddMetadatumIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) AddPrimaryEntity(i int) *FileUpdate
- func (fu *FileUpdate) AddShareIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) AddShares(s ...*Share) *FileUpdate
- func (fu *FileUpdate) AddSize(i int64) *FileUpdate
- func (fu *FileUpdate) AddType(i int) *FileUpdate
- func (fu *FileUpdate) ClearChildren() *FileUpdate
- func (fu *FileUpdate) ClearDirectLinks() *FileUpdate
- func (fu *FileUpdate) ClearEntities() *FileUpdate
- func (fu *FileUpdate) ClearFileChildren() *FileUpdate
- func (fu *FileUpdate) ClearMetadata() *FileUpdate
- func (fu *FileUpdate) ClearOwner() *FileUpdate
- func (fu *FileUpdate) ClearParent() *FileUpdate
- func (fu *FileUpdate) ClearPrimaryEntity() *FileUpdate
- func (fu *FileUpdate) ClearProps() *FileUpdate
- func (fu *FileUpdate) ClearShares() *FileUpdate
- func (fu *FileUpdate) ClearStoragePolicies() *FileUpdate
- func (fu *FileUpdate) ClearStoragePolicyFiles() *FileUpdate
- func (fu *FileUpdate) Exec(ctx context.Context) error
- func (c *FileUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fu *FileUpdate) ExecX(ctx context.Context)
- func (fu *FileUpdate) Mutation() *FileMutation
- func (c *FileUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fu *FileUpdate) RemoveChildIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) RemoveChildren(f ...*File) *FileUpdate
- func (fu *FileUpdate) RemoveDirectLinkIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) RemoveDirectLinks(d ...*DirectLink) *FileUpdate
- func (fu *FileUpdate) RemoveEntities(e ...*Entity) *FileUpdate
- func (fu *FileUpdate) RemoveEntityIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) RemoveMetadata(m ...*Metadata) *FileUpdate
- func (fu *FileUpdate) RemoveMetadatumIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) RemoveShareIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) RemoveShares(s ...*Share) *FileUpdate
- func (fu *FileUpdate) Save(ctx context.Context) (int, error)
- func (fu *FileUpdate) SaveX(ctx context.Context) int
- func (fu *FileUpdate) SetFileChildren(i int) *FileUpdate
- func (fu *FileUpdate) SetIsSymbolic(b bool) *FileUpdate
- func (fu *FileUpdate) SetName(s string) *FileUpdate
- func (fu *FileUpdate) SetNillableFileChildren(i *int) *FileUpdate
- func (fu *FileUpdate) SetNillableIsSymbolic(b *bool) *FileUpdate
- func (fu *FileUpdate) SetNillableName(s *string) *FileUpdate
- func (fu *FileUpdate) SetNillableOwnerID(i *int) *FileUpdate
- func (fu *FileUpdate) SetNillableParentID(id *int) *FileUpdate
- func (fu *FileUpdate) SetNillablePrimaryEntity(i *int) *FileUpdate
- func (fu *FileUpdate) SetNillableSize(i *int64) *FileUpdate
- func (fu *FileUpdate) SetNillableStoragePoliciesID(id *int) *FileUpdate
- func (fu *FileUpdate) SetNillableStoragePolicyFiles(i *int) *FileUpdate
- func (fu *FileUpdate) SetNillableType(i *int) *FileUpdate
- func (fu *FileUpdate) SetNillableUpdatedAt(t *time.Time) *FileUpdate
- func (fu *FileUpdate) SetOwner(u *User) *FileUpdate
- func (fu *FileUpdate) SetOwnerID(i int) *FileUpdate
- func (fu *FileUpdate) SetParent(f *File) *FileUpdate
- func (fu *FileUpdate) SetParentID(id int) *FileUpdate
- func (fu *FileUpdate) SetPrimaryEntity(i int) *FileUpdate
- func (fu *FileUpdate) SetProps(tp *types.FileProps) *FileUpdate
- func (fu *FileUpdate) SetSize(i int64) *FileUpdate
- func (fu *FileUpdate) SetStoragePolicies(s *StoragePolicy) *FileUpdate
- func (fu *FileUpdate) SetStoragePoliciesID(id int) *FileUpdate
- func (fu *FileUpdate) SetStoragePolicyFiles(i int) *FileUpdate
- func (fu *FileUpdate) SetType(i int) *FileUpdate
- func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate
- func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
- type FileUpdateOne
- func (fuo *FileUpdateOne) AddChildIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddChildren(f ...*File) *FileUpdateOne
- func (fuo *FileUpdateOne) AddDirectLinkIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddDirectLinks(d ...*DirectLink) *FileUpdateOne
- func (fuo *FileUpdateOne) AddEntities(e ...*Entity) *FileUpdateOne
- func (fuo *FileUpdateOne) AddEntityIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddMetadata(m ...*Metadata) *FileUpdateOne
- func (fuo *FileUpdateOne) AddMetadatumIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddPrimaryEntity(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddShareIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddShares(s ...*Share) *FileUpdateOne
- func (fuo *FileUpdateOne) AddSize(i int64) *FileUpdateOne
- func (fuo *FileUpdateOne) AddType(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) ClearChildren() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearDirectLinks() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearEntities() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearFileChildren() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearMetadata() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearOwner() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearParent() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearPrimaryEntity() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearProps() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearShares() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearStoragePolicies() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearStoragePolicyFiles() *FileUpdateOne
- func (fuo *FileUpdateOne) Exec(ctx context.Context) error
- func (c *FileUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fuo *FileUpdateOne) ExecX(ctx context.Context)
- func (fuo *FileUpdateOne) Mutation() *FileMutation
- func (c *FileUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fuo *FileUpdateOne) RemoveChildIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveChildren(f ...*File) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveDirectLinkIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveDirectLinks(d ...*DirectLink) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveEntities(e ...*Entity) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveEntityIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveMetadata(m ...*Metadata) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveMetadatumIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveShareIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveShares(s ...*Share) *FileUpdateOne
- func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
- func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
- func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetFileChildren(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetIsSymbolic(b bool) *FileUpdateOne
- func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableFileChildren(i *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableIsSymbolic(b *bool) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableName(s *string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableOwnerID(i *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableParentID(id *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillablePrimaryEntity(i *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableSize(i *int64) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableStoragePoliciesID(id *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableStoragePolicyFiles(i *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableType(i *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableUpdatedAt(t *time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetOwner(u *User) *FileUpdateOne
- func (fuo *FileUpdateOne) SetOwnerID(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetParent(f *File) *FileUpdateOne
- func (fuo *FileUpdateOne) SetParentID(id int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetPrimaryEntity(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetProps(tp *types.FileProps) *FileUpdateOne
- func (fuo *FileUpdateOne) SetSize(i int64) *FileUpdateOne
- func (fuo *FileUpdateOne) SetStoragePolicies(s *StoragePolicy) *FileUpdateOne
- func (fuo *FileUpdateOne) SetStoragePoliciesID(id int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetStoragePolicyFiles(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetType(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
- type FileUpsert
- func (u *FileUpsert) AddPrimaryEntity(v int) *FileUpsert
- func (u *FileUpsert) AddSize(v int64) *FileUpsert
- func (u *FileUpsert) AddType(v int) *FileUpsert
- func (u *FileUpsert) ClearFileChildren() *FileUpsert
- func (u *FileUpsert) ClearPrimaryEntity() *FileUpsert
- func (u *FileUpsert) ClearProps() *FileUpsert
- func (u *FileUpsert) ClearStoragePolicyFiles() *FileUpsert
- func (u *FileUpsert) SetFileChildren(v int) *FileUpsert
- func (u *FileUpsert) SetIsSymbolic(v bool) *FileUpsert
- func (u *FileUpsert) SetName(v string) *FileUpsert
- func (u *FileUpsert) SetOwnerID(v int) *FileUpsert
- func (u *FileUpsert) SetPrimaryEntity(v int) *FileUpsert
- func (u *FileUpsert) SetProps(v *types.FileProps) *FileUpsert
- func (u *FileUpsert) SetSize(v int64) *FileUpsert
- func (u *FileUpsert) SetStoragePolicyFiles(v int) *FileUpsert
- func (u *FileUpsert) SetType(v int) *FileUpsert
- func (u *FileUpsert) SetUpdatedAt(v time.Time) *FileUpsert
- func (u *FileUpsert) UpdateFileChildren() *FileUpsert
- func (u *FileUpsert) UpdateIsSymbolic() *FileUpsert
- func (u *FileUpsert) UpdateName() *FileUpsert
- func (u *FileUpsert) UpdateOwnerID() *FileUpsert
- func (u *FileUpsert) UpdatePrimaryEntity() *FileUpsert
- func (u *FileUpsert) UpdateProps() *FileUpsert
- func (u *FileUpsert) UpdateSize() *FileUpsert
- func (u *FileUpsert) UpdateStoragePolicyFiles() *FileUpsert
- func (u *FileUpsert) UpdateType() *FileUpsert
- func (u *FileUpsert) UpdateUpdatedAt() *FileUpsert
- type FileUpsertBulk
- func (u *FileUpsertBulk) AddPrimaryEntity(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) AddSize(v int64) *FileUpsertBulk
- func (u *FileUpsertBulk) AddType(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) ClearFileChildren() *FileUpsertBulk
- func (u *FileUpsertBulk) ClearPrimaryEntity() *FileUpsertBulk
- func (u *FileUpsertBulk) ClearProps() *FileUpsertBulk
- func (u *FileUpsertBulk) ClearStoragePolicyFiles() *FileUpsertBulk
- func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk
- func (u *FileUpsertBulk) Exec(ctx context.Context) error
- func (u *FileUpsertBulk) ExecX(ctx context.Context)
- func (u *FileUpsertBulk) Ignore() *FileUpsertBulk
- func (u *FileUpsertBulk) SetFileChildren(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) SetIsSymbolic(v bool) *FileUpsertBulk
- func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) SetOwnerID(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) SetPrimaryEntity(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) SetProps(v *types.FileProps) *FileUpsertBulk
- func (u *FileUpsertBulk) SetSize(v int64) *FileUpsertBulk
- func (u *FileUpsertBulk) SetStoragePolicyFiles(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) SetType(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) SetUpdatedAt(v time.Time) *FileUpsertBulk
- func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateFileChildren() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateIsSymbolic() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateOwnerID() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdatePrimaryEntity() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateProps() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateStoragePolicyFiles() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateType() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateUpdatedAt() *FileUpsertBulk
- type FileUpsertOne
- func (u *FileUpsertOne) AddPrimaryEntity(v int) *FileUpsertOne
- func (u *FileUpsertOne) AddSize(v int64) *FileUpsertOne
- func (u *FileUpsertOne) AddType(v int) *FileUpsertOne
- func (u *FileUpsertOne) ClearFileChildren() *FileUpsertOne
- func (u *FileUpsertOne) ClearPrimaryEntity() *FileUpsertOne
- func (u *FileUpsertOne) ClearProps() *FileUpsertOne
- func (u *FileUpsertOne) ClearStoragePolicyFiles() *FileUpsertOne
- func (u *FileUpsertOne) DoNothing() *FileUpsertOne
- func (u *FileUpsertOne) Exec(ctx context.Context) error
- func (u *FileUpsertOne) ExecX(ctx context.Context)
- func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *FileUpsertOne) IDX(ctx context.Context) int
- func (u *FileUpsertOne) Ignore() *FileUpsertOne
- func (u *FileUpsertOne) SetFileChildren(v int) *FileUpsertOne
- func (u *FileUpsertOne) SetIsSymbolic(v bool) *FileUpsertOne
- func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
- func (u *FileUpsertOne) SetOwnerID(v int) *FileUpsertOne
- func (u *FileUpsertOne) SetPrimaryEntity(v int) *FileUpsertOne
- func (u *FileUpsertOne) SetProps(v *types.FileProps) *FileUpsertOne
- func (u *FileUpsertOne) SetSize(v int64) *FileUpsertOne
- func (u *FileUpsertOne) SetStoragePolicyFiles(v int) *FileUpsertOne
- func (u *FileUpsertOne) SetType(v int) *FileUpsertOne
- func (u *FileUpsertOne) SetUpdatedAt(v time.Time) *FileUpsertOne
- func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
- func (u *FileUpsertOne) UpdateFileChildren() *FileUpsertOne
- func (u *FileUpsertOne) UpdateIsSymbolic() *FileUpsertOne
- func (u *FileUpsertOne) UpdateName() *FileUpsertOne
- func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne
- func (u *FileUpsertOne) UpdateOwnerID() *FileUpsertOne
- func (u *FileUpsertOne) UpdatePrimaryEntity() *FileUpsertOne
- func (u *FileUpsertOne) UpdateProps() *FileUpsertOne
- func (u *FileUpsertOne) UpdateSize() *FileUpsertOne
- func (u *FileUpsertOne) UpdateStoragePolicyFiles() *FileUpsertOne
- func (u *FileUpsertOne) UpdateType() *FileUpsertOne
- func (u *FileUpsertOne) UpdateUpdatedAt() *FileUpsertOne
- type Files
- type FsEvent
- func (c *FsEvent) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *FsEvent) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fe *FsEvent) QueryUser() *UserQuery
- func (e *FsEvent) SetUser(v *User)
- func (fe *FsEvent) String() string
- func (fe *FsEvent) Unwrap() *FsEvent
- func (fe *FsEvent) Update() *FsEventUpdateOne
- func (fe *FsEvent) Value(name string) (ent.Value, error)
- type FsEventClient
- func (c *FsEventClient) Create() *FsEventCreate
- func (c *FsEventClient) CreateBulk(builders ...*FsEventCreate) *FsEventCreateBulk
- func (c *FsEventClient) Delete() *FsEventDelete
- func (c *FsEventClient) DeleteOne(fe *FsEvent) *FsEventDeleteOne
- func (c *FsEventClient) DeleteOneID(id int) *FsEventDeleteOne
- func (c *FsEventClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *FsEventClient) Get(ctx context.Context, id int) (*FsEvent, error)
- func (c *FsEventClient) GetX(ctx context.Context, id int) *FsEvent
- func (c *FsEventClient) Hooks() []Hook
- func (c *FsEventClient) Intercept(interceptors ...Interceptor)
- func (c *FsEventClient) Interceptors() []Interceptor
- func (c *FsEventClient) MapCreateBulk(slice any, setFunc func(*FsEventCreate, int)) *FsEventCreateBulk
- func (c *FsEventClient) Query() *FsEventQuery
- func (c *FsEventClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *FsEventClient) QueryUser(fe *FsEvent) *UserQuery
- func (c *FsEventClient) Update() *FsEventUpdate
- func (c *FsEventClient) UpdateOne(fe *FsEvent) *FsEventUpdateOne
- func (c *FsEventClient) UpdateOneID(id int) *FsEventUpdateOne
- func (c *FsEventClient) Use(hooks ...Hook)
- type FsEventCreate
- func (fec *FsEventCreate) Exec(ctx context.Context) error
- func (c *FsEventCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fec *FsEventCreate) ExecX(ctx context.Context)
- func (fec *FsEventCreate) Mutation() *FsEventMutation
- func (fec *FsEventCreate) OnConflict(opts ...sql.ConflictOption) *FsEventUpsertOne
- func (fec *FsEventCreate) OnConflictColumns(columns ...string) *FsEventUpsertOne
- func (c *FsEventCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fec *FsEventCreate) Save(ctx context.Context) (*FsEvent, error)
- func (fec *FsEventCreate) SaveX(ctx context.Context) *FsEvent
- func (fec *FsEventCreate) SetCreatedAt(t time.Time) *FsEventCreate
- func (fec *FsEventCreate) SetDeletedAt(t time.Time) *FsEventCreate
- func (fec *FsEventCreate) SetEvent(s string) *FsEventCreate
- func (fec *FsEventCreate) SetNillableCreatedAt(t *time.Time) *FsEventCreate
- func (fec *FsEventCreate) SetNillableDeletedAt(t *time.Time) *FsEventCreate
- func (fec *FsEventCreate) SetNillableUpdatedAt(t *time.Time) *FsEventCreate
- func (fec *FsEventCreate) SetNillableUserFsevent(i *int) *FsEventCreate
- func (fec *FsEventCreate) SetNillableUserID(id *int) *FsEventCreate
- func (m *FsEventCreate) SetRawID(t int) *FsEventCreate
- func (fec *FsEventCreate) SetSubscriber(u uuid.UUID) *FsEventCreate
- func (fec *FsEventCreate) SetUpdatedAt(t time.Time) *FsEventCreate
- func (fec *FsEventCreate) SetUser(u *User) *FsEventCreate
- func (fec *FsEventCreate) SetUserFsevent(i int) *FsEventCreate
- func (fec *FsEventCreate) SetUserID(id int) *FsEventCreate
- type FsEventCreateBulk
- func (fecb *FsEventCreateBulk) Exec(ctx context.Context) error
- func (c *FsEventCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fecb *FsEventCreateBulk) ExecX(ctx context.Context)
- func (fecb *FsEventCreateBulk) OnConflict(opts ...sql.ConflictOption) *FsEventUpsertBulk
- func (fecb *FsEventCreateBulk) OnConflictColumns(columns ...string) *FsEventUpsertBulk
- func (c *FsEventCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fecb *FsEventCreateBulk) Save(ctx context.Context) ([]*FsEvent, error)
- func (fecb *FsEventCreateBulk) SaveX(ctx context.Context) []*FsEvent
- type FsEventDelete
- func (fed *FsEventDelete) Exec(ctx context.Context) (int, error)
- func (c *FsEventDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fed *FsEventDelete) ExecX(ctx context.Context) int
- func (c *FsEventDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fed *FsEventDelete) Where(ps ...predicate.FsEvent) *FsEventDelete
- type FsEventDeleteOne
- type FsEventEdges
- type FsEventGroupBy
- func (fegb *FsEventGroupBy) Aggregate(fns ...AggregateFunc) *FsEventGroupBy
- func (s *FsEventGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FsEventGroupBy) BoolX(ctx context.Context) bool
- func (s *FsEventGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FsEventGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FsEventGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FsEventGroupBy) Float64X(ctx context.Context) float64
- func (s *FsEventGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FsEventGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FsEventGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FsEventGroupBy) IntX(ctx context.Context) int
- func (s *FsEventGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FsEventGroupBy) IntsX(ctx context.Context) []int
- func (fegb *FsEventGroupBy) Scan(ctx context.Context, v any) error
- func (s *FsEventGroupBy) ScanX(ctx context.Context, v any)
- func (s *FsEventGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FsEventGroupBy) StringX(ctx context.Context) string
- func (s *FsEventGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FsEventGroupBy) StringsX(ctx context.Context) []string
- type FsEventMutation
- func (m *FsEventMutation) AddField(name string, value ent.Value) error
- func (m *FsEventMutation) AddedEdges() []string
- func (m *FsEventMutation) AddedField(name string) (ent.Value, bool)
- func (m *FsEventMutation) AddedFields() []string
- func (m *FsEventMutation) AddedIDs(name string) []ent.Value
- func (m *FsEventMutation) ClearDeletedAt()
- func (m *FsEventMutation) ClearEdge(name string) error
- func (m *FsEventMutation) ClearField(name string) error
- func (m *FsEventMutation) ClearUser()
- func (m *FsEventMutation) ClearUserFsevent()
- func (m *FsEventMutation) ClearedEdges() []string
- func (m *FsEventMutation) ClearedFields() []string
- func (m FsEventMutation) Client() *Client
- func (m *FsEventMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FsEventMutation) DeletedAt() (r time.Time, exists bool)
- func (m *FsEventMutation) DeletedAtCleared() bool
- func (m *FsEventMutation) EdgeCleared(name string) bool
- func (m *FsEventMutation) Event() (r string, exists bool)
- func (c *FsEventMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *FsEventMutation) Field(name string) (ent.Value, bool)
- func (m *FsEventMutation) FieldCleared(name string) bool
- func (m *FsEventMutation) Fields() []string
- func (m *FsEventMutation) ID() (id int, exists bool)
- func (m *FsEventMutation) IDs(ctx context.Context) ([]int, error)
- func (m *FsEventMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FsEventMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *FsEventMutation) OldEvent(ctx context.Context) (v string, err error)
- func (m *FsEventMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FsEventMutation) OldSubscriber(ctx context.Context) (v uuid.UUID, err error)
- func (m *FsEventMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FsEventMutation) OldUserFsevent(ctx context.Context) (v int, err error)
- func (m *FsEventMutation) Op() Op
- func (c *FsEventMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *FsEventMutation) RemovedEdges() []string
- func (m *FsEventMutation) RemovedIDs(name string) []ent.Value
- func (m *FsEventMutation) ResetCreatedAt()
- func (m *FsEventMutation) ResetDeletedAt()
- func (m *FsEventMutation) ResetEdge(name string) error
- func (m *FsEventMutation) ResetEvent()
- func (m *FsEventMutation) ResetField(name string) error
- func (m *FsEventMutation) ResetSubscriber()
- func (m *FsEventMutation) ResetUpdatedAt()
- func (m *FsEventMutation) ResetUser()
- func (m *FsEventMutation) ResetUserFsevent()
- func (m *FsEventMutation) SetCreatedAt(t time.Time)
- func (m *FsEventMutation) SetDeletedAt(t time.Time)
- func (m *FsEventMutation) SetEvent(s string)
- func (m *FsEventMutation) SetField(name string, value ent.Value) error
- func (m *FsEventMutation) SetOp(op Op)
- func (m *FsEventMutation) SetRawID(t int)
- func (m *FsEventMutation) SetSubscriber(u uuid.UUID)
- func (m *FsEventMutation) SetUpdatedAt(t time.Time)
- func (m *FsEventMutation) SetUserFsevent(i int)
- func (m *FsEventMutation) SetUserID(id int)
- func (m *FsEventMutation) Subscriber() (r uuid.UUID, exists bool)
- func (m FsEventMutation) Tx() (*Tx, error)
- func (m *FsEventMutation) Type() string
- func (m *FsEventMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FsEventMutation) UserCleared() bool
- func (m *FsEventMutation) UserFsevent() (r int, exists bool)
- func (m *FsEventMutation) UserFseventCleared() bool
- func (m *FsEventMutation) UserID() (id int, exists bool)
- func (m *FsEventMutation) UserIDs() (ids []int)
- func (m *FsEventMutation) Where(ps ...predicate.FsEvent)
- func (m *FsEventMutation) WhereP(ps ...func(*sql.Selector))
- type FsEventQuery
- func (feq *FsEventQuery) Aggregate(fns ...AggregateFunc) *FsEventSelect
- func (feq *FsEventQuery) All(ctx context.Context) ([]*FsEvent, error)
- func (feq *FsEventQuery) AllX(ctx context.Context) []*FsEvent
- func (feq *FsEventQuery) Clone() *FsEventQuery
- func (feq *FsEventQuery) Count(ctx context.Context) (int, error)
- func (feq *FsEventQuery) CountX(ctx context.Context) int
- func (c *FsEventQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (feq *FsEventQuery) Exist(ctx context.Context) (bool, error)
- func (feq *FsEventQuery) ExistX(ctx context.Context) bool
- func (feq *FsEventQuery) First(ctx context.Context) (*FsEvent, error)
- func (feq *FsEventQuery) FirstID(ctx context.Context) (id int, err error)
- func (feq *FsEventQuery) FirstIDX(ctx context.Context) int
- func (feq *FsEventQuery) FirstX(ctx context.Context) *FsEvent
- func (feq *FsEventQuery) GroupBy(field string, fields ...string) *FsEventGroupBy
- func (feq *FsEventQuery) IDs(ctx context.Context) (ids []int, err error)
- func (feq *FsEventQuery) IDsX(ctx context.Context) []int
- func (feq *FsEventQuery) Limit(limit int) *FsEventQuery
- func (feq *FsEventQuery) Offset(offset int) *FsEventQuery
- func (feq *FsEventQuery) Only(ctx context.Context) (*FsEvent, error)
- func (feq *FsEventQuery) OnlyID(ctx context.Context) (id int, err error)
- func (feq *FsEventQuery) OnlyIDX(ctx context.Context) int
- func (feq *FsEventQuery) OnlyX(ctx context.Context) *FsEvent
- func (feq *FsEventQuery) Order(o ...fsevent.OrderOption) *FsEventQuery
- func (c *FsEventQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (feq *FsEventQuery) QueryUser() *UserQuery
- func (feq *FsEventQuery) Select(fields ...string) *FsEventSelect
- func (feq *FsEventQuery) Unique(unique bool) *FsEventQuery
- func (feq *FsEventQuery) Where(ps ...predicate.FsEvent) *FsEventQuery
- func (feq *FsEventQuery) WithUser(opts ...func(*UserQuery)) *FsEventQuery
- type FsEventSelect
- func (fes *FsEventSelect) Aggregate(fns ...AggregateFunc) *FsEventSelect
- func (s *FsEventSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FsEventSelect) BoolX(ctx context.Context) bool
- func (s *FsEventSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FsEventSelect) BoolsX(ctx context.Context) []bool
- func (c FsEventSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *FsEventSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FsEventSelect) Float64X(ctx context.Context) float64
- func (s *FsEventSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FsEventSelect) Float64sX(ctx context.Context) []float64
- func (s *FsEventSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FsEventSelect) IntX(ctx context.Context) int
- func (s *FsEventSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FsEventSelect) IntsX(ctx context.Context) []int
- func (c FsEventSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fes *FsEventSelect) Scan(ctx context.Context, v any) error
- func (s *FsEventSelect) ScanX(ctx context.Context, v any)
- func (s *FsEventSelect) String(ctx context.Context) (_ string, err error)
- func (s *FsEventSelect) StringX(ctx context.Context) string
- func (s *FsEventSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FsEventSelect) StringsX(ctx context.Context) []string
- type FsEventUpdate
- func (feu *FsEventUpdate) ClearDeletedAt() *FsEventUpdate
- func (feu *FsEventUpdate) ClearUser() *FsEventUpdate
- func (feu *FsEventUpdate) ClearUserFsevent() *FsEventUpdate
- func (feu *FsEventUpdate) Exec(ctx context.Context) error
- func (c *FsEventUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (feu *FsEventUpdate) ExecX(ctx context.Context)
- func (feu *FsEventUpdate) Mutation() *FsEventMutation
- func (c *FsEventUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (feu *FsEventUpdate) Save(ctx context.Context) (int, error)
- func (feu *FsEventUpdate) SaveX(ctx context.Context) int
- func (feu *FsEventUpdate) SetDeletedAt(t time.Time) *FsEventUpdate
- func (feu *FsEventUpdate) SetEvent(s string) *FsEventUpdate
- func (feu *FsEventUpdate) SetNillableDeletedAt(t *time.Time) *FsEventUpdate
- func (feu *FsEventUpdate) SetNillableEvent(s *string) *FsEventUpdate
- func (feu *FsEventUpdate) SetNillableSubscriber(u *uuid.UUID) *FsEventUpdate
- func (feu *FsEventUpdate) SetNillableUserFsevent(i *int) *FsEventUpdate
- func (feu *FsEventUpdate) SetNillableUserID(id *int) *FsEventUpdate
- func (feu *FsEventUpdate) SetSubscriber(u uuid.UUID) *FsEventUpdate
- func (feu *FsEventUpdate) SetUpdatedAt(t time.Time) *FsEventUpdate
- func (feu *FsEventUpdate) SetUser(u *User) *FsEventUpdate
- func (feu *FsEventUpdate) SetUserFsevent(i int) *FsEventUpdate
- func (feu *FsEventUpdate) SetUserID(id int) *FsEventUpdate
- func (feu *FsEventUpdate) Where(ps ...predicate.FsEvent) *FsEventUpdate
- type FsEventUpdateOne
- func (feuo *FsEventUpdateOne) ClearDeletedAt() *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) ClearUser() *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) ClearUserFsevent() *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) Exec(ctx context.Context) error
- func (c *FsEventUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (feuo *FsEventUpdateOne) ExecX(ctx context.Context)
- func (feuo *FsEventUpdateOne) Mutation() *FsEventMutation
- func (c *FsEventUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (feuo *FsEventUpdateOne) Save(ctx context.Context) (*FsEvent, error)
- func (feuo *FsEventUpdateOne) SaveX(ctx context.Context) *FsEvent
- func (feuo *FsEventUpdateOne) Select(field string, fields ...string) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetDeletedAt(t time.Time) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetEvent(s string) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetNillableDeletedAt(t *time.Time) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetNillableEvent(s *string) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetNillableSubscriber(u *uuid.UUID) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetNillableUserFsevent(i *int) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetNillableUserID(id *int) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetSubscriber(u uuid.UUID) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetUpdatedAt(t time.Time) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetUser(u *User) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetUserFsevent(i int) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) SetUserID(id int) *FsEventUpdateOne
- func (feuo *FsEventUpdateOne) Where(ps ...predicate.FsEvent) *FsEventUpdateOne
- type FsEventUpsert
- func (u *FsEventUpsert) ClearDeletedAt() *FsEventUpsert
- func (u *FsEventUpsert) ClearUserFsevent() *FsEventUpsert
- func (u *FsEventUpsert) SetDeletedAt(v time.Time) *FsEventUpsert
- func (u *FsEventUpsert) SetEvent(v string) *FsEventUpsert
- func (u *FsEventUpsert) SetSubscriber(v uuid.UUID) *FsEventUpsert
- func (u *FsEventUpsert) SetUpdatedAt(v time.Time) *FsEventUpsert
- func (u *FsEventUpsert) SetUserFsevent(v int) *FsEventUpsert
- func (u *FsEventUpsert) UpdateDeletedAt() *FsEventUpsert
- func (u *FsEventUpsert) UpdateEvent() *FsEventUpsert
- func (u *FsEventUpsert) UpdateSubscriber() *FsEventUpsert
- func (u *FsEventUpsert) UpdateUpdatedAt() *FsEventUpsert
- func (u *FsEventUpsert) UpdateUserFsevent() *FsEventUpsert
- type FsEventUpsertBulk
- func (u *FsEventUpsertBulk) ClearDeletedAt() *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) ClearUserFsevent() *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) DoNothing() *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) Exec(ctx context.Context) error
- func (u *FsEventUpsertBulk) ExecX(ctx context.Context)
- func (u *FsEventUpsertBulk) Ignore() *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) SetDeletedAt(v time.Time) *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) SetEvent(v string) *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) SetSubscriber(v uuid.UUID) *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) SetUpdatedAt(v time.Time) *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) SetUserFsevent(v int) *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) Update(set func(*FsEventUpsert)) *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) UpdateDeletedAt() *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) UpdateEvent() *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) UpdateNewValues() *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) UpdateSubscriber() *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) UpdateUpdatedAt() *FsEventUpsertBulk
- func (u *FsEventUpsertBulk) UpdateUserFsevent() *FsEventUpsertBulk
- type FsEventUpsertOne
- func (u *FsEventUpsertOne) ClearDeletedAt() *FsEventUpsertOne
- func (u *FsEventUpsertOne) ClearUserFsevent() *FsEventUpsertOne
- func (u *FsEventUpsertOne) DoNothing() *FsEventUpsertOne
- func (u *FsEventUpsertOne) Exec(ctx context.Context) error
- func (u *FsEventUpsertOne) ExecX(ctx context.Context)
- func (u *FsEventUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *FsEventUpsertOne) IDX(ctx context.Context) int
- func (u *FsEventUpsertOne) Ignore() *FsEventUpsertOne
- func (u *FsEventUpsertOne) SetDeletedAt(v time.Time) *FsEventUpsertOne
- func (u *FsEventUpsertOne) SetEvent(v string) *FsEventUpsertOne
- func (u *FsEventUpsertOne) SetSubscriber(v uuid.UUID) *FsEventUpsertOne
- func (u *FsEventUpsertOne) SetUpdatedAt(v time.Time) *FsEventUpsertOne
- func (u *FsEventUpsertOne) SetUserFsevent(v int) *FsEventUpsertOne
- func (u *FsEventUpsertOne) Update(set func(*FsEventUpsert)) *FsEventUpsertOne
- func (u *FsEventUpsertOne) UpdateDeletedAt() *FsEventUpsertOne
- func (u *FsEventUpsertOne) UpdateEvent() *FsEventUpsertOne
- func (u *FsEventUpsertOne) UpdateNewValues() *FsEventUpsertOne
- func (u *FsEventUpsertOne) UpdateSubscriber() *FsEventUpsertOne
- func (u *FsEventUpsertOne) UpdateUpdatedAt() *FsEventUpsertOne
- func (u *FsEventUpsertOne) UpdateUserFsevent() *FsEventUpsertOne
- type FsEvents
- type Group
- func (c *Group) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Group) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gr *Group) QueryStoragePolicies() *StoragePolicyQuery
- func (gr *Group) QueryUsers() *UserQuery
- func (e *Group) SetStoragePolicies(v *StoragePolicy)
- func (e *Group) SetUsers(v []*User)
- func (gr *Group) String() string
- func (gr *Group) Unwrap() *Group
- func (gr *Group) Update() *GroupUpdateOne
- func (gr *Group) Value(name string) (ent.Value, error)
- type GroupClient
- func (c *GroupClient) Create() *GroupCreate
- func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
- func (c *GroupClient) Delete() *GroupDelete
- func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
- func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
- func (c *GroupClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error)
- func (c *GroupClient) GetX(ctx context.Context, id int) *Group
- func (c *GroupClient) Hooks() []Hook
- func (c *GroupClient) Intercept(interceptors ...Interceptor)
- func (c *GroupClient) Interceptors() []Interceptor
- func (c *GroupClient) MapCreateBulk(slice any, setFunc func(*GroupCreate, int)) *GroupCreateBulk
- func (c *GroupClient) Query() *GroupQuery
- func (c *GroupClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *GroupClient) QueryStoragePolicies(gr *Group) *StoragePolicyQuery
- func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
- func (c *GroupClient) Update() *GroupUpdate
- func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
- func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
- func (c *GroupClient) Use(hooks ...Hook)
- type GroupCreate
- func (gc *GroupCreate) AddUserIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
- func (gc *GroupCreate) Exec(ctx context.Context) error
- func (c *GroupCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gc *GroupCreate) ExecX(ctx context.Context)
- func (gc *GroupCreate) Mutation() *GroupMutation
- func (gc *GroupCreate) OnConflict(opts ...sql.ConflictOption) *GroupUpsertOne
- func (gc *GroupCreate) OnConflictColumns(columns ...string) *GroupUpsertOne
- func (c *GroupCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
- func (gc *GroupCreate) SaveX(ctx context.Context) *Group
- func (gc *GroupCreate) SetCreatedAt(t time.Time) *GroupCreate
- func (gc *GroupCreate) SetDeletedAt(t time.Time) *GroupCreate
- func (gc *GroupCreate) SetMaxStorage(i int64) *GroupCreate
- func (gc *GroupCreate) SetName(s string) *GroupCreate
- func (gc *GroupCreate) SetNillableCreatedAt(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetNillableDeletedAt(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetNillableMaxStorage(i *int64) *GroupCreate
- func (gc *GroupCreate) SetNillableSpeedLimit(i *int) *GroupCreate
- func (gc *GroupCreate) SetNillableStoragePoliciesID(id *int) *GroupCreate
- func (gc *GroupCreate) SetNillableStoragePolicyID(i *int) *GroupCreate
- func (gc *GroupCreate) SetNillableUpdatedAt(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetPermissions(bs *boolset.BooleanSet) *GroupCreate
- func (m *GroupCreate) SetRawID(t int) *GroupCreate
- func (gc *GroupCreate) SetSettings(ts *types.GroupSetting) *GroupCreate
- func (gc *GroupCreate) SetSpeedLimit(i int) *GroupCreate
- func (gc *GroupCreate) SetStoragePolicies(s *StoragePolicy) *GroupCreate
- func (gc *GroupCreate) SetStoragePoliciesID(id int) *GroupCreate
- func (gc *GroupCreate) SetStoragePolicyID(i int) *GroupCreate
- func (gc *GroupCreate) SetUpdatedAt(t time.Time) *GroupCreate
- type GroupCreateBulk
- func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
- func (c *GroupCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gcb *GroupCreateBulk) ExecX(ctx context.Context)
- func (gcb *GroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupUpsertBulk
- func (gcb *GroupCreateBulk) OnConflictColumns(columns ...string) *GroupUpsertBulk
- func (c *GroupCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gcb *GroupCreateBulk) Save(ctx context.Context) ([]*Group, error)
- func (gcb *GroupCreateBulk) SaveX(ctx context.Context) []*Group
- type GroupDelete
- func (gd *GroupDelete) Exec(ctx context.Context) (int, error)
- func (c *GroupDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gd *GroupDelete) ExecX(ctx context.Context) int
- func (c *GroupDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete
- type GroupDeleteOne
- type GroupEdges
- type GroupGroupBy
- func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
- func (s *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupGroupBy) IntX(ctx context.Context) int
- func (s *GroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupGroupBy) StringX(ctx context.Context) string
- func (s *GroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupGroupBy) StringsX(ctx context.Context) []string
- type GroupMutation
- func (m *GroupMutation) AddField(name string, value ent.Value) error
- func (m *GroupMutation) AddMaxStorage(i int64)
- func (m *GroupMutation) AddSpeedLimit(i int)
- func (m *GroupMutation) AddUserIDs(ids ...int)
- func (m *GroupMutation) AddedEdges() []string
- func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupMutation) AddedFields() []string
- func (m *GroupMutation) AddedIDs(name string) []ent.Value
- func (m *GroupMutation) AddedMaxStorage() (r int64, exists bool)
- func (m *GroupMutation) AddedSpeedLimit() (r int, exists bool)
- func (m *GroupMutation) ClearDeletedAt()
- func (m *GroupMutation) ClearEdge(name string) error
- func (m *GroupMutation) ClearField(name string) error
- func (m *GroupMutation) ClearMaxStorage()
- func (m *GroupMutation) ClearSettings()
- func (m *GroupMutation) ClearSpeedLimit()
- func (m *GroupMutation) ClearStoragePolicies()
- func (m *GroupMutation) ClearStoragePolicyID()
- func (m *GroupMutation) ClearUsers()
- func (m *GroupMutation) ClearedEdges() []string
- func (m *GroupMutation) ClearedFields() []string
- func (m GroupMutation) Client() *Client
- func (m *GroupMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GroupMutation) DeletedAt() (r time.Time, exists bool)
- func (m *GroupMutation) DeletedAtCleared() bool
- func (m *GroupMutation) EdgeCleared(name string) bool
- func (c *GroupMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *GroupMutation) Field(name string) (ent.Value, bool)
- func (m *GroupMutation) FieldCleared(name string) bool
- func (m *GroupMutation) Fields() []string
- func (m *GroupMutation) ID() (id int, exists bool)
- func (m *GroupMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GroupMutation) MaxStorage() (r int64, exists bool)
- func (m *GroupMutation) MaxStorageCleared() bool
- func (m *GroupMutation) Name() (r string, exists bool)
- func (m *GroupMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupMutation) OldMaxStorage(ctx context.Context) (v int64, err error)
- func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroupMutation) OldPermissions(ctx context.Context) (v *boolset.BooleanSet, err error)
- func (m *GroupMutation) OldSettings(ctx context.Context) (v *types.GroupSetting, err error)
- func (m *GroupMutation) OldSpeedLimit(ctx context.Context) (v int, err error)
- func (m *GroupMutation) OldStoragePolicyID(ctx context.Context) (v int, err error)
- func (m *GroupMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupMutation) Op() Op
- func (m *GroupMutation) Permissions() (r *boolset.BooleanSet, exists bool)
- func (c *GroupMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *GroupMutation) RemoveUserIDs(ids ...int)
- func (m *GroupMutation) RemovedEdges() []string
- func (m *GroupMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupMutation) RemovedUsersIDs() (ids []int)
- func (m *GroupMutation) ResetCreatedAt()
- func (m *GroupMutation) ResetDeletedAt()
- func (m *GroupMutation) ResetEdge(name string) error
- func (m *GroupMutation) ResetField(name string) error
- func (m *GroupMutation) ResetMaxStorage()
- func (m *GroupMutation) ResetName()
- func (m *GroupMutation) ResetPermissions()
- func (m *GroupMutation) ResetSettings()
- func (m *GroupMutation) ResetSpeedLimit()
- func (m *GroupMutation) ResetStoragePolicies()
- func (m *GroupMutation) ResetStoragePolicyID()
- func (m *GroupMutation) ResetUpdatedAt()
- func (m *GroupMutation) ResetUsers()
- func (m *GroupMutation) SetCreatedAt(t time.Time)
- func (m *GroupMutation) SetDeletedAt(t time.Time)
- func (m *GroupMutation) SetField(name string, value ent.Value) error
- func (m *GroupMutation) SetMaxStorage(i int64)
- func (m *GroupMutation) SetName(s string)
- func (m *GroupMutation) SetOp(op Op)
- func (m *GroupMutation) SetPermissions(bs *boolset.BooleanSet)
- func (m *GroupMutation) SetRawID(t int)
- func (m *GroupMutation) SetSettings(ts *types.GroupSetting)
- func (m *GroupMutation) SetSpeedLimit(i int)
- func (m *GroupMutation) SetStoragePoliciesID(id int)
- func (m *GroupMutation) SetStoragePolicyID(i int)
- func (m *GroupMutation) SetUpdatedAt(t time.Time)
- func (m *GroupMutation) Settings() (r *types.GroupSetting, exists bool)
- func (m *GroupMutation) SettingsCleared() bool
- func (m *GroupMutation) SpeedLimit() (r int, exists bool)
- func (m *GroupMutation) SpeedLimitCleared() bool
- func (m *GroupMutation) StoragePoliciesCleared() bool
- func (m *GroupMutation) StoragePoliciesID() (id int, exists bool)
- func (m *GroupMutation) StoragePoliciesIDs() (ids []int)
- func (m *GroupMutation) StoragePolicyID() (r int, exists bool)
- func (m *GroupMutation) StoragePolicyIDCleared() bool
- func (m GroupMutation) Tx() (*Tx, error)
- func (m *GroupMutation) Type() string
- func (m *GroupMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *GroupMutation) UsersCleared() bool
- func (m *GroupMutation) UsersIDs() (ids []int)
- func (m *GroupMutation) Where(ps ...predicate.Group)
- func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
- type GroupQuery
- func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
- func (gq *GroupQuery) AllX(ctx context.Context) []*Group
- func (gq *GroupQuery) Clone() *GroupQuery
- func (gq *GroupQuery) Count(ctx context.Context) (int, error)
- func (gq *GroupQuery) CountX(ctx context.Context) int
- func (c *GroupQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GroupQuery) ExistX(ctx context.Context) bool
- func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) FirstIDX(ctx context.Context) int
- func (gq *GroupQuery) FirstX(ctx context.Context) *Group
- func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
- func (gq *GroupQuery) IDs(ctx context.Context) (ids []int, err error)
- func (gq *GroupQuery) IDsX(ctx context.Context) []int
- func (gq *GroupQuery) Limit(limit int) *GroupQuery
- func (gq *GroupQuery) Offset(offset int) *GroupQuery
- func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
- func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
- func (gq *GroupQuery) Order(o ...group.OrderOption) *GroupQuery
- func (c *GroupQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gq *GroupQuery) QueryStoragePolicies() *StoragePolicyQuery
- func (gq *GroupQuery) QueryUsers() *UserQuery
- func (gq *GroupQuery) Select(fields ...string) *GroupSelect
- func (gq *GroupQuery) Unique(unique bool) *GroupQuery
- func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
- func (gq *GroupQuery) WithStoragePolicies(opts ...func(*StoragePolicyQuery)) *GroupQuery
- func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
- type GroupSelect
- func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (s *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupSelect) BoolX(ctx context.Context) bool
- func (s *GroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupSelect) BoolsX(ctx context.Context) []bool
- func (c GroupSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupSelect) Float64X(ctx context.Context) float64
- func (s *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupSelect) IntX(ctx context.Context) int
- func (s *GroupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupSelect) IntsX(ctx context.Context) []int
- func (c GroupSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gs *GroupSelect) Scan(ctx context.Context, v any) error
- func (s *GroupSelect) ScanX(ctx context.Context, v any)
- func (s *GroupSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupSelect) StringX(ctx context.Context) string
- func (s *GroupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupSelect) StringsX(ctx context.Context) []string
- type GroupUpdate
- func (gu *GroupUpdate) AddMaxStorage(i int64) *GroupUpdate
- func (gu *GroupUpdate) AddSpeedLimit(i int) *GroupUpdate
- func (gu *GroupUpdate) AddUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) ClearDeletedAt() *GroupUpdate
- func (gu *GroupUpdate) ClearMaxStorage() *GroupUpdate
- func (gu *GroupUpdate) ClearSettings() *GroupUpdate
- func (gu *GroupUpdate) ClearSpeedLimit() *GroupUpdate
- func (gu *GroupUpdate) ClearStoragePolicies() *GroupUpdate
- func (gu *GroupUpdate) ClearStoragePolicyID() *GroupUpdate
- func (gu *GroupUpdate) ClearUsers() *GroupUpdate
- func (gu *GroupUpdate) Exec(ctx context.Context) error
- func (c *GroupUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gu *GroupUpdate) ExecX(ctx context.Context)
- func (gu *GroupUpdate) Mutation() *GroupMutation
- func (c *GroupUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
- func (gu *GroupUpdate) SaveX(ctx context.Context) int
- func (gu *GroupUpdate) SetDeletedAt(t time.Time) *GroupUpdate
- func (gu *GroupUpdate) SetMaxStorage(i int64) *GroupUpdate
- func (gu *GroupUpdate) SetName(s string) *GroupUpdate
- func (gu *GroupUpdate) SetNillableDeletedAt(t *time.Time) *GroupUpdate
- func (gu *GroupUpdate) SetNillableMaxStorage(i *int64) *GroupUpdate
- func (gu *GroupUpdate) SetNillableName(s *string) *GroupUpdate
- func (gu *GroupUpdate) SetNillableSpeedLimit(i *int) *GroupUpdate
- func (gu *GroupUpdate) SetNillableStoragePoliciesID(id *int) *GroupUpdate
- func (gu *GroupUpdate) SetNillableStoragePolicyID(i *int) *GroupUpdate
- func (gu *GroupUpdate) SetPermissions(bs *boolset.BooleanSet) *GroupUpdate
- func (gu *GroupUpdate) SetSettings(ts *types.GroupSetting) *GroupUpdate
- func (gu *GroupUpdate) SetSpeedLimit(i int) *GroupUpdate
- func (gu *GroupUpdate) SetStoragePolicies(s *StoragePolicy) *GroupUpdate
- func (gu *GroupUpdate) SetStoragePoliciesID(id int) *GroupUpdate
- func (gu *GroupUpdate) SetStoragePolicyID(i int) *GroupUpdate
- func (gu *GroupUpdate) SetUpdatedAt(t time.Time) *GroupUpdate
- func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
- type GroupUpdateOne
- func (guo *GroupUpdateOne) AddMaxStorage(i int64) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddSpeedLimit(i int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearDeletedAt() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearMaxStorage() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearSettings() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearSpeedLimit() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearStoragePolicies() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearStoragePolicyID() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
- func (guo *GroupUpdateOne) Exec(ctx context.Context) error
- func (c *GroupUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (guo *GroupUpdateOne) ExecX(ctx context.Context)
- func (guo *GroupUpdateOne) Mutation() *GroupMutation
- func (c *GroupUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
- func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
- func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetDeletedAt(t time.Time) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetMaxStorage(i int64) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableDeletedAt(t *time.Time) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableMaxStorage(i *int64) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableName(s *string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableSpeedLimit(i *int) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableStoragePoliciesID(id *int) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableStoragePolicyID(i *int) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetPermissions(bs *boolset.BooleanSet) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetSettings(ts *types.GroupSetting) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetSpeedLimit(i int) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetStoragePolicies(s *StoragePolicy) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetStoragePoliciesID(id int) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetStoragePolicyID(i int) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetUpdatedAt(t time.Time) *GroupUpdateOne
- func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
- type GroupUpsert
- func (u *GroupUpsert) AddMaxStorage(v int64) *GroupUpsert
- func (u *GroupUpsert) AddSpeedLimit(v int) *GroupUpsert
- func (u *GroupUpsert) ClearDeletedAt() *GroupUpsert
- func (u *GroupUpsert) ClearMaxStorage() *GroupUpsert
- func (u *GroupUpsert) ClearSettings() *GroupUpsert
- func (u *GroupUpsert) ClearSpeedLimit() *GroupUpsert
- func (u *GroupUpsert) ClearStoragePolicyID() *GroupUpsert
- func (u *GroupUpsert) SetDeletedAt(v time.Time) *GroupUpsert
- func (u *GroupUpsert) SetMaxStorage(v int64) *GroupUpsert
- func (u *GroupUpsert) SetName(v string) *GroupUpsert
- func (u *GroupUpsert) SetPermissions(v *boolset.BooleanSet) *GroupUpsert
- func (u *GroupUpsert) SetSettings(v *types.GroupSetting) *GroupUpsert
- func (u *GroupUpsert) SetSpeedLimit(v int) *GroupUpsert
- func (u *GroupUpsert) SetStoragePolicyID(v int) *GroupUpsert
- func (u *GroupUpsert) SetUpdatedAt(v time.Time) *GroupUpsert
- func (u *GroupUpsert) UpdateDeletedAt() *GroupUpsert
- func (u *GroupUpsert) UpdateMaxStorage() *GroupUpsert
- func (u *GroupUpsert) UpdateName() *GroupUpsert
- func (u *GroupUpsert) UpdatePermissions() *GroupUpsert
- func (u *GroupUpsert) UpdateSettings() *GroupUpsert
- func (u *GroupUpsert) UpdateSpeedLimit() *GroupUpsert
- func (u *GroupUpsert) UpdateStoragePolicyID() *GroupUpsert
- func (u *GroupUpsert) UpdateUpdatedAt() *GroupUpsert
- type GroupUpsertBulk
- func (u *GroupUpsertBulk) AddMaxStorage(v int64) *GroupUpsertBulk
- func (u *GroupUpsertBulk) AddSpeedLimit(v int) *GroupUpsertBulk
- func (u *GroupUpsertBulk) ClearDeletedAt() *GroupUpsertBulk
- func (u *GroupUpsertBulk) ClearMaxStorage() *GroupUpsertBulk
- func (u *GroupUpsertBulk) ClearSettings() *GroupUpsertBulk
- func (u *GroupUpsertBulk) ClearSpeedLimit() *GroupUpsertBulk
- func (u *GroupUpsertBulk) ClearStoragePolicyID() *GroupUpsertBulk
- func (u *GroupUpsertBulk) DoNothing() *GroupUpsertBulk
- func (u *GroupUpsertBulk) Exec(ctx context.Context) error
- func (u *GroupUpsertBulk) ExecX(ctx context.Context)
- func (u *GroupUpsertBulk) Ignore() *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetDeletedAt(v time.Time) *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetMaxStorage(v int64) *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetName(v string) *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetPermissions(v *boolset.BooleanSet) *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetSettings(v *types.GroupSetting) *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetSpeedLimit(v int) *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetStoragePolicyID(v int) *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetUpdatedAt(v time.Time) *GroupUpsertBulk
- func (u *GroupUpsertBulk) Update(set func(*GroupUpsert)) *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateDeletedAt() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateMaxStorage() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateName() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateNewValues() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdatePermissions() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateSettings() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateSpeedLimit() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateStoragePolicyID() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateUpdatedAt() *GroupUpsertBulk
- type GroupUpsertOne
- func (u *GroupUpsertOne) AddMaxStorage(v int64) *GroupUpsertOne
- func (u *GroupUpsertOne) AddSpeedLimit(v int) *GroupUpsertOne
- func (u *GroupUpsertOne) ClearDeletedAt() *GroupUpsertOne
- func (u *GroupUpsertOne) ClearMaxStorage() *GroupUpsertOne
- func (u *GroupUpsertOne) ClearSettings() *GroupUpsertOne
- func (u *GroupUpsertOne) ClearSpeedLimit() *GroupUpsertOne
- func (u *GroupUpsertOne) ClearStoragePolicyID() *GroupUpsertOne
- func (u *GroupUpsertOne) DoNothing() *GroupUpsertOne
- func (u *GroupUpsertOne) Exec(ctx context.Context) error
- func (u *GroupUpsertOne) ExecX(ctx context.Context)
- func (u *GroupUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *GroupUpsertOne) IDX(ctx context.Context) int
- func (u *GroupUpsertOne) Ignore() *GroupUpsertOne
- func (u *GroupUpsertOne) SetDeletedAt(v time.Time) *GroupUpsertOne
- func (u *GroupUpsertOne) SetMaxStorage(v int64) *GroupUpsertOne
- func (u *GroupUpsertOne) SetName(v string) *GroupUpsertOne
- func (u *GroupUpsertOne) SetPermissions(v *boolset.BooleanSet) *GroupUpsertOne
- func (u *GroupUpsertOne) SetSettings(v *types.GroupSetting) *GroupUpsertOne
- func (u *GroupUpsertOne) SetSpeedLimit(v int) *GroupUpsertOne
- func (u *GroupUpsertOne) SetStoragePolicyID(v int) *GroupUpsertOne
- func (u *GroupUpsertOne) SetUpdatedAt(v time.Time) *GroupUpsertOne
- func (u *GroupUpsertOne) Update(set func(*GroupUpsert)) *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateDeletedAt() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateMaxStorage() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateName() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateNewValues() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdatePermissions() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateSettings() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateSpeedLimit() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateStoragePolicyID() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateUpdatedAt() *GroupUpsertOne
- type Groups
- type Hook
- type InterceptFunc
- type Interceptor
- type Metadata
- func (c *Metadata) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *Metadata) GetValue(name string) (ent.Value, error)
- func (c *Metadata) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *Metadata) QueryFile() *FileQuery
- func (e *Metadata) SetFile(v *File)
- func (m *Metadata) String() string
- func (m *Metadata) Unwrap() *Metadata
- func (m *Metadata) Update() *MetadataUpdateOne
- type MetadataClient
- func (c *MetadataClient) Create() *MetadataCreate
- func (c *MetadataClient) CreateBulk(builders ...*MetadataCreate) *MetadataCreateBulk
- func (c *MetadataClient) Delete() *MetadataDelete
- func (c *MetadataClient) DeleteOne(m *Metadata) *MetadataDeleteOne
- func (c *MetadataClient) DeleteOneID(id int) *MetadataDeleteOne
- func (c *MetadataClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *MetadataClient) Get(ctx context.Context, id int) (*Metadata, error)
- func (c *MetadataClient) GetX(ctx context.Context, id int) *Metadata
- func (c *MetadataClient) Hooks() []Hook
- func (c *MetadataClient) Intercept(interceptors ...Interceptor)
- func (c *MetadataClient) Interceptors() []Interceptor
- func (c *MetadataClient) MapCreateBulk(slice any, setFunc func(*MetadataCreate, int)) *MetadataCreateBulk
- func (c *MetadataClient) Query() *MetadataQuery
- func (c *MetadataClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *MetadataClient) QueryFile(m *Metadata) *FileQuery
- func (c *MetadataClient) Update() *MetadataUpdate
- func (c *MetadataClient) UpdateOne(m *Metadata) *MetadataUpdateOne
- func (c *MetadataClient) UpdateOneID(id int) *MetadataUpdateOne
- func (c *MetadataClient) Use(hooks ...Hook)
- type MetadataCreate
- func (mc *MetadataCreate) Exec(ctx context.Context) error
- func (c *MetadataCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mc *MetadataCreate) ExecX(ctx context.Context)
- func (mc *MetadataCreate) Mutation() *MetadataMutation
- func (mc *MetadataCreate) OnConflict(opts ...sql.ConflictOption) *MetadataUpsertOne
- func (mc *MetadataCreate) OnConflictColumns(columns ...string) *MetadataUpsertOne
- func (c *MetadataCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mc *MetadataCreate) Save(ctx context.Context) (*Metadata, error)
- func (mc *MetadataCreate) SaveX(ctx context.Context) *Metadata
- func (mc *MetadataCreate) SetCreatedAt(t time.Time) *MetadataCreate
- func (mc *MetadataCreate) SetDeletedAt(t time.Time) *MetadataCreate
- func (mc *MetadataCreate) SetFile(f *File) *MetadataCreate
- func (mc *MetadataCreate) SetFileID(i int) *MetadataCreate
- func (mc *MetadataCreate) SetIsPublic(b bool) *MetadataCreate
- func (mc *MetadataCreate) SetName(s string) *MetadataCreate
- func (mc *MetadataCreate) SetNillableCreatedAt(t *time.Time) *MetadataCreate
- func (mc *MetadataCreate) SetNillableDeletedAt(t *time.Time) *MetadataCreate
- func (mc *MetadataCreate) SetNillableIsPublic(b *bool) *MetadataCreate
- func (mc *MetadataCreate) SetNillableUpdatedAt(t *time.Time) *MetadataCreate
- func (m *MetadataCreate) SetRawID(t int) *MetadataCreate
- func (mc *MetadataCreate) SetUpdatedAt(t time.Time) *MetadataCreate
- func (mc *MetadataCreate) SetValue(s string) *MetadataCreate
- type MetadataCreateBulk
- func (mcb *MetadataCreateBulk) Exec(ctx context.Context) error
- func (c *MetadataCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mcb *MetadataCreateBulk) ExecX(ctx context.Context)
- func (mcb *MetadataCreateBulk) OnConflict(opts ...sql.ConflictOption) *MetadataUpsertBulk
- func (mcb *MetadataCreateBulk) OnConflictColumns(columns ...string) *MetadataUpsertBulk
- func (c *MetadataCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mcb *MetadataCreateBulk) Save(ctx context.Context) ([]*Metadata, error)
- func (mcb *MetadataCreateBulk) SaveX(ctx context.Context) []*Metadata
- type MetadataDelete
- func (md *MetadataDelete) Exec(ctx context.Context) (int, error)
- func (c *MetadataDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (md *MetadataDelete) ExecX(ctx context.Context) int
- func (c *MetadataDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (md *MetadataDelete) Where(ps ...predicate.Metadata) *MetadataDelete
- type MetadataDeleteOne
- type MetadataEdges
- type MetadataGroupBy
- func (mgb *MetadataGroupBy) Aggregate(fns ...AggregateFunc) *MetadataGroupBy
- func (s *MetadataGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MetadataGroupBy) BoolX(ctx context.Context) bool
- func (s *MetadataGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MetadataGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MetadataGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MetadataGroupBy) Float64X(ctx context.Context) float64
- func (s *MetadataGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MetadataGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MetadataGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MetadataGroupBy) IntX(ctx context.Context) int
- func (s *MetadataGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MetadataGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MetadataGroupBy) Scan(ctx context.Context, v any) error
- func (s *MetadataGroupBy) ScanX(ctx context.Context, v any)
- func (s *MetadataGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MetadataGroupBy) StringX(ctx context.Context) string
- func (s *MetadataGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MetadataGroupBy) StringsX(ctx context.Context) []string
- type MetadataMutation
- func (m *MetadataMutation) AddField(name string, value ent.Value) error
- func (m *MetadataMutation) AddedEdges() []string
- func (m *MetadataMutation) AddedField(name string) (ent.Value, bool)
- func (m *MetadataMutation) AddedFields() []string
- func (m *MetadataMutation) AddedIDs(name string) []ent.Value
- func (m *MetadataMutation) ClearDeletedAt()
- func (m *MetadataMutation) ClearEdge(name string) error
- func (m *MetadataMutation) ClearField(name string) error
- func (m *MetadataMutation) ClearFile()
- func (m *MetadataMutation) ClearedEdges() []string
- func (m *MetadataMutation) ClearedFields() []string
- func (m MetadataMutation) Client() *Client
- func (m *MetadataMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MetadataMutation) DeletedAt() (r time.Time, exists bool)
- func (m *MetadataMutation) DeletedAtCleared() bool
- func (m *MetadataMutation) EdgeCleared(name string) bool
- func (c *MetadataMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *MetadataMutation) Field(name string) (ent.Value, bool)
- func (m *MetadataMutation) FieldCleared(name string) bool
- func (m *MetadataMutation) Fields() []string
- func (m *MetadataMutation) FileCleared() bool
- func (m *MetadataMutation) FileID() (r int, exists bool)
- func (m *MetadataMutation) FileIDs() (ids []int)
- func (m *MetadataMutation) ID() (id int, exists bool)
- func (m *MetadataMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MetadataMutation) IsPublic() (r bool, exists bool)
- func (m *MetadataMutation) Name() (r string, exists bool)
- func (m *MetadataMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MetadataMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MetadataMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MetadataMutation) OldFileID(ctx context.Context) (v int, err error)
- func (m *MetadataMutation) OldIsPublic(ctx context.Context) (v bool, err error)
- func (m *MetadataMutation) OldName(ctx context.Context) (v string, err error)
- func (m *MetadataMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MetadataMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *MetadataMutation) Op() Op
- func (c *MetadataMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *MetadataMutation) RemovedEdges() []string
- func (m *MetadataMutation) RemovedIDs(name string) []ent.Value
- func (m *MetadataMutation) ResetCreatedAt()
- func (m *MetadataMutation) ResetDeletedAt()
- func (m *MetadataMutation) ResetEdge(name string) error
- func (m *MetadataMutation) ResetField(name string) error
- func (m *MetadataMutation) ResetFile()
- func (m *MetadataMutation) ResetFileID()
- func (m *MetadataMutation) ResetIsPublic()
- func (m *MetadataMutation) ResetName()
- func (m *MetadataMutation) ResetUpdatedAt()
- func (m *MetadataMutation) ResetValue()
- func (m *MetadataMutation) SetCreatedAt(t time.Time)
- func (m *MetadataMutation) SetDeletedAt(t time.Time)
- func (m *MetadataMutation) SetField(name string, value ent.Value) error
- func (m *MetadataMutation) SetFileID(i int)
- func (m *MetadataMutation) SetIsPublic(b bool)
- func (m *MetadataMutation) SetName(s string)
- func (m *MetadataMutation) SetOp(op Op)
- func (m *MetadataMutation) SetRawID(t int)
- func (m *MetadataMutation) SetUpdatedAt(t time.Time)
- func (m *MetadataMutation) SetValue(s string)
- func (m MetadataMutation) Tx() (*Tx, error)
- func (m *MetadataMutation) Type() string
- func (m *MetadataMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MetadataMutation) Value() (r string, exists bool)
- func (m *MetadataMutation) Where(ps ...predicate.Metadata)
- func (m *MetadataMutation) WhereP(ps ...func(*sql.Selector))
- type MetadataQuery
- func (mq *MetadataQuery) Aggregate(fns ...AggregateFunc) *MetadataSelect
- func (mq *MetadataQuery) All(ctx context.Context) ([]*Metadata, error)
- func (mq *MetadataQuery) AllX(ctx context.Context) []*Metadata
- func (mq *MetadataQuery) Clone() *MetadataQuery
- func (mq *MetadataQuery) Count(ctx context.Context) (int, error)
- func (mq *MetadataQuery) CountX(ctx context.Context) int
- func (c *MetadataQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mq *MetadataQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MetadataQuery) ExistX(ctx context.Context) bool
- func (mq *MetadataQuery) First(ctx context.Context) (*Metadata, error)
- func (mq *MetadataQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MetadataQuery) FirstIDX(ctx context.Context) int
- func (mq *MetadataQuery) FirstX(ctx context.Context) *Metadata
- func (mq *MetadataQuery) GroupBy(field string, fields ...string) *MetadataGroupBy
- func (mq *MetadataQuery) IDs(ctx context.Context) (ids []int, err error)
- func (mq *MetadataQuery) IDsX(ctx context.Context) []int
- func (mq *MetadataQuery) Limit(limit int) *MetadataQuery
- func (mq *MetadataQuery) Offset(offset int) *MetadataQuery
- func (mq *MetadataQuery) Only(ctx context.Context) (*Metadata, error)
- func (mq *MetadataQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MetadataQuery) OnlyIDX(ctx context.Context) int
- func (mq *MetadataQuery) OnlyX(ctx context.Context) *Metadata
- func (mq *MetadataQuery) Order(o ...metadata.OrderOption) *MetadataQuery
- func (c *MetadataQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mq *MetadataQuery) QueryFile() *FileQuery
- func (mq *MetadataQuery) Select(fields ...string) *MetadataSelect
- func (mq *MetadataQuery) Unique(unique bool) *MetadataQuery
- func (mq *MetadataQuery) Where(ps ...predicate.Metadata) *MetadataQuery
- func (mq *MetadataQuery) WithFile(opts ...func(*FileQuery)) *MetadataQuery
- type MetadataSelect
- func (ms *MetadataSelect) Aggregate(fns ...AggregateFunc) *MetadataSelect
- func (s *MetadataSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MetadataSelect) BoolX(ctx context.Context) bool
- func (s *MetadataSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MetadataSelect) BoolsX(ctx context.Context) []bool
- func (c MetadataSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *MetadataSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MetadataSelect) Float64X(ctx context.Context) float64
- func (s *MetadataSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MetadataSelect) Float64sX(ctx context.Context) []float64
- func (s *MetadataSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MetadataSelect) IntX(ctx context.Context) int
- func (s *MetadataSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MetadataSelect) IntsX(ctx context.Context) []int
- func (c MetadataSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ms *MetadataSelect) Scan(ctx context.Context, v any) error
- func (s *MetadataSelect) ScanX(ctx context.Context, v any)
- func (s *MetadataSelect) String(ctx context.Context) (_ string, err error)
- func (s *MetadataSelect) StringX(ctx context.Context) string
- func (s *MetadataSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MetadataSelect) StringsX(ctx context.Context) []string
- type MetadataSlice
- type MetadataUpdate
- func (mu *MetadataUpdate) ClearDeletedAt() *MetadataUpdate
- func (mu *MetadataUpdate) ClearFile() *MetadataUpdate
- func (mu *MetadataUpdate) Exec(ctx context.Context) error
- func (c *MetadataUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mu *MetadataUpdate) ExecX(ctx context.Context)
- func (mu *MetadataUpdate) Mutation() *MetadataMutation
- func (c *MetadataUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mu *MetadataUpdate) Save(ctx context.Context) (int, error)
- func (mu *MetadataUpdate) SaveX(ctx context.Context) int
- func (mu *MetadataUpdate) SetDeletedAt(t time.Time) *MetadataUpdate
- func (mu *MetadataUpdate) SetFile(f *File) *MetadataUpdate
- func (mu *MetadataUpdate) SetFileID(i int) *MetadataUpdate
- func (mu *MetadataUpdate) SetIsPublic(b bool) *MetadataUpdate
- func (mu *MetadataUpdate) SetName(s string) *MetadataUpdate
- func (mu *MetadataUpdate) SetNillableDeletedAt(t *time.Time) *MetadataUpdate
- func (mu *MetadataUpdate) SetNillableFileID(i *int) *MetadataUpdate
- func (mu *MetadataUpdate) SetNillableIsPublic(b *bool) *MetadataUpdate
- func (mu *MetadataUpdate) SetNillableName(s *string) *MetadataUpdate
- func (mu *MetadataUpdate) SetNillableValue(s *string) *MetadataUpdate
- func (mu *MetadataUpdate) SetUpdatedAt(t time.Time) *MetadataUpdate
- func (mu *MetadataUpdate) SetValue(s string) *MetadataUpdate
- func (mu *MetadataUpdate) Where(ps ...predicate.Metadata) *MetadataUpdate
- type MetadataUpdateOne
- func (muo *MetadataUpdateOne) ClearDeletedAt() *MetadataUpdateOne
- func (muo *MetadataUpdateOne) ClearFile() *MetadataUpdateOne
- func (muo *MetadataUpdateOne) Exec(ctx context.Context) error
- func (c *MetadataUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (muo *MetadataUpdateOne) ExecX(ctx context.Context)
- func (muo *MetadataUpdateOne) Mutation() *MetadataMutation
- func (c *MetadataUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (muo *MetadataUpdateOne) Save(ctx context.Context) (*Metadata, error)
- func (muo *MetadataUpdateOne) SaveX(ctx context.Context) *Metadata
- func (muo *MetadataUpdateOne) Select(field string, fields ...string) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetDeletedAt(t time.Time) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetFile(f *File) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetFileID(i int) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetIsPublic(b bool) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetName(s string) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetNillableDeletedAt(t *time.Time) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetNillableFileID(i *int) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetNillableIsPublic(b *bool) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetNillableName(s *string) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetNillableValue(s *string) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetUpdatedAt(t time.Time) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetValue(s string) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) Where(ps ...predicate.Metadata) *MetadataUpdateOne
- type MetadataUpsert
- func (u *MetadataUpsert) ClearDeletedAt() *MetadataUpsert
- func (u *MetadataUpsert) SetDeletedAt(v time.Time) *MetadataUpsert
- func (u *MetadataUpsert) SetFileID(v int) *MetadataUpsert
- func (u *MetadataUpsert) SetIsPublic(v bool) *MetadataUpsert
- func (u *MetadataUpsert) SetName(v string) *MetadataUpsert
- func (u *MetadataUpsert) SetUpdatedAt(v time.Time) *MetadataUpsert
- func (u *MetadataUpsert) SetValue(v string) *MetadataUpsert
- func (u *MetadataUpsert) UpdateDeletedAt() *MetadataUpsert
- func (u *MetadataUpsert) UpdateFileID() *MetadataUpsert
- func (u *MetadataUpsert) UpdateIsPublic() *MetadataUpsert
- func (u *MetadataUpsert) UpdateName() *MetadataUpsert
- func (u *MetadataUpsert) UpdateUpdatedAt() *MetadataUpsert
- func (u *MetadataUpsert) UpdateValue() *MetadataUpsert
- type MetadataUpsertBulk
- func (u *MetadataUpsertBulk) ClearDeletedAt() *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) DoNothing() *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) Exec(ctx context.Context) error
- func (u *MetadataUpsertBulk) ExecX(ctx context.Context)
- func (u *MetadataUpsertBulk) Ignore() *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) SetDeletedAt(v time.Time) *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) SetFileID(v int) *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) SetIsPublic(v bool) *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) SetName(v string) *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) SetUpdatedAt(v time.Time) *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) SetValue(v string) *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) Update(set func(*MetadataUpsert)) *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) UpdateDeletedAt() *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) UpdateFileID() *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) UpdateIsPublic() *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) UpdateName() *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) UpdateNewValues() *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) UpdateUpdatedAt() *MetadataUpsertBulk
- func (u *MetadataUpsertBulk) UpdateValue() *MetadataUpsertBulk
- type MetadataUpsertOne
- func (u *MetadataUpsertOne) ClearDeletedAt() *MetadataUpsertOne
- func (u *MetadataUpsertOne) DoNothing() *MetadataUpsertOne
- func (u *MetadataUpsertOne) Exec(ctx context.Context) error
- func (u *MetadataUpsertOne) ExecX(ctx context.Context)
- func (u *MetadataUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *MetadataUpsertOne) IDX(ctx context.Context) int
- func (u *MetadataUpsertOne) Ignore() *MetadataUpsertOne
- func (u *MetadataUpsertOne) SetDeletedAt(v time.Time) *MetadataUpsertOne
- func (u *MetadataUpsertOne) SetFileID(v int) *MetadataUpsertOne
- func (u *MetadataUpsertOne) SetIsPublic(v bool) *MetadataUpsertOne
- func (u *MetadataUpsertOne) SetName(v string) *MetadataUpsertOne
- func (u *MetadataUpsertOne) SetUpdatedAt(v time.Time) *MetadataUpsertOne
- func (u *MetadataUpsertOne) SetValue(v string) *MetadataUpsertOne
- func (u *MetadataUpsertOne) Update(set func(*MetadataUpsert)) *MetadataUpsertOne
- func (u *MetadataUpsertOne) UpdateDeletedAt() *MetadataUpsertOne
- func (u *MetadataUpsertOne) UpdateFileID() *MetadataUpsertOne
- func (u *MetadataUpsertOne) UpdateIsPublic() *MetadataUpsertOne
- func (u *MetadataUpsertOne) UpdateName() *MetadataUpsertOne
- func (u *MetadataUpsertOne) UpdateNewValues() *MetadataUpsertOne
- func (u *MetadataUpsertOne) UpdateUpdatedAt() *MetadataUpsertOne
- func (u *MetadataUpsertOne) UpdateValue() *MetadataUpsertOne
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- func (c *Node) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Node) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (n *Node) QueryStoragePolicy() *StoragePolicyQuery
- func (e *Node) SetStoragePolicy(v []*StoragePolicy)
- func (n *Node) String() string
- func (n *Node) Unwrap() *Node
- func (n *Node) Update() *NodeUpdateOne
- func (n *Node) Value(name string) (ent.Value, error)
- type NodeClient
- func (c *NodeClient) Create() *NodeCreate
- func (c *NodeClient) CreateBulk(builders ...*NodeCreate) *NodeCreateBulk
- func (c *NodeClient) Delete() *NodeDelete
- func (c *NodeClient) DeleteOne(n *Node) *NodeDeleteOne
- func (c *NodeClient) DeleteOneID(id int) *NodeDeleteOne
- func (c *NodeClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *NodeClient) Get(ctx context.Context, id int) (*Node, error)
- func (c *NodeClient) GetX(ctx context.Context, id int) *Node
- func (c *NodeClient) Hooks() []Hook
- func (c *NodeClient) Intercept(interceptors ...Interceptor)
- func (c *NodeClient) Interceptors() []Interceptor
- func (c *NodeClient) MapCreateBulk(slice any, setFunc func(*NodeCreate, int)) *NodeCreateBulk
- func (c *NodeClient) Query() *NodeQuery
- func (c *NodeClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *NodeClient) QueryStoragePolicy(n *Node) *StoragePolicyQuery
- func (c *NodeClient) Update() *NodeUpdate
- func (c *NodeClient) UpdateOne(n *Node) *NodeUpdateOne
- func (c *NodeClient) UpdateOneID(id int) *NodeUpdateOne
- func (c *NodeClient) Use(hooks ...Hook)
- type NodeCreate
- func (nc *NodeCreate) AddStoragePolicy(s ...*StoragePolicy) *NodeCreate
- func (nc *NodeCreate) AddStoragePolicyIDs(ids ...int) *NodeCreate
- func (nc *NodeCreate) Exec(ctx context.Context) error
- func (c *NodeCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (nc *NodeCreate) ExecX(ctx context.Context)
- func (nc *NodeCreate) Mutation() *NodeMutation
- func (nc *NodeCreate) OnConflict(opts ...sql.ConflictOption) *NodeUpsertOne
- func (nc *NodeCreate) OnConflictColumns(columns ...string) *NodeUpsertOne
- func (c *NodeCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (nc *NodeCreate) Save(ctx context.Context) (*Node, error)
- func (nc *NodeCreate) SaveX(ctx context.Context) *Node
- func (nc *NodeCreate) SetCapabilities(bs *boolset.BooleanSet) *NodeCreate
- func (nc *NodeCreate) SetCreatedAt(t time.Time) *NodeCreate
- func (nc *NodeCreate) SetDeletedAt(t time.Time) *NodeCreate
- func (nc *NodeCreate) SetName(s string) *NodeCreate
- func (nc *NodeCreate) SetNillableCreatedAt(t *time.Time) *NodeCreate
- func (nc *NodeCreate) SetNillableDeletedAt(t *time.Time) *NodeCreate
- func (nc *NodeCreate) SetNillableServer(s *string) *NodeCreate
- func (nc *NodeCreate) SetNillableSlaveKey(s *string) *NodeCreate
- func (nc *NodeCreate) SetNillableUpdatedAt(t *time.Time) *NodeCreate
- func (nc *NodeCreate) SetNillableWeight(i *int) *NodeCreate
- func (m *NodeCreate) SetRawID(t int) *NodeCreate
- func (nc *NodeCreate) SetServer(s string) *NodeCreate
- func (nc *NodeCreate) SetSettings(ts *types.NodeSetting) *NodeCreate
- func (nc *NodeCreate) SetSlaveKey(s string) *NodeCreate
- func (nc *NodeCreate) SetStatus(n node.Status) *NodeCreate
- func (nc *NodeCreate) SetType(n node.Type) *NodeCreate
- func (nc *NodeCreate) SetUpdatedAt(t time.Time) *NodeCreate
- func (nc *NodeCreate) SetWeight(i int) *NodeCreate
- type NodeCreateBulk
- func (ncb *NodeCreateBulk) Exec(ctx context.Context) error
- func (c *NodeCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ncb *NodeCreateBulk) ExecX(ctx context.Context)
- func (ncb *NodeCreateBulk) OnConflict(opts ...sql.ConflictOption) *NodeUpsertBulk
- func (ncb *NodeCreateBulk) OnConflictColumns(columns ...string) *NodeUpsertBulk
- func (c *NodeCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ncb *NodeCreateBulk) Save(ctx context.Context) ([]*Node, error)
- func (ncb *NodeCreateBulk) SaveX(ctx context.Context) []*Node
- type NodeDelete
- func (nd *NodeDelete) Exec(ctx context.Context) (int, error)
- func (c *NodeDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (nd *NodeDelete) ExecX(ctx context.Context) int
- func (c *NodeDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (nd *NodeDelete) Where(ps ...predicate.Node) *NodeDelete
- type NodeDeleteOne
- type NodeEdges
- type NodeGroupBy
- func (ngb *NodeGroupBy) Aggregate(fns ...AggregateFunc) *NodeGroupBy
- func (s *NodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeGroupBy) BoolX(ctx context.Context) bool
- func (s *NodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeGroupBy) Float64X(ctx context.Context) float64
- func (s *NodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NodeGroupBy) IntX(ctx context.Context) int
- func (s *NodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NodeGroupBy) IntsX(ctx context.Context) []int
- func (ngb *NodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *NodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *NodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NodeGroupBy) StringX(ctx context.Context) string
- func (s *NodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NodeGroupBy) StringsX(ctx context.Context) []string
- type NodeMutation
- func (m *NodeMutation) AddField(name string, value ent.Value) error
- func (m *NodeMutation) AddStoragePolicyIDs(ids ...int)
- func (m *NodeMutation) AddWeight(i int)
- func (m *NodeMutation) AddedEdges() []string
- func (m *NodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *NodeMutation) AddedFields() []string
- func (m *NodeMutation) AddedIDs(name string) []ent.Value
- func (m *NodeMutation) AddedWeight() (r int, exists bool)
- func (m *NodeMutation) Capabilities() (r *boolset.BooleanSet, exists bool)
- func (m *NodeMutation) ClearDeletedAt()
- func (m *NodeMutation) ClearEdge(name string) error
- func (m *NodeMutation) ClearField(name string) error
- func (m *NodeMutation) ClearServer()
- func (m *NodeMutation) ClearSettings()
- func (m *NodeMutation) ClearSlaveKey()
- func (m *NodeMutation) ClearStoragePolicy()
- func (m *NodeMutation) ClearedEdges() []string
- func (m *NodeMutation) ClearedFields() []string
- func (m NodeMutation) Client() *Client
- func (m *NodeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *NodeMutation) DeletedAt() (r time.Time, exists bool)
- func (m *NodeMutation) DeletedAtCleared() bool
- func (m *NodeMutation) EdgeCleared(name string) bool
- func (c *NodeMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *NodeMutation) Field(name string) (ent.Value, bool)
- func (m *NodeMutation) FieldCleared(name string) bool
- func (m *NodeMutation) Fields() []string
- func (m *NodeMutation) GetType() (r node.Type, exists bool)
- func (m *NodeMutation) ID() (id int, exists bool)
- func (m *NodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NodeMutation) Name() (r string, exists bool)
- func (m *NodeMutation) OldCapabilities(ctx context.Context) (v *boolset.BooleanSet, err error)
- func (m *NodeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NodeMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *NodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NodeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *NodeMutation) OldServer(ctx context.Context) (v string, err error)
- func (m *NodeMutation) OldSettings(ctx context.Context) (v *types.NodeSetting, err error)
- func (m *NodeMutation) OldSlaveKey(ctx context.Context) (v string, err error)
- func (m *NodeMutation) OldStatus(ctx context.Context) (v node.Status, err error)
- func (m *NodeMutation) OldType(ctx context.Context) (v node.Type, err error)
- func (m *NodeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NodeMutation) OldWeight(ctx context.Context) (v int, err error)
- func (m *NodeMutation) Op() Op
- func (c *NodeMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *NodeMutation) RemoveStoragePolicyIDs(ids ...int)
- func (m *NodeMutation) RemovedEdges() []string
- func (m *NodeMutation) RemovedIDs(name string) []ent.Value
- func (m *NodeMutation) RemovedStoragePolicyIDs() (ids []int)
- func (m *NodeMutation) ResetCapabilities()
- func (m *NodeMutation) ResetCreatedAt()
- func (m *NodeMutation) ResetDeletedAt()
- func (m *NodeMutation) ResetEdge(name string) error
- func (m *NodeMutation) ResetField(name string) error
- func (m *NodeMutation) ResetName()
- func (m *NodeMutation) ResetServer()
- func (m *NodeMutation) ResetSettings()
- func (m *NodeMutation) ResetSlaveKey()
- func (m *NodeMutation) ResetStatus()
- func (m *NodeMutation) ResetStoragePolicy()
- func (m *NodeMutation) ResetType()
- func (m *NodeMutation) ResetUpdatedAt()
- func (m *NodeMutation) ResetWeight()
- func (m *NodeMutation) Server() (r string, exists bool)
- func (m *NodeMutation) ServerCleared() bool
- func (m *NodeMutation) SetCapabilities(bs *boolset.BooleanSet)
- func (m *NodeMutation) SetCreatedAt(t time.Time)
- func (m *NodeMutation) SetDeletedAt(t time.Time)
- func (m *NodeMutation) SetField(name string, value ent.Value) error
- func (m *NodeMutation) SetName(s string)
- func (m *NodeMutation) SetOp(op Op)
- func (m *NodeMutation) SetRawID(t int)
- func (m *NodeMutation) SetServer(s string)
- func (m *NodeMutation) SetSettings(ts *types.NodeSetting)
- func (m *NodeMutation) SetSlaveKey(s string)
- func (m *NodeMutation) SetStatus(n node.Status)
- func (m *NodeMutation) SetType(n node.Type)
- func (m *NodeMutation) SetUpdatedAt(t time.Time)
- func (m *NodeMutation) SetWeight(i int)
- func (m *NodeMutation) Settings() (r *types.NodeSetting, exists bool)
- func (m *NodeMutation) SettingsCleared() bool
- func (m *NodeMutation) SlaveKey() (r string, exists bool)
- func (m *NodeMutation) SlaveKeyCleared() bool
- func (m *NodeMutation) Status() (r node.Status, exists bool)
- func (m *NodeMutation) StoragePolicyCleared() bool
- func (m *NodeMutation) StoragePolicyIDs() (ids []int)
- func (m NodeMutation) Tx() (*Tx, error)
- func (m *NodeMutation) Type() string
- func (m *NodeMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *NodeMutation) Weight() (r int, exists bool)
- func (m *NodeMutation) Where(ps ...predicate.Node)
- func (m *NodeMutation) WhereP(ps ...func(*sql.Selector))
- type NodeQuery
- func (nq *NodeQuery) Aggregate(fns ...AggregateFunc) *NodeSelect
- func (nq *NodeQuery) All(ctx context.Context) ([]*Node, error)
- func (nq *NodeQuery) AllX(ctx context.Context) []*Node
- func (nq *NodeQuery) Clone() *NodeQuery
- func (nq *NodeQuery) Count(ctx context.Context) (int, error)
- func (nq *NodeQuery) CountX(ctx context.Context) int
- func (c *NodeQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (nq *NodeQuery) Exist(ctx context.Context) (bool, error)
- func (nq *NodeQuery) ExistX(ctx context.Context) bool
- func (nq *NodeQuery) First(ctx context.Context) (*Node, error)
- func (nq *NodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (nq *NodeQuery) FirstIDX(ctx context.Context) int
- func (nq *NodeQuery) FirstX(ctx context.Context) *Node
- func (nq *NodeQuery) GroupBy(field string, fields ...string) *NodeGroupBy
- func (nq *NodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (nq *NodeQuery) IDsX(ctx context.Context) []int
- func (nq *NodeQuery) Limit(limit int) *NodeQuery
- func (nq *NodeQuery) Offset(offset int) *NodeQuery
- func (nq *NodeQuery) Only(ctx context.Context) (*Node, error)
- func (nq *NodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (nq *NodeQuery) OnlyIDX(ctx context.Context) int
- func (nq *NodeQuery) OnlyX(ctx context.Context) *Node
- func (nq *NodeQuery) Order(o ...node.OrderOption) *NodeQuery
- func (c *NodeQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (nq *NodeQuery) QueryStoragePolicy() *StoragePolicyQuery
- func (nq *NodeQuery) Select(fields ...string) *NodeSelect
- func (nq *NodeQuery) Unique(unique bool) *NodeQuery
- func (nq *NodeQuery) Where(ps ...predicate.Node) *NodeQuery
- func (nq *NodeQuery) WithStoragePolicy(opts ...func(*StoragePolicyQuery)) *NodeQuery
- type NodeSelect
- func (ns *NodeSelect) Aggregate(fns ...AggregateFunc) *NodeSelect
- func (s *NodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeSelect) BoolX(ctx context.Context) bool
- func (s *NodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeSelect) BoolsX(ctx context.Context) []bool
- func (c NodeSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *NodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeSelect) Float64X(ctx context.Context) float64
- func (s *NodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeSelect) Float64sX(ctx context.Context) []float64
- func (s *NodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NodeSelect) IntX(ctx context.Context) int
- func (s *NodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NodeSelect) IntsX(ctx context.Context) []int
- func (c NodeSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ns *NodeSelect) Scan(ctx context.Context, v any) error
- func (s *NodeSelect) ScanX(ctx context.Context, v any)
- func (s *NodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *NodeSelect) StringX(ctx context.Context) string
- func (s *NodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NodeSelect) StringsX(ctx context.Context) []string
- type NodeUpdate
- func (nu *NodeUpdate) AddStoragePolicy(s ...*StoragePolicy) *NodeUpdate
- func (nu *NodeUpdate) AddStoragePolicyIDs(ids ...int) *NodeUpdate
- func (nu *NodeUpdate) AddWeight(i int) *NodeUpdate
- func (nu *NodeUpdate) ClearDeletedAt() *NodeUpdate
- func (nu *NodeUpdate) ClearServer() *NodeUpdate
- func (nu *NodeUpdate) ClearSettings() *NodeUpdate
- func (nu *NodeUpdate) ClearSlaveKey() *NodeUpdate
- func (nu *NodeUpdate) ClearStoragePolicy() *NodeUpdate
- func (nu *NodeUpdate) Exec(ctx context.Context) error
- func (c *NodeUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (nu *NodeUpdate) ExecX(ctx context.Context)
- func (nu *NodeUpdate) Mutation() *NodeMutation
- func (c *NodeUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (nu *NodeUpdate) RemoveStoragePolicy(s ...*StoragePolicy) *NodeUpdate
- func (nu *NodeUpdate) RemoveStoragePolicyIDs(ids ...int) *NodeUpdate
- func (nu *NodeUpdate) Save(ctx context.Context) (int, error)
- func (nu *NodeUpdate) SaveX(ctx context.Context) int
- func (nu *NodeUpdate) SetCapabilities(bs *boolset.BooleanSet) *NodeUpdate
- func (nu *NodeUpdate) SetDeletedAt(t time.Time) *NodeUpdate
- func (nu *NodeUpdate) SetName(s string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableDeletedAt(t *time.Time) *NodeUpdate
- func (nu *NodeUpdate) SetNillableName(s *string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableServer(s *string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableSlaveKey(s *string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableStatus(n *node.Status) *NodeUpdate
- func (nu *NodeUpdate) SetNillableType(n *node.Type) *NodeUpdate
- func (nu *NodeUpdate) SetNillableWeight(i *int) *NodeUpdate
- func (nu *NodeUpdate) SetServer(s string) *NodeUpdate
- func (nu *NodeUpdate) SetSettings(ts *types.NodeSetting) *NodeUpdate
- func (nu *NodeUpdate) SetSlaveKey(s string) *NodeUpdate
- func (nu *NodeUpdate) SetStatus(n node.Status) *NodeUpdate
- func (nu *NodeUpdate) SetType(n node.Type) *NodeUpdate
- func (nu *NodeUpdate) SetUpdatedAt(t time.Time) *NodeUpdate
- func (nu *NodeUpdate) SetWeight(i int) *NodeUpdate
- func (nu *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate
- type NodeUpdateOne
- func (nuo *NodeUpdateOne) AddStoragePolicy(s ...*StoragePolicy) *NodeUpdateOne
- func (nuo *NodeUpdateOne) AddStoragePolicyIDs(ids ...int) *NodeUpdateOne
- func (nuo *NodeUpdateOne) AddWeight(i int) *NodeUpdateOne
- func (nuo *NodeUpdateOne) ClearDeletedAt() *NodeUpdateOne
- func (nuo *NodeUpdateOne) ClearServer() *NodeUpdateOne
- func (nuo *NodeUpdateOne) ClearSettings() *NodeUpdateOne
- func (nuo *NodeUpdateOne) ClearSlaveKey() *NodeUpdateOne
- func (nuo *NodeUpdateOne) ClearStoragePolicy() *NodeUpdateOne
- func (nuo *NodeUpdateOne) Exec(ctx context.Context) error
- func (c *NodeUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (nuo *NodeUpdateOne) ExecX(ctx context.Context)
- func (nuo *NodeUpdateOne) Mutation() *NodeMutation
- func (c *NodeUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (nuo *NodeUpdateOne) RemoveStoragePolicy(s ...*StoragePolicy) *NodeUpdateOne
- func (nuo *NodeUpdateOne) RemoveStoragePolicyIDs(ids ...int) *NodeUpdateOne
- func (nuo *NodeUpdateOne) Save(ctx context.Context) (*Node, error)
- func (nuo *NodeUpdateOne) SaveX(ctx context.Context) *Node
- func (nuo *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetCapabilities(bs *boolset.BooleanSet) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetDeletedAt(t time.Time) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetName(s string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableDeletedAt(t *time.Time) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableName(s *string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableServer(s *string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableSlaveKey(s *string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableStatus(n *node.Status) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableType(n *node.Type) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableWeight(i *int) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetServer(s string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetSettings(ts *types.NodeSetting) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetSlaveKey(s string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetStatus(n node.Status) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetType(n node.Type) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetUpdatedAt(t time.Time) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetWeight(i int) *NodeUpdateOne
- func (nuo *NodeUpdateOne) Where(ps ...predicate.Node) *NodeUpdateOne
- type NodeUpsert
- func (u *NodeUpsert) AddWeight(v int) *NodeUpsert
- func (u *NodeUpsert) ClearDeletedAt() *NodeUpsert
- func (u *NodeUpsert) ClearServer() *NodeUpsert
- func (u *NodeUpsert) ClearSettings() *NodeUpsert
- func (u *NodeUpsert) ClearSlaveKey() *NodeUpsert
- func (u *NodeUpsert) SetCapabilities(v *boolset.BooleanSet) *NodeUpsert
- func (u *NodeUpsert) SetDeletedAt(v time.Time) *NodeUpsert
- func (u *NodeUpsert) SetName(v string) *NodeUpsert
- func (u *NodeUpsert) SetServer(v string) *NodeUpsert
- func (u *NodeUpsert) SetSettings(v *types.NodeSetting) *NodeUpsert
- func (u *NodeUpsert) SetSlaveKey(v string) *NodeUpsert
- func (u *NodeUpsert) SetStatus(v node.Status) *NodeUpsert
- func (u *NodeUpsert) SetType(v node.Type) *NodeUpsert
- func (u *NodeUpsert) SetUpdatedAt(v time.Time) *NodeUpsert
- func (u *NodeUpsert) SetWeight(v int) *NodeUpsert
- func (u *NodeUpsert) UpdateCapabilities() *NodeUpsert
- func (u *NodeUpsert) UpdateDeletedAt() *NodeUpsert
- func (u *NodeUpsert) UpdateName() *NodeUpsert
- func (u *NodeUpsert) UpdateServer() *NodeUpsert
- func (u *NodeUpsert) UpdateSettings() *NodeUpsert
- func (u *NodeUpsert) UpdateSlaveKey() *NodeUpsert
- func (u *NodeUpsert) UpdateStatus() *NodeUpsert
- func (u *NodeUpsert) UpdateType() *NodeUpsert
- func (u *NodeUpsert) UpdateUpdatedAt() *NodeUpsert
- func (u *NodeUpsert) UpdateWeight() *NodeUpsert
- type NodeUpsertBulk
- func (u *NodeUpsertBulk) AddWeight(v int) *NodeUpsertBulk
- func (u *NodeUpsertBulk) ClearDeletedAt() *NodeUpsertBulk
- func (u *NodeUpsertBulk) ClearServer() *NodeUpsertBulk
- func (u *NodeUpsertBulk) ClearSettings() *NodeUpsertBulk
- func (u *NodeUpsertBulk) ClearSlaveKey() *NodeUpsertBulk
- func (u *NodeUpsertBulk) DoNothing() *NodeUpsertBulk
- func (u *NodeUpsertBulk) Exec(ctx context.Context) error
- func (u *NodeUpsertBulk) ExecX(ctx context.Context)
- func (u *NodeUpsertBulk) Ignore() *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetCapabilities(v *boolset.BooleanSet) *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetDeletedAt(v time.Time) *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetName(v string) *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetServer(v string) *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetSettings(v *types.NodeSetting) *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetSlaveKey(v string) *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetStatus(v node.Status) *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetType(v node.Type) *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetUpdatedAt(v time.Time) *NodeUpsertBulk
- func (u *NodeUpsertBulk) SetWeight(v int) *NodeUpsertBulk
- func (u *NodeUpsertBulk) Update(set func(*NodeUpsert)) *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateCapabilities() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateDeletedAt() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateName() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateNewValues() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateServer() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateSettings() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateSlaveKey() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateStatus() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateType() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateUpdatedAt() *NodeUpsertBulk
- func (u *NodeUpsertBulk) UpdateWeight() *NodeUpsertBulk
- type NodeUpsertOne
- func (u *NodeUpsertOne) AddWeight(v int) *NodeUpsertOne
- func (u *NodeUpsertOne) ClearDeletedAt() *NodeUpsertOne
- func (u *NodeUpsertOne) ClearServer() *NodeUpsertOne
- func (u *NodeUpsertOne) ClearSettings() *NodeUpsertOne
- func (u *NodeUpsertOne) ClearSlaveKey() *NodeUpsertOne
- func (u *NodeUpsertOne) DoNothing() *NodeUpsertOne
- func (u *NodeUpsertOne) Exec(ctx context.Context) error
- func (u *NodeUpsertOne) ExecX(ctx context.Context)
- func (u *NodeUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *NodeUpsertOne) IDX(ctx context.Context) int
- func (u *NodeUpsertOne) Ignore() *NodeUpsertOne
- func (u *NodeUpsertOne) SetCapabilities(v *boolset.BooleanSet) *NodeUpsertOne
- func (u *NodeUpsertOne) SetDeletedAt(v time.Time) *NodeUpsertOne
- func (u *NodeUpsertOne) SetName(v string) *NodeUpsertOne
- func (u *NodeUpsertOne) SetServer(v string) *NodeUpsertOne
- func (u *NodeUpsertOne) SetSettings(v *types.NodeSetting) *NodeUpsertOne
- func (u *NodeUpsertOne) SetSlaveKey(v string) *NodeUpsertOne
- func (u *NodeUpsertOne) SetStatus(v node.Status) *NodeUpsertOne
- func (u *NodeUpsertOne) SetType(v node.Type) *NodeUpsertOne
- func (u *NodeUpsertOne) SetUpdatedAt(v time.Time) *NodeUpsertOne
- func (u *NodeUpsertOne) SetWeight(v int) *NodeUpsertOne
- func (u *NodeUpsertOne) Update(set func(*NodeUpsert)) *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateCapabilities() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateDeletedAt() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateName() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateNewValues() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateServer() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateSettings() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateSlaveKey() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateStatus() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateType() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateUpdatedAt() *NodeUpsertOne
- func (u *NodeUpsertOne) UpdateWeight() *NodeUpsertOne
- type Nodes
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type OAuthClient
- func (c *OAuthClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *OAuthClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (oc *OAuthClient) QueryGrants() *OAuthGrantQuery
- func (e *OAuthClient) SetGrants(v []*OAuthGrant)
- func (oc *OAuthClient) String() string
- func (oc *OAuthClient) Unwrap() *OAuthClient
- func (oc *OAuthClient) Update() *OAuthClientUpdateOne
- func (oc *OAuthClient) Value(name string) (ent.Value, error)
- type OAuthClientClient
- func (c *OAuthClientClient) Create() *OAuthClientCreate
- func (c *OAuthClientClient) CreateBulk(builders ...*OAuthClientCreate) *OAuthClientCreateBulk
- func (c *OAuthClientClient) Delete() *OAuthClientDelete
- func (c *OAuthClientClient) DeleteOne(oc *OAuthClient) *OAuthClientDeleteOne
- func (c *OAuthClientClient) DeleteOneID(id int) *OAuthClientDeleteOne
- func (c *OAuthClientClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *OAuthClientClient) Get(ctx context.Context, id int) (*OAuthClient, error)
- func (c *OAuthClientClient) GetX(ctx context.Context, id int) *OAuthClient
- func (c *OAuthClientClient) Hooks() []Hook
- func (c *OAuthClientClient) Intercept(interceptors ...Interceptor)
- func (c *OAuthClientClient) Interceptors() []Interceptor
- func (c *OAuthClientClient) MapCreateBulk(slice any, setFunc func(*OAuthClientCreate, int)) *OAuthClientCreateBulk
- func (c *OAuthClientClient) Query() *OAuthClientQuery
- func (c *OAuthClientClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *OAuthClientClient) QueryGrants(oc *OAuthClient) *OAuthGrantQuery
- func (c *OAuthClientClient) Update() *OAuthClientUpdate
- func (c *OAuthClientClient) UpdateOne(oc *OAuthClient) *OAuthClientUpdateOne
- func (c *OAuthClientClient) UpdateOneID(id int) *OAuthClientUpdateOne
- func (c *OAuthClientClient) Use(hooks ...Hook)
- type OAuthClientCreate
- func (occ *OAuthClientCreate) AddGrantIDs(ids ...int) *OAuthClientCreate
- func (occ *OAuthClientCreate) AddGrants(o ...*OAuthGrant) *OAuthClientCreate
- func (occ *OAuthClientCreate) Exec(ctx context.Context) error
- func (c *OAuthClientCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (occ *OAuthClientCreate) ExecX(ctx context.Context)
- func (occ *OAuthClientCreate) Mutation() *OAuthClientMutation
- func (occ *OAuthClientCreate) OnConflict(opts ...sql.ConflictOption) *OAuthClientUpsertOne
- func (occ *OAuthClientCreate) OnConflictColumns(columns ...string) *OAuthClientUpsertOne
- func (c *OAuthClientCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (occ *OAuthClientCreate) Save(ctx context.Context) (*OAuthClient, error)
- func (occ *OAuthClientCreate) SaveX(ctx context.Context) *OAuthClient
- func (occ *OAuthClientCreate) SetCreatedAt(t time.Time) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetDeletedAt(t time.Time) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetGUID(s string) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetHomepageURL(s string) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetIsEnabled(b bool) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetName(s string) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetNillableCreatedAt(t *time.Time) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetNillableDeletedAt(t *time.Time) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetNillableHomepageURL(s *string) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetNillableIsEnabled(b *bool) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetNillableUpdatedAt(t *time.Time) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetProps(tacp *types.OAuthClientProps) *OAuthClientCreate
- func (m *OAuthClientCreate) SetRawID(t int) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetRedirectUris(s []string) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetScopes(s []string) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetSecret(s string) *OAuthClientCreate
- func (occ *OAuthClientCreate) SetUpdatedAt(t time.Time) *OAuthClientCreate
- type OAuthClientCreateBulk
- func (occb *OAuthClientCreateBulk) Exec(ctx context.Context) error
- func (c *OAuthClientCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (occb *OAuthClientCreateBulk) ExecX(ctx context.Context)
- func (occb *OAuthClientCreateBulk) OnConflict(opts ...sql.ConflictOption) *OAuthClientUpsertBulk
- func (occb *OAuthClientCreateBulk) OnConflictColumns(columns ...string) *OAuthClientUpsertBulk
- func (c *OAuthClientCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (occb *OAuthClientCreateBulk) Save(ctx context.Context) ([]*OAuthClient, error)
- func (occb *OAuthClientCreateBulk) SaveX(ctx context.Context) []*OAuthClient
- type OAuthClientDelete
- func (ocd *OAuthClientDelete) Exec(ctx context.Context) (int, error)
- func (c *OAuthClientDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ocd *OAuthClientDelete) ExecX(ctx context.Context) int
- func (c *OAuthClientDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ocd *OAuthClientDelete) Where(ps ...predicate.OAuthClient) *OAuthClientDelete
- type OAuthClientDeleteOne
- type OAuthClientEdges
- type OAuthClientGroupBy
- func (ocgb *OAuthClientGroupBy) Aggregate(fns ...AggregateFunc) *OAuthClientGroupBy
- func (s *OAuthClientGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthClientGroupBy) BoolX(ctx context.Context) bool
- func (s *OAuthClientGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthClientGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OAuthClientGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthClientGroupBy) Float64X(ctx context.Context) float64
- func (s *OAuthClientGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthClientGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OAuthClientGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthClientGroupBy) IntX(ctx context.Context) int
- func (s *OAuthClientGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthClientGroupBy) IntsX(ctx context.Context) []int
- func (ocgb *OAuthClientGroupBy) Scan(ctx context.Context, v any) error
- func (s *OAuthClientGroupBy) ScanX(ctx context.Context, v any)
- func (s *OAuthClientGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OAuthClientGroupBy) StringX(ctx context.Context) string
- func (s *OAuthClientGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthClientGroupBy) StringsX(ctx context.Context) []string
- type OAuthClientMutation
- func (m *OAuthClientMutation) AddField(name string, value ent.Value) error
- func (m *OAuthClientMutation) AddGrantIDs(ids ...int)
- func (m *OAuthClientMutation) AddedEdges() []string
- func (m *OAuthClientMutation) AddedField(name string) (ent.Value, bool)
- func (m *OAuthClientMutation) AddedFields() []string
- func (m *OAuthClientMutation) AddedIDs(name string) []ent.Value
- func (m *OAuthClientMutation) AppendRedirectUris(s []string)
- func (m *OAuthClientMutation) AppendScopes(s []string)
- func (m *OAuthClientMutation) AppendedRedirectUris() ([]string, bool)
- func (m *OAuthClientMutation) AppendedScopes() ([]string, bool)
- func (m *OAuthClientMutation) ClearDeletedAt()
- func (m *OAuthClientMutation) ClearEdge(name string) error
- func (m *OAuthClientMutation) ClearField(name string) error
- func (m *OAuthClientMutation) ClearGrants()
- func (m *OAuthClientMutation) ClearHomepageURL()
- func (m *OAuthClientMutation) ClearedEdges() []string
- func (m *OAuthClientMutation) ClearedFields() []string
- func (m OAuthClientMutation) Client() *Client
- func (m *OAuthClientMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OAuthClientMutation) DeletedAt() (r time.Time, exists bool)
- func (m *OAuthClientMutation) DeletedAtCleared() bool
- func (m *OAuthClientMutation) EdgeCleared(name string) bool
- func (c *OAuthClientMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *OAuthClientMutation) Field(name string) (ent.Value, bool)
- func (m *OAuthClientMutation) FieldCleared(name string) bool
- func (m *OAuthClientMutation) Fields() []string
- func (m *OAuthClientMutation) GUID() (r string, exists bool)
- func (m *OAuthClientMutation) GrantsCleared() bool
- func (m *OAuthClientMutation) GrantsIDs() (ids []int)
- func (m *OAuthClientMutation) HomepageURL() (r string, exists bool)
- func (m *OAuthClientMutation) HomepageURLCleared() bool
- func (m *OAuthClientMutation) ID() (id int, exists bool)
- func (m *OAuthClientMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OAuthClientMutation) IsEnabled() (r bool, exists bool)
- func (m *OAuthClientMutation) Name() (r string, exists bool)
- func (m *OAuthClientMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OAuthClientMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthClientMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OAuthClientMutation) OldGUID(ctx context.Context) (v string, err error)
- func (m *OAuthClientMutation) OldHomepageURL(ctx context.Context) (v string, err error)
- func (m *OAuthClientMutation) OldIsEnabled(ctx context.Context) (v bool, err error)
- func (m *OAuthClientMutation) OldName(ctx context.Context) (v string, err error)
- func (m *OAuthClientMutation) OldProps(ctx context.Context) (v *types.OAuthClientProps, err error)
- func (m *OAuthClientMutation) OldRedirectUris(ctx context.Context) (v []string, err error)
- func (m *OAuthClientMutation) OldScopes(ctx context.Context) (v []string, err error)
- func (m *OAuthClientMutation) OldSecret(ctx context.Context) (v string, err error)
- func (m *OAuthClientMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OAuthClientMutation) Op() Op
- func (m *OAuthClientMutation) Props() (r *types.OAuthClientProps, exists bool)
- func (c *OAuthClientMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *OAuthClientMutation) RedirectUris() (r []string, exists bool)
- func (m *OAuthClientMutation) RemoveGrantIDs(ids ...int)
- func (m *OAuthClientMutation) RemovedEdges() []string
- func (m *OAuthClientMutation) RemovedGrantsIDs() (ids []int)
- func (m *OAuthClientMutation) RemovedIDs(name string) []ent.Value
- func (m *OAuthClientMutation) ResetCreatedAt()
- func (m *OAuthClientMutation) ResetDeletedAt()
- func (m *OAuthClientMutation) ResetEdge(name string) error
- func (m *OAuthClientMutation) ResetField(name string) error
- func (m *OAuthClientMutation) ResetGUID()
- func (m *OAuthClientMutation) ResetGrants()
- func (m *OAuthClientMutation) ResetHomepageURL()
- func (m *OAuthClientMutation) ResetIsEnabled()
- func (m *OAuthClientMutation) ResetName()
- func (m *OAuthClientMutation) ResetProps()
- func (m *OAuthClientMutation) ResetRedirectUris()
- func (m *OAuthClientMutation) ResetScopes()
- func (m *OAuthClientMutation) ResetSecret()
- func (m *OAuthClientMutation) ResetUpdatedAt()
- func (m *OAuthClientMutation) Scopes() (r []string, exists bool)
- func (m *OAuthClientMutation) Secret() (r string, exists bool)
- func (m *OAuthClientMutation) SetCreatedAt(t time.Time)
- func (m *OAuthClientMutation) SetDeletedAt(t time.Time)
- func (m *OAuthClientMutation) SetField(name string, value ent.Value) error
- func (m *OAuthClientMutation) SetGUID(s string)
- func (m *OAuthClientMutation) SetHomepageURL(s string)
- func (m *OAuthClientMutation) SetIsEnabled(b bool)
- func (m *OAuthClientMutation) SetName(s string)
- func (m *OAuthClientMutation) SetOp(op Op)
- func (m *OAuthClientMutation) SetProps(tacp *types.OAuthClientProps)
- func (m *OAuthClientMutation) SetRawID(t int)
- func (m *OAuthClientMutation) SetRedirectUris(s []string)
- func (m *OAuthClientMutation) SetScopes(s []string)
- func (m *OAuthClientMutation) SetSecret(s string)
- func (m *OAuthClientMutation) SetUpdatedAt(t time.Time)
- func (m OAuthClientMutation) Tx() (*Tx, error)
- func (m *OAuthClientMutation) Type() string
- func (m *OAuthClientMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OAuthClientMutation) Where(ps ...predicate.OAuthClient)
- func (m *OAuthClientMutation) WhereP(ps ...func(*sql.Selector))
- type OAuthClientQuery
- func (ocq *OAuthClientQuery) Aggregate(fns ...AggregateFunc) *OAuthClientSelect
- func (ocq *OAuthClientQuery) All(ctx context.Context) ([]*OAuthClient, error)
- func (ocq *OAuthClientQuery) AllX(ctx context.Context) []*OAuthClient
- func (ocq *OAuthClientQuery) Clone() *OAuthClientQuery
- func (ocq *OAuthClientQuery) Count(ctx context.Context) (int, error)
- func (ocq *OAuthClientQuery) CountX(ctx context.Context) int
- func (c *OAuthClientQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ocq *OAuthClientQuery) Exist(ctx context.Context) (bool, error)
- func (ocq *OAuthClientQuery) ExistX(ctx context.Context) bool
- func (ocq *OAuthClientQuery) First(ctx context.Context) (*OAuthClient, error)
- func (ocq *OAuthClientQuery) FirstID(ctx context.Context) (id int, err error)
- func (ocq *OAuthClientQuery) FirstIDX(ctx context.Context) int
- func (ocq *OAuthClientQuery) FirstX(ctx context.Context) *OAuthClient
- func (ocq *OAuthClientQuery) GroupBy(field string, fields ...string) *OAuthClientGroupBy
- func (ocq *OAuthClientQuery) IDs(ctx context.Context) (ids []int, err error)
- func (ocq *OAuthClientQuery) IDsX(ctx context.Context) []int
- func (ocq *OAuthClientQuery) Limit(limit int) *OAuthClientQuery
- func (ocq *OAuthClientQuery) Offset(offset int) *OAuthClientQuery
- func (ocq *OAuthClientQuery) Only(ctx context.Context) (*OAuthClient, error)
- func (ocq *OAuthClientQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ocq *OAuthClientQuery) OnlyIDX(ctx context.Context) int
- func (ocq *OAuthClientQuery) OnlyX(ctx context.Context) *OAuthClient
- func (ocq *OAuthClientQuery) Order(o ...oauthclient.OrderOption) *OAuthClientQuery
- func (c *OAuthClientQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ocq *OAuthClientQuery) QueryGrants() *OAuthGrantQuery
- func (ocq *OAuthClientQuery) Select(fields ...string) *OAuthClientSelect
- func (ocq *OAuthClientQuery) Unique(unique bool) *OAuthClientQuery
- func (ocq *OAuthClientQuery) Where(ps ...predicate.OAuthClient) *OAuthClientQuery
- func (ocq *OAuthClientQuery) WithGrants(opts ...func(*OAuthGrantQuery)) *OAuthClientQuery
- type OAuthClientSelect
- func (ocs *OAuthClientSelect) Aggregate(fns ...AggregateFunc) *OAuthClientSelect
- func (s *OAuthClientSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthClientSelect) BoolX(ctx context.Context) bool
- func (s *OAuthClientSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthClientSelect) BoolsX(ctx context.Context) []bool
- func (c OAuthClientSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *OAuthClientSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthClientSelect) Float64X(ctx context.Context) float64
- func (s *OAuthClientSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthClientSelect) Float64sX(ctx context.Context) []float64
- func (s *OAuthClientSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthClientSelect) IntX(ctx context.Context) int
- func (s *OAuthClientSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthClientSelect) IntsX(ctx context.Context) []int
- func (c OAuthClientSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ocs *OAuthClientSelect) Scan(ctx context.Context, v any) error
- func (s *OAuthClientSelect) ScanX(ctx context.Context, v any)
- func (s *OAuthClientSelect) String(ctx context.Context) (_ string, err error)
- func (s *OAuthClientSelect) StringX(ctx context.Context) string
- func (s *OAuthClientSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthClientSelect) StringsX(ctx context.Context) []string
- type OAuthClientUpdate
- func (ocu *OAuthClientUpdate) AddGrantIDs(ids ...int) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) AddGrants(o ...*OAuthGrant) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) AppendRedirectUris(s []string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) AppendScopes(s []string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) ClearDeletedAt() *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) ClearGrants() *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) ClearHomepageURL() *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) Exec(ctx context.Context) error
- func (c *OAuthClientUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ocu *OAuthClientUpdate) ExecX(ctx context.Context)
- func (ocu *OAuthClientUpdate) Mutation() *OAuthClientMutation
- func (c *OAuthClientUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ocu *OAuthClientUpdate) RemoveGrantIDs(ids ...int) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) RemoveGrants(o ...*OAuthGrant) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) Save(ctx context.Context) (int, error)
- func (ocu *OAuthClientUpdate) SaveX(ctx context.Context) int
- func (ocu *OAuthClientUpdate) SetDeletedAt(t time.Time) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetGUID(s string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetHomepageURL(s string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetIsEnabled(b bool) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetName(s string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetNillableDeletedAt(t *time.Time) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetNillableGUID(s *string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetNillableHomepageURL(s *string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetNillableIsEnabled(b *bool) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetNillableName(s *string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetNillableSecret(s *string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetProps(tacp *types.OAuthClientProps) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetRedirectUris(s []string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetScopes(s []string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetSecret(s string) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) SetUpdatedAt(t time.Time) *OAuthClientUpdate
- func (ocu *OAuthClientUpdate) Where(ps ...predicate.OAuthClient) *OAuthClientUpdate
- type OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) AddGrantIDs(ids ...int) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) AddGrants(o ...*OAuthGrant) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) AppendRedirectUris(s []string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) AppendScopes(s []string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) ClearDeletedAt() *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) ClearGrants() *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) ClearHomepageURL() *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) Exec(ctx context.Context) error
- func (c *OAuthClientUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ocuo *OAuthClientUpdateOne) ExecX(ctx context.Context)
- func (ocuo *OAuthClientUpdateOne) Mutation() *OAuthClientMutation
- func (c *OAuthClientUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ocuo *OAuthClientUpdateOne) RemoveGrantIDs(ids ...int) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) RemoveGrants(o ...*OAuthGrant) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) Save(ctx context.Context) (*OAuthClient, error)
- func (ocuo *OAuthClientUpdateOne) SaveX(ctx context.Context) *OAuthClient
- func (ocuo *OAuthClientUpdateOne) Select(field string, fields ...string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetDeletedAt(t time.Time) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetGUID(s string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetHomepageURL(s string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetIsEnabled(b bool) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetName(s string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetNillableDeletedAt(t *time.Time) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetNillableGUID(s *string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetNillableHomepageURL(s *string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetNillableIsEnabled(b *bool) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetNillableName(s *string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetNillableSecret(s *string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetProps(tacp *types.OAuthClientProps) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetRedirectUris(s []string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetScopes(s []string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetSecret(s string) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) SetUpdatedAt(t time.Time) *OAuthClientUpdateOne
- func (ocuo *OAuthClientUpdateOne) Where(ps ...predicate.OAuthClient) *OAuthClientUpdateOne
- type OAuthClientUpsert
- func (u *OAuthClientUpsert) ClearDeletedAt() *OAuthClientUpsert
- func (u *OAuthClientUpsert) ClearHomepageURL() *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetDeletedAt(v time.Time) *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetGUID(v string) *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetHomepageURL(v string) *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetIsEnabled(v bool) *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetName(v string) *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetProps(v *types.OAuthClientProps) *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetRedirectUris(v []string) *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetScopes(v []string) *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetSecret(v string) *OAuthClientUpsert
- func (u *OAuthClientUpsert) SetUpdatedAt(v time.Time) *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateDeletedAt() *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateGUID() *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateHomepageURL() *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateIsEnabled() *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateName() *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateProps() *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateRedirectUris() *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateScopes() *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateSecret() *OAuthClientUpsert
- func (u *OAuthClientUpsert) UpdateUpdatedAt() *OAuthClientUpsert
- type OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) ClearDeletedAt() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) ClearHomepageURL() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) DoNothing() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) Exec(ctx context.Context) error
- func (u *OAuthClientUpsertBulk) ExecX(ctx context.Context)
- func (u *OAuthClientUpsertBulk) Ignore() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetDeletedAt(v time.Time) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetGUID(v string) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetHomepageURL(v string) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetIsEnabled(v bool) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetName(v string) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetProps(v *types.OAuthClientProps) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetRedirectUris(v []string) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetScopes(v []string) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetSecret(v string) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) SetUpdatedAt(v time.Time) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) Update(set func(*OAuthClientUpsert)) *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateDeletedAt() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateGUID() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateHomepageURL() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateIsEnabled() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateName() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateNewValues() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateProps() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateRedirectUris() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateScopes() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateSecret() *OAuthClientUpsertBulk
- func (u *OAuthClientUpsertBulk) UpdateUpdatedAt() *OAuthClientUpsertBulk
- type OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) ClearDeletedAt() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) ClearHomepageURL() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) DoNothing() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) Exec(ctx context.Context) error
- func (u *OAuthClientUpsertOne) ExecX(ctx context.Context)
- func (u *OAuthClientUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *OAuthClientUpsertOne) IDX(ctx context.Context) int
- func (u *OAuthClientUpsertOne) Ignore() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetDeletedAt(v time.Time) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetGUID(v string) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetHomepageURL(v string) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetIsEnabled(v bool) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetName(v string) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetProps(v *types.OAuthClientProps) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetRedirectUris(v []string) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetScopes(v []string) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetSecret(v string) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) SetUpdatedAt(v time.Time) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) Update(set func(*OAuthClientUpsert)) *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateDeletedAt() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateGUID() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateHomepageURL() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateIsEnabled() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateName() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateNewValues() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateProps() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateRedirectUris() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateScopes() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateSecret() *OAuthClientUpsertOne
- func (u *OAuthClientUpsertOne) UpdateUpdatedAt() *OAuthClientUpsertOne
- type OAuthClients
- type OAuthGrant
- func (c *OAuthGrant) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (og *OAuthGrant) QueryClient() *OAuthClientQuery
- func (c *OAuthGrant) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (og *OAuthGrant) QueryUser() *UserQuery
- func (e *OAuthGrant) SetClient(v *OAuthClient)
- func (e *OAuthGrant) SetUser(v *User)
- func (og *OAuthGrant) String() string
- func (og *OAuthGrant) Unwrap() *OAuthGrant
- func (og *OAuthGrant) Update() *OAuthGrantUpdateOne
- func (og *OAuthGrant) Value(name string) (ent.Value, error)
- type OAuthGrantClient
- func (c *OAuthGrantClient) Create() *OAuthGrantCreate
- func (c *OAuthGrantClient) CreateBulk(builders ...*OAuthGrantCreate) *OAuthGrantCreateBulk
- func (c *OAuthGrantClient) Delete() *OAuthGrantDelete
- func (c *OAuthGrantClient) DeleteOne(og *OAuthGrant) *OAuthGrantDeleteOne
- func (c *OAuthGrantClient) DeleteOneID(id int) *OAuthGrantDeleteOne
- func (c *OAuthGrantClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *OAuthGrantClient) Get(ctx context.Context, id int) (*OAuthGrant, error)
- func (c *OAuthGrantClient) GetX(ctx context.Context, id int) *OAuthGrant
- func (c *OAuthGrantClient) Hooks() []Hook
- func (c *OAuthGrantClient) Intercept(interceptors ...Interceptor)
- func (c *OAuthGrantClient) Interceptors() []Interceptor
- func (c *OAuthGrantClient) MapCreateBulk(slice any, setFunc func(*OAuthGrantCreate, int)) *OAuthGrantCreateBulk
- func (c *OAuthGrantClient) Query() *OAuthGrantQuery
- func (c *OAuthGrantClient) QueryClient(og *OAuthGrant) *OAuthClientQuery
- func (c *OAuthGrantClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *OAuthGrantClient) QueryUser(og *OAuthGrant) *UserQuery
- func (c *OAuthGrantClient) Update() *OAuthGrantUpdate
- func (c *OAuthGrantClient) UpdateOne(og *OAuthGrant) *OAuthGrantUpdateOne
- func (c *OAuthGrantClient) UpdateOneID(id int) *OAuthGrantUpdateOne
- func (c *OAuthGrantClient) Use(hooks ...Hook)
- type OAuthGrantCreate
- func (ogc *OAuthGrantCreate) Exec(ctx context.Context) error
- func (c *OAuthGrantCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ogc *OAuthGrantCreate) ExecX(ctx context.Context)
- func (ogc *OAuthGrantCreate) Mutation() *OAuthGrantMutation
- func (ogc *OAuthGrantCreate) OnConflict(opts ...sql.ConflictOption) *OAuthGrantUpsertOne
- func (ogc *OAuthGrantCreate) OnConflictColumns(columns ...string) *OAuthGrantUpsertOne
- func (c *OAuthGrantCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ogc *OAuthGrantCreate) Save(ctx context.Context) (*OAuthGrant, error)
- func (ogc *OAuthGrantCreate) SaveX(ctx context.Context) *OAuthGrant
- func (ogc *OAuthGrantCreate) SetClient(o *OAuthClient) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetClientID(i int) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetCreatedAt(t time.Time) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetDeletedAt(t time.Time) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetLastUsedAt(t time.Time) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetNillableCreatedAt(t *time.Time) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetNillableDeletedAt(t *time.Time) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetNillableLastUsedAt(t *time.Time) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetNillableUpdatedAt(t *time.Time) *OAuthGrantCreate
- func (m *OAuthGrantCreate) SetRawID(t int) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetScopes(s []string) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetUpdatedAt(t time.Time) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetUser(u *User) *OAuthGrantCreate
- func (ogc *OAuthGrantCreate) SetUserID(i int) *OAuthGrantCreate
- type OAuthGrantCreateBulk
- func (ogcb *OAuthGrantCreateBulk) Exec(ctx context.Context) error
- func (c *OAuthGrantCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ogcb *OAuthGrantCreateBulk) ExecX(ctx context.Context)
- func (ogcb *OAuthGrantCreateBulk) OnConflict(opts ...sql.ConflictOption) *OAuthGrantUpsertBulk
- func (ogcb *OAuthGrantCreateBulk) OnConflictColumns(columns ...string) *OAuthGrantUpsertBulk
- func (c *OAuthGrantCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ogcb *OAuthGrantCreateBulk) Save(ctx context.Context) ([]*OAuthGrant, error)
- func (ogcb *OAuthGrantCreateBulk) SaveX(ctx context.Context) []*OAuthGrant
- type OAuthGrantDelete
- func (ogd *OAuthGrantDelete) Exec(ctx context.Context) (int, error)
- func (c *OAuthGrantDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ogd *OAuthGrantDelete) ExecX(ctx context.Context) int
- func (c *OAuthGrantDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ogd *OAuthGrantDelete) Where(ps ...predicate.OAuthGrant) *OAuthGrantDelete
- type OAuthGrantDeleteOne
- type OAuthGrantEdges
- type OAuthGrantGroupBy
- func (oggb *OAuthGrantGroupBy) Aggregate(fns ...AggregateFunc) *OAuthGrantGroupBy
- func (s *OAuthGrantGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthGrantGroupBy) BoolX(ctx context.Context) bool
- func (s *OAuthGrantGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthGrantGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OAuthGrantGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthGrantGroupBy) Float64X(ctx context.Context) float64
- func (s *OAuthGrantGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthGrantGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OAuthGrantGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthGrantGroupBy) IntX(ctx context.Context) int
- func (s *OAuthGrantGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthGrantGroupBy) IntsX(ctx context.Context) []int
- func (oggb *OAuthGrantGroupBy) Scan(ctx context.Context, v any) error
- func (s *OAuthGrantGroupBy) ScanX(ctx context.Context, v any)
- func (s *OAuthGrantGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OAuthGrantGroupBy) StringX(ctx context.Context) string
- func (s *OAuthGrantGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthGrantGroupBy) StringsX(ctx context.Context) []string
- type OAuthGrantMutation
- func (m *OAuthGrantMutation) AddField(name string, value ent.Value) error
- func (m *OAuthGrantMutation) AddedEdges() []string
- func (m *OAuthGrantMutation) AddedField(name string) (ent.Value, bool)
- func (m *OAuthGrantMutation) AddedFields() []string
- func (m *OAuthGrantMutation) AddedIDs(name string) []ent.Value
- func (m *OAuthGrantMutation) AppendScopes(s []string)
- func (m *OAuthGrantMutation) AppendedScopes() ([]string, bool)
- func (m *OAuthGrantMutation) ClearClient()
- func (m *OAuthGrantMutation) ClearDeletedAt()
- func (m *OAuthGrantMutation) ClearEdge(name string) error
- func (m *OAuthGrantMutation) ClearField(name string) error
- func (m *OAuthGrantMutation) ClearLastUsedAt()
- func (m *OAuthGrantMutation) ClearUser()
- func (m *OAuthGrantMutation) ClearedEdges() []string
- func (m *OAuthGrantMutation) ClearedFields() []string
- func (m OAuthGrantMutation) Client() *Client
- func (m *OAuthGrantMutation) ClientCleared() bool
- func (m *OAuthGrantMutation) ClientID() (r int, exists bool)
- func (m *OAuthGrantMutation) ClientIDs() (ids []int)
- func (m *OAuthGrantMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OAuthGrantMutation) DeletedAt() (r time.Time, exists bool)
- func (m *OAuthGrantMutation) DeletedAtCleared() bool
- func (m *OAuthGrantMutation) EdgeCleared(name string) bool
- func (c *OAuthGrantMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *OAuthGrantMutation) Field(name string) (ent.Value, bool)
- func (m *OAuthGrantMutation) FieldCleared(name string) bool
- func (m *OAuthGrantMutation) Fields() []string
- func (m *OAuthGrantMutation) ID() (id int, exists bool)
- func (m *OAuthGrantMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OAuthGrantMutation) LastUsedAt() (r time.Time, exists bool)
- func (m *OAuthGrantMutation) LastUsedAtCleared() bool
- func (m *OAuthGrantMutation) OldClientID(ctx context.Context) (v int, err error)
- func (m *OAuthGrantMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OAuthGrantMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthGrantMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OAuthGrantMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthGrantMutation) OldScopes(ctx context.Context) (v []string, err error)
- func (m *OAuthGrantMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OAuthGrantMutation) OldUserID(ctx context.Context) (v int, err error)
- func (m *OAuthGrantMutation) Op() Op
- func (c *OAuthGrantMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *OAuthGrantMutation) RemovedEdges() []string
- func (m *OAuthGrantMutation) RemovedIDs(name string) []ent.Value
- func (m *OAuthGrantMutation) ResetClient()
- func (m *OAuthGrantMutation) ResetClientID()
- func (m *OAuthGrantMutation) ResetCreatedAt()
- func (m *OAuthGrantMutation) ResetDeletedAt()
- func (m *OAuthGrantMutation) ResetEdge(name string) error
- func (m *OAuthGrantMutation) ResetField(name string) error
- func (m *OAuthGrantMutation) ResetLastUsedAt()
- func (m *OAuthGrantMutation) ResetScopes()
- func (m *OAuthGrantMutation) ResetUpdatedAt()
- func (m *OAuthGrantMutation) ResetUser()
- func (m *OAuthGrantMutation) ResetUserID()
- func (m *OAuthGrantMutation) Scopes() (r []string, exists bool)
- func (m *OAuthGrantMutation) SetClientID(i int)
- func (m *OAuthGrantMutation) SetCreatedAt(t time.Time)
- func (m *OAuthGrantMutation) SetDeletedAt(t time.Time)
- func (m *OAuthGrantMutation) SetField(name string, value ent.Value) error
- func (m *OAuthGrantMutation) SetLastUsedAt(t time.Time)
- func (m *OAuthGrantMutation) SetOp(op Op)
- func (m *OAuthGrantMutation) SetRawID(t int)
- func (m *OAuthGrantMutation) SetScopes(s []string)
- func (m *OAuthGrantMutation) SetUpdatedAt(t time.Time)
- func (m *OAuthGrantMutation) SetUserID(i int)
- func (m OAuthGrantMutation) Tx() (*Tx, error)
- func (m *OAuthGrantMutation) Type() string
- func (m *OAuthGrantMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OAuthGrantMutation) UserCleared() bool
- func (m *OAuthGrantMutation) UserID() (r int, exists bool)
- func (m *OAuthGrantMutation) UserIDs() (ids []int)
- func (m *OAuthGrantMutation) Where(ps ...predicate.OAuthGrant)
- func (m *OAuthGrantMutation) WhereP(ps ...func(*sql.Selector))
- type OAuthGrantQuery
- func (ogq *OAuthGrantQuery) Aggregate(fns ...AggregateFunc) *OAuthGrantSelect
- func (ogq *OAuthGrantQuery) All(ctx context.Context) ([]*OAuthGrant, error)
- func (ogq *OAuthGrantQuery) AllX(ctx context.Context) []*OAuthGrant
- func (ogq *OAuthGrantQuery) Clone() *OAuthGrantQuery
- func (ogq *OAuthGrantQuery) Count(ctx context.Context) (int, error)
- func (ogq *OAuthGrantQuery) CountX(ctx context.Context) int
- func (c *OAuthGrantQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ogq *OAuthGrantQuery) Exist(ctx context.Context) (bool, error)
- func (ogq *OAuthGrantQuery) ExistX(ctx context.Context) bool
- func (ogq *OAuthGrantQuery) First(ctx context.Context) (*OAuthGrant, error)
- func (ogq *OAuthGrantQuery) FirstID(ctx context.Context) (id int, err error)
- func (ogq *OAuthGrantQuery) FirstIDX(ctx context.Context) int
- func (ogq *OAuthGrantQuery) FirstX(ctx context.Context) *OAuthGrant
- func (ogq *OAuthGrantQuery) GroupBy(field string, fields ...string) *OAuthGrantGroupBy
- func (ogq *OAuthGrantQuery) IDs(ctx context.Context) (ids []int, err error)
- func (ogq *OAuthGrantQuery) IDsX(ctx context.Context) []int
- func (ogq *OAuthGrantQuery) Limit(limit int) *OAuthGrantQuery
- func (ogq *OAuthGrantQuery) Offset(offset int) *OAuthGrantQuery
- func (ogq *OAuthGrantQuery) Only(ctx context.Context) (*OAuthGrant, error)
- func (ogq *OAuthGrantQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ogq *OAuthGrantQuery) OnlyIDX(ctx context.Context) int
- func (ogq *OAuthGrantQuery) OnlyX(ctx context.Context) *OAuthGrant
- func (ogq *OAuthGrantQuery) Order(o ...oauthgrant.OrderOption) *OAuthGrantQuery
- func (ogq *OAuthGrantQuery) QueryClient() *OAuthClientQuery
- func (c *OAuthGrantQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ogq *OAuthGrantQuery) QueryUser() *UserQuery
- func (ogq *OAuthGrantQuery) Select(fields ...string) *OAuthGrantSelect
- func (ogq *OAuthGrantQuery) Unique(unique bool) *OAuthGrantQuery
- func (ogq *OAuthGrantQuery) Where(ps ...predicate.OAuthGrant) *OAuthGrantQuery
- func (ogq *OAuthGrantQuery) WithClient(opts ...func(*OAuthClientQuery)) *OAuthGrantQuery
- func (ogq *OAuthGrantQuery) WithUser(opts ...func(*UserQuery)) *OAuthGrantQuery
- type OAuthGrantSelect
- func (ogs *OAuthGrantSelect) Aggregate(fns ...AggregateFunc) *OAuthGrantSelect
- func (s *OAuthGrantSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthGrantSelect) BoolX(ctx context.Context) bool
- func (s *OAuthGrantSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthGrantSelect) BoolsX(ctx context.Context) []bool
- func (c OAuthGrantSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *OAuthGrantSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthGrantSelect) Float64X(ctx context.Context) float64
- func (s *OAuthGrantSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthGrantSelect) Float64sX(ctx context.Context) []float64
- func (s *OAuthGrantSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthGrantSelect) IntX(ctx context.Context) int
- func (s *OAuthGrantSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthGrantSelect) IntsX(ctx context.Context) []int
- func (c OAuthGrantSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ogs *OAuthGrantSelect) Scan(ctx context.Context, v any) error
- func (s *OAuthGrantSelect) ScanX(ctx context.Context, v any)
- func (s *OAuthGrantSelect) String(ctx context.Context) (_ string, err error)
- func (s *OAuthGrantSelect) StringX(ctx context.Context) string
- func (s *OAuthGrantSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthGrantSelect) StringsX(ctx context.Context) []string
- type OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) AppendScopes(s []string) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) ClearClient() *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) ClearDeletedAt() *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) ClearLastUsedAt() *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) ClearUser() *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) Exec(ctx context.Context) error
- func (c *OAuthGrantUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ogu *OAuthGrantUpdate) ExecX(ctx context.Context)
- func (ogu *OAuthGrantUpdate) Mutation() *OAuthGrantMutation
- func (c *OAuthGrantUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ogu *OAuthGrantUpdate) Save(ctx context.Context) (int, error)
- func (ogu *OAuthGrantUpdate) SaveX(ctx context.Context) int
- func (ogu *OAuthGrantUpdate) SetClient(o *OAuthClient) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetClientID(i int) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetDeletedAt(t time.Time) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetLastUsedAt(t time.Time) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetNillableClientID(i *int) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetNillableDeletedAt(t *time.Time) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetNillableLastUsedAt(t *time.Time) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetNillableUserID(i *int) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetScopes(s []string) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetUpdatedAt(t time.Time) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetUser(u *User) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) SetUserID(i int) *OAuthGrantUpdate
- func (ogu *OAuthGrantUpdate) Where(ps ...predicate.OAuthGrant) *OAuthGrantUpdate
- type OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) AppendScopes(s []string) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) ClearClient() *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) ClearDeletedAt() *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) ClearLastUsedAt() *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) ClearUser() *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) Exec(ctx context.Context) error
- func (c *OAuthGrantUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (oguo *OAuthGrantUpdateOne) ExecX(ctx context.Context)
- func (oguo *OAuthGrantUpdateOne) Mutation() *OAuthGrantMutation
- func (c *OAuthGrantUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (oguo *OAuthGrantUpdateOne) Save(ctx context.Context) (*OAuthGrant, error)
- func (oguo *OAuthGrantUpdateOne) SaveX(ctx context.Context) *OAuthGrant
- func (oguo *OAuthGrantUpdateOne) Select(field string, fields ...string) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetClient(o *OAuthClient) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetClientID(i int) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetDeletedAt(t time.Time) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetLastUsedAt(t time.Time) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetNillableClientID(i *int) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetNillableDeletedAt(t *time.Time) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetNillableLastUsedAt(t *time.Time) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetNillableUserID(i *int) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetScopes(s []string) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetUpdatedAt(t time.Time) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetUser(u *User) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) SetUserID(i int) *OAuthGrantUpdateOne
- func (oguo *OAuthGrantUpdateOne) Where(ps ...predicate.OAuthGrant) *OAuthGrantUpdateOne
- type OAuthGrantUpsert
- func (u *OAuthGrantUpsert) ClearDeletedAt() *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) ClearLastUsedAt() *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) SetClientID(v int) *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) SetDeletedAt(v time.Time) *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) SetLastUsedAt(v time.Time) *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) SetScopes(v []string) *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) SetUpdatedAt(v time.Time) *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) SetUserID(v int) *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) UpdateClientID() *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) UpdateDeletedAt() *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) UpdateLastUsedAt() *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) UpdateScopes() *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) UpdateUpdatedAt() *OAuthGrantUpsert
- func (u *OAuthGrantUpsert) UpdateUserID() *OAuthGrantUpsert
- type OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) ClearDeletedAt() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) ClearLastUsedAt() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) DoNothing() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) Exec(ctx context.Context) error
- func (u *OAuthGrantUpsertBulk) ExecX(ctx context.Context)
- func (u *OAuthGrantUpsertBulk) Ignore() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) SetClientID(v int) *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) SetDeletedAt(v time.Time) *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) SetLastUsedAt(v time.Time) *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) SetScopes(v []string) *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) SetUpdatedAt(v time.Time) *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) SetUserID(v int) *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) Update(set func(*OAuthGrantUpsert)) *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) UpdateClientID() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) UpdateDeletedAt() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) UpdateLastUsedAt() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) UpdateNewValues() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) UpdateScopes() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) UpdateUpdatedAt() *OAuthGrantUpsertBulk
- func (u *OAuthGrantUpsertBulk) UpdateUserID() *OAuthGrantUpsertBulk
- type OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) ClearDeletedAt() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) ClearLastUsedAt() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) DoNothing() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) Exec(ctx context.Context) error
- func (u *OAuthGrantUpsertOne) ExecX(ctx context.Context)
- func (u *OAuthGrantUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *OAuthGrantUpsertOne) IDX(ctx context.Context) int
- func (u *OAuthGrantUpsertOne) Ignore() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) SetClientID(v int) *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) SetDeletedAt(v time.Time) *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) SetLastUsedAt(v time.Time) *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) SetScopes(v []string) *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) SetUpdatedAt(v time.Time) *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) SetUserID(v int) *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) Update(set func(*OAuthGrantUpsert)) *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) UpdateClientID() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) UpdateDeletedAt() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) UpdateLastUsedAt() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) UpdateNewValues() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) UpdateScopes() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) UpdateUpdatedAt() *OAuthGrantUpsertOne
- func (u *OAuthGrantUpsertOne) UpdateUserID() *OAuthGrantUpsertOne
- type OAuthGrants
- type Op
- type Option
- type OrderFunc
- type Passkey
- func (c *Passkey) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Passkey) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pa *Passkey) QueryUser() *UserQuery
- func (e *Passkey) SetUser(v *User)
- func (pa *Passkey) String() string
- func (pa *Passkey) Unwrap() *Passkey
- func (pa *Passkey) Update() *PasskeyUpdateOne
- func (pa *Passkey) Value(name string) (ent.Value, error)
- type PasskeyClient
- func (c *PasskeyClient) Create() *PasskeyCreate
- func (c *PasskeyClient) CreateBulk(builders ...*PasskeyCreate) *PasskeyCreateBulk
- func (c *PasskeyClient) Delete() *PasskeyDelete
- func (c *PasskeyClient) DeleteOne(pa *Passkey) *PasskeyDeleteOne
- func (c *PasskeyClient) DeleteOneID(id int) *PasskeyDeleteOne
- func (c *PasskeyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *PasskeyClient) Get(ctx context.Context, id int) (*Passkey, error)
- func (c *PasskeyClient) GetX(ctx context.Context, id int) *Passkey
- func (c *PasskeyClient) Hooks() []Hook
- func (c *PasskeyClient) Intercept(interceptors ...Interceptor)
- func (c *PasskeyClient) Interceptors() []Interceptor
- func (c *PasskeyClient) MapCreateBulk(slice any, setFunc func(*PasskeyCreate, int)) *PasskeyCreateBulk
- func (c *PasskeyClient) Query() *PasskeyQuery
- func (c *PasskeyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *PasskeyClient) QueryUser(pa *Passkey) *UserQuery
- func (c *PasskeyClient) Update() *PasskeyUpdate
- func (c *PasskeyClient) UpdateOne(pa *Passkey) *PasskeyUpdateOne
- func (c *PasskeyClient) UpdateOneID(id int) *PasskeyUpdateOne
- func (c *PasskeyClient) Use(hooks ...Hook)
- type PasskeyCreate
- func (pc *PasskeyCreate) Exec(ctx context.Context) error
- func (c *PasskeyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pc *PasskeyCreate) ExecX(ctx context.Context)
- func (pc *PasskeyCreate) Mutation() *PasskeyMutation
- func (pc *PasskeyCreate) OnConflict(opts ...sql.ConflictOption) *PasskeyUpsertOne
- func (pc *PasskeyCreate) OnConflictColumns(columns ...string) *PasskeyUpsertOne
- func (c *PasskeyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pc *PasskeyCreate) Save(ctx context.Context) (*Passkey, error)
- func (pc *PasskeyCreate) SaveX(ctx context.Context) *Passkey
- func (pc *PasskeyCreate) SetCreatedAt(t time.Time) *PasskeyCreate
- func (pc *PasskeyCreate) SetCredential(w *webauthn.Credential) *PasskeyCreate
- func (pc *PasskeyCreate) SetCredentialID(s string) *PasskeyCreate
- func (pc *PasskeyCreate) SetDeletedAt(t time.Time) *PasskeyCreate
- func (pc *PasskeyCreate) SetName(s string) *PasskeyCreate
- func (pc *PasskeyCreate) SetNillableCreatedAt(t *time.Time) *PasskeyCreate
- func (pc *PasskeyCreate) SetNillableDeletedAt(t *time.Time) *PasskeyCreate
- func (pc *PasskeyCreate) SetNillableUpdatedAt(t *time.Time) *PasskeyCreate
- func (pc *PasskeyCreate) SetNillableUsedAt(t *time.Time) *PasskeyCreate
- func (m *PasskeyCreate) SetRawID(t int) *PasskeyCreate
- func (pc *PasskeyCreate) SetUpdatedAt(t time.Time) *PasskeyCreate
- func (pc *PasskeyCreate) SetUsedAt(t time.Time) *PasskeyCreate
- func (pc *PasskeyCreate) SetUser(u *User) *PasskeyCreate
- func (pc *PasskeyCreate) SetUserID(i int) *PasskeyCreate
- type PasskeyCreateBulk
- func (pcb *PasskeyCreateBulk) Exec(ctx context.Context) error
- func (c *PasskeyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pcb *PasskeyCreateBulk) ExecX(ctx context.Context)
- func (pcb *PasskeyCreateBulk) OnConflict(opts ...sql.ConflictOption) *PasskeyUpsertBulk
- func (pcb *PasskeyCreateBulk) OnConflictColumns(columns ...string) *PasskeyUpsertBulk
- func (c *PasskeyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pcb *PasskeyCreateBulk) Save(ctx context.Context) ([]*Passkey, error)
- func (pcb *PasskeyCreateBulk) SaveX(ctx context.Context) []*Passkey
- type PasskeyDelete
- func (pd *PasskeyDelete) Exec(ctx context.Context) (int, error)
- func (c *PasskeyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pd *PasskeyDelete) ExecX(ctx context.Context) int
- func (c *PasskeyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pd *PasskeyDelete) Where(ps ...predicate.Passkey) *PasskeyDelete
- type PasskeyDeleteOne
- type PasskeyEdges
- type PasskeyGroupBy
- func (pgb *PasskeyGroupBy) Aggregate(fns ...AggregateFunc) *PasskeyGroupBy
- func (s *PasskeyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PasskeyGroupBy) BoolX(ctx context.Context) bool
- func (s *PasskeyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PasskeyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PasskeyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PasskeyGroupBy) Float64X(ctx context.Context) float64
- func (s *PasskeyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PasskeyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PasskeyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PasskeyGroupBy) IntX(ctx context.Context) int
- func (s *PasskeyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PasskeyGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PasskeyGroupBy) Scan(ctx context.Context, v any) error
- func (s *PasskeyGroupBy) ScanX(ctx context.Context, v any)
- func (s *PasskeyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PasskeyGroupBy) StringX(ctx context.Context) string
- func (s *PasskeyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PasskeyGroupBy) StringsX(ctx context.Context) []string
- type PasskeyMutation
- func (m *PasskeyMutation) AddField(name string, value ent.Value) error
- func (m *PasskeyMutation) AddedEdges() []string
- func (m *PasskeyMutation) AddedField(name string) (ent.Value, bool)
- func (m *PasskeyMutation) AddedFields() []string
- func (m *PasskeyMutation) AddedIDs(name string) []ent.Value
- func (m *PasskeyMutation) ClearDeletedAt()
- func (m *PasskeyMutation) ClearEdge(name string) error
- func (m *PasskeyMutation) ClearField(name string) error
- func (m *PasskeyMutation) ClearUsedAt()
- func (m *PasskeyMutation) ClearUser()
- func (m *PasskeyMutation) ClearedEdges() []string
- func (m *PasskeyMutation) ClearedFields() []string
- func (m PasskeyMutation) Client() *Client
- func (m *PasskeyMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PasskeyMutation) Credential() (r *webauthn.Credential, exists bool)
- func (m *PasskeyMutation) CredentialID() (r string, exists bool)
- func (m *PasskeyMutation) DeletedAt() (r time.Time, exists bool)
- func (m *PasskeyMutation) DeletedAtCleared() bool
- func (m *PasskeyMutation) EdgeCleared(name string) bool
- func (c *PasskeyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *PasskeyMutation) Field(name string) (ent.Value, bool)
- func (m *PasskeyMutation) FieldCleared(name string) bool
- func (m *PasskeyMutation) Fields() []string
- func (m *PasskeyMutation) ID() (id int, exists bool)
- func (m *PasskeyMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PasskeyMutation) Name() (r string, exists bool)
- func (m *PasskeyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PasskeyMutation) OldCredential(ctx context.Context) (v *webauthn.Credential, err error)
- func (m *PasskeyMutation) OldCredentialID(ctx context.Context) (v string, err error)
- func (m *PasskeyMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PasskeyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PasskeyMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PasskeyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PasskeyMutation) OldUsedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PasskeyMutation) OldUserID(ctx context.Context) (v int, err error)
- func (m *PasskeyMutation) Op() Op
- func (c *PasskeyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *PasskeyMutation) RemovedEdges() []string
- func (m *PasskeyMutation) RemovedIDs(name string) []ent.Value
- func (m *PasskeyMutation) ResetCreatedAt()
- func (m *PasskeyMutation) ResetCredential()
- func (m *PasskeyMutation) ResetCredentialID()
- func (m *PasskeyMutation) ResetDeletedAt()
- func (m *PasskeyMutation) ResetEdge(name string) error
- func (m *PasskeyMutation) ResetField(name string) error
- func (m *PasskeyMutation) ResetName()
- func (m *PasskeyMutation) ResetUpdatedAt()
- func (m *PasskeyMutation) ResetUsedAt()
- func (m *PasskeyMutation) ResetUser()
- func (m *PasskeyMutation) ResetUserID()
- func (m *PasskeyMutation) SetCreatedAt(t time.Time)
- func (m *PasskeyMutation) SetCredential(w *webauthn.Credential)
- func (m *PasskeyMutation) SetCredentialID(s string)
- func (m *PasskeyMutation) SetDeletedAt(t time.Time)
- func (m *PasskeyMutation) SetField(name string, value ent.Value) error
- func (m *PasskeyMutation) SetName(s string)
- func (m *PasskeyMutation) SetOp(op Op)
- func (m *PasskeyMutation) SetRawID(t int)
- func (m *PasskeyMutation) SetUpdatedAt(t time.Time)
- func (m *PasskeyMutation) SetUsedAt(t time.Time)
- func (m *PasskeyMutation) SetUserID(i int)
- func (m PasskeyMutation) Tx() (*Tx, error)
- func (m *PasskeyMutation) Type() string
- func (m *PasskeyMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PasskeyMutation) UsedAt() (r time.Time, exists bool)
- func (m *PasskeyMutation) UsedAtCleared() bool
- func (m *PasskeyMutation) UserCleared() bool
- func (m *PasskeyMutation) UserID() (r int, exists bool)
- func (m *PasskeyMutation) UserIDs() (ids []int)
- func (m *PasskeyMutation) Where(ps ...predicate.Passkey)
- func (m *PasskeyMutation) WhereP(ps ...func(*sql.Selector))
- type PasskeyQuery
- func (pq *PasskeyQuery) Aggregate(fns ...AggregateFunc) *PasskeySelect
- func (pq *PasskeyQuery) All(ctx context.Context) ([]*Passkey, error)
- func (pq *PasskeyQuery) AllX(ctx context.Context) []*Passkey
- func (pq *PasskeyQuery) Clone() *PasskeyQuery
- func (pq *PasskeyQuery) Count(ctx context.Context) (int, error)
- func (pq *PasskeyQuery) CountX(ctx context.Context) int
- func (c *PasskeyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pq *PasskeyQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PasskeyQuery) ExistX(ctx context.Context) bool
- func (pq *PasskeyQuery) First(ctx context.Context) (*Passkey, error)
- func (pq *PasskeyQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PasskeyQuery) FirstIDX(ctx context.Context) int
- func (pq *PasskeyQuery) FirstX(ctx context.Context) *Passkey
- func (pq *PasskeyQuery) GroupBy(field string, fields ...string) *PasskeyGroupBy
- func (pq *PasskeyQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *PasskeyQuery) IDsX(ctx context.Context) []int
- func (pq *PasskeyQuery) Limit(limit int) *PasskeyQuery
- func (pq *PasskeyQuery) Offset(offset int) *PasskeyQuery
- func (pq *PasskeyQuery) Only(ctx context.Context) (*Passkey, error)
- func (pq *PasskeyQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PasskeyQuery) OnlyIDX(ctx context.Context) int
- func (pq *PasskeyQuery) OnlyX(ctx context.Context) *Passkey
- func (pq *PasskeyQuery) Order(o ...passkey.OrderOption) *PasskeyQuery
- func (c *PasskeyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pq *PasskeyQuery) QueryUser() *UserQuery
- func (pq *PasskeyQuery) Select(fields ...string) *PasskeySelect
- func (pq *PasskeyQuery) Unique(unique bool) *PasskeyQuery
- func (pq *PasskeyQuery) Where(ps ...predicate.Passkey) *PasskeyQuery
- func (pq *PasskeyQuery) WithUser(opts ...func(*UserQuery)) *PasskeyQuery
- type PasskeySelect
- func (ps *PasskeySelect) Aggregate(fns ...AggregateFunc) *PasskeySelect
- func (s *PasskeySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PasskeySelect) BoolX(ctx context.Context) bool
- func (s *PasskeySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PasskeySelect) BoolsX(ctx context.Context) []bool
- func (c PasskeySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *PasskeySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PasskeySelect) Float64X(ctx context.Context) float64
- func (s *PasskeySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PasskeySelect) Float64sX(ctx context.Context) []float64
- func (s *PasskeySelect) Int(ctx context.Context) (_ int, err error)
- func (s *PasskeySelect) IntX(ctx context.Context) int
- func (s *PasskeySelect) Ints(ctx context.Context) ([]int, error)
- func (s *PasskeySelect) IntsX(ctx context.Context) []int
- func (c PasskeySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ps *PasskeySelect) Scan(ctx context.Context, v any) error
- func (s *PasskeySelect) ScanX(ctx context.Context, v any)
- func (s *PasskeySelect) String(ctx context.Context) (_ string, err error)
- func (s *PasskeySelect) StringX(ctx context.Context) string
- func (s *PasskeySelect) Strings(ctx context.Context) ([]string, error)
- func (s *PasskeySelect) StringsX(ctx context.Context) []string
- type PasskeyUpdate
- func (pu *PasskeyUpdate) ClearDeletedAt() *PasskeyUpdate
- func (pu *PasskeyUpdate) ClearUsedAt() *PasskeyUpdate
- func (pu *PasskeyUpdate) ClearUser() *PasskeyUpdate
- func (pu *PasskeyUpdate) Exec(ctx context.Context) error
- func (c *PasskeyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pu *PasskeyUpdate) ExecX(ctx context.Context)
- func (pu *PasskeyUpdate) Mutation() *PasskeyMutation
- func (c *PasskeyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pu *PasskeyUpdate) Save(ctx context.Context) (int, error)
- func (pu *PasskeyUpdate) SaveX(ctx context.Context) int
- func (pu *PasskeyUpdate) SetCredential(w *webauthn.Credential) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetCredentialID(s string) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetDeletedAt(t time.Time) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetName(s string) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetNillableCredentialID(s *string) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetNillableDeletedAt(t *time.Time) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetNillableName(s *string) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetNillableUsedAt(t *time.Time) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetNillableUserID(i *int) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetUpdatedAt(t time.Time) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetUsedAt(t time.Time) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetUser(u *User) *PasskeyUpdate
- func (pu *PasskeyUpdate) SetUserID(i int) *PasskeyUpdate
- func (pu *PasskeyUpdate) Where(ps ...predicate.Passkey) *PasskeyUpdate
- type PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) ClearDeletedAt() *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) ClearUsedAt() *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) ClearUser() *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) Exec(ctx context.Context) error
- func (c *PasskeyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (puo *PasskeyUpdateOne) ExecX(ctx context.Context)
- func (puo *PasskeyUpdateOne) Mutation() *PasskeyMutation
- func (c *PasskeyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (puo *PasskeyUpdateOne) Save(ctx context.Context) (*Passkey, error)
- func (puo *PasskeyUpdateOne) SaveX(ctx context.Context) *Passkey
- func (puo *PasskeyUpdateOne) Select(field string, fields ...string) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetCredential(w *webauthn.Credential) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetCredentialID(s string) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetDeletedAt(t time.Time) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetName(s string) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetNillableCredentialID(s *string) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetNillableDeletedAt(t *time.Time) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetNillableName(s *string) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetNillableUsedAt(t *time.Time) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetNillableUserID(i *int) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetUpdatedAt(t time.Time) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetUsedAt(t time.Time) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetUser(u *User) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) SetUserID(i int) *PasskeyUpdateOne
- func (puo *PasskeyUpdateOne) Where(ps ...predicate.Passkey) *PasskeyUpdateOne
- type PasskeyUpsert
- func (u *PasskeyUpsert) ClearDeletedAt() *PasskeyUpsert
- func (u *PasskeyUpsert) ClearUsedAt() *PasskeyUpsert
- func (u *PasskeyUpsert) SetCredential(v *webauthn.Credential) *PasskeyUpsert
- func (u *PasskeyUpsert) SetCredentialID(v string) *PasskeyUpsert
- func (u *PasskeyUpsert) SetDeletedAt(v time.Time) *PasskeyUpsert
- func (u *PasskeyUpsert) SetName(v string) *PasskeyUpsert
- func (u *PasskeyUpsert) SetUpdatedAt(v time.Time) *PasskeyUpsert
- func (u *PasskeyUpsert) SetUsedAt(v time.Time) *PasskeyUpsert
- func (u *PasskeyUpsert) SetUserID(v int) *PasskeyUpsert
- func (u *PasskeyUpsert) UpdateCredential() *PasskeyUpsert
- func (u *PasskeyUpsert) UpdateCredentialID() *PasskeyUpsert
- func (u *PasskeyUpsert) UpdateDeletedAt() *PasskeyUpsert
- func (u *PasskeyUpsert) UpdateName() *PasskeyUpsert
- func (u *PasskeyUpsert) UpdateUpdatedAt() *PasskeyUpsert
- func (u *PasskeyUpsert) UpdateUsedAt() *PasskeyUpsert
- func (u *PasskeyUpsert) UpdateUserID() *PasskeyUpsert
- type PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) ClearDeletedAt() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) ClearUsedAt() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) DoNothing() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) Exec(ctx context.Context) error
- func (u *PasskeyUpsertBulk) ExecX(ctx context.Context)
- func (u *PasskeyUpsertBulk) Ignore() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) SetCredential(v *webauthn.Credential) *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) SetCredentialID(v string) *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) SetDeletedAt(v time.Time) *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) SetName(v string) *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) SetUpdatedAt(v time.Time) *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) SetUsedAt(v time.Time) *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) SetUserID(v int) *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) Update(set func(*PasskeyUpsert)) *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) UpdateCredential() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) UpdateCredentialID() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) UpdateDeletedAt() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) UpdateName() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) UpdateNewValues() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) UpdateUpdatedAt() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) UpdateUsedAt() *PasskeyUpsertBulk
- func (u *PasskeyUpsertBulk) UpdateUserID() *PasskeyUpsertBulk
- type PasskeyUpsertOne
- func (u *PasskeyUpsertOne) ClearDeletedAt() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) ClearUsedAt() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) DoNothing() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) Exec(ctx context.Context) error
- func (u *PasskeyUpsertOne) ExecX(ctx context.Context)
- func (u *PasskeyUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *PasskeyUpsertOne) IDX(ctx context.Context) int
- func (u *PasskeyUpsertOne) Ignore() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) SetCredential(v *webauthn.Credential) *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) SetCredentialID(v string) *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) SetDeletedAt(v time.Time) *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) SetName(v string) *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) SetUpdatedAt(v time.Time) *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) SetUsedAt(v time.Time) *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) SetUserID(v int) *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) Update(set func(*PasskeyUpsert)) *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) UpdateCredential() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) UpdateCredentialID() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) UpdateDeletedAt() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) UpdateName() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) UpdateNewValues() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) UpdateUpdatedAt() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) UpdateUsedAt() *PasskeyUpsertOne
- func (u *PasskeyUpsertOne) UpdateUserID() *PasskeyUpsertOne
- type Passkeys
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Setting
- func (c *Setting) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *Setting) GetValue(name string) (ent.Value, error)
- func (c *Setting) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (s *Setting) String() string
- func (s *Setting) Unwrap() *Setting
- func (s *Setting) Update() *SettingUpdateOne
- type SettingClient
- func (c *SettingClient) Create() *SettingCreate
- func (c *SettingClient) CreateBulk(builders ...*SettingCreate) *SettingCreateBulk
- func (c *SettingClient) Delete() *SettingDelete
- func (c *SettingClient) DeleteOne(s *Setting) *SettingDeleteOne
- func (c *SettingClient) DeleteOneID(id int) *SettingDeleteOne
- func (c *SettingClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *SettingClient) Get(ctx context.Context, id int) (*Setting, error)
- func (c *SettingClient) GetX(ctx context.Context, id int) *Setting
- func (c *SettingClient) Hooks() []Hook
- func (c *SettingClient) Intercept(interceptors ...Interceptor)
- func (c *SettingClient) Interceptors() []Interceptor
- func (c *SettingClient) MapCreateBulk(slice any, setFunc func(*SettingCreate, int)) *SettingCreateBulk
- func (c *SettingClient) Query() *SettingQuery
- func (c *SettingClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *SettingClient) Update() *SettingUpdate
- func (c *SettingClient) UpdateOne(s *Setting) *SettingUpdateOne
- func (c *SettingClient) UpdateOneID(id int) *SettingUpdateOne
- func (c *SettingClient) Use(hooks ...Hook)
- type SettingCreate
- func (sc *SettingCreate) Exec(ctx context.Context) error
- func (c *SettingCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sc *SettingCreate) ExecX(ctx context.Context)
- func (sc *SettingCreate) Mutation() *SettingMutation
- func (sc *SettingCreate) OnConflict(opts ...sql.ConflictOption) *SettingUpsertOne
- func (sc *SettingCreate) OnConflictColumns(columns ...string) *SettingUpsertOne
- func (c *SettingCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sc *SettingCreate) Save(ctx context.Context) (*Setting, error)
- func (sc *SettingCreate) SaveX(ctx context.Context) *Setting
- func (sc *SettingCreate) SetCreatedAt(t time.Time) *SettingCreate
- func (sc *SettingCreate) SetDeletedAt(t time.Time) *SettingCreate
- func (sc *SettingCreate) SetName(s string) *SettingCreate
- func (sc *SettingCreate) SetNillableCreatedAt(t *time.Time) *SettingCreate
- func (sc *SettingCreate) SetNillableDeletedAt(t *time.Time) *SettingCreate
- func (sc *SettingCreate) SetNillableUpdatedAt(t *time.Time) *SettingCreate
- func (sc *SettingCreate) SetNillableValue(s *string) *SettingCreate
- func (m *SettingCreate) SetRawID(t int) *SettingCreate
- func (sc *SettingCreate) SetUpdatedAt(t time.Time) *SettingCreate
- func (sc *SettingCreate) SetValue(s string) *SettingCreate
- type SettingCreateBulk
- func (scb *SettingCreateBulk) Exec(ctx context.Context) error
- func (c *SettingCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (scb *SettingCreateBulk) ExecX(ctx context.Context)
- func (scb *SettingCreateBulk) OnConflict(opts ...sql.ConflictOption) *SettingUpsertBulk
- func (scb *SettingCreateBulk) OnConflictColumns(columns ...string) *SettingUpsertBulk
- func (c *SettingCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (scb *SettingCreateBulk) Save(ctx context.Context) ([]*Setting, error)
- func (scb *SettingCreateBulk) SaveX(ctx context.Context) []*Setting
- type SettingDelete
- func (sd *SettingDelete) Exec(ctx context.Context) (int, error)
- func (c *SettingDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sd *SettingDelete) ExecX(ctx context.Context) int
- func (c *SettingDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sd *SettingDelete) Where(ps ...predicate.Setting) *SettingDelete
- type SettingDeleteOne
- type SettingGroupBy
- func (sgb *SettingGroupBy) Aggregate(fns ...AggregateFunc) *SettingGroupBy
- func (s *SettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SettingGroupBy) BoolX(ctx context.Context) bool
- func (s *SettingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SettingGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SettingGroupBy) Float64X(ctx context.Context) float64
- func (s *SettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SettingGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SettingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SettingGroupBy) IntX(ctx context.Context) int
- func (s *SettingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SettingGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SettingGroupBy) Scan(ctx context.Context, v any) error
- func (s *SettingGroupBy) ScanX(ctx context.Context, v any)
- func (s *SettingGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SettingGroupBy) StringX(ctx context.Context) string
- func (s *SettingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SettingGroupBy) StringsX(ctx context.Context) []string
- type SettingMutation
- func (m *SettingMutation) AddField(name string, value ent.Value) error
- func (m *SettingMutation) AddedEdges() []string
- func (m *SettingMutation) AddedField(name string) (ent.Value, bool)
- func (m *SettingMutation) AddedFields() []string
- func (m *SettingMutation) AddedIDs(name string) []ent.Value
- func (m *SettingMutation) ClearDeletedAt()
- func (m *SettingMutation) ClearEdge(name string) error
- func (m *SettingMutation) ClearField(name string) error
- func (m *SettingMutation) ClearValue()
- func (m *SettingMutation) ClearedEdges() []string
- func (m *SettingMutation) ClearedFields() []string
- func (m SettingMutation) Client() *Client
- func (m *SettingMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SettingMutation) DeletedAt() (r time.Time, exists bool)
- func (m *SettingMutation) DeletedAtCleared() bool
- func (m *SettingMutation) EdgeCleared(name string) bool
- func (c *SettingMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *SettingMutation) Field(name string) (ent.Value, bool)
- func (m *SettingMutation) FieldCleared(name string) bool
- func (m *SettingMutation) Fields() []string
- func (m *SettingMutation) ID() (id int, exists bool)
- func (m *SettingMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SettingMutation) Name() (r string, exists bool)
- func (m *SettingMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SettingMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *SettingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SettingMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SettingMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SettingMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *SettingMutation) Op() Op
- func (c *SettingMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *SettingMutation) RemovedEdges() []string
- func (m *SettingMutation) RemovedIDs(name string) []ent.Value
- func (m *SettingMutation) ResetCreatedAt()
- func (m *SettingMutation) ResetDeletedAt()
- func (m *SettingMutation) ResetEdge(name string) error
- func (m *SettingMutation) ResetField(name string) error
- func (m *SettingMutation) ResetName()
- func (m *SettingMutation) ResetUpdatedAt()
- func (m *SettingMutation) ResetValue()
- func (m *SettingMutation) SetCreatedAt(t time.Time)
- func (m *SettingMutation) SetDeletedAt(t time.Time)
- func (m *SettingMutation) SetField(name string, value ent.Value) error
- func (m *SettingMutation) SetName(s string)
- func (m *SettingMutation) SetOp(op Op)
- func (m *SettingMutation) SetRawID(t int)
- func (m *SettingMutation) SetUpdatedAt(t time.Time)
- func (m *SettingMutation) SetValue(s string)
- func (m SettingMutation) Tx() (*Tx, error)
- func (m *SettingMutation) Type() string
- func (m *SettingMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SettingMutation) Value() (r string, exists bool)
- func (m *SettingMutation) ValueCleared() bool
- func (m *SettingMutation) Where(ps ...predicate.Setting)
- func (m *SettingMutation) WhereP(ps ...func(*sql.Selector))
- type SettingQuery
- func (sq *SettingQuery) Aggregate(fns ...AggregateFunc) *SettingSelect
- func (sq *SettingQuery) All(ctx context.Context) ([]*Setting, error)
- func (sq *SettingQuery) AllX(ctx context.Context) []*Setting
- func (sq *SettingQuery) Clone() *SettingQuery
- func (sq *SettingQuery) Count(ctx context.Context) (int, error)
- func (sq *SettingQuery) CountX(ctx context.Context) int
- func (c *SettingQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sq *SettingQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SettingQuery) ExistX(ctx context.Context) bool
- func (sq *SettingQuery) First(ctx context.Context) (*Setting, error)
- func (sq *SettingQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *SettingQuery) FirstIDX(ctx context.Context) int
- func (sq *SettingQuery) FirstX(ctx context.Context) *Setting
- func (sq *SettingQuery) GroupBy(field string, fields ...string) *SettingGroupBy
- func (sq *SettingQuery) IDs(ctx context.Context) (ids []int, err error)
- func (sq *SettingQuery) IDsX(ctx context.Context) []int
- func (sq *SettingQuery) Limit(limit int) *SettingQuery
- func (sq *SettingQuery) Offset(offset int) *SettingQuery
- func (sq *SettingQuery) Only(ctx context.Context) (*Setting, error)
- func (sq *SettingQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *SettingQuery) OnlyIDX(ctx context.Context) int
- func (sq *SettingQuery) OnlyX(ctx context.Context) *Setting
- func (sq *SettingQuery) Order(o ...setting.OrderOption) *SettingQuery
- func (c *SettingQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sq *SettingQuery) Select(fields ...string) *SettingSelect
- func (sq *SettingQuery) Unique(unique bool) *SettingQuery
- func (sq *SettingQuery) Where(ps ...predicate.Setting) *SettingQuery
- type SettingSelect
- func (ss *SettingSelect) Aggregate(fns ...AggregateFunc) *SettingSelect
- func (s *SettingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SettingSelect) BoolX(ctx context.Context) bool
- func (s *SettingSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SettingSelect) BoolsX(ctx context.Context) []bool
- func (c SettingSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *SettingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SettingSelect) Float64X(ctx context.Context) float64
- func (s *SettingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SettingSelect) Float64sX(ctx context.Context) []float64
- func (s *SettingSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SettingSelect) IntX(ctx context.Context) int
- func (s *SettingSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SettingSelect) IntsX(ctx context.Context) []int
- func (c SettingSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ss *SettingSelect) Scan(ctx context.Context, v any) error
- func (s *SettingSelect) ScanX(ctx context.Context, v any)
- func (s *SettingSelect) String(ctx context.Context) (_ string, err error)
- func (s *SettingSelect) StringX(ctx context.Context) string
- func (s *SettingSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SettingSelect) StringsX(ctx context.Context) []string
- type SettingUpdate
- func (su *SettingUpdate) ClearDeletedAt() *SettingUpdate
- func (su *SettingUpdate) ClearValue() *SettingUpdate
- func (su *SettingUpdate) Exec(ctx context.Context) error
- func (c *SettingUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (su *SettingUpdate) ExecX(ctx context.Context)
- func (su *SettingUpdate) Mutation() *SettingMutation
- func (c *SettingUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (su *SettingUpdate) Save(ctx context.Context) (int, error)
- func (su *SettingUpdate) SaveX(ctx context.Context) int
- func (su *SettingUpdate) SetDeletedAt(t time.Time) *SettingUpdate
- func (su *SettingUpdate) SetName(s string) *SettingUpdate
- func (su *SettingUpdate) SetNillableDeletedAt(t *time.Time) *SettingUpdate
- func (su *SettingUpdate) SetNillableName(s *string) *SettingUpdate
- func (su *SettingUpdate) SetNillableValue(s *string) *SettingUpdate
- func (su *SettingUpdate) SetUpdatedAt(t time.Time) *SettingUpdate
- func (su *SettingUpdate) SetValue(s string) *SettingUpdate
- func (su *SettingUpdate) Where(ps ...predicate.Setting) *SettingUpdate
- type SettingUpdateOne
- func (suo *SettingUpdateOne) ClearDeletedAt() *SettingUpdateOne
- func (suo *SettingUpdateOne) ClearValue() *SettingUpdateOne
- func (suo *SettingUpdateOne) Exec(ctx context.Context) error
- func (c *SettingUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (suo *SettingUpdateOne) ExecX(ctx context.Context)
- func (suo *SettingUpdateOne) Mutation() *SettingMutation
- func (c *SettingUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (suo *SettingUpdateOne) Save(ctx context.Context) (*Setting, error)
- func (suo *SettingUpdateOne) SaveX(ctx context.Context) *Setting
- func (suo *SettingUpdateOne) Select(field string, fields ...string) *SettingUpdateOne
- func (suo *SettingUpdateOne) SetDeletedAt(t time.Time) *SettingUpdateOne
- func (suo *SettingUpdateOne) SetName(s string) *SettingUpdateOne
- func (suo *SettingUpdateOne) SetNillableDeletedAt(t *time.Time) *SettingUpdateOne
- func (suo *SettingUpdateOne) SetNillableName(s *string) *SettingUpdateOne
- func (suo *SettingUpdateOne) SetNillableValue(s *string) *SettingUpdateOne
- func (suo *SettingUpdateOne) SetUpdatedAt(t time.Time) *SettingUpdateOne
- func (suo *SettingUpdateOne) SetValue(s string) *SettingUpdateOne
- func (suo *SettingUpdateOne) Where(ps ...predicate.Setting) *SettingUpdateOne
- type SettingUpsert
- func (u *SettingUpsert) ClearDeletedAt() *SettingUpsert
- func (u *SettingUpsert) ClearValue() *SettingUpsert
- func (u *SettingUpsert) SetDeletedAt(v time.Time) *SettingUpsert
- func (u *SettingUpsert) SetName(v string) *SettingUpsert
- func (u *SettingUpsert) SetUpdatedAt(v time.Time) *SettingUpsert
- func (u *SettingUpsert) SetValue(v string) *SettingUpsert
- func (u *SettingUpsert) UpdateDeletedAt() *SettingUpsert
- func (u *SettingUpsert) UpdateName() *SettingUpsert
- func (u *SettingUpsert) UpdateUpdatedAt() *SettingUpsert
- func (u *SettingUpsert) UpdateValue() *SettingUpsert
- type SettingUpsertBulk
- func (u *SettingUpsertBulk) ClearDeletedAt() *SettingUpsertBulk
- func (u *SettingUpsertBulk) ClearValue() *SettingUpsertBulk
- func (u *SettingUpsertBulk) DoNothing() *SettingUpsertBulk
- func (u *SettingUpsertBulk) Exec(ctx context.Context) error
- func (u *SettingUpsertBulk) ExecX(ctx context.Context)
- func (u *SettingUpsertBulk) Ignore() *SettingUpsertBulk
- func (u *SettingUpsertBulk) SetDeletedAt(v time.Time) *SettingUpsertBulk
- func (u *SettingUpsertBulk) SetName(v string) *SettingUpsertBulk
- func (u *SettingUpsertBulk) SetUpdatedAt(v time.Time) *SettingUpsertBulk
- func (u *SettingUpsertBulk) SetValue(v string) *SettingUpsertBulk
- func (u *SettingUpsertBulk) Update(set func(*SettingUpsert)) *SettingUpsertBulk
- func (u *SettingUpsertBulk) UpdateDeletedAt() *SettingUpsertBulk
- func (u *SettingUpsertBulk) UpdateName() *SettingUpsertBulk
- func (u *SettingUpsertBulk) UpdateNewValues() *SettingUpsertBulk
- func (u *SettingUpsertBulk) UpdateUpdatedAt() *SettingUpsertBulk
- func (u *SettingUpsertBulk) UpdateValue() *SettingUpsertBulk
- type SettingUpsertOne
- func (u *SettingUpsertOne) ClearDeletedAt() *SettingUpsertOne
- func (u *SettingUpsertOne) ClearValue() *SettingUpsertOne
- func (u *SettingUpsertOne) DoNothing() *SettingUpsertOne
- func (u *SettingUpsertOne) Exec(ctx context.Context) error
- func (u *SettingUpsertOne) ExecX(ctx context.Context)
- func (u *SettingUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *SettingUpsertOne) IDX(ctx context.Context) int
- func (u *SettingUpsertOne) Ignore() *SettingUpsertOne
- func (u *SettingUpsertOne) SetDeletedAt(v time.Time) *SettingUpsertOne
- func (u *SettingUpsertOne) SetName(v string) *SettingUpsertOne
- func (u *SettingUpsertOne) SetUpdatedAt(v time.Time) *SettingUpsertOne
- func (u *SettingUpsertOne) SetValue(v string) *SettingUpsertOne
- func (u *SettingUpsertOne) Update(set func(*SettingUpsert)) *SettingUpsertOne
- func (u *SettingUpsertOne) UpdateDeletedAt() *SettingUpsertOne
- func (u *SettingUpsertOne) UpdateName() *SettingUpsertOne
- func (u *SettingUpsertOne) UpdateNewValues() *SettingUpsertOne
- func (u *SettingUpsertOne) UpdateUpdatedAt() *SettingUpsertOne
- func (u *SettingUpsertOne) UpdateValue() *SettingUpsertOne
- type Settings
- type Share
- func (c *Share) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Share) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (s *Share) QueryFile() *FileQuery
- func (s *Share) QueryUser() *UserQuery
- func (e *Share) SetFile(v *File)
- func (e *Share) SetUser(v *User)
- func (s *Share) String() string
- func (s *Share) Unwrap() *Share
- func (s *Share) Update() *ShareUpdateOne
- func (s *Share) Value(name string) (ent.Value, error)
- type ShareClient
- func (c *ShareClient) Create() *ShareCreate
- func (c *ShareClient) CreateBulk(builders ...*ShareCreate) *ShareCreateBulk
- func (c *ShareClient) Delete() *ShareDelete
- func (c *ShareClient) DeleteOne(s *Share) *ShareDeleteOne
- func (c *ShareClient) DeleteOneID(id int) *ShareDeleteOne
- func (c *ShareClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *ShareClient) Get(ctx context.Context, id int) (*Share, error)
- func (c *ShareClient) GetX(ctx context.Context, id int) *Share
- func (c *ShareClient) Hooks() []Hook
- func (c *ShareClient) Intercept(interceptors ...Interceptor)
- func (c *ShareClient) Interceptors() []Interceptor
- func (c *ShareClient) MapCreateBulk(slice any, setFunc func(*ShareCreate, int)) *ShareCreateBulk
- func (c *ShareClient) Query() *ShareQuery
- func (c *ShareClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *ShareClient) QueryFile(s *Share) *FileQuery
- func (c *ShareClient) QueryUser(s *Share) *UserQuery
- func (c *ShareClient) Update() *ShareUpdate
- func (c *ShareClient) UpdateOne(s *Share) *ShareUpdateOne
- func (c *ShareClient) UpdateOneID(id int) *ShareUpdateOne
- func (c *ShareClient) Use(hooks ...Hook)
- type ShareCreate
- func (sc *ShareCreate) Exec(ctx context.Context) error
- func (c *ShareCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sc *ShareCreate) ExecX(ctx context.Context)
- func (sc *ShareCreate) Mutation() *ShareMutation
- func (sc *ShareCreate) OnConflict(opts ...sql.ConflictOption) *ShareUpsertOne
- func (sc *ShareCreate) OnConflictColumns(columns ...string) *ShareUpsertOne
- func (c *ShareCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sc *ShareCreate) Save(ctx context.Context) (*Share, error)
- func (sc *ShareCreate) SaveX(ctx context.Context) *Share
- func (sc *ShareCreate) SetCreatedAt(t time.Time) *ShareCreate
- func (sc *ShareCreate) SetDeletedAt(t time.Time) *ShareCreate
- func (sc *ShareCreate) SetDownloads(i int) *ShareCreate
- func (sc *ShareCreate) SetExpires(t time.Time) *ShareCreate
- func (sc *ShareCreate) SetFile(f *File) *ShareCreate
- func (sc *ShareCreate) SetFileID(id int) *ShareCreate
- func (sc *ShareCreate) SetNillableCreatedAt(t *time.Time) *ShareCreate
- func (sc *ShareCreate) SetNillableDeletedAt(t *time.Time) *ShareCreate
- func (sc *ShareCreate) SetNillableDownloads(i *int) *ShareCreate
- func (sc *ShareCreate) SetNillableExpires(t *time.Time) *ShareCreate
- func (sc *ShareCreate) SetNillableFileID(id *int) *ShareCreate
- func (sc *ShareCreate) SetNillablePassword(s *string) *ShareCreate
- func (sc *ShareCreate) SetNillableRemainDownloads(i *int) *ShareCreate
- func (sc *ShareCreate) SetNillableUpdatedAt(t *time.Time) *ShareCreate
- func (sc *ShareCreate) SetNillableUserID(id *int) *ShareCreate
- func (sc *ShareCreate) SetNillableViews(i *int) *ShareCreate
- func (sc *ShareCreate) SetPassword(s string) *ShareCreate
- func (sc *ShareCreate) SetProps(tp *types.ShareProps) *ShareCreate
- func (m *ShareCreate) SetRawID(t int) *ShareCreate
- func (sc *ShareCreate) SetRemainDownloads(i int) *ShareCreate
- func (sc *ShareCreate) SetUpdatedAt(t time.Time) *ShareCreate
- func (sc *ShareCreate) SetUser(u *User) *ShareCreate
- func (sc *ShareCreate) SetUserID(id int) *ShareCreate
- func (sc *ShareCreate) SetViews(i int) *ShareCreate
- type ShareCreateBulk
- func (scb *ShareCreateBulk) Exec(ctx context.Context) error
- func (c *ShareCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (scb *ShareCreateBulk) ExecX(ctx context.Context)
- func (scb *ShareCreateBulk) OnConflict(opts ...sql.ConflictOption) *ShareUpsertBulk
- func (scb *ShareCreateBulk) OnConflictColumns(columns ...string) *ShareUpsertBulk
- func (c *ShareCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (scb *ShareCreateBulk) Save(ctx context.Context) ([]*Share, error)
- func (scb *ShareCreateBulk) SaveX(ctx context.Context) []*Share
- type ShareDelete
- func (sd *ShareDelete) Exec(ctx context.Context) (int, error)
- func (c *ShareDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sd *ShareDelete) ExecX(ctx context.Context) int
- func (c *ShareDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sd *ShareDelete) Where(ps ...predicate.Share) *ShareDelete
- type ShareDeleteOne
- type ShareEdges
- type ShareGroupBy
- func (sgb *ShareGroupBy) Aggregate(fns ...AggregateFunc) *ShareGroupBy
- func (s *ShareGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShareGroupBy) BoolX(ctx context.Context) bool
- func (s *ShareGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ShareGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ShareGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShareGroupBy) Float64X(ctx context.Context) float64
- func (s *ShareGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShareGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ShareGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ShareGroupBy) IntX(ctx context.Context) int
- func (s *ShareGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ShareGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ShareGroupBy) Scan(ctx context.Context, v any) error
- func (s *ShareGroupBy) ScanX(ctx context.Context, v any)
- func (s *ShareGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ShareGroupBy) StringX(ctx context.Context) string
- func (s *ShareGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ShareGroupBy) StringsX(ctx context.Context) []string
- type ShareMutation
- func (m *ShareMutation) AddDownloads(i int)
- func (m *ShareMutation) AddField(name string, value ent.Value) error
- func (m *ShareMutation) AddRemainDownloads(i int)
- func (m *ShareMutation) AddViews(i int)
- func (m *ShareMutation) AddedDownloads() (r int, exists bool)
- func (m *ShareMutation) AddedEdges() []string
- func (m *ShareMutation) AddedField(name string) (ent.Value, bool)
- func (m *ShareMutation) AddedFields() []string
- func (m *ShareMutation) AddedIDs(name string) []ent.Value
- func (m *ShareMutation) AddedRemainDownloads() (r int, exists bool)
- func (m *ShareMutation) AddedViews() (r int, exists bool)
- func (m *ShareMutation) ClearDeletedAt()
- func (m *ShareMutation) ClearEdge(name string) error
- func (m *ShareMutation) ClearExpires()
- func (m *ShareMutation) ClearField(name string) error
- func (m *ShareMutation) ClearFile()
- func (m *ShareMutation) ClearPassword()
- func (m *ShareMutation) ClearProps()
- func (m *ShareMutation) ClearRemainDownloads()
- func (m *ShareMutation) ClearUser()
- func (m *ShareMutation) ClearedEdges() []string
- func (m *ShareMutation) ClearedFields() []string
- func (m ShareMutation) Client() *Client
- func (m *ShareMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ShareMutation) DeletedAt() (r time.Time, exists bool)
- func (m *ShareMutation) DeletedAtCleared() bool
- func (m *ShareMutation) Downloads() (r int, exists bool)
- func (m *ShareMutation) EdgeCleared(name string) bool
- func (c *ShareMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *ShareMutation) Expires() (r time.Time, exists bool)
- func (m *ShareMutation) ExpiresCleared() bool
- func (m *ShareMutation) Field(name string) (ent.Value, bool)
- func (m *ShareMutation) FieldCleared(name string) bool
- func (m *ShareMutation) Fields() []string
- func (m *ShareMutation) FileCleared() bool
- func (m *ShareMutation) FileID() (id int, exists bool)
- func (m *ShareMutation) FileIDs() (ids []int)
- func (m *ShareMutation) ID() (id int, exists bool)
- func (m *ShareMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ShareMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ShareMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ShareMutation) OldDownloads(ctx context.Context) (v int, err error)
- func (m *ShareMutation) OldExpires(ctx context.Context) (v *time.Time, err error)
- func (m *ShareMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ShareMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *ShareMutation) OldProps(ctx context.Context) (v *types.ShareProps, err error)
- func (m *ShareMutation) OldRemainDownloads(ctx context.Context) (v *int, err error)
- func (m *ShareMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ShareMutation) OldViews(ctx context.Context) (v int, err error)
- func (m *ShareMutation) Op() Op
- func (m *ShareMutation) Password() (r string, exists bool)
- func (m *ShareMutation) PasswordCleared() bool
- func (m *ShareMutation) Props() (r *types.ShareProps, exists bool)
- func (m *ShareMutation) PropsCleared() bool
- func (c *ShareMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *ShareMutation) RemainDownloads() (r int, exists bool)
- func (m *ShareMutation) RemainDownloadsCleared() bool
- func (m *ShareMutation) RemovedEdges() []string
- func (m *ShareMutation) RemovedIDs(name string) []ent.Value
- func (m *ShareMutation) ResetCreatedAt()
- func (m *ShareMutation) ResetDeletedAt()
- func (m *ShareMutation) ResetDownloads()
- func (m *ShareMutation) ResetEdge(name string) error
- func (m *ShareMutation) ResetExpires()
- func (m *ShareMutation) ResetField(name string) error
- func (m *ShareMutation) ResetFile()
- func (m *ShareMutation) ResetPassword()
- func (m *ShareMutation) ResetProps()
- func (m *ShareMutation) ResetRemainDownloads()
- func (m *ShareMutation) ResetUpdatedAt()
- func (m *ShareMutation) ResetUser()
- func (m *ShareMutation) ResetViews()
- func (m *ShareMutation) SetCreatedAt(t time.Time)
- func (m *ShareMutation) SetDeletedAt(t time.Time)
- func (m *ShareMutation) SetDownloads(i int)
- func (m *ShareMutation) SetExpires(t time.Time)
- func (m *ShareMutation) SetField(name string, value ent.Value) error
- func (m *ShareMutation) SetFileID(id int)
- func (m *ShareMutation) SetOp(op Op)
- func (m *ShareMutation) SetPassword(s string)
- func (m *ShareMutation) SetProps(tp *types.ShareProps)
- func (m *ShareMutation) SetRawID(t int)
- func (m *ShareMutation) SetRemainDownloads(i int)
- func (m *ShareMutation) SetUpdatedAt(t time.Time)
- func (m *ShareMutation) SetUserID(id int)
- func (m *ShareMutation) SetViews(i int)
- func (m ShareMutation) Tx() (*Tx, error)
- func (m *ShareMutation) Type() string
- func (m *ShareMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ShareMutation) UserCleared() bool
- func (m *ShareMutation) UserID() (id int, exists bool)
- func (m *ShareMutation) UserIDs() (ids []int)
- func (m *ShareMutation) Views() (r int, exists bool)
- func (m *ShareMutation) Where(ps ...predicate.Share)
- func (m *ShareMutation) WhereP(ps ...func(*sql.Selector))
- type ShareQuery
- func (sq *ShareQuery) Aggregate(fns ...AggregateFunc) *ShareSelect
- func (sq *ShareQuery) All(ctx context.Context) ([]*Share, error)
- func (sq *ShareQuery) AllX(ctx context.Context) []*Share
- func (sq *ShareQuery) Clone() *ShareQuery
- func (sq *ShareQuery) Count(ctx context.Context) (int, error)
- func (sq *ShareQuery) CountX(ctx context.Context) int
- func (c *ShareQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sq *ShareQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ShareQuery) ExistX(ctx context.Context) bool
- func (sq *ShareQuery) First(ctx context.Context) (*Share, error)
- func (sq *ShareQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *ShareQuery) FirstIDX(ctx context.Context) int
- func (sq *ShareQuery) FirstX(ctx context.Context) *Share
- func (sq *ShareQuery) GroupBy(field string, fields ...string) *ShareGroupBy
- func (sq *ShareQuery) IDs(ctx context.Context) (ids []int, err error)
- func (sq *ShareQuery) IDsX(ctx context.Context) []int
- func (sq *ShareQuery) Limit(limit int) *ShareQuery
- func (sq *ShareQuery) Offset(offset int) *ShareQuery
- func (sq *ShareQuery) Only(ctx context.Context) (*Share, error)
- func (sq *ShareQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *ShareQuery) OnlyIDX(ctx context.Context) int
- func (sq *ShareQuery) OnlyX(ctx context.Context) *Share
- func (sq *ShareQuery) Order(o ...share.OrderOption) *ShareQuery
- func (c *ShareQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sq *ShareQuery) QueryFile() *FileQuery
- func (sq *ShareQuery) QueryUser() *UserQuery
- func (sq *ShareQuery) Select(fields ...string) *ShareSelect
- func (sq *ShareQuery) Unique(unique bool) *ShareQuery
- func (sq *ShareQuery) Where(ps ...predicate.Share) *ShareQuery
- func (sq *ShareQuery) WithFile(opts ...func(*FileQuery)) *ShareQuery
- func (sq *ShareQuery) WithUser(opts ...func(*UserQuery)) *ShareQuery
- type ShareSelect
- func (ss *ShareSelect) Aggregate(fns ...AggregateFunc) *ShareSelect
- func (s *ShareSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShareSelect) BoolX(ctx context.Context) bool
- func (s *ShareSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ShareSelect) BoolsX(ctx context.Context) []bool
- func (c ShareSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *ShareSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShareSelect) Float64X(ctx context.Context) float64
- func (s *ShareSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShareSelect) Float64sX(ctx context.Context) []float64
- func (s *ShareSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ShareSelect) IntX(ctx context.Context) int
- func (s *ShareSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ShareSelect) IntsX(ctx context.Context) []int
- func (c ShareSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ss *ShareSelect) Scan(ctx context.Context, v any) error
- func (s *ShareSelect) ScanX(ctx context.Context, v any)
- func (s *ShareSelect) String(ctx context.Context) (_ string, err error)
- func (s *ShareSelect) StringX(ctx context.Context) string
- func (s *ShareSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ShareSelect) StringsX(ctx context.Context) []string
- type ShareUpdate
- func (su *ShareUpdate) AddDownloads(i int) *ShareUpdate
- func (su *ShareUpdate) AddRemainDownloads(i int) *ShareUpdate
- func (su *ShareUpdate) AddViews(i int) *ShareUpdate
- func (su *ShareUpdate) ClearDeletedAt() *ShareUpdate
- func (su *ShareUpdate) ClearExpires() *ShareUpdate
- func (su *ShareUpdate) ClearFile() *ShareUpdate
- func (su *ShareUpdate) ClearPassword() *ShareUpdate
- func (su *ShareUpdate) ClearProps() *ShareUpdate
- func (su *ShareUpdate) ClearRemainDownloads() *ShareUpdate
- func (su *ShareUpdate) ClearUser() *ShareUpdate
- func (su *ShareUpdate) Exec(ctx context.Context) error
- func (c *ShareUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (su *ShareUpdate) ExecX(ctx context.Context)
- func (su *ShareUpdate) Mutation() *ShareMutation
- func (c *ShareUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (su *ShareUpdate) Save(ctx context.Context) (int, error)
- func (su *ShareUpdate) SaveX(ctx context.Context) int
- func (su *ShareUpdate) SetDeletedAt(t time.Time) *ShareUpdate
- func (su *ShareUpdate) SetDownloads(i int) *ShareUpdate
- func (su *ShareUpdate) SetExpires(t time.Time) *ShareUpdate
- func (su *ShareUpdate) SetFile(f *File) *ShareUpdate
- func (su *ShareUpdate) SetFileID(id int) *ShareUpdate
- func (su *ShareUpdate) SetNillableDeletedAt(t *time.Time) *ShareUpdate
- func (su *ShareUpdate) SetNillableDownloads(i *int) *ShareUpdate
- func (su *ShareUpdate) SetNillableExpires(t *time.Time) *ShareUpdate
- func (su *ShareUpdate) SetNillableFileID(id *int) *ShareUpdate
- func (su *ShareUpdate) SetNillablePassword(s *string) *ShareUpdate
- func (su *ShareUpdate) SetNillableRemainDownloads(i *int) *ShareUpdate
- func (su *ShareUpdate) SetNillableUserID(id *int) *ShareUpdate
- func (su *ShareUpdate) SetNillableViews(i *int) *ShareUpdate
- func (su *ShareUpdate) SetPassword(s string) *ShareUpdate
- func (su *ShareUpdate) SetProps(tp *types.ShareProps) *ShareUpdate
- func (su *ShareUpdate) SetRemainDownloads(i int) *ShareUpdate
- func (su *ShareUpdate) SetUpdatedAt(t time.Time) *ShareUpdate
- func (su *ShareUpdate) SetUser(u *User) *ShareUpdate
- func (su *ShareUpdate) SetUserID(id int) *ShareUpdate
- func (su *ShareUpdate) SetViews(i int) *ShareUpdate
- func (su *ShareUpdate) Where(ps ...predicate.Share) *ShareUpdate
- type ShareUpdateOne
- func (suo *ShareUpdateOne) AddDownloads(i int) *ShareUpdateOne
- func (suo *ShareUpdateOne) AddRemainDownloads(i int) *ShareUpdateOne
- func (suo *ShareUpdateOne) AddViews(i int) *ShareUpdateOne
- func (suo *ShareUpdateOne) ClearDeletedAt() *ShareUpdateOne
- func (suo *ShareUpdateOne) ClearExpires() *ShareUpdateOne
- func (suo *ShareUpdateOne) ClearFile() *ShareUpdateOne
- func (suo *ShareUpdateOne) ClearPassword() *ShareUpdateOne
- func (suo *ShareUpdateOne) ClearProps() *ShareUpdateOne
- func (suo *ShareUpdateOne) ClearRemainDownloads() *ShareUpdateOne
- func (suo *ShareUpdateOne) ClearUser() *ShareUpdateOne
- func (suo *ShareUpdateOne) Exec(ctx context.Context) error
- func (c *ShareUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (suo *ShareUpdateOne) ExecX(ctx context.Context)
- func (suo *ShareUpdateOne) Mutation() *ShareMutation
- func (c *ShareUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (suo *ShareUpdateOne) Save(ctx context.Context) (*Share, error)
- func (suo *ShareUpdateOne) SaveX(ctx context.Context) *Share
- func (suo *ShareUpdateOne) Select(field string, fields ...string) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetDeletedAt(t time.Time) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetDownloads(i int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetExpires(t time.Time) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetFile(f *File) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetFileID(id int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillableDeletedAt(t *time.Time) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillableDownloads(i *int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillableExpires(t *time.Time) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillableFileID(id *int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillablePassword(s *string) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillableRemainDownloads(i *int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillableUserID(id *int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillableViews(i *int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetPassword(s string) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetProps(tp *types.ShareProps) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetRemainDownloads(i int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetUpdatedAt(t time.Time) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetUser(u *User) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetUserID(id int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetViews(i int) *ShareUpdateOne
- func (suo *ShareUpdateOne) Where(ps ...predicate.Share) *ShareUpdateOne
- type ShareUpsert
- func (u *ShareUpsert) AddDownloads(v int) *ShareUpsert
- func (u *ShareUpsert) AddRemainDownloads(v int) *ShareUpsert
- func (u *ShareUpsert) AddViews(v int) *ShareUpsert
- func (u *ShareUpsert) ClearDeletedAt() *ShareUpsert
- func (u *ShareUpsert) ClearExpires() *ShareUpsert
- func (u *ShareUpsert) ClearPassword() *ShareUpsert
- func (u *ShareUpsert) ClearProps() *ShareUpsert
- func (u *ShareUpsert) ClearRemainDownloads() *ShareUpsert
- func (u *ShareUpsert) SetDeletedAt(v time.Time) *ShareUpsert
- func (u *ShareUpsert) SetDownloads(v int) *ShareUpsert
- func (u *ShareUpsert) SetExpires(v time.Time) *ShareUpsert
- func (u *ShareUpsert) SetPassword(v string) *ShareUpsert
- func (u *ShareUpsert) SetProps(v *types.ShareProps) *ShareUpsert
- func (u *ShareUpsert) SetRemainDownloads(v int) *ShareUpsert
- func (u *ShareUpsert) SetUpdatedAt(v time.Time) *ShareUpsert
- func (u *ShareUpsert) SetViews(v int) *ShareUpsert
- func (u *ShareUpsert) UpdateDeletedAt() *ShareUpsert
- func (u *ShareUpsert) UpdateDownloads() *ShareUpsert
- func (u *ShareUpsert) UpdateExpires() *ShareUpsert
- func (u *ShareUpsert) UpdatePassword() *ShareUpsert
- func (u *ShareUpsert) UpdateProps() *ShareUpsert
- func (u *ShareUpsert) UpdateRemainDownloads() *ShareUpsert
- func (u *ShareUpsert) UpdateUpdatedAt() *ShareUpsert
- func (u *ShareUpsert) UpdateViews() *ShareUpsert
- type ShareUpsertBulk
- func (u *ShareUpsertBulk) AddDownloads(v int) *ShareUpsertBulk
- func (u *ShareUpsertBulk) AddRemainDownloads(v int) *ShareUpsertBulk
- func (u *ShareUpsertBulk) AddViews(v int) *ShareUpsertBulk
- func (u *ShareUpsertBulk) ClearDeletedAt() *ShareUpsertBulk
- func (u *ShareUpsertBulk) ClearExpires() *ShareUpsertBulk
- func (u *ShareUpsertBulk) ClearPassword() *ShareUpsertBulk
- func (u *ShareUpsertBulk) ClearProps() *ShareUpsertBulk
- func (u *ShareUpsertBulk) ClearRemainDownloads() *ShareUpsertBulk
- func (u *ShareUpsertBulk) DoNothing() *ShareUpsertBulk
- func (u *ShareUpsertBulk) Exec(ctx context.Context) error
- func (u *ShareUpsertBulk) ExecX(ctx context.Context)
- func (u *ShareUpsertBulk) Ignore() *ShareUpsertBulk
- func (u *ShareUpsertBulk) SetDeletedAt(v time.Time) *ShareUpsertBulk
- func (u *ShareUpsertBulk) SetDownloads(v int) *ShareUpsertBulk
- func (u *ShareUpsertBulk) SetExpires(v time.Time) *ShareUpsertBulk
- func (u *ShareUpsertBulk) SetPassword(v string) *ShareUpsertBulk
- func (u *ShareUpsertBulk) SetProps(v *types.ShareProps) *ShareUpsertBulk
- func (u *ShareUpsertBulk) SetRemainDownloads(v int) *ShareUpsertBulk
- func (u *ShareUpsertBulk) SetUpdatedAt(v time.Time) *ShareUpsertBulk
- func (u *ShareUpsertBulk) SetViews(v int) *ShareUpsertBulk
- func (u *ShareUpsertBulk) Update(set func(*ShareUpsert)) *ShareUpsertBulk
- func (u *ShareUpsertBulk) UpdateDeletedAt() *ShareUpsertBulk
- func (u *ShareUpsertBulk) UpdateDownloads() *ShareUpsertBulk
- func (u *ShareUpsertBulk) UpdateExpires() *ShareUpsertBulk
- func (u *ShareUpsertBulk) UpdateNewValues() *ShareUpsertBulk
- func (u *ShareUpsertBulk) UpdatePassword() *ShareUpsertBulk
- func (u *ShareUpsertBulk) UpdateProps() *ShareUpsertBulk
- func (u *ShareUpsertBulk) UpdateRemainDownloads() *ShareUpsertBulk
- func (u *ShareUpsertBulk) UpdateUpdatedAt() *ShareUpsertBulk
- func (u *ShareUpsertBulk) UpdateViews() *ShareUpsertBulk
- type ShareUpsertOne
- func (u *ShareUpsertOne) AddDownloads(v int) *ShareUpsertOne
- func (u *ShareUpsertOne) AddRemainDownloads(v int) *ShareUpsertOne
- func (u *ShareUpsertOne) AddViews(v int) *ShareUpsertOne
- func (u *ShareUpsertOne) ClearDeletedAt() *ShareUpsertOne
- func (u *ShareUpsertOne) ClearExpires() *ShareUpsertOne
- func (u *ShareUpsertOne) ClearPassword() *ShareUpsertOne
- func (u *ShareUpsertOne) ClearProps() *ShareUpsertOne
- func (u *ShareUpsertOne) ClearRemainDownloads() *ShareUpsertOne
- func (u *ShareUpsertOne) DoNothing() *ShareUpsertOne
- func (u *ShareUpsertOne) Exec(ctx context.Context) error
- func (u *ShareUpsertOne) ExecX(ctx context.Context)
- func (u *ShareUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *ShareUpsertOne) IDX(ctx context.Context) int
- func (u *ShareUpsertOne) Ignore() *ShareUpsertOne
- func (u *ShareUpsertOne) SetDeletedAt(v time.Time) *ShareUpsertOne
- func (u *ShareUpsertOne) SetDownloads(v int) *ShareUpsertOne
- func (u *ShareUpsertOne) SetExpires(v time.Time) *ShareUpsertOne
- func (u *ShareUpsertOne) SetPassword(v string) *ShareUpsertOne
- func (u *ShareUpsertOne) SetProps(v *types.ShareProps) *ShareUpsertOne
- func (u *ShareUpsertOne) SetRemainDownloads(v int) *ShareUpsertOne
- func (u *ShareUpsertOne) SetUpdatedAt(v time.Time) *ShareUpsertOne
- func (u *ShareUpsertOne) SetViews(v int) *ShareUpsertOne
- func (u *ShareUpsertOne) Update(set func(*ShareUpsert)) *ShareUpsertOne
- func (u *ShareUpsertOne) UpdateDeletedAt() *ShareUpsertOne
- func (u *ShareUpsertOne) UpdateDownloads() *ShareUpsertOne
- func (u *ShareUpsertOne) UpdateExpires() *ShareUpsertOne
- func (u *ShareUpsertOne) UpdateNewValues() *ShareUpsertOne
- func (u *ShareUpsertOne) UpdatePassword() *ShareUpsertOne
- func (u *ShareUpsertOne) UpdateProps() *ShareUpsertOne
- func (u *ShareUpsertOne) UpdateRemainDownloads() *ShareUpsertOne
- func (u *ShareUpsertOne) UpdateUpdatedAt() *ShareUpsertOne
- func (u *ShareUpsertOne) UpdateViews() *ShareUpsertOne
- type Shares
- type StoragePolicies
- type StoragePolicy
- func (c *StoragePolicy) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *StoragePolicy) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sp *StoragePolicy) QueryEntities() *EntityQuery
- func (sp *StoragePolicy) QueryFiles() *FileQuery
- func (sp *StoragePolicy) QueryGroups() *GroupQuery
- func (sp *StoragePolicy) QueryNode() *NodeQuery
- func (e *StoragePolicy) SetEntities(v []*Entity)
- func (e *StoragePolicy) SetFiles(v []*File)
- func (e *StoragePolicy) SetGroups(v []*Group)
- func (e *StoragePolicy) SetNode(v *Node)
- func (sp *StoragePolicy) String() string
- func (sp *StoragePolicy) Unwrap() *StoragePolicy
- func (sp *StoragePolicy) Update() *StoragePolicyUpdateOne
- func (sp *StoragePolicy) Value(name string) (ent.Value, error)
- type StoragePolicyClient
- func (c *StoragePolicyClient) Create() *StoragePolicyCreate
- func (c *StoragePolicyClient) CreateBulk(builders ...*StoragePolicyCreate) *StoragePolicyCreateBulk
- func (c *StoragePolicyClient) Delete() *StoragePolicyDelete
- func (c *StoragePolicyClient) DeleteOne(sp *StoragePolicy) *StoragePolicyDeleteOne
- func (c *StoragePolicyClient) DeleteOneID(id int) *StoragePolicyDeleteOne
- func (c *StoragePolicyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *StoragePolicyClient) Get(ctx context.Context, id int) (*StoragePolicy, error)
- func (c *StoragePolicyClient) GetX(ctx context.Context, id int) *StoragePolicy
- func (c *StoragePolicyClient) Hooks() []Hook
- func (c *StoragePolicyClient) Intercept(interceptors ...Interceptor)
- func (c *StoragePolicyClient) Interceptors() []Interceptor
- func (c *StoragePolicyClient) MapCreateBulk(slice any, setFunc func(*StoragePolicyCreate, int)) *StoragePolicyCreateBulk
- func (c *StoragePolicyClient) Query() *StoragePolicyQuery
- func (c *StoragePolicyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *StoragePolicyClient) QueryEntities(sp *StoragePolicy) *EntityQuery
- func (c *StoragePolicyClient) QueryFiles(sp *StoragePolicy) *FileQuery
- func (c *StoragePolicyClient) QueryGroups(sp *StoragePolicy) *GroupQuery
- func (c *StoragePolicyClient) QueryNode(sp *StoragePolicy) *NodeQuery
- func (c *StoragePolicyClient) Update() *StoragePolicyUpdate
- func (c *StoragePolicyClient) UpdateOne(sp *StoragePolicy) *StoragePolicyUpdateOne
- func (c *StoragePolicyClient) UpdateOneID(id int) *StoragePolicyUpdateOne
- func (c *StoragePolicyClient) Use(hooks ...Hook)
- type StoragePolicyCreate
- func (spc *StoragePolicyCreate) AddEntities(e ...*Entity) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) AddEntityIDs(ids ...int) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) AddFileIDs(ids ...int) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) AddFiles(f ...*File) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) AddGroupIDs(ids ...int) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) AddGroups(g ...*Group) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) Exec(ctx context.Context) error
- func (c *StoragePolicyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spc *StoragePolicyCreate) ExecX(ctx context.Context)
- func (spc *StoragePolicyCreate) Mutation() *StoragePolicyMutation
- func (spc *StoragePolicyCreate) OnConflict(opts ...sql.ConflictOption) *StoragePolicyUpsertOne
- func (spc *StoragePolicyCreate) OnConflictColumns(columns ...string) *StoragePolicyUpsertOne
- func (c *StoragePolicyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spc *StoragePolicyCreate) Save(ctx context.Context) (*StoragePolicy, error)
- func (spc *StoragePolicyCreate) SaveX(ctx context.Context) *StoragePolicy
- func (spc *StoragePolicyCreate) SetAccessKey(s string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetBucketName(s string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetCreatedAt(t time.Time) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetDeletedAt(t time.Time) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetDirNameRule(s string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetFileNameRule(s string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetIsPrivate(b bool) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetMaxSize(i int64) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetName(s string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableAccessKey(s *string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableBucketName(s *string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableCreatedAt(t *time.Time) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableDeletedAt(t *time.Time) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableDirNameRule(s *string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableFileNameRule(s *string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableIsPrivate(b *bool) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableMaxSize(i *int64) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableNodeID(i *int) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableSecretKey(s *string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableServer(s *string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNillableUpdatedAt(t *time.Time) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNode(n *Node) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetNodeID(i int) *StoragePolicyCreate
- func (m *StoragePolicyCreate) SetRawID(t int) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetSecretKey(s string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetServer(s string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetSettings(ts *types.PolicySetting) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetType(s string) *StoragePolicyCreate
- func (spc *StoragePolicyCreate) SetUpdatedAt(t time.Time) *StoragePolicyCreate
- type StoragePolicyCreateBulk
- func (spcb *StoragePolicyCreateBulk) Exec(ctx context.Context) error
- func (c *StoragePolicyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spcb *StoragePolicyCreateBulk) ExecX(ctx context.Context)
- func (spcb *StoragePolicyCreateBulk) OnConflict(opts ...sql.ConflictOption) *StoragePolicyUpsertBulk
- func (spcb *StoragePolicyCreateBulk) OnConflictColumns(columns ...string) *StoragePolicyUpsertBulk
- func (c *StoragePolicyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spcb *StoragePolicyCreateBulk) Save(ctx context.Context) ([]*StoragePolicy, error)
- func (spcb *StoragePolicyCreateBulk) SaveX(ctx context.Context) []*StoragePolicy
- type StoragePolicyDelete
- func (spd *StoragePolicyDelete) Exec(ctx context.Context) (int, error)
- func (c *StoragePolicyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spd *StoragePolicyDelete) ExecX(ctx context.Context) int
- func (c *StoragePolicyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spd *StoragePolicyDelete) Where(ps ...predicate.StoragePolicy) *StoragePolicyDelete
- type StoragePolicyDeleteOne
- type StoragePolicyEdges
- type StoragePolicyGroupBy
- func (spgb *StoragePolicyGroupBy) Aggregate(fns ...AggregateFunc) *StoragePolicyGroupBy
- func (s *StoragePolicyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StoragePolicyGroupBy) BoolX(ctx context.Context) bool
- func (s *StoragePolicyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StoragePolicyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StoragePolicyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StoragePolicyGroupBy) Float64X(ctx context.Context) float64
- func (s *StoragePolicyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StoragePolicyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StoragePolicyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StoragePolicyGroupBy) IntX(ctx context.Context) int
- func (s *StoragePolicyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StoragePolicyGroupBy) IntsX(ctx context.Context) []int
- func (spgb *StoragePolicyGroupBy) Scan(ctx context.Context, v any) error
- func (s *StoragePolicyGroupBy) ScanX(ctx context.Context, v any)
- func (s *StoragePolicyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StoragePolicyGroupBy) StringX(ctx context.Context) string
- func (s *StoragePolicyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StoragePolicyGroupBy) StringsX(ctx context.Context) []string
- type StoragePolicyMutation
- func (m *StoragePolicyMutation) AccessKey() (r string, exists bool)
- func (m *StoragePolicyMutation) AccessKeyCleared() bool
- func (m *StoragePolicyMutation) AddEntityIDs(ids ...int)
- func (m *StoragePolicyMutation) AddField(name string, value ent.Value) error
- func (m *StoragePolicyMutation) AddFileIDs(ids ...int)
- func (m *StoragePolicyMutation) AddGroupIDs(ids ...int)
- func (m *StoragePolicyMutation) AddMaxSize(i int64)
- func (m *StoragePolicyMutation) AddedEdges() []string
- func (m *StoragePolicyMutation) AddedField(name string) (ent.Value, bool)
- func (m *StoragePolicyMutation) AddedFields() []string
- func (m *StoragePolicyMutation) AddedIDs(name string) []ent.Value
- func (m *StoragePolicyMutation) AddedMaxSize() (r int64, exists bool)
- func (m *StoragePolicyMutation) BucketName() (r string, exists bool)
- func (m *StoragePolicyMutation) BucketNameCleared() bool
- func (m *StoragePolicyMutation) ClearAccessKey()
- func (m *StoragePolicyMutation) ClearBucketName()
- func (m *StoragePolicyMutation) ClearDeletedAt()
- func (m *StoragePolicyMutation) ClearDirNameRule()
- func (m *StoragePolicyMutation) ClearEdge(name string) error
- func (m *StoragePolicyMutation) ClearEntities()
- func (m *StoragePolicyMutation) ClearField(name string) error
- func (m *StoragePolicyMutation) ClearFileNameRule()
- func (m *StoragePolicyMutation) ClearFiles()
- func (m *StoragePolicyMutation) ClearGroups()
- func (m *StoragePolicyMutation) ClearIsPrivate()
- func (m *StoragePolicyMutation) ClearMaxSize()
- func (m *StoragePolicyMutation) ClearNode()
- func (m *StoragePolicyMutation) ClearNodeID()
- func (m *StoragePolicyMutation) ClearSecretKey()
- func (m *StoragePolicyMutation) ClearServer()
- func (m *StoragePolicyMutation) ClearSettings()
- func (m *StoragePolicyMutation) ClearedEdges() []string
- func (m *StoragePolicyMutation) ClearedFields() []string
- func (m StoragePolicyMutation) Client() *Client
- func (m *StoragePolicyMutation) CreatedAt() (r time.Time, exists bool)
- func (m *StoragePolicyMutation) DeletedAt() (r time.Time, exists bool)
- func (m *StoragePolicyMutation) DeletedAtCleared() bool
- func (m *StoragePolicyMutation) DirNameRule() (r string, exists bool)
- func (m *StoragePolicyMutation) DirNameRuleCleared() bool
- func (m *StoragePolicyMutation) EdgeCleared(name string) bool
- func (m *StoragePolicyMutation) EntitiesCleared() bool
- func (m *StoragePolicyMutation) EntitiesIDs() (ids []int)
- func (c *StoragePolicyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *StoragePolicyMutation) Field(name string) (ent.Value, bool)
- func (m *StoragePolicyMutation) FieldCleared(name string) bool
- func (m *StoragePolicyMutation) Fields() []string
- func (m *StoragePolicyMutation) FileNameRule() (r string, exists bool)
- func (m *StoragePolicyMutation) FileNameRuleCleared() bool
- func (m *StoragePolicyMutation) FilesCleared() bool
- func (m *StoragePolicyMutation) FilesIDs() (ids []int)
- func (m *StoragePolicyMutation) GetType() (r string, exists bool)
- func (m *StoragePolicyMutation) GroupsCleared() bool
- func (m *StoragePolicyMutation) GroupsIDs() (ids []int)
- func (m *StoragePolicyMutation) ID() (id int, exists bool)
- func (m *StoragePolicyMutation) IDs(ctx context.Context) ([]int, error)
- func (m *StoragePolicyMutation) IsPrivate() (r bool, exists bool)
- func (m *StoragePolicyMutation) IsPrivateCleared() bool
- func (m *StoragePolicyMutation) MaxSize() (r int64, exists bool)
- func (m *StoragePolicyMutation) MaxSizeCleared() bool
- func (m *StoragePolicyMutation) Name() (r string, exists bool)
- func (m *StoragePolicyMutation) NodeCleared() bool
- func (m *StoragePolicyMutation) NodeID() (r int, exists bool)
- func (m *StoragePolicyMutation) NodeIDCleared() bool
- func (m *StoragePolicyMutation) NodeIDs() (ids []int)
- func (m *StoragePolicyMutation) OldAccessKey(ctx context.Context) (v string, err error)
- func (m *StoragePolicyMutation) OldBucketName(ctx context.Context) (v string, err error)
- func (m *StoragePolicyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StoragePolicyMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *StoragePolicyMutation) OldDirNameRule(ctx context.Context) (v string, err error)
- func (m *StoragePolicyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StoragePolicyMutation) OldFileNameRule(ctx context.Context) (v string, err error)
- func (m *StoragePolicyMutation) OldIsPrivate(ctx context.Context) (v bool, err error)
- func (m *StoragePolicyMutation) OldMaxSize(ctx context.Context) (v int64, err error)
- func (m *StoragePolicyMutation) OldName(ctx context.Context) (v string, err error)
- func (m *StoragePolicyMutation) OldNodeID(ctx context.Context) (v int, err error)
- func (m *StoragePolicyMutation) OldSecretKey(ctx context.Context) (v string, err error)
- func (m *StoragePolicyMutation) OldServer(ctx context.Context) (v string, err error)
- func (m *StoragePolicyMutation) OldSettings(ctx context.Context) (v *types.PolicySetting, err error)
- func (m *StoragePolicyMutation) OldType(ctx context.Context) (v string, err error)
- func (m *StoragePolicyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StoragePolicyMutation) Op() Op
- func (c *StoragePolicyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *StoragePolicyMutation) RemoveEntityIDs(ids ...int)
- func (m *StoragePolicyMutation) RemoveFileIDs(ids ...int)
- func (m *StoragePolicyMutation) RemoveGroupIDs(ids ...int)
- func (m *StoragePolicyMutation) RemovedEdges() []string
- func (m *StoragePolicyMutation) RemovedEntitiesIDs() (ids []int)
- func (m *StoragePolicyMutation) RemovedFilesIDs() (ids []int)
- func (m *StoragePolicyMutation) RemovedGroupsIDs() (ids []int)
- func (m *StoragePolicyMutation) RemovedIDs(name string) []ent.Value
- func (m *StoragePolicyMutation) ResetAccessKey()
- func (m *StoragePolicyMutation) ResetBucketName()
- func (m *StoragePolicyMutation) ResetCreatedAt()
- func (m *StoragePolicyMutation) ResetDeletedAt()
- func (m *StoragePolicyMutation) ResetDirNameRule()
- func (m *StoragePolicyMutation) ResetEdge(name string) error
- func (m *StoragePolicyMutation) ResetEntities()
- func (m *StoragePolicyMutation) ResetField(name string) error
- func (m *StoragePolicyMutation) ResetFileNameRule()
- func (m *StoragePolicyMutation) ResetFiles()
- func (m *StoragePolicyMutation) ResetGroups()
- func (m *StoragePolicyMutation) ResetIsPrivate()
- func (m *StoragePolicyMutation) ResetMaxSize()
- func (m *StoragePolicyMutation) ResetName()
- func (m *StoragePolicyMutation) ResetNode()
- func (m *StoragePolicyMutation) ResetNodeID()
- func (m *StoragePolicyMutation) ResetSecretKey()
- func (m *StoragePolicyMutation) ResetServer()
- func (m *StoragePolicyMutation) ResetSettings()
- func (m *StoragePolicyMutation) ResetType()
- func (m *StoragePolicyMutation) ResetUpdatedAt()
- func (m *StoragePolicyMutation) SecretKey() (r string, exists bool)
- func (m *StoragePolicyMutation) SecretKeyCleared() bool
- func (m *StoragePolicyMutation) Server() (r string, exists bool)
- func (m *StoragePolicyMutation) ServerCleared() bool
- func (m *StoragePolicyMutation) SetAccessKey(s string)
- func (m *StoragePolicyMutation) SetBucketName(s string)
- func (m *StoragePolicyMutation) SetCreatedAt(t time.Time)
- func (m *StoragePolicyMutation) SetDeletedAt(t time.Time)
- func (m *StoragePolicyMutation) SetDirNameRule(s string)
- func (m *StoragePolicyMutation) SetField(name string, value ent.Value) error
- func (m *StoragePolicyMutation) SetFileNameRule(s string)
- func (m *StoragePolicyMutation) SetIsPrivate(b bool)
- func (m *StoragePolicyMutation) SetMaxSize(i int64)
- func (m *StoragePolicyMutation) SetName(s string)
- func (m *StoragePolicyMutation) SetNodeID(i int)
- func (m *StoragePolicyMutation) SetOp(op Op)
- func (m *StoragePolicyMutation) SetRawID(t int)
- func (m *StoragePolicyMutation) SetSecretKey(s string)
- func (m *StoragePolicyMutation) SetServer(s string)
- func (m *StoragePolicyMutation) SetSettings(ts *types.PolicySetting)
- func (m *StoragePolicyMutation) SetType(s string)
- func (m *StoragePolicyMutation) SetUpdatedAt(t time.Time)
- func (m *StoragePolicyMutation) Settings() (r *types.PolicySetting, exists bool)
- func (m *StoragePolicyMutation) SettingsCleared() bool
- func (m StoragePolicyMutation) Tx() (*Tx, error)
- func (m *StoragePolicyMutation) Type() string
- func (m *StoragePolicyMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *StoragePolicyMutation) Where(ps ...predicate.StoragePolicy)
- func (m *StoragePolicyMutation) WhereP(ps ...func(*sql.Selector))
- type StoragePolicyQuery
- func (spq *StoragePolicyQuery) Aggregate(fns ...AggregateFunc) *StoragePolicySelect
- func (spq *StoragePolicyQuery) All(ctx context.Context) ([]*StoragePolicy, error)
- func (spq *StoragePolicyQuery) AllX(ctx context.Context) []*StoragePolicy
- func (spq *StoragePolicyQuery) Clone() *StoragePolicyQuery
- func (spq *StoragePolicyQuery) Count(ctx context.Context) (int, error)
- func (spq *StoragePolicyQuery) CountX(ctx context.Context) int
- func (c *StoragePolicyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spq *StoragePolicyQuery) Exist(ctx context.Context) (bool, error)
- func (spq *StoragePolicyQuery) ExistX(ctx context.Context) bool
- func (spq *StoragePolicyQuery) First(ctx context.Context) (*StoragePolicy, error)
- func (spq *StoragePolicyQuery) FirstID(ctx context.Context) (id int, err error)
- func (spq *StoragePolicyQuery) FirstIDX(ctx context.Context) int
- func (spq *StoragePolicyQuery) FirstX(ctx context.Context) *StoragePolicy
- func (spq *StoragePolicyQuery) GroupBy(field string, fields ...string) *StoragePolicyGroupBy
- func (spq *StoragePolicyQuery) IDs(ctx context.Context) (ids []int, err error)
- func (spq *StoragePolicyQuery) IDsX(ctx context.Context) []int
- func (spq *StoragePolicyQuery) Limit(limit int) *StoragePolicyQuery
- func (spq *StoragePolicyQuery) Offset(offset int) *StoragePolicyQuery
- func (spq *StoragePolicyQuery) Only(ctx context.Context) (*StoragePolicy, error)
- func (spq *StoragePolicyQuery) OnlyID(ctx context.Context) (id int, err error)
- func (spq *StoragePolicyQuery) OnlyIDX(ctx context.Context) int
- func (spq *StoragePolicyQuery) OnlyX(ctx context.Context) *StoragePolicy
- func (spq *StoragePolicyQuery) Order(o ...storagepolicy.OrderOption) *StoragePolicyQuery
- func (c *StoragePolicyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spq *StoragePolicyQuery) QueryEntities() *EntityQuery
- func (spq *StoragePolicyQuery) QueryFiles() *FileQuery
- func (spq *StoragePolicyQuery) QueryGroups() *GroupQuery
- func (spq *StoragePolicyQuery) QueryNode() *NodeQuery
- func (spq *StoragePolicyQuery) Select(fields ...string) *StoragePolicySelect
- func (spq *StoragePolicyQuery) Unique(unique bool) *StoragePolicyQuery
- func (spq *StoragePolicyQuery) Where(ps ...predicate.StoragePolicy) *StoragePolicyQuery
- func (spq *StoragePolicyQuery) WithEntities(opts ...func(*EntityQuery)) *StoragePolicyQuery
- func (spq *StoragePolicyQuery) WithFiles(opts ...func(*FileQuery)) *StoragePolicyQuery
- func (spq *StoragePolicyQuery) WithGroups(opts ...func(*GroupQuery)) *StoragePolicyQuery
- func (spq *StoragePolicyQuery) WithNode(opts ...func(*NodeQuery)) *StoragePolicyQuery
- type StoragePolicySelect
- func (sps *StoragePolicySelect) Aggregate(fns ...AggregateFunc) *StoragePolicySelect
- func (s *StoragePolicySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StoragePolicySelect) BoolX(ctx context.Context) bool
- func (s *StoragePolicySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StoragePolicySelect) BoolsX(ctx context.Context) []bool
- func (c StoragePolicySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *StoragePolicySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StoragePolicySelect) Float64X(ctx context.Context) float64
- func (s *StoragePolicySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StoragePolicySelect) Float64sX(ctx context.Context) []float64
- func (s *StoragePolicySelect) Int(ctx context.Context) (_ int, err error)
- func (s *StoragePolicySelect) IntX(ctx context.Context) int
- func (s *StoragePolicySelect) Ints(ctx context.Context) ([]int, error)
- func (s *StoragePolicySelect) IntsX(ctx context.Context) []int
- func (c StoragePolicySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sps *StoragePolicySelect) Scan(ctx context.Context, v any) error
- func (s *StoragePolicySelect) ScanX(ctx context.Context, v any)
- func (s *StoragePolicySelect) String(ctx context.Context) (_ string, err error)
- func (s *StoragePolicySelect) StringX(ctx context.Context) string
- func (s *StoragePolicySelect) Strings(ctx context.Context) ([]string, error)
- func (s *StoragePolicySelect) StringsX(ctx context.Context) []string
- type StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) AddEntities(e ...*Entity) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) AddEntityIDs(ids ...int) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) AddFileIDs(ids ...int) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) AddFiles(f ...*File) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) AddGroupIDs(ids ...int) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) AddGroups(g ...*Group) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) AddMaxSize(i int64) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearAccessKey() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearBucketName() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearDeletedAt() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearDirNameRule() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearEntities() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearFileNameRule() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearFiles() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearGroups() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearIsPrivate() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearMaxSize() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearNode() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearNodeID() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearSecretKey() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearServer() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) ClearSettings() *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) Exec(ctx context.Context) error
- func (c *StoragePolicyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spu *StoragePolicyUpdate) ExecX(ctx context.Context)
- func (spu *StoragePolicyUpdate) Mutation() *StoragePolicyMutation
- func (c *StoragePolicyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spu *StoragePolicyUpdate) RemoveEntities(e ...*Entity) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) RemoveEntityIDs(ids ...int) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) RemoveFileIDs(ids ...int) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) RemoveFiles(f ...*File) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) RemoveGroupIDs(ids ...int) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) RemoveGroups(g ...*Group) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) Save(ctx context.Context) (int, error)
- func (spu *StoragePolicyUpdate) SaveX(ctx context.Context) int
- func (spu *StoragePolicyUpdate) SetAccessKey(s string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetBucketName(s string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetDeletedAt(t time.Time) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetDirNameRule(s string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetFileNameRule(s string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetIsPrivate(b bool) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetMaxSize(i int64) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetName(s string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableAccessKey(s *string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableBucketName(s *string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableDeletedAt(t *time.Time) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableDirNameRule(s *string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableFileNameRule(s *string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableIsPrivate(b *bool) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableMaxSize(i *int64) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableName(s *string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableNodeID(i *int) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableSecretKey(s *string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableServer(s *string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNillableType(s *string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNode(n *Node) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetNodeID(i int) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetSecretKey(s string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetServer(s string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetSettings(ts *types.PolicySetting) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetType(s string) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) SetUpdatedAt(t time.Time) *StoragePolicyUpdate
- func (spu *StoragePolicyUpdate) Where(ps ...predicate.StoragePolicy) *StoragePolicyUpdate
- type StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) AddEntities(e ...*Entity) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) AddEntityIDs(ids ...int) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) AddFileIDs(ids ...int) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) AddFiles(f ...*File) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) AddGroupIDs(ids ...int) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) AddGroups(g ...*Group) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) AddMaxSize(i int64) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearAccessKey() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearBucketName() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearDeletedAt() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearDirNameRule() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearEntities() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearFileNameRule() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearFiles() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearGroups() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearIsPrivate() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearMaxSize() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearNode() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearNodeID() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearSecretKey() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearServer() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) ClearSettings() *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) Exec(ctx context.Context) error
- func (c *StoragePolicyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spuo *StoragePolicyUpdateOne) ExecX(ctx context.Context)
- func (spuo *StoragePolicyUpdateOne) Mutation() *StoragePolicyMutation
- func (c *StoragePolicyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spuo *StoragePolicyUpdateOne) RemoveEntities(e ...*Entity) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) RemoveEntityIDs(ids ...int) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) RemoveFileIDs(ids ...int) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) RemoveFiles(f ...*File) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) RemoveGroupIDs(ids ...int) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) RemoveGroups(g ...*Group) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) Save(ctx context.Context) (*StoragePolicy, error)
- func (spuo *StoragePolicyUpdateOne) SaveX(ctx context.Context) *StoragePolicy
- func (spuo *StoragePolicyUpdateOne) Select(field string, fields ...string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetAccessKey(s string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetBucketName(s string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetDeletedAt(t time.Time) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetDirNameRule(s string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetFileNameRule(s string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetIsPrivate(b bool) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetMaxSize(i int64) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetName(s string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableAccessKey(s *string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableBucketName(s *string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableDeletedAt(t *time.Time) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableDirNameRule(s *string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableFileNameRule(s *string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableIsPrivate(b *bool) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableMaxSize(i *int64) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableName(s *string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableNodeID(i *int) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableSecretKey(s *string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableServer(s *string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNillableType(s *string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNode(n *Node) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetNodeID(i int) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetSecretKey(s string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetServer(s string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetSettings(ts *types.PolicySetting) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetType(s string) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) SetUpdatedAt(t time.Time) *StoragePolicyUpdateOne
- func (spuo *StoragePolicyUpdateOne) Where(ps ...predicate.StoragePolicy) *StoragePolicyUpdateOne
- type StoragePolicyUpsert
- func (u *StoragePolicyUpsert) AddMaxSize(v int64) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearAccessKey() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearBucketName() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearDeletedAt() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearDirNameRule() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearFileNameRule() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearIsPrivate() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearMaxSize() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearNodeID() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearSecretKey() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearServer() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) ClearSettings() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetAccessKey(v string) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetBucketName(v string) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetDeletedAt(v time.Time) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetDirNameRule(v string) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetFileNameRule(v string) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetIsPrivate(v bool) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetMaxSize(v int64) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetName(v string) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetNodeID(v int) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetSecretKey(v string) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetServer(v string) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetSettings(v *types.PolicySetting) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetType(v string) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) SetUpdatedAt(v time.Time) *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateAccessKey() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateBucketName() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateDeletedAt() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateDirNameRule() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateFileNameRule() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateIsPrivate() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateMaxSize() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateName() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateNodeID() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateSecretKey() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateServer() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateSettings() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateType() *StoragePolicyUpsert
- func (u *StoragePolicyUpsert) UpdateUpdatedAt() *StoragePolicyUpsert
- type StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) AddMaxSize(v int64) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearAccessKey() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearBucketName() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearDeletedAt() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearDirNameRule() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearFileNameRule() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearIsPrivate() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearMaxSize() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearNodeID() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearSecretKey() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearServer() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) ClearSettings() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) DoNothing() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) Exec(ctx context.Context) error
- func (u *StoragePolicyUpsertBulk) ExecX(ctx context.Context)
- func (u *StoragePolicyUpsertBulk) Ignore() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetAccessKey(v string) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetBucketName(v string) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetDeletedAt(v time.Time) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetDirNameRule(v string) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetFileNameRule(v string) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetIsPrivate(v bool) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetMaxSize(v int64) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetName(v string) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetNodeID(v int) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetSecretKey(v string) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetServer(v string) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetSettings(v *types.PolicySetting) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetType(v string) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) SetUpdatedAt(v time.Time) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) Update(set func(*StoragePolicyUpsert)) *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateAccessKey() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateBucketName() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateDeletedAt() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateDirNameRule() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateFileNameRule() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateIsPrivate() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateMaxSize() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateName() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateNewValues() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateNodeID() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateSecretKey() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateServer() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateSettings() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateType() *StoragePolicyUpsertBulk
- func (u *StoragePolicyUpsertBulk) UpdateUpdatedAt() *StoragePolicyUpsertBulk
- type StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) AddMaxSize(v int64) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearAccessKey() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearBucketName() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearDeletedAt() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearDirNameRule() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearFileNameRule() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearIsPrivate() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearMaxSize() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearNodeID() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearSecretKey() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearServer() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) ClearSettings() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) DoNothing() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) Exec(ctx context.Context) error
- func (u *StoragePolicyUpsertOne) ExecX(ctx context.Context)
- func (u *StoragePolicyUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *StoragePolicyUpsertOne) IDX(ctx context.Context) int
- func (u *StoragePolicyUpsertOne) Ignore() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetAccessKey(v string) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetBucketName(v string) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetDeletedAt(v time.Time) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetDirNameRule(v string) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetFileNameRule(v string) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetIsPrivate(v bool) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetMaxSize(v int64) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetName(v string) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetNodeID(v int) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetSecretKey(v string) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetServer(v string) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetSettings(v *types.PolicySetting) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetType(v string) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) SetUpdatedAt(v time.Time) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) Update(set func(*StoragePolicyUpsert)) *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateAccessKey() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateBucketName() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateDeletedAt() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateDirNameRule() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateFileNameRule() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateIsPrivate() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateMaxSize() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateName() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateNewValues() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateNodeID() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateSecretKey() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateServer() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateSettings() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateType() *StoragePolicyUpsertOne
- func (u *StoragePolicyUpsertOne) UpdateUpdatedAt() *StoragePolicyUpsertOne
- type Task
- func (c *Task) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Task) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (t *Task) QueryUser() *UserQuery
- func (e *Task) SetUser(v *User)
- func (t *Task) String() string
- func (t *Task) Unwrap() *Task
- func (t *Task) Update() *TaskUpdateOne
- func (t *Task) Value(name string) (ent.Value, error)
- type TaskClient
- func (c *TaskClient) Create() *TaskCreate
- func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
- func (c *TaskClient) Delete() *TaskDelete
- func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne
- func (c *TaskClient) DeleteOneID(id int) *TaskDeleteOne
- func (c *TaskClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *TaskClient) Get(ctx context.Context, id int) (*Task, error)
- func (c *TaskClient) GetX(ctx context.Context, id int) *Task
- func (c *TaskClient) Hooks() []Hook
- func (c *TaskClient) Intercept(interceptors ...Interceptor)
- func (c *TaskClient) Interceptors() []Interceptor
- func (c *TaskClient) MapCreateBulk(slice any, setFunc func(*TaskCreate, int)) *TaskCreateBulk
- func (c *TaskClient) Query() *TaskQuery
- func (c *TaskClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *TaskClient) QueryUser(t *Task) *UserQuery
- func (c *TaskClient) Update() *TaskUpdate
- func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne
- func (c *TaskClient) UpdateOneID(id int) *TaskUpdateOne
- func (c *TaskClient) Use(hooks ...Hook)
- type TaskCreate
- func (tc *TaskCreate) Exec(ctx context.Context) error
- func (c *TaskCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tc *TaskCreate) ExecX(ctx context.Context)
- func (tc *TaskCreate) Mutation() *TaskMutation
- func (tc *TaskCreate) OnConflict(opts ...sql.ConflictOption) *TaskUpsertOne
- func (tc *TaskCreate) OnConflictColumns(columns ...string) *TaskUpsertOne
- func (c *TaskCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)
- func (tc *TaskCreate) SaveX(ctx context.Context) *Task
- func (tc *TaskCreate) SetCorrelationID(u uuid.UUID) *TaskCreate
- func (tc *TaskCreate) SetCreatedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetDeletedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableCorrelationID(u *uuid.UUID) *TaskCreate
- func (tc *TaskCreate) SetNillableCreatedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableDeletedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillablePrivateState(s *string) *TaskCreate
- func (tc *TaskCreate) SetNillableStatus(t *task.Status) *TaskCreate
- func (tc *TaskCreate) SetNillableUpdatedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableUserID(id *int) *TaskCreate
- func (tc *TaskCreate) SetNillableUserTasks(i *int) *TaskCreate
- func (tc *TaskCreate) SetPrivateState(s string) *TaskCreate
- func (tc *TaskCreate) SetPublicState(tps *types.TaskPublicState) *TaskCreate
- func (m *TaskCreate) SetRawID(t int) *TaskCreate
- func (tc *TaskCreate) SetStatus(t task.Status) *TaskCreate
- func (tc *TaskCreate) SetType(s string) *TaskCreate
- func (tc *TaskCreate) SetUpdatedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetUser(u *User) *TaskCreate
- func (tc *TaskCreate) SetUserID(id int) *TaskCreate
- func (tc *TaskCreate) SetUserTasks(i int) *TaskCreate
- type TaskCreateBulk
- func (tcb *TaskCreateBulk) Exec(ctx context.Context) error
- func (c *TaskCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tcb *TaskCreateBulk) ExecX(ctx context.Context)
- func (tcb *TaskCreateBulk) OnConflict(opts ...sql.ConflictOption) *TaskUpsertBulk
- func (tcb *TaskCreateBulk) OnConflictColumns(columns ...string) *TaskUpsertBulk
- func (c *TaskCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tcb *TaskCreateBulk) Save(ctx context.Context) ([]*Task, error)
- func (tcb *TaskCreateBulk) SaveX(ctx context.Context) []*Task
- type TaskDelete
- func (td *TaskDelete) Exec(ctx context.Context) (int, error)
- func (c *TaskDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (td *TaskDelete) ExecX(ctx context.Context) int
- func (c *TaskDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete
- type TaskDeleteOne
- type TaskEdges
- type TaskGroupBy
- func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
- func (s *TaskGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TaskGroupBy) BoolX(ctx context.Context) bool
- func (s *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TaskGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TaskGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TaskGroupBy) Float64X(ctx context.Context) float64
- func (s *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TaskGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TaskGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TaskGroupBy) IntX(ctx context.Context) int
- func (s *TaskGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TaskGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TaskGroupBy) Scan(ctx context.Context, v any) error
- func (s *TaskGroupBy) ScanX(ctx context.Context, v any)
- func (s *TaskGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TaskGroupBy) StringX(ctx context.Context) string
- func (s *TaskGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TaskGroupBy) StringsX(ctx context.Context) []string
- type TaskMutation
- func (m *TaskMutation) AddField(name string, value ent.Value) error
- func (m *TaskMutation) AddedEdges() []string
- func (m *TaskMutation) AddedField(name string) (ent.Value, bool)
- func (m *TaskMutation) AddedFields() []string
- func (m *TaskMutation) AddedIDs(name string) []ent.Value
- func (m *TaskMutation) ClearCorrelationID()
- func (m *TaskMutation) ClearDeletedAt()
- func (m *TaskMutation) ClearEdge(name string) error
- func (m *TaskMutation) ClearField(name string) error
- func (m *TaskMutation) ClearPrivateState()
- func (m *TaskMutation) ClearUser()
- func (m *TaskMutation) ClearUserTasks()
- func (m *TaskMutation) ClearedEdges() []string
- func (m *TaskMutation) ClearedFields() []string
- func (m TaskMutation) Client() *Client
- func (m *TaskMutation) CorrelationID() (r uuid.UUID, exists bool)
- func (m *TaskMutation) CorrelationIDCleared() bool
- func (m *TaskMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TaskMutation) DeletedAt() (r time.Time, exists bool)
- func (m *TaskMutation) DeletedAtCleared() bool
- func (m *TaskMutation) EdgeCleared(name string) bool
- func (c *TaskMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *TaskMutation) Field(name string) (ent.Value, bool)
- func (m *TaskMutation) FieldCleared(name string) bool
- func (m *TaskMutation) Fields() []string
- func (m *TaskMutation) GetType() (r string, exists bool)
- func (m *TaskMutation) ID() (id int, exists bool)
- func (m *TaskMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TaskMutation) OldCorrelationID(ctx context.Context) (v uuid.UUID, err error)
- func (m *TaskMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *TaskMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TaskMutation) OldPrivateState(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldPublicState(ctx context.Context) (v *types.TaskPublicState, err error)
- func (m *TaskMutation) OldStatus(ctx context.Context) (v task.Status, err error)
- func (m *TaskMutation) OldType(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldUserTasks(ctx context.Context) (v int, err error)
- func (m *TaskMutation) Op() Op
- func (m *TaskMutation) PrivateState() (r string, exists bool)
- func (m *TaskMutation) PrivateStateCleared() bool
- func (m *TaskMutation) PublicState() (r *types.TaskPublicState, exists bool)
- func (c *TaskMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *TaskMutation) RemovedEdges() []string
- func (m *TaskMutation) RemovedIDs(name string) []ent.Value
- func (m *TaskMutation) ResetCorrelationID()
- func (m *TaskMutation) ResetCreatedAt()
- func (m *TaskMutation) ResetDeletedAt()
- func (m *TaskMutation) ResetEdge(name string) error
- func (m *TaskMutation) ResetField(name string) error
- func (m *TaskMutation) ResetPrivateState()
- func (m *TaskMutation) ResetPublicState()
- func (m *TaskMutation) ResetStatus()
- func (m *TaskMutation) ResetType()
- func (m *TaskMutation) ResetUpdatedAt()
- func (m *TaskMutation) ResetUser()
- func (m *TaskMutation) ResetUserTasks()
- func (m *TaskMutation) SetCorrelationID(u uuid.UUID)
- func (m *TaskMutation) SetCreatedAt(t time.Time)
- func (m *TaskMutation) SetDeletedAt(t time.Time)
- func (m *TaskMutation) SetField(name string, value ent.Value) error
- func (m *TaskMutation) SetOp(op Op)
- func (m *TaskMutation) SetPrivateState(s string)
- func (m *TaskMutation) SetPublicState(tps *types.TaskPublicState)
- func (m *TaskMutation) SetRawID(t int)
- func (m *TaskMutation) SetStatus(t task.Status)
- func (m *TaskMutation) SetType(s string)
- func (m *TaskMutation) SetUpdatedAt(t time.Time)
- func (m *TaskMutation) SetUserID(id int)
- func (m *TaskMutation) SetUserTasks(i int)
- func (m *TaskMutation) Status() (r task.Status, exists bool)
- func (m TaskMutation) Tx() (*Tx, error)
- func (m *TaskMutation) Type() string
- func (m *TaskMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *TaskMutation) UserCleared() bool
- func (m *TaskMutation) UserID() (id int, exists bool)
- func (m *TaskMutation) UserIDs() (ids []int)
- func (m *TaskMutation) UserTasks() (r int, exists bool)
- func (m *TaskMutation) UserTasksCleared() bool
- func (m *TaskMutation) Where(ps ...predicate.Task)
- func (m *TaskMutation) WhereP(ps ...func(*sql.Selector))
- type TaskQuery
- func (tq *TaskQuery) Aggregate(fns ...AggregateFunc) *TaskSelect
- func (tq *TaskQuery) All(ctx context.Context) ([]*Task, error)
- func (tq *TaskQuery) AllX(ctx context.Context) []*Task
- func (tq *TaskQuery) Clone() *TaskQuery
- func (tq *TaskQuery) Count(ctx context.Context) (int, error)
- func (tq *TaskQuery) CountX(ctx context.Context) int
- func (c *TaskQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tq *TaskQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TaskQuery) ExistX(ctx context.Context) bool
- func (tq *TaskQuery) First(ctx context.Context) (*Task, error)
- func (tq *TaskQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TaskQuery) FirstIDX(ctx context.Context) int
- func (tq *TaskQuery) FirstX(ctx context.Context) *Task
- func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
- func (tq *TaskQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TaskQuery) IDsX(ctx context.Context) []int
- func (tq *TaskQuery) Limit(limit int) *TaskQuery
- func (tq *TaskQuery) Offset(offset int) *TaskQuery
- func (tq *TaskQuery) Only(ctx context.Context) (*Task, error)
- func (tq *TaskQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TaskQuery) OnlyIDX(ctx context.Context) int
- func (tq *TaskQuery) OnlyX(ctx context.Context) *Task
- func (tq *TaskQuery) Order(o ...task.OrderOption) *TaskQuery
- func (c *TaskQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tq *TaskQuery) QueryUser() *UserQuery
- func (tq *TaskQuery) Select(fields ...string) *TaskSelect
- func (tq *TaskQuery) Unique(unique bool) *TaskQuery
- func (tq *TaskQuery) Where(ps ...predicate.Task) *TaskQuery
- func (tq *TaskQuery) WithUser(opts ...func(*UserQuery)) *TaskQuery
- type TaskSelect
- func (ts *TaskSelect) Aggregate(fns ...AggregateFunc) *TaskSelect
- func (s *TaskSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TaskSelect) BoolX(ctx context.Context) bool
- func (s *TaskSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TaskSelect) BoolsX(ctx context.Context) []bool
- func (c TaskSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *TaskSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TaskSelect) Float64X(ctx context.Context) float64
- func (s *TaskSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TaskSelect) Float64sX(ctx context.Context) []float64
- func (s *TaskSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TaskSelect) IntX(ctx context.Context) int
- func (s *TaskSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TaskSelect) IntsX(ctx context.Context) []int
- func (c TaskSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ts *TaskSelect) Scan(ctx context.Context, v any) error
- func (s *TaskSelect) ScanX(ctx context.Context, v any)
- func (s *TaskSelect) String(ctx context.Context) (_ string, err error)
- func (s *TaskSelect) StringX(ctx context.Context) string
- func (s *TaskSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TaskSelect) StringsX(ctx context.Context) []string
- type TaskUpdate
- func (tu *TaskUpdate) ClearDeletedAt() *TaskUpdate
- func (tu *TaskUpdate) ClearPrivateState() *TaskUpdate
- func (tu *TaskUpdate) ClearUser() *TaskUpdate
- func (tu *TaskUpdate) ClearUserTasks() *TaskUpdate
- func (tu *TaskUpdate) Exec(ctx context.Context) error
- func (c *TaskUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tu *TaskUpdate) ExecX(ctx context.Context)
- func (tu *TaskUpdate) Mutation() *TaskMutation
- func (c *TaskUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tu *TaskUpdate) Save(ctx context.Context) (int, error)
- func (tu *TaskUpdate) SaveX(ctx context.Context) int
- func (tu *TaskUpdate) SetDeletedAt(t time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetNillableDeletedAt(t *time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetNillablePrivateState(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableStatus(t *task.Status) *TaskUpdate
- func (tu *TaskUpdate) SetNillableType(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableUserID(id *int) *TaskUpdate
- func (tu *TaskUpdate) SetNillableUserTasks(i *int) *TaskUpdate
- func (tu *TaskUpdate) SetPrivateState(s string) *TaskUpdate
- func (tu *TaskUpdate) SetPublicState(tps *types.TaskPublicState) *TaskUpdate
- func (tu *TaskUpdate) SetStatus(t task.Status) *TaskUpdate
- func (tu *TaskUpdate) SetType(s string) *TaskUpdate
- func (tu *TaskUpdate) SetUpdatedAt(t time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetUser(u *User) *TaskUpdate
- func (tu *TaskUpdate) SetUserID(id int) *TaskUpdate
- func (tu *TaskUpdate) SetUserTasks(i int) *TaskUpdate
- func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
- type TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearDeletedAt() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearPrivateState() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearUser() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearUserTasks() *TaskUpdateOne
- func (tuo *TaskUpdateOne) Exec(ctx context.Context) error
- func (c *TaskUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tuo *TaskUpdateOne) ExecX(ctx context.Context)
- func (tuo *TaskUpdateOne) Mutation() *TaskMutation
- func (c *TaskUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
- func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task
- func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetDeletedAt(t time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableDeletedAt(t *time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillablePrivateState(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableStatus(t *task.Status) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableType(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableUserID(id *int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableUserTasks(i *int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetPrivateState(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetPublicState(tps *types.TaskPublicState) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetStatus(t task.Status) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetType(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetUpdatedAt(t time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetUser(u *User) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetUserID(id int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetUserTasks(i int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) Where(ps ...predicate.Task) *TaskUpdateOne
- type TaskUpsert
- func (u *TaskUpsert) ClearDeletedAt() *TaskUpsert
- func (u *TaskUpsert) ClearPrivateState() *TaskUpsert
- func (u *TaskUpsert) ClearUserTasks() *TaskUpsert
- func (u *TaskUpsert) SetDeletedAt(v time.Time) *TaskUpsert
- func (u *TaskUpsert) SetPrivateState(v string) *TaskUpsert
- func (u *TaskUpsert) SetPublicState(v *types.TaskPublicState) *TaskUpsert
- func (u *TaskUpsert) SetStatus(v task.Status) *TaskUpsert
- func (u *TaskUpsert) SetType(v string) *TaskUpsert
- func (u *TaskUpsert) SetUpdatedAt(v time.Time) *TaskUpsert
- func (u *TaskUpsert) SetUserTasks(v int) *TaskUpsert
- func (u *TaskUpsert) UpdateDeletedAt() *TaskUpsert
- func (u *TaskUpsert) UpdatePrivateState() *TaskUpsert
- func (u *TaskUpsert) UpdatePublicState() *TaskUpsert
- func (u *TaskUpsert) UpdateStatus() *TaskUpsert
- func (u *TaskUpsert) UpdateType() *TaskUpsert
- func (u *TaskUpsert) UpdateUpdatedAt() *TaskUpsert
- func (u *TaskUpsert) UpdateUserTasks() *TaskUpsert
- type TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearDeletedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearPrivateState() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearUserTasks() *TaskUpsertBulk
- func (u *TaskUpsertBulk) DoNothing() *TaskUpsertBulk
- func (u *TaskUpsertBulk) Exec(ctx context.Context) error
- func (u *TaskUpsertBulk) ExecX(ctx context.Context)
- func (u *TaskUpsertBulk) Ignore() *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetDeletedAt(v time.Time) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetPrivateState(v string) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetPublicState(v *types.TaskPublicState) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetStatus(v task.Status) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetType(v string) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetUpdatedAt(v time.Time) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetUserTasks(v int) *TaskUpsertBulk
- func (u *TaskUpsertBulk) Update(set func(*TaskUpsert)) *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateDeletedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateNewValues() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdatePrivateState() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdatePublicState() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateStatus() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateType() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateUpdatedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateUserTasks() *TaskUpsertBulk
- type TaskUpsertOne
- func (u *TaskUpsertOne) ClearDeletedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearPrivateState() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearUserTasks() *TaskUpsertOne
- func (u *TaskUpsertOne) DoNothing() *TaskUpsertOne
- func (u *TaskUpsertOne) Exec(ctx context.Context) error
- func (u *TaskUpsertOne) ExecX(ctx context.Context)
- func (u *TaskUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *TaskUpsertOne) IDX(ctx context.Context) int
- func (u *TaskUpsertOne) Ignore() *TaskUpsertOne
- func (u *TaskUpsertOne) SetDeletedAt(v time.Time) *TaskUpsertOne
- func (u *TaskUpsertOne) SetPrivateState(v string) *TaskUpsertOne
- func (u *TaskUpsertOne) SetPublicState(v *types.TaskPublicState) *TaskUpsertOne
- func (u *TaskUpsertOne) SetStatus(v task.Status) *TaskUpsertOne
- func (u *TaskUpsertOne) SetType(v string) *TaskUpsertOne
- func (u *TaskUpsertOne) SetUpdatedAt(v time.Time) *TaskUpsertOne
- func (u *TaskUpsertOne) SetUserTasks(v int) *TaskUpsertOne
- func (u *TaskUpsertOne) Update(set func(*TaskUpsert)) *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateDeletedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateNewValues() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdatePrivateState() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdatePublicState() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateStatus() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateType() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateUpdatedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateUserTasks() *TaskUpsertOne
- type Tasks
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- type User
- func (c *User) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *User) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (u *User) QueryDavAccounts() *DavAccountQuery
- func (u *User) QueryEntities() *EntityQuery
- func (u *User) QueryFiles() *FileQuery
- func (u *User) QueryFsevents() *FsEventQuery
- func (u *User) QueryGroup() *GroupQuery
- func (u *User) QueryOauthGrants() *OAuthGrantQuery
- func (u *User) QueryPasskey() *PasskeyQuery
- func (u *User) QueryShares() *ShareQuery
- func (u *User) QueryTasks() *TaskQuery
- func (e *User) SetDavAccounts(v []*DavAccount)
- func (e *User) SetEntities(v []*Entity)
- func (e *User) SetFiles(v []*File)
- func (e *User) SetFsevents(v []*FsEvent)
- func (e *User) SetGroup(v *Group)
- func (e *User) SetOauthGrants(v []*OAuthGrant)
- func (e *User) SetPasskey(v []*Passkey)
- func (e *User) SetShares(v []*Share)
- func (e *User) SetTasks(v []*Task)
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *UserClient) QueryDavAccounts(u *User) *DavAccountQuery
- func (c *UserClient) QueryEntities(u *User) *EntityQuery
- func (c *UserClient) QueryFiles(u *User) *FileQuery
- func (c *UserClient) QueryFsevents(u *User) *FsEventQuery
- func (c *UserClient) QueryGroup(u *User) *GroupQuery
- func (c *UserClient) QueryOauthGrants(u *User) *OAuthGrantQuery
- func (c *UserClient) QueryPasskey(u *User) *PasskeyQuery
- func (c *UserClient) QueryShares(u *User) *ShareQuery
- func (c *UserClient) QueryTasks(u *User) *TaskQuery
- 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) AddDavAccountIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddDavAccounts(d ...*DavAccount) *UserCreate
- func (uc *UserCreate) AddEntities(e ...*Entity) *UserCreate
- func (uc *UserCreate) AddEntityIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddFileIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddFiles(f ...*File) *UserCreate
- func (uc *UserCreate) AddFseventIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddFsevents(f ...*FsEvent) *UserCreate
- func (uc *UserCreate) AddOauthGrantIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddOauthGrants(o ...*OAuthGrant) *UserCreate
- func (uc *UserCreate) AddPasskey(p ...*Passkey) *UserCreate
- func (uc *UserCreate) AddPasskeyIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddShareIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddShares(s ...*Share) *UserCreate
- func (uc *UserCreate) AddTaskIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddTasks(t ...*Task) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAvatar(s string) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetGroup(g *Group) *UserCreate
- func (uc *UserCreate) SetGroupID(id int) *UserCreate
- func (uc *UserCreate) SetGroupUsers(i int) *UserCreate
- func (uc *UserCreate) SetNick(s string) *UserCreate
- func (uc *UserCreate) SetNillableAvatar(s *string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
- func (uc *UserCreate) SetNillableStatus(u *user.Status) *UserCreate
- func (uc *UserCreate) SetNillableStorage(i *int64) *UserCreate
- func (uc *UserCreate) SetNillableTwoFactorSecret(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (m *UserCreate) SetRawID(t int) *UserCreate
- func (uc *UserCreate) SetSettings(ts *types.UserSetting) *UserCreate
- func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
- func (uc *UserCreate) SetStorage(i int64) *UserCreate
- func (uc *UserCreate) SetTwoFactorSecret(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- func (ud *UserDelete) Exec(ctx context.Context) (int, error)
- func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ud *UserDelete) ExecX(ctx context.Context) int
- func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
- type UserDeleteOne
- type UserEdges
- func (e UserEdges) DavAccountsOrErr() ([]*DavAccount, error)
- func (e UserEdges) EntitiesOrErr() ([]*Entity, error)
- func (e UserEdges) FilesOrErr() ([]*File, error)
- func (e UserEdges) FseventsOrErr() ([]*FsEvent, error)
- func (e UserEdges) GroupOrErr() (*Group, error)
- func (e UserEdges) OauthGrantsOrErr() ([]*OAuthGrant, error)
- func (e UserEdges) PasskeyOrErr() ([]*Passkey, error)
- func (e UserEdges) SharesOrErr() ([]*Share, error)
- func (e UserEdges) TasksOrErr() ([]*Task, error)
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddDavAccountIDs(ids ...int)
- func (m *UserMutation) AddEntityIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddFileIDs(ids ...int)
- func (m *UserMutation) AddFseventIDs(ids ...int)
- func (m *UserMutation) AddOauthGrantIDs(ids ...int)
- func (m *UserMutation) AddPasskeyIDs(ids ...int)
- func (m *UserMutation) AddShareIDs(ids ...int)
- func (m *UserMutation) AddStorage(i int64)
- func (m *UserMutation) AddTaskIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedStorage() (r int64, exists bool)
- func (m *UserMutation) Avatar() (r string, exists bool)
- func (m *UserMutation) AvatarCleared() bool
- func (m *UserMutation) ClearAvatar()
- func (m *UserMutation) ClearDavAccounts()
- func (m *UserMutation) ClearDeletedAt()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearEntities()
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearFiles()
- func (m *UserMutation) ClearFsevents()
- func (m *UserMutation) ClearGroup()
- func (m *UserMutation) ClearOauthGrants()
- func (m *UserMutation) ClearPasskey()
- func (m *UserMutation) ClearPassword()
- func (m *UserMutation) ClearSettings()
- func (m *UserMutation) ClearShares()
- func (m *UserMutation) ClearTasks()
- func (m *UserMutation) ClearTwoFactorSecret()
- 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) DavAccountsCleared() bool
- func (m *UserMutation) DavAccountsIDs() (ids []int)
- func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
- func (m *UserMutation) DeletedAtCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) EntitiesCleared() bool
- func (m *UserMutation) EntitiesIDs() (ids []int)
- func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FilesCleared() bool
- func (m *UserMutation) FilesIDs() (ids []int)
- func (m *UserMutation) FseventsCleared() bool
- func (m *UserMutation) FseventsIDs() (ids []int)
- func (m *UserMutation) GroupCleared() bool
- func (m *UserMutation) GroupID() (id int, exists bool)
- func (m *UserMutation) GroupIDs() (ids []int)
- func (m *UserMutation) GroupUsers() (r int, exists bool)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) Nick() (r string, exists bool)
- func (m *UserMutation) OauthGrantsCleared() bool
- func (m *UserMutation) OauthGrantsIDs() (ids []int)
- func (m *UserMutation) OldAvatar(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldGroupUsers(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldNick(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldSettings(ctx context.Context) (v *types.UserSetting, err error)
- func (m *UserMutation) OldStatus(ctx context.Context) (v user.Status, err error)
- func (m *UserMutation) OldStorage(ctx context.Context) (v int64, err error)
- func (m *UserMutation) OldTwoFactorSecret(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) PasskeyCleared() bool
- func (m *UserMutation) PasskeyIDs() (ids []int)
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PasswordCleared() bool
- func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *UserMutation) RemoveDavAccountIDs(ids ...int)
- func (m *UserMutation) RemoveEntityIDs(ids ...int)
- func (m *UserMutation) RemoveFileIDs(ids ...int)
- func (m *UserMutation) RemoveFseventIDs(ids ...int)
- func (m *UserMutation) RemoveOauthGrantIDs(ids ...int)
- func (m *UserMutation) RemovePasskeyIDs(ids ...int)
- func (m *UserMutation) RemoveShareIDs(ids ...int)
- func (m *UserMutation) RemoveTaskIDs(ids ...int)
- func (m *UserMutation) RemovedDavAccountsIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedEntitiesIDs() (ids []int)
- func (m *UserMutation) RemovedFilesIDs() (ids []int)
- func (m *UserMutation) RemovedFseventsIDs() (ids []int)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedOauthGrantsIDs() (ids []int)
- func (m *UserMutation) RemovedPasskeyIDs() (ids []int)
- func (m *UserMutation) RemovedSharesIDs() (ids []int)
- func (m *UserMutation) RemovedTasksIDs() (ids []int)
- func (m *UserMutation) ResetAvatar()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDavAccounts()
- func (m *UserMutation) ResetDeletedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetEntities()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFiles()
- func (m *UserMutation) ResetFsevents()
- func (m *UserMutation) ResetGroup()
- func (m *UserMutation) ResetGroupUsers()
- func (m *UserMutation) ResetNick()
- func (m *UserMutation) ResetOauthGrants()
- func (m *UserMutation) ResetPasskey()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetSettings()
- func (m *UserMutation) ResetShares()
- func (m *UserMutation) ResetStatus()
- func (m *UserMutation) ResetStorage()
- func (m *UserMutation) ResetTasks()
- func (m *UserMutation) ResetTwoFactorSecret()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) SetAvatar(s string)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDeletedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetGroupID(id int)
- func (m *UserMutation) SetGroupUsers(i int)
- func (m *UserMutation) SetNick(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetRawID(t int)
- func (m *UserMutation) SetSettings(ts *types.UserSetting)
- func (m *UserMutation) SetStatus(u user.Status)
- func (m *UserMutation) SetStorage(i int64)
- func (m *UserMutation) SetTwoFactorSecret(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) Settings() (r *types.UserSetting, exists bool)
- func (m *UserMutation) SettingsCleared() bool
- func (m *UserMutation) SharesCleared() bool
- func (m *UserMutation) SharesIDs() (ids []int)
- func (m *UserMutation) Status() (r user.Status, exists bool)
- func (m *UserMutation) Storage() (r int64, exists bool)
- func (m *UserMutation) TasksCleared() bool
- func (m *UserMutation) TasksIDs() (ids []int)
- func (m *UserMutation) TwoFactorSecret() (r string, exists bool)
- func (m *UserMutation) TwoFactorSecretCleared() bool
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id 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) (ids []int, err 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 ...user.OrderOption) *UserQuery
- func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uq *UserQuery) QueryDavAccounts() *DavAccountQuery
- func (uq *UserQuery) QueryEntities() *EntityQuery
- func (uq *UserQuery) QueryFiles() *FileQuery
- func (uq *UserQuery) QueryFsevents() *FsEventQuery
- func (uq *UserQuery) QueryGroup() *GroupQuery
- func (uq *UserQuery) QueryOauthGrants() *OAuthGrantQuery
- func (uq *UserQuery) QueryPasskey() *PasskeyQuery
- func (uq *UserQuery) QueryShares() *ShareQuery
- func (uq *UserQuery) QueryTasks() *TaskQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithDavAccounts(opts ...func(*DavAccountQuery)) *UserQuery
- func (uq *UserQuery) WithEntities(opts ...func(*EntityQuery)) *UserQuery
- func (uq *UserQuery) WithFiles(opts ...func(*FileQuery)) *UserQuery
- func (uq *UserQuery) WithFsevents(opts ...func(*FsEventQuery)) *UserQuery
- func (uq *UserQuery) WithGroup(opts ...func(*GroupQuery)) *UserQuery
- func (uq *UserQuery) WithOauthGrants(opts ...func(*OAuthGrantQuery)) *UserQuery
- func (uq *UserQuery) WithPasskey(opts ...func(*PasskeyQuery)) *UserQuery
- func (uq *UserQuery) WithShares(opts ...func(*ShareQuery)) *UserQuery
- func (uq *UserQuery) WithTasks(opts ...func(*TaskQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddDavAccountIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddDavAccounts(d ...*DavAccount) *UserUpdate
- func (uu *UserUpdate) AddEntities(e ...*Entity) *UserUpdate
- func (uu *UserUpdate) AddEntityIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddFileIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddFiles(f ...*File) *UserUpdate
- func (uu *UserUpdate) AddFseventIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddFsevents(f ...*FsEvent) *UserUpdate
- func (uu *UserUpdate) AddOauthGrantIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddOauthGrants(o ...*OAuthGrant) *UserUpdate
- func (uu *UserUpdate) AddPasskey(p ...*Passkey) *UserUpdate
- func (uu *UserUpdate) AddPasskeyIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddShares(s ...*Share) *UserUpdate
- func (uu *UserUpdate) AddStorage(i int64) *UserUpdate
- func (uu *UserUpdate) AddTaskIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddTasks(t ...*Task) *UserUpdate
- func (uu *UserUpdate) ClearAvatar() *UserUpdate
- func (uu *UserUpdate) ClearDavAccounts() *UserUpdate
- func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
- func (uu *UserUpdate) ClearEntities() *UserUpdate
- func (uu *UserUpdate) ClearFiles() *UserUpdate
- func (uu *UserUpdate) ClearFsevents() *UserUpdate
- func (uu *UserUpdate) ClearGroup() *UserUpdate
- func (uu *UserUpdate) ClearOauthGrants() *UserUpdate
- func (uu *UserUpdate) ClearPasskey() *UserUpdate
- func (uu *UserUpdate) ClearPassword() *UserUpdate
- func (uu *UserUpdate) ClearSettings() *UserUpdate
- func (uu *UserUpdate) ClearShares() *UserUpdate
- func (uu *UserUpdate) ClearTasks() *UserUpdate
- func (uu *UserUpdate) ClearTwoFactorSecret() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uu *UserUpdate) RemoveDavAccountIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveDavAccounts(d ...*DavAccount) *UserUpdate
- func (uu *UserUpdate) RemoveEntities(e ...*Entity) *UserUpdate
- func (uu *UserUpdate) RemoveEntityIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveFileIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveFiles(f ...*File) *UserUpdate
- func (uu *UserUpdate) RemoveFseventIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveFsevents(f ...*FsEvent) *UserUpdate
- func (uu *UserUpdate) RemoveOauthGrantIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveOauthGrants(o ...*OAuthGrant) *UserUpdate
- func (uu *UserUpdate) RemovePasskey(p ...*Passkey) *UserUpdate
- func (uu *UserUpdate) RemovePasskeyIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveShares(s ...*Share) *UserUpdate
- func (uu *UserUpdate) RemoveTaskIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveTasks(t ...*Task) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAvatar(s string) *UserUpdate
- func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetGroup(g *Group) *UserUpdate
- func (uu *UserUpdate) SetGroupID(id int) *UserUpdate
- func (uu *UserUpdate) SetGroupUsers(i int) *UserUpdate
- func (uu *UserUpdate) SetNick(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableAvatar(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableGroupUsers(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableNick(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableStatus(u *user.Status) *UserUpdate
- func (uu *UserUpdate) SetNillableStorage(i *int64) *UserUpdate
- func (uu *UserUpdate) SetNillableTwoFactorSecret(s *string) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetSettings(ts *types.UserSetting) *UserUpdate
- func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
- func (uu *UserUpdate) SetStorage(i int64) *UserUpdate
- func (uu *UserUpdate) SetTwoFactorSecret(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddDavAccountIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddDavAccounts(d ...*DavAccount) *UserUpdateOne
- func (uuo *UserUpdateOne) AddEntities(e ...*Entity) *UserUpdateOne
- func (uuo *UserUpdateOne) AddEntityIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFileIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFiles(f ...*File) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFseventIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFsevents(f ...*FsEvent) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOauthGrantIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOauthGrants(o ...*OAuthGrant) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPasskey(p ...*Passkey) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPasskeyIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddShares(s ...*Share) *UserUpdateOne
- func (uuo *UserUpdateOne) AddStorage(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTaskIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTasks(t ...*Task) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAvatar() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDavAccounts() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEntities() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFiles() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFsevents() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroup() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOauthGrants() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPasskey() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSettings() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearShares() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTasks() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTwoFactorSecret() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uuo *UserUpdateOne) RemoveDavAccountIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveDavAccounts(d ...*DavAccount) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveEntities(e ...*Entity) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveEntityIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFileIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFiles(f ...*File) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFseventIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFsevents(f ...*FsEvent) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveOauthGrantIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveOauthGrants(o ...*OAuthGrant) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePasskey(p ...*Passkey) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePasskeyIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveShares(s ...*Share) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveTaskIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveTasks(t ...*Task) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAvatar(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGroup(g *Group) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGroupID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGroupUsers(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNick(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAvatar(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableGroupUsers(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableNick(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableStatus(u *user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableStorage(i *int64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTwoFactorSecret(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSettings(ts *types.UserSetting) *UserUpdateOne
- func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetStorage(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTwoFactorSecret(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) AddStorage(v int64) *UserUpsert
- func (u *UserUpsert) ClearAvatar() *UserUpsert
- func (u *UserUpsert) ClearDeletedAt() *UserUpsert
- func (u *UserUpsert) ClearPassword() *UserUpsert
- func (u *UserUpsert) ClearSettings() *UserUpsert
- func (u *UserUpsert) ClearTwoFactorSecret() *UserUpsert
- func (u *UserUpsert) SetAvatar(v string) *UserUpsert
- func (u *UserUpsert) SetDeletedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetEmail(v string) *UserUpsert
- func (u *UserUpsert) SetGroupUsers(v int) *UserUpsert
- func (u *UserUpsert) SetNick(v string) *UserUpsert
- func (u *UserUpsert) SetPassword(v string) *UserUpsert
- func (u *UserUpsert) SetSettings(v *types.UserSetting) *UserUpsert
- func (u *UserUpsert) SetStatus(v user.Status) *UserUpsert
- func (u *UserUpsert) SetStorage(v int64) *UserUpsert
- func (u *UserUpsert) SetTwoFactorSecret(v string) *UserUpsert
- func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) UpdateAvatar() *UserUpsert
- func (u *UserUpsert) UpdateDeletedAt() *UserUpsert
- func (u *UserUpsert) UpdateEmail() *UserUpsert
- func (u *UserUpsert) UpdateGroupUsers() *UserUpsert
- func (u *UserUpsert) UpdateNick() *UserUpsert
- func (u *UserUpsert) UpdatePassword() *UserUpsert
- func (u *UserUpsert) UpdateSettings() *UserUpsert
- func (u *UserUpsert) UpdateStatus() *UserUpsert
- func (u *UserUpsert) UpdateStorage() *UserUpsert
- func (u *UserUpsert) UpdateTwoFactorSecret() *UserUpsert
- func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) AddStorage(v int64) *UserUpsertBulk
- func (u *UserUpsertBulk) ClearAvatar() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearDeletedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearPassword() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearSettings() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearTwoFactorSecret() *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) SetAvatar(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetDeletedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetGroupUsers(v int) *UserUpsertBulk
- func (u *UserUpsertBulk) SetNick(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetSettings(v *types.UserSetting) *UserUpsertBulk
- func (u *UserUpsertBulk) SetStatus(v user.Status) *UserUpsertBulk
- func (u *UserUpsertBulk) SetStorage(v int64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetTwoFactorSecret(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateAvatar() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateDeletedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateGroupUsers() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNick() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateSettings() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateStatus() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateStorage() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateTwoFactorSecret() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) AddStorage(v int64) *UserUpsertOne
- func (u *UserUpsertOne) ClearAvatar() *UserUpsertOne
- func (u *UserUpsertOne) ClearDeletedAt() *UserUpsertOne
- func (u *UserUpsertOne) ClearPassword() *UserUpsertOne
- func (u *UserUpsertOne) ClearSettings() *UserUpsertOne
- func (u *UserUpsertOne) ClearTwoFactorSecret() *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) SetAvatar(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetDeletedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetGroupUsers(v int) *UserUpsertOne
- func (u *UserUpsertOne) SetNick(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetSettings(v *types.UserSetting) *UserUpsertOne
- func (u *UserUpsertOne) SetStatus(v user.Status) *UserUpsertOne
- func (u *UserUpsertOne) SetStorage(v int64) *UserUpsertOne
- func (u *UserUpsertOne) SetTwoFactorSecret(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateAvatar() *UserUpsertOne
- func (u *UserUpsertOne) UpdateDeletedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
- func (u *UserUpsertOne) UpdateGroupUsers() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNick() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
- func (u *UserUpsertOne) UpdateSettings() *UserUpsertOne
- func (u *UserUpsertOne) UpdateStatus() *UserUpsertOne
- func (u *UserUpsertOne) UpdateStorage() *UserUpsertOne
- func (u *UserUpsertOne) UpdateTwoFactorSecret() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUpdatedAt() *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. TypeDavAccount = "DavAccount" TypeDirectLink = "DirectLink" TypeEntity = "Entity" TypeFile = "File" TypeFsEvent = "FsEvent" TypeGroup = "Group" TypeMetadata = "Metadata" TypeNode = "Node" TypeOAuthClient = "OAuthClient" TypeOAuthGrant = "OAuthGrant" TypePasskey = "Passkey" TypeSetting = "Setting" TypeStoragePolicy = "StoragePolicy" TypeTask = "Task" TypeUser = "User" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// DavAccount is the client for interacting with the DavAccount builders.
DavAccount *DavAccountClient
// DirectLink is the client for interacting with the DirectLink builders.
DirectLink *DirectLinkClient
// Entity is the client for interacting with the Entity builders.
Entity *EntityClient
// File is the client for interacting with the File builders.
File *FileClient
// FsEvent is the client for interacting with the FsEvent builders.
FsEvent *FsEventClient
// Group is the client for interacting with the Group builders.
Group *GroupClient
// Metadata is the client for interacting with the Metadata builders.
Metadata *MetadataClient
// Node is the client for interacting with the Node builders.
Node *NodeClient
// OAuthClient is the client for interacting with the OAuthClient builders.
OAuthClient *OAuthClientClient
// OAuthGrant is the client for interacting with the OAuthGrant builders.
OAuthGrant *OAuthGrantClient
// Passkey is the client for interacting with the Passkey builders.
Passkey *PasskeyClient
// Setting is the client for interacting with the Setting builders.
Setting *SettingClient
Share *ShareClient
// StoragePolicy is the client for interacting with the StoragePolicy builders.
StoragePolicy *StoragePolicyClient
// Task is the client for interacting with the Task builders.
Task *TaskClient
// 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(). DavAccount. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type 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 DavAccount ¶
type DavAccount struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// URI holds the value of the "uri" field.
URI string `json:"uri,omitempty"`
// Password holds the value of the "password" field.
Password string `json:"-"`
// Options holds the value of the "options" field.
Options *boolset.BooleanSet `json:"options,omitempty"`
// Props holds the value of the "props" field.
Props *types.DavAccountProps `json:"props,omitempty"`
// OwnerID holds the value of the "owner_id" field.
OwnerID int `json:"owner_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the DavAccountQuery when eager-loading is set.
Edges DavAccountEdges `json:"edges"`
// contains filtered or unexported fields
}
DavAccount is the model entity for the DavAccount schema.
func (*DavAccount) ExecContext ¶
func (c *DavAccount) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccount) QueryContext ¶
func (c *DavAccount) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccount) QueryOwner ¶
func (da *DavAccount) QueryOwner() *UserQuery
QueryOwner queries the "owner" edge of the DavAccount entity.
func (*DavAccount) SetOwner ¶
func (e *DavAccount) SetOwner(v *User)
SetOwner manually set the edge as loaded state.
func (*DavAccount) String ¶
func (da *DavAccount) String() string
String implements the fmt.Stringer.
func (*DavAccount) Unwrap ¶
func (da *DavAccount) Unwrap() *DavAccount
Unwrap unwraps the DavAccount 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 (*DavAccount) Update ¶
func (da *DavAccount) Update() *DavAccountUpdateOne
Update returns a builder for updating this DavAccount. Note that you need to call DavAccount.Unwrap() before calling this method if this DavAccount was returned from a transaction, and the transaction was committed or rolled back.
type DavAccountClient ¶
type DavAccountClient struct {
// contains filtered or unexported fields
}
DavAccountClient is a client for the DavAccount schema.
func NewDavAccountClient ¶
func NewDavAccountClient(c config) *DavAccountClient
NewDavAccountClient returns a client for the DavAccount from the given config.
func (*DavAccountClient) Create ¶
func (c *DavAccountClient) Create() *DavAccountCreate
Create returns a builder for creating a DavAccount entity.
func (*DavAccountClient) CreateBulk ¶
func (c *DavAccountClient) CreateBulk(builders ...*DavAccountCreate) *DavAccountCreateBulk
CreateBulk returns a builder for creating a bulk of DavAccount entities.
func (*DavAccountClient) Delete ¶
func (c *DavAccountClient) Delete() *DavAccountDelete
Delete returns a delete builder for DavAccount.
func (*DavAccountClient) DeleteOne ¶
func (c *DavAccountClient) DeleteOne(da *DavAccount) *DavAccountDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DavAccountClient) DeleteOneID ¶
func (c *DavAccountClient) DeleteOneID(id int) *DavAccountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DavAccountClient) ExecContext ¶
func (c *DavAccountClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccountClient) Get ¶
func (c *DavAccountClient) Get(ctx context.Context, id int) (*DavAccount, error)
Get returns a DavAccount entity by its id.
func (*DavAccountClient) GetX ¶
func (c *DavAccountClient) GetX(ctx context.Context, id int) *DavAccount
GetX is like Get, but panics if an error occurs.
func (*DavAccountClient) Hooks ¶
func (c *DavAccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DavAccountClient) Intercept ¶
func (c *DavAccountClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `davaccount.Intercept(f(g(h())))`.
func (*DavAccountClient) Interceptors ¶
func (c *DavAccountClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DavAccountClient) MapCreateBulk ¶
func (c *DavAccountClient) MapCreateBulk(slice any, setFunc func(*DavAccountCreate, int)) *DavAccountCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*DavAccountClient) Query ¶
func (c *DavAccountClient) Query() *DavAccountQuery
Query returns a query builder for DavAccount.
func (*DavAccountClient) QueryContext ¶
func (c *DavAccountClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccountClient) QueryOwner ¶
func (c *DavAccountClient) QueryOwner(da *DavAccount) *UserQuery
QueryOwner queries the owner edge of a DavAccount.
func (*DavAccountClient) Update ¶
func (c *DavAccountClient) Update() *DavAccountUpdate
Update returns an update builder for DavAccount.
func (*DavAccountClient) UpdateOne ¶
func (c *DavAccountClient) UpdateOne(da *DavAccount) *DavAccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DavAccountClient) UpdateOneID ¶
func (c *DavAccountClient) UpdateOneID(id int) *DavAccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DavAccountClient) Use ¶
func (c *DavAccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `davaccount.Hooks(f(g(h())))`.
type DavAccountCreate ¶
type DavAccountCreate struct {
// contains filtered or unexported fields
}
DavAccountCreate is the builder for creating a DavAccount entity.
func (*DavAccountCreate) Exec ¶
func (dac *DavAccountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DavAccountCreate) ExecContext ¶
func (c *DavAccountCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccountCreate) ExecX ¶
func (dac *DavAccountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DavAccountCreate) Mutation ¶
func (dac *DavAccountCreate) Mutation() *DavAccountMutation
Mutation returns the DavAccountMutation object of the builder.
func (*DavAccountCreate) OnConflict ¶
func (dac *DavAccountCreate) OnConflict(opts ...sql.ConflictOption) *DavAccountUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.DavAccount.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.DavAccountUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*DavAccountCreate) OnConflictColumns ¶
func (dac *DavAccountCreate) OnConflictColumns(columns ...string) *DavAccountUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.DavAccount.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DavAccountCreate) QueryContext ¶
func (c *DavAccountCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccountCreate) Save ¶
func (dac *DavAccountCreate) Save(ctx context.Context) (*DavAccount, error)
Save creates the DavAccount in the database.
func (*DavAccountCreate) SaveX ¶
func (dac *DavAccountCreate) SaveX(ctx context.Context) *DavAccount
SaveX calls Save and panics if Save returns an error.
func (*DavAccountCreate) SetCreatedAt ¶
func (dac *DavAccountCreate) SetCreatedAt(t time.Time) *DavAccountCreate
SetCreatedAt sets the "created_at" field.
func (*DavAccountCreate) SetDeletedAt ¶
func (dac *DavAccountCreate) SetDeletedAt(t time.Time) *DavAccountCreate
SetDeletedAt sets the "deleted_at" field.
func (*DavAccountCreate) SetName ¶
func (dac *DavAccountCreate) SetName(s string) *DavAccountCreate
SetName sets the "name" field.
func (*DavAccountCreate) SetNillableCreatedAt ¶
func (dac *DavAccountCreate) SetNillableCreatedAt(t *time.Time) *DavAccountCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DavAccountCreate) SetNillableDeletedAt ¶
func (dac *DavAccountCreate) SetNillableDeletedAt(t *time.Time) *DavAccountCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DavAccountCreate) SetNillableUpdatedAt ¶
func (dac *DavAccountCreate) SetNillableUpdatedAt(t *time.Time) *DavAccountCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DavAccountCreate) SetOptions ¶
func (dac *DavAccountCreate) SetOptions(bs *boolset.BooleanSet) *DavAccountCreate
SetOptions sets the "options" field.
func (*DavAccountCreate) SetOwner ¶
func (dac *DavAccountCreate) SetOwner(u *User) *DavAccountCreate
SetOwner sets the "owner" edge to the User entity.
func (*DavAccountCreate) SetOwnerID ¶
func (dac *DavAccountCreate) SetOwnerID(i int) *DavAccountCreate
SetOwnerID sets the "owner_id" field.
func (*DavAccountCreate) SetPassword ¶
func (dac *DavAccountCreate) SetPassword(s string) *DavAccountCreate
SetPassword sets the "password" field.
func (*DavAccountCreate) SetProps ¶
func (dac *DavAccountCreate) SetProps(tap *types.DavAccountProps) *DavAccountCreate
SetProps sets the "props" field.
func (*DavAccountCreate) SetRawID ¶
func (m *DavAccountCreate) SetRawID(t int) *DavAccountCreate
func (*DavAccountCreate) SetURI ¶
func (dac *DavAccountCreate) SetURI(s string) *DavAccountCreate
SetURI sets the "uri" field.
func (*DavAccountCreate) SetUpdatedAt ¶
func (dac *DavAccountCreate) SetUpdatedAt(t time.Time) *DavAccountCreate
SetUpdatedAt sets the "updated_at" field.
type DavAccountCreateBulk ¶
type DavAccountCreateBulk struct {
// contains filtered or unexported fields
}
DavAccountCreateBulk is the builder for creating many DavAccount entities in bulk.
func (*DavAccountCreateBulk) Exec ¶
func (dacb *DavAccountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DavAccountCreateBulk) ExecContext ¶
func (c *DavAccountCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccountCreateBulk) ExecX ¶
func (dacb *DavAccountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DavAccountCreateBulk) OnConflict ¶
func (dacb *DavAccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *DavAccountUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.DavAccount.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.DavAccountUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*DavAccountCreateBulk) OnConflictColumns ¶
func (dacb *DavAccountCreateBulk) OnConflictColumns(columns ...string) *DavAccountUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.DavAccount.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DavAccountCreateBulk) QueryContext ¶
func (c *DavAccountCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccountCreateBulk) Save ¶
func (dacb *DavAccountCreateBulk) Save(ctx context.Context) ([]*DavAccount, error)
Save creates the DavAccount entities in the database.
func (*DavAccountCreateBulk) SaveX ¶
func (dacb *DavAccountCreateBulk) SaveX(ctx context.Context) []*DavAccount
SaveX is like Save, but panics if an error occurs.
type DavAccountDelete ¶
type DavAccountDelete struct {
// contains filtered or unexported fields
}
DavAccountDelete is the builder for deleting a DavAccount entity.
func (*DavAccountDelete) Exec ¶
func (dad *DavAccountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DavAccountDelete) ExecContext ¶
func (c *DavAccountDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccountDelete) ExecX ¶
func (dad *DavAccountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DavAccountDelete) QueryContext ¶
func (c *DavAccountDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccountDelete) Where ¶
func (dad *DavAccountDelete) Where(ps ...predicate.DavAccount) *DavAccountDelete
Where appends a list predicates to the DavAccountDelete builder.
type DavAccountDeleteOne ¶
type DavAccountDeleteOne struct {
// contains filtered or unexported fields
}
DavAccountDeleteOne is the builder for deleting a single DavAccount entity.
func (*DavAccountDeleteOne) Exec ¶
func (dado *DavAccountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DavAccountDeleteOne) ExecX ¶
func (dado *DavAccountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DavAccountDeleteOne) Where ¶
func (dado *DavAccountDeleteOne) Where(ps ...predicate.DavAccount) *DavAccountDeleteOne
Where appends a list predicates to the DavAccountDelete builder.
type DavAccountEdges ¶
type DavAccountEdges struct {
// Owner holds the value of the owner edge.
Owner *User `json:"owner,omitempty"`
// contains filtered or unexported fields
}
DavAccountEdges holds the relations/edges for other nodes in the graph.
func (DavAccountEdges) OwnerOrErr ¶
func (e DavAccountEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DavAccountGroupBy ¶
type DavAccountGroupBy struct {
// contains filtered or unexported fields
}
DavAccountGroupBy is the group-by builder for DavAccount entities.
func (*DavAccountGroupBy) Aggregate ¶
func (dagb *DavAccountGroupBy) Aggregate(fns ...AggregateFunc) *DavAccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DavAccountGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DavAccountGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DavAccountGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DavAccountGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DavAccountGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DavAccountGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DavAccountGroupBy) Scan ¶
func (dagb *DavAccountGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DavAccountGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DavAccountMutation ¶
type DavAccountMutation struct {
// contains filtered or unexported fields
}
DavAccountMutation represents an operation that mutates the DavAccount nodes in the graph.
func (*DavAccountMutation) AddField ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) AddedEdges ¶
func (m *DavAccountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DavAccountMutation) AddedField ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) AddedFields ¶
func (m *DavAccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DavAccountMutation) AddedIDs ¶
func (m *DavAccountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DavAccountMutation) ClearDeletedAt ¶
func (m *DavAccountMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DavAccountMutation) ClearEdge ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) ClearField ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) ClearOwner ¶
func (m *DavAccountMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*DavAccountMutation) ClearProps ¶
func (m *DavAccountMutation) ClearProps()
ClearProps clears the value of the "props" field.
func (*DavAccountMutation) ClearedEdges ¶
func (m *DavAccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DavAccountMutation) ClearedFields ¶
func (m *DavAccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DavAccountMutation) Client ¶
func (m DavAccountMutation) 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 (*DavAccountMutation) CreatedAt ¶
func (m *DavAccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DavAccountMutation) DeletedAt ¶
func (m *DavAccountMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*DavAccountMutation) DeletedAtCleared ¶
func (m *DavAccountMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*DavAccountMutation) EdgeCleared ¶
func (m *DavAccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DavAccountMutation) ExecContext ¶
func (c *DavAccountMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccountMutation) Field ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) FieldCleared ¶
func (m *DavAccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DavAccountMutation) Fields ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) ID ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) IDs ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) Name ¶
func (m *DavAccountMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*DavAccountMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DavAccount entity. If the DavAccount 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 (*DavAccountMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the DavAccount entity. If the DavAccount 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 (*DavAccountMutation) 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 (*DavAccountMutation) OldName ¶
func (m *DavAccountMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the DavAccount entity. If the DavAccount 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 (*DavAccountMutation) OldOptions ¶
func (m *DavAccountMutation) OldOptions(ctx context.Context) (v *boolset.BooleanSet, err error)
OldOptions returns the old "options" field's value of the DavAccount entity. If the DavAccount 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 (*DavAccountMutation) OldOwnerID ¶
func (m *DavAccountMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the DavAccount entity. If the DavAccount 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 (*DavAccountMutation) OldPassword ¶
func (m *DavAccountMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the DavAccount entity. If the DavAccount 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 (*DavAccountMutation) OldProps ¶
func (m *DavAccountMutation) OldProps(ctx context.Context) (v *types.DavAccountProps, err error)
OldProps returns the old "props" field's value of the DavAccount entity. If the DavAccount 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 (*DavAccountMutation) OldURI ¶
func (m *DavAccountMutation) OldURI(ctx context.Context) (v string, err error)
OldURI returns the old "uri" field's value of the DavAccount entity. If the DavAccount 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 (*DavAccountMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the DavAccount entity. If the DavAccount 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 (*DavAccountMutation) Options ¶
func (m *DavAccountMutation) Options() (r *boolset.BooleanSet, exists bool)
Options returns the value of the "options" field in the mutation.
func (*DavAccountMutation) OwnerCleared ¶
func (m *DavAccountMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*DavAccountMutation) OwnerID ¶
func (m *DavAccountMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*DavAccountMutation) OwnerIDs ¶
func (m *DavAccountMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*DavAccountMutation) Password ¶
func (m *DavAccountMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*DavAccountMutation) Props ¶
func (m *DavAccountMutation) Props() (r *types.DavAccountProps, exists bool)
Props returns the value of the "props" field in the mutation.
func (*DavAccountMutation) PropsCleared ¶
func (m *DavAccountMutation) PropsCleared() bool
PropsCleared returns if the "props" field was cleared in this mutation.
func (*DavAccountMutation) QueryContext ¶
func (c *DavAccountMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccountMutation) RemovedEdges ¶
func (m *DavAccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DavAccountMutation) RemovedIDs ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) ResetCreatedAt ¶
func (m *DavAccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DavAccountMutation) ResetDeletedAt ¶
func (m *DavAccountMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*DavAccountMutation) ResetEdge ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) ResetField ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) ResetName ¶
func (m *DavAccountMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*DavAccountMutation) ResetOptions ¶
func (m *DavAccountMutation) ResetOptions()
ResetOptions resets all changes to the "options" field.
func (*DavAccountMutation) ResetOwner ¶
func (m *DavAccountMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*DavAccountMutation) ResetOwnerID ¶
func (m *DavAccountMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*DavAccountMutation) ResetPassword ¶
func (m *DavAccountMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*DavAccountMutation) ResetProps ¶
func (m *DavAccountMutation) ResetProps()
ResetProps resets all changes to the "props" field.
func (*DavAccountMutation) ResetURI ¶
func (m *DavAccountMutation) ResetURI()
ResetURI resets all changes to the "uri" field.
func (*DavAccountMutation) ResetUpdatedAt ¶
func (m *DavAccountMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DavAccountMutation) SetCreatedAt ¶
func (m *DavAccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DavAccountMutation) SetDeletedAt ¶
func (m *DavAccountMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*DavAccountMutation) SetField ¶
func (m *DavAccountMutation) 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 (*DavAccountMutation) SetName ¶
func (m *DavAccountMutation) SetName(s string)
SetName sets the "name" field.
func (*DavAccountMutation) SetOp ¶
func (m *DavAccountMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DavAccountMutation) SetOptions ¶
func (m *DavAccountMutation) SetOptions(bs *boolset.BooleanSet)
SetOptions sets the "options" field.
func (*DavAccountMutation) SetOwnerID ¶
func (m *DavAccountMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*DavAccountMutation) SetPassword ¶
func (m *DavAccountMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*DavAccountMutation) SetProps ¶
func (m *DavAccountMutation) SetProps(tap *types.DavAccountProps)
SetProps sets the "props" field.
func (*DavAccountMutation) SetRawID ¶
func (m *DavAccountMutation) SetRawID(t int)
func (*DavAccountMutation) SetURI ¶
func (m *DavAccountMutation) SetURI(s string)
SetURI sets the "uri" field.
func (*DavAccountMutation) SetUpdatedAt ¶
func (m *DavAccountMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (DavAccountMutation) Tx ¶
func (m DavAccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DavAccountMutation) Type ¶
func (m *DavAccountMutation) Type() string
Type returns the node type of this mutation (DavAccount).
func (*DavAccountMutation) URI ¶
func (m *DavAccountMutation) URI() (r string, exists bool)
URI returns the value of the "uri" field in the mutation.
func (*DavAccountMutation) UpdatedAt ¶
func (m *DavAccountMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DavAccountMutation) Where ¶
func (m *DavAccountMutation) Where(ps ...predicate.DavAccount)
Where appends a list predicates to the DavAccountMutation builder.
func (*DavAccountMutation) WhereP ¶
func (m *DavAccountMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DavAccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DavAccountQuery ¶
type DavAccountQuery struct {
// contains filtered or unexported fields
}
DavAccountQuery is the builder for querying DavAccount entities.
func (*DavAccountQuery) Aggregate ¶
func (daq *DavAccountQuery) Aggregate(fns ...AggregateFunc) *DavAccountSelect
Aggregate returns a DavAccountSelect configured with the given aggregations.
func (*DavAccountQuery) All ¶
func (daq *DavAccountQuery) All(ctx context.Context) ([]*DavAccount, error)
All executes the query and returns a list of DavAccounts.
func (*DavAccountQuery) AllX ¶
func (daq *DavAccountQuery) AllX(ctx context.Context) []*DavAccount
AllX is like All, but panics if an error occurs.
func (*DavAccountQuery) Clone ¶
func (daq *DavAccountQuery) Clone() *DavAccountQuery
Clone returns a duplicate of the DavAccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DavAccountQuery) Count ¶
func (daq *DavAccountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DavAccountQuery) CountX ¶
func (daq *DavAccountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DavAccountQuery) ExecContext ¶
func (c *DavAccountQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccountQuery) Exist ¶
func (daq *DavAccountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DavAccountQuery) ExistX ¶
func (daq *DavAccountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DavAccountQuery) First ¶
func (daq *DavAccountQuery) First(ctx context.Context) (*DavAccount, error)
First returns the first DavAccount entity from the query. Returns a *NotFoundError when no DavAccount was found.
func (*DavAccountQuery) FirstID ¶
func (daq *DavAccountQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DavAccount ID from the query. Returns a *NotFoundError when no DavAccount ID was found.
func (*DavAccountQuery) FirstIDX ¶
func (daq *DavAccountQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DavAccountQuery) FirstX ¶
func (daq *DavAccountQuery) FirstX(ctx context.Context) *DavAccount
FirstX is like First, but panics if an error occurs.
func (*DavAccountQuery) GroupBy ¶
func (daq *DavAccountQuery) GroupBy(field string, fields ...string) *DavAccountGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.DavAccount.Query().
GroupBy(davaccount.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DavAccountQuery) IDs ¶
func (daq *DavAccountQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of DavAccount IDs.
func (*DavAccountQuery) IDsX ¶
func (daq *DavAccountQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DavAccountQuery) Limit ¶
func (daq *DavAccountQuery) Limit(limit int) *DavAccountQuery
Limit the number of records to be returned by this query.
func (*DavAccountQuery) Offset ¶
func (daq *DavAccountQuery) Offset(offset int) *DavAccountQuery
Offset to start from.
func (*DavAccountQuery) Only ¶
func (daq *DavAccountQuery) Only(ctx context.Context) (*DavAccount, error)
Only returns a single DavAccount entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DavAccount entity is found. Returns a *NotFoundError when no DavAccount entities are found.
func (*DavAccountQuery) OnlyID ¶
func (daq *DavAccountQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DavAccount ID in the query. Returns a *NotSingularError when more than one DavAccount ID is found. Returns a *NotFoundError when no entities are found.
func (*DavAccountQuery) OnlyIDX ¶
func (daq *DavAccountQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DavAccountQuery) OnlyX ¶
func (daq *DavAccountQuery) OnlyX(ctx context.Context) *DavAccount
OnlyX is like Only, but panics if an error occurs.
func (*DavAccountQuery) Order ¶
func (daq *DavAccountQuery) Order(o ...davaccount.OrderOption) *DavAccountQuery
Order specifies how the records should be ordered.
func (*DavAccountQuery) QueryContext ¶
func (c *DavAccountQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccountQuery) QueryOwner ¶
func (daq *DavAccountQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*DavAccountQuery) Select ¶
func (daq *DavAccountQuery) Select(fields ...string) *DavAccountSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.DavAccount.Query().
Select(davaccount.FieldCreatedAt).
Scan(ctx, &v)
func (*DavAccountQuery) Unique ¶
func (daq *DavAccountQuery) Unique(unique bool) *DavAccountQuery
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 (*DavAccountQuery) Where ¶
func (daq *DavAccountQuery) Where(ps ...predicate.DavAccount) *DavAccountQuery
Where adds a new predicate for the DavAccountQuery builder.
func (*DavAccountQuery) WithOwner ¶
func (daq *DavAccountQuery) WithOwner(opts ...func(*UserQuery)) *DavAccountQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type DavAccountSelect ¶
type DavAccountSelect struct {
*DavAccountQuery
// contains filtered or unexported fields
}
DavAccountSelect is the builder for selecting fields of DavAccount entities.
func (*DavAccountSelect) Aggregate ¶
func (das *DavAccountSelect) Aggregate(fns ...AggregateFunc) *DavAccountSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DavAccountSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DavAccountSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (DavAccountSelect) ExecContext ¶
func (c DavAccountSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccountSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DavAccountSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DavAccountSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DavAccountSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (DavAccountSelect) QueryContext ¶
func (c DavAccountSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccountSelect) Scan ¶
func (das *DavAccountSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DavAccountSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DavAccountUpdate ¶
type DavAccountUpdate struct {
// contains filtered or unexported fields
}
DavAccountUpdate is the builder for updating DavAccount entities.
func (*DavAccountUpdate) ClearDeletedAt ¶
func (dau *DavAccountUpdate) ClearDeletedAt() *DavAccountUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DavAccountUpdate) ClearOwner ¶
func (dau *DavAccountUpdate) ClearOwner() *DavAccountUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*DavAccountUpdate) ClearProps ¶
func (dau *DavAccountUpdate) ClearProps() *DavAccountUpdate
ClearProps clears the value of the "props" field.
func (*DavAccountUpdate) Exec ¶
func (dau *DavAccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DavAccountUpdate) ExecContext ¶
func (c *DavAccountUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccountUpdate) ExecX ¶
func (dau *DavAccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DavAccountUpdate) Mutation ¶
func (dau *DavAccountUpdate) Mutation() *DavAccountMutation
Mutation returns the DavAccountMutation object of the builder.
func (*DavAccountUpdate) QueryContext ¶
func (c *DavAccountUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccountUpdate) Save ¶
func (dau *DavAccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DavAccountUpdate) SaveX ¶
func (dau *DavAccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DavAccountUpdate) SetDeletedAt ¶
func (dau *DavAccountUpdate) SetDeletedAt(t time.Time) *DavAccountUpdate
SetDeletedAt sets the "deleted_at" field.
func (*DavAccountUpdate) SetName ¶
func (dau *DavAccountUpdate) SetName(s string) *DavAccountUpdate
SetName sets the "name" field.
func (*DavAccountUpdate) SetNillableDeletedAt ¶
func (dau *DavAccountUpdate) SetNillableDeletedAt(t *time.Time) *DavAccountUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DavAccountUpdate) SetNillableName ¶
func (dau *DavAccountUpdate) SetNillableName(s *string) *DavAccountUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*DavAccountUpdate) SetNillableOwnerID ¶
func (dau *DavAccountUpdate) SetNillableOwnerID(i *int) *DavAccountUpdate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*DavAccountUpdate) SetNillablePassword ¶
func (dau *DavAccountUpdate) SetNillablePassword(s *string) *DavAccountUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*DavAccountUpdate) SetNillableURI ¶
func (dau *DavAccountUpdate) SetNillableURI(s *string) *DavAccountUpdate
SetNillableURI sets the "uri" field if the given value is not nil.
func (*DavAccountUpdate) SetOptions ¶
func (dau *DavAccountUpdate) SetOptions(bs *boolset.BooleanSet) *DavAccountUpdate
SetOptions sets the "options" field.
func (*DavAccountUpdate) SetOwner ¶
func (dau *DavAccountUpdate) SetOwner(u *User) *DavAccountUpdate
SetOwner sets the "owner" edge to the User entity.
func (*DavAccountUpdate) SetOwnerID ¶
func (dau *DavAccountUpdate) SetOwnerID(i int) *DavAccountUpdate
SetOwnerID sets the "owner_id" field.
func (*DavAccountUpdate) SetPassword ¶
func (dau *DavAccountUpdate) SetPassword(s string) *DavAccountUpdate
SetPassword sets the "password" field.
func (*DavAccountUpdate) SetProps ¶
func (dau *DavAccountUpdate) SetProps(tap *types.DavAccountProps) *DavAccountUpdate
SetProps sets the "props" field.
func (*DavAccountUpdate) SetURI ¶
func (dau *DavAccountUpdate) SetURI(s string) *DavAccountUpdate
SetURI sets the "uri" field.
func (*DavAccountUpdate) SetUpdatedAt ¶
func (dau *DavAccountUpdate) SetUpdatedAt(t time.Time) *DavAccountUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DavAccountUpdate) Where ¶
func (dau *DavAccountUpdate) Where(ps ...predicate.DavAccount) *DavAccountUpdate
Where appends a list predicates to the DavAccountUpdate builder.
type DavAccountUpdateOne ¶
type DavAccountUpdateOne struct {
// contains filtered or unexported fields
}
DavAccountUpdateOne is the builder for updating a single DavAccount entity.
func (*DavAccountUpdateOne) ClearDeletedAt ¶
func (dauo *DavAccountUpdateOne) ClearDeletedAt() *DavAccountUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DavAccountUpdateOne) ClearOwner ¶
func (dauo *DavAccountUpdateOne) ClearOwner() *DavAccountUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*DavAccountUpdateOne) ClearProps ¶
func (dauo *DavAccountUpdateOne) ClearProps() *DavAccountUpdateOne
ClearProps clears the value of the "props" field.
func (*DavAccountUpdateOne) Exec ¶
func (dauo *DavAccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DavAccountUpdateOne) ExecContext ¶
func (c *DavAccountUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DavAccountUpdateOne) ExecX ¶
func (dauo *DavAccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DavAccountUpdateOne) Mutation ¶
func (dauo *DavAccountUpdateOne) Mutation() *DavAccountMutation
Mutation returns the DavAccountMutation object of the builder.
func (*DavAccountUpdateOne) QueryContext ¶
func (c *DavAccountUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DavAccountUpdateOne) Save ¶
func (dauo *DavAccountUpdateOne) Save(ctx context.Context) (*DavAccount, error)
Save executes the query and returns the updated DavAccount entity.
func (*DavAccountUpdateOne) SaveX ¶
func (dauo *DavAccountUpdateOne) SaveX(ctx context.Context) *DavAccount
SaveX is like Save, but panics if an error occurs.
func (*DavAccountUpdateOne) Select ¶
func (dauo *DavAccountUpdateOne) Select(field string, fields ...string) *DavAccountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DavAccountUpdateOne) SetDeletedAt ¶
func (dauo *DavAccountUpdateOne) SetDeletedAt(t time.Time) *DavAccountUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*DavAccountUpdateOne) SetName ¶
func (dauo *DavAccountUpdateOne) SetName(s string) *DavAccountUpdateOne
SetName sets the "name" field.
func (*DavAccountUpdateOne) SetNillableDeletedAt ¶
func (dauo *DavAccountUpdateOne) SetNillableDeletedAt(t *time.Time) *DavAccountUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DavAccountUpdateOne) SetNillableName ¶
func (dauo *DavAccountUpdateOne) SetNillableName(s *string) *DavAccountUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*DavAccountUpdateOne) SetNillableOwnerID ¶
func (dauo *DavAccountUpdateOne) SetNillableOwnerID(i *int) *DavAccountUpdateOne
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*DavAccountUpdateOne) SetNillablePassword ¶
func (dauo *DavAccountUpdateOne) SetNillablePassword(s *string) *DavAccountUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*DavAccountUpdateOne) SetNillableURI ¶
func (dauo *DavAccountUpdateOne) SetNillableURI(s *string) *DavAccountUpdateOne
SetNillableURI sets the "uri" field if the given value is not nil.
func (*DavAccountUpdateOne) SetOptions ¶
func (dauo *DavAccountUpdateOne) SetOptions(bs *boolset.BooleanSet) *DavAccountUpdateOne
SetOptions sets the "options" field.
func (*DavAccountUpdateOne) SetOwner ¶
func (dauo *DavAccountUpdateOne) SetOwner(u *User) *DavAccountUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*DavAccountUpdateOne) SetOwnerID ¶
func (dauo *DavAccountUpdateOne) SetOwnerID(i int) *DavAccountUpdateOne
SetOwnerID sets the "owner_id" field.
func (*DavAccountUpdateOne) SetPassword ¶
func (dauo *DavAccountUpdateOne) SetPassword(s string) *DavAccountUpdateOne
SetPassword sets the "password" field.
func (*DavAccountUpdateOne) SetProps ¶
func (dauo *DavAccountUpdateOne) SetProps(tap *types.DavAccountProps) *DavAccountUpdateOne
SetProps sets the "props" field.
func (*DavAccountUpdateOne) SetURI ¶
func (dauo *DavAccountUpdateOne) SetURI(s string) *DavAccountUpdateOne
SetURI sets the "uri" field.
func (*DavAccountUpdateOne) SetUpdatedAt ¶
func (dauo *DavAccountUpdateOne) SetUpdatedAt(t time.Time) *DavAccountUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DavAccountUpdateOne) Where ¶
func (dauo *DavAccountUpdateOne) Where(ps ...predicate.DavAccount) *DavAccountUpdateOne
Where appends a list predicates to the DavAccountUpdate builder.
type DavAccountUpsert ¶
DavAccountUpsert is the "OnConflict" setter.
func (*DavAccountUpsert) ClearDeletedAt ¶
func (u *DavAccountUpsert) ClearDeletedAt() *DavAccountUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DavAccountUpsert) ClearProps ¶
func (u *DavAccountUpsert) ClearProps() *DavAccountUpsert
ClearProps clears the value of the "props" field.
func (*DavAccountUpsert) SetDeletedAt ¶
func (u *DavAccountUpsert) SetDeletedAt(v time.Time) *DavAccountUpsert
SetDeletedAt sets the "deleted_at" field.
func (*DavAccountUpsert) SetName ¶
func (u *DavAccountUpsert) SetName(v string) *DavAccountUpsert
SetName sets the "name" field.
func (*DavAccountUpsert) SetOptions ¶
func (u *DavAccountUpsert) SetOptions(v *boolset.BooleanSet) *DavAccountUpsert
SetOptions sets the "options" field.
func (*DavAccountUpsert) SetOwnerID ¶
func (u *DavAccountUpsert) SetOwnerID(v int) *DavAccountUpsert
SetOwnerID sets the "owner_id" field.
func (*DavAccountUpsert) SetPassword ¶
func (u *DavAccountUpsert) SetPassword(v string) *DavAccountUpsert
SetPassword sets the "password" field.
func (*DavAccountUpsert) SetProps ¶
func (u *DavAccountUpsert) SetProps(v *types.DavAccountProps) *DavAccountUpsert
SetProps sets the "props" field.
func (*DavAccountUpsert) SetURI ¶
func (u *DavAccountUpsert) SetURI(v string) *DavAccountUpsert
SetURI sets the "uri" field.
func (*DavAccountUpsert) SetUpdatedAt ¶
func (u *DavAccountUpsert) SetUpdatedAt(v time.Time) *DavAccountUpsert
SetUpdatedAt sets the "updated_at" field.
func (*DavAccountUpsert) UpdateDeletedAt ¶
func (u *DavAccountUpsert) UpdateDeletedAt() *DavAccountUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*DavAccountUpsert) UpdateName ¶
func (u *DavAccountUpsert) UpdateName() *DavAccountUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*DavAccountUpsert) UpdateOptions ¶
func (u *DavAccountUpsert) UpdateOptions() *DavAccountUpsert
UpdateOptions sets the "options" field to the value that was provided on create.
func (*DavAccountUpsert) UpdateOwnerID ¶
func (u *DavAccountUpsert) UpdateOwnerID() *DavAccountUpsert
UpdateOwnerID sets the "owner_id" field to the value that was provided on create.
func (*DavAccountUpsert) UpdatePassword ¶
func (u *DavAccountUpsert) UpdatePassword() *DavAccountUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*DavAccountUpsert) UpdateProps ¶
func (u *DavAccountUpsert) UpdateProps() *DavAccountUpsert
UpdateProps sets the "props" field to the value that was provided on create.
func (*DavAccountUpsert) UpdateURI ¶
func (u *DavAccountUpsert) UpdateURI() *DavAccountUpsert
UpdateURI sets the "uri" field to the value that was provided on create.
func (*DavAccountUpsert) UpdateUpdatedAt ¶
func (u *DavAccountUpsert) UpdateUpdatedAt() *DavAccountUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type DavAccountUpsertBulk ¶
type DavAccountUpsertBulk struct {
// contains filtered or unexported fields
}
DavAccountUpsertBulk is the builder for "upsert"-ing a bulk of DavAccount nodes.
func (*DavAccountUpsertBulk) ClearDeletedAt ¶
func (u *DavAccountUpsertBulk) ClearDeletedAt() *DavAccountUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DavAccountUpsertBulk) ClearProps ¶
func (u *DavAccountUpsertBulk) ClearProps() *DavAccountUpsertBulk
ClearProps clears the value of the "props" field.
func (*DavAccountUpsertBulk) DoNothing ¶
func (u *DavAccountUpsertBulk) DoNothing() *DavAccountUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DavAccountUpsertBulk) Exec ¶
func (u *DavAccountUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DavAccountUpsertBulk) ExecX ¶
func (u *DavAccountUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DavAccountUpsertBulk) Ignore ¶
func (u *DavAccountUpsertBulk) Ignore() *DavAccountUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.DavAccount.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DavAccountUpsertBulk) SetDeletedAt ¶
func (u *DavAccountUpsertBulk) SetDeletedAt(v time.Time) *DavAccountUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*DavAccountUpsertBulk) SetName ¶
func (u *DavAccountUpsertBulk) SetName(v string) *DavAccountUpsertBulk
SetName sets the "name" field.
func (*DavAccountUpsertBulk) SetOptions ¶
func (u *DavAccountUpsertBulk) SetOptions(v *boolset.BooleanSet) *DavAccountUpsertBulk
SetOptions sets the "options" field.
func (*DavAccountUpsertBulk) SetOwnerID ¶
func (u *DavAccountUpsertBulk) SetOwnerID(v int) *DavAccountUpsertBulk
SetOwnerID sets the "owner_id" field.
func (*DavAccountUpsertBulk) SetPassword ¶
func (u *DavAccountUpsertBulk) SetPassword(v string) *DavAccountUpsertBulk
SetPassword sets the "password" field.
func (*DavAccountUpsertBulk) SetProps ¶
func (u *DavAccountUpsertBulk) SetProps(v *types.DavAccountProps) *DavAccountUpsertBulk
SetProps sets the "props" field.
func (*DavAccountUpsertBulk) SetURI ¶
func (u *DavAccountUpsertBulk) SetURI(v string) *DavAccountUpsertBulk
SetURI sets the "uri" field.
func (*DavAccountUpsertBulk) SetUpdatedAt ¶
func (u *DavAccountUpsertBulk) SetUpdatedAt(v time.Time) *DavAccountUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*DavAccountUpsertBulk) Update ¶
func (u *DavAccountUpsertBulk) Update(set func(*DavAccountUpsert)) *DavAccountUpsertBulk
Update allows overriding fields `UPDATE` values. See the DavAccountCreateBulk.OnConflict documentation for more info.
func (*DavAccountUpsertBulk) UpdateDeletedAt ¶
func (u *DavAccountUpsertBulk) UpdateDeletedAt() *DavAccountUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*DavAccountUpsertBulk) UpdateName ¶
func (u *DavAccountUpsertBulk) UpdateName() *DavAccountUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*DavAccountUpsertBulk) UpdateNewValues ¶
func (u *DavAccountUpsertBulk) UpdateNewValues() *DavAccountUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.DavAccount.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*DavAccountUpsertBulk) UpdateOptions ¶
func (u *DavAccountUpsertBulk) UpdateOptions() *DavAccountUpsertBulk
UpdateOptions sets the "options" field to the value that was provided on create.
func (*DavAccountUpsertBulk) UpdateOwnerID ¶
func (u *DavAccountUpsertBulk) UpdateOwnerID() *DavAccountUpsertBulk
UpdateOwnerID sets the "owner_id" field to the value that was provided on create.
func (*DavAccountUpsertBulk) UpdatePassword ¶
func (u *DavAccountUpsertBulk) UpdatePassword() *DavAccountUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*DavAccountUpsertBulk) UpdateProps ¶
func (u *DavAccountUpsertBulk) UpdateProps() *DavAccountUpsertBulk
UpdateProps sets the "props" field to the value that was provided on create.
func (*DavAccountUpsertBulk) UpdateURI ¶
func (u *DavAccountUpsertBulk) UpdateURI() *DavAccountUpsertBulk
UpdateURI sets the "uri" field to the value that was provided on create.
func (*DavAccountUpsertBulk) UpdateUpdatedAt ¶
func (u *DavAccountUpsertBulk) UpdateUpdatedAt() *DavAccountUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type DavAccountUpsertOne ¶
type DavAccountUpsertOne struct {
// contains filtered or unexported fields
}
DavAccountUpsertOne is the builder for "upsert"-ing
one DavAccount node.
func (*DavAccountUpsertOne) ClearDeletedAt ¶
func (u *DavAccountUpsertOne) ClearDeletedAt() *DavAccountUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DavAccountUpsertOne) ClearProps ¶
func (u *DavAccountUpsertOne) ClearProps() *DavAccountUpsertOne
ClearProps clears the value of the "props" field.
func (*DavAccountUpsertOne) DoNothing ¶
func (u *DavAccountUpsertOne) DoNothing() *DavAccountUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DavAccountUpsertOne) Exec ¶
func (u *DavAccountUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*DavAccountUpsertOne) ExecX ¶
func (u *DavAccountUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DavAccountUpsertOne) ID ¶
func (u *DavAccountUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*DavAccountUpsertOne) IDX ¶
func (u *DavAccountUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*DavAccountUpsertOne) Ignore ¶
func (u *DavAccountUpsertOne) Ignore() *DavAccountUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.DavAccount.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*DavAccountUpsertOne) SetDeletedAt ¶
func (u *DavAccountUpsertOne) SetDeletedAt(v time.Time) *DavAccountUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*DavAccountUpsertOne) SetName ¶
func (u *DavAccountUpsertOne) SetName(v string) *DavAccountUpsertOne
SetName sets the "name" field.
func (*DavAccountUpsertOne) SetOptions ¶
func (u *DavAccountUpsertOne) SetOptions(v *boolset.BooleanSet) *DavAccountUpsertOne
SetOptions sets the "options" field.
func (*DavAccountUpsertOne) SetOwnerID ¶
func (u *DavAccountUpsertOne) SetOwnerID(v int) *DavAccountUpsertOne
SetOwnerID sets the "owner_id" field.
func (*DavAccountUpsertOne) SetPassword ¶
func (u *DavAccountUpsertOne) SetPassword(v string) *DavAccountUpsertOne
SetPassword sets the "password" field.
func (*DavAccountUpsertOne) SetProps ¶
func (u *DavAccountUpsertOne) SetProps(v *types.DavAccountProps) *DavAccountUpsertOne
SetProps sets the "props" field.
func (*DavAccountUpsertOne) SetURI ¶
func (u *DavAccountUpsertOne) SetURI(v string) *DavAccountUpsertOne
SetURI sets the "uri" field.
func (*DavAccountUpsertOne) SetUpdatedAt ¶
func (u *DavAccountUpsertOne) SetUpdatedAt(v time.Time) *DavAccountUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*DavAccountUpsertOne) Update ¶
func (u *DavAccountUpsertOne) Update(set func(*DavAccountUpsert)) *DavAccountUpsertOne
Update allows overriding fields `UPDATE` values. See the DavAccountCreate.OnConflict documentation for more info.
func (*DavAccountUpsertOne) UpdateDeletedAt ¶
func (u *DavAccountUpsertOne) UpdateDeletedAt() *DavAccountUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*DavAccountUpsertOne) UpdateName ¶
func (u *DavAccountUpsertOne) UpdateName() *DavAccountUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*DavAccountUpsertOne) UpdateNewValues ¶
func (u *DavAccountUpsertOne) UpdateNewValues() *DavAccountUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.DavAccount.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*DavAccountUpsertOne) UpdateOptions ¶
func (u *DavAccountUpsertOne) UpdateOptions() *DavAccountUpsertOne
UpdateOptions sets the "options" field to the value that was provided on create.
func (*DavAccountUpsertOne) UpdateOwnerID ¶
func (u *DavAccountUpsertOne) UpdateOwnerID() *DavAccountUpsertOne
UpdateOwnerID sets the "owner_id" field to the value that was provided on create.
func (*DavAccountUpsertOne) UpdatePassword ¶
func (u *DavAccountUpsertOne) UpdatePassword() *DavAccountUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*DavAccountUpsertOne) UpdateProps ¶
func (u *DavAccountUpsertOne) UpdateProps() *DavAccountUpsertOne
UpdateProps sets the "props" field to the value that was provided on create.
func (*DavAccountUpsertOne) UpdateURI ¶
func (u *DavAccountUpsertOne) UpdateURI() *DavAccountUpsertOne
UpdateURI sets the "uri" field to the value that was provided on create.
func (*DavAccountUpsertOne) UpdateUpdatedAt ¶
func (u *DavAccountUpsertOne) UpdateUpdatedAt() *DavAccountUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type DirectLink ¶
type DirectLink struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Downloads holds the value of the "downloads" field.
Downloads int `json:"downloads,omitempty"`
// FileID holds the value of the "file_id" field.
FileID int `json:"file_id,omitempty"`
// Speed holds the value of the "speed" field.
Speed int `json:"speed,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the DirectLinkQuery when eager-loading is set.
Edges DirectLinkEdges `json:"edges"`
// contains filtered or unexported fields
}
DirectLink is the model entity for the DirectLink schema.
func (*DirectLink) ExecContext ¶
func (c *DirectLink) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLink) QueryContext ¶
func (c *DirectLink) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLink) QueryFile ¶
func (dl *DirectLink) QueryFile() *FileQuery
QueryFile queries the "file" edge of the DirectLink entity.
func (*DirectLink) SetFile ¶
func (e *DirectLink) SetFile(v *File)
SetFile manually set the edge as loaded state.
func (*DirectLink) String ¶
func (dl *DirectLink) String() string
String implements the fmt.Stringer.
func (*DirectLink) Unwrap ¶
func (dl *DirectLink) Unwrap() *DirectLink
Unwrap unwraps the DirectLink 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 (*DirectLink) Update ¶
func (dl *DirectLink) Update() *DirectLinkUpdateOne
Update returns a builder for updating this DirectLink. Note that you need to call DirectLink.Unwrap() before calling this method if this DirectLink was returned from a transaction, and the transaction was committed or rolled back.
type DirectLinkClient ¶
type DirectLinkClient struct {
// contains filtered or unexported fields
}
DirectLinkClient is a client for the DirectLink schema.
func NewDirectLinkClient ¶
func NewDirectLinkClient(c config) *DirectLinkClient
NewDirectLinkClient returns a client for the DirectLink from the given config.
func (*DirectLinkClient) Create ¶
func (c *DirectLinkClient) Create() *DirectLinkCreate
Create returns a builder for creating a DirectLink entity.
func (*DirectLinkClient) CreateBulk ¶
func (c *DirectLinkClient) CreateBulk(builders ...*DirectLinkCreate) *DirectLinkCreateBulk
CreateBulk returns a builder for creating a bulk of DirectLink entities.
func (*DirectLinkClient) Delete ¶
func (c *DirectLinkClient) Delete() *DirectLinkDelete
Delete returns a delete builder for DirectLink.
func (*DirectLinkClient) DeleteOne ¶
func (c *DirectLinkClient) DeleteOne(dl *DirectLink) *DirectLinkDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DirectLinkClient) DeleteOneID ¶
func (c *DirectLinkClient) DeleteOneID(id int) *DirectLinkDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DirectLinkClient) ExecContext ¶
func (c *DirectLinkClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLinkClient) Get ¶
func (c *DirectLinkClient) Get(ctx context.Context, id int) (*DirectLink, error)
Get returns a DirectLink entity by its id.
func (*DirectLinkClient) GetX ¶
func (c *DirectLinkClient) GetX(ctx context.Context, id int) *DirectLink
GetX is like Get, but panics if an error occurs.
func (*DirectLinkClient) Hooks ¶
func (c *DirectLinkClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DirectLinkClient) Intercept ¶
func (c *DirectLinkClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `directlink.Intercept(f(g(h())))`.
func (*DirectLinkClient) Interceptors ¶
func (c *DirectLinkClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DirectLinkClient) MapCreateBulk ¶
func (c *DirectLinkClient) MapCreateBulk(slice any, setFunc func(*DirectLinkCreate, int)) *DirectLinkCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*DirectLinkClient) Query ¶
func (c *DirectLinkClient) Query() *DirectLinkQuery
Query returns a query builder for DirectLink.
func (*DirectLinkClient) QueryContext ¶
func (c *DirectLinkClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLinkClient) QueryFile ¶
func (c *DirectLinkClient) QueryFile(dl *DirectLink) *FileQuery
QueryFile queries the file edge of a DirectLink.
func (*DirectLinkClient) Update ¶
func (c *DirectLinkClient) Update() *DirectLinkUpdate
Update returns an update builder for DirectLink.
func (*DirectLinkClient) UpdateOne ¶
func (c *DirectLinkClient) UpdateOne(dl *DirectLink) *DirectLinkUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DirectLinkClient) UpdateOneID ¶
func (c *DirectLinkClient) UpdateOneID(id int) *DirectLinkUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DirectLinkClient) Use ¶
func (c *DirectLinkClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `directlink.Hooks(f(g(h())))`.
type DirectLinkCreate ¶
type DirectLinkCreate struct {
// contains filtered or unexported fields
}
DirectLinkCreate is the builder for creating a DirectLink entity.
func (*DirectLinkCreate) Exec ¶
func (dlc *DirectLinkCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DirectLinkCreate) ExecContext ¶
func (c *DirectLinkCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLinkCreate) ExecX ¶
func (dlc *DirectLinkCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectLinkCreate) Mutation ¶
func (dlc *DirectLinkCreate) Mutation() *DirectLinkMutation
Mutation returns the DirectLinkMutation object of the builder.
func (*DirectLinkCreate) OnConflict ¶
func (dlc *DirectLinkCreate) OnConflict(opts ...sql.ConflictOption) *DirectLinkUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.DirectLink.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.DirectLinkUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*DirectLinkCreate) OnConflictColumns ¶
func (dlc *DirectLinkCreate) OnConflictColumns(columns ...string) *DirectLinkUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.DirectLink.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DirectLinkCreate) QueryContext ¶
func (c *DirectLinkCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLinkCreate) Save ¶
func (dlc *DirectLinkCreate) Save(ctx context.Context) (*DirectLink, error)
Save creates the DirectLink in the database.
func (*DirectLinkCreate) SaveX ¶
func (dlc *DirectLinkCreate) SaveX(ctx context.Context) *DirectLink
SaveX calls Save and panics if Save returns an error.
func (*DirectLinkCreate) SetCreatedAt ¶
func (dlc *DirectLinkCreate) SetCreatedAt(t time.Time) *DirectLinkCreate
SetCreatedAt sets the "created_at" field.
func (*DirectLinkCreate) SetDeletedAt ¶
func (dlc *DirectLinkCreate) SetDeletedAt(t time.Time) *DirectLinkCreate
SetDeletedAt sets the "deleted_at" field.
func (*DirectLinkCreate) SetDownloads ¶
func (dlc *DirectLinkCreate) SetDownloads(i int) *DirectLinkCreate
SetDownloads sets the "downloads" field.
func (*DirectLinkCreate) SetFile ¶
func (dlc *DirectLinkCreate) SetFile(f *File) *DirectLinkCreate
SetFile sets the "file" edge to the File entity.
func (*DirectLinkCreate) SetFileID ¶
func (dlc *DirectLinkCreate) SetFileID(i int) *DirectLinkCreate
SetFileID sets the "file_id" field.
func (*DirectLinkCreate) SetName ¶
func (dlc *DirectLinkCreate) SetName(s string) *DirectLinkCreate
SetName sets the "name" field.
func (*DirectLinkCreate) SetNillableCreatedAt ¶
func (dlc *DirectLinkCreate) SetNillableCreatedAt(t *time.Time) *DirectLinkCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DirectLinkCreate) SetNillableDeletedAt ¶
func (dlc *DirectLinkCreate) SetNillableDeletedAt(t *time.Time) *DirectLinkCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DirectLinkCreate) SetNillableUpdatedAt ¶
func (dlc *DirectLinkCreate) SetNillableUpdatedAt(t *time.Time) *DirectLinkCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DirectLinkCreate) SetRawID ¶
func (m *DirectLinkCreate) SetRawID(t int) *DirectLinkCreate
func (*DirectLinkCreate) SetSpeed ¶
func (dlc *DirectLinkCreate) SetSpeed(i int) *DirectLinkCreate
SetSpeed sets the "speed" field.
func (*DirectLinkCreate) SetUpdatedAt ¶
func (dlc *DirectLinkCreate) SetUpdatedAt(t time.Time) *DirectLinkCreate
SetUpdatedAt sets the "updated_at" field.
type DirectLinkCreateBulk ¶
type DirectLinkCreateBulk struct {
// contains filtered or unexported fields
}
DirectLinkCreateBulk is the builder for creating many DirectLink entities in bulk.
func (*DirectLinkCreateBulk) Exec ¶
func (dlcb *DirectLinkCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DirectLinkCreateBulk) ExecContext ¶
func (c *DirectLinkCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLinkCreateBulk) ExecX ¶
func (dlcb *DirectLinkCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectLinkCreateBulk) OnConflict ¶
func (dlcb *DirectLinkCreateBulk) OnConflict(opts ...sql.ConflictOption) *DirectLinkUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.DirectLink.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.DirectLinkUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*DirectLinkCreateBulk) OnConflictColumns ¶
func (dlcb *DirectLinkCreateBulk) OnConflictColumns(columns ...string) *DirectLinkUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.DirectLink.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DirectLinkCreateBulk) QueryContext ¶
func (c *DirectLinkCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLinkCreateBulk) Save ¶
func (dlcb *DirectLinkCreateBulk) Save(ctx context.Context) ([]*DirectLink, error)
Save creates the DirectLink entities in the database.
func (*DirectLinkCreateBulk) SaveX ¶
func (dlcb *DirectLinkCreateBulk) SaveX(ctx context.Context) []*DirectLink
SaveX is like Save, but panics if an error occurs.
type DirectLinkDelete ¶
type DirectLinkDelete struct {
// contains filtered or unexported fields
}
DirectLinkDelete is the builder for deleting a DirectLink entity.
func (*DirectLinkDelete) Exec ¶
func (dld *DirectLinkDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DirectLinkDelete) ExecContext ¶
func (c *DirectLinkDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLinkDelete) ExecX ¶
func (dld *DirectLinkDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DirectLinkDelete) QueryContext ¶
func (c *DirectLinkDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLinkDelete) Where ¶
func (dld *DirectLinkDelete) Where(ps ...predicate.DirectLink) *DirectLinkDelete
Where appends a list predicates to the DirectLinkDelete builder.
type DirectLinkDeleteOne ¶
type DirectLinkDeleteOne struct {
// contains filtered or unexported fields
}
DirectLinkDeleteOne is the builder for deleting a single DirectLink entity.
func (*DirectLinkDeleteOne) Exec ¶
func (dldo *DirectLinkDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DirectLinkDeleteOne) ExecX ¶
func (dldo *DirectLinkDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectLinkDeleteOne) Where ¶
func (dldo *DirectLinkDeleteOne) Where(ps ...predicate.DirectLink) *DirectLinkDeleteOne
Where appends a list predicates to the DirectLinkDelete builder.
type DirectLinkEdges ¶
type DirectLinkEdges struct {
// File holds the value of the file edge.
File *File `json:"file,omitempty"`
// contains filtered or unexported fields
}
DirectLinkEdges holds the relations/edges for other nodes in the graph.
func (DirectLinkEdges) FileOrErr ¶
func (e DirectLinkEdges) FileOrErr() (*File, error)
FileOrErr returns the File value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DirectLinkGroupBy ¶
type DirectLinkGroupBy struct {
// contains filtered or unexported fields
}
DirectLinkGroupBy is the group-by builder for DirectLink entities.
func (*DirectLinkGroupBy) Aggregate ¶
func (dlgb *DirectLinkGroupBy) Aggregate(fns ...AggregateFunc) *DirectLinkGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DirectLinkGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DirectLinkGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DirectLinkGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DirectLinkGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DirectLinkGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DirectLinkGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DirectLinkGroupBy) Scan ¶
func (dlgb *DirectLinkGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DirectLinkGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DirectLinkMutation ¶
type DirectLinkMutation struct {
// contains filtered or unexported fields
}
DirectLinkMutation represents an operation that mutates the DirectLink nodes in the graph.
func (*DirectLinkMutation) AddDownloads ¶
func (m *DirectLinkMutation) AddDownloads(i int)
AddDownloads adds i to the "downloads" field.
func (*DirectLinkMutation) AddField ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) AddSpeed ¶
func (m *DirectLinkMutation) AddSpeed(i int)
AddSpeed adds i to the "speed" field.
func (*DirectLinkMutation) AddedDownloads ¶
func (m *DirectLinkMutation) AddedDownloads() (r int, exists bool)
AddedDownloads returns the value that was added to the "downloads" field in this mutation.
func (*DirectLinkMutation) AddedEdges ¶
func (m *DirectLinkMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DirectLinkMutation) AddedField ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) AddedFields ¶
func (m *DirectLinkMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DirectLinkMutation) AddedIDs ¶
func (m *DirectLinkMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DirectLinkMutation) AddedSpeed ¶
func (m *DirectLinkMutation) AddedSpeed() (r int, exists bool)
AddedSpeed returns the value that was added to the "speed" field in this mutation.
func (*DirectLinkMutation) ClearDeletedAt ¶
func (m *DirectLinkMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DirectLinkMutation) ClearEdge ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) ClearField ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) ClearFile ¶
func (m *DirectLinkMutation) ClearFile()
ClearFile clears the "file" edge to the File entity.
func (*DirectLinkMutation) ClearedEdges ¶
func (m *DirectLinkMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DirectLinkMutation) ClearedFields ¶
func (m *DirectLinkMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DirectLinkMutation) Client ¶
func (m DirectLinkMutation) 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 (*DirectLinkMutation) CreatedAt ¶
func (m *DirectLinkMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DirectLinkMutation) DeletedAt ¶
func (m *DirectLinkMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*DirectLinkMutation) DeletedAtCleared ¶
func (m *DirectLinkMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*DirectLinkMutation) Downloads ¶
func (m *DirectLinkMutation) Downloads() (r int, exists bool)
Downloads returns the value of the "downloads" field in the mutation.
func (*DirectLinkMutation) EdgeCleared ¶
func (m *DirectLinkMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DirectLinkMutation) ExecContext ¶
func (c *DirectLinkMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLinkMutation) Field ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) FieldCleared ¶
func (m *DirectLinkMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DirectLinkMutation) Fields ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) FileCleared ¶
func (m *DirectLinkMutation) FileCleared() bool
FileCleared reports if the "file" edge to the File entity was cleared.
func (*DirectLinkMutation) FileID ¶
func (m *DirectLinkMutation) FileID() (r int, exists bool)
FileID returns the value of the "file_id" field in the mutation.
func (*DirectLinkMutation) FileIDs ¶
func (m *DirectLinkMutation) FileIDs() (ids []int)
FileIDs returns the "file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FileID instead. It exists only for internal usage by the builders.
func (*DirectLinkMutation) ID ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) IDs ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) Name ¶
func (m *DirectLinkMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*DirectLinkMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DirectLink entity. If the DirectLink 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 (*DirectLinkMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the DirectLink entity. If the DirectLink 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 (*DirectLinkMutation) OldDownloads ¶
func (m *DirectLinkMutation) OldDownloads(ctx context.Context) (v int, err error)
OldDownloads returns the old "downloads" field's value of the DirectLink entity. If the DirectLink 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 (*DirectLinkMutation) 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 (*DirectLinkMutation) OldFileID ¶
func (m *DirectLinkMutation) OldFileID(ctx context.Context) (v int, err error)
OldFileID returns the old "file_id" field's value of the DirectLink entity. If the DirectLink 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 (*DirectLinkMutation) OldName ¶
func (m *DirectLinkMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the DirectLink entity. If the DirectLink 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 (*DirectLinkMutation) OldSpeed ¶
func (m *DirectLinkMutation) OldSpeed(ctx context.Context) (v int, err error)
OldSpeed returns the old "speed" field's value of the DirectLink entity. If the DirectLink 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 (*DirectLinkMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the DirectLink entity. If the DirectLink 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 (*DirectLinkMutation) QueryContext ¶
func (c *DirectLinkMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLinkMutation) RemovedEdges ¶
func (m *DirectLinkMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DirectLinkMutation) RemovedIDs ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) ResetCreatedAt ¶
func (m *DirectLinkMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DirectLinkMutation) ResetDeletedAt ¶
func (m *DirectLinkMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*DirectLinkMutation) ResetDownloads ¶
func (m *DirectLinkMutation) ResetDownloads()
ResetDownloads resets all changes to the "downloads" field.
func (*DirectLinkMutation) ResetEdge ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) ResetField ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) ResetFile ¶
func (m *DirectLinkMutation) ResetFile()
ResetFile resets all changes to the "file" edge.
func (*DirectLinkMutation) ResetFileID ¶
func (m *DirectLinkMutation) ResetFileID()
ResetFileID resets all changes to the "file_id" field.
func (*DirectLinkMutation) ResetName ¶
func (m *DirectLinkMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*DirectLinkMutation) ResetSpeed ¶
func (m *DirectLinkMutation) ResetSpeed()
ResetSpeed resets all changes to the "speed" field.
func (*DirectLinkMutation) ResetUpdatedAt ¶
func (m *DirectLinkMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DirectLinkMutation) SetCreatedAt ¶
func (m *DirectLinkMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DirectLinkMutation) SetDeletedAt ¶
func (m *DirectLinkMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*DirectLinkMutation) SetDownloads ¶
func (m *DirectLinkMutation) SetDownloads(i int)
SetDownloads sets the "downloads" field.
func (*DirectLinkMutation) SetField ¶
func (m *DirectLinkMutation) 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 (*DirectLinkMutation) SetFileID ¶
func (m *DirectLinkMutation) SetFileID(i int)
SetFileID sets the "file_id" field.
func (*DirectLinkMutation) SetName ¶
func (m *DirectLinkMutation) SetName(s string)
SetName sets the "name" field.
func (*DirectLinkMutation) SetOp ¶
func (m *DirectLinkMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DirectLinkMutation) SetRawID ¶
func (m *DirectLinkMutation) SetRawID(t int)
func (*DirectLinkMutation) SetSpeed ¶
func (m *DirectLinkMutation) SetSpeed(i int)
SetSpeed sets the "speed" field.
func (*DirectLinkMutation) SetUpdatedAt ¶
func (m *DirectLinkMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DirectLinkMutation) Speed ¶
func (m *DirectLinkMutation) Speed() (r int, exists bool)
Speed returns the value of the "speed" field in the mutation.
func (DirectLinkMutation) Tx ¶
func (m DirectLinkMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DirectLinkMutation) Type ¶
func (m *DirectLinkMutation) Type() string
Type returns the node type of this mutation (DirectLink).
func (*DirectLinkMutation) UpdatedAt ¶
func (m *DirectLinkMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DirectLinkMutation) Where ¶
func (m *DirectLinkMutation) Where(ps ...predicate.DirectLink)
Where appends a list predicates to the DirectLinkMutation builder.
func (*DirectLinkMutation) WhereP ¶
func (m *DirectLinkMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DirectLinkMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DirectLinkQuery ¶
type DirectLinkQuery struct {
// contains filtered or unexported fields
}
DirectLinkQuery is the builder for querying DirectLink entities.
func (*DirectLinkQuery) Aggregate ¶
func (dlq *DirectLinkQuery) Aggregate(fns ...AggregateFunc) *DirectLinkSelect
Aggregate returns a DirectLinkSelect configured with the given aggregations.
func (*DirectLinkQuery) All ¶
func (dlq *DirectLinkQuery) All(ctx context.Context) ([]*DirectLink, error)
All executes the query and returns a list of DirectLinks.
func (*DirectLinkQuery) AllX ¶
func (dlq *DirectLinkQuery) AllX(ctx context.Context) []*DirectLink
AllX is like All, but panics if an error occurs.
func (*DirectLinkQuery) Clone ¶
func (dlq *DirectLinkQuery) Clone() *DirectLinkQuery
Clone returns a duplicate of the DirectLinkQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DirectLinkQuery) Count ¶
func (dlq *DirectLinkQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DirectLinkQuery) CountX ¶
func (dlq *DirectLinkQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DirectLinkQuery) ExecContext ¶
func (c *DirectLinkQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLinkQuery) Exist ¶
func (dlq *DirectLinkQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DirectLinkQuery) ExistX ¶
func (dlq *DirectLinkQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DirectLinkQuery) First ¶
func (dlq *DirectLinkQuery) First(ctx context.Context) (*DirectLink, error)
First returns the first DirectLink entity from the query. Returns a *NotFoundError when no DirectLink was found.
func (*DirectLinkQuery) FirstID ¶
func (dlq *DirectLinkQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DirectLink ID from the query. Returns a *NotFoundError when no DirectLink ID was found.
func (*DirectLinkQuery) FirstIDX ¶
func (dlq *DirectLinkQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DirectLinkQuery) FirstX ¶
func (dlq *DirectLinkQuery) FirstX(ctx context.Context) *DirectLink
FirstX is like First, but panics if an error occurs.
func (*DirectLinkQuery) GroupBy ¶
func (dlq *DirectLinkQuery) GroupBy(field string, fields ...string) *DirectLinkGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.DirectLink.Query().
GroupBy(directlink.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DirectLinkQuery) IDs ¶
func (dlq *DirectLinkQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of DirectLink IDs.
func (*DirectLinkQuery) IDsX ¶
func (dlq *DirectLinkQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DirectLinkQuery) Limit ¶
func (dlq *DirectLinkQuery) Limit(limit int) *DirectLinkQuery
Limit the number of records to be returned by this query.
func (*DirectLinkQuery) Offset ¶
func (dlq *DirectLinkQuery) Offset(offset int) *DirectLinkQuery
Offset to start from.
func (*DirectLinkQuery) Only ¶
func (dlq *DirectLinkQuery) Only(ctx context.Context) (*DirectLink, error)
Only returns a single DirectLink entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DirectLink entity is found. Returns a *NotFoundError when no DirectLink entities are found.
func (*DirectLinkQuery) OnlyID ¶
func (dlq *DirectLinkQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DirectLink ID in the query. Returns a *NotSingularError when more than one DirectLink ID is found. Returns a *NotFoundError when no entities are found.
func (*DirectLinkQuery) OnlyIDX ¶
func (dlq *DirectLinkQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DirectLinkQuery) OnlyX ¶
func (dlq *DirectLinkQuery) OnlyX(ctx context.Context) *DirectLink
OnlyX is like Only, but panics if an error occurs.
func (*DirectLinkQuery) Order ¶
func (dlq *DirectLinkQuery) Order(o ...directlink.OrderOption) *DirectLinkQuery
Order specifies how the records should be ordered.
func (*DirectLinkQuery) QueryContext ¶
func (c *DirectLinkQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLinkQuery) QueryFile ¶
func (dlq *DirectLinkQuery) QueryFile() *FileQuery
QueryFile chains the current query on the "file" edge.
func (*DirectLinkQuery) Select ¶
func (dlq *DirectLinkQuery) Select(fields ...string) *DirectLinkSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.DirectLink.Query().
Select(directlink.FieldCreatedAt).
Scan(ctx, &v)
func (*DirectLinkQuery) Unique ¶
func (dlq *DirectLinkQuery) Unique(unique bool) *DirectLinkQuery
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 (*DirectLinkQuery) Where ¶
func (dlq *DirectLinkQuery) Where(ps ...predicate.DirectLink) *DirectLinkQuery
Where adds a new predicate for the DirectLinkQuery builder.
func (*DirectLinkQuery) WithFile ¶
func (dlq *DirectLinkQuery) WithFile(opts ...func(*FileQuery)) *DirectLinkQuery
WithFile tells the query-builder to eager-load the nodes that are connected to the "file" edge. The optional arguments are used to configure the query builder of the edge.
type DirectLinkSelect ¶
type DirectLinkSelect struct {
*DirectLinkQuery
// contains filtered or unexported fields
}
DirectLinkSelect is the builder for selecting fields of DirectLink entities.
func (*DirectLinkSelect) Aggregate ¶
func (dls *DirectLinkSelect) Aggregate(fns ...AggregateFunc) *DirectLinkSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DirectLinkSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DirectLinkSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (DirectLinkSelect) ExecContext ¶
func (c DirectLinkSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLinkSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DirectLinkSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DirectLinkSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DirectLinkSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (DirectLinkSelect) QueryContext ¶
func (c DirectLinkSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLinkSelect) Scan ¶
func (dls *DirectLinkSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DirectLinkSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DirectLinkUpdate ¶
type DirectLinkUpdate struct {
// contains filtered or unexported fields
}
DirectLinkUpdate is the builder for updating DirectLink entities.
func (*DirectLinkUpdate) AddDownloads ¶
func (dlu *DirectLinkUpdate) AddDownloads(i int) *DirectLinkUpdate
AddDownloads adds i to the "downloads" field.
func (*DirectLinkUpdate) AddSpeed ¶
func (dlu *DirectLinkUpdate) AddSpeed(i int) *DirectLinkUpdate
AddSpeed adds i to the "speed" field.
func (*DirectLinkUpdate) ClearDeletedAt ¶
func (dlu *DirectLinkUpdate) ClearDeletedAt() *DirectLinkUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DirectLinkUpdate) ClearFile ¶
func (dlu *DirectLinkUpdate) ClearFile() *DirectLinkUpdate
ClearFile clears the "file" edge to the File entity.
func (*DirectLinkUpdate) Exec ¶
func (dlu *DirectLinkUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DirectLinkUpdate) ExecContext ¶
func (c *DirectLinkUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLinkUpdate) ExecX ¶
func (dlu *DirectLinkUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectLinkUpdate) Mutation ¶
func (dlu *DirectLinkUpdate) Mutation() *DirectLinkMutation
Mutation returns the DirectLinkMutation object of the builder.
func (*DirectLinkUpdate) QueryContext ¶
func (c *DirectLinkUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLinkUpdate) Save ¶
func (dlu *DirectLinkUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DirectLinkUpdate) SaveX ¶
func (dlu *DirectLinkUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DirectLinkUpdate) SetDeletedAt ¶
func (dlu *DirectLinkUpdate) SetDeletedAt(t time.Time) *DirectLinkUpdate
SetDeletedAt sets the "deleted_at" field.
func (*DirectLinkUpdate) SetDownloads ¶
func (dlu *DirectLinkUpdate) SetDownloads(i int) *DirectLinkUpdate
SetDownloads sets the "downloads" field.
func (*DirectLinkUpdate) SetFile ¶
func (dlu *DirectLinkUpdate) SetFile(f *File) *DirectLinkUpdate
SetFile sets the "file" edge to the File entity.
func (*DirectLinkUpdate) SetFileID ¶
func (dlu *DirectLinkUpdate) SetFileID(i int) *DirectLinkUpdate
SetFileID sets the "file_id" field.
func (*DirectLinkUpdate) SetName ¶
func (dlu *DirectLinkUpdate) SetName(s string) *DirectLinkUpdate
SetName sets the "name" field.
func (*DirectLinkUpdate) SetNillableDeletedAt ¶
func (dlu *DirectLinkUpdate) SetNillableDeletedAt(t *time.Time) *DirectLinkUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DirectLinkUpdate) SetNillableDownloads ¶
func (dlu *DirectLinkUpdate) SetNillableDownloads(i *int) *DirectLinkUpdate
SetNillableDownloads sets the "downloads" field if the given value is not nil.
func (*DirectLinkUpdate) SetNillableFileID ¶
func (dlu *DirectLinkUpdate) SetNillableFileID(i *int) *DirectLinkUpdate
SetNillableFileID sets the "file_id" field if the given value is not nil.
func (*DirectLinkUpdate) SetNillableName ¶
func (dlu *DirectLinkUpdate) SetNillableName(s *string) *DirectLinkUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*DirectLinkUpdate) SetNillableSpeed ¶
func (dlu *DirectLinkUpdate) SetNillableSpeed(i *int) *DirectLinkUpdate
SetNillableSpeed sets the "speed" field if the given value is not nil.
func (*DirectLinkUpdate) SetSpeed ¶
func (dlu *DirectLinkUpdate) SetSpeed(i int) *DirectLinkUpdate
SetSpeed sets the "speed" field.
func (*DirectLinkUpdate) SetUpdatedAt ¶
func (dlu *DirectLinkUpdate) SetUpdatedAt(t time.Time) *DirectLinkUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DirectLinkUpdate) Where ¶
func (dlu *DirectLinkUpdate) Where(ps ...predicate.DirectLink) *DirectLinkUpdate
Where appends a list predicates to the DirectLinkUpdate builder.
type DirectLinkUpdateOne ¶
type DirectLinkUpdateOne struct {
// contains filtered or unexported fields
}
DirectLinkUpdateOne is the builder for updating a single DirectLink entity.
func (*DirectLinkUpdateOne) AddDownloads ¶
func (dluo *DirectLinkUpdateOne) AddDownloads(i int) *DirectLinkUpdateOne
AddDownloads adds i to the "downloads" field.
func (*DirectLinkUpdateOne) AddSpeed ¶
func (dluo *DirectLinkUpdateOne) AddSpeed(i int) *DirectLinkUpdateOne
AddSpeed adds i to the "speed" field.
func (*DirectLinkUpdateOne) ClearDeletedAt ¶
func (dluo *DirectLinkUpdateOne) ClearDeletedAt() *DirectLinkUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DirectLinkUpdateOne) ClearFile ¶
func (dluo *DirectLinkUpdateOne) ClearFile() *DirectLinkUpdateOne
ClearFile clears the "file" edge to the File entity.
func (*DirectLinkUpdateOne) Exec ¶
func (dluo *DirectLinkUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DirectLinkUpdateOne) ExecContext ¶
func (c *DirectLinkUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DirectLinkUpdateOne) ExecX ¶
func (dluo *DirectLinkUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectLinkUpdateOne) Mutation ¶
func (dluo *DirectLinkUpdateOne) Mutation() *DirectLinkMutation
Mutation returns the DirectLinkMutation object of the builder.
func (*DirectLinkUpdateOne) QueryContext ¶
func (c *DirectLinkUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DirectLinkUpdateOne) Save ¶
func (dluo *DirectLinkUpdateOne) Save(ctx context.Context) (*DirectLink, error)
Save executes the query and returns the updated DirectLink entity.
func (*DirectLinkUpdateOne) SaveX ¶
func (dluo *DirectLinkUpdateOne) SaveX(ctx context.Context) *DirectLink
SaveX is like Save, but panics if an error occurs.
func (*DirectLinkUpdateOne) Select ¶
func (dluo *DirectLinkUpdateOne) Select(field string, fields ...string) *DirectLinkUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DirectLinkUpdateOne) SetDeletedAt ¶
func (dluo *DirectLinkUpdateOne) SetDeletedAt(t time.Time) *DirectLinkUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*DirectLinkUpdateOne) SetDownloads ¶
func (dluo *DirectLinkUpdateOne) SetDownloads(i int) *DirectLinkUpdateOne
SetDownloads sets the "downloads" field.
func (*DirectLinkUpdateOne) SetFile ¶
func (dluo *DirectLinkUpdateOne) SetFile(f *File) *DirectLinkUpdateOne
SetFile sets the "file" edge to the File entity.
func (*DirectLinkUpdateOne) SetFileID ¶
func (dluo *DirectLinkUpdateOne) SetFileID(i int) *DirectLinkUpdateOne
SetFileID sets the "file_id" field.
func (*DirectLinkUpdateOne) SetName ¶
func (dluo *DirectLinkUpdateOne) SetName(s string) *DirectLinkUpdateOne
SetName sets the "name" field.
func (*DirectLinkUpdateOne) SetNillableDeletedAt ¶
func (dluo *DirectLinkUpdateOne) SetNillableDeletedAt(t *time.Time) *DirectLinkUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DirectLinkUpdateOne) SetNillableDownloads ¶
func (dluo *DirectLinkUpdateOne) SetNillableDownloads(i *int) *DirectLinkUpdateOne
SetNillableDownloads sets the "downloads" field if the given value is not nil.
func (*DirectLinkUpdateOne) SetNillableFileID ¶
func (dluo *DirectLinkUpdateOne) SetNillableFileID(i *int) *DirectLinkUpdateOne
SetNillableFileID sets the "file_id" field if the given value is not nil.
func (*DirectLinkUpdateOne) SetNillableName ¶
func (dluo *DirectLinkUpdateOne) SetNillableName(s *string) *DirectLinkUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*DirectLinkUpdateOne) SetNillableSpeed ¶
func (dluo *DirectLinkUpdateOne) SetNillableSpeed(i *int) *DirectLinkUpdateOne
SetNillableSpeed sets the "speed" field if the given value is not nil.
func (*DirectLinkUpdateOne) SetSpeed ¶
func (dluo *DirectLinkUpdateOne) SetSpeed(i int) *DirectLinkUpdateOne
SetSpeed sets the "speed" field.
func (*DirectLinkUpdateOne) SetUpdatedAt ¶
func (dluo *DirectLinkUpdateOne) SetUpdatedAt(t time.Time) *DirectLinkUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DirectLinkUpdateOne) Where ¶
func (dluo *DirectLinkUpdateOne) Where(ps ...predicate.DirectLink) *DirectLinkUpdateOne
Where appends a list predicates to the DirectLinkUpdate builder.
type DirectLinkUpsert ¶
DirectLinkUpsert is the "OnConflict" setter.
func (*DirectLinkUpsert) AddDownloads ¶
func (u *DirectLinkUpsert) AddDownloads(v int) *DirectLinkUpsert
AddDownloads adds v to the "downloads" field.
func (*DirectLinkUpsert) AddSpeed ¶
func (u *DirectLinkUpsert) AddSpeed(v int) *DirectLinkUpsert
AddSpeed adds v to the "speed" field.
func (*DirectLinkUpsert) ClearDeletedAt ¶
func (u *DirectLinkUpsert) ClearDeletedAt() *DirectLinkUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DirectLinkUpsert) SetDeletedAt ¶
func (u *DirectLinkUpsert) SetDeletedAt(v time.Time) *DirectLinkUpsert
SetDeletedAt sets the "deleted_at" field.
func (*DirectLinkUpsert) SetDownloads ¶
func (u *DirectLinkUpsert) SetDownloads(v int) *DirectLinkUpsert
SetDownloads sets the "downloads" field.
func (*DirectLinkUpsert) SetFileID ¶
func (u *DirectLinkUpsert) SetFileID(v int) *DirectLinkUpsert
SetFileID sets the "file_id" field.
func (*DirectLinkUpsert) SetName ¶
func (u *DirectLinkUpsert) SetName(v string) *DirectLinkUpsert
SetName sets the "name" field.
func (*DirectLinkUpsert) SetSpeed ¶
func (u *DirectLinkUpsert) SetSpeed(v int) *DirectLinkUpsert
SetSpeed sets the "speed" field.
func (*DirectLinkUpsert) SetUpdatedAt ¶
func (u *DirectLinkUpsert) SetUpdatedAt(v time.Time) *DirectLinkUpsert
SetUpdatedAt sets the "updated_at" field.
func (*DirectLinkUpsert) UpdateDeletedAt ¶
func (u *DirectLinkUpsert) UpdateDeletedAt() *DirectLinkUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*DirectLinkUpsert) UpdateDownloads ¶
func (u *DirectLinkUpsert) UpdateDownloads() *DirectLinkUpsert
UpdateDownloads sets the "downloads" field to the value that was provided on create.
func (*DirectLinkUpsert) UpdateFileID ¶
func (u *DirectLinkUpsert) UpdateFileID() *DirectLinkUpsert
UpdateFileID sets the "file_id" field to the value that was provided on create.
func (*DirectLinkUpsert) UpdateName ¶
func (u *DirectLinkUpsert) UpdateName() *DirectLinkUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*DirectLinkUpsert) UpdateSpeed ¶
func (u *DirectLinkUpsert) UpdateSpeed() *DirectLinkUpsert
UpdateSpeed sets the "speed" field to the value that was provided on create.
func (*DirectLinkUpsert) UpdateUpdatedAt ¶
func (u *DirectLinkUpsert) UpdateUpdatedAt() *DirectLinkUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type DirectLinkUpsertBulk ¶
type DirectLinkUpsertBulk struct {
// contains filtered or unexported fields
}
DirectLinkUpsertBulk is the builder for "upsert"-ing a bulk of DirectLink nodes.
func (*DirectLinkUpsertBulk) AddDownloads ¶
func (u *DirectLinkUpsertBulk) AddDownloads(v int) *DirectLinkUpsertBulk
AddDownloads adds v to the "downloads" field.
func (*DirectLinkUpsertBulk) AddSpeed ¶
func (u *DirectLinkUpsertBulk) AddSpeed(v int) *DirectLinkUpsertBulk
AddSpeed adds v to the "speed" field.
func (*DirectLinkUpsertBulk) ClearDeletedAt ¶
func (u *DirectLinkUpsertBulk) ClearDeletedAt() *DirectLinkUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DirectLinkUpsertBulk) DoNothing ¶
func (u *DirectLinkUpsertBulk) DoNothing() *DirectLinkUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DirectLinkUpsertBulk) Exec ¶
func (u *DirectLinkUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DirectLinkUpsertBulk) ExecX ¶
func (u *DirectLinkUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectLinkUpsertBulk) Ignore ¶
func (u *DirectLinkUpsertBulk) Ignore() *DirectLinkUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.DirectLink.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DirectLinkUpsertBulk) SetDeletedAt ¶
func (u *DirectLinkUpsertBulk) SetDeletedAt(v time.Time) *DirectLinkUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*DirectLinkUpsertBulk) SetDownloads ¶
func (u *DirectLinkUpsertBulk) SetDownloads(v int) *DirectLinkUpsertBulk
SetDownloads sets the "downloads" field.
func (*DirectLinkUpsertBulk) SetFileID ¶
func (u *DirectLinkUpsertBulk) SetFileID(v int) *DirectLinkUpsertBulk
SetFileID sets the "file_id" field.
func (*DirectLinkUpsertBulk) SetName ¶
func (u *DirectLinkUpsertBulk) SetName(v string) *DirectLinkUpsertBulk
SetName sets the "name" field.
func (*DirectLinkUpsertBulk) SetSpeed ¶
func (u *DirectLinkUpsertBulk) SetSpeed(v int) *DirectLinkUpsertBulk
SetSpeed sets the "speed" field.
func (*DirectLinkUpsertBulk) SetUpdatedAt ¶
func (u *DirectLinkUpsertBulk) SetUpdatedAt(v time.Time) *DirectLinkUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*DirectLinkUpsertBulk) Update ¶
func (u *DirectLinkUpsertBulk) Update(set func(*DirectLinkUpsert)) *DirectLinkUpsertBulk
Update allows overriding fields `UPDATE` values. See the DirectLinkCreateBulk.OnConflict documentation for more info.
func (*DirectLinkUpsertBulk) UpdateDeletedAt ¶
func (u *DirectLinkUpsertBulk) UpdateDeletedAt() *DirectLinkUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*DirectLinkUpsertBulk) UpdateDownloads ¶
func (u *DirectLinkUpsertBulk) UpdateDownloads() *DirectLinkUpsertBulk
UpdateDownloads sets the "downloads" field to the value that was provided on create.
func (*DirectLinkUpsertBulk) UpdateFileID ¶
func (u *DirectLinkUpsertBulk) UpdateFileID() *DirectLinkUpsertBulk
UpdateFileID sets the "file_id" field to the value that was provided on create.
func (*DirectLinkUpsertBulk) UpdateName ¶
func (u *DirectLinkUpsertBulk) UpdateName() *DirectLinkUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*DirectLinkUpsertBulk) UpdateNewValues ¶
func (u *DirectLinkUpsertBulk) UpdateNewValues() *DirectLinkUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.DirectLink.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*DirectLinkUpsertBulk) UpdateSpeed ¶
func (u *DirectLinkUpsertBulk) UpdateSpeed() *DirectLinkUpsertBulk
UpdateSpeed sets the "speed" field to the value that was provided on create.
func (*DirectLinkUpsertBulk) UpdateUpdatedAt ¶
func (u *DirectLinkUpsertBulk) UpdateUpdatedAt() *DirectLinkUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type DirectLinkUpsertOne ¶
type DirectLinkUpsertOne struct {
// contains filtered or unexported fields
}
DirectLinkUpsertOne is the builder for "upsert"-ing
one DirectLink node.
func (*DirectLinkUpsertOne) AddDownloads ¶
func (u *DirectLinkUpsertOne) AddDownloads(v int) *DirectLinkUpsertOne
AddDownloads adds v to the "downloads" field.
func (*DirectLinkUpsertOne) AddSpeed ¶
func (u *DirectLinkUpsertOne) AddSpeed(v int) *DirectLinkUpsertOne
AddSpeed adds v to the "speed" field.
func (*DirectLinkUpsertOne) ClearDeletedAt ¶
func (u *DirectLinkUpsertOne) ClearDeletedAt() *DirectLinkUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DirectLinkUpsertOne) DoNothing ¶
func (u *DirectLinkUpsertOne) DoNothing() *DirectLinkUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DirectLinkUpsertOne) Exec ¶
func (u *DirectLinkUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*DirectLinkUpsertOne) ExecX ¶
func (u *DirectLinkUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectLinkUpsertOne) ID ¶
func (u *DirectLinkUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*DirectLinkUpsertOne) IDX ¶
func (u *DirectLinkUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*DirectLinkUpsertOne) Ignore ¶
func (u *DirectLinkUpsertOne) Ignore() *DirectLinkUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.DirectLink.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*DirectLinkUpsertOne) SetDeletedAt ¶
func (u *DirectLinkUpsertOne) SetDeletedAt(v time.Time) *DirectLinkUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*DirectLinkUpsertOne) SetDownloads ¶
func (u *DirectLinkUpsertOne) SetDownloads(v int) *DirectLinkUpsertOne
SetDownloads sets the "downloads" field.
func (*DirectLinkUpsertOne) SetFileID ¶
func (u *DirectLinkUpsertOne) SetFileID(v int) *DirectLinkUpsertOne
SetFileID sets the "file_id" field.
func (*DirectLinkUpsertOne) SetName ¶
func (u *DirectLinkUpsertOne) SetName(v string) *DirectLinkUpsertOne
SetName sets the "name" field.
func (*DirectLinkUpsertOne) SetSpeed ¶
func (u *DirectLinkUpsertOne) SetSpeed(v int) *DirectLinkUpsertOne
SetSpeed sets the "speed" field.
func (*DirectLinkUpsertOne) SetUpdatedAt ¶
func (u *DirectLinkUpsertOne) SetUpdatedAt(v time.Time) *DirectLinkUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*DirectLinkUpsertOne) Update ¶
func (u *DirectLinkUpsertOne) Update(set func(*DirectLinkUpsert)) *DirectLinkUpsertOne
Update allows overriding fields `UPDATE` values. See the DirectLinkCreate.OnConflict documentation for more info.
func (*DirectLinkUpsertOne) UpdateDeletedAt ¶
func (u *DirectLinkUpsertOne) UpdateDeletedAt() *DirectLinkUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*DirectLinkUpsertOne) UpdateDownloads ¶
func (u *DirectLinkUpsertOne) UpdateDownloads() *DirectLinkUpsertOne
UpdateDownloads sets the "downloads" field to the value that was provided on create.
func (*DirectLinkUpsertOne) UpdateFileID ¶
func (u *DirectLinkUpsertOne) UpdateFileID() *DirectLinkUpsertOne
UpdateFileID sets the "file_id" field to the value that was provided on create.
func (*DirectLinkUpsertOne) UpdateName ¶
func (u *DirectLinkUpsertOne) UpdateName() *DirectLinkUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*DirectLinkUpsertOne) UpdateNewValues ¶
func (u *DirectLinkUpsertOne) UpdateNewValues() *DirectLinkUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.DirectLink.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*DirectLinkUpsertOne) UpdateSpeed ¶
func (u *DirectLinkUpsertOne) UpdateSpeed() *DirectLinkUpsertOne
UpdateSpeed sets the "speed" field to the value that was provided on create.
func (*DirectLinkUpsertOne) UpdateUpdatedAt ¶
func (u *DirectLinkUpsertOne) UpdateUpdatedAt() *DirectLinkUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type Entity ¶
type Entity struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Type holds the value of the "type" field.
Type int `json:"type,omitempty"`
// Source holds the value of the "source" field.
Source string `json:"source,omitempty"`
// Size holds the value of the "size" field.
Size int64 `json:"size,omitempty"`
// ReferenceCount holds the value of the "reference_count" field.
ReferenceCount int `json:"reference_count,omitempty"`
// StoragePolicyEntities holds the value of the "storage_policy_entities" field.
StoragePolicyEntities int `json:"storage_policy_entities,omitempty"`
// CreatedBy holds the value of the "created_by" field.
CreatedBy int `json:"created_by,omitempty"`
// UploadSessionID holds the value of the "upload_session_id" field.
UploadSessionID *uuid.UUID `json:"upload_session_id,omitempty"`
// Props holds the value of the "props" field.
Props *types.EntityProps `json:"props,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the EntityQuery when eager-loading is set.
Edges EntityEdges `json:"edges"`
// contains filtered or unexported fields
}
Entity is the model entity for the Entity schema.
func (*Entity) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Entity) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Entity) QueryStoragePolicy ¶
func (e *Entity) QueryStoragePolicy() *StoragePolicyQuery
QueryStoragePolicy queries the "storage_policy" edge of the Entity entity.
func (*Entity) SetStoragePolicy ¶
func (e *Entity) SetStoragePolicy(v *StoragePolicy)
SetStoragePolicy manually set the edge as loaded state.
func (*Entity) Unwrap ¶
Unwrap unwraps the Entity 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 (*Entity) Update ¶
func (e *Entity) Update() *EntityUpdateOne
Update returns a builder for updating this Entity. Note that you need to call Entity.Unwrap() before calling this method if this Entity was returned from a transaction, and the transaction was committed or rolled back.
type EntityClient ¶
type EntityClient struct {
// contains filtered or unexported fields
}
EntityClient is a client for the Entity schema.
func NewEntityClient ¶
func NewEntityClient(c config) *EntityClient
NewEntityClient returns a client for the Entity from the given config.
func (*EntityClient) Create ¶
func (c *EntityClient) Create() *EntityCreate
Create returns a builder for creating a Entity entity.
func (*EntityClient) CreateBulk ¶
func (c *EntityClient) CreateBulk(builders ...*EntityCreate) *EntityCreateBulk
CreateBulk returns a builder for creating a bulk of Entity entities.
func (*EntityClient) Delete ¶
func (c *EntityClient) Delete() *EntityDelete
Delete returns a delete builder for Entity.
func (*EntityClient) DeleteOne ¶
func (c *EntityClient) DeleteOne(e *Entity) *EntityDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EntityClient) DeleteOneID ¶
func (c *EntityClient) DeleteOneID(id int) *EntityDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EntityClient) ExecContext ¶
func (c *EntityClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EntityClient) GetX ¶
func (c *EntityClient) GetX(ctx context.Context, id int) *Entity
GetX is like Get, but panics if an error occurs.
func (*EntityClient) Intercept ¶
func (c *EntityClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `entity.Intercept(f(g(h())))`.
func (*EntityClient) Interceptors ¶
func (c *EntityClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EntityClient) MapCreateBulk ¶
func (c *EntityClient) MapCreateBulk(slice any, setFunc func(*EntityCreate, int)) *EntityCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*EntityClient) Query ¶
func (c *EntityClient) Query() *EntityQuery
Query returns a query builder for Entity.
func (*EntityClient) QueryContext ¶
func (c *EntityClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EntityClient) QueryFile ¶
func (c *EntityClient) QueryFile(e *Entity) *FileQuery
QueryFile queries the file edge of a Entity.
func (*EntityClient) QueryStoragePolicy ¶
func (c *EntityClient) QueryStoragePolicy(e *Entity) *StoragePolicyQuery
QueryStoragePolicy queries the storage_policy edge of a Entity.
func (*EntityClient) QueryUser ¶
func (c *EntityClient) QueryUser(e *Entity) *UserQuery
QueryUser queries the user edge of a Entity.
func (*EntityClient) Update ¶
func (c *EntityClient) Update() *EntityUpdate
Update returns an update builder for Entity.
func (*EntityClient) UpdateOne ¶
func (c *EntityClient) UpdateOne(e *Entity) *EntityUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EntityClient) UpdateOneID ¶
func (c *EntityClient) UpdateOneID(id int) *EntityUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EntityClient) Use ¶
func (c *EntityClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `entity.Hooks(f(g(h())))`.
type EntityCreate ¶
type EntityCreate struct {
// contains filtered or unexported fields
}
EntityCreate is the builder for creating a Entity entity.
func (*EntityCreate) AddFile ¶
func (ec *EntityCreate) AddFile(f ...*File) *EntityCreate
AddFile adds the "file" edges to the File entity.
func (*EntityCreate) AddFileIDs ¶
func (ec *EntityCreate) AddFileIDs(ids ...int) *EntityCreate
AddFileIDs adds the "file" edge to the File entity by IDs.
func (*EntityCreate) Exec ¶
func (ec *EntityCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EntityCreate) ExecContext ¶
func (c *EntityCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EntityCreate) ExecX ¶
func (ec *EntityCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityCreate) Mutation ¶
func (ec *EntityCreate) Mutation() *EntityMutation
Mutation returns the EntityMutation object of the builder.
func (*EntityCreate) OnConflict ¶
func (ec *EntityCreate) OnConflict(opts ...sql.ConflictOption) *EntityUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Entity.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.EntityUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*EntityCreate) OnConflictColumns ¶
func (ec *EntityCreate) OnConflictColumns(columns ...string) *EntityUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Entity.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*EntityCreate) QueryContext ¶
func (c *EntityCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EntityCreate) Save ¶
func (ec *EntityCreate) Save(ctx context.Context) (*Entity, error)
Save creates the Entity in the database.
func (*EntityCreate) SaveX ¶
func (ec *EntityCreate) SaveX(ctx context.Context) *Entity
SaveX calls Save and panics if Save returns an error.
func (*EntityCreate) SetCreatedAt ¶
func (ec *EntityCreate) SetCreatedAt(t time.Time) *EntityCreate
SetCreatedAt sets the "created_at" field.
func (*EntityCreate) SetCreatedBy ¶
func (ec *EntityCreate) SetCreatedBy(i int) *EntityCreate
SetCreatedBy sets the "created_by" field.
func (*EntityCreate) SetDeletedAt ¶
func (ec *EntityCreate) SetDeletedAt(t time.Time) *EntityCreate
SetDeletedAt sets the "deleted_at" field.
func (*EntityCreate) SetNillableCreatedAt ¶
func (ec *EntityCreate) SetNillableCreatedAt(t *time.Time) *EntityCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EntityCreate) SetNillableCreatedBy ¶
func (ec *EntityCreate) SetNillableCreatedBy(i *int) *EntityCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*EntityCreate) SetNillableDeletedAt ¶
func (ec *EntityCreate) SetNillableDeletedAt(t *time.Time) *EntityCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*EntityCreate) SetNillableReferenceCount ¶
func (ec *EntityCreate) SetNillableReferenceCount(i *int) *EntityCreate
SetNillableReferenceCount sets the "reference_count" field if the given value is not nil.
func (*EntityCreate) SetNillableUpdatedAt ¶
func (ec *EntityCreate) SetNillableUpdatedAt(t *time.Time) *EntityCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*EntityCreate) SetNillableUploadSessionID ¶
func (ec *EntityCreate) SetNillableUploadSessionID(u *uuid.UUID) *EntityCreate
SetNillableUploadSessionID sets the "upload_session_id" field if the given value is not nil.
func (*EntityCreate) SetNillableUserID ¶
func (ec *EntityCreate) SetNillableUserID(id *int) *EntityCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*EntityCreate) SetProps ¶
func (ec *EntityCreate) SetProps(tp *types.EntityProps) *EntityCreate
SetProps sets the "props" field.
func (*EntityCreate) SetRawID ¶
func (m *EntityCreate) SetRawID(t int) *EntityCreate
func (*EntityCreate) SetReferenceCount ¶
func (ec *EntityCreate) SetReferenceCount(i int) *EntityCreate
SetReferenceCount sets the "reference_count" field.
func (*EntityCreate) SetSize ¶
func (ec *EntityCreate) SetSize(i int64) *EntityCreate
SetSize sets the "size" field.
func (*EntityCreate) SetSource ¶
func (ec *EntityCreate) SetSource(s string) *EntityCreate
SetSource sets the "source" field.
func (*EntityCreate) SetStoragePolicy ¶
func (ec *EntityCreate) SetStoragePolicy(s *StoragePolicy) *EntityCreate
SetStoragePolicy sets the "storage_policy" edge to the StoragePolicy entity.
func (*EntityCreate) SetStoragePolicyEntities ¶
func (ec *EntityCreate) SetStoragePolicyEntities(i int) *EntityCreate
SetStoragePolicyEntities sets the "storage_policy_entities" field.
func (*EntityCreate) SetStoragePolicyID ¶
func (ec *EntityCreate) SetStoragePolicyID(id int) *EntityCreate
SetStoragePolicyID sets the "storage_policy" edge to the StoragePolicy entity by ID.
func (*EntityCreate) SetType ¶
func (ec *EntityCreate) SetType(i int) *EntityCreate
SetType sets the "type" field.
func (*EntityCreate) SetUpdatedAt ¶
func (ec *EntityCreate) SetUpdatedAt(t time.Time) *EntityCreate
SetUpdatedAt sets the "updated_at" field.
func (*EntityCreate) SetUploadSessionID ¶
func (ec *EntityCreate) SetUploadSessionID(u uuid.UUID) *EntityCreate
SetUploadSessionID sets the "upload_session_id" field.
func (*EntityCreate) SetUser ¶
func (ec *EntityCreate) SetUser(u *User) *EntityCreate
SetUser sets the "user" edge to the User entity.
func (*EntityCreate) SetUserID ¶
func (ec *EntityCreate) SetUserID(id int) *EntityCreate
SetUserID sets the "user" edge to the User entity by ID.
type EntityCreateBulk ¶
type EntityCreateBulk struct {
// contains filtered or unexported fields
}
EntityCreateBulk is the builder for creating many Entity entities in bulk.
func (*EntityCreateBulk) Exec ¶
func (ecb *EntityCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EntityCreateBulk) ExecContext ¶
func (c *EntityCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EntityCreateBulk) ExecX ¶
func (ecb *EntityCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityCreateBulk) OnConflict ¶
func (ecb *EntityCreateBulk) OnConflict(opts ...sql.ConflictOption) *EntityUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Entity.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.EntityUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*EntityCreateBulk) OnConflictColumns ¶
func (ecb *EntityCreateBulk) OnConflictColumns(columns ...string) *EntityUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Entity.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*EntityCreateBulk) QueryContext ¶
func (c *EntityCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type EntityDelete ¶
type EntityDelete struct {
// contains filtered or unexported fields
}
EntityDelete is the builder for deleting a Entity entity.
func (*EntityDelete) Exec ¶
func (ed *EntityDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EntityDelete) ExecContext ¶
func (c *EntityDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EntityDelete) ExecX ¶
func (ed *EntityDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EntityDelete) QueryContext ¶
func (c *EntityDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EntityDelete) Where ¶
func (ed *EntityDelete) Where(ps ...predicate.Entity) *EntityDelete
Where appends a list predicates to the EntityDelete builder.
type EntityDeleteOne ¶
type EntityDeleteOne struct {
// contains filtered or unexported fields
}
EntityDeleteOne is the builder for deleting a single Entity entity.
func (*EntityDeleteOne) Exec ¶
func (edo *EntityDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EntityDeleteOne) ExecX ¶
func (edo *EntityDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityDeleteOne) Where ¶
func (edo *EntityDeleteOne) Where(ps ...predicate.Entity) *EntityDeleteOne
Where appends a list predicates to the EntityDelete builder.
type EntityEdges ¶
type EntityEdges struct {
// File holds the value of the file edge.
File []*File `json:"file,omitempty"`
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// StoragePolicy holds the value of the storage_policy edge.
StoragePolicy *StoragePolicy `json:"storage_policy,omitempty"`
// contains filtered or unexported fields
}
EntityEdges holds the relations/edges for other nodes in the graph.
func (EntityEdges) FileOrErr ¶
func (e EntityEdges) FileOrErr() ([]*File, error)
FileOrErr returns the File value or an error if the edge was not loaded in eager-loading.
func (EntityEdges) StoragePolicyOrErr ¶
func (e EntityEdges) StoragePolicyOrErr() (*StoragePolicy, error)
StoragePolicyOrErr returns the StoragePolicy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (EntityEdges) UserOrErr ¶
func (e EntityEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type EntityGroupBy ¶
type EntityGroupBy struct {
// contains filtered or unexported fields
}
EntityGroupBy is the group-by builder for Entity entities.
func (*EntityGroupBy) Aggregate ¶
func (egb *EntityGroupBy) Aggregate(fns ...AggregateFunc) *EntityGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EntityGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Scan ¶
func (egb *EntityGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EntityGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EntityMutation ¶
type EntityMutation struct {
// contains filtered or unexported fields
}
EntityMutation represents an operation that mutates the Entity nodes in the graph.
func (*EntityMutation) AddField ¶
func (m *EntityMutation) 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 (*EntityMutation) AddFileIDs ¶
func (m *EntityMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "file" edge to the File entity by ids.
func (*EntityMutation) AddReferenceCount ¶
func (m *EntityMutation) AddReferenceCount(i int)
AddReferenceCount adds i to the "reference_count" field.
func (*EntityMutation) AddSize ¶
func (m *EntityMutation) AddSize(i int64)
AddSize adds i to the "size" field.
func (*EntityMutation) AddType ¶
func (m *EntityMutation) AddType(i int)
AddType adds i to the "type" field.
func (*EntityMutation) AddedEdges ¶
func (m *EntityMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EntityMutation) AddedField ¶
func (m *EntityMutation) 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 (*EntityMutation) AddedFields ¶
func (m *EntityMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EntityMutation) AddedIDs ¶
func (m *EntityMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EntityMutation) AddedReferenceCount ¶
func (m *EntityMutation) AddedReferenceCount() (r int, exists bool)
AddedReferenceCount returns the value that was added to the "reference_count" field in this mutation.
func (*EntityMutation) AddedSize ¶
func (m *EntityMutation) AddedSize() (r int64, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*EntityMutation) AddedType ¶
func (m *EntityMutation) AddedType() (r int, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*EntityMutation) ClearCreatedBy ¶
func (m *EntityMutation) ClearCreatedBy()
ClearCreatedBy clears the value of the "created_by" field.
func (*EntityMutation) ClearDeletedAt ¶
func (m *EntityMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*EntityMutation) ClearEdge ¶
func (m *EntityMutation) 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 (*EntityMutation) ClearField ¶
func (m *EntityMutation) 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 (*EntityMutation) ClearFile ¶
func (m *EntityMutation) ClearFile()
ClearFile clears the "file" edge to the File entity.
func (*EntityMutation) ClearProps ¶
func (m *EntityMutation) ClearProps()
ClearProps clears the value of the "props" field.
func (*EntityMutation) ClearStoragePolicy ¶
func (m *EntityMutation) ClearStoragePolicy()
ClearStoragePolicy clears the "storage_policy" edge to the StoragePolicy entity.
func (*EntityMutation) ClearUploadSessionID ¶
func (m *EntityMutation) ClearUploadSessionID()
ClearUploadSessionID clears the value of the "upload_session_id" field.
func (*EntityMutation) ClearUser ¶
func (m *EntityMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*EntityMutation) ClearedEdges ¶
func (m *EntityMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EntityMutation) ClearedFields ¶
func (m *EntityMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EntityMutation) Client ¶
func (m EntityMutation) 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 (*EntityMutation) CreatedAt ¶
func (m *EntityMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*EntityMutation) CreatedBy ¶
func (m *EntityMutation) CreatedBy() (r int, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*EntityMutation) CreatedByCleared ¶
func (m *EntityMutation) CreatedByCleared() bool
CreatedByCleared returns if the "created_by" field was cleared in this mutation.
func (*EntityMutation) DeletedAt ¶
func (m *EntityMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*EntityMutation) DeletedAtCleared ¶
func (m *EntityMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*EntityMutation) EdgeCleared ¶
func (m *EntityMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EntityMutation) ExecContext ¶
func (c *EntityMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EntityMutation) Field ¶
func (m *EntityMutation) 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 (*EntityMutation) FieldCleared ¶
func (m *EntityMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EntityMutation) Fields ¶
func (m *EntityMutation) 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 (*EntityMutation) FileCleared ¶
func (m *EntityMutation) FileCleared() bool
FileCleared reports if the "file" edge to the File entity was cleared.
func (*EntityMutation) FileIDs ¶
func (m *EntityMutation) FileIDs() (ids []int)
FileIDs returns the "file" edge IDs in the mutation.
func (*EntityMutation) GetType ¶
func (m *EntityMutation) GetType() (r int, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*EntityMutation) ID ¶
func (m *EntityMutation) 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 (*EntityMutation) IDs ¶
func (m *EntityMutation) 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 (*EntityMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldCreatedBy ¶
func (m *EntityMutation) OldCreatedBy(ctx context.Context) (v int, err error)
OldCreatedBy returns the old "created_by" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Entity entity. If the Entity 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 (*EntityMutation) 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 (*EntityMutation) OldProps ¶
func (m *EntityMutation) OldProps(ctx context.Context) (v *types.EntityProps, err error)
OldProps returns the old "props" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldReferenceCount ¶
func (m *EntityMutation) OldReferenceCount(ctx context.Context) (v int, err error)
OldReferenceCount returns the old "reference_count" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldSize ¶
func (m *EntityMutation) OldSize(ctx context.Context) (v int64, err error)
OldSize returns the old "size" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldSource ¶
func (m *EntityMutation) OldSource(ctx context.Context) (v string, err error)
OldSource returns the old "source" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldStoragePolicyEntities ¶
func (m *EntityMutation) OldStoragePolicyEntities(ctx context.Context) (v int, err error)
OldStoragePolicyEntities returns the old "storage_policy_entities" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldType ¶
func (m *EntityMutation) OldType(ctx context.Context) (v int, err error)
OldType returns the old "type" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldUploadSessionID ¶
OldUploadSessionID returns the old "upload_session_id" field's value of the Entity entity. If the Entity 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 (*EntityMutation) Props ¶
func (m *EntityMutation) Props() (r *types.EntityProps, exists bool)
Props returns the value of the "props" field in the mutation.
func (*EntityMutation) PropsCleared ¶
func (m *EntityMutation) PropsCleared() bool
PropsCleared returns if the "props" field was cleared in this mutation.
func (*EntityMutation) QueryContext ¶
func (c *EntityMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EntityMutation) ReferenceCount ¶
func (m *EntityMutation) ReferenceCount() (r int, exists bool)
ReferenceCount returns the value of the "reference_count" field in the mutation.
func (*EntityMutation) RemoveFileIDs ¶
func (m *EntityMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "file" edge to the File entity by IDs.
func (*EntityMutation) RemovedEdges ¶
func (m *EntityMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EntityMutation) RemovedFileIDs ¶
func (m *EntityMutation) RemovedFileIDs() (ids []int)
RemovedFile returns the removed IDs of the "file" edge to the File entity.
func (*EntityMutation) RemovedIDs ¶
func (m *EntityMutation) 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 (*EntityMutation) ResetCreatedAt ¶
func (m *EntityMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*EntityMutation) ResetCreatedBy ¶
func (m *EntityMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*EntityMutation) ResetDeletedAt ¶
func (m *EntityMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*EntityMutation) ResetEdge ¶
func (m *EntityMutation) 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 (*EntityMutation) ResetField ¶
func (m *EntityMutation) 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 (*EntityMutation) ResetFile ¶
func (m *EntityMutation) ResetFile()
ResetFile resets all changes to the "file" edge.
func (*EntityMutation) ResetProps ¶
func (m *EntityMutation) ResetProps()
ResetProps resets all changes to the "props" field.
func (*EntityMutation) ResetReferenceCount ¶
func (m *EntityMutation) ResetReferenceCount()
ResetReferenceCount resets all changes to the "reference_count" field.
func (*EntityMutation) ResetSize ¶
func (m *EntityMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*EntityMutation) ResetSource ¶
func (m *EntityMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (*EntityMutation) ResetStoragePolicy ¶
func (m *EntityMutation) ResetStoragePolicy()
ResetStoragePolicy resets all changes to the "storage_policy" edge.
func (*EntityMutation) ResetStoragePolicyEntities ¶
func (m *EntityMutation) ResetStoragePolicyEntities()
ResetStoragePolicyEntities resets all changes to the "storage_policy_entities" field.
func (*EntityMutation) ResetType ¶
func (m *EntityMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*EntityMutation) ResetUpdatedAt ¶
func (m *EntityMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*EntityMutation) ResetUploadSessionID ¶
func (m *EntityMutation) ResetUploadSessionID()
ResetUploadSessionID resets all changes to the "upload_session_id" field.
func (*EntityMutation) ResetUser ¶
func (m *EntityMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*EntityMutation) SetCreatedAt ¶
func (m *EntityMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*EntityMutation) SetCreatedBy ¶
func (m *EntityMutation) SetCreatedBy(i int)
SetCreatedBy sets the "created_by" field.
func (*EntityMutation) SetDeletedAt ¶
func (m *EntityMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*EntityMutation) SetField ¶
func (m *EntityMutation) 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 (*EntityMutation) SetOp ¶
func (m *EntityMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EntityMutation) SetProps ¶
func (m *EntityMutation) SetProps(tp *types.EntityProps)
SetProps sets the "props" field.
func (*EntityMutation) SetRawID ¶
func (m *EntityMutation) SetRawID(t int)
func (*EntityMutation) SetReferenceCount ¶
func (m *EntityMutation) SetReferenceCount(i int)
SetReferenceCount sets the "reference_count" field.
func (*EntityMutation) SetSize ¶
func (m *EntityMutation) SetSize(i int64)
SetSize sets the "size" field.
func (*EntityMutation) SetSource ¶
func (m *EntityMutation) SetSource(s string)
SetSource sets the "source" field.
func (*EntityMutation) SetStoragePolicyEntities ¶
func (m *EntityMutation) SetStoragePolicyEntities(i int)
SetStoragePolicyEntities sets the "storage_policy_entities" field.
func (*EntityMutation) SetStoragePolicyID ¶
func (m *EntityMutation) SetStoragePolicyID(id int)
SetStoragePolicyID sets the "storage_policy" edge to the StoragePolicy entity by id.
func (*EntityMutation) SetType ¶
func (m *EntityMutation) SetType(i int)
SetType sets the "type" field.
func (*EntityMutation) SetUpdatedAt ¶
func (m *EntityMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*EntityMutation) SetUploadSessionID ¶
func (m *EntityMutation) SetUploadSessionID(u uuid.UUID)
SetUploadSessionID sets the "upload_session_id" field.
func (*EntityMutation) SetUserID ¶
func (m *EntityMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*EntityMutation) Size ¶
func (m *EntityMutation) Size() (r int64, exists bool)
Size returns the value of the "size" field in the mutation.
func (*EntityMutation) Source ¶
func (m *EntityMutation) Source() (r string, exists bool)
Source returns the value of the "source" field in the mutation.
func (*EntityMutation) StoragePolicyCleared ¶
func (m *EntityMutation) StoragePolicyCleared() bool
StoragePolicyCleared reports if the "storage_policy" edge to the StoragePolicy entity was cleared.
func (*EntityMutation) StoragePolicyEntities ¶
func (m *EntityMutation) StoragePolicyEntities() (r int, exists bool)
StoragePolicyEntities returns the value of the "storage_policy_entities" field in the mutation.
func (*EntityMutation) StoragePolicyID ¶
func (m *EntityMutation) StoragePolicyID() (id int, exists bool)
StoragePolicyID returns the "storage_policy" edge ID in the mutation.
func (*EntityMutation) StoragePolicyIDs ¶
func (m *EntityMutation) StoragePolicyIDs() (ids []int)
StoragePolicyIDs returns the "storage_policy" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StoragePolicyID instead. It exists only for internal usage by the builders.
func (EntityMutation) Tx ¶
func (m EntityMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EntityMutation) Type ¶
func (m *EntityMutation) Type() string
Type returns the node type of this mutation (Entity).
func (*EntityMutation) UpdatedAt ¶
func (m *EntityMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*EntityMutation) UploadSessionID ¶
func (m *EntityMutation) UploadSessionID() (r uuid.UUID, exists bool)
UploadSessionID returns the value of the "upload_session_id" field in the mutation.
func (*EntityMutation) UploadSessionIDCleared ¶
func (m *EntityMutation) UploadSessionIDCleared() bool
UploadSessionIDCleared returns if the "upload_session_id" field was cleared in this mutation.
func (*EntityMutation) UserCleared ¶
func (m *EntityMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*EntityMutation) UserID ¶
func (m *EntityMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*EntityMutation) UserIDs ¶
func (m *EntityMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*EntityMutation) Where ¶
func (m *EntityMutation) Where(ps ...predicate.Entity)
Where appends a list predicates to the EntityMutation builder.
func (*EntityMutation) WhereP ¶
func (m *EntityMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EntityMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EntityQuery ¶
type EntityQuery struct {
// contains filtered or unexported fields
}
EntityQuery is the builder for querying Entity entities.
func (*EntityQuery) Aggregate ¶
func (eq *EntityQuery) Aggregate(fns ...AggregateFunc) *EntitySelect
Aggregate returns a EntitySelect configured with the given aggregations.
func (*EntityQuery) All ¶
func (eq *EntityQuery) All(ctx context.Context) ([]*Entity, error)
All executes the query and returns a list of Entities.
func (*EntityQuery) AllX ¶
func (eq *EntityQuery) AllX(ctx context.Context) []*Entity
AllX is like All, but panics if an error occurs.
func (*EntityQuery) Clone ¶
func (eq *EntityQuery) Clone() *EntityQuery
Clone returns a duplicate of the EntityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EntityQuery) Count ¶
func (eq *EntityQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EntityQuery) CountX ¶
func (eq *EntityQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EntityQuery) ExecContext ¶
func (c *EntityQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EntityQuery) Exist ¶
func (eq *EntityQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EntityQuery) ExistX ¶
func (eq *EntityQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EntityQuery) First ¶
func (eq *EntityQuery) First(ctx context.Context) (*Entity, error)
First returns the first Entity entity from the query. Returns a *NotFoundError when no Entity was found.
func (*EntityQuery) FirstID ¶
func (eq *EntityQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Entity ID from the query. Returns a *NotFoundError when no Entity ID was found.
func (*EntityQuery) FirstIDX ¶
func (eq *EntityQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EntityQuery) FirstX ¶
func (eq *EntityQuery) FirstX(ctx context.Context) *Entity
FirstX is like First, but panics if an error occurs.
func (*EntityQuery) GroupBy ¶
func (eq *EntityQuery) GroupBy(field string, fields ...string) *EntityGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Entity.Query().
GroupBy(entity.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*EntityQuery) IDs ¶
func (eq *EntityQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Entity IDs.
func (*EntityQuery) IDsX ¶
func (eq *EntityQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EntityQuery) Limit ¶
func (eq *EntityQuery) Limit(limit int) *EntityQuery
Limit the number of records to be returned by this query.
func (*EntityQuery) Offset ¶
func (eq *EntityQuery) Offset(offset int) *EntityQuery
Offset to start from.
func (*EntityQuery) Only ¶
func (eq *EntityQuery) Only(ctx context.Context) (*Entity, error)
Only returns a single Entity entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Entity entity is found. Returns a *NotFoundError when no Entity entities are found.
func (*EntityQuery) OnlyID ¶
func (eq *EntityQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Entity ID in the query. Returns a *NotSingularError when more than one Entity ID is found. Returns a *NotFoundError when no entities are found.
func (*EntityQuery) OnlyIDX ¶
func (eq *EntityQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EntityQuery) OnlyX ¶
func (eq *EntityQuery) OnlyX(ctx context.Context) *Entity
OnlyX is like Only, but panics if an error occurs.
func (*EntityQuery) Order ¶
func (eq *EntityQuery) Order(o ...entity.OrderOption) *EntityQuery
Order specifies how the records should be ordered.
func (*EntityQuery) QueryContext ¶
func (c *EntityQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EntityQuery) QueryFile ¶
func (eq *EntityQuery) QueryFile() *FileQuery
QueryFile chains the current query on the "file" edge.
func (*EntityQuery) QueryStoragePolicy ¶
func (eq *EntityQuery) QueryStoragePolicy() *StoragePolicyQuery
QueryStoragePolicy chains the current query on the "storage_policy" edge.
func (*EntityQuery) QueryUser ¶
func (eq *EntityQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*EntityQuery) Select ¶
func (eq *EntityQuery) Select(fields ...string) *EntitySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Entity.Query().
Select(entity.FieldCreatedAt).
Scan(ctx, &v)
func (*EntityQuery) Unique ¶
func (eq *EntityQuery) Unique(unique bool) *EntityQuery
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 (*EntityQuery) Where ¶
func (eq *EntityQuery) Where(ps ...predicate.Entity) *EntityQuery
Where adds a new predicate for the EntityQuery builder.
func (*EntityQuery) WithFile ¶
func (eq *EntityQuery) WithFile(opts ...func(*FileQuery)) *EntityQuery
WithFile tells the query-builder to eager-load the nodes that are connected to the "file" edge. The optional arguments are used to configure the query builder of the edge.
func (*EntityQuery) WithStoragePolicy ¶
func (eq *EntityQuery) WithStoragePolicy(opts ...func(*StoragePolicyQuery)) *EntityQuery
WithStoragePolicy tells the query-builder to eager-load the nodes that are connected to the "storage_policy" edge. The optional arguments are used to configure the query builder of the edge.
func (*EntityQuery) WithUser ¶
func (eq *EntityQuery) WithUser(opts ...func(*UserQuery)) *EntityQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type EntitySelect ¶
type EntitySelect struct {
*EntityQuery
// contains filtered or unexported fields
}
EntitySelect is the builder for selecting fields of Entity entities.
func (*EntitySelect) Aggregate ¶
func (es *EntitySelect) Aggregate(fns ...AggregateFunc) *EntitySelect
Aggregate adds the given aggregation functions to the selector query.
func (*EntitySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (EntitySelect) ExecContext ¶
func (c EntitySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EntitySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (EntitySelect) QueryContext ¶
func (c EntitySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EntitySelect) Scan ¶
func (es *EntitySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EntitySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EntityUpdate ¶
type EntityUpdate struct {
// contains filtered or unexported fields
}
EntityUpdate is the builder for updating Entity entities.
func (*EntityUpdate) AddFile ¶
func (eu *EntityUpdate) AddFile(f ...*File) *EntityUpdate
AddFile adds the "file" edges to the File entity.
func (*EntityUpdate) AddFileIDs ¶
func (eu *EntityUpdate) AddFileIDs(ids ...int) *EntityUpdate
AddFileIDs adds the "file" edge to the File entity by IDs.
func (*EntityUpdate) AddReferenceCount ¶
func (eu *EntityUpdate) AddReferenceCount(i int) *EntityUpdate
AddReferenceCount adds i to the "reference_count" field.
func (*EntityUpdate) AddSize ¶
func (eu *EntityUpdate) AddSize(i int64) *EntityUpdate
AddSize adds i to the "size" field.
func (*EntityUpdate) AddType ¶
func (eu *EntityUpdate) AddType(i int) *EntityUpdate
AddType adds i to the "type" field.
func (*EntityUpdate) ClearCreatedBy ¶
func (eu *EntityUpdate) ClearCreatedBy() *EntityUpdate
ClearCreatedBy clears the value of the "created_by" field.
func (*EntityUpdate) ClearDeletedAt ¶
func (eu *EntityUpdate) ClearDeletedAt() *EntityUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*EntityUpdate) ClearFile ¶
func (eu *EntityUpdate) ClearFile() *EntityUpdate
ClearFile clears all "file" edges to the File entity.
func (*EntityUpdate) ClearProps ¶
func (eu *EntityUpdate) ClearProps() *EntityUpdate
ClearProps clears the value of the "props" field.
func (*EntityUpdate) ClearStoragePolicy ¶
func (eu *EntityUpdate) ClearStoragePolicy() *EntityUpdate
ClearStoragePolicy clears the "storage_policy" edge to the StoragePolicy entity.
func (*EntityUpdate) ClearUploadSessionID ¶
func (eu *EntityUpdate) ClearUploadSessionID() *EntityUpdate
ClearUploadSessionID clears the value of the "upload_session_id" field.
func (*EntityUpdate) ClearUser ¶
func (eu *EntityUpdate) ClearUser() *EntityUpdate
ClearUser clears the "user" edge to the User entity.
func (*EntityUpdate) Exec ¶
func (eu *EntityUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EntityUpdate) ExecContext ¶
func (c *EntityUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EntityUpdate) ExecX ¶
func (eu *EntityUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityUpdate) Mutation ¶
func (eu *EntityUpdate) Mutation() *EntityMutation
Mutation returns the EntityMutation object of the builder.
func (*EntityUpdate) QueryContext ¶
func (c *EntityUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EntityUpdate) RemoveFile ¶
func (eu *EntityUpdate) RemoveFile(f ...*File) *EntityUpdate
RemoveFile removes "file" edges to File entities.
func (*EntityUpdate) RemoveFileIDs ¶
func (eu *EntityUpdate) RemoveFileIDs(ids ...int) *EntityUpdate
RemoveFileIDs removes the "file" edge to File entities by IDs.
func (*EntityUpdate) Save ¶
func (eu *EntityUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EntityUpdate) SaveX ¶
func (eu *EntityUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EntityUpdate) SetCreatedBy ¶
func (eu *EntityUpdate) SetCreatedBy(i int) *EntityUpdate
SetCreatedBy sets the "created_by" field.
func (*EntityUpdate) SetDeletedAt ¶
func (eu *EntityUpdate) SetDeletedAt(t time.Time) *EntityUpdate
SetDeletedAt sets the "deleted_at" field.
func (*EntityUpdate) SetNillableCreatedBy ¶
func (eu *EntityUpdate) SetNillableCreatedBy(i *int) *EntityUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*EntityUpdate) SetNillableDeletedAt ¶
func (eu *EntityUpdate) SetNillableDeletedAt(t *time.Time) *EntityUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*EntityUpdate) SetNillableReferenceCount ¶
func (eu *EntityUpdate) SetNillableReferenceCount(i *int) *EntityUpdate
SetNillableReferenceCount sets the "reference_count" field if the given value is not nil.
func (*EntityUpdate) SetNillableSize ¶
func (eu *EntityUpdate) SetNillableSize(i *int64) *EntityUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (*EntityUpdate) SetNillableSource ¶
func (eu *EntityUpdate) SetNillableSource(s *string) *EntityUpdate
SetNillableSource sets the "source" field if the given value is not nil.
func (*EntityUpdate) SetNillableStoragePolicyEntities ¶
func (eu *EntityUpdate) SetNillableStoragePolicyEntities(i *int) *EntityUpdate
SetNillableStoragePolicyEntities sets the "storage_policy_entities" field if the given value is not nil.
func (*EntityUpdate) SetNillableType ¶
func (eu *EntityUpdate) SetNillableType(i *int) *EntityUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*EntityUpdate) SetNillableUploadSessionID ¶
func (eu *EntityUpdate) SetNillableUploadSessionID(u *uuid.UUID) *EntityUpdate
SetNillableUploadSessionID sets the "upload_session_id" field if the given value is not nil.
func (*EntityUpdate) SetNillableUserID ¶
func (eu *EntityUpdate) SetNillableUserID(id *int) *EntityUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*EntityUpdate) SetProps ¶
func (eu *EntityUpdate) SetProps(tp *types.EntityProps) *EntityUpdate
SetProps sets the "props" field.
func (*EntityUpdate) SetReferenceCount ¶
func (eu *EntityUpdate) SetReferenceCount(i int) *EntityUpdate
SetReferenceCount sets the "reference_count" field.
func (*EntityUpdate) SetSize ¶
func (eu *EntityUpdate) SetSize(i int64) *EntityUpdate
SetSize sets the "size" field.
func (*EntityUpdate) SetSource ¶
func (eu *EntityUpdate) SetSource(s string) *EntityUpdate
SetSource sets the "source" field.
func (*EntityUpdate) SetStoragePolicy ¶
func (eu *EntityUpdate) SetStoragePolicy(s *StoragePolicy) *EntityUpdate
SetStoragePolicy sets the "storage_policy" edge to the StoragePolicy entity.
func (*EntityUpdate) SetStoragePolicyEntities ¶
func (eu *EntityUpdate) SetStoragePolicyEntities(i int) *EntityUpdate
SetStoragePolicyEntities sets the "storage_policy_entities" field.
func (*EntityUpdate) SetStoragePolicyID ¶
func (eu *EntityUpdate) SetStoragePolicyID(id int) *EntityUpdate
SetStoragePolicyID sets the "storage_policy" edge to the StoragePolicy entity by ID.
func (*EntityUpdate) SetType ¶
func (eu *EntityUpdate) SetType(i int) *EntityUpdate
SetType sets the "type" field.
func (*EntityUpdate) SetUpdatedAt ¶
func (eu *EntityUpdate) SetUpdatedAt(t time.Time) *EntityUpdate
SetUpdatedAt sets the "updated_at" field.
func (*EntityUpdate) SetUploadSessionID ¶
func (eu *EntityUpdate) SetUploadSessionID(u uuid.UUID) *EntityUpdate
SetUploadSessionID sets the "upload_session_id" field.
func (*EntityUpdate) SetUser ¶
func (eu *EntityUpdate) SetUser(u *User) *EntityUpdate
SetUser sets the "user" edge to the User entity.
func (*EntityUpdate) SetUserID ¶
func (eu *EntityUpdate) SetUserID(id int) *EntityUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*EntityUpdate) Where ¶
func (eu *EntityUpdate) Where(ps ...predicate.Entity) *EntityUpdate
Where appends a list predicates to the EntityUpdate builder.
type EntityUpdateOne ¶
type EntityUpdateOne struct {
// contains filtered or unexported fields
}
EntityUpdateOne is the builder for updating a single Entity entity.
func (*EntityUpdateOne) AddFile ¶
func (euo *EntityUpdateOne) AddFile(f ...*File) *EntityUpdateOne
AddFile adds the "file" edges to the File entity.
func (*EntityUpdateOne) AddFileIDs ¶
func (euo *EntityUpdateOne) AddFileIDs(ids ...int) *EntityUpdateOne
AddFileIDs adds the "file" edge to the File entity by IDs.
func (*EntityUpdateOne) AddReferenceCount ¶
func (euo *EntityUpdateOne) AddReferenceCount(i int) *EntityUpdateOne
AddReferenceCount adds i to the "reference_count" field.
func (*EntityUpdateOne) AddSize ¶
func (euo *EntityUpdateOne) AddSize(i int64) *EntityUpdateOne
AddSize adds i to the "size" field.
func (*EntityUpdateOne) AddType ¶
func (euo *EntityUpdateOne) AddType(i int) *EntityUpdateOne
AddType adds i to the "type" field.
func (*EntityUpdateOne) ClearCreatedBy ¶
func (euo *EntityUpdateOne) ClearCreatedBy() *EntityUpdateOne
ClearCreatedBy clears the value of the "created_by" field.
func (*EntityUpdateOne) ClearDeletedAt ¶
func (euo *EntityUpdateOne) ClearDeletedAt() *EntityUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*EntityUpdateOne) ClearFile ¶
func (euo *EntityUpdateOne) ClearFile() *EntityUpdateOne
ClearFile clears all "file" edges to the File entity.
func (*EntityUpdateOne) ClearProps ¶
func (euo *EntityUpdateOne) ClearProps() *EntityUpdateOne
ClearProps clears the value of the "props" field.
func (*EntityUpdateOne) ClearStoragePolicy ¶
func (euo *EntityUpdateOne) ClearStoragePolicy() *EntityUpdateOne
ClearStoragePolicy clears the "storage_policy" edge to the StoragePolicy entity.
func (*EntityUpdateOne) ClearUploadSessionID ¶
func (euo *EntityUpdateOne) ClearUploadSessionID() *EntityUpdateOne
ClearUploadSessionID clears the value of the "upload_session_id" field.
func (*EntityUpdateOne) ClearUser ¶
func (euo *EntityUpdateOne) ClearUser() *EntityUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*EntityUpdateOne) Exec ¶
func (euo *EntityUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EntityUpdateOne) ExecContext ¶
func (c *EntityUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EntityUpdateOne) ExecX ¶
func (euo *EntityUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityUpdateOne) Mutation ¶
func (euo *EntityUpdateOne) Mutation() *EntityMutation
Mutation returns the EntityMutation object of the builder.
func (*EntityUpdateOne) QueryContext ¶
func (c *EntityUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EntityUpdateOne) RemoveFile ¶
func (euo *EntityUpdateOne) RemoveFile(f ...*File) *EntityUpdateOne
RemoveFile removes "file" edges to File entities.
func (*EntityUpdateOne) RemoveFileIDs ¶
func (euo *EntityUpdateOne) RemoveFileIDs(ids ...int) *EntityUpdateOne
RemoveFileIDs removes the "file" edge to File entities by IDs.
func (*EntityUpdateOne) Save ¶
func (euo *EntityUpdateOne) Save(ctx context.Context) (*Entity, error)
Save executes the query and returns the updated Entity entity.
func (*EntityUpdateOne) SaveX ¶
func (euo *EntityUpdateOne) SaveX(ctx context.Context) *Entity
SaveX is like Save, but panics if an error occurs.
func (*EntityUpdateOne) Select ¶
func (euo *EntityUpdateOne) Select(field string, fields ...string) *EntityUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EntityUpdateOne) SetCreatedBy ¶
func (euo *EntityUpdateOne) SetCreatedBy(i int) *EntityUpdateOne
SetCreatedBy sets the "created_by" field.
func (*EntityUpdateOne) SetDeletedAt ¶
func (euo *EntityUpdateOne) SetDeletedAt(t time.Time) *EntityUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*EntityUpdateOne) SetNillableCreatedBy ¶
func (euo *EntityUpdateOne) SetNillableCreatedBy(i *int) *EntityUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*EntityUpdateOne) SetNillableDeletedAt ¶
func (euo *EntityUpdateOne) SetNillableDeletedAt(t *time.Time) *EntityUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*EntityUpdateOne) SetNillableReferenceCount ¶
func (euo *EntityUpdateOne) SetNillableReferenceCount(i *int) *EntityUpdateOne
SetNillableReferenceCount sets the "reference_count" field if the given value is not nil.
func (*EntityUpdateOne) SetNillableSize ¶
func (euo *EntityUpdateOne) SetNillableSize(i *int64) *EntityUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (*EntityUpdateOne) SetNillableSource ¶
func (euo *EntityUpdateOne) SetNillableSource(s *string) *EntityUpdateOne
SetNillableSource sets the "source" field if the given value is not nil.
func (*EntityUpdateOne) SetNillableStoragePolicyEntities ¶
func (euo *EntityUpdateOne) SetNillableStoragePolicyEntities(i *int) *EntityUpdateOne
SetNillableStoragePolicyEntities sets the "storage_policy_entities" field if the given value is not nil.
func (*EntityUpdateOne) SetNillableType ¶
func (euo *EntityUpdateOne) SetNillableType(i *int) *EntityUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*EntityUpdateOne) SetNillableUploadSessionID ¶
func (euo *EntityUpdateOne) SetNillableUploadSessionID(u *uuid.UUID) *EntityUpdateOne
SetNillableUploadSessionID sets the "upload_session_id" field if the given value is not nil.
func (*EntityUpdateOne) SetNillableUserID ¶
func (euo *EntityUpdateOne) SetNillableUserID(id *int) *EntityUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*EntityUpdateOne) SetProps ¶
func (euo *EntityUpdateOne) SetProps(tp *types.EntityProps) *EntityUpdateOne
SetProps sets the "props" field.
func (*EntityUpdateOne) SetReferenceCount ¶
func (euo *EntityUpdateOne) SetReferenceCount(i int) *EntityUpdateOne
SetReferenceCount sets the "reference_count" field.
func (*EntityUpdateOne) SetSize ¶
func (euo *EntityUpdateOne) SetSize(i int64) *EntityUpdateOne
SetSize sets the "size" field.
func (*EntityUpdateOne) SetSource ¶
func (euo *EntityUpdateOne) SetSource(s string) *EntityUpdateOne
SetSource sets the "source" field.
func (*EntityUpdateOne) SetStoragePolicy ¶
func (euo *EntityUpdateOne) SetStoragePolicy(s *StoragePolicy) *EntityUpdateOne
SetStoragePolicy sets the "storage_policy" edge to the StoragePolicy entity.
func (*EntityUpdateOne) SetStoragePolicyEntities ¶
func (euo *EntityUpdateOne) SetStoragePolicyEntities(i int) *EntityUpdateOne
SetStoragePolicyEntities sets the "storage_policy_entities" field.
func (*EntityUpdateOne) SetStoragePolicyID ¶
func (euo *EntityUpdateOne) SetStoragePolicyID(id int) *EntityUpdateOne
SetStoragePolicyID sets the "storage_policy" edge to the StoragePolicy entity by ID.
func (*EntityUpdateOne) SetType ¶
func (euo *EntityUpdateOne) SetType(i int) *EntityUpdateOne
SetType sets the "type" field.
func (*EntityUpdateOne) SetUpdatedAt ¶
func (euo *EntityUpdateOne) SetUpdatedAt(t time.Time) *EntityUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*EntityUpdateOne) SetUploadSessionID ¶
func (euo *EntityUpdateOne) SetUploadSessionID(u uuid.UUID) *EntityUpdateOne
SetUploadSessionID sets the "upload_session_id" field.
func (*EntityUpdateOne) SetUser ¶
func (euo *EntityUpdateOne) SetUser(u *User) *EntityUpdateOne
SetUser sets the "user" edge to the User entity.
func (*EntityUpdateOne) SetUserID ¶
func (euo *EntityUpdateOne) SetUserID(id int) *EntityUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*EntityUpdateOne) Where ¶
func (euo *EntityUpdateOne) Where(ps ...predicate.Entity) *EntityUpdateOne
Where appends a list predicates to the EntityUpdate builder.
type EntityUpsert ¶
EntityUpsert is the "OnConflict" setter.
func (*EntityUpsert) AddReferenceCount ¶
func (u *EntityUpsert) AddReferenceCount(v int) *EntityUpsert
AddReferenceCount adds v to the "reference_count" field.
func (*EntityUpsert) AddSize ¶
func (u *EntityUpsert) AddSize(v int64) *EntityUpsert
AddSize adds v to the "size" field.
func (*EntityUpsert) AddType ¶
func (u *EntityUpsert) AddType(v int) *EntityUpsert
AddType adds v to the "type" field.
func (*EntityUpsert) ClearCreatedBy ¶
func (u *EntityUpsert) ClearCreatedBy() *EntityUpsert
ClearCreatedBy clears the value of the "created_by" field.
func (*EntityUpsert) ClearDeletedAt ¶
func (u *EntityUpsert) ClearDeletedAt() *EntityUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*EntityUpsert) ClearProps ¶
func (u *EntityUpsert) ClearProps() *EntityUpsert
ClearProps clears the value of the "props" field.
func (*EntityUpsert) ClearUploadSessionID ¶
func (u *EntityUpsert) ClearUploadSessionID() *EntityUpsert
ClearUploadSessionID clears the value of the "upload_session_id" field.
func (*EntityUpsert) SetCreatedBy ¶
func (u *EntityUpsert) SetCreatedBy(v int) *EntityUpsert
SetCreatedBy sets the "created_by" field.
func (*EntityUpsert) SetDeletedAt ¶
func (u *EntityUpsert) SetDeletedAt(v time.Time) *EntityUpsert
SetDeletedAt sets the "deleted_at" field.
func (*EntityUpsert) SetProps ¶
func (u *EntityUpsert) SetProps(v *types.EntityProps) *EntityUpsert
SetProps sets the "props" field.
func (*EntityUpsert) SetReferenceCount ¶
func (u *EntityUpsert) SetReferenceCount(v int) *EntityUpsert
SetReferenceCount sets the "reference_count" field.
func (*EntityUpsert) SetSize ¶
func (u *EntityUpsert) SetSize(v int64) *EntityUpsert
SetSize sets the "size" field.
func (*EntityUpsert) SetSource ¶
func (u *EntityUpsert) SetSource(v string) *EntityUpsert
SetSource sets the "source" field.
func (*EntityUpsert) SetStoragePolicyEntities ¶
func (u *EntityUpsert) SetStoragePolicyEntities(v int) *EntityUpsert
SetStoragePolicyEntities sets the "storage_policy_entities" field.
func (*EntityUpsert) SetType ¶
func (u *EntityUpsert) SetType(v int) *EntityUpsert
SetType sets the "type" field.
func (*EntityUpsert) SetUpdatedAt ¶
func (u *EntityUpsert) SetUpdatedAt(v time.Time) *EntityUpsert
SetUpdatedAt sets the "updated_at" field.
func (*EntityUpsert) SetUploadSessionID ¶
func (u *EntityUpsert) SetUploadSessionID(v uuid.UUID) *EntityUpsert
SetUploadSessionID sets the "upload_session_id" field.
func (*EntityUpsert) UpdateCreatedBy ¶
func (u *EntityUpsert) UpdateCreatedBy() *EntityUpsert
UpdateCreatedBy sets the "created_by" field to the value that was provided on create.
func (*EntityUpsert) UpdateDeletedAt ¶
func (u *EntityUpsert) UpdateDeletedAt() *EntityUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*EntityUpsert) UpdateProps ¶
func (u *EntityUpsert) UpdateProps() *EntityUpsert
UpdateProps sets the "props" field to the value that was provided on create.
func (*EntityUpsert) UpdateReferenceCount ¶
func (u *EntityUpsert) UpdateReferenceCount() *EntityUpsert
UpdateReferenceCount sets the "reference_count" field to the value that was provided on create.
func (*EntityUpsert) UpdateSize ¶
func (u *EntityUpsert) UpdateSize() *EntityUpsert
UpdateSize sets the "size" field to the value that was provided on create.
func (*EntityUpsert) UpdateSource ¶
func (u *EntityUpsert) UpdateSource() *EntityUpsert
UpdateSource sets the "source" field to the value that was provided on create.
func (*EntityUpsert) UpdateStoragePolicyEntities ¶
func (u *EntityUpsert) UpdateStoragePolicyEntities() *EntityUpsert
UpdateStoragePolicyEntities sets the "storage_policy_entities" field to the value that was provided on create.
func (*EntityUpsert) UpdateType ¶
func (u *EntityUpsert) UpdateType() *EntityUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*EntityUpsert) UpdateUpdatedAt ¶
func (u *EntityUpsert) UpdateUpdatedAt() *EntityUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*EntityUpsert) UpdateUploadSessionID ¶
func (u *EntityUpsert) UpdateUploadSessionID() *EntityUpsert
UpdateUploadSessionID sets the "upload_session_id" field to the value that was provided on create.
type EntityUpsertBulk ¶
type EntityUpsertBulk struct {
// contains filtered or unexported fields
}
EntityUpsertBulk is the builder for "upsert"-ing a bulk of Entity nodes.
func (*EntityUpsertBulk) AddReferenceCount ¶
func (u *EntityUpsertBulk) AddReferenceCount(v int) *EntityUpsertBulk
AddReferenceCount adds v to the "reference_count" field.
func (*EntityUpsertBulk) AddSize ¶
func (u *EntityUpsertBulk) AddSize(v int64) *EntityUpsertBulk
AddSize adds v to the "size" field.
func (*EntityUpsertBulk) AddType ¶
func (u *EntityUpsertBulk) AddType(v int) *EntityUpsertBulk
AddType adds v to the "type" field.
func (*EntityUpsertBulk) ClearCreatedBy ¶
func (u *EntityUpsertBulk) ClearCreatedBy() *EntityUpsertBulk
ClearCreatedBy clears the value of the "created_by" field.
func (*EntityUpsertBulk) ClearDeletedAt ¶
func (u *EntityUpsertBulk) ClearDeletedAt() *EntityUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*EntityUpsertBulk) ClearProps ¶
func (u *EntityUpsertBulk) ClearProps() *EntityUpsertBulk
ClearProps clears the value of the "props" field.
func (*EntityUpsertBulk) ClearUploadSessionID ¶
func (u *EntityUpsertBulk) ClearUploadSessionID() *EntityUpsertBulk
ClearUploadSessionID clears the value of the "upload_session_id" field.
func (*EntityUpsertBulk) DoNothing ¶
func (u *EntityUpsertBulk) DoNothing() *EntityUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*EntityUpsertBulk) Exec ¶
func (u *EntityUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EntityUpsertBulk) ExecX ¶
func (u *EntityUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityUpsertBulk) Ignore ¶
func (u *EntityUpsertBulk) Ignore() *EntityUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Entity.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*EntityUpsertBulk) SetCreatedBy ¶
func (u *EntityUpsertBulk) SetCreatedBy(v int) *EntityUpsertBulk
SetCreatedBy sets the "created_by" field.
func (*EntityUpsertBulk) SetDeletedAt ¶
func (u *EntityUpsertBulk) SetDeletedAt(v time.Time) *EntityUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*EntityUpsertBulk) SetProps ¶
func (u *EntityUpsertBulk) SetProps(v *types.EntityProps) *EntityUpsertBulk
SetProps sets the "props" field.
func (*EntityUpsertBulk) SetReferenceCount ¶
func (u *EntityUpsertBulk) SetReferenceCount(v int) *EntityUpsertBulk
SetReferenceCount sets the "reference_count" field.
func (*EntityUpsertBulk) SetSize ¶
func (u *EntityUpsertBulk) SetSize(v int64) *EntityUpsertBulk
SetSize sets the "size" field.
func (*EntityUpsertBulk) SetSource ¶
func (u *EntityUpsertBulk) SetSource(v string) *EntityUpsertBulk
SetSource sets the "source" field.
func (*EntityUpsertBulk) SetStoragePolicyEntities ¶
func (u *EntityUpsertBulk) SetStoragePolicyEntities(v int) *EntityUpsertBulk
SetStoragePolicyEntities sets the "storage_policy_entities" field.
func (*EntityUpsertBulk) SetType ¶
func (u *EntityUpsertBulk) SetType(v int) *EntityUpsertBulk
SetType sets the "type" field.
func (*EntityUpsertBulk) SetUpdatedAt ¶
func (u *EntityUpsertBulk) SetUpdatedAt(v time.Time) *EntityUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*EntityUpsertBulk) SetUploadSessionID ¶
func (u *EntityUpsertBulk) SetUploadSessionID(v uuid.UUID) *EntityUpsertBulk
SetUploadSessionID sets the "upload_session_id" field.
func (*EntityUpsertBulk) Update ¶
func (u *EntityUpsertBulk) Update(set func(*EntityUpsert)) *EntityUpsertBulk
Update allows overriding fields `UPDATE` values. See the EntityCreateBulk.OnConflict documentation for more info.
func (*EntityUpsertBulk) UpdateCreatedBy ¶
func (u *EntityUpsertBulk) UpdateCreatedBy() *EntityUpsertBulk
UpdateCreatedBy sets the "created_by" field to the value that was provided on create.
func (*EntityUpsertBulk) UpdateDeletedAt ¶
func (u *EntityUpsertBulk) UpdateDeletedAt() *EntityUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*EntityUpsertBulk) UpdateNewValues ¶
func (u *EntityUpsertBulk) UpdateNewValues() *EntityUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Entity.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*EntityUpsertBulk) UpdateProps ¶
func (u *EntityUpsertBulk) UpdateProps() *EntityUpsertBulk
UpdateProps sets the "props" field to the value that was provided on create.
func (*EntityUpsertBulk) UpdateReferenceCount ¶
func (u *EntityUpsertBulk) UpdateReferenceCount() *EntityUpsertBulk
UpdateReferenceCount sets the "reference_count" field to the value that was provided on create.
func (*EntityUpsertBulk) UpdateSize ¶
func (u *EntityUpsertBulk) UpdateSize() *EntityUpsertBulk
UpdateSize sets the "size" field to the value that was provided on create.
func (*EntityUpsertBulk) UpdateSource ¶
func (u *EntityUpsertBulk) UpdateSource() *EntityUpsertBulk
UpdateSource sets the "source" field to the value that was provided on create.
func (*EntityUpsertBulk) UpdateStoragePolicyEntities ¶
func (u *EntityUpsertBulk) UpdateStoragePolicyEntities() *EntityUpsertBulk
UpdateStoragePolicyEntities sets the "storage_policy_entities" field to the value that was provided on create.
func (*EntityUpsertBulk) UpdateType ¶
func (u *EntityUpsertBulk) UpdateType() *EntityUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*EntityUpsertBulk) UpdateUpdatedAt ¶
func (u *EntityUpsertBulk) UpdateUpdatedAt() *EntityUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*EntityUpsertBulk) UpdateUploadSessionID ¶
func (u *EntityUpsertBulk) UpdateUploadSessionID() *EntityUpsertBulk
UpdateUploadSessionID sets the "upload_session_id" field to the value that was provided on create.
type EntityUpsertOne ¶
type EntityUpsertOne struct {
// contains filtered or unexported fields
}
EntityUpsertOne is the builder for "upsert"-ing
one Entity node.
func (*EntityUpsertOne) AddReferenceCount ¶
func (u *EntityUpsertOne) AddReferenceCount(v int) *EntityUpsertOne
AddReferenceCount adds v to the "reference_count" field.
func (*EntityUpsertOne) AddSize ¶
func (u *EntityUpsertOne) AddSize(v int64) *EntityUpsertOne
AddSize adds v to the "size" field.
func (*EntityUpsertOne) AddType ¶
func (u *EntityUpsertOne) AddType(v int) *EntityUpsertOne
AddType adds v to the "type" field.
func (*EntityUpsertOne) ClearCreatedBy ¶
func (u *EntityUpsertOne) ClearCreatedBy() *EntityUpsertOne
ClearCreatedBy clears the value of the "created_by" field.
func (*EntityUpsertOne) ClearDeletedAt ¶
func (u *EntityUpsertOne) ClearDeletedAt() *EntityUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*EntityUpsertOne) ClearProps ¶
func (u *EntityUpsertOne) ClearProps() *EntityUpsertOne
ClearProps clears the value of the "props" field.
func (*EntityUpsertOne) ClearUploadSessionID ¶
func (u *EntityUpsertOne) ClearUploadSessionID() *EntityUpsertOne
ClearUploadSessionID clears the value of the "upload_session_id" field.
func (*EntityUpsertOne) DoNothing ¶
func (u *EntityUpsertOne) DoNothing() *EntityUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*EntityUpsertOne) Exec ¶
func (u *EntityUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*EntityUpsertOne) ExecX ¶
func (u *EntityUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityUpsertOne) ID ¶
func (u *EntityUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*EntityUpsertOne) IDX ¶
func (u *EntityUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*EntityUpsertOne) Ignore ¶
func (u *EntityUpsertOne) Ignore() *EntityUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Entity.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*EntityUpsertOne) SetCreatedBy ¶
func (u *EntityUpsertOne) SetCreatedBy(v int) *EntityUpsertOne
SetCreatedBy sets the "created_by" field.
func (*EntityUpsertOne) SetDeletedAt ¶
func (u *EntityUpsertOne) SetDeletedAt(v time.Time) *EntityUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*EntityUpsertOne) SetProps ¶
func (u *EntityUpsertOne) SetProps(v *types.EntityProps) *EntityUpsertOne
SetProps sets the "props" field.
func (*EntityUpsertOne) SetReferenceCount ¶
func (u *EntityUpsertOne) SetReferenceCount(v int) *EntityUpsertOne
SetReferenceCount sets the "reference_count" field.
func (*EntityUpsertOne) SetSize ¶
func (u *EntityUpsertOne) SetSize(v int64) *EntityUpsertOne
SetSize sets the "size" field.
func (*EntityUpsertOne) SetSource ¶
func (u *EntityUpsertOne) SetSource(v string) *EntityUpsertOne
SetSource sets the "source" field.
func (*EntityUpsertOne) SetStoragePolicyEntities ¶
func (u *EntityUpsertOne) SetStoragePolicyEntities(v int) *EntityUpsertOne
SetStoragePolicyEntities sets the "storage_policy_entities" field.
func (*EntityUpsertOne) SetType ¶
func (u *EntityUpsertOne) SetType(v int) *EntityUpsertOne
SetType sets the "type" field.
func (*EntityUpsertOne) SetUpdatedAt ¶
func (u *EntityUpsertOne) SetUpdatedAt(v time.Time) *EntityUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*EntityUpsertOne) SetUploadSessionID ¶
func (u *EntityUpsertOne) SetUploadSessionID(v uuid.UUID) *EntityUpsertOne
SetUploadSessionID sets the "upload_session_id" field.
func (*EntityUpsertOne) Update ¶
func (u *EntityUpsertOne) Update(set func(*EntityUpsert)) *EntityUpsertOne
Update allows overriding fields `UPDATE` values. See the EntityCreate.OnConflict documentation for more info.
func (*EntityUpsertOne) UpdateCreatedBy ¶
func (u *EntityUpsertOne) UpdateCreatedBy() *EntityUpsertOne
UpdateCreatedBy sets the "created_by" field to the value that was provided on create.
func (*EntityUpsertOne) UpdateDeletedAt ¶
func (u *EntityUpsertOne) UpdateDeletedAt() *EntityUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*EntityUpsertOne) UpdateNewValues ¶
func (u *EntityUpsertOne) UpdateNewValues() *EntityUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Entity.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*EntityUpsertOne) UpdateProps ¶
func (u *EntityUpsertOne) UpdateProps() *EntityUpsertOne
UpdateProps sets the "props" field to the value that was provided on create.
func (*EntityUpsertOne) UpdateReferenceCount ¶
func (u *EntityUpsertOne) UpdateReferenceCount() *EntityUpsertOne
UpdateReferenceCount sets the "reference_count" field to the value that was provided on create.
func (*EntityUpsertOne) UpdateSize ¶
func (u *EntityUpsertOne) UpdateSize() *EntityUpsertOne
UpdateSize sets the "size" field to the value that was provided on create.
func (*EntityUpsertOne) UpdateSource ¶
func (u *EntityUpsertOne) UpdateSource() *EntityUpsertOne
UpdateSource sets the "source" field to the value that was provided on create.
func (*EntityUpsertOne) UpdateStoragePolicyEntities ¶
func (u *EntityUpsertOne) UpdateStoragePolicyEntities() *EntityUpsertOne
UpdateStoragePolicyEntities sets the "storage_policy_entities" field to the value that was provided on create.
func (*EntityUpsertOne) UpdateType ¶
func (u *EntityUpsertOne) UpdateType() *EntityUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*EntityUpsertOne) UpdateUpdatedAt ¶
func (u *EntityUpsertOne) UpdateUpdatedAt() *EntityUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*EntityUpsertOne) UpdateUploadSessionID ¶
func (u *EntityUpsertOne) UpdateUploadSessionID() *EntityUpsertOne
UpdateUploadSessionID sets the "upload_session_id" field to the value that was provided on create.
type File ¶
type File struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Type holds the value of the "type" field.
Type int `json:"type,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// OwnerID holds the value of the "owner_id" field.
OwnerID int `json:"owner_id,omitempty"`
// Size holds the value of the "size" field.
Size int64 `json:"size,omitempty"`
// PrimaryEntity holds the value of the "primary_entity" field.
PrimaryEntity int `json:"primary_entity,omitempty"`
// FileChildren holds the value of the "file_children" field.
FileChildren int `json:"file_children,omitempty"`
// IsSymbolic holds the value of the "is_symbolic" field.
IsSymbolic bool `json:"is_symbolic,omitempty"`
// Props holds the value of the "props" field.
Props *types.FileProps `json:"props,omitempty"`
// StoragePolicyFiles holds the value of the "storage_policy_files" field.
StoragePolicyFiles int `json:"storage_policy_files,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the FileQuery when eager-loading is set.
Edges FileEdges `json:"edges"`
// contains filtered or unexported fields
}
File is the model entity for the File schema.
func (*File) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*File) QueryChildren ¶
QueryChildren queries the "children" edge of the File entity.
func (*File) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*File) QueryDirectLinks ¶
func (f *File) QueryDirectLinks() *DirectLinkQuery
QueryDirectLinks queries the "direct_links" edge of the File entity.
func (*File) QueryEntities ¶
func (f *File) QueryEntities() *EntityQuery
QueryEntities queries the "entities" edge of the File entity.
func (*File) QueryMetadata ¶
func (f *File) QueryMetadata() *MetadataQuery
QueryMetadata queries the "metadata" edge of the File entity.
func (*File) QueryOwner ¶
QueryOwner queries the "owner" edge of the File entity.
func (*File) QueryParent ¶
QueryParent queries the "parent" edge of the File entity.
func (*File) QueryShares ¶
func (f *File) QueryShares() *ShareQuery
QueryShares queries the "shares" edge of the File entity.
func (*File) QueryStoragePolicies ¶
func (f *File) QueryStoragePolicies() *StoragePolicyQuery
QueryStoragePolicies queries the "storage_policies" edge of the File entity.
func (*File) SetChildren ¶
SetChildren manually set the edge as loaded state.
func (*File) SetDirectLinks ¶
func (e *File) SetDirectLinks(v []*DirectLink)
SetDirectLinks manually set the edge as loaded state.
func (*File) SetEntities ¶
SetEntities manually set the edge as loaded state.
func (*File) SetMetadata ¶
SetMetadata manually set the edge as loaded state.
func (*File) SetStoragePolicies ¶
func (e *File) SetStoragePolicies(v *StoragePolicy)
SetStoragePolicies manually set the edge as loaded state.
func (*File) Unwrap ¶
Unwrap unwraps the File 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 (*File) Update ¶
func (f *File) Update() *FileUpdateOne
Update returns a builder for updating this File. Note that you need to call File.Unwrap() before calling this method if this File was returned from a transaction, and the transaction was committed or rolled back.
type FileClient ¶
type FileClient struct {
// contains filtered or unexported fields
}
FileClient is a client for the File schema.
func NewFileClient ¶
func NewFileClient(c config) *FileClient
NewFileClient returns a client for the File from the given config.
func (*FileClient) Create ¶
func (c *FileClient) Create() *FileCreate
Create returns a builder for creating a File entity.
func (*FileClient) CreateBulk ¶
func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
CreateBulk returns a builder for creating a bulk of File entities.
func (*FileClient) Delete ¶
func (c *FileClient) Delete() *FileDelete
Delete returns a delete builder for File.
func (*FileClient) DeleteOne ¶
func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FileClient) DeleteOneID ¶
func (c *FileClient) DeleteOneID(id int) *FileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FileClient) ExecContext ¶
func (c *FileClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileClient) GetX ¶
func (c *FileClient) GetX(ctx context.Context, id int) *File
GetX is like Get, but panics if an error occurs.
func (*FileClient) Intercept ¶
func (c *FileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `file.Intercept(f(g(h())))`.
func (*FileClient) Interceptors ¶
func (c *FileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FileClient) MapCreateBulk ¶
func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FileClient) Query ¶
func (c *FileClient) Query() *FileQuery
Query returns a query builder for File.
func (*FileClient) QueryChildren ¶
func (c *FileClient) QueryChildren(f *File) *FileQuery
QueryChildren queries the children edge of a File.
func (*FileClient) QueryContext ¶
func (c *FileClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileClient) QueryDirectLinks ¶
func (c *FileClient) QueryDirectLinks(f *File) *DirectLinkQuery
QueryDirectLinks queries the direct_links edge of a File.
func (*FileClient) QueryEntities ¶
func (c *FileClient) QueryEntities(f *File) *EntityQuery
QueryEntities queries the entities edge of a File.
func (*FileClient) QueryMetadata ¶
func (c *FileClient) QueryMetadata(f *File) *MetadataQuery
QueryMetadata queries the metadata edge of a File.
func (*FileClient) QueryOwner ¶
func (c *FileClient) QueryOwner(f *File) *UserQuery
QueryOwner queries the owner edge of a File.
func (*FileClient) QueryParent ¶
func (c *FileClient) QueryParent(f *File) *FileQuery
QueryParent queries the parent edge of a File.
func (*FileClient) QueryShares ¶
func (c *FileClient) QueryShares(f *File) *ShareQuery
QueryShares queries the shares edge of a File.
func (*FileClient) QueryStoragePolicies ¶
func (c *FileClient) QueryStoragePolicies(f *File) *StoragePolicyQuery
QueryStoragePolicies queries the storage_policies edge of a File.
func (*FileClient) Update ¶
func (c *FileClient) Update() *FileUpdate
Update returns an update builder for File.
func (*FileClient) UpdateOne ¶
func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FileClient) UpdateOneID ¶
func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FileClient) Use ¶
func (c *FileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `file.Hooks(f(g(h())))`.
type FileCreate ¶
type FileCreate struct {
// contains filtered or unexported fields
}
FileCreate is the builder for creating a File entity.
func (*FileCreate) AddChildIDs ¶
func (fc *FileCreate) AddChildIDs(ids ...int) *FileCreate
AddChildIDs adds the "children" edge to the File entity by IDs.
func (*FileCreate) AddChildren ¶
func (fc *FileCreate) AddChildren(f ...*File) *FileCreate
AddChildren adds the "children" edges to the File entity.
func (*FileCreate) AddDirectLinkIDs ¶
func (fc *FileCreate) AddDirectLinkIDs(ids ...int) *FileCreate
AddDirectLinkIDs adds the "direct_links" edge to the DirectLink entity by IDs.
func (*FileCreate) AddDirectLinks ¶
func (fc *FileCreate) AddDirectLinks(d ...*DirectLink) *FileCreate
AddDirectLinks adds the "direct_links" edges to the DirectLink entity.
func (*FileCreate) AddEntities ¶
func (fc *FileCreate) AddEntities(e ...*Entity) *FileCreate
AddEntities adds the "entities" edges to the Entity entity.
func (*FileCreate) AddEntityIDs ¶
func (fc *FileCreate) AddEntityIDs(ids ...int) *FileCreate
AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
func (*FileCreate) AddMetadata ¶
func (fc *FileCreate) AddMetadata(m ...*Metadata) *FileCreate
AddMetadata adds the "metadata" edges to the Metadata entity.
func (*FileCreate) AddMetadatumIDs ¶
func (fc *FileCreate) AddMetadatumIDs(ids ...int) *FileCreate
AddMetadatumIDs adds the "metadata" edge to the Metadata entity by IDs.
func (*FileCreate) AddShareIDs ¶
func (fc *FileCreate) AddShareIDs(ids ...int) *FileCreate
AddShareIDs adds the "shares" edge to the Share entity by IDs.
func (*FileCreate) AddShares ¶
func (fc *FileCreate) AddShares(s ...*Share) *FileCreate
AddShares adds the "shares" edges to the Share entity.
func (*FileCreate) Exec ¶
func (fc *FileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreate) ExecContext ¶
func (c *FileCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileCreate) ExecX ¶
func (fc *FileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreate) Mutation ¶
func (fc *FileCreate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileCreate) OnConflict ¶
func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.File.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.FileUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*FileCreate) OnConflictColumns ¶
func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FileCreate) QueryContext ¶
func (c *FileCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileCreate) Save ¶
func (fc *FileCreate) Save(ctx context.Context) (*File, error)
Save creates the File in the database.
func (*FileCreate) SaveX ¶
func (fc *FileCreate) SaveX(ctx context.Context) *File
SaveX calls Save and panics if Save returns an error.
func (*FileCreate) SetCreatedAt ¶
func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate
SetCreatedAt sets the "created_at" field.
func (*FileCreate) SetFileChildren ¶
func (fc *FileCreate) SetFileChildren(i int) *FileCreate
SetFileChildren sets the "file_children" field.
func (*FileCreate) SetIsSymbolic ¶
func (fc *FileCreate) SetIsSymbolic(b bool) *FileCreate
SetIsSymbolic sets the "is_symbolic" field.
func (*FileCreate) SetName ¶
func (fc *FileCreate) SetName(s string) *FileCreate
SetName sets the "name" field.
func (*FileCreate) SetNillableCreatedAt ¶
func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileCreate) SetNillableFileChildren ¶
func (fc *FileCreate) SetNillableFileChildren(i *int) *FileCreate
SetNillableFileChildren sets the "file_children" field if the given value is not nil.
func (*FileCreate) SetNillableIsSymbolic ¶
func (fc *FileCreate) SetNillableIsSymbolic(b *bool) *FileCreate
SetNillableIsSymbolic sets the "is_symbolic" field if the given value is not nil.
func (*FileCreate) SetNillableParentID ¶
func (fc *FileCreate) SetNillableParentID(id *int) *FileCreate
SetNillableParentID sets the "parent" edge to the File entity by ID if the given value is not nil.
func (*FileCreate) SetNillablePrimaryEntity ¶
func (fc *FileCreate) SetNillablePrimaryEntity(i *int) *FileCreate
SetNillablePrimaryEntity sets the "primary_entity" field if the given value is not nil.
func (*FileCreate) SetNillableSize ¶
func (fc *FileCreate) SetNillableSize(i *int64) *FileCreate
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileCreate) SetNillableStoragePoliciesID ¶
func (fc *FileCreate) SetNillableStoragePoliciesID(id *int) *FileCreate
SetNillableStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID if the given value is not nil.
func (*FileCreate) SetNillableStoragePolicyFiles ¶
func (fc *FileCreate) SetNillableStoragePolicyFiles(i *int) *FileCreate
SetNillableStoragePolicyFiles sets the "storage_policy_files" field if the given value is not nil.
func (*FileCreate) SetNillableUpdatedAt ¶
func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FileCreate) SetOwner ¶
func (fc *FileCreate) SetOwner(u *User) *FileCreate
SetOwner sets the "owner" edge to the User entity.
func (*FileCreate) SetOwnerID ¶
func (fc *FileCreate) SetOwnerID(i int) *FileCreate
SetOwnerID sets the "owner_id" field.
func (*FileCreate) SetParent ¶
func (fc *FileCreate) SetParent(f *File) *FileCreate
SetParent sets the "parent" edge to the File entity.
func (*FileCreate) SetParentID ¶
func (fc *FileCreate) SetParentID(id int) *FileCreate
SetParentID sets the "parent" edge to the File entity by ID.
func (*FileCreate) SetPrimaryEntity ¶
func (fc *FileCreate) SetPrimaryEntity(i int) *FileCreate
SetPrimaryEntity sets the "primary_entity" field.
func (*FileCreate) SetProps ¶
func (fc *FileCreate) SetProps(tp *types.FileProps) *FileCreate
SetProps sets the "props" field.
func (*FileCreate) SetRawID ¶
func (m *FileCreate) SetRawID(t int) *FileCreate
func (*FileCreate) SetSize ¶
func (fc *FileCreate) SetSize(i int64) *FileCreate
SetSize sets the "size" field.
func (*FileCreate) SetStoragePolicies ¶
func (fc *FileCreate) SetStoragePolicies(s *StoragePolicy) *FileCreate
SetStoragePolicies sets the "storage_policies" edge to the StoragePolicy entity.
func (*FileCreate) SetStoragePoliciesID ¶
func (fc *FileCreate) SetStoragePoliciesID(id int) *FileCreate
SetStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID.
func (*FileCreate) SetStoragePolicyFiles ¶
func (fc *FileCreate) SetStoragePolicyFiles(i int) *FileCreate
SetStoragePolicyFiles sets the "storage_policy_files" field.
func (*FileCreate) SetType ¶
func (fc *FileCreate) SetType(i int) *FileCreate
SetType sets the "type" field.
func (*FileCreate) SetUpdatedAt ¶
func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate
SetUpdatedAt sets the "updated_at" field.
type FileCreateBulk ¶
type FileCreateBulk struct {
// contains filtered or unexported fields
}
FileCreateBulk is the builder for creating many File entities in bulk.
func (*FileCreateBulk) Exec ¶
func (fcb *FileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreateBulk) ExecContext ¶
func (c *FileCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileCreateBulk) ExecX ¶
func (fcb *FileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreateBulk) OnConflict ¶
func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.File.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.FileUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*FileCreateBulk) OnConflictColumns ¶
func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FileCreateBulk) QueryContext ¶
func (c *FileCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type FileDelete ¶
type FileDelete struct {
// contains filtered or unexported fields
}
FileDelete is the builder for deleting a File entity.
func (*FileDelete) Exec ¶
func (fd *FileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FileDelete) ExecContext ¶
func (c *FileDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileDelete) ExecX ¶
func (fd *FileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FileDelete) QueryContext ¶
func (c *FileDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileDelete) Where ¶
func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete
Where appends a list predicates to the FileDelete builder.
type FileDeleteOne ¶
type FileDeleteOne struct {
// contains filtered or unexported fields
}
FileDeleteOne is the builder for deleting a single File entity.
func (*FileDeleteOne) Exec ¶
func (fdo *FileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FileDeleteOne) ExecX ¶
func (fdo *FileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileDeleteOne) Where ¶
func (fdo *FileDeleteOne) Where(ps ...predicate.File) *FileDeleteOne
Where appends a list predicates to the FileDelete builder.
type FileEdges ¶
type FileEdges struct {
// Owner holds the value of the owner edge.
Owner *User `json:"owner,omitempty"`
// StoragePolicies holds the value of the storage_policies edge.
StoragePolicies *StoragePolicy `json:"storage_policies,omitempty"`
// Parent holds the value of the parent edge.
Parent *File `json:"parent,omitempty"`
// Children holds the value of the children edge.
Children []*File `json:"children,omitempty"`
// Metadata holds the value of the metadata edge.
Metadata []*Metadata `json:"metadata,omitempty"`
// Entities holds the value of the entities edge.
Entities []*Entity `json:"entities,omitempty"`
Shares []*Share `json:"shares,omitempty"`
// DirectLinks holds the value of the direct_links edge.
DirectLinks []*DirectLink `json:"direct_links,omitempty"`
// contains filtered or unexported fields
}
FileEdges holds the relations/edges for other nodes in the graph.
func (FileEdges) ChildrenOrErr ¶
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (FileEdges) DirectLinksOrErr ¶
func (e FileEdges) DirectLinksOrErr() ([]*DirectLink, error)
DirectLinksOrErr returns the DirectLinks value or an error if the edge was not loaded in eager-loading.
func (FileEdges) EntitiesOrErr ¶
EntitiesOrErr returns the Entities value or an error if the edge was not loaded in eager-loading.
func (FileEdges) MetadataOrErr ¶
MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading.
func (FileEdges) OwnerOrErr ¶
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (FileEdges) ParentOrErr ¶
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (FileEdges) SharesOrErr ¶
SharesOrErr returns the Shares value or an error if the edge was not loaded in eager-loading.
func (FileEdges) StoragePoliciesOrErr ¶
func (e FileEdges) StoragePoliciesOrErr() (*StoragePolicy, error)
StoragePoliciesOrErr returns the StoragePolicies value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FileGroupBy ¶
type FileGroupBy struct {
// contains filtered or unexported fields
}
FileGroupBy is the group-by builder for File entities.
func (*FileGroupBy) Aggregate ¶
func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Scan ¶
func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileMutation ¶
type FileMutation struct {
// contains filtered or unexported fields
}
FileMutation represents an operation that mutates the File nodes in the graph.
func (*FileMutation) AddChildIDs ¶
func (m *FileMutation) AddChildIDs(ids ...int)
AddChildIDs adds the "children" edge to the File entity by ids.
func (*FileMutation) AddDirectLinkIDs ¶
func (m *FileMutation) AddDirectLinkIDs(ids ...int)
AddDirectLinkIDs adds the "direct_links" edge to the DirectLink entity by ids.
func (*FileMutation) AddEntityIDs ¶
func (m *FileMutation) AddEntityIDs(ids ...int)
AddEntityIDs adds the "entities" edge to the Entity entity by ids.
func (*FileMutation) AddField ¶
func (m *FileMutation) 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 (*FileMutation) AddMetadatumIDs ¶
func (m *FileMutation) AddMetadatumIDs(ids ...int)
AddMetadatumIDs adds the "metadata" edge to the Metadata entity by ids.
func (*FileMutation) AddPrimaryEntity ¶
func (m *FileMutation) AddPrimaryEntity(i int)
AddPrimaryEntity adds i to the "primary_entity" field.
func (*FileMutation) AddShareIDs ¶
func (m *FileMutation) AddShareIDs(ids ...int)
AddShareIDs adds the "shares" edge to the Share entity by ids.
func (*FileMutation) AddSize ¶
func (m *FileMutation) AddSize(i int64)
AddSize adds i to the "size" field.
func (*FileMutation) AddType ¶
func (m *FileMutation) AddType(i int)
AddType adds i to the "type" field.
func (*FileMutation) AddedEdges ¶
func (m *FileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FileMutation) AddedField ¶
func (m *FileMutation) 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 (*FileMutation) AddedFields ¶
func (m *FileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FileMutation) AddedIDs ¶
func (m *FileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FileMutation) AddedPrimaryEntity ¶
func (m *FileMutation) AddedPrimaryEntity() (r int, exists bool)
AddedPrimaryEntity returns the value that was added to the "primary_entity" field in this mutation.
func (*FileMutation) AddedSize ¶
func (m *FileMutation) AddedSize() (r int64, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*FileMutation) AddedType ¶
func (m *FileMutation) AddedType() (r int, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*FileMutation) ChildrenCleared ¶
func (m *FileMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the File entity was cleared.
func (*FileMutation) ChildrenIDs ¶
func (m *FileMutation) ChildrenIDs() (ids []int)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*FileMutation) ClearChildren ¶
func (m *FileMutation) ClearChildren()
ClearChildren clears the "children" edge to the File entity.
func (*FileMutation) ClearDirectLinks ¶
func (m *FileMutation) ClearDirectLinks()
ClearDirectLinks clears the "direct_links" edge to the DirectLink entity.
func (*FileMutation) ClearEdge ¶
func (m *FileMutation) 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 (*FileMutation) ClearEntities ¶
func (m *FileMutation) ClearEntities()
ClearEntities clears the "entities" edge to the Entity entity.
func (*FileMutation) ClearField ¶
func (m *FileMutation) 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 (*FileMutation) ClearFileChildren ¶
func (m *FileMutation) ClearFileChildren()
ClearFileChildren clears the value of the "file_children" field.
func (*FileMutation) ClearMetadata ¶
func (m *FileMutation) ClearMetadata()
ClearMetadata clears the "metadata" edge to the Metadata entity.
func (*FileMutation) ClearOwner ¶
func (m *FileMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*FileMutation) ClearParent ¶
func (m *FileMutation) ClearParent()
ClearParent clears the "parent" edge to the File entity.
func (*FileMutation) ClearPrimaryEntity ¶
func (m *FileMutation) ClearPrimaryEntity()
ClearPrimaryEntity clears the value of the "primary_entity" field.
func (*FileMutation) ClearProps ¶
func (m *FileMutation) ClearProps()
ClearProps clears the value of the "props" field.
func (*FileMutation) ClearShares ¶
func (m *FileMutation) ClearShares()
ClearShares clears the "shares" edge to the Share entity.
func (*FileMutation) ClearStoragePolicies ¶
func (m *FileMutation) ClearStoragePolicies()
ClearStoragePolicies clears the "storage_policies" edge to the StoragePolicy entity.
func (*FileMutation) ClearStoragePolicyFiles ¶
func (m *FileMutation) ClearStoragePolicyFiles()
ClearStoragePolicyFiles clears the value of the "storage_policy_files" field.
func (*FileMutation) ClearedEdges ¶
func (m *FileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FileMutation) ClearedFields ¶
func (m *FileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FileMutation) Client ¶
func (m FileMutation) 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 (*FileMutation) CreatedAt ¶
func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FileMutation) DirectLinksCleared ¶
func (m *FileMutation) DirectLinksCleared() bool
DirectLinksCleared reports if the "direct_links" edge to the DirectLink entity was cleared.
func (*FileMutation) DirectLinksIDs ¶
func (m *FileMutation) DirectLinksIDs() (ids []int)
DirectLinksIDs returns the "direct_links" edge IDs in the mutation.
func (*FileMutation) EdgeCleared ¶
func (m *FileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FileMutation) EntitiesCleared ¶
func (m *FileMutation) EntitiesCleared() bool
EntitiesCleared reports if the "entities" edge to the Entity entity was cleared.
func (*FileMutation) EntitiesIDs ¶
func (m *FileMutation) EntitiesIDs() (ids []int)
EntitiesIDs returns the "entities" edge IDs in the mutation.
func (*FileMutation) ExecContext ¶
func (c *FileMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileMutation) Field ¶
func (m *FileMutation) 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 (*FileMutation) FieldCleared ¶
func (m *FileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FileMutation) Fields ¶
func (m *FileMutation) 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 (*FileMutation) FileChildren ¶
func (m *FileMutation) FileChildren() (r int, exists bool)
FileChildren returns the value of the "file_children" field in the mutation.
func (*FileMutation) FileChildrenCleared ¶
func (m *FileMutation) FileChildrenCleared() bool
FileChildrenCleared returns if the "file_children" field was cleared in this mutation.
func (*FileMutation) GetType ¶
func (m *FileMutation) GetType() (r int, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*FileMutation) ID ¶
func (m *FileMutation) 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 (*FileMutation) IDs ¶
func (m *FileMutation) 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 (*FileMutation) IsSymbolic ¶
func (m *FileMutation) IsSymbolic() (r bool, exists bool)
IsSymbolic returns the value of the "is_symbolic" field in the mutation.
func (*FileMutation) MetadataCleared ¶
func (m *FileMutation) MetadataCleared() bool
MetadataCleared reports if the "metadata" edge to the Metadata entity was cleared.
func (*FileMutation) MetadataIDs ¶
func (m *FileMutation) MetadataIDs() (ids []int)
MetadataIDs returns the "metadata" edge IDs in the mutation.
func (*FileMutation) Name ¶
func (m *FileMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*FileMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the File entity. If the File 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 (*FileMutation) 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 (*FileMutation) OldFileChildren ¶
func (m *FileMutation) OldFileChildren(ctx context.Context) (v int, err error)
OldFileChildren returns the old "file_children" field's value of the File entity. If the File 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 (*FileMutation) OldIsSymbolic ¶
func (m *FileMutation) OldIsSymbolic(ctx context.Context) (v bool, err error)
OldIsSymbolic returns the old "is_symbolic" field's value of the File entity. If the File 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 (*FileMutation) OldName ¶
func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the File entity. If the File 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 (*FileMutation) OldOwnerID ¶
func (m *FileMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the File entity. If the File 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 (*FileMutation) OldPrimaryEntity ¶
func (m *FileMutation) OldPrimaryEntity(ctx context.Context) (v int, err error)
OldPrimaryEntity returns the old "primary_entity" field's value of the File entity. If the File 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 (*FileMutation) OldProps ¶
OldProps returns the old "props" field's value of the File entity. If the File 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 (*FileMutation) OldSize ¶
func (m *FileMutation) OldSize(ctx context.Context) (v int64, err error)
OldSize returns the old "size" field's value of the File entity. If the File 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 (*FileMutation) OldStoragePolicyFiles ¶
func (m *FileMutation) OldStoragePolicyFiles(ctx context.Context) (v int, err error)
OldStoragePolicyFiles returns the old "storage_policy_files" field's value of the File entity. If the File 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 (*FileMutation) OldType ¶
func (m *FileMutation) OldType(ctx context.Context) (v int, err error)
OldType returns the old "type" field's value of the File entity. If the File 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 (*FileMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the File entity. If the File 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 (*FileMutation) OwnerCleared ¶
func (m *FileMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*FileMutation) OwnerID ¶
func (m *FileMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*FileMutation) OwnerIDs ¶
func (m *FileMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*FileMutation) ParentCleared ¶
func (m *FileMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the File entity was cleared.
func (*FileMutation) ParentID ¶
func (m *FileMutation) ParentID() (id int, exists bool)
ParentID returns the "parent" edge ID in the mutation.
func (*FileMutation) ParentIDs ¶
func (m *FileMutation) ParentIDs() (ids []int)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*FileMutation) PrimaryEntity ¶
func (m *FileMutation) PrimaryEntity() (r int, exists bool)
PrimaryEntity returns the value of the "primary_entity" field in the mutation.
func (*FileMutation) PrimaryEntityCleared ¶
func (m *FileMutation) PrimaryEntityCleared() bool
PrimaryEntityCleared returns if the "primary_entity" field was cleared in this mutation.
func (*FileMutation) Props ¶
func (m *FileMutation) Props() (r *types.FileProps, exists bool)
Props returns the value of the "props" field in the mutation.
func (*FileMutation) PropsCleared ¶
func (m *FileMutation) PropsCleared() bool
PropsCleared returns if the "props" field was cleared in this mutation.
func (*FileMutation) QueryContext ¶
func (c *FileMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileMutation) RemoveChildIDs ¶
func (m *FileMutation) RemoveChildIDs(ids ...int)
RemoveChildIDs removes the "children" edge to the File entity by IDs.
func (*FileMutation) RemoveDirectLinkIDs ¶
func (m *FileMutation) RemoveDirectLinkIDs(ids ...int)
RemoveDirectLinkIDs removes the "direct_links" edge to the DirectLink entity by IDs.
func (*FileMutation) RemoveEntityIDs ¶
func (m *FileMutation) RemoveEntityIDs(ids ...int)
RemoveEntityIDs removes the "entities" edge to the Entity entity by IDs.
func (*FileMutation) RemoveMetadatumIDs ¶
func (m *FileMutation) RemoveMetadatumIDs(ids ...int)
RemoveMetadatumIDs removes the "metadata" edge to the Metadata entity by IDs.
func (*FileMutation) RemoveShareIDs ¶
func (m *FileMutation) RemoveShareIDs(ids ...int)
RemoveShareIDs removes the "shares" edge to the Share entity by IDs.
func (*FileMutation) RemovedChildrenIDs ¶
func (m *FileMutation) RemovedChildrenIDs() (ids []int)
RemovedChildren returns the removed IDs of the "children" edge to the File entity.
func (*FileMutation) RemovedDirectLinksIDs ¶
func (m *FileMutation) RemovedDirectLinksIDs() (ids []int)
RemovedDirectLinks returns the removed IDs of the "direct_links" edge to the DirectLink entity.
func (*FileMutation) RemovedEdges ¶
func (m *FileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FileMutation) RemovedEntitiesIDs ¶
func (m *FileMutation) RemovedEntitiesIDs() (ids []int)
RemovedEntities returns the removed IDs of the "entities" edge to the Entity entity.
func (*FileMutation) RemovedIDs ¶
func (m *FileMutation) 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 (*FileMutation) RemovedMetadataIDs ¶
func (m *FileMutation) RemovedMetadataIDs() (ids []int)
RemovedMetadata returns the removed IDs of the "metadata" edge to the Metadata entity.
func (*FileMutation) RemovedSharesIDs ¶
func (m *FileMutation) RemovedSharesIDs() (ids []int)
RemovedShares returns the removed IDs of the "shares" edge to the Share entity.
func (*FileMutation) ResetChildren ¶
func (m *FileMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*FileMutation) ResetCreatedAt ¶
func (m *FileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FileMutation) ResetDirectLinks ¶
func (m *FileMutation) ResetDirectLinks()
ResetDirectLinks resets all changes to the "direct_links" edge.
func (*FileMutation) ResetEdge ¶
func (m *FileMutation) 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 (*FileMutation) ResetEntities ¶
func (m *FileMutation) ResetEntities()
ResetEntities resets all changes to the "entities" edge.
func (*FileMutation) ResetField ¶
func (m *FileMutation) 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 (*FileMutation) ResetFileChildren ¶
func (m *FileMutation) ResetFileChildren()
ResetFileChildren resets all changes to the "file_children" field.
func (*FileMutation) ResetIsSymbolic ¶
func (m *FileMutation) ResetIsSymbolic()
ResetIsSymbolic resets all changes to the "is_symbolic" field.
func (*FileMutation) ResetMetadata ¶
func (m *FileMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" edge.
func (*FileMutation) ResetName ¶
func (m *FileMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*FileMutation) ResetOwner ¶
func (m *FileMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*FileMutation) ResetOwnerID ¶
func (m *FileMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*FileMutation) ResetParent ¶
func (m *FileMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*FileMutation) ResetPrimaryEntity ¶
func (m *FileMutation) ResetPrimaryEntity()
ResetPrimaryEntity resets all changes to the "primary_entity" field.
func (*FileMutation) ResetProps ¶
func (m *FileMutation) ResetProps()
ResetProps resets all changes to the "props" field.
func (*FileMutation) ResetShares ¶
func (m *FileMutation) ResetShares()
ResetShares resets all changes to the "shares" edge.
func (*FileMutation) ResetSize ¶
func (m *FileMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*FileMutation) ResetStoragePolicies ¶
func (m *FileMutation) ResetStoragePolicies()
ResetStoragePolicies resets all changes to the "storage_policies" edge.
func (*FileMutation) ResetStoragePolicyFiles ¶
func (m *FileMutation) ResetStoragePolicyFiles()
ResetStoragePolicyFiles resets all changes to the "storage_policy_files" field.
func (*FileMutation) ResetType ¶
func (m *FileMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*FileMutation) ResetUpdatedAt ¶
func (m *FileMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FileMutation) SetCreatedAt ¶
func (m *FileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FileMutation) SetField ¶
func (m *FileMutation) 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 (*FileMutation) SetFileChildren ¶
func (m *FileMutation) SetFileChildren(i int)
SetFileChildren sets the "file_children" field.
func (*FileMutation) SetIsSymbolic ¶
func (m *FileMutation) SetIsSymbolic(b bool)
SetIsSymbolic sets the "is_symbolic" field.
func (*FileMutation) SetName ¶
func (m *FileMutation) SetName(s string)
SetName sets the "name" field.
func (*FileMutation) SetOp ¶
func (m *FileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FileMutation) SetOwnerID ¶
func (m *FileMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*FileMutation) SetParentID ¶
func (m *FileMutation) SetParentID(id int)
SetParentID sets the "parent" edge to the File entity by id.
func (*FileMutation) SetPrimaryEntity ¶
func (m *FileMutation) SetPrimaryEntity(i int)
SetPrimaryEntity sets the "primary_entity" field.
func (*FileMutation) SetProps ¶
func (m *FileMutation) SetProps(tp *types.FileProps)
SetProps sets the "props" field.
func (*FileMutation) SetRawID ¶
func (m *FileMutation) SetRawID(t int)
func (*FileMutation) SetSize ¶
func (m *FileMutation) SetSize(i int64)
SetSize sets the "size" field.
func (*FileMutation) SetStoragePoliciesID ¶
func (m *FileMutation) SetStoragePoliciesID(id int)
SetStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by id.
func (*FileMutation) SetStoragePolicyFiles ¶
func (m *FileMutation) SetStoragePolicyFiles(i int)
SetStoragePolicyFiles sets the "storage_policy_files" field.
func (*FileMutation) SetUpdatedAt ¶
func (m *FileMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*FileMutation) SharesCleared ¶
func (m *FileMutation) SharesCleared() bool
SharesCleared reports if the "shares" edge to the Share entity was cleared.
func (*FileMutation) SharesIDs ¶
func (m *FileMutation) SharesIDs() (ids []int)
SharesIDs returns the "shares" edge IDs in the mutation.
func (*FileMutation) Size ¶
func (m *FileMutation) Size() (r int64, exists bool)
Size returns the value of the "size" field in the mutation.
func (*FileMutation) StoragePoliciesCleared ¶
func (m *FileMutation) StoragePoliciesCleared() bool
StoragePoliciesCleared reports if the "storage_policies" edge to the StoragePolicy entity was cleared.
func (*FileMutation) StoragePoliciesID ¶
func (m *FileMutation) StoragePoliciesID() (id int, exists bool)
StoragePoliciesID returns the "storage_policies" edge ID in the mutation.
func (*FileMutation) StoragePoliciesIDs ¶
func (m *FileMutation) StoragePoliciesIDs() (ids []int)
StoragePoliciesIDs returns the "storage_policies" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StoragePoliciesID instead. It exists only for internal usage by the builders.
func (*FileMutation) StoragePolicyFiles ¶
func (m *FileMutation) StoragePolicyFiles() (r int, exists bool)
StoragePolicyFiles returns the value of the "storage_policy_files" field in the mutation.
func (*FileMutation) StoragePolicyFilesCleared ¶
func (m *FileMutation) StoragePolicyFilesCleared() bool
StoragePolicyFilesCleared returns if the "storage_policy_files" field was cleared in this mutation.
func (FileMutation) Tx ¶
func (m FileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FileMutation) Type ¶
func (m *FileMutation) Type() string
Type returns the node type of this mutation (File).
func (*FileMutation) UpdatedAt ¶
func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FileMutation) Where ¶
func (m *FileMutation) Where(ps ...predicate.File)
Where appends a list predicates to the FileMutation builder.
func (*FileMutation) WhereP ¶
func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FileQuery ¶
type FileQuery struct {
// contains filtered or unexported fields
}
FileQuery is the builder for querying File entities.
func (*FileQuery) Aggregate ¶
func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate returns a FileSelect configured with the given aggregations.
func (*FileQuery) Clone ¶
Clone returns a duplicate of the FileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FileQuery) ExecContext ¶
func (c *FileQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileQuery) First ¶
First returns the first File entity from the query. Returns a *NotFoundError when no File was found.
func (*FileQuery) FirstID ¶
FirstID returns the first File ID from the query. Returns a *NotFoundError when no File ID was found.
func (*FileQuery) GroupBy ¶
func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.File.Query().
GroupBy(file.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*FileQuery) Only ¶
Only returns a single File entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one File entity is found. Returns a *NotFoundError when no File entities are found.
func (*FileQuery) OnlyID ¶
OnlyID is like Only, but returns the only File ID in the query. Returns a *NotSingularError when more than one File ID is found. Returns a *NotFoundError when no entities are found.
func (*FileQuery) Order ¶
func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery
Order specifies how the records should be ordered.
func (*FileQuery) QueryChildren ¶
QueryChildren chains the current query on the "children" edge.
func (*FileQuery) QueryContext ¶
func (c *FileQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileQuery) QueryDirectLinks ¶
func (fq *FileQuery) QueryDirectLinks() *DirectLinkQuery
QueryDirectLinks chains the current query on the "direct_links" edge.
func (*FileQuery) QueryEntities ¶
func (fq *FileQuery) QueryEntities() *EntityQuery
QueryEntities chains the current query on the "entities" edge.
func (*FileQuery) QueryMetadata ¶
func (fq *FileQuery) QueryMetadata() *MetadataQuery
QueryMetadata chains the current query on the "metadata" edge.
func (*FileQuery) QueryOwner ¶
QueryOwner chains the current query on the "owner" edge.
func (*FileQuery) QueryParent ¶
QueryParent chains the current query on the "parent" edge.
func (*FileQuery) QueryShares ¶
func (fq *FileQuery) QueryShares() *ShareQuery
QueryShares chains the current query on the "shares" edge.
func (*FileQuery) QueryStoragePolicies ¶
func (fq *FileQuery) QueryStoragePolicies() *StoragePolicyQuery
QueryStoragePolicies chains the current query on the "storage_policies" edge.
func (*FileQuery) Select ¶
func (fq *FileQuery) Select(fields ...string) *FileSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.File.Query().
Select(file.FieldCreatedAt).
Scan(ctx, &v)
func (*FileQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*FileQuery) WithChildren ¶
WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.
func (*FileQuery) WithDirectLinks ¶
func (fq *FileQuery) WithDirectLinks(opts ...func(*DirectLinkQuery)) *FileQuery
WithDirectLinks tells the query-builder to eager-load the nodes that are connected to the "direct_links" edge. The optional arguments are used to configure the query builder of the edge.
func (*FileQuery) WithEntities ¶
func (fq *FileQuery) WithEntities(opts ...func(*EntityQuery)) *FileQuery
WithEntities tells the query-builder to eager-load the nodes that are connected to the "entities" edge. The optional arguments are used to configure the query builder of the edge.
func (*FileQuery) WithMetadata ¶
func (fq *FileQuery) WithMetadata(opts ...func(*MetadataQuery)) *FileQuery
WithMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge. The optional arguments are used to configure the query builder of the edge.
func (*FileQuery) WithOwner ¶
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*FileQuery) WithParent ¶
WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.
func (*FileQuery) WithShares ¶
func (fq *FileQuery) WithShares(opts ...func(*ShareQuery)) *FileQuery
WithShares tells the query-builder to eager-load the nodes that are connected to the "shares" edge. The optional arguments are used to configure the query builder of the edge.
func (*FileQuery) WithStoragePolicies ¶
func (fq *FileQuery) WithStoragePolicies(opts ...func(*StoragePolicyQuery)) *FileQuery
WithStoragePolicies tells the query-builder to eager-load the nodes that are connected to the "storage_policies" edge. The optional arguments are used to configure the query builder of the edge.
type FileSelect ¶
type FileSelect struct {
*FileQuery
// contains filtered or unexported fields
}
FileSelect is the builder for selecting fields of File entities.
func (*FileSelect) Aggregate ¶
func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (FileSelect) ExecContext ¶
func (c FileSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (FileSelect) QueryContext ¶
func (c FileSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileSelect) Scan ¶
func (fs *FileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileUpdate ¶
type FileUpdate struct {
// contains filtered or unexported fields
}
FileUpdate is the builder for updating File entities.
func (*FileUpdate) AddChildIDs ¶
func (fu *FileUpdate) AddChildIDs(ids ...int) *FileUpdate
AddChildIDs adds the "children" edge to the File entity by IDs.
func (*FileUpdate) AddChildren ¶
func (fu *FileUpdate) AddChildren(f ...*File) *FileUpdate
AddChildren adds the "children" edges to the File entity.
func (*FileUpdate) AddDirectLinkIDs ¶
func (fu *FileUpdate) AddDirectLinkIDs(ids ...int) *FileUpdate
AddDirectLinkIDs adds the "direct_links" edge to the DirectLink entity by IDs.
func (*FileUpdate) AddDirectLinks ¶
func (fu *FileUpdate) AddDirectLinks(d ...*DirectLink) *FileUpdate
AddDirectLinks adds the "direct_links" edges to the DirectLink entity.
func (*FileUpdate) AddEntities ¶
func (fu *FileUpdate) AddEntities(e ...*Entity) *FileUpdate
AddEntities adds the "entities" edges to the Entity entity.
func (*FileUpdate) AddEntityIDs ¶
func (fu *FileUpdate) AddEntityIDs(ids ...int) *FileUpdate
AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
func (*FileUpdate) AddMetadata ¶
func (fu *FileUpdate) AddMetadata(m ...*Metadata) *FileUpdate
AddMetadata adds the "metadata" edges to the Metadata entity.
func (*FileUpdate) AddMetadatumIDs ¶
func (fu *FileUpdate) AddMetadatumIDs(ids ...int) *FileUpdate
AddMetadatumIDs adds the "metadata" edge to the Metadata entity by IDs.
func (*FileUpdate) AddPrimaryEntity ¶
func (fu *FileUpdate) AddPrimaryEntity(i int) *FileUpdate
AddPrimaryEntity adds i to the "primary_entity" field.
func (*FileUpdate) AddShareIDs ¶
func (fu *FileUpdate) AddShareIDs(ids ...int) *FileUpdate
AddShareIDs adds the "shares" edge to the Share entity by IDs.
func (*FileUpdate) AddShares ¶
func (fu *FileUpdate) AddShares(s ...*Share) *FileUpdate
AddShares adds the "shares" edges to the Share entity.
func (*FileUpdate) AddSize ¶
func (fu *FileUpdate) AddSize(i int64) *FileUpdate
AddSize adds i to the "size" field.
func (*FileUpdate) AddType ¶
func (fu *FileUpdate) AddType(i int) *FileUpdate
AddType adds i to the "type" field.
func (*FileUpdate) ClearChildren ¶
func (fu *FileUpdate) ClearChildren() *FileUpdate
ClearChildren clears all "children" edges to the File entity.
func (*FileUpdate) ClearDirectLinks ¶
func (fu *FileUpdate) ClearDirectLinks() *FileUpdate
ClearDirectLinks clears all "direct_links" edges to the DirectLink entity.
func (*FileUpdate) ClearEntities ¶
func (fu *FileUpdate) ClearEntities() *FileUpdate
ClearEntities clears all "entities" edges to the Entity entity.
func (*FileUpdate) ClearFileChildren ¶
func (fu *FileUpdate) ClearFileChildren() *FileUpdate
ClearFileChildren clears the value of the "file_children" field.
func (*FileUpdate) ClearMetadata ¶
func (fu *FileUpdate) ClearMetadata() *FileUpdate
ClearMetadata clears all "metadata" edges to the Metadata entity.
func (*FileUpdate) ClearOwner ¶
func (fu *FileUpdate) ClearOwner() *FileUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*FileUpdate) ClearParent ¶
func (fu *FileUpdate) ClearParent() *FileUpdate
ClearParent clears the "parent" edge to the File entity.
func (*FileUpdate) ClearPrimaryEntity ¶
func (fu *FileUpdate) ClearPrimaryEntity() *FileUpdate
ClearPrimaryEntity clears the value of the "primary_entity" field.
func (*FileUpdate) ClearProps ¶
func (fu *FileUpdate) ClearProps() *FileUpdate
ClearProps clears the value of the "props" field.
func (*FileUpdate) ClearShares ¶
func (fu *FileUpdate) ClearShares() *FileUpdate
ClearShares clears all "shares" edges to the Share entity.
func (*FileUpdate) ClearStoragePolicies ¶
func (fu *FileUpdate) ClearStoragePolicies() *FileUpdate
ClearStoragePolicies clears the "storage_policies" edge to the StoragePolicy entity.
func (*FileUpdate) ClearStoragePolicyFiles ¶
func (fu *FileUpdate) ClearStoragePolicyFiles() *FileUpdate
ClearStoragePolicyFiles clears the value of the "storage_policy_files" field.
func (*FileUpdate) Exec ¶
func (fu *FileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpdate) ExecContext ¶
func (c *FileUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileUpdate) ExecX ¶
func (fu *FileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdate) Mutation ¶
func (fu *FileUpdate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdate) QueryContext ¶
func (c *FileUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileUpdate) RemoveChildIDs ¶
func (fu *FileUpdate) RemoveChildIDs(ids ...int) *FileUpdate
RemoveChildIDs removes the "children" edge to File entities by IDs.
func (*FileUpdate) RemoveChildren ¶
func (fu *FileUpdate) RemoveChildren(f ...*File) *FileUpdate
RemoveChildren removes "children" edges to File entities.
func (*FileUpdate) RemoveDirectLinkIDs ¶
func (fu *FileUpdate) RemoveDirectLinkIDs(ids ...int) *FileUpdate
RemoveDirectLinkIDs removes the "direct_links" edge to DirectLink entities by IDs.
func (*FileUpdate) RemoveDirectLinks ¶
func (fu *FileUpdate) RemoveDirectLinks(d ...*DirectLink) *FileUpdate
RemoveDirectLinks removes "direct_links" edges to DirectLink entities.
func (*FileUpdate) RemoveEntities ¶
func (fu *FileUpdate) RemoveEntities(e ...*Entity) *FileUpdate
RemoveEntities removes "entities" edges to Entity entities.
func (*FileUpdate) RemoveEntityIDs ¶
func (fu *FileUpdate) RemoveEntityIDs(ids ...int) *FileUpdate
RemoveEntityIDs removes the "entities" edge to Entity entities by IDs.
func (*FileUpdate) RemoveMetadata ¶
func (fu *FileUpdate) RemoveMetadata(m ...*Metadata) *FileUpdate
RemoveMetadata removes "metadata" edges to Metadata entities.
func (*FileUpdate) RemoveMetadatumIDs ¶
func (fu *FileUpdate) RemoveMetadatumIDs(ids ...int) *FileUpdate
RemoveMetadatumIDs removes the "metadata" edge to Metadata entities by IDs.
func (*FileUpdate) RemoveShareIDs ¶
func (fu *FileUpdate) RemoveShareIDs(ids ...int) *FileUpdate
RemoveShareIDs removes the "shares" edge to Share entities by IDs.
func (*FileUpdate) RemoveShares ¶
func (fu *FileUpdate) RemoveShares(s ...*Share) *FileUpdate
RemoveShares removes "shares" edges to Share entities.
func (*FileUpdate) Save ¶
func (fu *FileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FileUpdate) SaveX ¶
func (fu *FileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FileUpdate) SetFileChildren ¶
func (fu *FileUpdate) SetFileChildren(i int) *FileUpdate
SetFileChildren sets the "file_children" field.
func (*FileUpdate) SetIsSymbolic ¶
func (fu *FileUpdate) SetIsSymbolic(b bool) *FileUpdate
SetIsSymbolic sets the "is_symbolic" field.
func (*FileUpdate) SetName ¶
func (fu *FileUpdate) SetName(s string) *FileUpdate
SetName sets the "name" field.
func (*FileUpdate) SetNillableFileChildren ¶
func (fu *FileUpdate) SetNillableFileChildren(i *int) *FileUpdate
SetNillableFileChildren sets the "file_children" field if the given value is not nil.
func (*FileUpdate) SetNillableIsSymbolic ¶
func (fu *FileUpdate) SetNillableIsSymbolic(b *bool) *FileUpdate
SetNillableIsSymbolic sets the "is_symbolic" field if the given value is not nil.
func (*FileUpdate) SetNillableName ¶
func (fu *FileUpdate) SetNillableName(s *string) *FileUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*FileUpdate) SetNillableOwnerID ¶
func (fu *FileUpdate) SetNillableOwnerID(i *int) *FileUpdate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*FileUpdate) SetNillableParentID ¶
func (fu *FileUpdate) SetNillableParentID(id *int) *FileUpdate
SetNillableParentID sets the "parent" edge to the File entity by ID if the given value is not nil.
func (*FileUpdate) SetNillablePrimaryEntity ¶
func (fu *FileUpdate) SetNillablePrimaryEntity(i *int) *FileUpdate
SetNillablePrimaryEntity sets the "primary_entity" field if the given value is not nil.
func (*FileUpdate) SetNillableSize ¶
func (fu *FileUpdate) SetNillableSize(i *int64) *FileUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileUpdate) SetNillableStoragePoliciesID ¶
func (fu *FileUpdate) SetNillableStoragePoliciesID(id *int) *FileUpdate
SetNillableStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID if the given value is not nil.
func (*FileUpdate) SetNillableStoragePolicyFiles ¶
func (fu *FileUpdate) SetNillableStoragePolicyFiles(i *int) *FileUpdate
SetNillableStoragePolicyFiles sets the "storage_policy_files" field if the given value is not nil.
func (*FileUpdate) SetNillableType ¶
func (fu *FileUpdate) SetNillableType(i *int) *FileUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*FileUpdate) SetNillableUpdatedAt ¶
func (fu *FileUpdate) SetNillableUpdatedAt(t *time.Time) *FileUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FileUpdate) SetOwner ¶
func (fu *FileUpdate) SetOwner(u *User) *FileUpdate
SetOwner sets the "owner" edge to the User entity.
func (*FileUpdate) SetOwnerID ¶
func (fu *FileUpdate) SetOwnerID(i int) *FileUpdate
SetOwnerID sets the "owner_id" field.
func (*FileUpdate) SetParent ¶
func (fu *FileUpdate) SetParent(f *File) *FileUpdate
SetParent sets the "parent" edge to the File entity.
func (*FileUpdate) SetParentID ¶
func (fu *FileUpdate) SetParentID(id int) *FileUpdate
SetParentID sets the "parent" edge to the File entity by ID.
func (*FileUpdate) SetPrimaryEntity ¶
func (fu *FileUpdate) SetPrimaryEntity(i int) *FileUpdate
SetPrimaryEntity sets the "primary_entity" field.
func (*FileUpdate) SetProps ¶
func (fu *FileUpdate) SetProps(tp *types.FileProps) *FileUpdate
SetProps sets the "props" field.
func (*FileUpdate) SetSize ¶
func (fu *FileUpdate) SetSize(i int64) *FileUpdate
SetSize sets the "size" field.
func (*FileUpdate) SetStoragePolicies ¶
func (fu *FileUpdate) SetStoragePolicies(s *StoragePolicy) *FileUpdate
SetStoragePolicies sets the "storage_policies" edge to the StoragePolicy entity.
func (*FileUpdate) SetStoragePoliciesID ¶
func (fu *FileUpdate) SetStoragePoliciesID(id int) *FileUpdate
SetStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID.
func (*FileUpdate) SetStoragePolicyFiles ¶
func (fu *FileUpdate) SetStoragePolicyFiles(i int) *FileUpdate
SetStoragePolicyFiles sets the "storage_policy_files" field.
func (*FileUpdate) SetType ¶
func (fu *FileUpdate) SetType(i int) *FileUpdate
SetType sets the "type" field.
func (*FileUpdate) SetUpdatedAt ¶
func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FileUpdate) Where ¶
func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
Where appends a list predicates to the FileUpdate builder.
type FileUpdateOne ¶
type FileUpdateOne struct {
// contains filtered or unexported fields
}
FileUpdateOne is the builder for updating a single File entity.
func (*FileUpdateOne) AddChildIDs ¶
func (fuo *FileUpdateOne) AddChildIDs(ids ...int) *FileUpdateOne
AddChildIDs adds the "children" edge to the File entity by IDs.
func (*FileUpdateOne) AddChildren ¶
func (fuo *FileUpdateOne) AddChildren(f ...*File) *FileUpdateOne
AddChildren adds the "children" edges to the File entity.
func (*FileUpdateOne) AddDirectLinkIDs ¶
func (fuo *FileUpdateOne) AddDirectLinkIDs(ids ...int) *FileUpdateOne
AddDirectLinkIDs adds the "direct_links" edge to the DirectLink entity by IDs.
func (*FileUpdateOne) AddDirectLinks ¶
func (fuo *FileUpdateOne) AddDirectLinks(d ...*DirectLink) *FileUpdateOne
AddDirectLinks adds the "direct_links" edges to the DirectLink entity.
func (*FileUpdateOne) AddEntities ¶
func (fuo *FileUpdateOne) AddEntities(e ...*Entity) *FileUpdateOne
AddEntities adds the "entities" edges to the Entity entity.
func (*FileUpdateOne) AddEntityIDs ¶
func (fuo *FileUpdateOne) AddEntityIDs(ids ...int) *FileUpdateOne
AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
func (*FileUpdateOne) AddMetadata ¶
func (fuo *FileUpdateOne) AddMetadata(m ...*Metadata) *FileUpdateOne
AddMetadata adds the "metadata" edges to the Metadata entity.
func (*FileUpdateOne) AddMetadatumIDs ¶
func (fuo *FileUpdateOne) AddMetadatumIDs(ids ...int) *FileUpdateOne
AddMetadatumIDs adds the "metadata" edge to the Metadata entity by IDs.
func (*FileUpdateOne) AddPrimaryEntity ¶
func (fuo *FileUpdateOne) AddPrimaryEntity(i int) *FileUpdateOne
AddPrimaryEntity adds i to the "primary_entity" field.
func (*FileUpdateOne) AddShareIDs ¶
func (fuo *FileUpdateOne) AddShareIDs(ids ...int) *FileUpdateOne
AddShareIDs adds the "shares" edge to the Share entity by IDs.
func (*FileUpdateOne) AddShares ¶
func (fuo *FileUpdateOne) AddShares(s ...*Share) *FileUpdateOne
AddShares adds the "shares" edges to the Share entity.
func (*FileUpdateOne) AddSize ¶
func (fuo *FileUpdateOne) AddSize(i int64) *FileUpdateOne
AddSize adds i to the "size" field.
func (*FileUpdateOne) AddType ¶
func (fuo *FileUpdateOne) AddType(i int) *FileUpdateOne
AddType adds i to the "type" field.
func (*FileUpdateOne) ClearChildren ¶
func (fuo *FileUpdateOne) ClearChildren() *FileUpdateOne
ClearChildren clears all "children" edges to the File entity.
func (*FileUpdateOne) ClearDirectLinks ¶
func (fuo *FileUpdateOne) ClearDirectLinks() *FileUpdateOne
ClearDirectLinks clears all "direct_links" edges to the DirectLink entity.
func (*FileUpdateOne) ClearEntities ¶
func (fuo *FileUpdateOne) ClearEntities() *FileUpdateOne
ClearEntities clears all "entities" edges to the Entity entity.
func (*FileUpdateOne) ClearFileChildren ¶
func (fuo *FileUpdateOne) ClearFileChildren() *FileUpdateOne
ClearFileChildren clears the value of the "file_children" field.
func (*FileUpdateOne) ClearMetadata ¶
func (fuo *FileUpdateOne) ClearMetadata() *FileUpdateOne
ClearMetadata clears all "metadata" edges to the Metadata entity.
func (*FileUpdateOne) ClearOwner ¶
func (fuo *FileUpdateOne) ClearOwner() *FileUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*FileUpdateOne) ClearParent ¶
func (fuo *FileUpdateOne) ClearParent() *FileUpdateOne
ClearParent clears the "parent" edge to the File entity.
func (*FileUpdateOne) ClearPrimaryEntity ¶
func (fuo *FileUpdateOne) ClearPrimaryEntity() *FileUpdateOne
ClearPrimaryEntity clears the value of the "primary_entity" field.
func (*FileUpdateOne) ClearProps ¶
func (fuo *FileUpdateOne) ClearProps() *FileUpdateOne
ClearProps clears the value of the "props" field.
func (*FileUpdateOne) ClearShares ¶
func (fuo *FileUpdateOne) ClearShares() *FileUpdateOne
ClearShares clears all "shares" edges to the Share entity.
func (*FileUpdateOne) ClearStoragePolicies ¶
func (fuo *FileUpdateOne) ClearStoragePolicies() *FileUpdateOne
ClearStoragePolicies clears the "storage_policies" edge to the StoragePolicy entity.
func (*FileUpdateOne) ClearStoragePolicyFiles ¶
func (fuo *FileUpdateOne) ClearStoragePolicyFiles() *FileUpdateOne
ClearStoragePolicyFiles clears the value of the "storage_policy_files" field.
func (*FileUpdateOne) Exec ¶
func (fuo *FileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FileUpdateOne) ExecContext ¶
func (c *FileUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileUpdateOne) ExecX ¶
func (fuo *FileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdateOne) Mutation ¶
func (fuo *FileUpdateOne) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdateOne) QueryContext ¶
func (c *FileUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileUpdateOne) RemoveChildIDs ¶
func (fuo *FileUpdateOne) RemoveChildIDs(ids ...int) *FileUpdateOne
RemoveChildIDs removes the "children" edge to File entities by IDs.
func (*FileUpdateOne) RemoveChildren ¶
func (fuo *FileUpdateOne) RemoveChildren(f ...*File) *FileUpdateOne
RemoveChildren removes "children" edges to File entities.
func (*FileUpdateOne) RemoveDirectLinkIDs ¶
func (fuo *FileUpdateOne) RemoveDirectLinkIDs(ids ...int) *FileUpdateOne
RemoveDirectLinkIDs removes the "direct_links" edge to DirectLink entities by IDs.
func (*FileUpdateOne) RemoveDirectLinks ¶
func (fuo *FileUpdateOne) RemoveDirectLinks(d ...*DirectLink) *FileUpdateOne
RemoveDirectLinks removes "direct_links" edges to DirectLink entities.
func (*FileUpdateOne) RemoveEntities ¶
func (fuo *FileUpdateOne) RemoveEntities(e ...*Entity) *FileUpdateOne
RemoveEntities removes "entities" edges to Entity entities.
func (*FileUpdateOne) RemoveEntityIDs ¶
func (fuo *FileUpdateOne) RemoveEntityIDs(ids ...int) *FileUpdateOne
RemoveEntityIDs removes the "entities" edge to Entity entities by IDs.
func (*FileUpdateOne) RemoveMetadata ¶
func (fuo *FileUpdateOne) RemoveMetadata(m ...*Metadata) *FileUpdateOne
RemoveMetadata removes "metadata" edges to Metadata entities.
func (*FileUpdateOne) RemoveMetadatumIDs ¶
func (fuo *FileUpdateOne) RemoveMetadatumIDs(ids ...int) *FileUpdateOne
RemoveMetadatumIDs removes the "metadata" edge to Metadata entities by IDs.
func (*FileUpdateOne) RemoveShareIDs ¶
func (fuo *FileUpdateOne) RemoveShareIDs(ids ...int) *FileUpdateOne
RemoveShareIDs removes the "shares" edge to Share entities by IDs.
func (*FileUpdateOne) RemoveShares ¶
func (fuo *FileUpdateOne) RemoveShares(s ...*Share) *FileUpdateOne
RemoveShares removes "shares" edges to Share entities.
func (*FileUpdateOne) Save ¶
func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
Save executes the query and returns the updated File entity.
func (*FileUpdateOne) SaveX ¶
func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
SaveX is like Save, but panics if an error occurs.
func (*FileUpdateOne) Select ¶
func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FileUpdateOne) SetFileChildren ¶
func (fuo *FileUpdateOne) SetFileChildren(i int) *FileUpdateOne
SetFileChildren sets the "file_children" field.
func (*FileUpdateOne) SetIsSymbolic ¶
func (fuo *FileUpdateOne) SetIsSymbolic(b bool) *FileUpdateOne
SetIsSymbolic sets the "is_symbolic" field.
func (*FileUpdateOne) SetName ¶
func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
SetName sets the "name" field.
func (*FileUpdateOne) SetNillableFileChildren ¶
func (fuo *FileUpdateOne) SetNillableFileChildren(i *int) *FileUpdateOne
SetNillableFileChildren sets the "file_children" field if the given value is not nil.
func (*FileUpdateOne) SetNillableIsSymbolic ¶
func (fuo *FileUpdateOne) SetNillableIsSymbolic(b *bool) *FileUpdateOne
SetNillableIsSymbolic sets the "is_symbolic" field if the given value is not nil.
func (*FileUpdateOne) SetNillableName ¶
func (fuo *FileUpdateOne) SetNillableName(s *string) *FileUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*FileUpdateOne) SetNillableOwnerID ¶
func (fuo *FileUpdateOne) SetNillableOwnerID(i *int) *FileUpdateOne
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*FileUpdateOne) SetNillableParentID ¶
func (fuo *FileUpdateOne) SetNillableParentID(id *int) *FileUpdateOne
SetNillableParentID sets the "parent" edge to the File entity by ID if the given value is not nil.
func (*FileUpdateOne) SetNillablePrimaryEntity ¶
func (fuo *FileUpdateOne) SetNillablePrimaryEntity(i *int) *FileUpdateOne
SetNillablePrimaryEntity sets the "primary_entity" field if the given value is not nil.
func (*FileUpdateOne) SetNillableSize ¶
func (fuo *FileUpdateOne) SetNillableSize(i *int64) *FileUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileUpdateOne) SetNillableStoragePoliciesID ¶
func (fuo *FileUpdateOne) SetNillableStoragePoliciesID(id *int) *FileUpdateOne
SetNillableStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID if the given value is not nil.
func (*FileUpdateOne) SetNillableStoragePolicyFiles ¶
func (fuo *FileUpdateOne) SetNillableStoragePolicyFiles(i *int) *FileUpdateOne
SetNillableStoragePolicyFiles sets the "storage_policy_files" field if the given value is not nil.
func (*FileUpdateOne) SetNillableType ¶
func (fuo *FileUpdateOne) SetNillableType(i *int) *FileUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*FileUpdateOne) SetNillableUpdatedAt ¶
func (fuo *FileUpdateOne) SetNillableUpdatedAt(t *time.Time) *FileUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FileUpdateOne) SetOwner ¶
func (fuo *FileUpdateOne) SetOwner(u *User) *FileUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*FileUpdateOne) SetOwnerID ¶
func (fuo *FileUpdateOne) SetOwnerID(i int) *FileUpdateOne
SetOwnerID sets the "owner_id" field.
func (*FileUpdateOne) SetParent ¶
func (fuo *FileUpdateOne) SetParent(f *File) *FileUpdateOne
SetParent sets the "parent" edge to the File entity.
func (*FileUpdateOne) SetParentID ¶
func (fuo *FileUpdateOne) SetParentID(id int) *FileUpdateOne
SetParentID sets the "parent" edge to the File entity by ID.
func (*FileUpdateOne) SetPrimaryEntity ¶
func (fuo *FileUpdateOne) SetPrimaryEntity(i int) *FileUpdateOne
SetPrimaryEntity sets the "primary_entity" field.
func (*FileUpdateOne) SetProps ¶
func (fuo *FileUpdateOne) SetProps(tp *types.FileProps) *FileUpdateOne
SetProps sets the "props" field.
func (*FileUpdateOne) SetSize ¶
func (fuo *FileUpdateOne) SetSize(i int64) *FileUpdateOne
SetSize sets the "size" field.
func (*FileUpdateOne) SetStoragePolicies ¶
func (fuo *FileUpdateOne) SetStoragePolicies(s *StoragePolicy) *FileUpdateOne
SetStoragePolicies sets the "storage_policies" edge to the StoragePolicy entity.
func (*FileUpdateOne) SetStoragePoliciesID ¶
func (fuo *FileUpdateOne) SetStoragePoliciesID(id int) *FileUpdateOne
SetStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID.
func (*FileUpdateOne) SetStoragePolicyFiles ¶
func (fuo *FileUpdateOne) SetStoragePolicyFiles(i int) *FileUpdateOne
SetStoragePolicyFiles sets the "storage_policy_files" field.
func (*FileUpdateOne) SetType ¶
func (fuo *FileUpdateOne) SetType(i int) *FileUpdateOne
SetType sets the "type" field.
func (*FileUpdateOne) SetUpdatedAt ¶
func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FileUpdateOne) Where ¶
func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
Where appends a list predicates to the FileUpdate builder.
type FileUpsert ¶
FileUpsert is the "OnConflict" setter.
func (*FileUpsert) AddPrimaryEntity ¶
func (u *FileUpsert) AddPrimaryEntity(v int) *FileUpsert
AddPrimaryEntity adds v to the "primary_entity" field.
func (*FileUpsert) AddSize ¶
func (u *FileUpsert) AddSize(v int64) *FileUpsert
AddSize adds v to the "size" field.
func (*FileUpsert) AddType ¶
func (u *FileUpsert) AddType(v int) *FileUpsert
AddType adds v to the "type" field.
func (*FileUpsert) ClearFileChildren ¶
func (u *FileUpsert) ClearFileChildren() *FileUpsert
ClearFileChildren clears the value of the "file_children" field.
func (*FileUpsert) ClearPrimaryEntity ¶
func (u *FileUpsert) ClearPrimaryEntity() *FileUpsert
ClearPrimaryEntity clears the value of the "primary_entity" field.
func (*FileUpsert) ClearProps ¶
func (u *FileUpsert) ClearProps() *FileUpsert
ClearProps clears the value of the "props" field.
func (*FileUpsert) ClearStoragePolicyFiles ¶
func (u *FileUpsert) ClearStoragePolicyFiles() *FileUpsert
ClearStoragePolicyFiles clears the value of the "storage_policy_files" field.
func (*FileUpsert) SetFileChildren ¶
func (u *FileUpsert) SetFileChildren(v int) *FileUpsert
SetFileChildren sets the "file_children" field.
func (*FileUpsert) SetIsSymbolic ¶
func (u *FileUpsert) SetIsSymbolic(v bool) *FileUpsert
SetIsSymbolic sets the "is_symbolic" field.
func (*FileUpsert) SetName ¶
func (u *FileUpsert) SetName(v string) *FileUpsert
SetName sets the "name" field.
func (*FileUpsert) SetOwnerID ¶
func (u *FileUpsert) SetOwnerID(v int) *FileUpsert
SetOwnerID sets the "owner_id" field.
func (*FileUpsert) SetPrimaryEntity ¶
func (u *FileUpsert) SetPrimaryEntity(v int) *FileUpsert
SetPrimaryEntity sets the "primary_entity" field.
func (*FileUpsert) SetProps ¶
func (u *FileUpsert) SetProps(v *types.FileProps) *FileUpsert
SetProps sets the "props" field.
func (*FileUpsert) SetSize ¶
func (u *FileUpsert) SetSize(v int64) *FileUpsert
SetSize sets the "size" field.
func (*FileUpsert) SetStoragePolicyFiles ¶
func (u *FileUpsert) SetStoragePolicyFiles(v int) *FileUpsert
SetStoragePolicyFiles sets the "storage_policy_files" field.
func (*FileUpsert) SetType ¶
func (u *FileUpsert) SetType(v int) *FileUpsert
SetType sets the "type" field.
func (*FileUpsert) SetUpdatedAt ¶
func (u *FileUpsert) SetUpdatedAt(v time.Time) *FileUpsert
SetUpdatedAt sets the "updated_at" field.
func (*FileUpsert) UpdateFileChildren ¶
func (u *FileUpsert) UpdateFileChildren() *FileUpsert
UpdateFileChildren sets the "file_children" field to the value that was provided on create.
func (*FileUpsert) UpdateIsSymbolic ¶
func (u *FileUpsert) UpdateIsSymbolic() *FileUpsert
UpdateIsSymbolic sets the "is_symbolic" field to the value that was provided on create.
func (*FileUpsert) UpdateName ¶
func (u *FileUpsert) UpdateName() *FileUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsert) UpdateOwnerID ¶
func (u *FileUpsert) UpdateOwnerID() *FileUpsert
UpdateOwnerID sets the "owner_id" field to the value that was provided on create.
func (*FileUpsert) UpdatePrimaryEntity ¶
func (u *FileUpsert) UpdatePrimaryEntity() *FileUpsert
UpdatePrimaryEntity sets the "primary_entity" field to the value that was provided on create.
func (*FileUpsert) UpdateProps ¶
func (u *FileUpsert) UpdateProps() *FileUpsert
UpdateProps sets the "props" field to the value that was provided on create.
func (*FileUpsert) UpdateSize ¶
func (u *FileUpsert) UpdateSize() *FileUpsert
UpdateSize sets the "size" field to the value that was provided on create.
func (*FileUpsert) UpdateStoragePolicyFiles ¶
func (u *FileUpsert) UpdateStoragePolicyFiles() *FileUpsert
UpdateStoragePolicyFiles sets the "storage_policy_files" field to the value that was provided on create.
func (*FileUpsert) UpdateType ¶
func (u *FileUpsert) UpdateType() *FileUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*FileUpsert) UpdateUpdatedAt ¶
func (u *FileUpsert) UpdateUpdatedAt() *FileUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type FileUpsertBulk ¶
type FileUpsertBulk struct {
// contains filtered or unexported fields
}
FileUpsertBulk is the builder for "upsert"-ing a bulk of File nodes.
func (*FileUpsertBulk) AddPrimaryEntity ¶
func (u *FileUpsertBulk) AddPrimaryEntity(v int) *FileUpsertBulk
AddPrimaryEntity adds v to the "primary_entity" field.
func (*FileUpsertBulk) AddSize ¶
func (u *FileUpsertBulk) AddSize(v int64) *FileUpsertBulk
AddSize adds v to the "size" field.
func (*FileUpsertBulk) AddType ¶
func (u *FileUpsertBulk) AddType(v int) *FileUpsertBulk
AddType adds v to the "type" field.
func (*FileUpsertBulk) ClearFileChildren ¶
func (u *FileUpsertBulk) ClearFileChildren() *FileUpsertBulk
ClearFileChildren clears the value of the "file_children" field.
func (*FileUpsertBulk) ClearPrimaryEntity ¶
func (u *FileUpsertBulk) ClearPrimaryEntity() *FileUpsertBulk
ClearPrimaryEntity clears the value of the "primary_entity" field.
func (*FileUpsertBulk) ClearProps ¶
func (u *FileUpsertBulk) ClearProps() *FileUpsertBulk
ClearProps clears the value of the "props" field.
func (*FileUpsertBulk) ClearStoragePolicyFiles ¶
func (u *FileUpsertBulk) ClearStoragePolicyFiles() *FileUpsertBulk
ClearStoragePolicyFiles clears the value of the "storage_policy_files" field.
func (*FileUpsertBulk) DoNothing ¶
func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertBulk) Exec ¶
func (u *FileUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertBulk) ExecX ¶
func (u *FileUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertBulk) Ignore ¶
func (u *FileUpsertBulk) Ignore() *FileUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FileUpsertBulk) SetFileChildren ¶
func (u *FileUpsertBulk) SetFileChildren(v int) *FileUpsertBulk
SetFileChildren sets the "file_children" field.
func (*FileUpsertBulk) SetIsSymbolic ¶
func (u *FileUpsertBulk) SetIsSymbolic(v bool) *FileUpsertBulk
SetIsSymbolic sets the "is_symbolic" field.
func (*FileUpsertBulk) SetName ¶
func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
SetName sets the "name" field.
func (*FileUpsertBulk) SetOwnerID ¶
func (u *FileUpsertBulk) SetOwnerID(v int) *FileUpsertBulk
SetOwnerID sets the "owner_id" field.
func (*FileUpsertBulk) SetPrimaryEntity ¶
func (u *FileUpsertBulk) SetPrimaryEntity(v int) *FileUpsertBulk
SetPrimaryEntity sets the "primary_entity" field.
func (*FileUpsertBulk) SetProps ¶
func (u *FileUpsertBulk) SetProps(v *types.FileProps) *FileUpsertBulk
SetProps sets the "props" field.
func (*FileUpsertBulk) SetSize ¶
func (u *FileUpsertBulk) SetSize(v int64) *FileUpsertBulk
SetSize sets the "size" field.
func (*FileUpsertBulk) SetStoragePolicyFiles ¶
func (u *FileUpsertBulk) SetStoragePolicyFiles(v int) *FileUpsertBulk
SetStoragePolicyFiles sets the "storage_policy_files" field.
func (*FileUpsertBulk) SetType ¶
func (u *FileUpsertBulk) SetType(v int) *FileUpsertBulk
SetType sets the "type" field.
func (*FileUpsertBulk) SetUpdatedAt ¶
func (u *FileUpsertBulk) SetUpdatedAt(v time.Time) *FileUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*FileUpsertBulk) Update ¶
func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
Update allows overriding fields `UPDATE` values. See the FileCreateBulk.OnConflict documentation for more info.
func (*FileUpsertBulk) UpdateFileChildren ¶
func (u *FileUpsertBulk) UpdateFileChildren() *FileUpsertBulk
UpdateFileChildren sets the "file_children" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateIsSymbolic ¶
func (u *FileUpsertBulk) UpdateIsSymbolic() *FileUpsertBulk
UpdateIsSymbolic sets the "is_symbolic" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateName ¶
func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateNewValues ¶
func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.File.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FileUpsertBulk) UpdateOwnerID ¶
func (u *FileUpsertBulk) UpdateOwnerID() *FileUpsertBulk
UpdateOwnerID sets the "owner_id" field to the value that was provided on create.
func (*FileUpsertBulk) UpdatePrimaryEntity ¶
func (u *FileUpsertBulk) UpdatePrimaryEntity() *FileUpsertBulk
UpdatePrimaryEntity sets the "primary_entity" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateProps ¶
func (u *FileUpsertBulk) UpdateProps() *FileUpsertBulk
UpdateProps sets the "props" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateSize ¶
func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk
UpdateSize sets the "size" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateStoragePolicyFiles ¶
func (u *FileUpsertBulk) UpdateStoragePolicyFiles() *FileUpsertBulk
UpdateStoragePolicyFiles sets the "storage_policy_files" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateType ¶
func (u *FileUpsertBulk) UpdateType() *FileUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateUpdatedAt ¶
func (u *FileUpsertBulk) UpdateUpdatedAt() *FileUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type FileUpsertOne ¶
type FileUpsertOne struct {
// contains filtered or unexported fields
}
FileUpsertOne is the builder for "upsert"-ing
one File node.
func (*FileUpsertOne) AddPrimaryEntity ¶
func (u *FileUpsertOne) AddPrimaryEntity(v int) *FileUpsertOne
AddPrimaryEntity adds v to the "primary_entity" field.
func (*FileUpsertOne) AddSize ¶
func (u *FileUpsertOne) AddSize(v int64) *FileUpsertOne
AddSize adds v to the "size" field.
func (*FileUpsertOne) AddType ¶
func (u *FileUpsertOne) AddType(v int) *FileUpsertOne
AddType adds v to the "type" field.
func (*FileUpsertOne) ClearFileChildren ¶
func (u *FileUpsertOne) ClearFileChildren() *FileUpsertOne
ClearFileChildren clears the value of the "file_children" field.
func (*FileUpsertOne) ClearPrimaryEntity ¶
func (u *FileUpsertOne) ClearPrimaryEntity() *FileUpsertOne
ClearPrimaryEntity clears the value of the "primary_entity" field.
func (*FileUpsertOne) ClearProps ¶
func (u *FileUpsertOne) ClearProps() *FileUpsertOne
ClearProps clears the value of the "props" field.
func (*FileUpsertOne) ClearStoragePolicyFiles ¶
func (u *FileUpsertOne) ClearStoragePolicyFiles() *FileUpsertOne
ClearStoragePolicyFiles clears the value of the "storage_policy_files" field.
func (*FileUpsertOne) DoNothing ¶
func (u *FileUpsertOne) DoNothing() *FileUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertOne) Exec ¶
func (u *FileUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertOne) ExecX ¶
func (u *FileUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertOne) ID ¶
func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FileUpsertOne) IDX ¶
func (u *FileUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*FileUpsertOne) Ignore ¶
func (u *FileUpsertOne) Ignore() *FileUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.File.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*FileUpsertOne) SetFileChildren ¶
func (u *FileUpsertOne) SetFileChildren(v int) *FileUpsertOne
SetFileChildren sets the "file_children" field.
func (*FileUpsertOne) SetIsSymbolic ¶
func (u *FileUpsertOne) SetIsSymbolic(v bool) *FileUpsertOne
SetIsSymbolic sets the "is_symbolic" field.
func (*FileUpsertOne) SetName ¶
func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
SetName sets the "name" field.
func (*FileUpsertOne) SetOwnerID ¶
func (u *FileUpsertOne) SetOwnerID(v int) *FileUpsertOne
SetOwnerID sets the "owner_id" field.
func (*FileUpsertOne) SetPrimaryEntity ¶
func (u *FileUpsertOne) SetPrimaryEntity(v int) *FileUpsertOne
SetPrimaryEntity sets the "primary_entity" field.
func (*FileUpsertOne) SetProps ¶
func (u *FileUpsertOne) SetProps(v *types.FileProps) *FileUpsertOne
SetProps sets the "props" field.
func (*FileUpsertOne) SetSize ¶
func (u *FileUpsertOne) SetSize(v int64) *FileUpsertOne
SetSize sets the "size" field.
func (*FileUpsertOne) SetStoragePolicyFiles ¶
func (u *FileUpsertOne) SetStoragePolicyFiles(v int) *FileUpsertOne
SetStoragePolicyFiles sets the "storage_policy_files" field.
func (*FileUpsertOne) SetType ¶
func (u *FileUpsertOne) SetType(v int) *FileUpsertOne
SetType sets the "type" field.
func (*FileUpsertOne) SetUpdatedAt ¶
func (u *FileUpsertOne) SetUpdatedAt(v time.Time) *FileUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*FileUpsertOne) Update ¶
func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
Update allows overriding fields `UPDATE` values. See the FileCreate.OnConflict documentation for more info.
func (*FileUpsertOne) UpdateFileChildren ¶
func (u *FileUpsertOne) UpdateFileChildren() *FileUpsertOne
UpdateFileChildren sets the "file_children" field to the value that was provided on create.
func (*FileUpsertOne) UpdateIsSymbolic ¶
func (u *FileUpsertOne) UpdateIsSymbolic() *FileUpsertOne
UpdateIsSymbolic sets the "is_symbolic" field to the value that was provided on create.
func (*FileUpsertOne) UpdateName ¶
func (u *FileUpsertOne) UpdateName() *FileUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsertOne) UpdateNewValues ¶
func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.File.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FileUpsertOne) UpdateOwnerID ¶
func (u *FileUpsertOne) UpdateOwnerID() *FileUpsertOne
UpdateOwnerID sets the "owner_id" field to the value that was provided on create.
func (*FileUpsertOne) UpdatePrimaryEntity ¶
func (u *FileUpsertOne) UpdatePrimaryEntity() *FileUpsertOne
UpdatePrimaryEntity sets the "primary_entity" field to the value that was provided on create.
func (*FileUpsertOne) UpdateProps ¶
func (u *FileUpsertOne) UpdateProps() *FileUpsertOne
UpdateProps sets the "props" field to the value that was provided on create.
func (*FileUpsertOne) UpdateSize ¶
func (u *FileUpsertOne) UpdateSize() *FileUpsertOne
UpdateSize sets the "size" field to the value that was provided on create.
func (*FileUpsertOne) UpdateStoragePolicyFiles ¶
func (u *FileUpsertOne) UpdateStoragePolicyFiles() *FileUpsertOne
UpdateStoragePolicyFiles sets the "storage_policy_files" field to the value that was provided on create.
func (*FileUpsertOne) UpdateType ¶
func (u *FileUpsertOne) UpdateType() *FileUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*FileUpsertOne) UpdateUpdatedAt ¶
func (u *FileUpsertOne) UpdateUpdatedAt() *FileUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type FsEvent ¶
type FsEvent struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Event holds the value of the "event" field.
Event string `json:"event,omitempty"`
// Subscriber holds the value of the "subscriber" field.
Subscriber uuid.UUID `json:"subscriber,omitempty"`
// UserFsevent holds the value of the "user_fsevent" field.
UserFsevent int `json:"user_fsevent,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the FsEventQuery when eager-loading is set.
Edges FsEventEdges `json:"edges"`
// contains filtered or unexported fields
}
FsEvent is the model entity for the FsEvent schema.
func (*FsEvent) ExecContext ¶
func (c *FsEvent) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEvent) QueryContext ¶
func (c *FsEvent) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FsEvent) Unwrap ¶
Unwrap unwraps the FsEvent 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 (*FsEvent) Update ¶
func (fe *FsEvent) Update() *FsEventUpdateOne
Update returns a builder for updating this FsEvent. Note that you need to call FsEvent.Unwrap() before calling this method if this FsEvent was returned from a transaction, and the transaction was committed or rolled back.
type FsEventClient ¶
type FsEventClient struct {
// contains filtered or unexported fields
}
FsEventClient is a client for the FsEvent schema.
func NewFsEventClient ¶
func NewFsEventClient(c config) *FsEventClient
NewFsEventClient returns a client for the FsEvent from the given config.
func (*FsEventClient) Create ¶
func (c *FsEventClient) Create() *FsEventCreate
Create returns a builder for creating a FsEvent entity.
func (*FsEventClient) CreateBulk ¶
func (c *FsEventClient) CreateBulk(builders ...*FsEventCreate) *FsEventCreateBulk
CreateBulk returns a builder for creating a bulk of FsEvent entities.
func (*FsEventClient) Delete ¶
func (c *FsEventClient) Delete() *FsEventDelete
Delete returns a delete builder for FsEvent.
func (*FsEventClient) DeleteOne ¶
func (c *FsEventClient) DeleteOne(fe *FsEvent) *FsEventDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FsEventClient) DeleteOneID ¶
func (c *FsEventClient) DeleteOneID(id int) *FsEventDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FsEventClient) ExecContext ¶
func (c *FsEventClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEventClient) GetX ¶
func (c *FsEventClient) GetX(ctx context.Context, id int) *FsEvent
GetX is like Get, but panics if an error occurs.
func (*FsEventClient) Hooks ¶
func (c *FsEventClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FsEventClient) Intercept ¶
func (c *FsEventClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `fsevent.Intercept(f(g(h())))`.
func (*FsEventClient) Interceptors ¶
func (c *FsEventClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FsEventClient) MapCreateBulk ¶
func (c *FsEventClient) MapCreateBulk(slice any, setFunc func(*FsEventCreate, int)) *FsEventCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FsEventClient) Query ¶
func (c *FsEventClient) Query() *FsEventQuery
Query returns a query builder for FsEvent.
func (*FsEventClient) QueryContext ¶
func (c *FsEventClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FsEventClient) QueryUser ¶
func (c *FsEventClient) QueryUser(fe *FsEvent) *UserQuery
QueryUser queries the user edge of a FsEvent.
func (*FsEventClient) Update ¶
func (c *FsEventClient) Update() *FsEventUpdate
Update returns an update builder for FsEvent.
func (*FsEventClient) UpdateOne ¶
func (c *FsEventClient) UpdateOne(fe *FsEvent) *FsEventUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FsEventClient) UpdateOneID ¶
func (c *FsEventClient) UpdateOneID(id int) *FsEventUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FsEventClient) Use ¶
func (c *FsEventClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `fsevent.Hooks(f(g(h())))`.
type FsEventCreate ¶
type FsEventCreate struct {
// contains filtered or unexported fields
}
FsEventCreate is the builder for creating a FsEvent entity.
func (*FsEventCreate) Exec ¶
func (fec *FsEventCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FsEventCreate) ExecContext ¶
func (c *FsEventCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEventCreate) ExecX ¶
func (fec *FsEventCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FsEventCreate) Mutation ¶
func (fec *FsEventCreate) Mutation() *FsEventMutation
Mutation returns the FsEventMutation object of the builder.
func (*FsEventCreate) OnConflict ¶
func (fec *FsEventCreate) OnConflict(opts ...sql.ConflictOption) *FsEventUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.FsEvent.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.FsEventUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*FsEventCreate) OnConflictColumns ¶
func (fec *FsEventCreate) OnConflictColumns(columns ...string) *FsEventUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.FsEvent.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FsEventCreate) QueryContext ¶
func (c *FsEventCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FsEventCreate) Save ¶
func (fec *FsEventCreate) Save(ctx context.Context) (*FsEvent, error)
Save creates the FsEvent in the database.
func (*FsEventCreate) SaveX ¶
func (fec *FsEventCreate) SaveX(ctx context.Context) *FsEvent
SaveX calls Save and panics if Save returns an error.
func (*FsEventCreate) SetCreatedAt ¶
func (fec *FsEventCreate) SetCreatedAt(t time.Time) *FsEventCreate
SetCreatedAt sets the "created_at" field.
func (*FsEventCreate) SetDeletedAt ¶
func (fec *FsEventCreate) SetDeletedAt(t time.Time) *FsEventCreate
SetDeletedAt sets the "deleted_at" field.
func (*FsEventCreate) SetEvent ¶
func (fec *FsEventCreate) SetEvent(s string) *FsEventCreate
SetEvent sets the "event" field.
func (*FsEventCreate) SetNillableCreatedAt ¶
func (fec *FsEventCreate) SetNillableCreatedAt(t *time.Time) *FsEventCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FsEventCreate) SetNillableDeletedAt ¶
func (fec *FsEventCreate) SetNillableDeletedAt(t *time.Time) *FsEventCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*FsEventCreate) SetNillableUpdatedAt ¶
func (fec *FsEventCreate) SetNillableUpdatedAt(t *time.Time) *FsEventCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FsEventCreate) SetNillableUserFsevent ¶
func (fec *FsEventCreate) SetNillableUserFsevent(i *int) *FsEventCreate
SetNillableUserFsevent sets the "user_fsevent" field if the given value is not nil.
func (*FsEventCreate) SetNillableUserID ¶
func (fec *FsEventCreate) SetNillableUserID(id *int) *FsEventCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*FsEventCreate) SetRawID ¶
func (m *FsEventCreate) SetRawID(t int) *FsEventCreate
func (*FsEventCreate) SetSubscriber ¶
func (fec *FsEventCreate) SetSubscriber(u uuid.UUID) *FsEventCreate
SetSubscriber sets the "subscriber" field.
func (*FsEventCreate) SetUpdatedAt ¶
func (fec *FsEventCreate) SetUpdatedAt(t time.Time) *FsEventCreate
SetUpdatedAt sets the "updated_at" field.
func (*FsEventCreate) SetUser ¶
func (fec *FsEventCreate) SetUser(u *User) *FsEventCreate
SetUser sets the "user" edge to the User entity.
func (*FsEventCreate) SetUserFsevent ¶
func (fec *FsEventCreate) SetUserFsevent(i int) *FsEventCreate
SetUserFsevent sets the "user_fsevent" field.
func (*FsEventCreate) SetUserID ¶
func (fec *FsEventCreate) SetUserID(id int) *FsEventCreate
SetUserID sets the "user" edge to the User entity by ID.
type FsEventCreateBulk ¶
type FsEventCreateBulk struct {
// contains filtered or unexported fields
}
FsEventCreateBulk is the builder for creating many FsEvent entities in bulk.
func (*FsEventCreateBulk) Exec ¶
func (fecb *FsEventCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FsEventCreateBulk) ExecContext ¶
func (c *FsEventCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEventCreateBulk) ExecX ¶
func (fecb *FsEventCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FsEventCreateBulk) OnConflict ¶
func (fecb *FsEventCreateBulk) OnConflict(opts ...sql.ConflictOption) *FsEventUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.FsEvent.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.FsEventUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*FsEventCreateBulk) OnConflictColumns ¶
func (fecb *FsEventCreateBulk) OnConflictColumns(columns ...string) *FsEventUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.FsEvent.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FsEventCreateBulk) QueryContext ¶
func (c *FsEventCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type FsEventDelete ¶
type FsEventDelete struct {
// contains filtered or unexported fields
}
FsEventDelete is the builder for deleting a FsEvent entity.
func (*FsEventDelete) Exec ¶
func (fed *FsEventDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FsEventDelete) ExecContext ¶
func (c *FsEventDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEventDelete) ExecX ¶
func (fed *FsEventDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FsEventDelete) QueryContext ¶
func (c *FsEventDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FsEventDelete) Where ¶
func (fed *FsEventDelete) Where(ps ...predicate.FsEvent) *FsEventDelete
Where appends a list predicates to the FsEventDelete builder.
type FsEventDeleteOne ¶
type FsEventDeleteOne struct {
// contains filtered or unexported fields
}
FsEventDeleteOne is the builder for deleting a single FsEvent entity.
func (*FsEventDeleteOne) Exec ¶
func (fedo *FsEventDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FsEventDeleteOne) ExecX ¶
func (fedo *FsEventDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FsEventDeleteOne) Where ¶
func (fedo *FsEventDeleteOne) Where(ps ...predicate.FsEvent) *FsEventDeleteOne
Where appends a list predicates to the FsEventDelete builder.
type FsEventEdges ¶
type FsEventEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
FsEventEdges holds the relations/edges for other nodes in the graph.
func (FsEventEdges) UserOrErr ¶
func (e FsEventEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FsEventGroupBy ¶
type FsEventGroupBy struct {
// contains filtered or unexported fields
}
FsEventGroupBy is the group-by builder for FsEvent entities.
func (*FsEventGroupBy) Aggregate ¶
func (fegb *FsEventGroupBy) Aggregate(fns ...AggregateFunc) *FsEventGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FsEventGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FsEventGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FsEventGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FsEventGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FsEventGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FsEventGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FsEventGroupBy) Scan ¶
func (fegb *FsEventGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FsEventGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FsEventMutation ¶
type FsEventMutation struct {
// contains filtered or unexported fields
}
FsEventMutation represents an operation that mutates the FsEvent nodes in the graph.
func (*FsEventMutation) AddField ¶
func (m *FsEventMutation) 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 (*FsEventMutation) AddedEdges ¶
func (m *FsEventMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FsEventMutation) AddedField ¶
func (m *FsEventMutation) 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 (*FsEventMutation) AddedFields ¶
func (m *FsEventMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FsEventMutation) AddedIDs ¶
func (m *FsEventMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FsEventMutation) ClearDeletedAt ¶
func (m *FsEventMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FsEventMutation) ClearEdge ¶
func (m *FsEventMutation) 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 (*FsEventMutation) ClearField ¶
func (m *FsEventMutation) 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 (*FsEventMutation) ClearUser ¶
func (m *FsEventMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*FsEventMutation) ClearUserFsevent ¶
func (m *FsEventMutation) ClearUserFsevent()
ClearUserFsevent clears the value of the "user_fsevent" field.
func (*FsEventMutation) ClearedEdges ¶
func (m *FsEventMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FsEventMutation) ClearedFields ¶
func (m *FsEventMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FsEventMutation) Client ¶
func (m FsEventMutation) 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 (*FsEventMutation) CreatedAt ¶
func (m *FsEventMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FsEventMutation) DeletedAt ¶
func (m *FsEventMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*FsEventMutation) DeletedAtCleared ¶
func (m *FsEventMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*FsEventMutation) EdgeCleared ¶
func (m *FsEventMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FsEventMutation) Event ¶
func (m *FsEventMutation) Event() (r string, exists bool)
Event returns the value of the "event" field in the mutation.
func (*FsEventMutation) ExecContext ¶
func (c *FsEventMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEventMutation) Field ¶
func (m *FsEventMutation) 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 (*FsEventMutation) FieldCleared ¶
func (m *FsEventMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FsEventMutation) Fields ¶
func (m *FsEventMutation) 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 (*FsEventMutation) ID ¶
func (m *FsEventMutation) 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 (*FsEventMutation) IDs ¶
func (m *FsEventMutation) 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 (*FsEventMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the FsEvent entity. If the FsEvent 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 (*FsEventMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the FsEvent entity. If the FsEvent 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 (*FsEventMutation) OldEvent ¶
func (m *FsEventMutation) OldEvent(ctx context.Context) (v string, err error)
OldEvent returns the old "event" field's value of the FsEvent entity. If the FsEvent 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 (*FsEventMutation) 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 (*FsEventMutation) OldSubscriber ¶
OldSubscriber returns the old "subscriber" field's value of the FsEvent entity. If the FsEvent 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 (*FsEventMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the FsEvent entity. If the FsEvent 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 (*FsEventMutation) OldUserFsevent ¶
func (m *FsEventMutation) OldUserFsevent(ctx context.Context) (v int, err error)
OldUserFsevent returns the old "user_fsevent" field's value of the FsEvent entity. If the FsEvent 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 (*FsEventMutation) QueryContext ¶
func (c *FsEventMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FsEventMutation) RemovedEdges ¶
func (m *FsEventMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FsEventMutation) RemovedIDs ¶
func (m *FsEventMutation) 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 (*FsEventMutation) ResetCreatedAt ¶
func (m *FsEventMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FsEventMutation) ResetDeletedAt ¶
func (m *FsEventMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*FsEventMutation) ResetEdge ¶
func (m *FsEventMutation) 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 (*FsEventMutation) ResetEvent ¶
func (m *FsEventMutation) ResetEvent()
ResetEvent resets all changes to the "event" field.
func (*FsEventMutation) ResetField ¶
func (m *FsEventMutation) 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 (*FsEventMutation) ResetSubscriber ¶
func (m *FsEventMutation) ResetSubscriber()
ResetSubscriber resets all changes to the "subscriber" field.
func (*FsEventMutation) ResetUpdatedAt ¶
func (m *FsEventMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FsEventMutation) ResetUser ¶
func (m *FsEventMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*FsEventMutation) ResetUserFsevent ¶
func (m *FsEventMutation) ResetUserFsevent()
ResetUserFsevent resets all changes to the "user_fsevent" field.
func (*FsEventMutation) SetCreatedAt ¶
func (m *FsEventMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FsEventMutation) SetDeletedAt ¶
func (m *FsEventMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*FsEventMutation) SetEvent ¶
func (m *FsEventMutation) SetEvent(s string)
SetEvent sets the "event" field.
func (*FsEventMutation) SetField ¶
func (m *FsEventMutation) 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 (*FsEventMutation) SetOp ¶
func (m *FsEventMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FsEventMutation) SetRawID ¶
func (m *FsEventMutation) SetRawID(t int)
func (*FsEventMutation) SetSubscriber ¶
func (m *FsEventMutation) SetSubscriber(u uuid.UUID)
SetSubscriber sets the "subscriber" field.
func (*FsEventMutation) SetUpdatedAt ¶
func (m *FsEventMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*FsEventMutation) SetUserFsevent ¶
func (m *FsEventMutation) SetUserFsevent(i int)
SetUserFsevent sets the "user_fsevent" field.
func (*FsEventMutation) SetUserID ¶
func (m *FsEventMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*FsEventMutation) Subscriber ¶
func (m *FsEventMutation) Subscriber() (r uuid.UUID, exists bool)
Subscriber returns the value of the "subscriber" field in the mutation.
func (FsEventMutation) Tx ¶
func (m FsEventMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FsEventMutation) Type ¶
func (m *FsEventMutation) Type() string
Type returns the node type of this mutation (FsEvent).
func (*FsEventMutation) UpdatedAt ¶
func (m *FsEventMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FsEventMutation) UserCleared ¶
func (m *FsEventMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*FsEventMutation) UserFsevent ¶
func (m *FsEventMutation) UserFsevent() (r int, exists bool)
UserFsevent returns the value of the "user_fsevent" field in the mutation.
func (*FsEventMutation) UserFseventCleared ¶
func (m *FsEventMutation) UserFseventCleared() bool
UserFseventCleared returns if the "user_fsevent" field was cleared in this mutation.
func (*FsEventMutation) UserID ¶
func (m *FsEventMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*FsEventMutation) UserIDs ¶
func (m *FsEventMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*FsEventMutation) Where ¶
func (m *FsEventMutation) Where(ps ...predicate.FsEvent)
Where appends a list predicates to the FsEventMutation builder.
func (*FsEventMutation) WhereP ¶
func (m *FsEventMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FsEventMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FsEventQuery ¶
type FsEventQuery struct {
// contains filtered or unexported fields
}
FsEventQuery is the builder for querying FsEvent entities.
func (*FsEventQuery) Aggregate ¶
func (feq *FsEventQuery) Aggregate(fns ...AggregateFunc) *FsEventSelect
Aggregate returns a FsEventSelect configured with the given aggregations.
func (*FsEventQuery) All ¶
func (feq *FsEventQuery) All(ctx context.Context) ([]*FsEvent, error)
All executes the query and returns a list of FsEvents.
func (*FsEventQuery) AllX ¶
func (feq *FsEventQuery) AllX(ctx context.Context) []*FsEvent
AllX is like All, but panics if an error occurs.
func (*FsEventQuery) Clone ¶
func (feq *FsEventQuery) Clone() *FsEventQuery
Clone returns a duplicate of the FsEventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FsEventQuery) Count ¶
func (feq *FsEventQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FsEventQuery) CountX ¶
func (feq *FsEventQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FsEventQuery) ExecContext ¶
func (c *FsEventQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEventQuery) Exist ¶
func (feq *FsEventQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FsEventQuery) ExistX ¶
func (feq *FsEventQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FsEventQuery) First ¶
func (feq *FsEventQuery) First(ctx context.Context) (*FsEvent, error)
First returns the first FsEvent entity from the query. Returns a *NotFoundError when no FsEvent was found.
func (*FsEventQuery) FirstID ¶
func (feq *FsEventQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first FsEvent ID from the query. Returns a *NotFoundError when no FsEvent ID was found.
func (*FsEventQuery) FirstIDX ¶
func (feq *FsEventQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*FsEventQuery) FirstX ¶
func (feq *FsEventQuery) FirstX(ctx context.Context) *FsEvent
FirstX is like First, but panics if an error occurs.
func (*FsEventQuery) GroupBy ¶
func (feq *FsEventQuery) GroupBy(field string, fields ...string) *FsEventGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.FsEvent.Query().
GroupBy(fsevent.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*FsEventQuery) IDs ¶
func (feq *FsEventQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of FsEvent IDs.
func (*FsEventQuery) IDsX ¶
func (feq *FsEventQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*FsEventQuery) Limit ¶
func (feq *FsEventQuery) Limit(limit int) *FsEventQuery
Limit the number of records to be returned by this query.
func (*FsEventQuery) Offset ¶
func (feq *FsEventQuery) Offset(offset int) *FsEventQuery
Offset to start from.
func (*FsEventQuery) Only ¶
func (feq *FsEventQuery) Only(ctx context.Context) (*FsEvent, error)
Only returns a single FsEvent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one FsEvent entity is found. Returns a *NotFoundError when no FsEvent entities are found.
func (*FsEventQuery) OnlyID ¶
func (feq *FsEventQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only FsEvent ID in the query. Returns a *NotSingularError when more than one FsEvent ID is found. Returns a *NotFoundError when no entities are found.
func (*FsEventQuery) OnlyIDX ¶
func (feq *FsEventQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FsEventQuery) OnlyX ¶
func (feq *FsEventQuery) OnlyX(ctx context.Context) *FsEvent
OnlyX is like Only, but panics if an error occurs.
func (*FsEventQuery) Order ¶
func (feq *FsEventQuery) Order(o ...fsevent.OrderOption) *FsEventQuery
Order specifies how the records should be ordered.
func (*FsEventQuery) QueryContext ¶
func (c *FsEventQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FsEventQuery) QueryUser ¶
func (feq *FsEventQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*FsEventQuery) Select ¶
func (feq *FsEventQuery) Select(fields ...string) *FsEventSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.FsEvent.Query().
Select(fsevent.FieldCreatedAt).
Scan(ctx, &v)
func (*FsEventQuery) Unique ¶
func (feq *FsEventQuery) Unique(unique bool) *FsEventQuery
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 (*FsEventQuery) Where ¶
func (feq *FsEventQuery) Where(ps ...predicate.FsEvent) *FsEventQuery
Where adds a new predicate for the FsEventQuery builder.
func (*FsEventQuery) WithUser ¶
func (feq *FsEventQuery) WithUser(opts ...func(*UserQuery)) *FsEventQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type FsEventSelect ¶
type FsEventSelect struct {
*FsEventQuery
// contains filtered or unexported fields
}
FsEventSelect is the builder for selecting fields of FsEvent entities.
func (*FsEventSelect) Aggregate ¶
func (fes *FsEventSelect) Aggregate(fns ...AggregateFunc) *FsEventSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FsEventSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FsEventSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (FsEventSelect) ExecContext ¶
func (c FsEventSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEventSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FsEventSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FsEventSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FsEventSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (FsEventSelect) QueryContext ¶
func (c FsEventSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FsEventSelect) Scan ¶
func (fes *FsEventSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FsEventSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FsEventUpdate ¶
type FsEventUpdate struct {
// contains filtered or unexported fields
}
FsEventUpdate is the builder for updating FsEvent entities.
func (*FsEventUpdate) ClearDeletedAt ¶
func (feu *FsEventUpdate) ClearDeletedAt() *FsEventUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FsEventUpdate) ClearUser ¶
func (feu *FsEventUpdate) ClearUser() *FsEventUpdate
ClearUser clears the "user" edge to the User entity.
func (*FsEventUpdate) ClearUserFsevent ¶
func (feu *FsEventUpdate) ClearUserFsevent() *FsEventUpdate
ClearUserFsevent clears the value of the "user_fsevent" field.
func (*FsEventUpdate) Exec ¶
func (feu *FsEventUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FsEventUpdate) ExecContext ¶
func (c *FsEventUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEventUpdate) ExecX ¶
func (feu *FsEventUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FsEventUpdate) Mutation ¶
func (feu *FsEventUpdate) Mutation() *FsEventMutation
Mutation returns the FsEventMutation object of the builder.
func (*FsEventUpdate) QueryContext ¶
func (c *FsEventUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FsEventUpdate) Save ¶
func (feu *FsEventUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FsEventUpdate) SaveX ¶
func (feu *FsEventUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FsEventUpdate) SetDeletedAt ¶
func (feu *FsEventUpdate) SetDeletedAt(t time.Time) *FsEventUpdate
SetDeletedAt sets the "deleted_at" field.
func (*FsEventUpdate) SetEvent ¶
func (feu *FsEventUpdate) SetEvent(s string) *FsEventUpdate
SetEvent sets the "event" field.
func (*FsEventUpdate) SetNillableDeletedAt ¶
func (feu *FsEventUpdate) SetNillableDeletedAt(t *time.Time) *FsEventUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*FsEventUpdate) SetNillableEvent ¶
func (feu *FsEventUpdate) SetNillableEvent(s *string) *FsEventUpdate
SetNillableEvent sets the "event" field if the given value is not nil.
func (*FsEventUpdate) SetNillableSubscriber ¶
func (feu *FsEventUpdate) SetNillableSubscriber(u *uuid.UUID) *FsEventUpdate
SetNillableSubscriber sets the "subscriber" field if the given value is not nil.
func (*FsEventUpdate) SetNillableUserFsevent ¶
func (feu *FsEventUpdate) SetNillableUserFsevent(i *int) *FsEventUpdate
SetNillableUserFsevent sets the "user_fsevent" field if the given value is not nil.
func (*FsEventUpdate) SetNillableUserID ¶
func (feu *FsEventUpdate) SetNillableUserID(id *int) *FsEventUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*FsEventUpdate) SetSubscriber ¶
func (feu *FsEventUpdate) SetSubscriber(u uuid.UUID) *FsEventUpdate
SetSubscriber sets the "subscriber" field.
func (*FsEventUpdate) SetUpdatedAt ¶
func (feu *FsEventUpdate) SetUpdatedAt(t time.Time) *FsEventUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FsEventUpdate) SetUser ¶
func (feu *FsEventUpdate) SetUser(u *User) *FsEventUpdate
SetUser sets the "user" edge to the User entity.
func (*FsEventUpdate) SetUserFsevent ¶
func (feu *FsEventUpdate) SetUserFsevent(i int) *FsEventUpdate
SetUserFsevent sets the "user_fsevent" field.
func (*FsEventUpdate) SetUserID ¶
func (feu *FsEventUpdate) SetUserID(id int) *FsEventUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*FsEventUpdate) Where ¶
func (feu *FsEventUpdate) Where(ps ...predicate.FsEvent) *FsEventUpdate
Where appends a list predicates to the FsEventUpdate builder.
type FsEventUpdateOne ¶
type FsEventUpdateOne struct {
// contains filtered or unexported fields
}
FsEventUpdateOne is the builder for updating a single FsEvent entity.
func (*FsEventUpdateOne) ClearDeletedAt ¶
func (feuo *FsEventUpdateOne) ClearDeletedAt() *FsEventUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FsEventUpdateOne) ClearUser ¶
func (feuo *FsEventUpdateOne) ClearUser() *FsEventUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*FsEventUpdateOne) ClearUserFsevent ¶
func (feuo *FsEventUpdateOne) ClearUserFsevent() *FsEventUpdateOne
ClearUserFsevent clears the value of the "user_fsevent" field.
func (*FsEventUpdateOne) Exec ¶
func (feuo *FsEventUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FsEventUpdateOne) ExecContext ¶
func (c *FsEventUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FsEventUpdateOne) ExecX ¶
func (feuo *FsEventUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FsEventUpdateOne) Mutation ¶
func (feuo *FsEventUpdateOne) Mutation() *FsEventMutation
Mutation returns the FsEventMutation object of the builder.
func (*FsEventUpdateOne) QueryContext ¶
func (c *FsEventUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FsEventUpdateOne) Save ¶
func (feuo *FsEventUpdateOne) Save(ctx context.Context) (*FsEvent, error)
Save executes the query and returns the updated FsEvent entity.
func (*FsEventUpdateOne) SaveX ¶
func (feuo *FsEventUpdateOne) SaveX(ctx context.Context) *FsEvent
SaveX is like Save, but panics if an error occurs.
func (*FsEventUpdateOne) Select ¶
func (feuo *FsEventUpdateOne) Select(field string, fields ...string) *FsEventUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FsEventUpdateOne) SetDeletedAt ¶
func (feuo *FsEventUpdateOne) SetDeletedAt(t time.Time) *FsEventUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*FsEventUpdateOne) SetEvent ¶
func (feuo *FsEventUpdateOne) SetEvent(s string) *FsEventUpdateOne
SetEvent sets the "event" field.
func (*FsEventUpdateOne) SetNillableDeletedAt ¶
func (feuo *FsEventUpdateOne) SetNillableDeletedAt(t *time.Time) *FsEventUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*FsEventUpdateOne) SetNillableEvent ¶
func (feuo *FsEventUpdateOne) SetNillableEvent(s *string) *FsEventUpdateOne
SetNillableEvent sets the "event" field if the given value is not nil.
func (*FsEventUpdateOne) SetNillableSubscriber ¶
func (feuo *FsEventUpdateOne) SetNillableSubscriber(u *uuid.UUID) *FsEventUpdateOne
SetNillableSubscriber sets the "subscriber" field if the given value is not nil.
func (*FsEventUpdateOne) SetNillableUserFsevent ¶
func (feuo *FsEventUpdateOne) SetNillableUserFsevent(i *int) *FsEventUpdateOne
SetNillableUserFsevent sets the "user_fsevent" field if the given value is not nil.
func (*FsEventUpdateOne) SetNillableUserID ¶
func (feuo *FsEventUpdateOne) SetNillableUserID(id *int) *FsEventUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*FsEventUpdateOne) SetSubscriber ¶
func (feuo *FsEventUpdateOne) SetSubscriber(u uuid.UUID) *FsEventUpdateOne
SetSubscriber sets the "subscriber" field.
func (*FsEventUpdateOne) SetUpdatedAt ¶
func (feuo *FsEventUpdateOne) SetUpdatedAt(t time.Time) *FsEventUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FsEventUpdateOne) SetUser ¶
func (feuo *FsEventUpdateOne) SetUser(u *User) *FsEventUpdateOne
SetUser sets the "user" edge to the User entity.
func (*FsEventUpdateOne) SetUserFsevent ¶
func (feuo *FsEventUpdateOne) SetUserFsevent(i int) *FsEventUpdateOne
SetUserFsevent sets the "user_fsevent" field.
func (*FsEventUpdateOne) SetUserID ¶
func (feuo *FsEventUpdateOne) SetUserID(id int) *FsEventUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*FsEventUpdateOne) Where ¶
func (feuo *FsEventUpdateOne) Where(ps ...predicate.FsEvent) *FsEventUpdateOne
Where appends a list predicates to the FsEventUpdate builder.
type FsEventUpsert ¶
FsEventUpsert is the "OnConflict" setter.
func (*FsEventUpsert) ClearDeletedAt ¶
func (u *FsEventUpsert) ClearDeletedAt() *FsEventUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FsEventUpsert) ClearUserFsevent ¶
func (u *FsEventUpsert) ClearUserFsevent() *FsEventUpsert
ClearUserFsevent clears the value of the "user_fsevent" field.
func (*FsEventUpsert) SetDeletedAt ¶
func (u *FsEventUpsert) SetDeletedAt(v time.Time) *FsEventUpsert
SetDeletedAt sets the "deleted_at" field.
func (*FsEventUpsert) SetEvent ¶
func (u *FsEventUpsert) SetEvent(v string) *FsEventUpsert
SetEvent sets the "event" field.
func (*FsEventUpsert) SetSubscriber ¶
func (u *FsEventUpsert) SetSubscriber(v uuid.UUID) *FsEventUpsert
SetSubscriber sets the "subscriber" field.
func (*FsEventUpsert) SetUpdatedAt ¶
func (u *FsEventUpsert) SetUpdatedAt(v time.Time) *FsEventUpsert
SetUpdatedAt sets the "updated_at" field.
func (*FsEventUpsert) SetUserFsevent ¶
func (u *FsEventUpsert) SetUserFsevent(v int) *FsEventUpsert
SetUserFsevent sets the "user_fsevent" field.
func (*FsEventUpsert) UpdateDeletedAt ¶
func (u *FsEventUpsert) UpdateDeletedAt() *FsEventUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*FsEventUpsert) UpdateEvent ¶
func (u *FsEventUpsert) UpdateEvent() *FsEventUpsert
UpdateEvent sets the "event" field to the value that was provided on create.
func (*FsEventUpsert) UpdateSubscriber ¶
func (u *FsEventUpsert) UpdateSubscriber() *FsEventUpsert
UpdateSubscriber sets the "subscriber" field to the value that was provided on create.
func (*FsEventUpsert) UpdateUpdatedAt ¶
func (u *FsEventUpsert) UpdateUpdatedAt() *FsEventUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FsEventUpsert) UpdateUserFsevent ¶
func (u *FsEventUpsert) UpdateUserFsevent() *FsEventUpsert
UpdateUserFsevent sets the "user_fsevent" field to the value that was provided on create.
type FsEventUpsertBulk ¶
type FsEventUpsertBulk struct {
// contains filtered or unexported fields
}
FsEventUpsertBulk is the builder for "upsert"-ing a bulk of FsEvent nodes.
func (*FsEventUpsertBulk) ClearDeletedAt ¶
func (u *FsEventUpsertBulk) ClearDeletedAt() *FsEventUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FsEventUpsertBulk) ClearUserFsevent ¶
func (u *FsEventUpsertBulk) ClearUserFsevent() *FsEventUpsertBulk
ClearUserFsevent clears the value of the "user_fsevent" field.
func (*FsEventUpsertBulk) DoNothing ¶
func (u *FsEventUpsertBulk) DoNothing() *FsEventUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FsEventUpsertBulk) Exec ¶
func (u *FsEventUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FsEventUpsertBulk) ExecX ¶
func (u *FsEventUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FsEventUpsertBulk) Ignore ¶
func (u *FsEventUpsertBulk) Ignore() *FsEventUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.FsEvent.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FsEventUpsertBulk) SetDeletedAt ¶
func (u *FsEventUpsertBulk) SetDeletedAt(v time.Time) *FsEventUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*FsEventUpsertBulk) SetEvent ¶
func (u *FsEventUpsertBulk) SetEvent(v string) *FsEventUpsertBulk
SetEvent sets the "event" field.
func (*FsEventUpsertBulk) SetSubscriber ¶
func (u *FsEventUpsertBulk) SetSubscriber(v uuid.UUID) *FsEventUpsertBulk
SetSubscriber sets the "subscriber" field.
func (*FsEventUpsertBulk) SetUpdatedAt ¶
func (u *FsEventUpsertBulk) SetUpdatedAt(v time.Time) *FsEventUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*FsEventUpsertBulk) SetUserFsevent ¶
func (u *FsEventUpsertBulk) SetUserFsevent(v int) *FsEventUpsertBulk
SetUserFsevent sets the "user_fsevent" field.
func (*FsEventUpsertBulk) Update ¶
func (u *FsEventUpsertBulk) Update(set func(*FsEventUpsert)) *FsEventUpsertBulk
Update allows overriding fields `UPDATE` values. See the FsEventCreateBulk.OnConflict documentation for more info.
func (*FsEventUpsertBulk) UpdateDeletedAt ¶
func (u *FsEventUpsertBulk) UpdateDeletedAt() *FsEventUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*FsEventUpsertBulk) UpdateEvent ¶
func (u *FsEventUpsertBulk) UpdateEvent() *FsEventUpsertBulk
UpdateEvent sets the "event" field to the value that was provided on create.
func (*FsEventUpsertBulk) UpdateNewValues ¶
func (u *FsEventUpsertBulk) UpdateNewValues() *FsEventUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.FsEvent.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FsEventUpsertBulk) UpdateSubscriber ¶
func (u *FsEventUpsertBulk) UpdateSubscriber() *FsEventUpsertBulk
UpdateSubscriber sets the "subscriber" field to the value that was provided on create.
func (*FsEventUpsertBulk) UpdateUpdatedAt ¶
func (u *FsEventUpsertBulk) UpdateUpdatedAt() *FsEventUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FsEventUpsertBulk) UpdateUserFsevent ¶
func (u *FsEventUpsertBulk) UpdateUserFsevent() *FsEventUpsertBulk
UpdateUserFsevent sets the "user_fsevent" field to the value that was provided on create.
type FsEventUpsertOne ¶
type FsEventUpsertOne struct {
// contains filtered or unexported fields
}
FsEventUpsertOne is the builder for "upsert"-ing
one FsEvent node.
func (*FsEventUpsertOne) ClearDeletedAt ¶
func (u *FsEventUpsertOne) ClearDeletedAt() *FsEventUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FsEventUpsertOne) ClearUserFsevent ¶
func (u *FsEventUpsertOne) ClearUserFsevent() *FsEventUpsertOne
ClearUserFsevent clears the value of the "user_fsevent" field.
func (*FsEventUpsertOne) DoNothing ¶
func (u *FsEventUpsertOne) DoNothing() *FsEventUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FsEventUpsertOne) Exec ¶
func (u *FsEventUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FsEventUpsertOne) ExecX ¶
func (u *FsEventUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FsEventUpsertOne) ID ¶
func (u *FsEventUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FsEventUpsertOne) IDX ¶
func (u *FsEventUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*FsEventUpsertOne) Ignore ¶
func (u *FsEventUpsertOne) Ignore() *FsEventUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.FsEvent.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*FsEventUpsertOne) SetDeletedAt ¶
func (u *FsEventUpsertOne) SetDeletedAt(v time.Time) *FsEventUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*FsEventUpsertOne) SetEvent ¶
func (u *FsEventUpsertOne) SetEvent(v string) *FsEventUpsertOne
SetEvent sets the "event" field.
func (*FsEventUpsertOne) SetSubscriber ¶
func (u *FsEventUpsertOne) SetSubscriber(v uuid.UUID) *FsEventUpsertOne
SetSubscriber sets the "subscriber" field.
func (*FsEventUpsertOne) SetUpdatedAt ¶
func (u *FsEventUpsertOne) SetUpdatedAt(v time.Time) *FsEventUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*FsEventUpsertOne) SetUserFsevent ¶
func (u *FsEventUpsertOne) SetUserFsevent(v int) *FsEventUpsertOne
SetUserFsevent sets the "user_fsevent" field.
func (*FsEventUpsertOne) Update ¶
func (u *FsEventUpsertOne) Update(set func(*FsEventUpsert)) *FsEventUpsertOne
Update allows overriding fields `UPDATE` values. See the FsEventCreate.OnConflict documentation for more info.
func (*FsEventUpsertOne) UpdateDeletedAt ¶
func (u *FsEventUpsertOne) UpdateDeletedAt() *FsEventUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*FsEventUpsertOne) UpdateEvent ¶
func (u *FsEventUpsertOne) UpdateEvent() *FsEventUpsertOne
UpdateEvent sets the "event" field to the value that was provided on create.
func (*FsEventUpsertOne) UpdateNewValues ¶
func (u *FsEventUpsertOne) UpdateNewValues() *FsEventUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.FsEvent.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FsEventUpsertOne) UpdateSubscriber ¶
func (u *FsEventUpsertOne) UpdateSubscriber() *FsEventUpsertOne
UpdateSubscriber sets the "subscriber" field to the value that was provided on create.
func (*FsEventUpsertOne) UpdateUpdatedAt ¶
func (u *FsEventUpsertOne) UpdateUpdatedAt() *FsEventUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FsEventUpsertOne) UpdateUserFsevent ¶
func (u *FsEventUpsertOne) UpdateUserFsevent() *FsEventUpsertOne
UpdateUserFsevent sets the "user_fsevent" field to the value that was provided on create.
type Group ¶
type Group struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// MaxStorage holds the value of the "max_storage" field.
MaxStorage int64 `json:"max_storage,omitempty"`
// SpeedLimit holds the value of the "speed_limit" field.
SpeedLimit int `json:"speed_limit,omitempty"`
// Permissions holds the value of the "permissions" field.
Permissions *boolset.BooleanSet `json:"permissions,omitempty"`
// Settings holds the value of the "settings" field.
Settings *types.GroupSetting `json:"settings,omitempty"`
// StoragePolicyID holds the value of the "storage_policy_id" field.
StoragePolicyID int `json:"storage_policy_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the GroupQuery when eager-loading is set.
Edges GroupEdges `json:"edges"`
// contains filtered or unexported fields
}
Group is the model entity for the Group schema.
func (*Group) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Group) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Group) QueryStoragePolicies ¶
func (gr *Group) QueryStoragePolicies() *StoragePolicyQuery
QueryStoragePolicies queries the "storage_policies" edge of the Group entity.
func (*Group) QueryUsers ¶
QueryUsers queries the "users" edge of the Group entity.
func (*Group) SetStoragePolicies ¶
func (e *Group) SetStoragePolicies(v *StoragePolicy)
SetStoragePolicies manually set the edge as loaded state.
func (*Group) Unwrap ¶
Unwrap unwraps the Group 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 (*Group) Update ¶
func (gr *Group) Update() *GroupUpdateOne
Update returns a builder for updating this Group. Note that you need to call Group.Unwrap() before calling this method if this Group was returned from a transaction, and the transaction was committed or rolled back.
type GroupClient ¶
type GroupClient struct {
// contains filtered or unexported fields
}
GroupClient is a client for the Group schema.
func NewGroupClient ¶
func NewGroupClient(c config) *GroupClient
NewGroupClient returns a client for the Group from the given config.
func (*GroupClient) Create ¶
func (c *GroupClient) Create() *GroupCreate
Create returns a builder for creating a Group entity.
func (*GroupClient) CreateBulk ¶
func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
CreateBulk returns a builder for creating a bulk of Group entities.
func (*GroupClient) Delete ¶
func (c *GroupClient) Delete() *GroupDelete
Delete returns a delete builder for Group.
func (*GroupClient) DeleteOne ¶
func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroupClient) DeleteOneID ¶
func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroupClient) ExecContext ¶
func (c *GroupClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GroupClient) GetX ¶
func (c *GroupClient) GetX(ctx context.Context, id int) *Group
GetX is like Get, but panics if an error occurs.
func (*GroupClient) Intercept ¶
func (c *GroupClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `group.Intercept(f(g(h())))`.
func (*GroupClient) Interceptors ¶
func (c *GroupClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroupClient) MapCreateBulk ¶
func (c *GroupClient) MapCreateBulk(slice any, setFunc func(*GroupCreate, int)) *GroupCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*GroupClient) Query ¶
func (c *GroupClient) Query() *GroupQuery
Query returns a query builder for Group.
func (*GroupClient) QueryContext ¶
func (c *GroupClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GroupClient) QueryStoragePolicies ¶
func (c *GroupClient) QueryStoragePolicies(gr *Group) *StoragePolicyQuery
QueryStoragePolicies queries the storage_policies edge of a Group.
func (*GroupClient) QueryUsers ¶
func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
QueryUsers queries the users edge of a Group.
func (*GroupClient) Update ¶
func (c *GroupClient) Update() *GroupUpdate
Update returns an update builder for Group.
func (*GroupClient) UpdateOne ¶
func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupClient) UpdateOneID ¶
func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupClient) Use ¶
func (c *GroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `group.Hooks(f(g(h())))`.
type GroupCreate ¶
type GroupCreate struct {
// contains filtered or unexported fields
}
GroupCreate is the builder for creating a Group entity.
func (*GroupCreate) AddUserIDs ¶
func (gc *GroupCreate) AddUserIDs(ids ...int) *GroupCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupCreate) AddUsers ¶
func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
AddUsers adds the "users" edges to the User entity.
func (*GroupCreate) Exec ¶
func (gc *GroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreate) ExecContext ¶
func (c *GroupCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GroupCreate) ExecX ¶
func (gc *GroupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupCreate) Mutation ¶
func (gc *GroupCreate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupCreate) OnConflict ¶
func (gc *GroupCreate) OnConflict(opts ...sql.ConflictOption) *GroupUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Group.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.GroupUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*GroupCreate) OnConflictColumns ¶
func (gc *GroupCreate) OnConflictColumns(columns ...string) *GroupUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GroupCreate) QueryContext ¶
func (c *GroupCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GroupCreate) Save ¶
func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
Save creates the Group in the database.
func (*GroupCreate) SaveX ¶
func (gc *GroupCreate) SaveX(ctx context.Context) *Group
SaveX calls Save and panics if Save returns an error.
func (*GroupCreate) SetCreatedAt ¶
func (gc *GroupCreate) SetCreatedAt(t time.Time) *GroupCreate
SetCreatedAt sets the "created_at" field.
func (*GroupCreate) SetDeletedAt ¶
func (gc *GroupCreate) SetDeletedAt(t time.Time) *GroupCreate
SetDeletedAt sets the "deleted_at" field.
func (*GroupCreate) SetMaxStorage ¶
func (gc *GroupCreate) SetMaxStorage(i int64) *GroupCreate
SetMaxStorage sets the "max_storage" field.
func (*GroupCreate) SetName ¶
func (gc *GroupCreate) SetName(s string) *GroupCreate
SetName sets the "name" field.
func (*GroupCreate) SetNillableCreatedAt ¶
func (gc *GroupCreate) SetNillableCreatedAt(t *time.Time) *GroupCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroupCreate) SetNillableDeletedAt ¶
func (gc *GroupCreate) SetNillableDeletedAt(t *time.Time) *GroupCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GroupCreate) SetNillableMaxStorage ¶
func (gc *GroupCreate) SetNillableMaxStorage(i *int64) *GroupCreate
SetNillableMaxStorage sets the "max_storage" field if the given value is not nil.
func (*GroupCreate) SetNillableSpeedLimit ¶
func (gc *GroupCreate) SetNillableSpeedLimit(i *int) *GroupCreate
SetNillableSpeedLimit sets the "speed_limit" field if the given value is not nil.
func (*GroupCreate) SetNillableStoragePoliciesID ¶
func (gc *GroupCreate) SetNillableStoragePoliciesID(id *int) *GroupCreate
SetNillableStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID if the given value is not nil.
func (*GroupCreate) SetNillableStoragePolicyID ¶
func (gc *GroupCreate) SetNillableStoragePolicyID(i *int) *GroupCreate
SetNillableStoragePolicyID sets the "storage_policy_id" field if the given value is not nil.
func (*GroupCreate) SetNillableUpdatedAt ¶
func (gc *GroupCreate) SetNillableUpdatedAt(t *time.Time) *GroupCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GroupCreate) SetPermissions ¶
func (gc *GroupCreate) SetPermissions(bs *boolset.BooleanSet) *GroupCreate
SetPermissions sets the "permissions" field.
func (*GroupCreate) SetRawID ¶
func (m *GroupCreate) SetRawID(t int) *GroupCreate
func (*GroupCreate) SetSettings ¶
func (gc *GroupCreate) SetSettings(ts *types.GroupSetting) *GroupCreate
SetSettings sets the "settings" field.
func (*GroupCreate) SetSpeedLimit ¶
func (gc *GroupCreate) SetSpeedLimit(i int) *GroupCreate
SetSpeedLimit sets the "speed_limit" field.
func (*GroupCreate) SetStoragePolicies ¶
func (gc *GroupCreate) SetStoragePolicies(s *StoragePolicy) *GroupCreate
SetStoragePolicies sets the "storage_policies" edge to the StoragePolicy entity.
func (*GroupCreate) SetStoragePoliciesID ¶
func (gc *GroupCreate) SetStoragePoliciesID(id int) *GroupCreate
SetStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID.
func (*GroupCreate) SetStoragePolicyID ¶
func (gc *GroupCreate) SetStoragePolicyID(i int) *GroupCreate
SetStoragePolicyID sets the "storage_policy_id" field.
func (*GroupCreate) SetUpdatedAt ¶
func (gc *GroupCreate) SetUpdatedAt(t time.Time) *GroupCreate
SetUpdatedAt sets the "updated_at" field.
type GroupCreateBulk ¶
type GroupCreateBulk struct {
// contains filtered or unexported fields
}
GroupCreateBulk is the builder for creating many Group entities in bulk.
func (*GroupCreateBulk) Exec ¶
func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreateBulk) ExecContext ¶
func (c *GroupCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GroupCreateBulk) ExecX ¶
func (gcb *GroupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupCreateBulk) OnConflict ¶
func (gcb *GroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Group.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.GroupUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*GroupCreateBulk) OnConflictColumns ¶
func (gcb *GroupCreateBulk) OnConflictColumns(columns ...string) *GroupUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GroupCreateBulk) QueryContext ¶
func (c *GroupCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type GroupDelete ¶
type GroupDelete struct {
// contains filtered or unexported fields
}
GroupDelete is the builder for deleting a Group entity.
func (*GroupDelete) Exec ¶
func (gd *GroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupDelete) ExecContext ¶
func (c *GroupDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GroupDelete) ExecX ¶
func (gd *GroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupDelete) QueryContext ¶
func (c *GroupDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GroupDelete) Where ¶
func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete
Where appends a list predicates to the GroupDelete builder.
type GroupDeleteOne ¶
type GroupDeleteOne struct {
// contains filtered or unexported fields
}
GroupDeleteOne is the builder for deleting a single Group entity.
func (*GroupDeleteOne) Exec ¶
func (gdo *GroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupDeleteOne) ExecX ¶
func (gdo *GroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupDeleteOne) Where ¶
func (gdo *GroupDeleteOne) Where(ps ...predicate.Group) *GroupDeleteOne
Where appends a list predicates to the GroupDelete builder.
type GroupEdges ¶
type GroupEdges struct {
// Users holds the value of the users edge.
Users []*User `json:"users,omitempty"`
// StoragePolicies holds the value of the storage_policies edge.
StoragePolicies *StoragePolicy `json:"storage_policies,omitempty"`
// contains filtered or unexported fields
}
GroupEdges holds the relations/edges for other nodes in the graph.
func (GroupEdges) StoragePoliciesOrErr ¶
func (e GroupEdges) StoragePoliciesOrErr() (*StoragePolicy, error)
StoragePoliciesOrErr returns the StoragePolicies value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GroupEdges) UsersOrErr ¶
func (e GroupEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type GroupGroupBy ¶
type GroupGroupBy struct {
// contains filtered or unexported fields
}
GroupGroupBy is the group-by builder for Group entities.
func (*GroupGroupBy) Aggregate ¶
func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Scan ¶
func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupMutation ¶
type GroupMutation struct {
// contains filtered or unexported fields
}
GroupMutation represents an operation that mutates the Group nodes in the graph.
func (*GroupMutation) AddField ¶
func (m *GroupMutation) 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 (*GroupMutation) AddMaxStorage ¶
func (m *GroupMutation) AddMaxStorage(i int64)
AddMaxStorage adds i to the "max_storage" field.
func (*GroupMutation) AddSpeedLimit ¶
func (m *GroupMutation) AddSpeedLimit(i int)
AddSpeedLimit adds i to the "speed_limit" field.
func (*GroupMutation) AddUserIDs ¶
func (m *GroupMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*GroupMutation) AddedEdges ¶
func (m *GroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupMutation) AddedField ¶
func (m *GroupMutation) 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 (*GroupMutation) AddedFields ¶
func (m *GroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupMutation) AddedIDs ¶
func (m *GroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupMutation) AddedMaxStorage ¶
func (m *GroupMutation) AddedMaxStorage() (r int64, exists bool)
AddedMaxStorage returns the value that was added to the "max_storage" field in this mutation.
func (*GroupMutation) AddedSpeedLimit ¶
func (m *GroupMutation) AddedSpeedLimit() (r int, exists bool)
AddedSpeedLimit returns the value that was added to the "speed_limit" field in this mutation.
func (*GroupMutation) ClearDeletedAt ¶
func (m *GroupMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*GroupMutation) ClearEdge ¶
func (m *GroupMutation) 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 (*GroupMutation) ClearField ¶
func (m *GroupMutation) 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 (*GroupMutation) ClearMaxStorage ¶
func (m *GroupMutation) ClearMaxStorage()
ClearMaxStorage clears the value of the "max_storage" field.
func (*GroupMutation) ClearSettings ¶
func (m *GroupMutation) ClearSettings()
ClearSettings clears the value of the "settings" field.
func (*GroupMutation) ClearSpeedLimit ¶
func (m *GroupMutation) ClearSpeedLimit()
ClearSpeedLimit clears the value of the "speed_limit" field.
func (*GroupMutation) ClearStoragePolicies ¶
func (m *GroupMutation) ClearStoragePolicies()
ClearStoragePolicies clears the "storage_policies" edge to the StoragePolicy entity.
func (*GroupMutation) ClearStoragePolicyID ¶
func (m *GroupMutation) ClearStoragePolicyID()
ClearStoragePolicyID clears the value of the "storage_policy_id" field.
func (*GroupMutation) ClearUsers ¶
func (m *GroupMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*GroupMutation) ClearedEdges ¶
func (m *GroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupMutation) ClearedFields ¶
func (m *GroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupMutation) Client ¶
func (m GroupMutation) 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 (*GroupMutation) CreatedAt ¶
func (m *GroupMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GroupMutation) DeletedAt ¶
func (m *GroupMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*GroupMutation) DeletedAtCleared ¶
func (m *GroupMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*GroupMutation) EdgeCleared ¶
func (m *GroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupMutation) ExecContext ¶
func (c *GroupMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GroupMutation) Field ¶
func (m *GroupMutation) 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 (*GroupMutation) FieldCleared ¶
func (m *GroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupMutation) Fields ¶
func (m *GroupMutation) 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 (*GroupMutation) ID ¶
func (m *GroupMutation) 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 (*GroupMutation) IDs ¶
func (m *GroupMutation) 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 (*GroupMutation) MaxStorage ¶
func (m *GroupMutation) MaxStorage() (r int64, exists bool)
MaxStorage returns the value of the "max_storage" field in the mutation.
func (*GroupMutation) MaxStorageCleared ¶
func (m *GroupMutation) MaxStorageCleared() bool
MaxStorageCleared returns if the "max_storage" field was cleared in this mutation.
func (*GroupMutation) Name ¶
func (m *GroupMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GroupMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Group entity. If the Group 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 (*GroupMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Group entity. If the Group 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 (*GroupMutation) 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 (*GroupMutation) OldMaxStorage ¶
func (m *GroupMutation) OldMaxStorage(ctx context.Context) (v int64, err error)
OldMaxStorage returns the old "max_storage" field's value of the Group entity. If the Group 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 (*GroupMutation) OldName ¶
func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Group entity. If the Group 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 (*GroupMutation) OldPermissions ¶
func (m *GroupMutation) OldPermissions(ctx context.Context) (v *boolset.BooleanSet, err error)
OldPermissions returns the old "permissions" field's value of the Group entity. If the Group 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 (*GroupMutation) OldSettings ¶
func (m *GroupMutation) OldSettings(ctx context.Context) (v *types.GroupSetting, err error)
OldSettings returns the old "settings" field's value of the Group entity. If the Group 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 (*GroupMutation) OldSpeedLimit ¶
func (m *GroupMutation) OldSpeedLimit(ctx context.Context) (v int, err error)
OldSpeedLimit returns the old "speed_limit" field's value of the Group entity. If the Group 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 (*GroupMutation) OldStoragePolicyID ¶
func (m *GroupMutation) OldStoragePolicyID(ctx context.Context) (v int, err error)
OldStoragePolicyID returns the old "storage_policy_id" field's value of the Group entity. If the Group 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 (*GroupMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Group entity. If the Group 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 (*GroupMutation) Permissions ¶
func (m *GroupMutation) Permissions() (r *boolset.BooleanSet, exists bool)
Permissions returns the value of the "permissions" field in the mutation.
func (*GroupMutation) QueryContext ¶
func (c *GroupMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GroupMutation) RemoveUserIDs ¶
func (m *GroupMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*GroupMutation) RemovedEdges ¶
func (m *GroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupMutation) RemovedIDs ¶
func (m *GroupMutation) 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 (*GroupMutation) RemovedUsersIDs ¶
func (m *GroupMutation) RemovedUsersIDs() (ids []int)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*GroupMutation) ResetCreatedAt ¶
func (m *GroupMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GroupMutation) ResetDeletedAt ¶
func (m *GroupMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*GroupMutation) ResetEdge ¶
func (m *GroupMutation) 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 (*GroupMutation) ResetField ¶
func (m *GroupMutation) 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 (*GroupMutation) ResetMaxStorage ¶
func (m *GroupMutation) ResetMaxStorage()
ResetMaxStorage resets all changes to the "max_storage" field.
func (*GroupMutation) ResetName ¶
func (m *GroupMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GroupMutation) ResetPermissions ¶
func (m *GroupMutation) ResetPermissions()
ResetPermissions resets all changes to the "permissions" field.
func (*GroupMutation) ResetSettings ¶
func (m *GroupMutation) ResetSettings()
ResetSettings resets all changes to the "settings" field.
func (*GroupMutation) ResetSpeedLimit ¶
func (m *GroupMutation) ResetSpeedLimit()
ResetSpeedLimit resets all changes to the "speed_limit" field.
func (*GroupMutation) ResetStoragePolicies ¶
func (m *GroupMutation) ResetStoragePolicies()
ResetStoragePolicies resets all changes to the "storage_policies" edge.
func (*GroupMutation) ResetStoragePolicyID ¶
func (m *GroupMutation) ResetStoragePolicyID()
ResetStoragePolicyID resets all changes to the "storage_policy_id" field.
func (*GroupMutation) ResetUpdatedAt ¶
func (m *GroupMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*GroupMutation) ResetUsers ¶
func (m *GroupMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*GroupMutation) SetCreatedAt ¶
func (m *GroupMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GroupMutation) SetDeletedAt ¶
func (m *GroupMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*GroupMutation) SetField ¶
func (m *GroupMutation) 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 (*GroupMutation) SetMaxStorage ¶
func (m *GroupMutation) SetMaxStorage(i int64)
SetMaxStorage sets the "max_storage" field.
func (*GroupMutation) SetName ¶
func (m *GroupMutation) SetName(s string)
SetName sets the "name" field.
func (*GroupMutation) SetOp ¶
func (m *GroupMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroupMutation) SetPermissions ¶
func (m *GroupMutation) SetPermissions(bs *boolset.BooleanSet)
SetPermissions sets the "permissions" field.
func (*GroupMutation) SetRawID ¶
func (m *GroupMutation) SetRawID(t int)
func (*GroupMutation) SetSettings ¶
func (m *GroupMutation) SetSettings(ts *types.GroupSetting)
SetSettings sets the "settings" field.
func (*GroupMutation) SetSpeedLimit ¶
func (m *GroupMutation) SetSpeedLimit(i int)
SetSpeedLimit sets the "speed_limit" field.
func (*GroupMutation) SetStoragePoliciesID ¶
func (m *GroupMutation) SetStoragePoliciesID(id int)
SetStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by id.
func (*GroupMutation) SetStoragePolicyID ¶
func (m *GroupMutation) SetStoragePolicyID(i int)
SetStoragePolicyID sets the "storage_policy_id" field.
func (*GroupMutation) SetUpdatedAt ¶
func (m *GroupMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*GroupMutation) Settings ¶
func (m *GroupMutation) Settings() (r *types.GroupSetting, exists bool)
Settings returns the value of the "settings" field in the mutation.
func (*GroupMutation) SettingsCleared ¶
func (m *GroupMutation) SettingsCleared() bool
SettingsCleared returns if the "settings" field was cleared in this mutation.
func (*GroupMutation) SpeedLimit ¶
func (m *GroupMutation) SpeedLimit() (r int, exists bool)
SpeedLimit returns the value of the "speed_limit" field in the mutation.
func (*GroupMutation) SpeedLimitCleared ¶
func (m *GroupMutation) SpeedLimitCleared() bool
SpeedLimitCleared returns if the "speed_limit" field was cleared in this mutation.
func (*GroupMutation) StoragePoliciesCleared ¶
func (m *GroupMutation) StoragePoliciesCleared() bool
StoragePoliciesCleared reports if the "storage_policies" edge to the StoragePolicy entity was cleared.
func (*GroupMutation) StoragePoliciesID ¶
func (m *GroupMutation) StoragePoliciesID() (id int, exists bool)
StoragePoliciesID returns the "storage_policies" edge ID in the mutation.
func (*GroupMutation) StoragePoliciesIDs ¶
func (m *GroupMutation) StoragePoliciesIDs() (ids []int)
StoragePoliciesIDs returns the "storage_policies" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StoragePoliciesID instead. It exists only for internal usage by the builders.
func (*GroupMutation) StoragePolicyID ¶
func (m *GroupMutation) StoragePolicyID() (r int, exists bool)
StoragePolicyID returns the value of the "storage_policy_id" field in the mutation.
func (*GroupMutation) StoragePolicyIDCleared ¶
func (m *GroupMutation) StoragePolicyIDCleared() bool
StoragePolicyIDCleared returns if the "storage_policy_id" field was cleared in this mutation.
func (GroupMutation) Tx ¶
func (m GroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupMutation) Type ¶
func (m *GroupMutation) Type() string
Type returns the node type of this mutation (Group).
func (*GroupMutation) UpdatedAt ¶
func (m *GroupMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*GroupMutation) UsersCleared ¶
func (m *GroupMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*GroupMutation) UsersIDs ¶
func (m *GroupMutation) UsersIDs() (ids []int)
UsersIDs returns the "users" edge IDs in the mutation.
func (*GroupMutation) Where ¶
func (m *GroupMutation) Where(ps ...predicate.Group)
Where appends a list predicates to the GroupMutation builder.
func (*GroupMutation) WhereP ¶
func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroupQuery ¶
type GroupQuery struct {
// contains filtered or unexported fields
}
GroupQuery is the builder for querying Group entities.
func (*GroupQuery) Aggregate ¶
func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate returns a GroupSelect configured with the given aggregations.
func (*GroupQuery) All ¶
func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
All executes the query and returns a list of Groups.
func (*GroupQuery) AllX ¶
func (gq *GroupQuery) AllX(ctx context.Context) []*Group
AllX is like All, but panics if an error occurs.
func (*GroupQuery) Clone ¶
func (gq *GroupQuery) Clone() *GroupQuery
Clone returns a duplicate of the GroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupQuery) Count ¶
func (gq *GroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupQuery) CountX ¶
func (gq *GroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupQuery) ExecContext ¶
func (c *GroupQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GroupQuery) Exist ¶
func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupQuery) ExistX ¶
func (gq *GroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupQuery) First ¶
func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
First returns the first Group entity from the query. Returns a *NotFoundError when no Group was found.
func (*GroupQuery) FirstID ¶
func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Group ID from the query. Returns a *NotFoundError when no Group ID was found.
func (*GroupQuery) FirstIDX ¶
func (gq *GroupQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupQuery) FirstX ¶
func (gq *GroupQuery) FirstX(ctx context.Context) *Group
FirstX is like First, but panics if an error occurs.
func (*GroupQuery) GroupBy ¶
func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Group.Query().
GroupBy(group.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*GroupQuery) IDs ¶
func (gq *GroupQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Group IDs.
func (*GroupQuery) IDsX ¶
func (gq *GroupQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroupQuery) Limit ¶
func (gq *GroupQuery) Limit(limit int) *GroupQuery
Limit the number of records to be returned by this query.
func (*GroupQuery) Offset ¶
func (gq *GroupQuery) Offset(offset int) *GroupQuery
Offset to start from.
func (*GroupQuery) Only ¶
func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
Only returns a single Group entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Group entity is found. Returns a *NotFoundError when no Group entities are found.
func (*GroupQuery) OnlyID ¶
func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Group ID in the query. Returns a *NotSingularError when more than one Group ID is found. Returns a *NotFoundError when no entities are found.
func (*GroupQuery) OnlyIDX ¶
func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupQuery) OnlyX ¶
func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
OnlyX is like Only, but panics if an error occurs.
func (*GroupQuery) Order ¶
func (gq *GroupQuery) Order(o ...group.OrderOption) *GroupQuery
Order specifies how the records should be ordered.
func (*GroupQuery) QueryContext ¶
func (c *GroupQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GroupQuery) QueryStoragePolicies ¶
func (gq *GroupQuery) QueryStoragePolicies() *StoragePolicyQuery
QueryStoragePolicies chains the current query on the "storage_policies" edge.
func (*GroupQuery) QueryUsers ¶
func (gq *GroupQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*GroupQuery) Select ¶
func (gq *GroupQuery) Select(fields ...string) *GroupSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Group.Query().
Select(group.FieldCreatedAt).
Scan(ctx, &v)
func (*GroupQuery) Unique ¶
func (gq *GroupQuery) Unique(unique bool) *GroupQuery
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 (*GroupQuery) Where ¶
func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
Where adds a new predicate for the GroupQuery builder.
func (*GroupQuery) WithStoragePolicies ¶
func (gq *GroupQuery) WithStoragePolicies(opts ...func(*StoragePolicyQuery)) *GroupQuery
WithStoragePolicies tells the query-builder to eager-load the nodes that are connected to the "storage_policies" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithUsers ¶
func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type GroupSelect ¶
type GroupSelect struct {
*GroupQuery
// contains filtered or unexported fields
}
GroupSelect is the builder for selecting fields of Group entities.
func (*GroupSelect) Aggregate ¶
func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroupSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (GroupSelect) ExecContext ¶
func (c GroupSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GroupSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (GroupSelect) QueryContext ¶
func (c GroupSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GroupSelect) Scan ¶
func (gs *GroupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupUpdate ¶
type GroupUpdate struct {
// contains filtered or unexported fields
}
GroupUpdate is the builder for updating Group entities.
func (*GroupUpdate) AddMaxStorage ¶
func (gu *GroupUpdate) AddMaxStorage(i int64) *GroupUpdate
AddMaxStorage adds i to the "max_storage" field.
func (*GroupUpdate) AddSpeedLimit ¶
func (gu *GroupUpdate) AddSpeedLimit(i int) *GroupUpdate
AddSpeedLimit adds i to the "speed_limit" field.
func (*GroupUpdate) AddUserIDs ¶
func (gu *GroupUpdate) AddUserIDs(ids ...int) *GroupUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdate) AddUsers ¶
func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdate) ClearDeletedAt ¶
func (gu *GroupUpdate) ClearDeletedAt() *GroupUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*GroupUpdate) ClearMaxStorage ¶
func (gu *GroupUpdate) ClearMaxStorage() *GroupUpdate
ClearMaxStorage clears the value of the "max_storage" field.
func (*GroupUpdate) ClearSettings ¶
func (gu *GroupUpdate) ClearSettings() *GroupUpdate
ClearSettings clears the value of the "settings" field.
func (*GroupUpdate) ClearSpeedLimit ¶
func (gu *GroupUpdate) ClearSpeedLimit() *GroupUpdate
ClearSpeedLimit clears the value of the "speed_limit" field.
func (*GroupUpdate) ClearStoragePolicies ¶
func (gu *GroupUpdate) ClearStoragePolicies() *GroupUpdate
ClearStoragePolicies clears the "storage_policies" edge to the StoragePolicy entity.
func (*GroupUpdate) ClearStoragePolicyID ¶
func (gu *GroupUpdate) ClearStoragePolicyID() *GroupUpdate
ClearStoragePolicyID clears the value of the "storage_policy_id" field.
func (*GroupUpdate) ClearUsers ¶
func (gu *GroupUpdate) ClearUsers() *GroupUpdate
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdate) Exec ¶
func (gu *GroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpdate) ExecContext ¶
func (c *GroupUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GroupUpdate) ExecX ¶
func (gu *GroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdate) Mutation ¶
func (gu *GroupUpdate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdate) QueryContext ¶
func (c *GroupUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GroupUpdate) RemoveUserIDs ¶
func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdate) RemoveUsers ¶
func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdate) Save ¶
func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupUpdate) SaveX ¶
func (gu *GroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdate) SetDeletedAt ¶
func (gu *GroupUpdate) SetDeletedAt(t time.Time) *GroupUpdate
SetDeletedAt sets the "deleted_at" field.
func (*GroupUpdate) SetMaxStorage ¶
func (gu *GroupUpdate) SetMaxStorage(i int64) *GroupUpdate
SetMaxStorage sets the "max_storage" field.
func (*GroupUpdate) SetName ¶
func (gu *GroupUpdate) SetName(s string) *GroupUpdate
SetName sets the "name" field.
func (*GroupUpdate) SetNillableDeletedAt ¶
func (gu *GroupUpdate) SetNillableDeletedAt(t *time.Time) *GroupUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GroupUpdate) SetNillableMaxStorage ¶
func (gu *GroupUpdate) SetNillableMaxStorage(i *int64) *GroupUpdate
SetNillableMaxStorage sets the "max_storage" field if the given value is not nil.
func (*GroupUpdate) SetNillableName ¶
func (gu *GroupUpdate) SetNillableName(s *string) *GroupUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*GroupUpdate) SetNillableSpeedLimit ¶
func (gu *GroupUpdate) SetNillableSpeedLimit(i *int) *GroupUpdate
SetNillableSpeedLimit sets the "speed_limit" field if the given value is not nil.
func (*GroupUpdate) SetNillableStoragePoliciesID ¶
func (gu *GroupUpdate) SetNillableStoragePoliciesID(id *int) *GroupUpdate
SetNillableStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID if the given value is not nil.
func (*GroupUpdate) SetNillableStoragePolicyID ¶
func (gu *GroupUpdate) SetNillableStoragePolicyID(i *int) *GroupUpdate
SetNillableStoragePolicyID sets the "storage_policy_id" field if the given value is not nil.
func (*GroupUpdate) SetPermissions ¶
func (gu *GroupUpdate) SetPermissions(bs *boolset.BooleanSet) *GroupUpdate
SetPermissions sets the "permissions" field.
func (*GroupUpdate) SetSettings ¶
func (gu *GroupUpdate) SetSettings(ts *types.GroupSetting) *GroupUpdate
SetSettings sets the "settings" field.
func (*GroupUpdate) SetSpeedLimit ¶
func (gu *GroupUpdate) SetSpeedLimit(i int) *GroupUpdate
SetSpeedLimit sets the "speed_limit" field.
func (*GroupUpdate) SetStoragePolicies ¶
func (gu *GroupUpdate) SetStoragePolicies(s *StoragePolicy) *GroupUpdate
SetStoragePolicies sets the "storage_policies" edge to the StoragePolicy entity.
func (*GroupUpdate) SetStoragePoliciesID ¶
func (gu *GroupUpdate) SetStoragePoliciesID(id int) *GroupUpdate
SetStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID.
func (*GroupUpdate) SetStoragePolicyID ¶
func (gu *GroupUpdate) SetStoragePolicyID(i int) *GroupUpdate
SetStoragePolicyID sets the "storage_policy_id" field.
func (*GroupUpdate) SetUpdatedAt ¶
func (gu *GroupUpdate) SetUpdatedAt(t time.Time) *GroupUpdate
SetUpdatedAt sets the "updated_at" field.
func (*GroupUpdate) Where ¶
func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
Where appends a list predicates to the GroupUpdate builder.
type GroupUpdateOne ¶
type GroupUpdateOne struct {
// contains filtered or unexported fields
}
GroupUpdateOne is the builder for updating a single Group entity.
func (*GroupUpdateOne) AddMaxStorage ¶
func (guo *GroupUpdateOne) AddMaxStorage(i int64) *GroupUpdateOne
AddMaxStorage adds i to the "max_storage" field.
func (*GroupUpdateOne) AddSpeedLimit ¶
func (guo *GroupUpdateOne) AddSpeedLimit(i int) *GroupUpdateOne
AddSpeedLimit adds i to the "speed_limit" field.
func (*GroupUpdateOne) AddUserIDs ¶
func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdateOne) AddUsers ¶
func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdateOne) ClearDeletedAt ¶
func (guo *GroupUpdateOne) ClearDeletedAt() *GroupUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*GroupUpdateOne) ClearMaxStorage ¶
func (guo *GroupUpdateOne) ClearMaxStorage() *GroupUpdateOne
ClearMaxStorage clears the value of the "max_storage" field.
func (*GroupUpdateOne) ClearSettings ¶
func (guo *GroupUpdateOne) ClearSettings() *GroupUpdateOne
ClearSettings clears the value of the "settings" field.
func (*GroupUpdateOne) ClearSpeedLimit ¶
func (guo *GroupUpdateOne) ClearSpeedLimit() *GroupUpdateOne
ClearSpeedLimit clears the value of the "speed_limit" field.
func (*GroupUpdateOne) ClearStoragePolicies ¶
func (guo *GroupUpdateOne) ClearStoragePolicies() *GroupUpdateOne
ClearStoragePolicies clears the "storage_policies" edge to the StoragePolicy entity.
func (*GroupUpdateOne) ClearStoragePolicyID ¶
func (guo *GroupUpdateOne) ClearStoragePolicyID() *GroupUpdateOne
ClearStoragePolicyID clears the value of the "storage_policy_id" field.
func (*GroupUpdateOne) ClearUsers ¶
func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdateOne) Exec ¶
func (guo *GroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupUpdateOne) ExecContext ¶
func (c *GroupUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GroupUpdateOne) ExecX ¶
func (guo *GroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdateOne) Mutation ¶
func (guo *GroupUpdateOne) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdateOne) QueryContext ¶
func (c *GroupUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GroupUpdateOne) RemoveUserIDs ¶
func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdateOne) RemoveUsers ¶
func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdateOne) Save ¶
func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
Save executes the query and returns the updated Group entity.
func (*GroupUpdateOne) SaveX ¶
func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdateOne) Select ¶
func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupUpdateOne) SetDeletedAt ¶
func (guo *GroupUpdateOne) SetDeletedAt(t time.Time) *GroupUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*GroupUpdateOne) SetMaxStorage ¶
func (guo *GroupUpdateOne) SetMaxStorage(i int64) *GroupUpdateOne
SetMaxStorage sets the "max_storage" field.
func (*GroupUpdateOne) SetName ¶
func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
SetName sets the "name" field.
func (*GroupUpdateOne) SetNillableDeletedAt ¶
func (guo *GroupUpdateOne) SetNillableDeletedAt(t *time.Time) *GroupUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GroupUpdateOne) SetNillableMaxStorage ¶
func (guo *GroupUpdateOne) SetNillableMaxStorage(i *int64) *GroupUpdateOne
SetNillableMaxStorage sets the "max_storage" field if the given value is not nil.
func (*GroupUpdateOne) SetNillableName ¶
func (guo *GroupUpdateOne) SetNillableName(s *string) *GroupUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*GroupUpdateOne) SetNillableSpeedLimit ¶
func (guo *GroupUpdateOne) SetNillableSpeedLimit(i *int) *GroupUpdateOne
SetNillableSpeedLimit sets the "speed_limit" field if the given value is not nil.
func (*GroupUpdateOne) SetNillableStoragePoliciesID ¶
func (guo *GroupUpdateOne) SetNillableStoragePoliciesID(id *int) *GroupUpdateOne
SetNillableStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID if the given value is not nil.
func (*GroupUpdateOne) SetNillableStoragePolicyID ¶
func (guo *GroupUpdateOne) SetNillableStoragePolicyID(i *int) *GroupUpdateOne
SetNillableStoragePolicyID sets the "storage_policy_id" field if the given value is not nil.
func (*GroupUpdateOne) SetPermissions ¶
func (guo *GroupUpdateOne) SetPermissions(bs *boolset.BooleanSet) *GroupUpdateOne
SetPermissions sets the "permissions" field.
func (*GroupUpdateOne) SetSettings ¶
func (guo *GroupUpdateOne) SetSettings(ts *types.GroupSetting) *GroupUpdateOne
SetSettings sets the "settings" field.
func (*GroupUpdateOne) SetSpeedLimit ¶
func (guo *GroupUpdateOne) SetSpeedLimit(i int) *GroupUpdateOne
SetSpeedLimit sets the "speed_limit" field.
func (*GroupUpdateOne) SetStoragePolicies ¶
func (guo *GroupUpdateOne) SetStoragePolicies(s *StoragePolicy) *GroupUpdateOne
SetStoragePolicies sets the "storage_policies" edge to the StoragePolicy entity.
func (*GroupUpdateOne) SetStoragePoliciesID ¶
func (guo *GroupUpdateOne) SetStoragePoliciesID(id int) *GroupUpdateOne
SetStoragePoliciesID sets the "storage_policies" edge to the StoragePolicy entity by ID.
func (*GroupUpdateOne) SetStoragePolicyID ¶
func (guo *GroupUpdateOne) SetStoragePolicyID(i int) *GroupUpdateOne
SetStoragePolicyID sets the "storage_policy_id" field.
func (*GroupUpdateOne) SetUpdatedAt ¶
func (guo *GroupUpdateOne) SetUpdatedAt(t time.Time) *GroupUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*GroupUpdateOne) Where ¶
func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
Where appends a list predicates to the GroupUpdate builder.
type GroupUpsert ¶
GroupUpsert is the "OnConflict" setter.
func (*GroupUpsert) AddMaxStorage ¶
func (u *GroupUpsert) AddMaxStorage(v int64) *GroupUpsert
AddMaxStorage adds v to the "max_storage" field.
func (*GroupUpsert) AddSpeedLimit ¶
func (u *GroupUpsert) AddSpeedLimit(v int) *GroupUpsert
AddSpeedLimit adds v to the "speed_limit" field.
func (*GroupUpsert) ClearDeletedAt ¶
func (u *GroupUpsert) ClearDeletedAt() *GroupUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*GroupUpsert) ClearMaxStorage ¶
func (u *GroupUpsert) ClearMaxStorage() *GroupUpsert
ClearMaxStorage clears the value of the "max_storage" field.
func (*GroupUpsert) ClearSettings ¶
func (u *GroupUpsert) ClearSettings() *GroupUpsert
ClearSettings clears the value of the "settings" field.
func (*GroupUpsert) ClearSpeedLimit ¶
func (u *GroupUpsert) ClearSpeedLimit() *GroupUpsert
ClearSpeedLimit clears the value of the "speed_limit" field.
func (*GroupUpsert) ClearStoragePolicyID ¶
func (u *GroupUpsert) ClearStoragePolicyID() *GroupUpsert
ClearStoragePolicyID clears the value of the "storage_policy_id" field.
func (*GroupUpsert) SetDeletedAt ¶
func (u *GroupUpsert) SetDeletedAt(v time.Time) *GroupUpsert
SetDeletedAt sets the "deleted_at" field.
func (*GroupUpsert) SetMaxStorage ¶
func (u *GroupUpsert) SetMaxStorage(v int64) *GroupUpsert
SetMaxStorage sets the "max_storage" field.
func (*GroupUpsert) SetName ¶
func (u *GroupUpsert) SetName(v string) *GroupUpsert
SetName sets the "name" field.
func (*GroupUpsert) SetPermissions ¶
func (u *GroupUpsert) SetPermissions(v *boolset.BooleanSet) *GroupUpsert
SetPermissions sets the "permissions" field.
func (*GroupUpsert) SetSettings ¶
func (u *GroupUpsert) SetSettings(v *types.GroupSetting) *GroupUpsert
SetSettings sets the "settings" field.
func (*GroupUpsert) SetSpeedLimit ¶
func (u *GroupUpsert) SetSpeedLimit(v int) *GroupUpsert
SetSpeedLimit sets the "speed_limit" field.
func (*GroupUpsert) SetStoragePolicyID ¶
func (u *GroupUpsert) SetStoragePolicyID(v int) *GroupUpsert
SetStoragePolicyID sets the "storage_policy_id" field.
func (*GroupUpsert) SetUpdatedAt ¶
func (u *GroupUpsert) SetUpdatedAt(v time.Time) *GroupUpsert
SetUpdatedAt sets the "updated_at" field.
func (*GroupUpsert) UpdateDeletedAt ¶
func (u *GroupUpsert) UpdateDeletedAt() *GroupUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*GroupUpsert) UpdateMaxStorage ¶
func (u *GroupUpsert) UpdateMaxStorage() *GroupUpsert
UpdateMaxStorage sets the "max_storage" field to the value that was provided on create.
func (*GroupUpsert) UpdateName ¶
func (u *GroupUpsert) UpdateName() *GroupUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*GroupUpsert) UpdatePermissions ¶
func (u *GroupUpsert) UpdatePermissions() *GroupUpsert
UpdatePermissions sets the "permissions" field to the value that was provided on create.
func (*GroupUpsert) UpdateSettings ¶
func (u *GroupUpsert) UpdateSettings() *GroupUpsert
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*GroupUpsert) UpdateSpeedLimit ¶
func (u *GroupUpsert) UpdateSpeedLimit() *GroupUpsert
UpdateSpeedLimit sets the "speed_limit" field to the value that was provided on create.
func (*GroupUpsert) UpdateStoragePolicyID ¶
func (u *GroupUpsert) UpdateStoragePolicyID() *GroupUpsert
UpdateStoragePolicyID sets the "storage_policy_id" field to the value that was provided on create.
func (*GroupUpsert) UpdateUpdatedAt ¶
func (u *GroupUpsert) UpdateUpdatedAt() *GroupUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type GroupUpsertBulk ¶
type GroupUpsertBulk struct {
// contains filtered or unexported fields
}
GroupUpsertBulk is the builder for "upsert"-ing a bulk of Group nodes.
func (*GroupUpsertBulk) AddMaxStorage ¶
func (u *GroupUpsertBulk) AddMaxStorage(v int64) *GroupUpsertBulk
AddMaxStorage adds v to the "max_storage" field.
func (*GroupUpsertBulk) AddSpeedLimit ¶
func (u *GroupUpsertBulk) AddSpeedLimit(v int) *GroupUpsertBulk
AddSpeedLimit adds v to the "speed_limit" field.
func (*GroupUpsertBulk) ClearDeletedAt ¶
func (u *GroupUpsertBulk) ClearDeletedAt() *GroupUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*GroupUpsertBulk) ClearMaxStorage ¶
func (u *GroupUpsertBulk) ClearMaxStorage() *GroupUpsertBulk
ClearMaxStorage clears the value of the "max_storage" field.
func (*GroupUpsertBulk) ClearSettings ¶
func (u *GroupUpsertBulk) ClearSettings() *GroupUpsertBulk
ClearSettings clears the value of the "settings" field.
func (*GroupUpsertBulk) ClearSpeedLimit ¶
func (u *GroupUpsertBulk) ClearSpeedLimit() *GroupUpsertBulk
ClearSpeedLimit clears the value of the "speed_limit" field.
func (*GroupUpsertBulk) ClearStoragePolicyID ¶
func (u *GroupUpsertBulk) ClearStoragePolicyID() *GroupUpsertBulk
ClearStoragePolicyID clears the value of the "storage_policy_id" field.
func (*GroupUpsertBulk) DoNothing ¶
func (u *GroupUpsertBulk) DoNothing() *GroupUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupUpsertBulk) Exec ¶
func (u *GroupUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpsertBulk) ExecX ¶
func (u *GroupUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpsertBulk) Ignore ¶
func (u *GroupUpsertBulk) Ignore() *GroupUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupUpsertBulk) SetDeletedAt ¶
func (u *GroupUpsertBulk) SetDeletedAt(v time.Time) *GroupUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*GroupUpsertBulk) SetMaxStorage ¶
func (u *GroupUpsertBulk) SetMaxStorage(v int64) *GroupUpsertBulk
SetMaxStorage sets the "max_storage" field.
func (*GroupUpsertBulk) SetName ¶
func (u *GroupUpsertBulk) SetName(v string) *GroupUpsertBulk
SetName sets the "name" field.
func (*GroupUpsertBulk) SetPermissions ¶
func (u *GroupUpsertBulk) SetPermissions(v *boolset.BooleanSet) *GroupUpsertBulk
SetPermissions sets the "permissions" field.
func (*GroupUpsertBulk) SetSettings ¶
func (u *GroupUpsertBulk) SetSettings(v *types.GroupSetting) *GroupUpsertBulk
SetSettings sets the "settings" field.
func (*GroupUpsertBulk) SetSpeedLimit ¶
func (u *GroupUpsertBulk) SetSpeedLimit(v int) *GroupUpsertBulk
SetSpeedLimit sets the "speed_limit" field.
func (*GroupUpsertBulk) SetStoragePolicyID ¶
func (u *GroupUpsertBulk) SetStoragePolicyID(v int) *GroupUpsertBulk
SetStoragePolicyID sets the "storage_policy_id" field.
func (*GroupUpsertBulk) SetUpdatedAt ¶
func (u *GroupUpsertBulk) SetUpdatedAt(v time.Time) *GroupUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*GroupUpsertBulk) Update ¶
func (u *GroupUpsertBulk) Update(set func(*GroupUpsert)) *GroupUpsertBulk
Update allows overriding fields `UPDATE` values. See the GroupCreateBulk.OnConflict documentation for more info.
func (*GroupUpsertBulk) UpdateDeletedAt ¶
func (u *GroupUpsertBulk) UpdateDeletedAt() *GroupUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateMaxStorage ¶
func (u *GroupUpsertBulk) UpdateMaxStorage() *GroupUpsertBulk
UpdateMaxStorage sets the "max_storage" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateName ¶
func (u *GroupUpsertBulk) UpdateName() *GroupUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateNewValues ¶
func (u *GroupUpsertBulk) UpdateNewValues() *GroupUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Group.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupUpsertBulk) UpdatePermissions ¶
func (u *GroupUpsertBulk) UpdatePermissions() *GroupUpsertBulk
UpdatePermissions sets the "permissions" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateSettings ¶
func (u *GroupUpsertBulk) UpdateSettings() *GroupUpsertBulk
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateSpeedLimit ¶
func (u *GroupUpsertBulk) UpdateSpeedLimit() *GroupUpsertBulk
UpdateSpeedLimit sets the "speed_limit" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateStoragePolicyID ¶
func (u *GroupUpsertBulk) UpdateStoragePolicyID() *GroupUpsertBulk
UpdateStoragePolicyID sets the "storage_policy_id" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateUpdatedAt ¶
func (u *GroupUpsertBulk) UpdateUpdatedAt() *GroupUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type GroupUpsertOne ¶
type GroupUpsertOne struct {
// contains filtered or unexported fields
}
GroupUpsertOne is the builder for "upsert"-ing
one Group node.
func (*GroupUpsertOne) AddMaxStorage ¶
func (u *GroupUpsertOne) AddMaxStorage(v int64) *GroupUpsertOne
AddMaxStorage adds v to the "max_storage" field.
func (*GroupUpsertOne) AddSpeedLimit ¶
func (u *GroupUpsertOne) AddSpeedLimit(v int) *GroupUpsertOne
AddSpeedLimit adds v to the "speed_limit" field.
func (*GroupUpsertOne) ClearDeletedAt ¶
func (u *GroupUpsertOne) ClearDeletedAt() *GroupUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*GroupUpsertOne) ClearMaxStorage ¶
func (u *GroupUpsertOne) ClearMaxStorage() *GroupUpsertOne
ClearMaxStorage clears the value of the "max_storage" field.
func (*GroupUpsertOne) ClearSettings ¶
func (u *GroupUpsertOne) ClearSettings() *GroupUpsertOne
ClearSettings clears the value of the "settings" field.
func (*GroupUpsertOne) ClearSpeedLimit ¶
func (u *GroupUpsertOne) ClearSpeedLimit() *GroupUpsertOne
ClearSpeedLimit clears the value of the "speed_limit" field.
func (*GroupUpsertOne) ClearStoragePolicyID ¶
func (u *GroupUpsertOne) ClearStoragePolicyID() *GroupUpsertOne
ClearStoragePolicyID clears the value of the "storage_policy_id" field.
func (*GroupUpsertOne) DoNothing ¶
func (u *GroupUpsertOne) DoNothing() *GroupUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupUpsertOne) Exec ¶
func (u *GroupUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpsertOne) ExecX ¶
func (u *GroupUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpsertOne) ID ¶
func (u *GroupUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GroupUpsertOne) IDX ¶
func (u *GroupUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*GroupUpsertOne) Ignore ¶
func (u *GroupUpsertOne) Ignore() *GroupUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Group.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*GroupUpsertOne) SetDeletedAt ¶
func (u *GroupUpsertOne) SetDeletedAt(v time.Time) *GroupUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*GroupUpsertOne) SetMaxStorage ¶
func (u *GroupUpsertOne) SetMaxStorage(v int64) *GroupUpsertOne
SetMaxStorage sets the "max_storage" field.
func (*GroupUpsertOne) SetName ¶
func (u *GroupUpsertOne) SetName(v string) *GroupUpsertOne
SetName sets the "name" field.
func (*GroupUpsertOne) SetPermissions ¶
func (u *GroupUpsertOne) SetPermissions(v *boolset.BooleanSet) *GroupUpsertOne
SetPermissions sets the "permissions" field.
func (*GroupUpsertOne) SetSettings ¶
func (u *GroupUpsertOne) SetSettings(v *types.GroupSetting) *GroupUpsertOne
SetSettings sets the "settings" field.
func (*GroupUpsertOne) SetSpeedLimit ¶
func (u *GroupUpsertOne) SetSpeedLimit(v int) *GroupUpsertOne
SetSpeedLimit sets the "speed_limit" field.
func (*GroupUpsertOne) SetStoragePolicyID ¶
func (u *GroupUpsertOne) SetStoragePolicyID(v int) *GroupUpsertOne
SetStoragePolicyID sets the "storage_policy_id" field.
func (*GroupUpsertOne) SetUpdatedAt ¶
func (u *GroupUpsertOne) SetUpdatedAt(v time.Time) *GroupUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*GroupUpsertOne) Update ¶
func (u *GroupUpsertOne) Update(set func(*GroupUpsert)) *GroupUpsertOne
Update allows overriding fields `UPDATE` values. See the GroupCreate.OnConflict documentation for more info.
func (*GroupUpsertOne) UpdateDeletedAt ¶
func (u *GroupUpsertOne) UpdateDeletedAt() *GroupUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateMaxStorage ¶
func (u *GroupUpsertOne) UpdateMaxStorage() *GroupUpsertOne
UpdateMaxStorage sets the "max_storage" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateName ¶
func (u *GroupUpsertOne) UpdateName() *GroupUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateNewValues ¶
func (u *GroupUpsertOne) UpdateNewValues() *GroupUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Group.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupUpsertOne) UpdatePermissions ¶
func (u *GroupUpsertOne) UpdatePermissions() *GroupUpsertOne
UpdatePermissions sets the "permissions" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateSettings ¶
func (u *GroupUpsertOne) UpdateSettings() *GroupUpsertOne
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateSpeedLimit ¶
func (u *GroupUpsertOne) UpdateSpeedLimit() *GroupUpsertOne
UpdateSpeedLimit sets the "speed_limit" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateStoragePolicyID ¶
func (u *GroupUpsertOne) UpdateStoragePolicyID() *GroupUpsertOne
UpdateStoragePolicyID sets the "storage_policy_id" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateUpdatedAt ¶
func (u *GroupUpsertOne) UpdateUpdatedAt() *GroupUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Metadata ¶
type Metadata struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Value holds the value of the "value" field.
Value string `json:"value,omitempty"`
// FileID holds the value of the "file_id" field.
FileID int `json:"file_id,omitempty"`
// IsPublic holds the value of the "is_public" field.
IsPublic bool `json:"is_public,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the MetadataQuery when eager-loading is set.
Edges MetadataEdges `json:"edges"`
// contains filtered or unexported fields
}
Metadata is the model entity for the Metadata schema.
func (*Metadata) ExecContext ¶
func (c *Metadata) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Metadata) GetValue ¶
GetValue returns the ent.Value that was dynamically selected and assigned to the Metadata. This includes values selected through modifiers, order, etc.
func (*Metadata) QueryContext ¶
func (c *Metadata) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Metadata) Unwrap ¶
Unwrap unwraps the Metadata 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 (*Metadata) Update ¶
func (m *Metadata) Update() *MetadataUpdateOne
Update returns a builder for updating this Metadata. Note that you need to call Metadata.Unwrap() before calling this method if this Metadata was returned from a transaction, and the transaction was committed or rolled back.
type MetadataClient ¶
type MetadataClient struct {
// contains filtered or unexported fields
}
MetadataClient is a client for the Metadata schema.
func NewMetadataClient ¶
func NewMetadataClient(c config) *MetadataClient
NewMetadataClient returns a client for the Metadata from the given config.
func (*MetadataClient) Create ¶
func (c *MetadataClient) Create() *MetadataCreate
Create returns a builder for creating a Metadata entity.
func (*MetadataClient) CreateBulk ¶
func (c *MetadataClient) CreateBulk(builders ...*MetadataCreate) *MetadataCreateBulk
CreateBulk returns a builder for creating a bulk of Metadata entities.
func (*MetadataClient) Delete ¶
func (c *MetadataClient) Delete() *MetadataDelete
Delete returns a delete builder for Metadata.
func (*MetadataClient) DeleteOne ¶
func (c *MetadataClient) DeleteOne(m *Metadata) *MetadataDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MetadataClient) DeleteOneID ¶
func (c *MetadataClient) DeleteOneID(id int) *MetadataDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MetadataClient) ExecContext ¶
func (c *MetadataClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataClient) GetX ¶
func (c *MetadataClient) GetX(ctx context.Context, id int) *Metadata
GetX is like Get, but panics if an error occurs.
func (*MetadataClient) Hooks ¶
func (c *MetadataClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MetadataClient) Intercept ¶
func (c *MetadataClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `metadata.Intercept(f(g(h())))`.
func (*MetadataClient) Interceptors ¶
func (c *MetadataClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MetadataClient) MapCreateBulk ¶
func (c *MetadataClient) MapCreateBulk(slice any, setFunc func(*MetadataCreate, int)) *MetadataCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*MetadataClient) Query ¶
func (c *MetadataClient) Query() *MetadataQuery
Query returns a query builder for Metadata.
func (*MetadataClient) QueryContext ¶
func (c *MetadataClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataClient) QueryFile ¶
func (c *MetadataClient) QueryFile(m *Metadata) *FileQuery
QueryFile queries the file edge of a Metadata.
func (*MetadataClient) Update ¶
func (c *MetadataClient) Update() *MetadataUpdate
Update returns an update builder for Metadata.
func (*MetadataClient) UpdateOne ¶
func (c *MetadataClient) UpdateOne(m *Metadata) *MetadataUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MetadataClient) UpdateOneID ¶
func (c *MetadataClient) UpdateOneID(id int) *MetadataUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MetadataClient) Use ¶
func (c *MetadataClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `metadata.Hooks(f(g(h())))`.
type MetadataCreate ¶
type MetadataCreate struct {
// contains filtered or unexported fields
}
MetadataCreate is the builder for creating a Metadata entity.
func (*MetadataCreate) Exec ¶
func (mc *MetadataCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataCreate) ExecContext ¶
func (c *MetadataCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataCreate) ExecX ¶
func (mc *MetadataCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataCreate) Mutation ¶
func (mc *MetadataCreate) Mutation() *MetadataMutation
Mutation returns the MetadataMutation object of the builder.
func (*MetadataCreate) OnConflict ¶
func (mc *MetadataCreate) OnConflict(opts ...sql.ConflictOption) *MetadataUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Metadata.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.MetadataUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*MetadataCreate) OnConflictColumns ¶
func (mc *MetadataCreate) OnConflictColumns(columns ...string) *MetadataUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Metadata.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MetadataCreate) QueryContext ¶
func (c *MetadataCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataCreate) Save ¶
func (mc *MetadataCreate) Save(ctx context.Context) (*Metadata, error)
Save creates the Metadata in the database.
func (*MetadataCreate) SaveX ¶
func (mc *MetadataCreate) SaveX(ctx context.Context) *Metadata
SaveX calls Save and panics if Save returns an error.
func (*MetadataCreate) SetCreatedAt ¶
func (mc *MetadataCreate) SetCreatedAt(t time.Time) *MetadataCreate
SetCreatedAt sets the "created_at" field.
func (*MetadataCreate) SetDeletedAt ¶
func (mc *MetadataCreate) SetDeletedAt(t time.Time) *MetadataCreate
SetDeletedAt sets the "deleted_at" field.
func (*MetadataCreate) SetFile ¶
func (mc *MetadataCreate) SetFile(f *File) *MetadataCreate
SetFile sets the "file" edge to the File entity.
func (*MetadataCreate) SetFileID ¶
func (mc *MetadataCreate) SetFileID(i int) *MetadataCreate
SetFileID sets the "file_id" field.
func (*MetadataCreate) SetIsPublic ¶
func (mc *MetadataCreate) SetIsPublic(b bool) *MetadataCreate
SetIsPublic sets the "is_public" field.
func (*MetadataCreate) SetName ¶
func (mc *MetadataCreate) SetName(s string) *MetadataCreate
SetName sets the "name" field.
func (*MetadataCreate) SetNillableCreatedAt ¶
func (mc *MetadataCreate) SetNillableCreatedAt(t *time.Time) *MetadataCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MetadataCreate) SetNillableDeletedAt ¶
func (mc *MetadataCreate) SetNillableDeletedAt(t *time.Time) *MetadataCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MetadataCreate) SetNillableIsPublic ¶
func (mc *MetadataCreate) SetNillableIsPublic(b *bool) *MetadataCreate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*MetadataCreate) SetNillableUpdatedAt ¶
func (mc *MetadataCreate) SetNillableUpdatedAt(t *time.Time) *MetadataCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MetadataCreate) SetRawID ¶
func (m *MetadataCreate) SetRawID(t int) *MetadataCreate
func (*MetadataCreate) SetUpdatedAt ¶
func (mc *MetadataCreate) SetUpdatedAt(t time.Time) *MetadataCreate
SetUpdatedAt sets the "updated_at" field.
func (*MetadataCreate) SetValue ¶
func (mc *MetadataCreate) SetValue(s string) *MetadataCreate
SetValue sets the "value" field.
type MetadataCreateBulk ¶
type MetadataCreateBulk struct {
// contains filtered or unexported fields
}
MetadataCreateBulk is the builder for creating many Metadata entities in bulk.
func (*MetadataCreateBulk) Exec ¶
func (mcb *MetadataCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataCreateBulk) ExecContext ¶
func (c *MetadataCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataCreateBulk) ExecX ¶
func (mcb *MetadataCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataCreateBulk) OnConflict ¶
func (mcb *MetadataCreateBulk) OnConflict(opts ...sql.ConflictOption) *MetadataUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Metadata.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.MetadataUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*MetadataCreateBulk) OnConflictColumns ¶
func (mcb *MetadataCreateBulk) OnConflictColumns(columns ...string) *MetadataUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Metadata.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MetadataCreateBulk) QueryContext ¶
func (c *MetadataCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type MetadataDelete ¶
type MetadataDelete struct {
// contains filtered or unexported fields
}
MetadataDelete is the builder for deleting a Metadata entity.
func (*MetadataDelete) Exec ¶
func (md *MetadataDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MetadataDelete) ExecContext ¶
func (c *MetadataDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataDelete) ExecX ¶
func (md *MetadataDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MetadataDelete) QueryContext ¶
func (c *MetadataDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataDelete) Where ¶
func (md *MetadataDelete) Where(ps ...predicate.Metadata) *MetadataDelete
Where appends a list predicates to the MetadataDelete builder.
type MetadataDeleteOne ¶
type MetadataDeleteOne struct {
// contains filtered or unexported fields
}
MetadataDeleteOne is the builder for deleting a single Metadata entity.
func (*MetadataDeleteOne) Exec ¶
func (mdo *MetadataDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MetadataDeleteOne) ExecX ¶
func (mdo *MetadataDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataDeleteOne) Where ¶
func (mdo *MetadataDeleteOne) Where(ps ...predicate.Metadata) *MetadataDeleteOne
Where appends a list predicates to the MetadataDelete builder.
type MetadataEdges ¶
type MetadataEdges struct {
// File holds the value of the file edge.
File *File `json:"file,omitempty"`
// contains filtered or unexported fields
}
MetadataEdges holds the relations/edges for other nodes in the graph.
func (MetadataEdges) FileOrErr ¶
func (e MetadataEdges) FileOrErr() (*File, error)
FileOrErr returns the File value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MetadataGroupBy ¶
type MetadataGroupBy struct {
// contains filtered or unexported fields
}
MetadataGroupBy is the group-by builder for Metadata entities.
func (*MetadataGroupBy) Aggregate ¶
func (mgb *MetadataGroupBy) Aggregate(fns ...AggregateFunc) *MetadataGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MetadataGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Scan ¶
func (mgb *MetadataGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MetadataGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MetadataMutation ¶
type MetadataMutation struct {
// contains filtered or unexported fields
}
MetadataMutation represents an operation that mutates the Metadata nodes in the graph.
func (*MetadataMutation) AddField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) AddedEdges ¶
func (m *MetadataMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MetadataMutation) AddedField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) AddedFields ¶
func (m *MetadataMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MetadataMutation) AddedIDs ¶
func (m *MetadataMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MetadataMutation) ClearDeletedAt ¶
func (m *MetadataMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MetadataMutation) ClearEdge ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ClearField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ClearFile ¶
func (m *MetadataMutation) ClearFile()
ClearFile clears the "file" edge to the File entity.
func (*MetadataMutation) ClearedEdges ¶
func (m *MetadataMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MetadataMutation) ClearedFields ¶
func (m *MetadataMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MetadataMutation) Client ¶
func (m MetadataMutation) 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 (*MetadataMutation) CreatedAt ¶
func (m *MetadataMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MetadataMutation) DeletedAt ¶
func (m *MetadataMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*MetadataMutation) DeletedAtCleared ¶
func (m *MetadataMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*MetadataMutation) EdgeCleared ¶
func (m *MetadataMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MetadataMutation) ExecContext ¶
func (c *MetadataMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataMutation) Field ¶
func (m *MetadataMutation) 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 (*MetadataMutation) FieldCleared ¶
func (m *MetadataMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MetadataMutation) Fields ¶
func (m *MetadataMutation) 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 (*MetadataMutation) FileCleared ¶
func (m *MetadataMutation) FileCleared() bool
FileCleared reports if the "file" edge to the File entity was cleared.
func (*MetadataMutation) FileID ¶
func (m *MetadataMutation) FileID() (r int, exists bool)
FileID returns the value of the "file_id" field in the mutation.
func (*MetadataMutation) FileIDs ¶
func (m *MetadataMutation) FileIDs() (ids []int)
FileIDs returns the "file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FileID instead. It exists only for internal usage by the builders.
func (*MetadataMutation) ID ¶
func (m *MetadataMutation) 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 (*MetadataMutation) IDs ¶
func (m *MetadataMutation) 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 (*MetadataMutation) IsPublic ¶
func (m *MetadataMutation) IsPublic() (r bool, exists bool)
IsPublic returns the value of the "is_public" field in the mutation.
func (*MetadataMutation) Name ¶
func (m *MetadataMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*MetadataMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) 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 (*MetadataMutation) OldFileID ¶
func (m *MetadataMutation) OldFileID(ctx context.Context) (v int, err error)
OldFileID returns the old "file_id" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) OldIsPublic ¶
func (m *MetadataMutation) OldIsPublic(ctx context.Context) (v bool, err error)
OldIsPublic returns the old "is_public" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) OldName ¶
func (m *MetadataMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) OldValue ¶
func (m *MetadataMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) QueryContext ¶
func (c *MetadataMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataMutation) RemovedEdges ¶
func (m *MetadataMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MetadataMutation) RemovedIDs ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ResetCreatedAt ¶
func (m *MetadataMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MetadataMutation) ResetDeletedAt ¶
func (m *MetadataMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*MetadataMutation) ResetEdge ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ResetField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ResetFile ¶
func (m *MetadataMutation) ResetFile()
ResetFile resets all changes to the "file" edge.
func (*MetadataMutation) ResetFileID ¶
func (m *MetadataMutation) ResetFileID()
ResetFileID resets all changes to the "file_id" field.
func (*MetadataMutation) ResetIsPublic ¶
func (m *MetadataMutation) ResetIsPublic()
ResetIsPublic resets all changes to the "is_public" field.
func (*MetadataMutation) ResetName ¶
func (m *MetadataMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*MetadataMutation) ResetUpdatedAt ¶
func (m *MetadataMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MetadataMutation) ResetValue ¶
func (m *MetadataMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*MetadataMutation) SetCreatedAt ¶
func (m *MetadataMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MetadataMutation) SetDeletedAt ¶
func (m *MetadataMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*MetadataMutation) SetField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) SetFileID ¶
func (m *MetadataMutation) SetFileID(i int)
SetFileID sets the "file_id" field.
func (*MetadataMutation) SetIsPublic ¶
func (m *MetadataMutation) SetIsPublic(b bool)
SetIsPublic sets the "is_public" field.
func (*MetadataMutation) SetName ¶
func (m *MetadataMutation) SetName(s string)
SetName sets the "name" field.
func (*MetadataMutation) SetOp ¶
func (m *MetadataMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MetadataMutation) SetRawID ¶
func (m *MetadataMutation) SetRawID(t int)
func (*MetadataMutation) SetUpdatedAt ¶
func (m *MetadataMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MetadataMutation) SetValue ¶
func (m *MetadataMutation) SetValue(s string)
SetValue sets the "value" field.
func (MetadataMutation) Tx ¶
func (m MetadataMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MetadataMutation) Type ¶
func (m *MetadataMutation) Type() string
Type returns the node type of this mutation (Metadata).
func (*MetadataMutation) UpdatedAt ¶
func (m *MetadataMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MetadataMutation) Value ¶
func (m *MetadataMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*MetadataMutation) Where ¶
func (m *MetadataMutation) Where(ps ...predicate.Metadata)
Where appends a list predicates to the MetadataMutation builder.
func (*MetadataMutation) WhereP ¶
func (m *MetadataMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MetadataMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MetadataQuery ¶
type MetadataQuery struct {
// contains filtered or unexported fields
}
MetadataQuery is the builder for querying Metadata entities.
func (*MetadataQuery) Aggregate ¶
func (mq *MetadataQuery) Aggregate(fns ...AggregateFunc) *MetadataSelect
Aggregate returns a MetadataSelect configured with the given aggregations.
func (*MetadataQuery) All ¶
func (mq *MetadataQuery) All(ctx context.Context) ([]*Metadata, error)
All executes the query and returns a list of MetadataSlice.
func (*MetadataQuery) AllX ¶
func (mq *MetadataQuery) AllX(ctx context.Context) []*Metadata
AllX is like All, but panics if an error occurs.
func (*MetadataQuery) Clone ¶
func (mq *MetadataQuery) Clone() *MetadataQuery
Clone returns a duplicate of the MetadataQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MetadataQuery) Count ¶
func (mq *MetadataQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MetadataQuery) CountX ¶
func (mq *MetadataQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MetadataQuery) ExecContext ¶
func (c *MetadataQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataQuery) Exist ¶
func (mq *MetadataQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MetadataQuery) ExistX ¶
func (mq *MetadataQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MetadataQuery) First ¶
func (mq *MetadataQuery) First(ctx context.Context) (*Metadata, error)
First returns the first Metadata entity from the query. Returns a *NotFoundError when no Metadata was found.
func (*MetadataQuery) FirstID ¶
func (mq *MetadataQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Metadata ID from the query. Returns a *NotFoundError when no Metadata ID was found.
func (*MetadataQuery) FirstIDX ¶
func (mq *MetadataQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MetadataQuery) FirstX ¶
func (mq *MetadataQuery) FirstX(ctx context.Context) *Metadata
FirstX is like First, but panics if an error occurs.
func (*MetadataQuery) GroupBy ¶
func (mq *MetadataQuery) GroupBy(field string, fields ...string) *MetadataGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Metadata.Query().
GroupBy(metadata.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*MetadataQuery) IDs ¶
func (mq *MetadataQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Metadata IDs.
func (*MetadataQuery) IDsX ¶
func (mq *MetadataQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MetadataQuery) Limit ¶
func (mq *MetadataQuery) Limit(limit int) *MetadataQuery
Limit the number of records to be returned by this query.
func (*MetadataQuery) Offset ¶
func (mq *MetadataQuery) Offset(offset int) *MetadataQuery
Offset to start from.
func (*MetadataQuery) Only ¶
func (mq *MetadataQuery) Only(ctx context.Context) (*Metadata, error)
Only returns a single Metadata entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Metadata entity is found. Returns a *NotFoundError when no Metadata entities are found.
func (*MetadataQuery) OnlyID ¶
func (mq *MetadataQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Metadata ID in the query. Returns a *NotSingularError when more than one Metadata ID is found. Returns a *NotFoundError when no entities are found.
func (*MetadataQuery) OnlyIDX ¶
func (mq *MetadataQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MetadataQuery) OnlyX ¶
func (mq *MetadataQuery) OnlyX(ctx context.Context) *Metadata
OnlyX is like Only, but panics if an error occurs.
func (*MetadataQuery) Order ¶
func (mq *MetadataQuery) Order(o ...metadata.OrderOption) *MetadataQuery
Order specifies how the records should be ordered.
func (*MetadataQuery) QueryContext ¶
func (c *MetadataQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataQuery) QueryFile ¶
func (mq *MetadataQuery) QueryFile() *FileQuery
QueryFile chains the current query on the "file" edge.
func (*MetadataQuery) Select ¶
func (mq *MetadataQuery) Select(fields ...string) *MetadataSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Metadata.Query().
Select(metadata.FieldCreatedAt).
Scan(ctx, &v)
func (*MetadataQuery) Unique ¶
func (mq *MetadataQuery) Unique(unique bool) *MetadataQuery
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 (*MetadataQuery) Where ¶
func (mq *MetadataQuery) Where(ps ...predicate.Metadata) *MetadataQuery
Where adds a new predicate for the MetadataQuery builder.
func (*MetadataQuery) WithFile ¶
func (mq *MetadataQuery) WithFile(opts ...func(*FileQuery)) *MetadataQuery
WithFile tells the query-builder to eager-load the nodes that are connected to the "file" edge. The optional arguments are used to configure the query builder of the edge.
type MetadataSelect ¶
type MetadataSelect struct {
*MetadataQuery
// contains filtered or unexported fields
}
MetadataSelect is the builder for selecting fields of Metadata entities.
func (*MetadataSelect) Aggregate ¶
func (ms *MetadataSelect) Aggregate(fns ...AggregateFunc) *MetadataSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MetadataSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (MetadataSelect) ExecContext ¶
func (c MetadataSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (MetadataSelect) QueryContext ¶
func (c MetadataSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataSelect) Scan ¶
func (ms *MetadataSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MetadataSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MetadataUpdate ¶
type MetadataUpdate struct {
// contains filtered or unexported fields
}
MetadataUpdate is the builder for updating Metadata entities.
func (*MetadataUpdate) ClearDeletedAt ¶
func (mu *MetadataUpdate) ClearDeletedAt() *MetadataUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MetadataUpdate) ClearFile ¶
func (mu *MetadataUpdate) ClearFile() *MetadataUpdate
ClearFile clears the "file" edge to the File entity.
func (*MetadataUpdate) Exec ¶
func (mu *MetadataUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataUpdate) ExecContext ¶
func (c *MetadataUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataUpdate) ExecX ¶
func (mu *MetadataUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataUpdate) Mutation ¶
func (mu *MetadataUpdate) Mutation() *MetadataMutation
Mutation returns the MetadataMutation object of the builder.
func (*MetadataUpdate) QueryContext ¶
func (c *MetadataUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataUpdate) Save ¶
func (mu *MetadataUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MetadataUpdate) SaveX ¶
func (mu *MetadataUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MetadataUpdate) SetDeletedAt ¶
func (mu *MetadataUpdate) SetDeletedAt(t time.Time) *MetadataUpdate
SetDeletedAt sets the "deleted_at" field.
func (*MetadataUpdate) SetFile ¶
func (mu *MetadataUpdate) SetFile(f *File) *MetadataUpdate
SetFile sets the "file" edge to the File entity.
func (*MetadataUpdate) SetFileID ¶
func (mu *MetadataUpdate) SetFileID(i int) *MetadataUpdate
SetFileID sets the "file_id" field.
func (*MetadataUpdate) SetIsPublic ¶
func (mu *MetadataUpdate) SetIsPublic(b bool) *MetadataUpdate
SetIsPublic sets the "is_public" field.
func (*MetadataUpdate) SetName ¶
func (mu *MetadataUpdate) SetName(s string) *MetadataUpdate
SetName sets the "name" field.
func (*MetadataUpdate) SetNillableDeletedAt ¶
func (mu *MetadataUpdate) SetNillableDeletedAt(t *time.Time) *MetadataUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MetadataUpdate) SetNillableFileID ¶
func (mu *MetadataUpdate) SetNillableFileID(i *int) *MetadataUpdate
SetNillableFileID sets the "file_id" field if the given value is not nil.
func (*MetadataUpdate) SetNillableIsPublic ¶
func (mu *MetadataUpdate) SetNillableIsPublic(b *bool) *MetadataUpdate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*MetadataUpdate) SetNillableName ¶
func (mu *MetadataUpdate) SetNillableName(s *string) *MetadataUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*MetadataUpdate) SetNillableValue ¶
func (mu *MetadataUpdate) SetNillableValue(s *string) *MetadataUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*MetadataUpdate) SetUpdatedAt ¶
func (mu *MetadataUpdate) SetUpdatedAt(t time.Time) *MetadataUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MetadataUpdate) SetValue ¶
func (mu *MetadataUpdate) SetValue(s string) *MetadataUpdate
SetValue sets the "value" field.
func (*MetadataUpdate) Where ¶
func (mu *MetadataUpdate) Where(ps ...predicate.Metadata) *MetadataUpdate
Where appends a list predicates to the MetadataUpdate builder.
type MetadataUpdateOne ¶
type MetadataUpdateOne struct {
// contains filtered or unexported fields
}
MetadataUpdateOne is the builder for updating a single Metadata entity.
func (*MetadataUpdateOne) ClearDeletedAt ¶
func (muo *MetadataUpdateOne) ClearDeletedAt() *MetadataUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MetadataUpdateOne) ClearFile ¶
func (muo *MetadataUpdateOne) ClearFile() *MetadataUpdateOne
ClearFile clears the "file" edge to the File entity.
func (*MetadataUpdateOne) Exec ¶
func (muo *MetadataUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MetadataUpdateOne) ExecContext ¶
func (c *MetadataUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataUpdateOne) ExecX ¶
func (muo *MetadataUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataUpdateOne) Mutation ¶
func (muo *MetadataUpdateOne) Mutation() *MetadataMutation
Mutation returns the MetadataMutation object of the builder.
func (*MetadataUpdateOne) QueryContext ¶
func (c *MetadataUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataUpdateOne) Save ¶
func (muo *MetadataUpdateOne) Save(ctx context.Context) (*Metadata, error)
Save executes the query and returns the updated Metadata entity.
func (*MetadataUpdateOne) SaveX ¶
func (muo *MetadataUpdateOne) SaveX(ctx context.Context) *Metadata
SaveX is like Save, but panics if an error occurs.
func (*MetadataUpdateOne) Select ¶
func (muo *MetadataUpdateOne) Select(field string, fields ...string) *MetadataUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MetadataUpdateOne) SetDeletedAt ¶
func (muo *MetadataUpdateOne) SetDeletedAt(t time.Time) *MetadataUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*MetadataUpdateOne) SetFile ¶
func (muo *MetadataUpdateOne) SetFile(f *File) *MetadataUpdateOne
SetFile sets the "file" edge to the File entity.
func (*MetadataUpdateOne) SetFileID ¶
func (muo *MetadataUpdateOne) SetFileID(i int) *MetadataUpdateOne
SetFileID sets the "file_id" field.
func (*MetadataUpdateOne) SetIsPublic ¶
func (muo *MetadataUpdateOne) SetIsPublic(b bool) *MetadataUpdateOne
SetIsPublic sets the "is_public" field.
func (*MetadataUpdateOne) SetName ¶
func (muo *MetadataUpdateOne) SetName(s string) *MetadataUpdateOne
SetName sets the "name" field.
func (*MetadataUpdateOne) SetNillableDeletedAt ¶
func (muo *MetadataUpdateOne) SetNillableDeletedAt(t *time.Time) *MetadataUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MetadataUpdateOne) SetNillableFileID ¶
func (muo *MetadataUpdateOne) SetNillableFileID(i *int) *MetadataUpdateOne
SetNillableFileID sets the "file_id" field if the given value is not nil.
func (*MetadataUpdateOne) SetNillableIsPublic ¶
func (muo *MetadataUpdateOne) SetNillableIsPublic(b *bool) *MetadataUpdateOne
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*MetadataUpdateOne) SetNillableName ¶
func (muo *MetadataUpdateOne) SetNillableName(s *string) *MetadataUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*MetadataUpdateOne) SetNillableValue ¶
func (muo *MetadataUpdateOne) SetNillableValue(s *string) *MetadataUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*MetadataUpdateOne) SetUpdatedAt ¶
func (muo *MetadataUpdateOne) SetUpdatedAt(t time.Time) *MetadataUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MetadataUpdateOne) SetValue ¶
func (muo *MetadataUpdateOne) SetValue(s string) *MetadataUpdateOne
SetValue sets the "value" field.
func (*MetadataUpdateOne) Where ¶
func (muo *MetadataUpdateOne) Where(ps ...predicate.Metadata) *MetadataUpdateOne
Where appends a list predicates to the MetadataUpdate builder.
type MetadataUpsert ¶
MetadataUpsert is the "OnConflict" setter.
func (*MetadataUpsert) ClearDeletedAt ¶
func (u *MetadataUpsert) ClearDeletedAt() *MetadataUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MetadataUpsert) SetDeletedAt ¶
func (u *MetadataUpsert) SetDeletedAt(v time.Time) *MetadataUpsert
SetDeletedAt sets the "deleted_at" field.
func (*MetadataUpsert) SetFileID ¶
func (u *MetadataUpsert) SetFileID(v int) *MetadataUpsert
SetFileID sets the "file_id" field.
func (*MetadataUpsert) SetIsPublic ¶
func (u *MetadataUpsert) SetIsPublic(v bool) *MetadataUpsert
SetIsPublic sets the "is_public" field.
func (*MetadataUpsert) SetName ¶
func (u *MetadataUpsert) SetName(v string) *MetadataUpsert
SetName sets the "name" field.
func (*MetadataUpsert) SetUpdatedAt ¶
func (u *MetadataUpsert) SetUpdatedAt(v time.Time) *MetadataUpsert
SetUpdatedAt sets the "updated_at" field.
func (*MetadataUpsert) SetValue ¶
func (u *MetadataUpsert) SetValue(v string) *MetadataUpsert
SetValue sets the "value" field.
func (*MetadataUpsert) UpdateDeletedAt ¶
func (u *MetadataUpsert) UpdateDeletedAt() *MetadataUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*MetadataUpsert) UpdateFileID ¶
func (u *MetadataUpsert) UpdateFileID() *MetadataUpsert
UpdateFileID sets the "file_id" field to the value that was provided on create.
func (*MetadataUpsert) UpdateIsPublic ¶
func (u *MetadataUpsert) UpdateIsPublic() *MetadataUpsert
UpdateIsPublic sets the "is_public" field to the value that was provided on create.
func (*MetadataUpsert) UpdateName ¶
func (u *MetadataUpsert) UpdateName() *MetadataUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*MetadataUpsert) UpdateUpdatedAt ¶
func (u *MetadataUpsert) UpdateUpdatedAt() *MetadataUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*MetadataUpsert) UpdateValue ¶
func (u *MetadataUpsert) UpdateValue() *MetadataUpsert
UpdateValue sets the "value" field to the value that was provided on create.
type MetadataUpsertBulk ¶
type MetadataUpsertBulk struct {
// contains filtered or unexported fields
}
MetadataUpsertBulk is the builder for "upsert"-ing a bulk of Metadata nodes.
func (*MetadataUpsertBulk) ClearDeletedAt ¶
func (u *MetadataUpsertBulk) ClearDeletedAt() *MetadataUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MetadataUpsertBulk) DoNothing ¶
func (u *MetadataUpsertBulk) DoNothing() *MetadataUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MetadataUpsertBulk) Exec ¶
func (u *MetadataUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataUpsertBulk) ExecX ¶
func (u *MetadataUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataUpsertBulk) Ignore ¶
func (u *MetadataUpsertBulk) Ignore() *MetadataUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Metadata.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MetadataUpsertBulk) SetDeletedAt ¶
func (u *MetadataUpsertBulk) SetDeletedAt(v time.Time) *MetadataUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*MetadataUpsertBulk) SetFileID ¶
func (u *MetadataUpsertBulk) SetFileID(v int) *MetadataUpsertBulk
SetFileID sets the "file_id" field.
func (*MetadataUpsertBulk) SetIsPublic ¶
func (u *MetadataUpsertBulk) SetIsPublic(v bool) *MetadataUpsertBulk
SetIsPublic sets the "is_public" field.
func (*MetadataUpsertBulk) SetName ¶
func (u *MetadataUpsertBulk) SetName(v string) *MetadataUpsertBulk
SetName sets the "name" field.
func (*MetadataUpsertBulk) SetUpdatedAt ¶
func (u *MetadataUpsertBulk) SetUpdatedAt(v time.Time) *MetadataUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*MetadataUpsertBulk) SetValue ¶
func (u *MetadataUpsertBulk) SetValue(v string) *MetadataUpsertBulk
SetValue sets the "value" field.
func (*MetadataUpsertBulk) Update ¶
func (u *MetadataUpsertBulk) Update(set func(*MetadataUpsert)) *MetadataUpsertBulk
Update allows overriding fields `UPDATE` values. See the MetadataCreateBulk.OnConflict documentation for more info.
func (*MetadataUpsertBulk) UpdateDeletedAt ¶
func (u *MetadataUpsertBulk) UpdateDeletedAt() *MetadataUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*MetadataUpsertBulk) UpdateFileID ¶
func (u *MetadataUpsertBulk) UpdateFileID() *MetadataUpsertBulk
UpdateFileID sets the "file_id" field to the value that was provided on create.
func (*MetadataUpsertBulk) UpdateIsPublic ¶
func (u *MetadataUpsertBulk) UpdateIsPublic() *MetadataUpsertBulk
UpdateIsPublic sets the "is_public" field to the value that was provided on create.
func (*MetadataUpsertBulk) UpdateName ¶
func (u *MetadataUpsertBulk) UpdateName() *MetadataUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*MetadataUpsertBulk) UpdateNewValues ¶
func (u *MetadataUpsertBulk) UpdateNewValues() *MetadataUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Metadata.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*MetadataUpsertBulk) UpdateUpdatedAt ¶
func (u *MetadataUpsertBulk) UpdateUpdatedAt() *MetadataUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*MetadataUpsertBulk) UpdateValue ¶
func (u *MetadataUpsertBulk) UpdateValue() *MetadataUpsertBulk
UpdateValue sets the "value" field to the value that was provided on create.
type MetadataUpsertOne ¶
type MetadataUpsertOne struct {
// contains filtered or unexported fields
}
MetadataUpsertOne is the builder for "upsert"-ing
one Metadata node.
func (*MetadataUpsertOne) ClearDeletedAt ¶
func (u *MetadataUpsertOne) ClearDeletedAt() *MetadataUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MetadataUpsertOne) DoNothing ¶
func (u *MetadataUpsertOne) DoNothing() *MetadataUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MetadataUpsertOne) Exec ¶
func (u *MetadataUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataUpsertOne) ExecX ¶
func (u *MetadataUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataUpsertOne) ID ¶
func (u *MetadataUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*MetadataUpsertOne) IDX ¶
func (u *MetadataUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*MetadataUpsertOne) Ignore ¶
func (u *MetadataUpsertOne) Ignore() *MetadataUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Metadata.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*MetadataUpsertOne) SetDeletedAt ¶
func (u *MetadataUpsertOne) SetDeletedAt(v time.Time) *MetadataUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*MetadataUpsertOne) SetFileID ¶
func (u *MetadataUpsertOne) SetFileID(v int) *MetadataUpsertOne
SetFileID sets the "file_id" field.
func (*MetadataUpsertOne) SetIsPublic ¶
func (u *MetadataUpsertOne) SetIsPublic(v bool) *MetadataUpsertOne
SetIsPublic sets the "is_public" field.
func (*MetadataUpsertOne) SetName ¶
func (u *MetadataUpsertOne) SetName(v string) *MetadataUpsertOne
SetName sets the "name" field.
func (*MetadataUpsertOne) SetUpdatedAt ¶
func (u *MetadataUpsertOne) SetUpdatedAt(v time.Time) *MetadataUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*MetadataUpsertOne) SetValue ¶
func (u *MetadataUpsertOne) SetValue(v string) *MetadataUpsertOne
SetValue sets the "value" field.
func (*MetadataUpsertOne) Update ¶
func (u *MetadataUpsertOne) Update(set func(*MetadataUpsert)) *MetadataUpsertOne
Update allows overriding fields `UPDATE` values. See the MetadataCreate.OnConflict documentation for more info.
func (*MetadataUpsertOne) UpdateDeletedAt ¶
func (u *MetadataUpsertOne) UpdateDeletedAt() *MetadataUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*MetadataUpsertOne) UpdateFileID ¶
func (u *MetadataUpsertOne) UpdateFileID() *MetadataUpsertOne
UpdateFileID sets the "file_id" field to the value that was provided on create.
func (*MetadataUpsertOne) UpdateIsPublic ¶
func (u *MetadataUpsertOne) UpdateIsPublic() *MetadataUpsertOne
UpdateIsPublic sets the "is_public" field to the value that was provided on create.
func (*MetadataUpsertOne) UpdateName ¶
func (u *MetadataUpsertOne) UpdateName() *MetadataUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*MetadataUpsertOne) UpdateNewValues ¶
func (u *MetadataUpsertOne) UpdateNewValues() *MetadataUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Metadata.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*MetadataUpsertOne) UpdateUpdatedAt ¶
func (u *MetadataUpsertOne) UpdateUpdatedAt() *MetadataUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*MetadataUpsertOne) UpdateValue ¶
func (u *MetadataUpsertOne) UpdateValue() *MetadataUpsertOne
UpdateValue sets the "value" field to the value that was provided on create.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Node ¶
type Node struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Status holds the value of the "status" field.
Status node.Status `json:"status,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Type holds the value of the "type" field.
Type node.Type `json:"type,omitempty"`
// Server holds the value of the "server" field.
Server string `json:"server,omitempty"`
// SlaveKey holds the value of the "slave_key" field.
SlaveKey string `json:"slave_key,omitempty"`
// Capabilities holds the value of the "capabilities" field.
Capabilities *boolset.BooleanSet `json:"capabilities,omitempty"`
// Settings holds the value of the "settings" field.
Settings *types.NodeSetting `json:"settings,omitempty"`
// Weight holds the value of the "weight" field.
Weight int `json:"weight,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the NodeQuery when eager-loading is set.
Edges NodeEdges `json:"edges"`
// contains filtered or unexported fields
}
Node is the model entity for the Node schema.
func (*Node) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Node) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Node) QueryStoragePolicy ¶
func (n *Node) QueryStoragePolicy() *StoragePolicyQuery
QueryStoragePolicy queries the "storage_policy" edge of the Node entity.
func (*Node) SetStoragePolicy ¶
func (e *Node) SetStoragePolicy(v []*StoragePolicy)
SetStoragePolicy manually set the edge as loaded state.
func (*Node) Unwrap ¶
Unwrap unwraps the Node 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 (*Node) Update ¶
func (n *Node) Update() *NodeUpdateOne
Update returns a builder for updating this Node. Note that you need to call Node.Unwrap() before calling this method if this Node was returned from a transaction, and the transaction was committed or rolled back.
type NodeClient ¶
type NodeClient struct {
// contains filtered or unexported fields
}
NodeClient is a client for the Node schema.
func NewNodeClient ¶
func NewNodeClient(c config) *NodeClient
NewNodeClient returns a client for the Node from the given config.
func (*NodeClient) Create ¶
func (c *NodeClient) Create() *NodeCreate
Create returns a builder for creating a Node entity.
func (*NodeClient) CreateBulk ¶
func (c *NodeClient) CreateBulk(builders ...*NodeCreate) *NodeCreateBulk
CreateBulk returns a builder for creating a bulk of Node entities.
func (*NodeClient) Delete ¶
func (c *NodeClient) Delete() *NodeDelete
Delete returns a delete builder for Node.
func (*NodeClient) DeleteOne ¶
func (c *NodeClient) DeleteOne(n *Node) *NodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NodeClient) DeleteOneID ¶
func (c *NodeClient) DeleteOneID(id int) *NodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NodeClient) ExecContext ¶
func (c *NodeClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*NodeClient) GetX ¶
func (c *NodeClient) GetX(ctx context.Context, id int) *Node
GetX is like Get, but panics if an error occurs.
func (*NodeClient) Intercept ¶
func (c *NodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `node.Intercept(f(g(h())))`.
func (*NodeClient) Interceptors ¶
func (c *NodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NodeClient) MapCreateBulk ¶
func (c *NodeClient) MapCreateBulk(slice any, setFunc func(*NodeCreate, int)) *NodeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*NodeClient) Query ¶
func (c *NodeClient) Query() *NodeQuery
Query returns a query builder for Node.
func (*NodeClient) QueryContext ¶
func (c *NodeClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*NodeClient) QueryStoragePolicy ¶
func (c *NodeClient) QueryStoragePolicy(n *Node) *StoragePolicyQuery
QueryStoragePolicy queries the storage_policy edge of a Node.
func (*NodeClient) Update ¶
func (c *NodeClient) Update() *NodeUpdate
Update returns an update builder for Node.
func (*NodeClient) UpdateOne ¶
func (c *NodeClient) UpdateOne(n *Node) *NodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NodeClient) UpdateOneID ¶
func (c *NodeClient) UpdateOneID(id int) *NodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NodeClient) Use ¶
func (c *NodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `node.Hooks(f(g(h())))`.
type NodeCreate ¶
type NodeCreate struct {
// contains filtered or unexported fields
}
NodeCreate is the builder for creating a Node entity.
func (*NodeCreate) AddStoragePolicy ¶
func (nc *NodeCreate) AddStoragePolicy(s ...*StoragePolicy) *NodeCreate
AddStoragePolicy adds the "storage_policy" edges to the StoragePolicy entity.
func (*NodeCreate) AddStoragePolicyIDs ¶
func (nc *NodeCreate) AddStoragePolicyIDs(ids ...int) *NodeCreate
AddStoragePolicyIDs adds the "storage_policy" edge to the StoragePolicy entity by IDs.
func (*NodeCreate) Exec ¶
func (nc *NodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeCreate) ExecContext ¶
func (c *NodeCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*NodeCreate) ExecX ¶
func (nc *NodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeCreate) Mutation ¶
func (nc *NodeCreate) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeCreate) OnConflict ¶
func (nc *NodeCreate) OnConflict(opts ...sql.ConflictOption) *NodeUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Node.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.NodeUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*NodeCreate) OnConflictColumns ¶
func (nc *NodeCreate) OnConflictColumns(columns ...string) *NodeUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Node.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*NodeCreate) QueryContext ¶
func (c *NodeCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*NodeCreate) Save ¶
func (nc *NodeCreate) Save(ctx context.Context) (*Node, error)
Save creates the Node in the database.
func (*NodeCreate) SaveX ¶
func (nc *NodeCreate) SaveX(ctx context.Context) *Node
SaveX calls Save and panics if Save returns an error.
func (*NodeCreate) SetCapabilities ¶
func (nc *NodeCreate) SetCapabilities(bs *boolset.BooleanSet) *NodeCreate
SetCapabilities sets the "capabilities" field.
func (*NodeCreate) SetCreatedAt ¶
func (nc *NodeCreate) SetCreatedAt(t time.Time) *NodeCreate
SetCreatedAt sets the "created_at" field.
func (*NodeCreate) SetDeletedAt ¶
func (nc *NodeCreate) SetDeletedAt(t time.Time) *NodeCreate
SetDeletedAt sets the "deleted_at" field.
func (*NodeCreate) SetName ¶
func (nc *NodeCreate) SetName(s string) *NodeCreate
SetName sets the "name" field.
func (*NodeCreate) SetNillableCreatedAt ¶
func (nc *NodeCreate) SetNillableCreatedAt(t *time.Time) *NodeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*NodeCreate) SetNillableDeletedAt ¶
func (nc *NodeCreate) SetNillableDeletedAt(t *time.Time) *NodeCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*NodeCreate) SetNillableServer ¶
func (nc *NodeCreate) SetNillableServer(s *string) *NodeCreate
SetNillableServer sets the "server" field if the given value is not nil.
func (*NodeCreate) SetNillableSlaveKey ¶
func (nc *NodeCreate) SetNillableSlaveKey(s *string) *NodeCreate
SetNillableSlaveKey sets the "slave_key" field if the given value is not nil.
func (*NodeCreate) SetNillableUpdatedAt ¶
func (nc *NodeCreate) SetNillableUpdatedAt(t *time.Time) *NodeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*NodeCreate) SetNillableWeight ¶
func (nc *NodeCreate) SetNillableWeight(i *int) *NodeCreate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*NodeCreate) SetRawID ¶
func (m *NodeCreate) SetRawID(t int) *NodeCreate
func (*NodeCreate) SetServer ¶
func (nc *NodeCreate) SetServer(s string) *NodeCreate
SetServer sets the "server" field.
func (*NodeCreate) SetSettings ¶
func (nc *NodeCreate) SetSettings(ts *types.NodeSetting) *NodeCreate
SetSettings sets the "settings" field.
func (*NodeCreate) SetSlaveKey ¶
func (nc *NodeCreate) SetSlaveKey(s string) *NodeCreate
SetSlaveKey sets the "slave_key" field.
func (*NodeCreate) SetStatus ¶
func (nc *NodeCreate) SetStatus(n node.Status) *NodeCreate
SetStatus sets the "status" field.
func (*NodeCreate) SetType ¶
func (nc *NodeCreate) SetType(n node.Type) *NodeCreate
SetType sets the "type" field.
func (*NodeCreate) SetUpdatedAt ¶
func (nc *NodeCreate) SetUpdatedAt(t time.Time) *NodeCreate
SetUpdatedAt sets the "updated_at" field.
func (*NodeCreate) SetWeight ¶
func (nc *NodeCreate) SetWeight(i int) *NodeCreate
SetWeight sets the "weight" field.
type NodeCreateBulk ¶
type NodeCreateBulk struct {
// contains filtered or unexported fields
}
NodeCreateBulk is the builder for creating many Node entities in bulk.
func (*NodeCreateBulk) Exec ¶
func (ncb *NodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeCreateBulk) ExecContext ¶
func (c *NodeCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*NodeCreateBulk) ExecX ¶
func (ncb *NodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeCreateBulk) OnConflict ¶
func (ncb *NodeCreateBulk) OnConflict(opts ...sql.ConflictOption) *NodeUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Node.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.NodeUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*NodeCreateBulk) OnConflictColumns ¶
func (ncb *NodeCreateBulk) OnConflictColumns(columns ...string) *NodeUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Node.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*NodeCreateBulk) QueryContext ¶
func (c *NodeCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type NodeDelete ¶
type NodeDelete struct {
// contains filtered or unexported fields
}
NodeDelete is the builder for deleting a Node entity.
func (*NodeDelete) Exec ¶
func (nd *NodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NodeDelete) ExecContext ¶
func (c *NodeDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*NodeDelete) ExecX ¶
func (nd *NodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NodeDelete) QueryContext ¶
func (c *NodeDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*NodeDelete) Where ¶
func (nd *NodeDelete) Where(ps ...predicate.Node) *NodeDelete
Where appends a list predicates to the NodeDelete builder.
type NodeDeleteOne ¶
type NodeDeleteOne struct {
// contains filtered or unexported fields
}
NodeDeleteOne is the builder for deleting a single Node entity.
func (*NodeDeleteOne) Exec ¶
func (ndo *NodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NodeDeleteOne) ExecX ¶
func (ndo *NodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeDeleteOne) Where ¶
func (ndo *NodeDeleteOne) Where(ps ...predicate.Node) *NodeDeleteOne
Where appends a list predicates to the NodeDelete builder.
type NodeEdges ¶
type NodeEdges struct {
// StoragePolicy holds the value of the storage_policy edge.
StoragePolicy []*StoragePolicy `json:"storage_policy,omitempty"`
// contains filtered or unexported fields
}
NodeEdges holds the relations/edges for other nodes in the graph.
func (NodeEdges) StoragePolicyOrErr ¶
func (e NodeEdges) StoragePolicyOrErr() ([]*StoragePolicy, error)
StoragePolicyOrErr returns the StoragePolicy value or an error if the edge was not loaded in eager-loading.
type NodeGroupBy ¶
type NodeGroupBy struct {
// contains filtered or unexported fields
}
NodeGroupBy is the group-by builder for Node entities.
func (*NodeGroupBy) Aggregate ¶
func (ngb *NodeGroupBy) Aggregate(fns ...AggregateFunc) *NodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Scan ¶
func (ngb *NodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeMutation ¶
type NodeMutation struct {
// contains filtered or unexported fields
}
NodeMutation represents an operation that mutates the Node nodes in the graph.
func (*NodeMutation) AddField ¶
func (m *NodeMutation) 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 (*NodeMutation) AddStoragePolicyIDs ¶
func (m *NodeMutation) AddStoragePolicyIDs(ids ...int)
AddStoragePolicyIDs adds the "storage_policy" edge to the StoragePolicy entity by ids.
func (*NodeMutation) AddWeight ¶
func (m *NodeMutation) AddWeight(i int)
AddWeight adds i to the "weight" field.
func (*NodeMutation) AddedEdges ¶
func (m *NodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NodeMutation) AddedField ¶
func (m *NodeMutation) 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 (*NodeMutation) AddedFields ¶
func (m *NodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NodeMutation) AddedIDs ¶
func (m *NodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NodeMutation) AddedWeight ¶
func (m *NodeMutation) AddedWeight() (r int, exists bool)
AddedWeight returns the value that was added to the "weight" field in this mutation.
func (*NodeMutation) Capabilities ¶
func (m *NodeMutation) Capabilities() (r *boolset.BooleanSet, exists bool)
Capabilities returns the value of the "capabilities" field in the mutation.
func (*NodeMutation) ClearDeletedAt ¶
func (m *NodeMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*NodeMutation) ClearEdge ¶
func (m *NodeMutation) 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 (*NodeMutation) ClearField ¶
func (m *NodeMutation) 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 (*NodeMutation) ClearServer ¶
func (m *NodeMutation) ClearServer()
ClearServer clears the value of the "server" field.
func (*NodeMutation) ClearSettings ¶
func (m *NodeMutation) ClearSettings()
ClearSettings clears the value of the "settings" field.
func (*NodeMutation) ClearSlaveKey ¶
func (m *NodeMutation) ClearSlaveKey()
ClearSlaveKey clears the value of the "slave_key" field.
func (*NodeMutation) ClearStoragePolicy ¶
func (m *NodeMutation) ClearStoragePolicy()
ClearStoragePolicy clears the "storage_policy" edge to the StoragePolicy entity.
func (*NodeMutation) ClearedEdges ¶
func (m *NodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NodeMutation) ClearedFields ¶
func (m *NodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NodeMutation) Client ¶
func (m NodeMutation) 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 (*NodeMutation) CreatedAt ¶
func (m *NodeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*NodeMutation) DeletedAt ¶
func (m *NodeMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*NodeMutation) DeletedAtCleared ¶
func (m *NodeMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*NodeMutation) EdgeCleared ¶
func (m *NodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NodeMutation) ExecContext ¶
func (c *NodeMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*NodeMutation) Field ¶
func (m *NodeMutation) 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 (*NodeMutation) FieldCleared ¶
func (m *NodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NodeMutation) Fields ¶
func (m *NodeMutation) 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 (*NodeMutation) GetType ¶
func (m *NodeMutation) GetType() (r node.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*NodeMutation) ID ¶
func (m *NodeMutation) 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 (*NodeMutation) IDs ¶
func (m *NodeMutation) 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 (*NodeMutation) Name ¶
func (m *NodeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*NodeMutation) OldCapabilities ¶
func (m *NodeMutation) OldCapabilities(ctx context.Context) (v *boolset.BooleanSet, err error)
OldCapabilities returns the old "capabilities" field's value of the Node entity. If the Node 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 (*NodeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Node entity. If the Node 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 (*NodeMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Node entity. If the Node 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 (*NodeMutation) 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 (*NodeMutation) OldName ¶
func (m *NodeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Node entity. If the Node 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 (*NodeMutation) OldServer ¶
func (m *NodeMutation) OldServer(ctx context.Context) (v string, err error)
OldServer returns the old "server" field's value of the Node entity. If the Node 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 (*NodeMutation) OldSettings ¶
func (m *NodeMutation) OldSettings(ctx context.Context) (v *types.NodeSetting, err error)
OldSettings returns the old "settings" field's value of the Node entity. If the Node 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 (*NodeMutation) OldSlaveKey ¶
func (m *NodeMutation) OldSlaveKey(ctx context.Context) (v string, err error)
OldSlaveKey returns the old "slave_key" field's value of the Node entity. If the Node 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 (*NodeMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Node entity. If the Node 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 (*NodeMutation) OldType ¶
OldType returns the old "type" field's value of the Node entity. If the Node 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 (*NodeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Node entity. If the Node 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 (*NodeMutation) OldWeight ¶
func (m *NodeMutation) OldWeight(ctx context.Context) (v int, err error)
OldWeight returns the old "weight" field's value of the Node entity. If the Node 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 (*NodeMutation) QueryContext ¶
func (c *NodeMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*NodeMutation) RemoveStoragePolicyIDs ¶
func (m *NodeMutation) RemoveStoragePolicyIDs(ids ...int)
RemoveStoragePolicyIDs removes the "storage_policy" edge to the StoragePolicy entity by IDs.
func (*NodeMutation) RemovedEdges ¶
func (m *NodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NodeMutation) RemovedIDs ¶
func (m *NodeMutation) 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 (*NodeMutation) RemovedStoragePolicyIDs ¶
func (m *NodeMutation) RemovedStoragePolicyIDs() (ids []int)
RemovedStoragePolicy returns the removed IDs of the "storage_policy" edge to the StoragePolicy entity.
func (*NodeMutation) ResetCapabilities ¶
func (m *NodeMutation) ResetCapabilities()
ResetCapabilities resets all changes to the "capabilities" field.
func (*NodeMutation) ResetCreatedAt ¶
func (m *NodeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*NodeMutation) ResetDeletedAt ¶
func (m *NodeMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*NodeMutation) ResetEdge ¶
func (m *NodeMutation) 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 (*NodeMutation) ResetField ¶
func (m *NodeMutation) 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 (*NodeMutation) ResetName ¶
func (m *NodeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*NodeMutation) ResetServer ¶
func (m *NodeMutation) ResetServer()
ResetServer resets all changes to the "server" field.
func (*NodeMutation) ResetSettings ¶
func (m *NodeMutation) ResetSettings()
ResetSettings resets all changes to the "settings" field.
func (*NodeMutation) ResetSlaveKey ¶
func (m *NodeMutation) ResetSlaveKey()
ResetSlaveKey resets all changes to the "slave_key" field.
func (*NodeMutation) ResetStatus ¶
func (m *NodeMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*NodeMutation) ResetStoragePolicy ¶
func (m *NodeMutation) ResetStoragePolicy()
ResetStoragePolicy resets all changes to the "storage_policy" edge.
func (*NodeMutation) ResetType ¶
func (m *NodeMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*NodeMutation) ResetUpdatedAt ¶
func (m *NodeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*NodeMutation) ResetWeight ¶
func (m *NodeMutation) ResetWeight()
ResetWeight resets all changes to the "weight" field.
func (*NodeMutation) Server ¶
func (m *NodeMutation) Server() (r string, exists bool)
Server returns the value of the "server" field in the mutation.
func (*NodeMutation) ServerCleared ¶
func (m *NodeMutation) ServerCleared() bool
ServerCleared returns if the "server" field was cleared in this mutation.
func (*NodeMutation) SetCapabilities ¶
func (m *NodeMutation) SetCapabilities(bs *boolset.BooleanSet)
SetCapabilities sets the "capabilities" field.
func (*NodeMutation) SetCreatedAt ¶
func (m *NodeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*NodeMutation) SetDeletedAt ¶
func (m *NodeMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*NodeMutation) SetField ¶
func (m *NodeMutation) 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 (*NodeMutation) SetName ¶
func (m *NodeMutation) SetName(s string)
SetName sets the "name" field.
func (*NodeMutation) SetOp ¶
func (m *NodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NodeMutation) SetRawID ¶
func (m *NodeMutation) SetRawID(t int)
func (*NodeMutation) SetServer ¶
func (m *NodeMutation) SetServer(s string)
SetServer sets the "server" field.
func (*NodeMutation) SetSettings ¶
func (m *NodeMutation) SetSettings(ts *types.NodeSetting)
SetSettings sets the "settings" field.
func (*NodeMutation) SetSlaveKey ¶
func (m *NodeMutation) SetSlaveKey(s string)
SetSlaveKey sets the "slave_key" field.
func (*NodeMutation) SetStatus ¶
func (m *NodeMutation) SetStatus(n node.Status)
SetStatus sets the "status" field.
func (*NodeMutation) SetType ¶
func (m *NodeMutation) SetType(n node.Type)
SetType sets the "type" field.
func (*NodeMutation) SetUpdatedAt ¶
func (m *NodeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*NodeMutation) SetWeight ¶
func (m *NodeMutation) SetWeight(i int)
SetWeight sets the "weight" field.
func (*NodeMutation) Settings ¶
func (m *NodeMutation) Settings() (r *types.NodeSetting, exists bool)
Settings returns the value of the "settings" field in the mutation.
func (*NodeMutation) SettingsCleared ¶
func (m *NodeMutation) SettingsCleared() bool
SettingsCleared returns if the "settings" field was cleared in this mutation.
func (*NodeMutation) SlaveKey ¶
func (m *NodeMutation) SlaveKey() (r string, exists bool)
SlaveKey returns the value of the "slave_key" field in the mutation.
func (*NodeMutation) SlaveKeyCleared ¶
func (m *NodeMutation) SlaveKeyCleared() bool
SlaveKeyCleared returns if the "slave_key" field was cleared in this mutation.
func (*NodeMutation) Status ¶
func (m *NodeMutation) Status() (r node.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*NodeMutation) StoragePolicyCleared ¶
func (m *NodeMutation) StoragePolicyCleared() bool
StoragePolicyCleared reports if the "storage_policy" edge to the StoragePolicy entity was cleared.
func (*NodeMutation) StoragePolicyIDs ¶
func (m *NodeMutation) StoragePolicyIDs() (ids []int)
StoragePolicyIDs returns the "storage_policy" edge IDs in the mutation.
func (NodeMutation) Tx ¶
func (m NodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NodeMutation) Type ¶
func (m *NodeMutation) Type() string
Type returns the node type of this mutation (Node).
func (*NodeMutation) UpdatedAt ¶
func (m *NodeMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*NodeMutation) Weight ¶
func (m *NodeMutation) Weight() (r int, exists bool)
Weight returns the value of the "weight" field in the mutation.
func (*NodeMutation) Where ¶
func (m *NodeMutation) Where(ps ...predicate.Node)
Where appends a list predicates to the NodeMutation builder.
func (*NodeMutation) WhereP ¶
func (m *NodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NodeQuery ¶
type NodeQuery struct {
// contains filtered or unexported fields
}
NodeQuery is the builder for querying Node entities.
func (*NodeQuery) Aggregate ¶
func (nq *NodeQuery) Aggregate(fns ...AggregateFunc) *NodeSelect
Aggregate returns a NodeSelect configured with the given aggregations.
func (*NodeQuery) Clone ¶
Clone returns a duplicate of the NodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NodeQuery) ExecContext ¶
func (c *NodeQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*NodeQuery) First ¶
First returns the first Node entity from the query. Returns a *NotFoundError when no Node was found.
func (*NodeQuery) FirstID ¶
FirstID returns the first Node ID from the query. Returns a *NotFoundError when no Node ID was found.
func (*NodeQuery) GroupBy ¶
func (nq *NodeQuery) GroupBy(field string, fields ...string) *NodeGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Node.Query().
GroupBy(node.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*NodeQuery) Only ¶
Only returns a single Node entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Node entity is found. Returns a *NotFoundError when no Node entities are found.
func (*NodeQuery) OnlyID ¶
OnlyID is like Only, but returns the only Node ID in the query. Returns a *NotSingularError when more than one Node ID is found. Returns a *NotFoundError when no entities are found.
func (*NodeQuery) Order ¶
func (nq *NodeQuery) Order(o ...node.OrderOption) *NodeQuery
Order specifies how the records should be ordered.
func (*NodeQuery) QueryContext ¶
func (c *NodeQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*NodeQuery) QueryStoragePolicy ¶
func (nq *NodeQuery) QueryStoragePolicy() *StoragePolicyQuery
QueryStoragePolicy chains the current query on the "storage_policy" edge.
func (*NodeQuery) Select ¶
func (nq *NodeQuery) Select(fields ...string) *NodeSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Node.Query().
Select(node.FieldCreatedAt).
Scan(ctx, &v)
func (*NodeQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*NodeQuery) WithStoragePolicy ¶
func (nq *NodeQuery) WithStoragePolicy(opts ...func(*StoragePolicyQuery)) *NodeQuery
WithStoragePolicy tells the query-builder to eager-load the nodes that are connected to the "storage_policy" edge. The optional arguments are used to configure the query builder of the edge.
type NodeSelect ¶
type NodeSelect struct {
*NodeQuery
// contains filtered or unexported fields
}
NodeSelect is the builder for selecting fields of Node entities.
func (*NodeSelect) Aggregate ¶
func (ns *NodeSelect) Aggregate(fns ...AggregateFunc) *NodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (NodeSelect) ExecContext ¶
func (c NodeSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*NodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (NodeSelect) QueryContext ¶
func (c NodeSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*NodeSelect) Scan ¶
func (ns *NodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeUpdate ¶
type NodeUpdate struct {
// contains filtered or unexported fields
}
NodeUpdate is the builder for updating Node entities.
func (*NodeUpdate) AddStoragePolicy ¶
func (nu *NodeUpdate) AddStoragePolicy(s ...*StoragePolicy) *NodeUpdate
AddStoragePolicy adds the "storage_policy" edges to the StoragePolicy entity.
func (*NodeUpdate) AddStoragePolicyIDs ¶
func (nu *NodeUpdate) AddStoragePolicyIDs(ids ...int) *NodeUpdate
AddStoragePolicyIDs adds the "storage_policy" edge to the StoragePolicy entity by IDs.
func (*NodeUpdate) AddWeight ¶
func (nu *NodeUpdate) AddWeight(i int) *NodeUpdate
AddWeight adds i to the "weight" field.
func (*NodeUpdate) ClearDeletedAt ¶
func (nu *NodeUpdate) ClearDeletedAt() *NodeUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*NodeUpdate) ClearServer ¶
func (nu *NodeUpdate) ClearServer() *NodeUpdate
ClearServer clears the value of the "server" field.
func (*NodeUpdate) ClearSettings ¶
func (nu *NodeUpdate) ClearSettings() *NodeUpdate
ClearSettings clears the value of the "settings" field.
func (*NodeUpdate) ClearSlaveKey ¶
func (nu *NodeUpdate) ClearSlaveKey() *NodeUpdate
ClearSlaveKey clears the value of the "slave_key" field.
func (*NodeUpdate) ClearStoragePolicy ¶
func (nu *NodeUpdate) ClearStoragePolicy() *NodeUpdate
ClearStoragePolicy clears all "storage_policy" edges to the StoragePolicy entity.
func (*NodeUpdate) Exec ¶
func (nu *NodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeUpdate) ExecContext ¶
func (c *NodeUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*NodeUpdate) ExecX ¶
func (nu *NodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpdate) Mutation ¶
func (nu *NodeUpdate) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeUpdate) QueryContext ¶
func (c *NodeUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*NodeUpdate) RemoveStoragePolicy ¶
func (nu *NodeUpdate) RemoveStoragePolicy(s ...*StoragePolicy) *NodeUpdate
RemoveStoragePolicy removes "storage_policy" edges to StoragePolicy entities.
func (*NodeUpdate) RemoveStoragePolicyIDs ¶
func (nu *NodeUpdate) RemoveStoragePolicyIDs(ids ...int) *NodeUpdate
RemoveStoragePolicyIDs removes the "storage_policy" edge to StoragePolicy entities by IDs.
func (*NodeUpdate) Save ¶
func (nu *NodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NodeUpdate) SaveX ¶
func (nu *NodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NodeUpdate) SetCapabilities ¶
func (nu *NodeUpdate) SetCapabilities(bs *boolset.BooleanSet) *NodeUpdate
SetCapabilities sets the "capabilities" field.
func (*NodeUpdate) SetDeletedAt ¶
func (nu *NodeUpdate) SetDeletedAt(t time.Time) *NodeUpdate
SetDeletedAt sets the "deleted_at" field.
func (*NodeUpdate) SetName ¶
func (nu *NodeUpdate) SetName(s string) *NodeUpdate
SetName sets the "name" field.
func (*NodeUpdate) SetNillableDeletedAt ¶
func (nu *NodeUpdate) SetNillableDeletedAt(t *time.Time) *NodeUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*NodeUpdate) SetNillableName ¶
func (nu *NodeUpdate) SetNillableName(s *string) *NodeUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*NodeUpdate) SetNillableServer ¶
func (nu *NodeUpdate) SetNillableServer(s *string) *NodeUpdate
SetNillableServer sets the "server" field if the given value is not nil.
func (*NodeUpdate) SetNillableSlaveKey ¶
func (nu *NodeUpdate) SetNillableSlaveKey(s *string) *NodeUpdate
SetNillableSlaveKey sets the "slave_key" field if the given value is not nil.
func (*NodeUpdate) SetNillableStatus ¶
func (nu *NodeUpdate) SetNillableStatus(n *node.Status) *NodeUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*NodeUpdate) SetNillableType ¶
func (nu *NodeUpdate) SetNillableType(n *node.Type) *NodeUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*NodeUpdate) SetNillableWeight ¶
func (nu *NodeUpdate) SetNillableWeight(i *int) *NodeUpdate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*NodeUpdate) SetServer ¶
func (nu *NodeUpdate) SetServer(s string) *NodeUpdate
SetServer sets the "server" field.
func (*NodeUpdate) SetSettings ¶
func (nu *NodeUpdate) SetSettings(ts *types.NodeSetting) *NodeUpdate
SetSettings sets the "settings" field.
func (*NodeUpdate) SetSlaveKey ¶
func (nu *NodeUpdate) SetSlaveKey(s string) *NodeUpdate
SetSlaveKey sets the "slave_key" field.
func (*NodeUpdate) SetStatus ¶
func (nu *NodeUpdate) SetStatus(n node.Status) *NodeUpdate
SetStatus sets the "status" field.
func (*NodeUpdate) SetType ¶
func (nu *NodeUpdate) SetType(n node.Type) *NodeUpdate
SetType sets the "type" field.
func (*NodeUpdate) SetUpdatedAt ¶
func (nu *NodeUpdate) SetUpdatedAt(t time.Time) *NodeUpdate
SetUpdatedAt sets the "updated_at" field.
func (*NodeUpdate) SetWeight ¶
func (nu *NodeUpdate) SetWeight(i int) *NodeUpdate
SetWeight sets the "weight" field.
func (*NodeUpdate) Where ¶
func (nu *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate
Where appends a list predicates to the NodeUpdate builder.
type NodeUpdateOne ¶
type NodeUpdateOne struct {
// contains filtered or unexported fields
}
NodeUpdateOne is the builder for updating a single Node entity.
func (*NodeUpdateOne) AddStoragePolicy ¶
func (nuo *NodeUpdateOne) AddStoragePolicy(s ...*StoragePolicy) *NodeUpdateOne
AddStoragePolicy adds the "storage_policy" edges to the StoragePolicy entity.
func (*NodeUpdateOne) AddStoragePolicyIDs ¶
func (nuo *NodeUpdateOne) AddStoragePolicyIDs(ids ...int) *NodeUpdateOne
AddStoragePolicyIDs adds the "storage_policy" edge to the StoragePolicy entity by IDs.
func (*NodeUpdateOne) AddWeight ¶
func (nuo *NodeUpdateOne) AddWeight(i int) *NodeUpdateOne
AddWeight adds i to the "weight" field.
func (*NodeUpdateOne) ClearDeletedAt ¶
func (nuo *NodeUpdateOne) ClearDeletedAt() *NodeUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*NodeUpdateOne) ClearServer ¶
func (nuo *NodeUpdateOne) ClearServer() *NodeUpdateOne
ClearServer clears the value of the "server" field.
func (*NodeUpdateOne) ClearSettings ¶
func (nuo *NodeUpdateOne) ClearSettings() *NodeUpdateOne
ClearSettings clears the value of the "settings" field.
func (*NodeUpdateOne) ClearSlaveKey ¶
func (nuo *NodeUpdateOne) ClearSlaveKey() *NodeUpdateOne
ClearSlaveKey clears the value of the "slave_key" field.
func (*NodeUpdateOne) ClearStoragePolicy ¶
func (nuo *NodeUpdateOne) ClearStoragePolicy() *NodeUpdateOne
ClearStoragePolicy clears all "storage_policy" edges to the StoragePolicy entity.
func (*NodeUpdateOne) Exec ¶
func (nuo *NodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NodeUpdateOne) ExecContext ¶
func (c *NodeUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*NodeUpdateOne) ExecX ¶
func (nuo *NodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpdateOne) Mutation ¶
func (nuo *NodeUpdateOne) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeUpdateOne) QueryContext ¶
func (c *NodeUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*NodeUpdateOne) RemoveStoragePolicy ¶
func (nuo *NodeUpdateOne) RemoveStoragePolicy(s ...*StoragePolicy) *NodeUpdateOne
RemoveStoragePolicy removes "storage_policy" edges to StoragePolicy entities.
func (*NodeUpdateOne) RemoveStoragePolicyIDs ¶
func (nuo *NodeUpdateOne) RemoveStoragePolicyIDs(ids ...int) *NodeUpdateOne
RemoveStoragePolicyIDs removes the "storage_policy" edge to StoragePolicy entities by IDs.
func (*NodeUpdateOne) Save ¶
func (nuo *NodeUpdateOne) Save(ctx context.Context) (*Node, error)
Save executes the query and returns the updated Node entity.
func (*NodeUpdateOne) SaveX ¶
func (nuo *NodeUpdateOne) SaveX(ctx context.Context) *Node
SaveX is like Save, but panics if an error occurs.
func (*NodeUpdateOne) Select ¶
func (nuo *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NodeUpdateOne) SetCapabilities ¶
func (nuo *NodeUpdateOne) SetCapabilities(bs *boolset.BooleanSet) *NodeUpdateOne
SetCapabilities sets the "capabilities" field.
func (*NodeUpdateOne) SetDeletedAt ¶
func (nuo *NodeUpdateOne) SetDeletedAt(t time.Time) *NodeUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*NodeUpdateOne) SetName ¶
func (nuo *NodeUpdateOne) SetName(s string) *NodeUpdateOne
SetName sets the "name" field.
func (*NodeUpdateOne) SetNillableDeletedAt ¶
func (nuo *NodeUpdateOne) SetNillableDeletedAt(t *time.Time) *NodeUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableName ¶
func (nuo *NodeUpdateOne) SetNillableName(s *string) *NodeUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableServer ¶
func (nuo *NodeUpdateOne) SetNillableServer(s *string) *NodeUpdateOne
SetNillableServer sets the "server" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableSlaveKey ¶
func (nuo *NodeUpdateOne) SetNillableSlaveKey(s *string) *NodeUpdateOne
SetNillableSlaveKey sets the "slave_key" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableStatus ¶
func (nuo *NodeUpdateOne) SetNillableStatus(n *node.Status) *NodeUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableType ¶
func (nuo *NodeUpdateOne) SetNillableType(n *node.Type) *NodeUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableWeight ¶
func (nuo *NodeUpdateOne) SetNillableWeight(i *int) *NodeUpdateOne
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*NodeUpdateOne) SetServer ¶
func (nuo *NodeUpdateOne) SetServer(s string) *NodeUpdateOne
SetServer sets the "server" field.
func (*NodeUpdateOne) SetSettings ¶
func (nuo *NodeUpdateOne) SetSettings(ts *types.NodeSetting) *NodeUpdateOne
SetSettings sets the "settings" field.
func (*NodeUpdateOne) SetSlaveKey ¶
func (nuo *NodeUpdateOne) SetSlaveKey(s string) *NodeUpdateOne
SetSlaveKey sets the "slave_key" field.
func (*NodeUpdateOne) SetStatus ¶
func (nuo *NodeUpdateOne) SetStatus(n node.Status) *NodeUpdateOne
SetStatus sets the "status" field.
func (*NodeUpdateOne) SetType ¶
func (nuo *NodeUpdateOne) SetType(n node.Type) *NodeUpdateOne
SetType sets the "type" field.
func (*NodeUpdateOne) SetUpdatedAt ¶
func (nuo *NodeUpdateOne) SetUpdatedAt(t time.Time) *NodeUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*NodeUpdateOne) SetWeight ¶
func (nuo *NodeUpdateOne) SetWeight(i int) *NodeUpdateOne
SetWeight sets the "weight" field.
func (*NodeUpdateOne) Where ¶
func (nuo *NodeUpdateOne) Where(ps ...predicate.Node) *NodeUpdateOne
Where appends a list predicates to the NodeUpdate builder.
type NodeUpsert ¶
NodeUpsert is the "OnConflict" setter.
func (*NodeUpsert) AddWeight ¶
func (u *NodeUpsert) AddWeight(v int) *NodeUpsert
AddWeight adds v to the "weight" field.
func (*NodeUpsert) ClearDeletedAt ¶
func (u *NodeUpsert) ClearDeletedAt() *NodeUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*NodeUpsert) ClearServer ¶
func (u *NodeUpsert) ClearServer() *NodeUpsert
ClearServer clears the value of the "server" field.
func (*NodeUpsert) ClearSettings ¶
func (u *NodeUpsert) ClearSettings() *NodeUpsert
ClearSettings clears the value of the "settings" field.
func (*NodeUpsert) ClearSlaveKey ¶
func (u *NodeUpsert) ClearSlaveKey() *NodeUpsert
ClearSlaveKey clears the value of the "slave_key" field.
func (*NodeUpsert) SetCapabilities ¶
func (u *NodeUpsert) SetCapabilities(v *boolset.BooleanSet) *NodeUpsert
SetCapabilities sets the "capabilities" field.
func (*NodeUpsert) SetDeletedAt ¶
func (u *NodeUpsert) SetDeletedAt(v time.Time) *NodeUpsert
SetDeletedAt sets the "deleted_at" field.
func (*NodeUpsert) SetName ¶
func (u *NodeUpsert) SetName(v string) *NodeUpsert
SetName sets the "name" field.
func (*NodeUpsert) SetServer ¶
func (u *NodeUpsert) SetServer(v string) *NodeUpsert
SetServer sets the "server" field.
func (*NodeUpsert) SetSettings ¶
func (u *NodeUpsert) SetSettings(v *types.NodeSetting) *NodeUpsert
SetSettings sets the "settings" field.
func (*NodeUpsert) SetSlaveKey ¶
func (u *NodeUpsert) SetSlaveKey(v string) *NodeUpsert
SetSlaveKey sets the "slave_key" field.
func (*NodeUpsert) SetStatus ¶
func (u *NodeUpsert) SetStatus(v node.Status) *NodeUpsert
SetStatus sets the "status" field.
func (*NodeUpsert) SetType ¶
func (u *NodeUpsert) SetType(v node.Type) *NodeUpsert
SetType sets the "type" field.
func (*NodeUpsert) SetUpdatedAt ¶
func (u *NodeUpsert) SetUpdatedAt(v time.Time) *NodeUpsert
SetUpdatedAt sets the "updated_at" field.
func (*NodeUpsert) SetWeight ¶
func (u *NodeUpsert) SetWeight(v int) *NodeUpsert
SetWeight sets the "weight" field.
func (*NodeUpsert) UpdateCapabilities ¶
func (u *NodeUpsert) UpdateCapabilities() *NodeUpsert
UpdateCapabilities sets the "capabilities" field to the value that was provided on create.
func (*NodeUpsert) UpdateDeletedAt ¶
func (u *NodeUpsert) UpdateDeletedAt() *NodeUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*NodeUpsert) UpdateName ¶
func (u *NodeUpsert) UpdateName() *NodeUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*NodeUpsert) UpdateServer ¶
func (u *NodeUpsert) UpdateServer() *NodeUpsert
UpdateServer sets the "server" field to the value that was provided on create.
func (*NodeUpsert) UpdateSettings ¶
func (u *NodeUpsert) UpdateSettings() *NodeUpsert
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*NodeUpsert) UpdateSlaveKey ¶
func (u *NodeUpsert) UpdateSlaveKey() *NodeUpsert
UpdateSlaveKey sets the "slave_key" field to the value that was provided on create.
func (*NodeUpsert) UpdateStatus ¶
func (u *NodeUpsert) UpdateStatus() *NodeUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*NodeUpsert) UpdateType ¶
func (u *NodeUpsert) UpdateType() *NodeUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*NodeUpsert) UpdateUpdatedAt ¶
func (u *NodeUpsert) UpdateUpdatedAt() *NodeUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*NodeUpsert) UpdateWeight ¶
func (u *NodeUpsert) UpdateWeight() *NodeUpsert
UpdateWeight sets the "weight" field to the value that was provided on create.
type NodeUpsertBulk ¶
type NodeUpsertBulk struct {
// contains filtered or unexported fields
}
NodeUpsertBulk is the builder for "upsert"-ing a bulk of Node nodes.
func (*NodeUpsertBulk) AddWeight ¶
func (u *NodeUpsertBulk) AddWeight(v int) *NodeUpsertBulk
AddWeight adds v to the "weight" field.
func (*NodeUpsertBulk) ClearDeletedAt ¶
func (u *NodeUpsertBulk) ClearDeletedAt() *NodeUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*NodeUpsertBulk) ClearServer ¶
func (u *NodeUpsertBulk) ClearServer() *NodeUpsertBulk
ClearServer clears the value of the "server" field.
func (*NodeUpsertBulk) ClearSettings ¶
func (u *NodeUpsertBulk) ClearSettings() *NodeUpsertBulk
ClearSettings clears the value of the "settings" field.
func (*NodeUpsertBulk) ClearSlaveKey ¶
func (u *NodeUpsertBulk) ClearSlaveKey() *NodeUpsertBulk
ClearSlaveKey clears the value of the "slave_key" field.
func (*NodeUpsertBulk) DoNothing ¶
func (u *NodeUpsertBulk) DoNothing() *NodeUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*NodeUpsertBulk) Exec ¶
func (u *NodeUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeUpsertBulk) ExecX ¶
func (u *NodeUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpsertBulk) Ignore ¶
func (u *NodeUpsertBulk) Ignore() *NodeUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Node.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*NodeUpsertBulk) SetCapabilities ¶
func (u *NodeUpsertBulk) SetCapabilities(v *boolset.BooleanSet) *NodeUpsertBulk
SetCapabilities sets the "capabilities" field.
func (*NodeUpsertBulk) SetDeletedAt ¶
func (u *NodeUpsertBulk) SetDeletedAt(v time.Time) *NodeUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*NodeUpsertBulk) SetName ¶
func (u *NodeUpsertBulk) SetName(v string) *NodeUpsertBulk
SetName sets the "name" field.
func (*NodeUpsertBulk) SetServer ¶
func (u *NodeUpsertBulk) SetServer(v string) *NodeUpsertBulk
SetServer sets the "server" field.
func (*NodeUpsertBulk) SetSettings ¶
func (u *NodeUpsertBulk) SetSettings(v *types.NodeSetting) *NodeUpsertBulk
SetSettings sets the "settings" field.
func (*NodeUpsertBulk) SetSlaveKey ¶
func (u *NodeUpsertBulk) SetSlaveKey(v string) *NodeUpsertBulk
SetSlaveKey sets the "slave_key" field.
func (*NodeUpsertBulk) SetStatus ¶
func (u *NodeUpsertBulk) SetStatus(v node.Status) *NodeUpsertBulk
SetStatus sets the "status" field.
func (*NodeUpsertBulk) SetType ¶
func (u *NodeUpsertBulk) SetType(v node.Type) *NodeUpsertBulk
SetType sets the "type" field.
func (*NodeUpsertBulk) SetUpdatedAt ¶
func (u *NodeUpsertBulk) SetUpdatedAt(v time.Time) *NodeUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*NodeUpsertBulk) SetWeight ¶
func (u *NodeUpsertBulk) SetWeight(v int) *NodeUpsertBulk
SetWeight sets the "weight" field.
func (*NodeUpsertBulk) Update ¶
func (u *NodeUpsertBulk) Update(set func(*NodeUpsert)) *NodeUpsertBulk
Update allows overriding fields `UPDATE` values. See the NodeCreateBulk.OnConflict documentation for more info.
func (*NodeUpsertBulk) UpdateCapabilities ¶
func (u *NodeUpsertBulk) UpdateCapabilities() *NodeUpsertBulk
UpdateCapabilities sets the "capabilities" field to the value that was provided on create.
func (*NodeUpsertBulk) UpdateDeletedAt ¶
func (u *NodeUpsertBulk) UpdateDeletedAt() *NodeUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*NodeUpsertBulk) UpdateName ¶
func (u *NodeUpsertBulk) UpdateName() *NodeUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*NodeUpsertBulk) UpdateNewValues ¶
func (u *NodeUpsertBulk) UpdateNewValues() *NodeUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Node.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*NodeUpsertBulk) UpdateServer ¶
func (u *NodeUpsertBulk) UpdateServer() *NodeUpsertBulk
UpdateServer sets the "server" field to the value that was provided on create.
func (*NodeUpsertBulk) UpdateSettings ¶
func (u *NodeUpsertBulk) UpdateSettings() *NodeUpsertBulk
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*NodeUpsertBulk) UpdateSlaveKey ¶
func (u *NodeUpsertBulk) UpdateSlaveKey() *NodeUpsertBulk
UpdateSlaveKey sets the "slave_key" field to the value that was provided on create.
func (*NodeUpsertBulk) UpdateStatus ¶
func (u *NodeUpsertBulk) UpdateStatus() *NodeUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*NodeUpsertBulk) UpdateType ¶
func (u *NodeUpsertBulk) UpdateType() *NodeUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*NodeUpsertBulk) UpdateUpdatedAt ¶
func (u *NodeUpsertBulk) UpdateUpdatedAt() *NodeUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*NodeUpsertBulk) UpdateWeight ¶
func (u *NodeUpsertBulk) UpdateWeight() *NodeUpsertBulk
UpdateWeight sets the "weight" field to the value that was provided on create.
type NodeUpsertOne ¶
type NodeUpsertOne struct {
// contains filtered or unexported fields
}
NodeUpsertOne is the builder for "upsert"-ing
one Node node.
func (*NodeUpsertOne) AddWeight ¶
func (u *NodeUpsertOne) AddWeight(v int) *NodeUpsertOne
AddWeight adds v to the "weight" field.
func (*NodeUpsertOne) ClearDeletedAt ¶
func (u *NodeUpsertOne) ClearDeletedAt() *NodeUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*NodeUpsertOne) ClearServer ¶
func (u *NodeUpsertOne) ClearServer() *NodeUpsertOne
ClearServer clears the value of the "server" field.
func (*NodeUpsertOne) ClearSettings ¶
func (u *NodeUpsertOne) ClearSettings() *NodeUpsertOne
ClearSettings clears the value of the "settings" field.
func (*NodeUpsertOne) ClearSlaveKey ¶
func (u *NodeUpsertOne) ClearSlaveKey() *NodeUpsertOne
ClearSlaveKey clears the value of the "slave_key" field.
func (*NodeUpsertOne) DoNothing ¶
func (u *NodeUpsertOne) DoNothing() *NodeUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*NodeUpsertOne) Exec ¶
func (u *NodeUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeUpsertOne) ExecX ¶
func (u *NodeUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpsertOne) ID ¶
func (u *NodeUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*NodeUpsertOne) IDX ¶
func (u *NodeUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*NodeUpsertOne) Ignore ¶
func (u *NodeUpsertOne) Ignore() *NodeUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Node.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*NodeUpsertOne) SetCapabilities ¶
func (u *NodeUpsertOne) SetCapabilities(v *boolset.BooleanSet) *NodeUpsertOne
SetCapabilities sets the "capabilities" field.
func (*NodeUpsertOne) SetDeletedAt ¶
func (u *NodeUpsertOne) SetDeletedAt(v time.Time) *NodeUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*NodeUpsertOne) SetName ¶
func (u *NodeUpsertOne) SetName(v string) *NodeUpsertOne
SetName sets the "name" field.
func (*NodeUpsertOne) SetServer ¶
func (u *NodeUpsertOne) SetServer(v string) *NodeUpsertOne
SetServer sets the "server" field.
func (*NodeUpsertOne) SetSettings ¶
func (u *NodeUpsertOne) SetSettings(v *types.NodeSetting) *NodeUpsertOne
SetSettings sets the "settings" field.
func (*NodeUpsertOne) SetSlaveKey ¶
func (u *NodeUpsertOne) SetSlaveKey(v string) *NodeUpsertOne
SetSlaveKey sets the "slave_key" field.
func (*NodeUpsertOne) SetStatus ¶
func (u *NodeUpsertOne) SetStatus(v node.Status) *NodeUpsertOne
SetStatus sets the "status" field.
func (*NodeUpsertOne) SetType ¶
func (u *NodeUpsertOne) SetType(v node.Type) *NodeUpsertOne
SetType sets the "type" field.
func (*NodeUpsertOne) SetUpdatedAt ¶
func (u *NodeUpsertOne) SetUpdatedAt(v time.Time) *NodeUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*NodeUpsertOne) SetWeight ¶
func (u *NodeUpsertOne) SetWeight(v int) *NodeUpsertOne
SetWeight sets the "weight" field.
func (*NodeUpsertOne) Update ¶
func (u *NodeUpsertOne) Update(set func(*NodeUpsert)) *NodeUpsertOne
Update allows overriding fields `UPDATE` values. See the NodeCreate.OnConflict documentation for more info.
func (*NodeUpsertOne) UpdateCapabilities ¶
func (u *NodeUpsertOne) UpdateCapabilities() *NodeUpsertOne
UpdateCapabilities sets the "capabilities" field to the value that was provided on create.
func (*NodeUpsertOne) UpdateDeletedAt ¶
func (u *NodeUpsertOne) UpdateDeletedAt() *NodeUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*NodeUpsertOne) UpdateName ¶
func (u *NodeUpsertOne) UpdateName() *NodeUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*NodeUpsertOne) UpdateNewValues ¶
func (u *NodeUpsertOne) UpdateNewValues() *NodeUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Node.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*NodeUpsertOne) UpdateServer ¶
func (u *NodeUpsertOne) UpdateServer() *NodeUpsertOne
UpdateServer sets the "server" field to the value that was provided on create.
func (*NodeUpsertOne) UpdateSettings ¶
func (u *NodeUpsertOne) UpdateSettings() *NodeUpsertOne
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*NodeUpsertOne) UpdateSlaveKey ¶
func (u *NodeUpsertOne) UpdateSlaveKey() *NodeUpsertOne
UpdateSlaveKey sets the "slave_key" field to the value that was provided on create.
func (*NodeUpsertOne) UpdateStatus ¶
func (u *NodeUpsertOne) UpdateStatus() *NodeUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*NodeUpsertOne) UpdateType ¶
func (u *NodeUpsertOne) UpdateType() *NodeUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*NodeUpsertOne) UpdateUpdatedAt ¶
func (u *NodeUpsertOne) UpdateUpdatedAt() *NodeUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*NodeUpsertOne) UpdateWeight ¶
func (u *NodeUpsertOne) UpdateWeight() *NodeUpsertOne
UpdateWeight sets the "weight" field to the value that was provided on create.
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 OAuthClient ¶
type OAuthClient struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// GUID holds the value of the "guid" field.
GUID string `json:"guid,omitempty"`
// Secret holds the value of the "secret" field.
Secret string `json:"-"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// HomepageURL holds the value of the "homepage_url" field.
HomepageURL string `json:"homepage_url,omitempty"`
// RedirectUris holds the value of the "redirect_uris" field.
RedirectUris []string `json:"redirect_uris,omitempty"`
// Scopes holds the value of the "scopes" field.
Scopes []string `json:"scopes,omitempty"`
// Props holds the value of the "props" field.
Props *types.OAuthClientProps `json:"props,omitempty"`
// IsEnabled holds the value of the "is_enabled" field.
IsEnabled bool `json:"is_enabled,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the OAuthClientQuery when eager-loading is set.
Edges OAuthClientEdges `json:"edges"`
// contains filtered or unexported fields
}
OAuthClient is the model entity for the OAuthClient schema.
func (*OAuthClient) ExecContext ¶
func (c *OAuthClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClient) QueryContext ¶
func (c *OAuthClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClient) QueryGrants ¶
func (oc *OAuthClient) QueryGrants() *OAuthGrantQuery
QueryGrants queries the "grants" edge of the OAuthClient entity.
func (*OAuthClient) SetGrants ¶
func (e *OAuthClient) SetGrants(v []*OAuthGrant)
SetGrants manually set the edge as loaded state.
func (*OAuthClient) String ¶
func (oc *OAuthClient) String() string
String implements the fmt.Stringer.
func (*OAuthClient) Unwrap ¶
func (oc *OAuthClient) Unwrap() *OAuthClient
Unwrap unwraps the OAuthClient 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 (*OAuthClient) Update ¶
func (oc *OAuthClient) Update() *OAuthClientUpdateOne
Update returns a builder for updating this OAuthClient. Note that you need to call OAuthClient.Unwrap() before calling this method if this OAuthClient was returned from a transaction, and the transaction was committed or rolled back.
type OAuthClientClient ¶
type OAuthClientClient struct {
// contains filtered or unexported fields
}
OAuthClientClient is a client for the OAuthClient schema.
func NewOAuthClientClient ¶
func NewOAuthClientClient(c config) *OAuthClientClient
NewOAuthClientClient returns a client for the OAuthClient from the given config.
func (*OAuthClientClient) Create ¶
func (c *OAuthClientClient) Create() *OAuthClientCreate
Create returns a builder for creating a OAuthClient entity.
func (*OAuthClientClient) CreateBulk ¶
func (c *OAuthClientClient) CreateBulk(builders ...*OAuthClientCreate) *OAuthClientCreateBulk
CreateBulk returns a builder for creating a bulk of OAuthClient entities.
func (*OAuthClientClient) Delete ¶
func (c *OAuthClientClient) Delete() *OAuthClientDelete
Delete returns a delete builder for OAuthClient.
func (*OAuthClientClient) DeleteOne ¶
func (c *OAuthClientClient) DeleteOne(oc *OAuthClient) *OAuthClientDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OAuthClientClient) DeleteOneID ¶
func (c *OAuthClientClient) DeleteOneID(id int) *OAuthClientDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OAuthClientClient) ExecContext ¶
func (c *OAuthClientClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClientClient) Get ¶
func (c *OAuthClientClient) Get(ctx context.Context, id int) (*OAuthClient, error)
Get returns a OAuthClient entity by its id.
func (*OAuthClientClient) GetX ¶
func (c *OAuthClientClient) GetX(ctx context.Context, id int) *OAuthClient
GetX is like Get, but panics if an error occurs.
func (*OAuthClientClient) Hooks ¶
func (c *OAuthClientClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OAuthClientClient) Intercept ¶
func (c *OAuthClientClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthclient.Intercept(f(g(h())))`.
func (*OAuthClientClient) Interceptors ¶
func (c *OAuthClientClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OAuthClientClient) MapCreateBulk ¶
func (c *OAuthClientClient) MapCreateBulk(slice any, setFunc func(*OAuthClientCreate, int)) *OAuthClientCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*OAuthClientClient) Query ¶
func (c *OAuthClientClient) Query() *OAuthClientQuery
Query returns a query builder for OAuthClient.
func (*OAuthClientClient) QueryContext ¶
func (c *OAuthClientClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClientClient) QueryGrants ¶
func (c *OAuthClientClient) QueryGrants(oc *OAuthClient) *OAuthGrantQuery
QueryGrants queries the grants edge of a OAuthClient.
func (*OAuthClientClient) Update ¶
func (c *OAuthClientClient) Update() *OAuthClientUpdate
Update returns an update builder for OAuthClient.
func (*OAuthClientClient) UpdateOne ¶
func (c *OAuthClientClient) UpdateOne(oc *OAuthClient) *OAuthClientUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OAuthClientClient) UpdateOneID ¶
func (c *OAuthClientClient) UpdateOneID(id int) *OAuthClientUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OAuthClientClient) Use ¶
func (c *OAuthClientClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthclient.Hooks(f(g(h())))`.
type OAuthClientCreate ¶
type OAuthClientCreate struct {
// contains filtered or unexported fields
}
OAuthClientCreate is the builder for creating a OAuthClient entity.
func (*OAuthClientCreate) AddGrantIDs ¶
func (occ *OAuthClientCreate) AddGrantIDs(ids ...int) *OAuthClientCreate
AddGrantIDs adds the "grants" edge to the OAuthGrant entity by IDs.
func (*OAuthClientCreate) AddGrants ¶
func (occ *OAuthClientCreate) AddGrants(o ...*OAuthGrant) *OAuthClientCreate
AddGrants adds the "grants" edges to the OAuthGrant entity.
func (*OAuthClientCreate) Exec ¶
func (occ *OAuthClientCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthClientCreate) ExecContext ¶
func (c *OAuthClientCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClientCreate) ExecX ¶
func (occ *OAuthClientCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientCreate) Mutation ¶
func (occ *OAuthClientCreate) Mutation() *OAuthClientMutation
Mutation returns the OAuthClientMutation object of the builder.
func (*OAuthClientCreate) OnConflict ¶
func (occ *OAuthClientCreate) OnConflict(opts ...sql.ConflictOption) *OAuthClientUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.OAuthClient.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.OAuthClientUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*OAuthClientCreate) OnConflictColumns ¶
func (occ *OAuthClientCreate) OnConflictColumns(columns ...string) *OAuthClientUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.OAuthClient.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OAuthClientCreate) QueryContext ¶
func (c *OAuthClientCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClientCreate) Save ¶
func (occ *OAuthClientCreate) Save(ctx context.Context) (*OAuthClient, error)
Save creates the OAuthClient in the database.
func (*OAuthClientCreate) SaveX ¶
func (occ *OAuthClientCreate) SaveX(ctx context.Context) *OAuthClient
SaveX calls Save and panics if Save returns an error.
func (*OAuthClientCreate) SetCreatedAt ¶
func (occ *OAuthClientCreate) SetCreatedAt(t time.Time) *OAuthClientCreate
SetCreatedAt sets the "created_at" field.
func (*OAuthClientCreate) SetDeletedAt ¶
func (occ *OAuthClientCreate) SetDeletedAt(t time.Time) *OAuthClientCreate
SetDeletedAt sets the "deleted_at" field.
func (*OAuthClientCreate) SetGUID ¶
func (occ *OAuthClientCreate) SetGUID(s string) *OAuthClientCreate
SetGUID sets the "guid" field.
func (*OAuthClientCreate) SetHomepageURL ¶
func (occ *OAuthClientCreate) SetHomepageURL(s string) *OAuthClientCreate
SetHomepageURL sets the "homepage_url" field.
func (*OAuthClientCreate) SetIsEnabled ¶
func (occ *OAuthClientCreate) SetIsEnabled(b bool) *OAuthClientCreate
SetIsEnabled sets the "is_enabled" field.
func (*OAuthClientCreate) SetName ¶
func (occ *OAuthClientCreate) SetName(s string) *OAuthClientCreate
SetName sets the "name" field.
func (*OAuthClientCreate) SetNillableCreatedAt ¶
func (occ *OAuthClientCreate) SetNillableCreatedAt(t *time.Time) *OAuthClientCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OAuthClientCreate) SetNillableDeletedAt ¶
func (occ *OAuthClientCreate) SetNillableDeletedAt(t *time.Time) *OAuthClientCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OAuthClientCreate) SetNillableHomepageURL ¶
func (occ *OAuthClientCreate) SetNillableHomepageURL(s *string) *OAuthClientCreate
SetNillableHomepageURL sets the "homepage_url" field if the given value is not nil.
func (*OAuthClientCreate) SetNillableIsEnabled ¶
func (occ *OAuthClientCreate) SetNillableIsEnabled(b *bool) *OAuthClientCreate
SetNillableIsEnabled sets the "is_enabled" field if the given value is not nil.
func (*OAuthClientCreate) SetNillableUpdatedAt ¶
func (occ *OAuthClientCreate) SetNillableUpdatedAt(t *time.Time) *OAuthClientCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OAuthClientCreate) SetProps ¶
func (occ *OAuthClientCreate) SetProps(tacp *types.OAuthClientProps) *OAuthClientCreate
SetProps sets the "props" field.
func (*OAuthClientCreate) SetRawID ¶
func (m *OAuthClientCreate) SetRawID(t int) *OAuthClientCreate
func (*OAuthClientCreate) SetRedirectUris ¶
func (occ *OAuthClientCreate) SetRedirectUris(s []string) *OAuthClientCreate
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientCreate) SetScopes ¶
func (occ *OAuthClientCreate) SetScopes(s []string) *OAuthClientCreate
SetScopes sets the "scopes" field.
func (*OAuthClientCreate) SetSecret ¶
func (occ *OAuthClientCreate) SetSecret(s string) *OAuthClientCreate
SetSecret sets the "secret" field.
func (*OAuthClientCreate) SetUpdatedAt ¶
func (occ *OAuthClientCreate) SetUpdatedAt(t time.Time) *OAuthClientCreate
SetUpdatedAt sets the "updated_at" field.
type OAuthClientCreateBulk ¶
type OAuthClientCreateBulk struct {
// contains filtered or unexported fields
}
OAuthClientCreateBulk is the builder for creating many OAuthClient entities in bulk.
func (*OAuthClientCreateBulk) Exec ¶
func (occb *OAuthClientCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthClientCreateBulk) ExecContext ¶
func (c *OAuthClientCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClientCreateBulk) ExecX ¶
func (occb *OAuthClientCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientCreateBulk) OnConflict ¶
func (occb *OAuthClientCreateBulk) OnConflict(opts ...sql.ConflictOption) *OAuthClientUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.OAuthClient.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.OAuthClientUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*OAuthClientCreateBulk) OnConflictColumns ¶
func (occb *OAuthClientCreateBulk) OnConflictColumns(columns ...string) *OAuthClientUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.OAuthClient.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OAuthClientCreateBulk) QueryContext ¶
func (c *OAuthClientCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClientCreateBulk) Save ¶
func (occb *OAuthClientCreateBulk) Save(ctx context.Context) ([]*OAuthClient, error)
Save creates the OAuthClient entities in the database.
func (*OAuthClientCreateBulk) SaveX ¶
func (occb *OAuthClientCreateBulk) SaveX(ctx context.Context) []*OAuthClient
SaveX is like Save, but panics if an error occurs.
type OAuthClientDelete ¶
type OAuthClientDelete struct {
// contains filtered or unexported fields
}
OAuthClientDelete is the builder for deleting a OAuthClient entity.
func (*OAuthClientDelete) Exec ¶
func (ocd *OAuthClientDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OAuthClientDelete) ExecContext ¶
func (c *OAuthClientDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClientDelete) ExecX ¶
func (ocd *OAuthClientDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientDelete) QueryContext ¶
func (c *OAuthClientDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClientDelete) Where ¶
func (ocd *OAuthClientDelete) Where(ps ...predicate.OAuthClient) *OAuthClientDelete
Where appends a list predicates to the OAuthClientDelete builder.
type OAuthClientDeleteOne ¶
type OAuthClientDeleteOne struct {
// contains filtered or unexported fields
}
OAuthClientDeleteOne is the builder for deleting a single OAuthClient entity.
func (*OAuthClientDeleteOne) Exec ¶
func (ocdo *OAuthClientDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OAuthClientDeleteOne) ExecX ¶
func (ocdo *OAuthClientDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientDeleteOne) Where ¶
func (ocdo *OAuthClientDeleteOne) Where(ps ...predicate.OAuthClient) *OAuthClientDeleteOne
Where appends a list predicates to the OAuthClientDelete builder.
type OAuthClientEdges ¶
type OAuthClientEdges struct {
// Grants holds the value of the grants edge.
Grants []*OAuthGrant `json:"grants,omitempty"`
// contains filtered or unexported fields
}
OAuthClientEdges holds the relations/edges for other nodes in the graph.
func (OAuthClientEdges) GrantsOrErr ¶
func (e OAuthClientEdges) GrantsOrErr() ([]*OAuthGrant, error)
GrantsOrErr returns the Grants value or an error if the edge was not loaded in eager-loading.
type OAuthClientGroupBy ¶
type OAuthClientGroupBy struct {
// contains filtered or unexported fields
}
OAuthClientGroupBy is the group-by builder for OAuthClient entities.
func (*OAuthClientGroupBy) Aggregate ¶
func (ocgb *OAuthClientGroupBy) Aggregate(fns ...AggregateFunc) *OAuthClientGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OAuthClientGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Scan ¶
func (ocgb *OAuthClientGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthClientGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthClientMutation ¶
type OAuthClientMutation struct {
// contains filtered or unexported fields
}
OAuthClientMutation represents an operation that mutates the OAuthClient nodes in the graph.
func (*OAuthClientMutation) AddField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) AddGrantIDs ¶
func (m *OAuthClientMutation) AddGrantIDs(ids ...int)
AddGrantIDs adds the "grants" edge to the OAuthGrant entity by ids.
func (*OAuthClientMutation) AddedEdges ¶
func (m *OAuthClientMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OAuthClientMutation) AddedField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) AddedFields ¶
func (m *OAuthClientMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OAuthClientMutation) AddedIDs ¶
func (m *OAuthClientMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OAuthClientMutation) AppendRedirectUris ¶
func (m *OAuthClientMutation) AppendRedirectUris(s []string)
AppendRedirectUris adds s to the "redirect_uris" field.
func (*OAuthClientMutation) AppendScopes ¶
func (m *OAuthClientMutation) AppendScopes(s []string)
AppendScopes adds s to the "scopes" field.
func (*OAuthClientMutation) AppendedRedirectUris ¶
func (m *OAuthClientMutation) AppendedRedirectUris() ([]string, bool)
AppendedRedirectUris returns the list of values that were appended to the "redirect_uris" field in this mutation.
func (*OAuthClientMutation) AppendedScopes ¶
func (m *OAuthClientMutation) AppendedScopes() ([]string, bool)
AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.
func (*OAuthClientMutation) ClearDeletedAt ¶
func (m *OAuthClientMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthClientMutation) ClearEdge ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ClearField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ClearGrants ¶
func (m *OAuthClientMutation) ClearGrants()
ClearGrants clears the "grants" edge to the OAuthGrant entity.
func (*OAuthClientMutation) ClearHomepageURL ¶
func (m *OAuthClientMutation) ClearHomepageURL()
ClearHomepageURL clears the value of the "homepage_url" field.
func (*OAuthClientMutation) ClearedEdges ¶
func (m *OAuthClientMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OAuthClientMutation) ClearedFields ¶
func (m *OAuthClientMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OAuthClientMutation) Client ¶
func (m OAuthClientMutation) 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 (*OAuthClientMutation) CreatedAt ¶
func (m *OAuthClientMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OAuthClientMutation) DeletedAt ¶
func (m *OAuthClientMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*OAuthClientMutation) DeletedAtCleared ¶
func (m *OAuthClientMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*OAuthClientMutation) EdgeCleared ¶
func (m *OAuthClientMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OAuthClientMutation) ExecContext ¶
func (c *OAuthClientMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClientMutation) Field ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) FieldCleared ¶
func (m *OAuthClientMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OAuthClientMutation) Fields ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) GUID ¶
func (m *OAuthClientMutation) GUID() (r string, exists bool)
GUID returns the value of the "guid" field in the mutation.
func (*OAuthClientMutation) GrantsCleared ¶
func (m *OAuthClientMutation) GrantsCleared() bool
GrantsCleared reports if the "grants" edge to the OAuthGrant entity was cleared.
func (*OAuthClientMutation) GrantsIDs ¶
func (m *OAuthClientMutation) GrantsIDs() (ids []int)
GrantsIDs returns the "grants" edge IDs in the mutation.
func (*OAuthClientMutation) HomepageURL ¶
func (m *OAuthClientMutation) HomepageURL() (r string, exists bool)
HomepageURL returns the value of the "homepage_url" field in the mutation.
func (*OAuthClientMutation) HomepageURLCleared ¶
func (m *OAuthClientMutation) HomepageURLCleared() bool
HomepageURLCleared returns if the "homepage_url" field was cleared in this mutation.
func (*OAuthClientMutation) ID ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) IDs ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) IsEnabled ¶
func (m *OAuthClientMutation) IsEnabled() (r bool, exists bool)
IsEnabled returns the value of the "is_enabled" field in the mutation.
func (*OAuthClientMutation) Name ¶
func (m *OAuthClientMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*OAuthClientMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) 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 (*OAuthClientMutation) OldGUID ¶
func (m *OAuthClientMutation) OldGUID(ctx context.Context) (v string, err error)
OldGUID returns the old "guid" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) OldHomepageURL ¶
func (m *OAuthClientMutation) OldHomepageURL(ctx context.Context) (v string, err error)
OldHomepageURL returns the old "homepage_url" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) OldIsEnabled ¶
func (m *OAuthClientMutation) OldIsEnabled(ctx context.Context) (v bool, err error)
OldIsEnabled returns the old "is_enabled" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) OldName ¶
func (m *OAuthClientMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) OldProps ¶
func (m *OAuthClientMutation) OldProps(ctx context.Context) (v *types.OAuthClientProps, err error)
OldProps returns the old "props" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) OldRedirectUris ¶
func (m *OAuthClientMutation) OldRedirectUris(ctx context.Context) (v []string, err error)
OldRedirectUris returns the old "redirect_uris" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) OldScopes ¶
func (m *OAuthClientMutation) OldScopes(ctx context.Context) (v []string, err error)
OldScopes returns the old "scopes" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) OldSecret ¶
func (m *OAuthClientMutation) OldSecret(ctx context.Context) (v string, err error)
OldSecret returns the old "secret" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the OAuthClient entity. If the OAuthClient 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 (*OAuthClientMutation) Op ¶
func (m *OAuthClientMutation) Op() Op
Op returns the operation name.
func (*OAuthClientMutation) Props ¶
func (m *OAuthClientMutation) Props() (r *types.OAuthClientProps, exists bool)
Props returns the value of the "props" field in the mutation.
func (*OAuthClientMutation) QueryContext ¶
func (c *OAuthClientMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClientMutation) RedirectUris ¶
func (m *OAuthClientMutation) RedirectUris() (r []string, exists bool)
RedirectUris returns the value of the "redirect_uris" field in the mutation.
func (*OAuthClientMutation) RemoveGrantIDs ¶
func (m *OAuthClientMutation) RemoveGrantIDs(ids ...int)
RemoveGrantIDs removes the "grants" edge to the OAuthGrant entity by IDs.
func (*OAuthClientMutation) RemovedEdges ¶
func (m *OAuthClientMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OAuthClientMutation) RemovedGrantsIDs ¶
func (m *OAuthClientMutation) RemovedGrantsIDs() (ids []int)
RemovedGrants returns the removed IDs of the "grants" edge to the OAuthGrant entity.
func (*OAuthClientMutation) RemovedIDs ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ResetCreatedAt ¶
func (m *OAuthClientMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OAuthClientMutation) ResetDeletedAt ¶
func (m *OAuthClientMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*OAuthClientMutation) ResetEdge ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ResetField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ResetGUID ¶
func (m *OAuthClientMutation) ResetGUID()
ResetGUID resets all changes to the "guid" field.
func (*OAuthClientMutation) ResetGrants ¶
func (m *OAuthClientMutation) ResetGrants()
ResetGrants resets all changes to the "grants" edge.
func (*OAuthClientMutation) ResetHomepageURL ¶
func (m *OAuthClientMutation) ResetHomepageURL()
ResetHomepageURL resets all changes to the "homepage_url" field.
func (*OAuthClientMutation) ResetIsEnabled ¶
func (m *OAuthClientMutation) ResetIsEnabled()
ResetIsEnabled resets all changes to the "is_enabled" field.
func (*OAuthClientMutation) ResetName ¶
func (m *OAuthClientMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*OAuthClientMutation) ResetProps ¶
func (m *OAuthClientMutation) ResetProps()
ResetProps resets all changes to the "props" field.
func (*OAuthClientMutation) ResetRedirectUris ¶
func (m *OAuthClientMutation) ResetRedirectUris()
ResetRedirectUris resets all changes to the "redirect_uris" field.
func (*OAuthClientMutation) ResetScopes ¶
func (m *OAuthClientMutation) ResetScopes()
ResetScopes resets all changes to the "scopes" field.
func (*OAuthClientMutation) ResetSecret ¶
func (m *OAuthClientMutation) ResetSecret()
ResetSecret resets all changes to the "secret" field.
func (*OAuthClientMutation) ResetUpdatedAt ¶
func (m *OAuthClientMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OAuthClientMutation) Scopes ¶
func (m *OAuthClientMutation) Scopes() (r []string, exists bool)
Scopes returns the value of the "scopes" field in the mutation.
func (*OAuthClientMutation) Secret ¶
func (m *OAuthClientMutation) Secret() (r string, exists bool)
Secret returns the value of the "secret" field in the mutation.
func (*OAuthClientMutation) SetCreatedAt ¶
func (m *OAuthClientMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OAuthClientMutation) SetDeletedAt ¶
func (m *OAuthClientMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*OAuthClientMutation) SetField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) SetGUID ¶
func (m *OAuthClientMutation) SetGUID(s string)
SetGUID sets the "guid" field.
func (*OAuthClientMutation) SetHomepageURL ¶
func (m *OAuthClientMutation) SetHomepageURL(s string)
SetHomepageURL sets the "homepage_url" field.
func (*OAuthClientMutation) SetIsEnabled ¶
func (m *OAuthClientMutation) SetIsEnabled(b bool)
SetIsEnabled sets the "is_enabled" field.
func (*OAuthClientMutation) SetName ¶
func (m *OAuthClientMutation) SetName(s string)
SetName sets the "name" field.
func (*OAuthClientMutation) SetOp ¶
func (m *OAuthClientMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OAuthClientMutation) SetProps ¶
func (m *OAuthClientMutation) SetProps(tacp *types.OAuthClientProps)
SetProps sets the "props" field.
func (*OAuthClientMutation) SetRawID ¶
func (m *OAuthClientMutation) SetRawID(t int)
func (*OAuthClientMutation) SetRedirectUris ¶
func (m *OAuthClientMutation) SetRedirectUris(s []string)
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientMutation) SetScopes ¶
func (m *OAuthClientMutation) SetScopes(s []string)
SetScopes sets the "scopes" field.
func (*OAuthClientMutation) SetSecret ¶
func (m *OAuthClientMutation) SetSecret(s string)
SetSecret sets the "secret" field.
func (*OAuthClientMutation) SetUpdatedAt ¶
func (m *OAuthClientMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (OAuthClientMutation) Tx ¶
func (m OAuthClientMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OAuthClientMutation) Type ¶
func (m *OAuthClientMutation) Type() string
Type returns the node type of this mutation (OAuthClient).
func (*OAuthClientMutation) UpdatedAt ¶
func (m *OAuthClientMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OAuthClientMutation) Where ¶
func (m *OAuthClientMutation) Where(ps ...predicate.OAuthClient)
Where appends a list predicates to the OAuthClientMutation builder.
func (*OAuthClientMutation) WhereP ¶
func (m *OAuthClientMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OAuthClientMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OAuthClientQuery ¶
type OAuthClientQuery struct {
// contains filtered or unexported fields
}
OAuthClientQuery is the builder for querying OAuthClient entities.
func (*OAuthClientQuery) Aggregate ¶
func (ocq *OAuthClientQuery) Aggregate(fns ...AggregateFunc) *OAuthClientSelect
Aggregate returns a OAuthClientSelect configured with the given aggregations.
func (*OAuthClientQuery) All ¶
func (ocq *OAuthClientQuery) All(ctx context.Context) ([]*OAuthClient, error)
All executes the query and returns a list of OAuthClients.
func (*OAuthClientQuery) AllX ¶
func (ocq *OAuthClientQuery) AllX(ctx context.Context) []*OAuthClient
AllX is like All, but panics if an error occurs.
func (*OAuthClientQuery) Clone ¶
func (ocq *OAuthClientQuery) Clone() *OAuthClientQuery
Clone returns a duplicate of the OAuthClientQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OAuthClientQuery) Count ¶
func (ocq *OAuthClientQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OAuthClientQuery) CountX ¶
func (ocq *OAuthClientQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OAuthClientQuery) ExecContext ¶
func (c *OAuthClientQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClientQuery) Exist ¶
func (ocq *OAuthClientQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OAuthClientQuery) ExistX ¶
func (ocq *OAuthClientQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OAuthClientQuery) First ¶
func (ocq *OAuthClientQuery) First(ctx context.Context) (*OAuthClient, error)
First returns the first OAuthClient entity from the query. Returns a *NotFoundError when no OAuthClient was found.
func (*OAuthClientQuery) FirstID ¶
func (ocq *OAuthClientQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OAuthClient ID from the query. Returns a *NotFoundError when no OAuthClient ID was found.
func (*OAuthClientQuery) FirstIDX ¶
func (ocq *OAuthClientQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OAuthClientQuery) FirstX ¶
func (ocq *OAuthClientQuery) FirstX(ctx context.Context) *OAuthClient
FirstX is like First, but panics if an error occurs.
func (*OAuthClientQuery) GroupBy ¶
func (ocq *OAuthClientQuery) GroupBy(field string, fields ...string) *OAuthClientGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.OAuthClient.Query().
GroupBy(oauthclient.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*OAuthClientQuery) IDs ¶
func (ocq *OAuthClientQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OAuthClient IDs.
func (*OAuthClientQuery) IDsX ¶
func (ocq *OAuthClientQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OAuthClientQuery) Limit ¶
func (ocq *OAuthClientQuery) Limit(limit int) *OAuthClientQuery
Limit the number of records to be returned by this query.
func (*OAuthClientQuery) Offset ¶
func (ocq *OAuthClientQuery) Offset(offset int) *OAuthClientQuery
Offset to start from.
func (*OAuthClientQuery) Only ¶
func (ocq *OAuthClientQuery) Only(ctx context.Context) (*OAuthClient, error)
Only returns a single OAuthClient entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthClient entity is found. Returns a *NotFoundError when no OAuthClient entities are found.
func (*OAuthClientQuery) OnlyID ¶
func (ocq *OAuthClientQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OAuthClient ID in the query. Returns a *NotSingularError when more than one OAuthClient ID is found. Returns a *NotFoundError when no entities are found.
func (*OAuthClientQuery) OnlyIDX ¶
func (ocq *OAuthClientQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OAuthClientQuery) OnlyX ¶
func (ocq *OAuthClientQuery) OnlyX(ctx context.Context) *OAuthClient
OnlyX is like Only, but panics if an error occurs.
func (*OAuthClientQuery) Order ¶
func (ocq *OAuthClientQuery) Order(o ...oauthclient.OrderOption) *OAuthClientQuery
Order specifies how the records should be ordered.
func (*OAuthClientQuery) QueryContext ¶
func (c *OAuthClientQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClientQuery) QueryGrants ¶
func (ocq *OAuthClientQuery) QueryGrants() *OAuthGrantQuery
QueryGrants chains the current query on the "grants" edge.
func (*OAuthClientQuery) Select ¶
func (ocq *OAuthClientQuery) Select(fields ...string) *OAuthClientSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.OAuthClient.Query().
Select(oauthclient.FieldCreatedAt).
Scan(ctx, &v)
func (*OAuthClientQuery) Unique ¶
func (ocq *OAuthClientQuery) Unique(unique bool) *OAuthClientQuery
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 (*OAuthClientQuery) Where ¶
func (ocq *OAuthClientQuery) Where(ps ...predicate.OAuthClient) *OAuthClientQuery
Where adds a new predicate for the OAuthClientQuery builder.
func (*OAuthClientQuery) WithGrants ¶
func (ocq *OAuthClientQuery) WithGrants(opts ...func(*OAuthGrantQuery)) *OAuthClientQuery
WithGrants tells the query-builder to eager-load the nodes that are connected to the "grants" edge. The optional arguments are used to configure the query builder of the edge.
type OAuthClientSelect ¶
type OAuthClientSelect struct {
*OAuthClientQuery
// contains filtered or unexported fields
}
OAuthClientSelect is the builder for selecting fields of OAuthClient entities.
func (*OAuthClientSelect) Aggregate ¶
func (ocs *OAuthClientSelect) Aggregate(fns ...AggregateFunc) *OAuthClientSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OAuthClientSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (OAuthClientSelect) ExecContext ¶
func (c OAuthClientSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClientSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (OAuthClientSelect) QueryContext ¶
func (c OAuthClientSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClientSelect) Scan ¶
func (ocs *OAuthClientSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthClientSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthClientUpdate ¶
type OAuthClientUpdate struct {
// contains filtered or unexported fields
}
OAuthClientUpdate is the builder for updating OAuthClient entities.
func (*OAuthClientUpdate) AddGrantIDs ¶
func (ocu *OAuthClientUpdate) AddGrantIDs(ids ...int) *OAuthClientUpdate
AddGrantIDs adds the "grants" edge to the OAuthGrant entity by IDs.
func (*OAuthClientUpdate) AddGrants ¶
func (ocu *OAuthClientUpdate) AddGrants(o ...*OAuthGrant) *OAuthClientUpdate
AddGrants adds the "grants" edges to the OAuthGrant entity.
func (*OAuthClientUpdate) AppendRedirectUris ¶
func (ocu *OAuthClientUpdate) AppendRedirectUris(s []string) *OAuthClientUpdate
AppendRedirectUris appends s to the "redirect_uris" field.
func (*OAuthClientUpdate) AppendScopes ¶
func (ocu *OAuthClientUpdate) AppendScopes(s []string) *OAuthClientUpdate
AppendScopes appends s to the "scopes" field.
func (*OAuthClientUpdate) ClearDeletedAt ¶
func (ocu *OAuthClientUpdate) ClearDeletedAt() *OAuthClientUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthClientUpdate) ClearGrants ¶
func (ocu *OAuthClientUpdate) ClearGrants() *OAuthClientUpdate
ClearGrants clears all "grants" edges to the OAuthGrant entity.
func (*OAuthClientUpdate) ClearHomepageURL ¶
func (ocu *OAuthClientUpdate) ClearHomepageURL() *OAuthClientUpdate
ClearHomepageURL clears the value of the "homepage_url" field.
func (*OAuthClientUpdate) Exec ¶
func (ocu *OAuthClientUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthClientUpdate) ExecContext ¶
func (c *OAuthClientUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClientUpdate) ExecX ¶
func (ocu *OAuthClientUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientUpdate) Mutation ¶
func (ocu *OAuthClientUpdate) Mutation() *OAuthClientMutation
Mutation returns the OAuthClientMutation object of the builder.
func (*OAuthClientUpdate) QueryContext ¶
func (c *OAuthClientUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClientUpdate) RemoveGrantIDs ¶
func (ocu *OAuthClientUpdate) RemoveGrantIDs(ids ...int) *OAuthClientUpdate
RemoveGrantIDs removes the "grants" edge to OAuthGrant entities by IDs.
func (*OAuthClientUpdate) RemoveGrants ¶
func (ocu *OAuthClientUpdate) RemoveGrants(o ...*OAuthGrant) *OAuthClientUpdate
RemoveGrants removes "grants" edges to OAuthGrant entities.
func (*OAuthClientUpdate) Save ¶
func (ocu *OAuthClientUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OAuthClientUpdate) SaveX ¶
func (ocu *OAuthClientUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OAuthClientUpdate) SetDeletedAt ¶
func (ocu *OAuthClientUpdate) SetDeletedAt(t time.Time) *OAuthClientUpdate
SetDeletedAt sets the "deleted_at" field.
func (*OAuthClientUpdate) SetGUID ¶
func (ocu *OAuthClientUpdate) SetGUID(s string) *OAuthClientUpdate
SetGUID sets the "guid" field.
func (*OAuthClientUpdate) SetHomepageURL ¶
func (ocu *OAuthClientUpdate) SetHomepageURL(s string) *OAuthClientUpdate
SetHomepageURL sets the "homepage_url" field.
func (*OAuthClientUpdate) SetIsEnabled ¶
func (ocu *OAuthClientUpdate) SetIsEnabled(b bool) *OAuthClientUpdate
SetIsEnabled sets the "is_enabled" field.
func (*OAuthClientUpdate) SetName ¶
func (ocu *OAuthClientUpdate) SetName(s string) *OAuthClientUpdate
SetName sets the "name" field.
func (*OAuthClientUpdate) SetNillableDeletedAt ¶
func (ocu *OAuthClientUpdate) SetNillableDeletedAt(t *time.Time) *OAuthClientUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableGUID ¶
func (ocu *OAuthClientUpdate) SetNillableGUID(s *string) *OAuthClientUpdate
SetNillableGUID sets the "guid" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableHomepageURL ¶
func (ocu *OAuthClientUpdate) SetNillableHomepageURL(s *string) *OAuthClientUpdate
SetNillableHomepageURL sets the "homepage_url" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableIsEnabled ¶
func (ocu *OAuthClientUpdate) SetNillableIsEnabled(b *bool) *OAuthClientUpdate
SetNillableIsEnabled sets the "is_enabled" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableName ¶
func (ocu *OAuthClientUpdate) SetNillableName(s *string) *OAuthClientUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableSecret ¶
func (ocu *OAuthClientUpdate) SetNillableSecret(s *string) *OAuthClientUpdate
SetNillableSecret sets the "secret" field if the given value is not nil.
func (*OAuthClientUpdate) SetProps ¶
func (ocu *OAuthClientUpdate) SetProps(tacp *types.OAuthClientProps) *OAuthClientUpdate
SetProps sets the "props" field.
func (*OAuthClientUpdate) SetRedirectUris ¶
func (ocu *OAuthClientUpdate) SetRedirectUris(s []string) *OAuthClientUpdate
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientUpdate) SetScopes ¶
func (ocu *OAuthClientUpdate) SetScopes(s []string) *OAuthClientUpdate
SetScopes sets the "scopes" field.
func (*OAuthClientUpdate) SetSecret ¶
func (ocu *OAuthClientUpdate) SetSecret(s string) *OAuthClientUpdate
SetSecret sets the "secret" field.
func (*OAuthClientUpdate) SetUpdatedAt ¶
func (ocu *OAuthClientUpdate) SetUpdatedAt(t time.Time) *OAuthClientUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OAuthClientUpdate) Where ¶
func (ocu *OAuthClientUpdate) Where(ps ...predicate.OAuthClient) *OAuthClientUpdate
Where appends a list predicates to the OAuthClientUpdate builder.
type OAuthClientUpdateOne ¶
type OAuthClientUpdateOne struct {
// contains filtered or unexported fields
}
OAuthClientUpdateOne is the builder for updating a single OAuthClient entity.
func (*OAuthClientUpdateOne) AddGrantIDs ¶
func (ocuo *OAuthClientUpdateOne) AddGrantIDs(ids ...int) *OAuthClientUpdateOne
AddGrantIDs adds the "grants" edge to the OAuthGrant entity by IDs.
func (*OAuthClientUpdateOne) AddGrants ¶
func (ocuo *OAuthClientUpdateOne) AddGrants(o ...*OAuthGrant) *OAuthClientUpdateOne
AddGrants adds the "grants" edges to the OAuthGrant entity.
func (*OAuthClientUpdateOne) AppendRedirectUris ¶
func (ocuo *OAuthClientUpdateOne) AppendRedirectUris(s []string) *OAuthClientUpdateOne
AppendRedirectUris appends s to the "redirect_uris" field.
func (*OAuthClientUpdateOne) AppendScopes ¶
func (ocuo *OAuthClientUpdateOne) AppendScopes(s []string) *OAuthClientUpdateOne
AppendScopes appends s to the "scopes" field.
func (*OAuthClientUpdateOne) ClearDeletedAt ¶
func (ocuo *OAuthClientUpdateOne) ClearDeletedAt() *OAuthClientUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthClientUpdateOne) ClearGrants ¶
func (ocuo *OAuthClientUpdateOne) ClearGrants() *OAuthClientUpdateOne
ClearGrants clears all "grants" edges to the OAuthGrant entity.
func (*OAuthClientUpdateOne) ClearHomepageURL ¶
func (ocuo *OAuthClientUpdateOne) ClearHomepageURL() *OAuthClientUpdateOne
ClearHomepageURL clears the value of the "homepage_url" field.
func (*OAuthClientUpdateOne) Exec ¶
func (ocuo *OAuthClientUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OAuthClientUpdateOne) ExecContext ¶
func (c *OAuthClientUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthClientUpdateOne) ExecX ¶
func (ocuo *OAuthClientUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientUpdateOne) Mutation ¶
func (ocuo *OAuthClientUpdateOne) Mutation() *OAuthClientMutation
Mutation returns the OAuthClientMutation object of the builder.
func (*OAuthClientUpdateOne) QueryContext ¶
func (c *OAuthClientUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthClientUpdateOne) RemoveGrantIDs ¶
func (ocuo *OAuthClientUpdateOne) RemoveGrantIDs(ids ...int) *OAuthClientUpdateOne
RemoveGrantIDs removes the "grants" edge to OAuthGrant entities by IDs.
func (*OAuthClientUpdateOne) RemoveGrants ¶
func (ocuo *OAuthClientUpdateOne) RemoveGrants(o ...*OAuthGrant) *OAuthClientUpdateOne
RemoveGrants removes "grants" edges to OAuthGrant entities.
func (*OAuthClientUpdateOne) Save ¶
func (ocuo *OAuthClientUpdateOne) Save(ctx context.Context) (*OAuthClient, error)
Save executes the query and returns the updated OAuthClient entity.
func (*OAuthClientUpdateOne) SaveX ¶
func (ocuo *OAuthClientUpdateOne) SaveX(ctx context.Context) *OAuthClient
SaveX is like Save, but panics if an error occurs.
func (*OAuthClientUpdateOne) Select ¶
func (ocuo *OAuthClientUpdateOne) Select(field string, fields ...string) *OAuthClientUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OAuthClientUpdateOne) SetDeletedAt ¶
func (ocuo *OAuthClientUpdateOne) SetDeletedAt(t time.Time) *OAuthClientUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*OAuthClientUpdateOne) SetGUID ¶
func (ocuo *OAuthClientUpdateOne) SetGUID(s string) *OAuthClientUpdateOne
SetGUID sets the "guid" field.
func (*OAuthClientUpdateOne) SetHomepageURL ¶
func (ocuo *OAuthClientUpdateOne) SetHomepageURL(s string) *OAuthClientUpdateOne
SetHomepageURL sets the "homepage_url" field.
func (*OAuthClientUpdateOne) SetIsEnabled ¶
func (ocuo *OAuthClientUpdateOne) SetIsEnabled(b bool) *OAuthClientUpdateOne
SetIsEnabled sets the "is_enabled" field.
func (*OAuthClientUpdateOne) SetName ¶
func (ocuo *OAuthClientUpdateOne) SetName(s string) *OAuthClientUpdateOne
SetName sets the "name" field.
func (*OAuthClientUpdateOne) SetNillableDeletedAt ¶
func (ocuo *OAuthClientUpdateOne) SetNillableDeletedAt(t *time.Time) *OAuthClientUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableGUID ¶
func (ocuo *OAuthClientUpdateOne) SetNillableGUID(s *string) *OAuthClientUpdateOne
SetNillableGUID sets the "guid" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableHomepageURL ¶
func (ocuo *OAuthClientUpdateOne) SetNillableHomepageURL(s *string) *OAuthClientUpdateOne
SetNillableHomepageURL sets the "homepage_url" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableIsEnabled ¶
func (ocuo *OAuthClientUpdateOne) SetNillableIsEnabled(b *bool) *OAuthClientUpdateOne
SetNillableIsEnabled sets the "is_enabled" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableName ¶
func (ocuo *OAuthClientUpdateOne) SetNillableName(s *string) *OAuthClientUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableSecret ¶
func (ocuo *OAuthClientUpdateOne) SetNillableSecret(s *string) *OAuthClientUpdateOne
SetNillableSecret sets the "secret" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetProps ¶
func (ocuo *OAuthClientUpdateOne) SetProps(tacp *types.OAuthClientProps) *OAuthClientUpdateOne
SetProps sets the "props" field.
func (*OAuthClientUpdateOne) SetRedirectUris ¶
func (ocuo *OAuthClientUpdateOne) SetRedirectUris(s []string) *OAuthClientUpdateOne
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientUpdateOne) SetScopes ¶
func (ocuo *OAuthClientUpdateOne) SetScopes(s []string) *OAuthClientUpdateOne
SetScopes sets the "scopes" field.
func (*OAuthClientUpdateOne) SetSecret ¶
func (ocuo *OAuthClientUpdateOne) SetSecret(s string) *OAuthClientUpdateOne
SetSecret sets the "secret" field.
func (*OAuthClientUpdateOne) SetUpdatedAt ¶
func (ocuo *OAuthClientUpdateOne) SetUpdatedAt(t time.Time) *OAuthClientUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OAuthClientUpdateOne) Where ¶
func (ocuo *OAuthClientUpdateOne) Where(ps ...predicate.OAuthClient) *OAuthClientUpdateOne
Where appends a list predicates to the OAuthClientUpdate builder.
type OAuthClientUpsert ¶
OAuthClientUpsert is the "OnConflict" setter.
func (*OAuthClientUpsert) ClearDeletedAt ¶
func (u *OAuthClientUpsert) ClearDeletedAt() *OAuthClientUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthClientUpsert) ClearHomepageURL ¶
func (u *OAuthClientUpsert) ClearHomepageURL() *OAuthClientUpsert
ClearHomepageURL clears the value of the "homepage_url" field.
func (*OAuthClientUpsert) SetDeletedAt ¶
func (u *OAuthClientUpsert) SetDeletedAt(v time.Time) *OAuthClientUpsert
SetDeletedAt sets the "deleted_at" field.
func (*OAuthClientUpsert) SetGUID ¶
func (u *OAuthClientUpsert) SetGUID(v string) *OAuthClientUpsert
SetGUID sets the "guid" field.
func (*OAuthClientUpsert) SetHomepageURL ¶
func (u *OAuthClientUpsert) SetHomepageURL(v string) *OAuthClientUpsert
SetHomepageURL sets the "homepage_url" field.
func (*OAuthClientUpsert) SetIsEnabled ¶
func (u *OAuthClientUpsert) SetIsEnabled(v bool) *OAuthClientUpsert
SetIsEnabled sets the "is_enabled" field.
func (*OAuthClientUpsert) SetName ¶
func (u *OAuthClientUpsert) SetName(v string) *OAuthClientUpsert
SetName sets the "name" field.
func (*OAuthClientUpsert) SetProps ¶
func (u *OAuthClientUpsert) SetProps(v *types.OAuthClientProps) *OAuthClientUpsert
SetProps sets the "props" field.
func (*OAuthClientUpsert) SetRedirectUris ¶
func (u *OAuthClientUpsert) SetRedirectUris(v []string) *OAuthClientUpsert
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientUpsert) SetScopes ¶
func (u *OAuthClientUpsert) SetScopes(v []string) *OAuthClientUpsert
SetScopes sets the "scopes" field.
func (*OAuthClientUpsert) SetSecret ¶
func (u *OAuthClientUpsert) SetSecret(v string) *OAuthClientUpsert
SetSecret sets the "secret" field.
func (*OAuthClientUpsert) SetUpdatedAt ¶
func (u *OAuthClientUpsert) SetUpdatedAt(v time.Time) *OAuthClientUpsert
SetUpdatedAt sets the "updated_at" field.
func (*OAuthClientUpsert) UpdateDeletedAt ¶
func (u *OAuthClientUpsert) UpdateDeletedAt() *OAuthClientUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*OAuthClientUpsert) UpdateGUID ¶
func (u *OAuthClientUpsert) UpdateGUID() *OAuthClientUpsert
UpdateGUID sets the "guid" field to the value that was provided on create.
func (*OAuthClientUpsert) UpdateHomepageURL ¶
func (u *OAuthClientUpsert) UpdateHomepageURL() *OAuthClientUpsert
UpdateHomepageURL sets the "homepage_url" field to the value that was provided on create.
func (*OAuthClientUpsert) UpdateIsEnabled ¶
func (u *OAuthClientUpsert) UpdateIsEnabled() *OAuthClientUpsert
UpdateIsEnabled sets the "is_enabled" field to the value that was provided on create.
func (*OAuthClientUpsert) UpdateName ¶
func (u *OAuthClientUpsert) UpdateName() *OAuthClientUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*OAuthClientUpsert) UpdateProps ¶
func (u *OAuthClientUpsert) UpdateProps() *OAuthClientUpsert
UpdateProps sets the "props" field to the value that was provided on create.
func (*OAuthClientUpsert) UpdateRedirectUris ¶
func (u *OAuthClientUpsert) UpdateRedirectUris() *OAuthClientUpsert
UpdateRedirectUris sets the "redirect_uris" field to the value that was provided on create.
func (*OAuthClientUpsert) UpdateScopes ¶
func (u *OAuthClientUpsert) UpdateScopes() *OAuthClientUpsert
UpdateScopes sets the "scopes" field to the value that was provided on create.
func (*OAuthClientUpsert) UpdateSecret ¶
func (u *OAuthClientUpsert) UpdateSecret() *OAuthClientUpsert
UpdateSecret sets the "secret" field to the value that was provided on create.
func (*OAuthClientUpsert) UpdateUpdatedAt ¶
func (u *OAuthClientUpsert) UpdateUpdatedAt() *OAuthClientUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type OAuthClientUpsertBulk ¶
type OAuthClientUpsertBulk struct {
// contains filtered or unexported fields
}
OAuthClientUpsertBulk is the builder for "upsert"-ing a bulk of OAuthClient nodes.
func (*OAuthClientUpsertBulk) ClearDeletedAt ¶
func (u *OAuthClientUpsertBulk) ClearDeletedAt() *OAuthClientUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthClientUpsertBulk) ClearHomepageURL ¶
func (u *OAuthClientUpsertBulk) ClearHomepageURL() *OAuthClientUpsertBulk
ClearHomepageURL clears the value of the "homepage_url" field.
func (*OAuthClientUpsertBulk) DoNothing ¶
func (u *OAuthClientUpsertBulk) DoNothing() *OAuthClientUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OAuthClientUpsertBulk) Exec ¶
func (u *OAuthClientUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthClientUpsertBulk) ExecX ¶
func (u *OAuthClientUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientUpsertBulk) Ignore ¶
func (u *OAuthClientUpsertBulk) Ignore() *OAuthClientUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.OAuthClient.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OAuthClientUpsertBulk) SetDeletedAt ¶
func (u *OAuthClientUpsertBulk) SetDeletedAt(v time.Time) *OAuthClientUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*OAuthClientUpsertBulk) SetGUID ¶
func (u *OAuthClientUpsertBulk) SetGUID(v string) *OAuthClientUpsertBulk
SetGUID sets the "guid" field.
func (*OAuthClientUpsertBulk) SetHomepageURL ¶
func (u *OAuthClientUpsertBulk) SetHomepageURL(v string) *OAuthClientUpsertBulk
SetHomepageURL sets the "homepage_url" field.
func (*OAuthClientUpsertBulk) SetIsEnabled ¶
func (u *OAuthClientUpsertBulk) SetIsEnabled(v bool) *OAuthClientUpsertBulk
SetIsEnabled sets the "is_enabled" field.
func (*OAuthClientUpsertBulk) SetName ¶
func (u *OAuthClientUpsertBulk) SetName(v string) *OAuthClientUpsertBulk
SetName sets the "name" field.
func (*OAuthClientUpsertBulk) SetProps ¶
func (u *OAuthClientUpsertBulk) SetProps(v *types.OAuthClientProps) *OAuthClientUpsertBulk
SetProps sets the "props" field.
func (*OAuthClientUpsertBulk) SetRedirectUris ¶
func (u *OAuthClientUpsertBulk) SetRedirectUris(v []string) *OAuthClientUpsertBulk
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientUpsertBulk) SetScopes ¶
func (u *OAuthClientUpsertBulk) SetScopes(v []string) *OAuthClientUpsertBulk
SetScopes sets the "scopes" field.
func (*OAuthClientUpsertBulk) SetSecret ¶
func (u *OAuthClientUpsertBulk) SetSecret(v string) *OAuthClientUpsertBulk
SetSecret sets the "secret" field.
func (*OAuthClientUpsertBulk) SetUpdatedAt ¶
func (u *OAuthClientUpsertBulk) SetUpdatedAt(v time.Time) *OAuthClientUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*OAuthClientUpsertBulk) Update ¶
func (u *OAuthClientUpsertBulk) Update(set func(*OAuthClientUpsert)) *OAuthClientUpsertBulk
Update allows overriding fields `UPDATE` values. See the OAuthClientCreateBulk.OnConflict documentation for more info.
func (*OAuthClientUpsertBulk) UpdateDeletedAt ¶
func (u *OAuthClientUpsertBulk) UpdateDeletedAt() *OAuthClientUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*OAuthClientUpsertBulk) UpdateGUID ¶
func (u *OAuthClientUpsertBulk) UpdateGUID() *OAuthClientUpsertBulk
UpdateGUID sets the "guid" field to the value that was provided on create.
func (*OAuthClientUpsertBulk) UpdateHomepageURL ¶
func (u *OAuthClientUpsertBulk) UpdateHomepageURL() *OAuthClientUpsertBulk
UpdateHomepageURL sets the "homepage_url" field to the value that was provided on create.
func (*OAuthClientUpsertBulk) UpdateIsEnabled ¶
func (u *OAuthClientUpsertBulk) UpdateIsEnabled() *OAuthClientUpsertBulk
UpdateIsEnabled sets the "is_enabled" field to the value that was provided on create.
func (*OAuthClientUpsertBulk) UpdateName ¶
func (u *OAuthClientUpsertBulk) UpdateName() *OAuthClientUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*OAuthClientUpsertBulk) UpdateNewValues ¶
func (u *OAuthClientUpsertBulk) UpdateNewValues() *OAuthClientUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.OAuthClient.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*OAuthClientUpsertBulk) UpdateProps ¶
func (u *OAuthClientUpsertBulk) UpdateProps() *OAuthClientUpsertBulk
UpdateProps sets the "props" field to the value that was provided on create.
func (*OAuthClientUpsertBulk) UpdateRedirectUris ¶
func (u *OAuthClientUpsertBulk) UpdateRedirectUris() *OAuthClientUpsertBulk
UpdateRedirectUris sets the "redirect_uris" field to the value that was provided on create.
func (*OAuthClientUpsertBulk) UpdateScopes ¶
func (u *OAuthClientUpsertBulk) UpdateScopes() *OAuthClientUpsertBulk
UpdateScopes sets the "scopes" field to the value that was provided on create.
func (*OAuthClientUpsertBulk) UpdateSecret ¶
func (u *OAuthClientUpsertBulk) UpdateSecret() *OAuthClientUpsertBulk
UpdateSecret sets the "secret" field to the value that was provided on create.
func (*OAuthClientUpsertBulk) UpdateUpdatedAt ¶
func (u *OAuthClientUpsertBulk) UpdateUpdatedAt() *OAuthClientUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type OAuthClientUpsertOne ¶
type OAuthClientUpsertOne struct {
// contains filtered or unexported fields
}
OAuthClientUpsertOne is the builder for "upsert"-ing
one OAuthClient node.
func (*OAuthClientUpsertOne) ClearDeletedAt ¶
func (u *OAuthClientUpsertOne) ClearDeletedAt() *OAuthClientUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthClientUpsertOne) ClearHomepageURL ¶
func (u *OAuthClientUpsertOne) ClearHomepageURL() *OAuthClientUpsertOne
ClearHomepageURL clears the value of the "homepage_url" field.
func (*OAuthClientUpsertOne) DoNothing ¶
func (u *OAuthClientUpsertOne) DoNothing() *OAuthClientUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OAuthClientUpsertOne) Exec ¶
func (u *OAuthClientUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthClientUpsertOne) ExecX ¶
func (u *OAuthClientUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientUpsertOne) ID ¶
func (u *OAuthClientUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*OAuthClientUpsertOne) IDX ¶
func (u *OAuthClientUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*OAuthClientUpsertOne) Ignore ¶
func (u *OAuthClientUpsertOne) Ignore() *OAuthClientUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.OAuthClient.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*OAuthClientUpsertOne) SetDeletedAt ¶
func (u *OAuthClientUpsertOne) SetDeletedAt(v time.Time) *OAuthClientUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*OAuthClientUpsertOne) SetGUID ¶
func (u *OAuthClientUpsertOne) SetGUID(v string) *OAuthClientUpsertOne
SetGUID sets the "guid" field.
func (*OAuthClientUpsertOne) SetHomepageURL ¶
func (u *OAuthClientUpsertOne) SetHomepageURL(v string) *OAuthClientUpsertOne
SetHomepageURL sets the "homepage_url" field.
func (*OAuthClientUpsertOne) SetIsEnabled ¶
func (u *OAuthClientUpsertOne) SetIsEnabled(v bool) *OAuthClientUpsertOne
SetIsEnabled sets the "is_enabled" field.
func (*OAuthClientUpsertOne) SetName ¶
func (u *OAuthClientUpsertOne) SetName(v string) *OAuthClientUpsertOne
SetName sets the "name" field.
func (*OAuthClientUpsertOne) SetProps ¶
func (u *OAuthClientUpsertOne) SetProps(v *types.OAuthClientProps) *OAuthClientUpsertOne
SetProps sets the "props" field.
func (*OAuthClientUpsertOne) SetRedirectUris ¶
func (u *OAuthClientUpsertOne) SetRedirectUris(v []string) *OAuthClientUpsertOne
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientUpsertOne) SetScopes ¶
func (u *OAuthClientUpsertOne) SetScopes(v []string) *OAuthClientUpsertOne
SetScopes sets the "scopes" field.
func (*OAuthClientUpsertOne) SetSecret ¶
func (u *OAuthClientUpsertOne) SetSecret(v string) *OAuthClientUpsertOne
SetSecret sets the "secret" field.
func (*OAuthClientUpsertOne) SetUpdatedAt ¶
func (u *OAuthClientUpsertOne) SetUpdatedAt(v time.Time) *OAuthClientUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*OAuthClientUpsertOne) Update ¶
func (u *OAuthClientUpsertOne) Update(set func(*OAuthClientUpsert)) *OAuthClientUpsertOne
Update allows overriding fields `UPDATE` values. See the OAuthClientCreate.OnConflict documentation for more info.
func (*OAuthClientUpsertOne) UpdateDeletedAt ¶
func (u *OAuthClientUpsertOne) UpdateDeletedAt() *OAuthClientUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*OAuthClientUpsertOne) UpdateGUID ¶
func (u *OAuthClientUpsertOne) UpdateGUID() *OAuthClientUpsertOne
UpdateGUID sets the "guid" field to the value that was provided on create.
func (*OAuthClientUpsertOne) UpdateHomepageURL ¶
func (u *OAuthClientUpsertOne) UpdateHomepageURL() *OAuthClientUpsertOne
UpdateHomepageURL sets the "homepage_url" field to the value that was provided on create.
func (*OAuthClientUpsertOne) UpdateIsEnabled ¶
func (u *OAuthClientUpsertOne) UpdateIsEnabled() *OAuthClientUpsertOne
UpdateIsEnabled sets the "is_enabled" field to the value that was provided on create.
func (*OAuthClientUpsertOne) UpdateName ¶
func (u *OAuthClientUpsertOne) UpdateName() *OAuthClientUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*OAuthClientUpsertOne) UpdateNewValues ¶
func (u *OAuthClientUpsertOne) UpdateNewValues() *OAuthClientUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.OAuthClient.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*OAuthClientUpsertOne) UpdateProps ¶
func (u *OAuthClientUpsertOne) UpdateProps() *OAuthClientUpsertOne
UpdateProps sets the "props" field to the value that was provided on create.
func (*OAuthClientUpsertOne) UpdateRedirectUris ¶
func (u *OAuthClientUpsertOne) UpdateRedirectUris() *OAuthClientUpsertOne
UpdateRedirectUris sets the "redirect_uris" field to the value that was provided on create.
func (*OAuthClientUpsertOne) UpdateScopes ¶
func (u *OAuthClientUpsertOne) UpdateScopes() *OAuthClientUpsertOne
UpdateScopes sets the "scopes" field to the value that was provided on create.
func (*OAuthClientUpsertOne) UpdateSecret ¶
func (u *OAuthClientUpsertOne) UpdateSecret() *OAuthClientUpsertOne
UpdateSecret sets the "secret" field to the value that was provided on create.
func (*OAuthClientUpsertOne) UpdateUpdatedAt ¶
func (u *OAuthClientUpsertOne) UpdateUpdatedAt() *OAuthClientUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type OAuthClients ¶
type OAuthClients []*OAuthClient
OAuthClients is a parsable slice of OAuthClient.
type OAuthGrant ¶
type OAuthGrant struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// UserID holds the value of the "user_id" field.
UserID int `json:"user_id,omitempty"`
// ClientID holds the value of the "client_id" field.
ClientID int `json:"client_id,omitempty"`
// Scopes holds the value of the "scopes" field.
Scopes []string `json:"scopes,omitempty"`
// LastUsedAt holds the value of the "last_used_at" field.
LastUsedAt *time.Time `json:"last_used_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the OAuthGrantQuery when eager-loading is set.
Edges OAuthGrantEdges `json:"edges"`
// contains filtered or unexported fields
}
OAuthGrant is the model entity for the OAuthGrant schema.
func (*OAuthGrant) ExecContext ¶
func (c *OAuthGrant) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrant) QueryClient ¶
func (og *OAuthGrant) QueryClient() *OAuthClientQuery
QueryClient queries the "client" edge of the OAuthGrant entity.
func (*OAuthGrant) QueryContext ¶
func (c *OAuthGrant) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrant) QueryUser ¶
func (og *OAuthGrant) QueryUser() *UserQuery
QueryUser queries the "user" edge of the OAuthGrant entity.
func (*OAuthGrant) SetClient ¶
func (e *OAuthGrant) SetClient(v *OAuthClient)
SetClient manually set the edge as loaded state.
func (*OAuthGrant) SetUser ¶
func (e *OAuthGrant) SetUser(v *User)
SetUser manually set the edge as loaded state.
func (*OAuthGrant) String ¶
func (og *OAuthGrant) String() string
String implements the fmt.Stringer.
func (*OAuthGrant) Unwrap ¶
func (og *OAuthGrant) Unwrap() *OAuthGrant
Unwrap unwraps the OAuthGrant 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 (*OAuthGrant) Update ¶
func (og *OAuthGrant) Update() *OAuthGrantUpdateOne
Update returns a builder for updating this OAuthGrant. Note that you need to call OAuthGrant.Unwrap() before calling this method if this OAuthGrant was returned from a transaction, and the transaction was committed or rolled back.
type OAuthGrantClient ¶
type OAuthGrantClient struct {
// contains filtered or unexported fields
}
OAuthGrantClient is a client for the OAuthGrant schema.
func NewOAuthGrantClient ¶
func NewOAuthGrantClient(c config) *OAuthGrantClient
NewOAuthGrantClient returns a client for the OAuthGrant from the given config.
func (*OAuthGrantClient) Create ¶
func (c *OAuthGrantClient) Create() *OAuthGrantCreate
Create returns a builder for creating a OAuthGrant entity.
func (*OAuthGrantClient) CreateBulk ¶
func (c *OAuthGrantClient) CreateBulk(builders ...*OAuthGrantCreate) *OAuthGrantCreateBulk
CreateBulk returns a builder for creating a bulk of OAuthGrant entities.
func (*OAuthGrantClient) Delete ¶
func (c *OAuthGrantClient) Delete() *OAuthGrantDelete
Delete returns a delete builder for OAuthGrant.
func (*OAuthGrantClient) DeleteOne ¶
func (c *OAuthGrantClient) DeleteOne(og *OAuthGrant) *OAuthGrantDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OAuthGrantClient) DeleteOneID ¶
func (c *OAuthGrantClient) DeleteOneID(id int) *OAuthGrantDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OAuthGrantClient) ExecContext ¶
func (c *OAuthGrantClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrantClient) Get ¶
func (c *OAuthGrantClient) Get(ctx context.Context, id int) (*OAuthGrant, error)
Get returns a OAuthGrant entity by its id.
func (*OAuthGrantClient) GetX ¶
func (c *OAuthGrantClient) GetX(ctx context.Context, id int) *OAuthGrant
GetX is like Get, but panics if an error occurs.
func (*OAuthGrantClient) Hooks ¶
func (c *OAuthGrantClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OAuthGrantClient) Intercept ¶
func (c *OAuthGrantClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthgrant.Intercept(f(g(h())))`.
func (*OAuthGrantClient) Interceptors ¶
func (c *OAuthGrantClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OAuthGrantClient) MapCreateBulk ¶
func (c *OAuthGrantClient) MapCreateBulk(slice any, setFunc func(*OAuthGrantCreate, int)) *OAuthGrantCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*OAuthGrantClient) Query ¶
func (c *OAuthGrantClient) Query() *OAuthGrantQuery
Query returns a query builder for OAuthGrant.
func (*OAuthGrantClient) QueryClient ¶
func (c *OAuthGrantClient) QueryClient(og *OAuthGrant) *OAuthClientQuery
QueryClient queries the client edge of a OAuthGrant.
func (*OAuthGrantClient) QueryContext ¶
func (c *OAuthGrantClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrantClient) QueryUser ¶
func (c *OAuthGrantClient) QueryUser(og *OAuthGrant) *UserQuery
QueryUser queries the user edge of a OAuthGrant.
func (*OAuthGrantClient) Update ¶
func (c *OAuthGrantClient) Update() *OAuthGrantUpdate
Update returns an update builder for OAuthGrant.
func (*OAuthGrantClient) UpdateOne ¶
func (c *OAuthGrantClient) UpdateOne(og *OAuthGrant) *OAuthGrantUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OAuthGrantClient) UpdateOneID ¶
func (c *OAuthGrantClient) UpdateOneID(id int) *OAuthGrantUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OAuthGrantClient) Use ¶
func (c *OAuthGrantClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthgrant.Hooks(f(g(h())))`.
type OAuthGrantCreate ¶
type OAuthGrantCreate struct {
// contains filtered or unexported fields
}
OAuthGrantCreate is the builder for creating a OAuthGrant entity.
func (*OAuthGrantCreate) Exec ¶
func (ogc *OAuthGrantCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthGrantCreate) ExecContext ¶
func (c *OAuthGrantCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrantCreate) ExecX ¶
func (ogc *OAuthGrantCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthGrantCreate) Mutation ¶
func (ogc *OAuthGrantCreate) Mutation() *OAuthGrantMutation
Mutation returns the OAuthGrantMutation object of the builder.
func (*OAuthGrantCreate) OnConflict ¶
func (ogc *OAuthGrantCreate) OnConflict(opts ...sql.ConflictOption) *OAuthGrantUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.OAuthGrant.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.OAuthGrantUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*OAuthGrantCreate) OnConflictColumns ¶
func (ogc *OAuthGrantCreate) OnConflictColumns(columns ...string) *OAuthGrantUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.OAuthGrant.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OAuthGrantCreate) QueryContext ¶
func (c *OAuthGrantCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrantCreate) Save ¶
func (ogc *OAuthGrantCreate) Save(ctx context.Context) (*OAuthGrant, error)
Save creates the OAuthGrant in the database.
func (*OAuthGrantCreate) SaveX ¶
func (ogc *OAuthGrantCreate) SaveX(ctx context.Context) *OAuthGrant
SaveX calls Save and panics if Save returns an error.
func (*OAuthGrantCreate) SetClient ¶
func (ogc *OAuthGrantCreate) SetClient(o *OAuthClient) *OAuthGrantCreate
SetClient sets the "client" edge to the OAuthClient entity.
func (*OAuthGrantCreate) SetClientID ¶
func (ogc *OAuthGrantCreate) SetClientID(i int) *OAuthGrantCreate
SetClientID sets the "client_id" field.
func (*OAuthGrantCreate) SetCreatedAt ¶
func (ogc *OAuthGrantCreate) SetCreatedAt(t time.Time) *OAuthGrantCreate
SetCreatedAt sets the "created_at" field.
func (*OAuthGrantCreate) SetDeletedAt ¶
func (ogc *OAuthGrantCreate) SetDeletedAt(t time.Time) *OAuthGrantCreate
SetDeletedAt sets the "deleted_at" field.
func (*OAuthGrantCreate) SetLastUsedAt ¶
func (ogc *OAuthGrantCreate) SetLastUsedAt(t time.Time) *OAuthGrantCreate
SetLastUsedAt sets the "last_used_at" field.
func (*OAuthGrantCreate) SetNillableCreatedAt ¶
func (ogc *OAuthGrantCreate) SetNillableCreatedAt(t *time.Time) *OAuthGrantCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OAuthGrantCreate) SetNillableDeletedAt ¶
func (ogc *OAuthGrantCreate) SetNillableDeletedAt(t *time.Time) *OAuthGrantCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OAuthGrantCreate) SetNillableLastUsedAt ¶
func (ogc *OAuthGrantCreate) SetNillableLastUsedAt(t *time.Time) *OAuthGrantCreate
SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.
func (*OAuthGrantCreate) SetNillableUpdatedAt ¶
func (ogc *OAuthGrantCreate) SetNillableUpdatedAt(t *time.Time) *OAuthGrantCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OAuthGrantCreate) SetRawID ¶
func (m *OAuthGrantCreate) SetRawID(t int) *OAuthGrantCreate
func (*OAuthGrantCreate) SetScopes ¶
func (ogc *OAuthGrantCreate) SetScopes(s []string) *OAuthGrantCreate
SetScopes sets the "scopes" field.
func (*OAuthGrantCreate) SetUpdatedAt ¶
func (ogc *OAuthGrantCreate) SetUpdatedAt(t time.Time) *OAuthGrantCreate
SetUpdatedAt sets the "updated_at" field.
func (*OAuthGrantCreate) SetUser ¶
func (ogc *OAuthGrantCreate) SetUser(u *User) *OAuthGrantCreate
SetUser sets the "user" edge to the User entity.
func (*OAuthGrantCreate) SetUserID ¶
func (ogc *OAuthGrantCreate) SetUserID(i int) *OAuthGrantCreate
SetUserID sets the "user_id" field.
type OAuthGrantCreateBulk ¶
type OAuthGrantCreateBulk struct {
// contains filtered or unexported fields
}
OAuthGrantCreateBulk is the builder for creating many OAuthGrant entities in bulk.
func (*OAuthGrantCreateBulk) Exec ¶
func (ogcb *OAuthGrantCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthGrantCreateBulk) ExecContext ¶
func (c *OAuthGrantCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrantCreateBulk) ExecX ¶
func (ogcb *OAuthGrantCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthGrantCreateBulk) OnConflict ¶
func (ogcb *OAuthGrantCreateBulk) OnConflict(opts ...sql.ConflictOption) *OAuthGrantUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.OAuthGrant.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.OAuthGrantUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*OAuthGrantCreateBulk) OnConflictColumns ¶
func (ogcb *OAuthGrantCreateBulk) OnConflictColumns(columns ...string) *OAuthGrantUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.OAuthGrant.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OAuthGrantCreateBulk) QueryContext ¶
func (c *OAuthGrantCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrantCreateBulk) Save ¶
func (ogcb *OAuthGrantCreateBulk) Save(ctx context.Context) ([]*OAuthGrant, error)
Save creates the OAuthGrant entities in the database.
func (*OAuthGrantCreateBulk) SaveX ¶
func (ogcb *OAuthGrantCreateBulk) SaveX(ctx context.Context) []*OAuthGrant
SaveX is like Save, but panics if an error occurs.
type OAuthGrantDelete ¶
type OAuthGrantDelete struct {
// contains filtered or unexported fields
}
OAuthGrantDelete is the builder for deleting a OAuthGrant entity.
func (*OAuthGrantDelete) Exec ¶
func (ogd *OAuthGrantDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OAuthGrantDelete) ExecContext ¶
func (c *OAuthGrantDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrantDelete) ExecX ¶
func (ogd *OAuthGrantDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OAuthGrantDelete) QueryContext ¶
func (c *OAuthGrantDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrantDelete) Where ¶
func (ogd *OAuthGrantDelete) Where(ps ...predicate.OAuthGrant) *OAuthGrantDelete
Where appends a list predicates to the OAuthGrantDelete builder.
type OAuthGrantDeleteOne ¶
type OAuthGrantDeleteOne struct {
// contains filtered or unexported fields
}
OAuthGrantDeleteOne is the builder for deleting a single OAuthGrant entity.
func (*OAuthGrantDeleteOne) Exec ¶
func (ogdo *OAuthGrantDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OAuthGrantDeleteOne) ExecX ¶
func (ogdo *OAuthGrantDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthGrantDeleteOne) Where ¶
func (ogdo *OAuthGrantDeleteOne) Where(ps ...predicate.OAuthGrant) *OAuthGrantDeleteOne
Where appends a list predicates to the OAuthGrantDelete builder.
type OAuthGrantEdges ¶
type OAuthGrantEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// Client holds the value of the client edge.
Client *OAuthClient `json:"client,omitempty"`
// contains filtered or unexported fields
}
OAuthGrantEdges holds the relations/edges for other nodes in the graph.
func (OAuthGrantEdges) ClientOrErr ¶
func (e OAuthGrantEdges) ClientOrErr() (*OAuthClient, error)
ClientOrErr returns the Client value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OAuthGrantEdges) UserOrErr ¶
func (e OAuthGrantEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type OAuthGrantGroupBy ¶
type OAuthGrantGroupBy struct {
// contains filtered or unexported fields
}
OAuthGrantGroupBy is the group-by builder for OAuthGrant entities.
func (*OAuthGrantGroupBy) Aggregate ¶
func (oggb *OAuthGrantGroupBy) Aggregate(fns ...AggregateFunc) *OAuthGrantGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OAuthGrantGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthGrantGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthGrantGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthGrantGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthGrantGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthGrantGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthGrantGroupBy) Scan ¶
func (oggb *OAuthGrantGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthGrantGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthGrantMutation ¶
type OAuthGrantMutation struct {
// contains filtered or unexported fields
}
OAuthGrantMutation represents an operation that mutates the OAuthGrant nodes in the graph.
func (*OAuthGrantMutation) AddField ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) AddedEdges ¶
func (m *OAuthGrantMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OAuthGrantMutation) AddedField ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) AddedFields ¶
func (m *OAuthGrantMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OAuthGrantMutation) AddedIDs ¶
func (m *OAuthGrantMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OAuthGrantMutation) AppendScopes ¶
func (m *OAuthGrantMutation) AppendScopes(s []string)
AppendScopes adds s to the "scopes" field.
func (*OAuthGrantMutation) AppendedScopes ¶
func (m *OAuthGrantMutation) AppendedScopes() ([]string, bool)
AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.
func (*OAuthGrantMutation) ClearClient ¶
func (m *OAuthGrantMutation) ClearClient()
ClearClient clears the "client" edge to the OAuthClient entity.
func (*OAuthGrantMutation) ClearDeletedAt ¶
func (m *OAuthGrantMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthGrantMutation) ClearEdge ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) ClearField ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) ClearLastUsedAt ¶
func (m *OAuthGrantMutation) ClearLastUsedAt()
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*OAuthGrantMutation) ClearUser ¶
func (m *OAuthGrantMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*OAuthGrantMutation) ClearedEdges ¶
func (m *OAuthGrantMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OAuthGrantMutation) ClearedFields ¶
func (m *OAuthGrantMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OAuthGrantMutation) Client ¶
func (m OAuthGrantMutation) 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 (*OAuthGrantMutation) ClientCleared ¶
func (m *OAuthGrantMutation) ClientCleared() bool
ClientCleared reports if the "client" edge to the OAuthClient entity was cleared.
func (*OAuthGrantMutation) ClientID ¶
func (m *OAuthGrantMutation) ClientID() (r int, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*OAuthGrantMutation) ClientIDs ¶
func (m *OAuthGrantMutation) ClientIDs() (ids []int)
ClientIDs returns the "client" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ClientID instead. It exists only for internal usage by the builders.
func (*OAuthGrantMutation) CreatedAt ¶
func (m *OAuthGrantMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OAuthGrantMutation) DeletedAt ¶
func (m *OAuthGrantMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*OAuthGrantMutation) DeletedAtCleared ¶
func (m *OAuthGrantMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*OAuthGrantMutation) EdgeCleared ¶
func (m *OAuthGrantMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OAuthGrantMutation) ExecContext ¶
func (c *OAuthGrantMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrantMutation) Field ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) FieldCleared ¶
func (m *OAuthGrantMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OAuthGrantMutation) Fields ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) ID ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) IDs ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) LastUsedAt ¶
func (m *OAuthGrantMutation) LastUsedAt() (r time.Time, exists bool)
LastUsedAt returns the value of the "last_used_at" field in the mutation.
func (*OAuthGrantMutation) LastUsedAtCleared ¶
func (m *OAuthGrantMutation) LastUsedAtCleared() bool
LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.
func (*OAuthGrantMutation) OldClientID ¶
func (m *OAuthGrantMutation) OldClientID(ctx context.Context) (v int, err error)
OldClientID returns the old "client_id" field's value of the OAuthGrant entity. If the OAuthGrant 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 (*OAuthGrantMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OAuthGrant entity. If the OAuthGrant 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 (*OAuthGrantMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the OAuthGrant entity. If the OAuthGrant 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 (*OAuthGrantMutation) 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 (*OAuthGrantMutation) OldLastUsedAt ¶
OldLastUsedAt returns the old "last_used_at" field's value of the OAuthGrant entity. If the OAuthGrant 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 (*OAuthGrantMutation) OldScopes ¶
func (m *OAuthGrantMutation) OldScopes(ctx context.Context) (v []string, err error)
OldScopes returns the old "scopes" field's value of the OAuthGrant entity. If the OAuthGrant 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 (*OAuthGrantMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the OAuthGrant entity. If the OAuthGrant 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 (*OAuthGrantMutation) OldUserID ¶
func (m *OAuthGrantMutation) OldUserID(ctx context.Context) (v int, err error)
OldUserID returns the old "user_id" field's value of the OAuthGrant entity. If the OAuthGrant 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 (*OAuthGrantMutation) QueryContext ¶
func (c *OAuthGrantMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrantMutation) RemovedEdges ¶
func (m *OAuthGrantMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OAuthGrantMutation) RemovedIDs ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) ResetClient ¶
func (m *OAuthGrantMutation) ResetClient()
ResetClient resets all changes to the "client" edge.
func (*OAuthGrantMutation) ResetClientID ¶
func (m *OAuthGrantMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*OAuthGrantMutation) ResetCreatedAt ¶
func (m *OAuthGrantMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OAuthGrantMutation) ResetDeletedAt ¶
func (m *OAuthGrantMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*OAuthGrantMutation) ResetEdge ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) ResetField ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) ResetLastUsedAt ¶
func (m *OAuthGrantMutation) ResetLastUsedAt()
ResetLastUsedAt resets all changes to the "last_used_at" field.
func (*OAuthGrantMutation) ResetScopes ¶
func (m *OAuthGrantMutation) ResetScopes()
ResetScopes resets all changes to the "scopes" field.
func (*OAuthGrantMutation) ResetUpdatedAt ¶
func (m *OAuthGrantMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OAuthGrantMutation) ResetUser ¶
func (m *OAuthGrantMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*OAuthGrantMutation) ResetUserID ¶
func (m *OAuthGrantMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*OAuthGrantMutation) Scopes ¶
func (m *OAuthGrantMutation) Scopes() (r []string, exists bool)
Scopes returns the value of the "scopes" field in the mutation.
func (*OAuthGrantMutation) SetClientID ¶
func (m *OAuthGrantMutation) SetClientID(i int)
SetClientID sets the "client_id" field.
func (*OAuthGrantMutation) SetCreatedAt ¶
func (m *OAuthGrantMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OAuthGrantMutation) SetDeletedAt ¶
func (m *OAuthGrantMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*OAuthGrantMutation) SetField ¶
func (m *OAuthGrantMutation) 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 (*OAuthGrantMutation) SetLastUsedAt ¶
func (m *OAuthGrantMutation) SetLastUsedAt(t time.Time)
SetLastUsedAt sets the "last_used_at" field.
func (*OAuthGrantMutation) SetOp ¶
func (m *OAuthGrantMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OAuthGrantMutation) SetRawID ¶
func (m *OAuthGrantMutation) SetRawID(t int)
func (*OAuthGrantMutation) SetScopes ¶
func (m *OAuthGrantMutation) SetScopes(s []string)
SetScopes sets the "scopes" field.
func (*OAuthGrantMutation) SetUpdatedAt ¶
func (m *OAuthGrantMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OAuthGrantMutation) SetUserID ¶
func (m *OAuthGrantMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (OAuthGrantMutation) Tx ¶
func (m OAuthGrantMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OAuthGrantMutation) Type ¶
func (m *OAuthGrantMutation) Type() string
Type returns the node type of this mutation (OAuthGrant).
func (*OAuthGrantMutation) UpdatedAt ¶
func (m *OAuthGrantMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OAuthGrantMutation) UserCleared ¶
func (m *OAuthGrantMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*OAuthGrantMutation) UserID ¶
func (m *OAuthGrantMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*OAuthGrantMutation) UserIDs ¶
func (m *OAuthGrantMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*OAuthGrantMutation) Where ¶
func (m *OAuthGrantMutation) Where(ps ...predicate.OAuthGrant)
Where appends a list predicates to the OAuthGrantMutation builder.
func (*OAuthGrantMutation) WhereP ¶
func (m *OAuthGrantMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OAuthGrantMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OAuthGrantQuery ¶
type OAuthGrantQuery struct {
// contains filtered or unexported fields
}
OAuthGrantQuery is the builder for querying OAuthGrant entities.
func (*OAuthGrantQuery) Aggregate ¶
func (ogq *OAuthGrantQuery) Aggregate(fns ...AggregateFunc) *OAuthGrantSelect
Aggregate returns a OAuthGrantSelect configured with the given aggregations.
func (*OAuthGrantQuery) All ¶
func (ogq *OAuthGrantQuery) All(ctx context.Context) ([]*OAuthGrant, error)
All executes the query and returns a list of OAuthGrants.
func (*OAuthGrantQuery) AllX ¶
func (ogq *OAuthGrantQuery) AllX(ctx context.Context) []*OAuthGrant
AllX is like All, but panics if an error occurs.
func (*OAuthGrantQuery) Clone ¶
func (ogq *OAuthGrantQuery) Clone() *OAuthGrantQuery
Clone returns a duplicate of the OAuthGrantQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OAuthGrantQuery) Count ¶
func (ogq *OAuthGrantQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OAuthGrantQuery) CountX ¶
func (ogq *OAuthGrantQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OAuthGrantQuery) ExecContext ¶
func (c *OAuthGrantQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrantQuery) Exist ¶
func (ogq *OAuthGrantQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OAuthGrantQuery) ExistX ¶
func (ogq *OAuthGrantQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OAuthGrantQuery) First ¶
func (ogq *OAuthGrantQuery) First(ctx context.Context) (*OAuthGrant, error)
First returns the first OAuthGrant entity from the query. Returns a *NotFoundError when no OAuthGrant was found.
func (*OAuthGrantQuery) FirstID ¶
func (ogq *OAuthGrantQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OAuthGrant ID from the query. Returns a *NotFoundError when no OAuthGrant ID was found.
func (*OAuthGrantQuery) FirstIDX ¶
func (ogq *OAuthGrantQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OAuthGrantQuery) FirstX ¶
func (ogq *OAuthGrantQuery) FirstX(ctx context.Context) *OAuthGrant
FirstX is like First, but panics if an error occurs.
func (*OAuthGrantQuery) GroupBy ¶
func (ogq *OAuthGrantQuery) GroupBy(field string, fields ...string) *OAuthGrantGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.OAuthGrant.Query().
GroupBy(oauthgrant.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*OAuthGrantQuery) IDs ¶
func (ogq *OAuthGrantQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OAuthGrant IDs.
func (*OAuthGrantQuery) IDsX ¶
func (ogq *OAuthGrantQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OAuthGrantQuery) Limit ¶
func (ogq *OAuthGrantQuery) Limit(limit int) *OAuthGrantQuery
Limit the number of records to be returned by this query.
func (*OAuthGrantQuery) Offset ¶
func (ogq *OAuthGrantQuery) Offset(offset int) *OAuthGrantQuery
Offset to start from.
func (*OAuthGrantQuery) Only ¶
func (ogq *OAuthGrantQuery) Only(ctx context.Context) (*OAuthGrant, error)
Only returns a single OAuthGrant entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthGrant entity is found. Returns a *NotFoundError when no OAuthGrant entities are found.
func (*OAuthGrantQuery) OnlyID ¶
func (ogq *OAuthGrantQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OAuthGrant ID in the query. Returns a *NotSingularError when more than one OAuthGrant ID is found. Returns a *NotFoundError when no entities are found.
func (*OAuthGrantQuery) OnlyIDX ¶
func (ogq *OAuthGrantQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OAuthGrantQuery) OnlyX ¶
func (ogq *OAuthGrantQuery) OnlyX(ctx context.Context) *OAuthGrant
OnlyX is like Only, but panics if an error occurs.
func (*OAuthGrantQuery) Order ¶
func (ogq *OAuthGrantQuery) Order(o ...oauthgrant.OrderOption) *OAuthGrantQuery
Order specifies how the records should be ordered.
func (*OAuthGrantQuery) QueryClient ¶
func (ogq *OAuthGrantQuery) QueryClient() *OAuthClientQuery
QueryClient chains the current query on the "client" edge.
func (*OAuthGrantQuery) QueryContext ¶
func (c *OAuthGrantQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrantQuery) QueryUser ¶
func (ogq *OAuthGrantQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*OAuthGrantQuery) Select ¶
func (ogq *OAuthGrantQuery) Select(fields ...string) *OAuthGrantSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.OAuthGrant.Query().
Select(oauthgrant.FieldCreatedAt).
Scan(ctx, &v)
func (*OAuthGrantQuery) Unique ¶
func (ogq *OAuthGrantQuery) Unique(unique bool) *OAuthGrantQuery
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 (*OAuthGrantQuery) Where ¶
func (ogq *OAuthGrantQuery) Where(ps ...predicate.OAuthGrant) *OAuthGrantQuery
Where adds a new predicate for the OAuthGrantQuery builder.
func (*OAuthGrantQuery) WithClient ¶
func (ogq *OAuthGrantQuery) WithClient(opts ...func(*OAuthClientQuery)) *OAuthGrantQuery
WithClient tells the query-builder to eager-load the nodes that are connected to the "client" edge. The optional arguments are used to configure the query builder of the edge.
func (*OAuthGrantQuery) WithUser ¶
func (ogq *OAuthGrantQuery) WithUser(opts ...func(*UserQuery)) *OAuthGrantQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type OAuthGrantSelect ¶
type OAuthGrantSelect struct {
*OAuthGrantQuery
// contains filtered or unexported fields
}
OAuthGrantSelect is the builder for selecting fields of OAuthGrant entities.
func (*OAuthGrantSelect) Aggregate ¶
func (ogs *OAuthGrantSelect) Aggregate(fns ...AggregateFunc) *OAuthGrantSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OAuthGrantSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthGrantSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (OAuthGrantSelect) ExecContext ¶
func (c OAuthGrantSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrantSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthGrantSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthGrantSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthGrantSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (OAuthGrantSelect) QueryContext ¶
func (c OAuthGrantSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrantSelect) Scan ¶
func (ogs *OAuthGrantSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthGrantSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthGrantUpdate ¶
type OAuthGrantUpdate struct {
// contains filtered or unexported fields
}
OAuthGrantUpdate is the builder for updating OAuthGrant entities.
func (*OAuthGrantUpdate) AppendScopes ¶
func (ogu *OAuthGrantUpdate) AppendScopes(s []string) *OAuthGrantUpdate
AppendScopes appends s to the "scopes" field.
func (*OAuthGrantUpdate) ClearClient ¶
func (ogu *OAuthGrantUpdate) ClearClient() *OAuthGrantUpdate
ClearClient clears the "client" edge to the OAuthClient entity.
func (*OAuthGrantUpdate) ClearDeletedAt ¶
func (ogu *OAuthGrantUpdate) ClearDeletedAt() *OAuthGrantUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthGrantUpdate) ClearLastUsedAt ¶
func (ogu *OAuthGrantUpdate) ClearLastUsedAt() *OAuthGrantUpdate
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*OAuthGrantUpdate) ClearUser ¶
func (ogu *OAuthGrantUpdate) ClearUser() *OAuthGrantUpdate
ClearUser clears the "user" edge to the User entity.
func (*OAuthGrantUpdate) Exec ¶
func (ogu *OAuthGrantUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthGrantUpdate) ExecContext ¶
func (c *OAuthGrantUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrantUpdate) ExecX ¶
func (ogu *OAuthGrantUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthGrantUpdate) Mutation ¶
func (ogu *OAuthGrantUpdate) Mutation() *OAuthGrantMutation
Mutation returns the OAuthGrantMutation object of the builder.
func (*OAuthGrantUpdate) QueryContext ¶
func (c *OAuthGrantUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrantUpdate) Save ¶
func (ogu *OAuthGrantUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OAuthGrantUpdate) SaveX ¶
func (ogu *OAuthGrantUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OAuthGrantUpdate) SetClient ¶
func (ogu *OAuthGrantUpdate) SetClient(o *OAuthClient) *OAuthGrantUpdate
SetClient sets the "client" edge to the OAuthClient entity.
func (*OAuthGrantUpdate) SetClientID ¶
func (ogu *OAuthGrantUpdate) SetClientID(i int) *OAuthGrantUpdate
SetClientID sets the "client_id" field.
func (*OAuthGrantUpdate) SetDeletedAt ¶
func (ogu *OAuthGrantUpdate) SetDeletedAt(t time.Time) *OAuthGrantUpdate
SetDeletedAt sets the "deleted_at" field.
func (*OAuthGrantUpdate) SetLastUsedAt ¶
func (ogu *OAuthGrantUpdate) SetLastUsedAt(t time.Time) *OAuthGrantUpdate
SetLastUsedAt sets the "last_used_at" field.
func (*OAuthGrantUpdate) SetNillableClientID ¶
func (ogu *OAuthGrantUpdate) SetNillableClientID(i *int) *OAuthGrantUpdate
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthGrantUpdate) SetNillableDeletedAt ¶
func (ogu *OAuthGrantUpdate) SetNillableDeletedAt(t *time.Time) *OAuthGrantUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OAuthGrantUpdate) SetNillableLastUsedAt ¶
func (ogu *OAuthGrantUpdate) SetNillableLastUsedAt(t *time.Time) *OAuthGrantUpdate
SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.
func (*OAuthGrantUpdate) SetNillableUserID ¶
func (ogu *OAuthGrantUpdate) SetNillableUserID(i *int) *OAuthGrantUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthGrantUpdate) SetScopes ¶
func (ogu *OAuthGrantUpdate) SetScopes(s []string) *OAuthGrantUpdate
SetScopes sets the "scopes" field.
func (*OAuthGrantUpdate) SetUpdatedAt ¶
func (ogu *OAuthGrantUpdate) SetUpdatedAt(t time.Time) *OAuthGrantUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OAuthGrantUpdate) SetUser ¶
func (ogu *OAuthGrantUpdate) SetUser(u *User) *OAuthGrantUpdate
SetUser sets the "user" edge to the User entity.
func (*OAuthGrantUpdate) SetUserID ¶
func (ogu *OAuthGrantUpdate) SetUserID(i int) *OAuthGrantUpdate
SetUserID sets the "user_id" field.
func (*OAuthGrantUpdate) Where ¶
func (ogu *OAuthGrantUpdate) Where(ps ...predicate.OAuthGrant) *OAuthGrantUpdate
Where appends a list predicates to the OAuthGrantUpdate builder.
type OAuthGrantUpdateOne ¶
type OAuthGrantUpdateOne struct {
// contains filtered or unexported fields
}
OAuthGrantUpdateOne is the builder for updating a single OAuthGrant entity.
func (*OAuthGrantUpdateOne) AppendScopes ¶
func (oguo *OAuthGrantUpdateOne) AppendScopes(s []string) *OAuthGrantUpdateOne
AppendScopes appends s to the "scopes" field.
func (*OAuthGrantUpdateOne) ClearClient ¶
func (oguo *OAuthGrantUpdateOne) ClearClient() *OAuthGrantUpdateOne
ClearClient clears the "client" edge to the OAuthClient entity.
func (*OAuthGrantUpdateOne) ClearDeletedAt ¶
func (oguo *OAuthGrantUpdateOne) ClearDeletedAt() *OAuthGrantUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthGrantUpdateOne) ClearLastUsedAt ¶
func (oguo *OAuthGrantUpdateOne) ClearLastUsedAt() *OAuthGrantUpdateOne
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*OAuthGrantUpdateOne) ClearUser ¶
func (oguo *OAuthGrantUpdateOne) ClearUser() *OAuthGrantUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*OAuthGrantUpdateOne) Exec ¶
func (oguo *OAuthGrantUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OAuthGrantUpdateOne) ExecContext ¶
func (c *OAuthGrantUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OAuthGrantUpdateOne) ExecX ¶
func (oguo *OAuthGrantUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthGrantUpdateOne) Mutation ¶
func (oguo *OAuthGrantUpdateOne) Mutation() *OAuthGrantMutation
Mutation returns the OAuthGrantMutation object of the builder.
func (*OAuthGrantUpdateOne) QueryContext ¶
func (c *OAuthGrantUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OAuthGrantUpdateOne) Save ¶
func (oguo *OAuthGrantUpdateOne) Save(ctx context.Context) (*OAuthGrant, error)
Save executes the query and returns the updated OAuthGrant entity.
func (*OAuthGrantUpdateOne) SaveX ¶
func (oguo *OAuthGrantUpdateOne) SaveX(ctx context.Context) *OAuthGrant
SaveX is like Save, but panics if an error occurs.
func (*OAuthGrantUpdateOne) Select ¶
func (oguo *OAuthGrantUpdateOne) Select(field string, fields ...string) *OAuthGrantUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OAuthGrantUpdateOne) SetClient ¶
func (oguo *OAuthGrantUpdateOne) SetClient(o *OAuthClient) *OAuthGrantUpdateOne
SetClient sets the "client" edge to the OAuthClient entity.
func (*OAuthGrantUpdateOne) SetClientID ¶
func (oguo *OAuthGrantUpdateOne) SetClientID(i int) *OAuthGrantUpdateOne
SetClientID sets the "client_id" field.
func (*OAuthGrantUpdateOne) SetDeletedAt ¶
func (oguo *OAuthGrantUpdateOne) SetDeletedAt(t time.Time) *OAuthGrantUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*OAuthGrantUpdateOne) SetLastUsedAt ¶
func (oguo *OAuthGrantUpdateOne) SetLastUsedAt(t time.Time) *OAuthGrantUpdateOne
SetLastUsedAt sets the "last_used_at" field.
func (*OAuthGrantUpdateOne) SetNillableClientID ¶
func (oguo *OAuthGrantUpdateOne) SetNillableClientID(i *int) *OAuthGrantUpdateOne
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthGrantUpdateOne) SetNillableDeletedAt ¶
func (oguo *OAuthGrantUpdateOne) SetNillableDeletedAt(t *time.Time) *OAuthGrantUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OAuthGrantUpdateOne) SetNillableLastUsedAt ¶
func (oguo *OAuthGrantUpdateOne) SetNillableLastUsedAt(t *time.Time) *OAuthGrantUpdateOne
SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.
func (*OAuthGrantUpdateOne) SetNillableUserID ¶
func (oguo *OAuthGrantUpdateOne) SetNillableUserID(i *int) *OAuthGrantUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthGrantUpdateOne) SetScopes ¶
func (oguo *OAuthGrantUpdateOne) SetScopes(s []string) *OAuthGrantUpdateOne
SetScopes sets the "scopes" field.
func (*OAuthGrantUpdateOne) SetUpdatedAt ¶
func (oguo *OAuthGrantUpdateOne) SetUpdatedAt(t time.Time) *OAuthGrantUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OAuthGrantUpdateOne) SetUser ¶
func (oguo *OAuthGrantUpdateOne) SetUser(u *User) *OAuthGrantUpdateOne
SetUser sets the "user" edge to the User entity.
func (*OAuthGrantUpdateOne) SetUserID ¶
func (oguo *OAuthGrantUpdateOne) SetUserID(i int) *OAuthGrantUpdateOne
SetUserID sets the "user_id" field.
func (*OAuthGrantUpdateOne) Where ¶
func (oguo *OAuthGrantUpdateOne) Where(ps ...predicate.OAuthGrant) *OAuthGrantUpdateOne
Where appends a list predicates to the OAuthGrantUpdate builder.
type OAuthGrantUpsert ¶
OAuthGrantUpsert is the "OnConflict" setter.
func (*OAuthGrantUpsert) ClearDeletedAt ¶
func (u *OAuthGrantUpsert) ClearDeletedAt() *OAuthGrantUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthGrantUpsert) ClearLastUsedAt ¶
func (u *OAuthGrantUpsert) ClearLastUsedAt() *OAuthGrantUpsert
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*OAuthGrantUpsert) SetClientID ¶
func (u *OAuthGrantUpsert) SetClientID(v int) *OAuthGrantUpsert
SetClientID sets the "client_id" field.
func (*OAuthGrantUpsert) SetDeletedAt ¶
func (u *OAuthGrantUpsert) SetDeletedAt(v time.Time) *OAuthGrantUpsert
SetDeletedAt sets the "deleted_at" field.
func (*OAuthGrantUpsert) SetLastUsedAt ¶
func (u *OAuthGrantUpsert) SetLastUsedAt(v time.Time) *OAuthGrantUpsert
SetLastUsedAt sets the "last_used_at" field.
func (*OAuthGrantUpsert) SetScopes ¶
func (u *OAuthGrantUpsert) SetScopes(v []string) *OAuthGrantUpsert
SetScopes sets the "scopes" field.
func (*OAuthGrantUpsert) SetUpdatedAt ¶
func (u *OAuthGrantUpsert) SetUpdatedAt(v time.Time) *OAuthGrantUpsert
SetUpdatedAt sets the "updated_at" field.
func (*OAuthGrantUpsert) SetUserID ¶
func (u *OAuthGrantUpsert) SetUserID(v int) *OAuthGrantUpsert
SetUserID sets the "user_id" field.
func (*OAuthGrantUpsert) UpdateClientID ¶
func (u *OAuthGrantUpsert) UpdateClientID() *OAuthGrantUpsert
UpdateClientID sets the "client_id" field to the value that was provided on create.
func (*OAuthGrantUpsert) UpdateDeletedAt ¶
func (u *OAuthGrantUpsert) UpdateDeletedAt() *OAuthGrantUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*OAuthGrantUpsert) UpdateLastUsedAt ¶
func (u *OAuthGrantUpsert) UpdateLastUsedAt() *OAuthGrantUpsert
UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.
func (*OAuthGrantUpsert) UpdateScopes ¶
func (u *OAuthGrantUpsert) UpdateScopes() *OAuthGrantUpsert
UpdateScopes sets the "scopes" field to the value that was provided on create.
func (*OAuthGrantUpsert) UpdateUpdatedAt ¶
func (u *OAuthGrantUpsert) UpdateUpdatedAt() *OAuthGrantUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*OAuthGrantUpsert) UpdateUserID ¶
func (u *OAuthGrantUpsert) UpdateUserID() *OAuthGrantUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type OAuthGrantUpsertBulk ¶
type OAuthGrantUpsertBulk struct {
// contains filtered or unexported fields
}
OAuthGrantUpsertBulk is the builder for "upsert"-ing a bulk of OAuthGrant nodes.
func (*OAuthGrantUpsertBulk) ClearDeletedAt ¶
func (u *OAuthGrantUpsertBulk) ClearDeletedAt() *OAuthGrantUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthGrantUpsertBulk) ClearLastUsedAt ¶
func (u *OAuthGrantUpsertBulk) ClearLastUsedAt() *OAuthGrantUpsertBulk
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*OAuthGrantUpsertBulk) DoNothing ¶
func (u *OAuthGrantUpsertBulk) DoNothing() *OAuthGrantUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OAuthGrantUpsertBulk) Exec ¶
func (u *OAuthGrantUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthGrantUpsertBulk) ExecX ¶
func (u *OAuthGrantUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthGrantUpsertBulk) Ignore ¶
func (u *OAuthGrantUpsertBulk) Ignore() *OAuthGrantUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.OAuthGrant.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OAuthGrantUpsertBulk) SetClientID ¶
func (u *OAuthGrantUpsertBulk) SetClientID(v int) *OAuthGrantUpsertBulk
SetClientID sets the "client_id" field.
func (*OAuthGrantUpsertBulk) SetDeletedAt ¶
func (u *OAuthGrantUpsertBulk) SetDeletedAt(v time.Time) *OAuthGrantUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*OAuthGrantUpsertBulk) SetLastUsedAt ¶
func (u *OAuthGrantUpsertBulk) SetLastUsedAt(v time.Time) *OAuthGrantUpsertBulk
SetLastUsedAt sets the "last_used_at" field.
func (*OAuthGrantUpsertBulk) SetScopes ¶
func (u *OAuthGrantUpsertBulk) SetScopes(v []string) *OAuthGrantUpsertBulk
SetScopes sets the "scopes" field.
func (*OAuthGrantUpsertBulk) SetUpdatedAt ¶
func (u *OAuthGrantUpsertBulk) SetUpdatedAt(v time.Time) *OAuthGrantUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*OAuthGrantUpsertBulk) SetUserID ¶
func (u *OAuthGrantUpsertBulk) SetUserID(v int) *OAuthGrantUpsertBulk
SetUserID sets the "user_id" field.
func (*OAuthGrantUpsertBulk) Update ¶
func (u *OAuthGrantUpsertBulk) Update(set func(*OAuthGrantUpsert)) *OAuthGrantUpsertBulk
Update allows overriding fields `UPDATE` values. See the OAuthGrantCreateBulk.OnConflict documentation for more info.
func (*OAuthGrantUpsertBulk) UpdateClientID ¶
func (u *OAuthGrantUpsertBulk) UpdateClientID() *OAuthGrantUpsertBulk
UpdateClientID sets the "client_id" field to the value that was provided on create.
func (*OAuthGrantUpsertBulk) UpdateDeletedAt ¶
func (u *OAuthGrantUpsertBulk) UpdateDeletedAt() *OAuthGrantUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*OAuthGrantUpsertBulk) UpdateLastUsedAt ¶
func (u *OAuthGrantUpsertBulk) UpdateLastUsedAt() *OAuthGrantUpsertBulk
UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.
func (*OAuthGrantUpsertBulk) UpdateNewValues ¶
func (u *OAuthGrantUpsertBulk) UpdateNewValues() *OAuthGrantUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.OAuthGrant.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*OAuthGrantUpsertBulk) UpdateScopes ¶
func (u *OAuthGrantUpsertBulk) UpdateScopes() *OAuthGrantUpsertBulk
UpdateScopes sets the "scopes" field to the value that was provided on create.
func (*OAuthGrantUpsertBulk) UpdateUpdatedAt ¶
func (u *OAuthGrantUpsertBulk) UpdateUpdatedAt() *OAuthGrantUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*OAuthGrantUpsertBulk) UpdateUserID ¶
func (u *OAuthGrantUpsertBulk) UpdateUserID() *OAuthGrantUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type OAuthGrantUpsertOne ¶
type OAuthGrantUpsertOne struct {
// contains filtered or unexported fields
}
OAuthGrantUpsertOne is the builder for "upsert"-ing
one OAuthGrant node.
func (*OAuthGrantUpsertOne) ClearDeletedAt ¶
func (u *OAuthGrantUpsertOne) ClearDeletedAt() *OAuthGrantUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OAuthGrantUpsertOne) ClearLastUsedAt ¶
func (u *OAuthGrantUpsertOne) ClearLastUsedAt() *OAuthGrantUpsertOne
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*OAuthGrantUpsertOne) DoNothing ¶
func (u *OAuthGrantUpsertOne) DoNothing() *OAuthGrantUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OAuthGrantUpsertOne) Exec ¶
func (u *OAuthGrantUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthGrantUpsertOne) ExecX ¶
func (u *OAuthGrantUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthGrantUpsertOne) ID ¶
func (u *OAuthGrantUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*OAuthGrantUpsertOne) IDX ¶
func (u *OAuthGrantUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*OAuthGrantUpsertOne) Ignore ¶
func (u *OAuthGrantUpsertOne) Ignore() *OAuthGrantUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.OAuthGrant.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*OAuthGrantUpsertOne) SetClientID ¶
func (u *OAuthGrantUpsertOne) SetClientID(v int) *OAuthGrantUpsertOne
SetClientID sets the "client_id" field.
func (*OAuthGrantUpsertOne) SetDeletedAt ¶
func (u *OAuthGrantUpsertOne) SetDeletedAt(v time.Time) *OAuthGrantUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*OAuthGrantUpsertOne) SetLastUsedAt ¶
func (u *OAuthGrantUpsertOne) SetLastUsedAt(v time.Time) *OAuthGrantUpsertOne
SetLastUsedAt sets the "last_used_at" field.
func (*OAuthGrantUpsertOne) SetScopes ¶
func (u *OAuthGrantUpsertOne) SetScopes(v []string) *OAuthGrantUpsertOne
SetScopes sets the "scopes" field.
func (*OAuthGrantUpsertOne) SetUpdatedAt ¶
func (u *OAuthGrantUpsertOne) SetUpdatedAt(v time.Time) *OAuthGrantUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*OAuthGrantUpsertOne) SetUserID ¶
func (u *OAuthGrantUpsertOne) SetUserID(v int) *OAuthGrantUpsertOne
SetUserID sets the "user_id" field.
func (*OAuthGrantUpsertOne) Update ¶
func (u *OAuthGrantUpsertOne) Update(set func(*OAuthGrantUpsert)) *OAuthGrantUpsertOne
Update allows overriding fields `UPDATE` values. See the OAuthGrantCreate.OnConflict documentation for more info.
func (*OAuthGrantUpsertOne) UpdateClientID ¶
func (u *OAuthGrantUpsertOne) UpdateClientID() *OAuthGrantUpsertOne
UpdateClientID sets the "client_id" field to the value that was provided on create.
func (*OAuthGrantUpsertOne) UpdateDeletedAt ¶
func (u *OAuthGrantUpsertOne) UpdateDeletedAt() *OAuthGrantUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*OAuthGrantUpsertOne) UpdateLastUsedAt ¶
func (u *OAuthGrantUpsertOne) UpdateLastUsedAt() *OAuthGrantUpsertOne
UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.
func (*OAuthGrantUpsertOne) UpdateNewValues ¶
func (u *OAuthGrantUpsertOne) UpdateNewValues() *OAuthGrantUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.OAuthGrant.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*OAuthGrantUpsertOne) UpdateScopes ¶
func (u *OAuthGrantUpsertOne) UpdateScopes() *OAuthGrantUpsertOne
UpdateScopes sets the "scopes" field to the value that was provided on create.
func (*OAuthGrantUpsertOne) UpdateUpdatedAt ¶
func (u *OAuthGrantUpsertOne) UpdateUpdatedAt() *OAuthGrantUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*OAuthGrantUpsertOne) UpdateUserID ¶
func (u *OAuthGrantUpsertOne) UpdateUserID() *OAuthGrantUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Passkey ¶
type Passkey struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// UserID holds the value of the "user_id" field.
UserID int `json:"user_id,omitempty"`
// CredentialID holds the value of the "credential_id" field.
CredentialID string `json:"credential_id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Credential holds the value of the "credential" field.
Credential *webauthn.Credential `json:"-"`
// UsedAt holds the value of the "used_at" field.
UsedAt *time.Time `json:"used_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the PasskeyQuery when eager-loading is set.
Edges PasskeyEdges `json:"edges"`
// contains filtered or unexported fields
}
Passkey is the model entity for the Passkey schema.
func (*Passkey) ExecContext ¶
func (c *Passkey) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Passkey) QueryContext ¶
func (c *Passkey) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Passkey) Unwrap ¶
Unwrap unwraps the Passkey 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 (*Passkey) Update ¶
func (pa *Passkey) Update() *PasskeyUpdateOne
Update returns a builder for updating this Passkey. Note that you need to call Passkey.Unwrap() before calling this method if this Passkey was returned from a transaction, and the transaction was committed or rolled back.
type PasskeyClient ¶
type PasskeyClient struct {
// contains filtered or unexported fields
}
PasskeyClient is a client for the Passkey schema.
func NewPasskeyClient ¶
func NewPasskeyClient(c config) *PasskeyClient
NewPasskeyClient returns a client for the Passkey from the given config.
func (*PasskeyClient) Create ¶
func (c *PasskeyClient) Create() *PasskeyCreate
Create returns a builder for creating a Passkey entity.
func (*PasskeyClient) CreateBulk ¶
func (c *PasskeyClient) CreateBulk(builders ...*PasskeyCreate) *PasskeyCreateBulk
CreateBulk returns a builder for creating a bulk of Passkey entities.
func (*PasskeyClient) Delete ¶
func (c *PasskeyClient) Delete() *PasskeyDelete
Delete returns a delete builder for Passkey.
func (*PasskeyClient) DeleteOne ¶
func (c *PasskeyClient) DeleteOne(pa *Passkey) *PasskeyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PasskeyClient) DeleteOneID ¶
func (c *PasskeyClient) DeleteOneID(id int) *PasskeyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PasskeyClient) ExecContext ¶
func (c *PasskeyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PasskeyClient) GetX ¶
func (c *PasskeyClient) GetX(ctx context.Context, id int) *Passkey
GetX is like Get, but panics if an error occurs.
func (*PasskeyClient) Hooks ¶
func (c *PasskeyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PasskeyClient) Intercept ¶
func (c *PasskeyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `passkey.Intercept(f(g(h())))`.
func (*PasskeyClient) Interceptors ¶
func (c *PasskeyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PasskeyClient) MapCreateBulk ¶
func (c *PasskeyClient) MapCreateBulk(slice any, setFunc func(*PasskeyCreate, int)) *PasskeyCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PasskeyClient) Query ¶
func (c *PasskeyClient) Query() *PasskeyQuery
Query returns a query builder for Passkey.
func (*PasskeyClient) QueryContext ¶
func (c *PasskeyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PasskeyClient) QueryUser ¶
func (c *PasskeyClient) QueryUser(pa *Passkey) *UserQuery
QueryUser queries the user edge of a Passkey.
func (*PasskeyClient) Update ¶
func (c *PasskeyClient) Update() *PasskeyUpdate
Update returns an update builder for Passkey.
func (*PasskeyClient) UpdateOne ¶
func (c *PasskeyClient) UpdateOne(pa *Passkey) *PasskeyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PasskeyClient) UpdateOneID ¶
func (c *PasskeyClient) UpdateOneID(id int) *PasskeyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PasskeyClient) Use ¶
func (c *PasskeyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `passkey.Hooks(f(g(h())))`.
type PasskeyCreate ¶
type PasskeyCreate struct {
// contains filtered or unexported fields
}
PasskeyCreate is the builder for creating a Passkey entity.
func (*PasskeyCreate) Exec ¶
func (pc *PasskeyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PasskeyCreate) ExecContext ¶
func (c *PasskeyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PasskeyCreate) ExecX ¶
func (pc *PasskeyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasskeyCreate) Mutation ¶
func (pc *PasskeyCreate) Mutation() *PasskeyMutation
Mutation returns the PasskeyMutation object of the builder.
func (*PasskeyCreate) OnConflict ¶
func (pc *PasskeyCreate) OnConflict(opts ...sql.ConflictOption) *PasskeyUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Passkey.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.PasskeyUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*PasskeyCreate) OnConflictColumns ¶
func (pc *PasskeyCreate) OnConflictColumns(columns ...string) *PasskeyUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Passkey.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*PasskeyCreate) QueryContext ¶
func (c *PasskeyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PasskeyCreate) Save ¶
func (pc *PasskeyCreate) Save(ctx context.Context) (*Passkey, error)
Save creates the Passkey in the database.
func (*PasskeyCreate) SaveX ¶
func (pc *PasskeyCreate) SaveX(ctx context.Context) *Passkey
SaveX calls Save and panics if Save returns an error.
func (*PasskeyCreate) SetCreatedAt ¶
func (pc *PasskeyCreate) SetCreatedAt(t time.Time) *PasskeyCreate
SetCreatedAt sets the "created_at" field.
func (*PasskeyCreate) SetCredential ¶
func (pc *PasskeyCreate) SetCredential(w *webauthn.Credential) *PasskeyCreate
SetCredential sets the "credential" field.
func (*PasskeyCreate) SetCredentialID ¶
func (pc *PasskeyCreate) SetCredentialID(s string) *PasskeyCreate
SetCredentialID sets the "credential_id" field.
func (*PasskeyCreate) SetDeletedAt ¶
func (pc *PasskeyCreate) SetDeletedAt(t time.Time) *PasskeyCreate
SetDeletedAt sets the "deleted_at" field.
func (*PasskeyCreate) SetName ¶
func (pc *PasskeyCreate) SetName(s string) *PasskeyCreate
SetName sets the "name" field.
func (*PasskeyCreate) SetNillableCreatedAt ¶
func (pc *PasskeyCreate) SetNillableCreatedAt(t *time.Time) *PasskeyCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PasskeyCreate) SetNillableDeletedAt ¶
func (pc *PasskeyCreate) SetNillableDeletedAt(t *time.Time) *PasskeyCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PasskeyCreate) SetNillableUpdatedAt ¶
func (pc *PasskeyCreate) SetNillableUpdatedAt(t *time.Time) *PasskeyCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PasskeyCreate) SetNillableUsedAt ¶
func (pc *PasskeyCreate) SetNillableUsedAt(t *time.Time) *PasskeyCreate
SetNillableUsedAt sets the "used_at" field if the given value is not nil.
func (*PasskeyCreate) SetRawID ¶
func (m *PasskeyCreate) SetRawID(t int) *PasskeyCreate
func (*PasskeyCreate) SetUpdatedAt ¶
func (pc *PasskeyCreate) SetUpdatedAt(t time.Time) *PasskeyCreate
SetUpdatedAt sets the "updated_at" field.
func (*PasskeyCreate) SetUsedAt ¶
func (pc *PasskeyCreate) SetUsedAt(t time.Time) *PasskeyCreate
SetUsedAt sets the "used_at" field.
func (*PasskeyCreate) SetUser ¶
func (pc *PasskeyCreate) SetUser(u *User) *PasskeyCreate
SetUser sets the "user" edge to the User entity.
func (*PasskeyCreate) SetUserID ¶
func (pc *PasskeyCreate) SetUserID(i int) *PasskeyCreate
SetUserID sets the "user_id" field.
type PasskeyCreateBulk ¶
type PasskeyCreateBulk struct {
// contains filtered or unexported fields
}
PasskeyCreateBulk is the builder for creating many Passkey entities in bulk.
func (*PasskeyCreateBulk) Exec ¶
func (pcb *PasskeyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PasskeyCreateBulk) ExecContext ¶
func (c *PasskeyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PasskeyCreateBulk) ExecX ¶
func (pcb *PasskeyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasskeyCreateBulk) OnConflict ¶
func (pcb *PasskeyCreateBulk) OnConflict(opts ...sql.ConflictOption) *PasskeyUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Passkey.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.PasskeyUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*PasskeyCreateBulk) OnConflictColumns ¶
func (pcb *PasskeyCreateBulk) OnConflictColumns(columns ...string) *PasskeyUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Passkey.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*PasskeyCreateBulk) QueryContext ¶
func (c *PasskeyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type PasskeyDelete ¶
type PasskeyDelete struct {
// contains filtered or unexported fields
}
PasskeyDelete is the builder for deleting a Passkey entity.
func (*PasskeyDelete) Exec ¶
func (pd *PasskeyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PasskeyDelete) ExecContext ¶
func (c *PasskeyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PasskeyDelete) ExecX ¶
func (pd *PasskeyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PasskeyDelete) QueryContext ¶
func (c *PasskeyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PasskeyDelete) Where ¶
func (pd *PasskeyDelete) Where(ps ...predicate.Passkey) *PasskeyDelete
Where appends a list predicates to the PasskeyDelete builder.
type PasskeyDeleteOne ¶
type PasskeyDeleteOne struct {
// contains filtered or unexported fields
}
PasskeyDeleteOne is the builder for deleting a single Passkey entity.
func (*PasskeyDeleteOne) Exec ¶
func (pdo *PasskeyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PasskeyDeleteOne) ExecX ¶
func (pdo *PasskeyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasskeyDeleteOne) Where ¶
func (pdo *PasskeyDeleteOne) Where(ps ...predicate.Passkey) *PasskeyDeleteOne
Where appends a list predicates to the PasskeyDelete builder.
type PasskeyEdges ¶
type PasskeyEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
PasskeyEdges holds the relations/edges for other nodes in the graph.
func (PasskeyEdges) UserOrErr ¶
func (e PasskeyEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PasskeyGroupBy ¶
type PasskeyGroupBy struct {
// contains filtered or unexported fields
}
PasskeyGroupBy is the group-by builder for Passkey entities.
func (*PasskeyGroupBy) Aggregate ¶
func (pgb *PasskeyGroupBy) Aggregate(fns ...AggregateFunc) *PasskeyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PasskeyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PasskeyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PasskeyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PasskeyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PasskeyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PasskeyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PasskeyGroupBy) Scan ¶
func (pgb *PasskeyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PasskeyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PasskeyMutation ¶
type PasskeyMutation struct {
// contains filtered or unexported fields
}
PasskeyMutation represents an operation that mutates the Passkey nodes in the graph.
func (*PasskeyMutation) AddField ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) AddedEdges ¶
func (m *PasskeyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PasskeyMutation) AddedField ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) AddedFields ¶
func (m *PasskeyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PasskeyMutation) AddedIDs ¶
func (m *PasskeyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PasskeyMutation) ClearDeletedAt ¶
func (m *PasskeyMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PasskeyMutation) ClearEdge ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) ClearField ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) ClearUsedAt ¶
func (m *PasskeyMutation) ClearUsedAt()
ClearUsedAt clears the value of the "used_at" field.
func (*PasskeyMutation) ClearUser ¶
func (m *PasskeyMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*PasskeyMutation) ClearedEdges ¶
func (m *PasskeyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PasskeyMutation) ClearedFields ¶
func (m *PasskeyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PasskeyMutation) Client ¶
func (m PasskeyMutation) 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 (*PasskeyMutation) CreatedAt ¶
func (m *PasskeyMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PasskeyMutation) Credential ¶
func (m *PasskeyMutation) Credential() (r *webauthn.Credential, exists bool)
Credential returns the value of the "credential" field in the mutation.
func (*PasskeyMutation) CredentialID ¶
func (m *PasskeyMutation) CredentialID() (r string, exists bool)
CredentialID returns the value of the "credential_id" field in the mutation.
func (*PasskeyMutation) DeletedAt ¶
func (m *PasskeyMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*PasskeyMutation) DeletedAtCleared ¶
func (m *PasskeyMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*PasskeyMutation) EdgeCleared ¶
func (m *PasskeyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PasskeyMutation) ExecContext ¶
func (c *PasskeyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PasskeyMutation) Field ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) FieldCleared ¶
func (m *PasskeyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PasskeyMutation) Fields ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) ID ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) IDs ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) Name ¶
func (m *PasskeyMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PasskeyMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Passkey entity. If the Passkey 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 (*PasskeyMutation) OldCredential ¶
func (m *PasskeyMutation) OldCredential(ctx context.Context) (v *webauthn.Credential, err error)
OldCredential returns the old "credential" field's value of the Passkey entity. If the Passkey 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 (*PasskeyMutation) OldCredentialID ¶
func (m *PasskeyMutation) OldCredentialID(ctx context.Context) (v string, err error)
OldCredentialID returns the old "credential_id" field's value of the Passkey entity. If the Passkey 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 (*PasskeyMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Passkey entity. If the Passkey 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 (*PasskeyMutation) 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 (*PasskeyMutation) OldName ¶
func (m *PasskeyMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Passkey entity. If the Passkey 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 (*PasskeyMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Passkey entity. If the Passkey 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 (*PasskeyMutation) OldUsedAt ¶
OldUsedAt returns the old "used_at" field's value of the Passkey entity. If the Passkey 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 (*PasskeyMutation) OldUserID ¶
func (m *PasskeyMutation) OldUserID(ctx context.Context) (v int, err error)
OldUserID returns the old "user_id" field's value of the Passkey entity. If the Passkey 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 (*PasskeyMutation) QueryContext ¶
func (c *PasskeyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PasskeyMutation) RemovedEdges ¶
func (m *PasskeyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PasskeyMutation) RemovedIDs ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) ResetCreatedAt ¶
func (m *PasskeyMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PasskeyMutation) ResetCredential ¶
func (m *PasskeyMutation) ResetCredential()
ResetCredential resets all changes to the "credential" field.
func (*PasskeyMutation) ResetCredentialID ¶
func (m *PasskeyMutation) ResetCredentialID()
ResetCredentialID resets all changes to the "credential_id" field.
func (*PasskeyMutation) ResetDeletedAt ¶
func (m *PasskeyMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*PasskeyMutation) ResetEdge ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) ResetField ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) ResetName ¶
func (m *PasskeyMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PasskeyMutation) ResetUpdatedAt ¶
func (m *PasskeyMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PasskeyMutation) ResetUsedAt ¶
func (m *PasskeyMutation) ResetUsedAt()
ResetUsedAt resets all changes to the "used_at" field.
func (*PasskeyMutation) ResetUser ¶
func (m *PasskeyMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*PasskeyMutation) ResetUserID ¶
func (m *PasskeyMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*PasskeyMutation) SetCreatedAt ¶
func (m *PasskeyMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PasskeyMutation) SetCredential ¶
func (m *PasskeyMutation) SetCredential(w *webauthn.Credential)
SetCredential sets the "credential" field.
func (*PasskeyMutation) SetCredentialID ¶
func (m *PasskeyMutation) SetCredentialID(s string)
SetCredentialID sets the "credential_id" field.
func (*PasskeyMutation) SetDeletedAt ¶
func (m *PasskeyMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*PasskeyMutation) SetField ¶
func (m *PasskeyMutation) 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 (*PasskeyMutation) SetName ¶
func (m *PasskeyMutation) SetName(s string)
SetName sets the "name" field.
func (*PasskeyMutation) SetOp ¶
func (m *PasskeyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PasskeyMutation) SetRawID ¶
func (m *PasskeyMutation) SetRawID(t int)
func (*PasskeyMutation) SetUpdatedAt ¶
func (m *PasskeyMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PasskeyMutation) SetUsedAt ¶
func (m *PasskeyMutation) SetUsedAt(t time.Time)
SetUsedAt sets the "used_at" field.
func (*PasskeyMutation) SetUserID ¶
func (m *PasskeyMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (PasskeyMutation) Tx ¶
func (m PasskeyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PasskeyMutation) Type ¶
func (m *PasskeyMutation) Type() string
Type returns the node type of this mutation (Passkey).
func (*PasskeyMutation) UpdatedAt ¶
func (m *PasskeyMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PasskeyMutation) UsedAt ¶
func (m *PasskeyMutation) UsedAt() (r time.Time, exists bool)
UsedAt returns the value of the "used_at" field in the mutation.
func (*PasskeyMutation) UsedAtCleared ¶
func (m *PasskeyMutation) UsedAtCleared() bool
UsedAtCleared returns if the "used_at" field was cleared in this mutation.
func (*PasskeyMutation) UserCleared ¶
func (m *PasskeyMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*PasskeyMutation) UserID ¶
func (m *PasskeyMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*PasskeyMutation) UserIDs ¶
func (m *PasskeyMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*PasskeyMutation) Where ¶
func (m *PasskeyMutation) Where(ps ...predicate.Passkey)
Where appends a list predicates to the PasskeyMutation builder.
func (*PasskeyMutation) WhereP ¶
func (m *PasskeyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PasskeyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PasskeyQuery ¶
type PasskeyQuery struct {
// contains filtered or unexported fields
}
PasskeyQuery is the builder for querying Passkey entities.
func (*PasskeyQuery) Aggregate ¶
func (pq *PasskeyQuery) Aggregate(fns ...AggregateFunc) *PasskeySelect
Aggregate returns a PasskeySelect configured with the given aggregations.
func (*PasskeyQuery) All ¶
func (pq *PasskeyQuery) All(ctx context.Context) ([]*Passkey, error)
All executes the query and returns a list of Passkeys.
func (*PasskeyQuery) AllX ¶
func (pq *PasskeyQuery) AllX(ctx context.Context) []*Passkey
AllX is like All, but panics if an error occurs.
func (*PasskeyQuery) Clone ¶
func (pq *PasskeyQuery) Clone() *PasskeyQuery
Clone returns a duplicate of the PasskeyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PasskeyQuery) Count ¶
func (pq *PasskeyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PasskeyQuery) CountX ¶
func (pq *PasskeyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PasskeyQuery) ExecContext ¶
func (c *PasskeyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PasskeyQuery) Exist ¶
func (pq *PasskeyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PasskeyQuery) ExistX ¶
func (pq *PasskeyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PasskeyQuery) First ¶
func (pq *PasskeyQuery) First(ctx context.Context) (*Passkey, error)
First returns the first Passkey entity from the query. Returns a *NotFoundError when no Passkey was found.
func (*PasskeyQuery) FirstID ¶
func (pq *PasskeyQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Passkey ID from the query. Returns a *NotFoundError when no Passkey ID was found.
func (*PasskeyQuery) FirstIDX ¶
func (pq *PasskeyQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PasskeyQuery) FirstX ¶
func (pq *PasskeyQuery) FirstX(ctx context.Context) *Passkey
FirstX is like First, but panics if an error occurs.
func (*PasskeyQuery) GroupBy ¶
func (pq *PasskeyQuery) GroupBy(field string, fields ...string) *PasskeyGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Passkey.Query().
GroupBy(passkey.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*PasskeyQuery) IDs ¶
func (pq *PasskeyQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Passkey IDs.
func (*PasskeyQuery) IDsX ¶
func (pq *PasskeyQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PasskeyQuery) Limit ¶
func (pq *PasskeyQuery) Limit(limit int) *PasskeyQuery
Limit the number of records to be returned by this query.
func (*PasskeyQuery) Offset ¶
func (pq *PasskeyQuery) Offset(offset int) *PasskeyQuery
Offset to start from.
func (*PasskeyQuery) Only ¶
func (pq *PasskeyQuery) Only(ctx context.Context) (*Passkey, error)
Only returns a single Passkey entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Passkey entity is found. Returns a *NotFoundError when no Passkey entities are found.
func (*PasskeyQuery) OnlyID ¶
func (pq *PasskeyQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Passkey ID in the query. Returns a *NotSingularError when more than one Passkey ID is found. Returns a *NotFoundError when no entities are found.
func (*PasskeyQuery) OnlyIDX ¶
func (pq *PasskeyQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PasskeyQuery) OnlyX ¶
func (pq *PasskeyQuery) OnlyX(ctx context.Context) *Passkey
OnlyX is like Only, but panics if an error occurs.
func (*PasskeyQuery) Order ¶
func (pq *PasskeyQuery) Order(o ...passkey.OrderOption) *PasskeyQuery
Order specifies how the records should be ordered.
func (*PasskeyQuery) QueryContext ¶
func (c *PasskeyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PasskeyQuery) QueryUser ¶
func (pq *PasskeyQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*PasskeyQuery) Select ¶
func (pq *PasskeyQuery) Select(fields ...string) *PasskeySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Passkey.Query().
Select(passkey.FieldCreatedAt).
Scan(ctx, &v)
func (*PasskeyQuery) Unique ¶
func (pq *PasskeyQuery) Unique(unique bool) *PasskeyQuery
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 (*PasskeyQuery) Where ¶
func (pq *PasskeyQuery) Where(ps ...predicate.Passkey) *PasskeyQuery
Where adds a new predicate for the PasskeyQuery builder.
func (*PasskeyQuery) WithUser ¶
func (pq *PasskeyQuery) WithUser(opts ...func(*UserQuery)) *PasskeyQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type PasskeySelect ¶
type PasskeySelect struct {
*PasskeyQuery
// contains filtered or unexported fields
}
PasskeySelect is the builder for selecting fields of Passkey entities.
func (*PasskeySelect) Aggregate ¶
func (ps *PasskeySelect) Aggregate(fns ...AggregateFunc) *PasskeySelect
Aggregate adds the given aggregation functions to the selector query.
func (*PasskeySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PasskeySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (PasskeySelect) ExecContext ¶
func (c PasskeySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PasskeySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PasskeySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PasskeySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PasskeySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (PasskeySelect) QueryContext ¶
func (c PasskeySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PasskeySelect) Scan ¶
func (ps *PasskeySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PasskeySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PasskeyUpdate ¶
type PasskeyUpdate struct {
// contains filtered or unexported fields
}
PasskeyUpdate is the builder for updating Passkey entities.
func (*PasskeyUpdate) ClearDeletedAt ¶
func (pu *PasskeyUpdate) ClearDeletedAt() *PasskeyUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PasskeyUpdate) ClearUsedAt ¶
func (pu *PasskeyUpdate) ClearUsedAt() *PasskeyUpdate
ClearUsedAt clears the value of the "used_at" field.
func (*PasskeyUpdate) ClearUser ¶
func (pu *PasskeyUpdate) ClearUser() *PasskeyUpdate
ClearUser clears the "user" edge to the User entity.
func (*PasskeyUpdate) Exec ¶
func (pu *PasskeyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PasskeyUpdate) ExecContext ¶
func (c *PasskeyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PasskeyUpdate) ExecX ¶
func (pu *PasskeyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasskeyUpdate) Mutation ¶
func (pu *PasskeyUpdate) Mutation() *PasskeyMutation
Mutation returns the PasskeyMutation object of the builder.
func (*PasskeyUpdate) QueryContext ¶
func (c *PasskeyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PasskeyUpdate) Save ¶
func (pu *PasskeyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PasskeyUpdate) SaveX ¶
func (pu *PasskeyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PasskeyUpdate) SetCredential ¶
func (pu *PasskeyUpdate) SetCredential(w *webauthn.Credential) *PasskeyUpdate
SetCredential sets the "credential" field.
func (*PasskeyUpdate) SetCredentialID ¶
func (pu *PasskeyUpdate) SetCredentialID(s string) *PasskeyUpdate
SetCredentialID sets the "credential_id" field.
func (*PasskeyUpdate) SetDeletedAt ¶
func (pu *PasskeyUpdate) SetDeletedAt(t time.Time) *PasskeyUpdate
SetDeletedAt sets the "deleted_at" field.
func (*PasskeyUpdate) SetName ¶
func (pu *PasskeyUpdate) SetName(s string) *PasskeyUpdate
SetName sets the "name" field.
func (*PasskeyUpdate) SetNillableCredentialID ¶
func (pu *PasskeyUpdate) SetNillableCredentialID(s *string) *PasskeyUpdate
SetNillableCredentialID sets the "credential_id" field if the given value is not nil.
func (*PasskeyUpdate) SetNillableDeletedAt ¶
func (pu *PasskeyUpdate) SetNillableDeletedAt(t *time.Time) *PasskeyUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PasskeyUpdate) SetNillableName ¶
func (pu *PasskeyUpdate) SetNillableName(s *string) *PasskeyUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PasskeyUpdate) SetNillableUsedAt ¶
func (pu *PasskeyUpdate) SetNillableUsedAt(t *time.Time) *PasskeyUpdate
SetNillableUsedAt sets the "used_at" field if the given value is not nil.
func (*PasskeyUpdate) SetNillableUserID ¶
func (pu *PasskeyUpdate) SetNillableUserID(i *int) *PasskeyUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*PasskeyUpdate) SetUpdatedAt ¶
func (pu *PasskeyUpdate) SetUpdatedAt(t time.Time) *PasskeyUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PasskeyUpdate) SetUsedAt ¶
func (pu *PasskeyUpdate) SetUsedAt(t time.Time) *PasskeyUpdate
SetUsedAt sets the "used_at" field.
func (*PasskeyUpdate) SetUser ¶
func (pu *PasskeyUpdate) SetUser(u *User) *PasskeyUpdate
SetUser sets the "user" edge to the User entity.
func (*PasskeyUpdate) SetUserID ¶
func (pu *PasskeyUpdate) SetUserID(i int) *PasskeyUpdate
SetUserID sets the "user_id" field.
func (*PasskeyUpdate) Where ¶
func (pu *PasskeyUpdate) Where(ps ...predicate.Passkey) *PasskeyUpdate
Where appends a list predicates to the PasskeyUpdate builder.
type PasskeyUpdateOne ¶
type PasskeyUpdateOne struct {
// contains filtered or unexported fields
}
PasskeyUpdateOne is the builder for updating a single Passkey entity.
func (*PasskeyUpdateOne) ClearDeletedAt ¶
func (puo *PasskeyUpdateOne) ClearDeletedAt() *PasskeyUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PasskeyUpdateOne) ClearUsedAt ¶
func (puo *PasskeyUpdateOne) ClearUsedAt() *PasskeyUpdateOne
ClearUsedAt clears the value of the "used_at" field.
func (*PasskeyUpdateOne) ClearUser ¶
func (puo *PasskeyUpdateOne) ClearUser() *PasskeyUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*PasskeyUpdateOne) Exec ¶
func (puo *PasskeyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PasskeyUpdateOne) ExecContext ¶
func (c *PasskeyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PasskeyUpdateOne) ExecX ¶
func (puo *PasskeyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasskeyUpdateOne) Mutation ¶
func (puo *PasskeyUpdateOne) Mutation() *PasskeyMutation
Mutation returns the PasskeyMutation object of the builder.
func (*PasskeyUpdateOne) QueryContext ¶
func (c *PasskeyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PasskeyUpdateOne) Save ¶
func (puo *PasskeyUpdateOne) Save(ctx context.Context) (*Passkey, error)
Save executes the query and returns the updated Passkey entity.
func (*PasskeyUpdateOne) SaveX ¶
func (puo *PasskeyUpdateOne) SaveX(ctx context.Context) *Passkey
SaveX is like Save, but panics if an error occurs.
func (*PasskeyUpdateOne) Select ¶
func (puo *PasskeyUpdateOne) Select(field string, fields ...string) *PasskeyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PasskeyUpdateOne) SetCredential ¶
func (puo *PasskeyUpdateOne) SetCredential(w *webauthn.Credential) *PasskeyUpdateOne
SetCredential sets the "credential" field.
func (*PasskeyUpdateOne) SetCredentialID ¶
func (puo *PasskeyUpdateOne) SetCredentialID(s string) *PasskeyUpdateOne
SetCredentialID sets the "credential_id" field.
func (*PasskeyUpdateOne) SetDeletedAt ¶
func (puo *PasskeyUpdateOne) SetDeletedAt(t time.Time) *PasskeyUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*PasskeyUpdateOne) SetName ¶
func (puo *PasskeyUpdateOne) SetName(s string) *PasskeyUpdateOne
SetName sets the "name" field.
func (*PasskeyUpdateOne) SetNillableCredentialID ¶
func (puo *PasskeyUpdateOne) SetNillableCredentialID(s *string) *PasskeyUpdateOne
SetNillableCredentialID sets the "credential_id" field if the given value is not nil.
func (*PasskeyUpdateOne) SetNillableDeletedAt ¶
func (puo *PasskeyUpdateOne) SetNillableDeletedAt(t *time.Time) *PasskeyUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PasskeyUpdateOne) SetNillableName ¶
func (puo *PasskeyUpdateOne) SetNillableName(s *string) *PasskeyUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PasskeyUpdateOne) SetNillableUsedAt ¶
func (puo *PasskeyUpdateOne) SetNillableUsedAt(t *time.Time) *PasskeyUpdateOne
SetNillableUsedAt sets the "used_at" field if the given value is not nil.
func (*PasskeyUpdateOne) SetNillableUserID ¶
func (puo *PasskeyUpdateOne) SetNillableUserID(i *int) *PasskeyUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*PasskeyUpdateOne) SetUpdatedAt ¶
func (puo *PasskeyUpdateOne) SetUpdatedAt(t time.Time) *PasskeyUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PasskeyUpdateOne) SetUsedAt ¶
func (puo *PasskeyUpdateOne) SetUsedAt(t time.Time) *PasskeyUpdateOne
SetUsedAt sets the "used_at" field.
func (*PasskeyUpdateOne) SetUser ¶
func (puo *PasskeyUpdateOne) SetUser(u *User) *PasskeyUpdateOne
SetUser sets the "user" edge to the User entity.
func (*PasskeyUpdateOne) SetUserID ¶
func (puo *PasskeyUpdateOne) SetUserID(i int) *PasskeyUpdateOne
SetUserID sets the "user_id" field.
func (*PasskeyUpdateOne) Where ¶
func (puo *PasskeyUpdateOne) Where(ps ...predicate.Passkey) *PasskeyUpdateOne
Where appends a list predicates to the PasskeyUpdate builder.
type PasskeyUpsert ¶
PasskeyUpsert is the "OnConflict" setter.
func (*PasskeyUpsert) ClearDeletedAt ¶
func (u *PasskeyUpsert) ClearDeletedAt() *PasskeyUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PasskeyUpsert) ClearUsedAt ¶
func (u *PasskeyUpsert) ClearUsedAt() *PasskeyUpsert
ClearUsedAt clears the value of the "used_at" field.
func (*PasskeyUpsert) SetCredential ¶
func (u *PasskeyUpsert) SetCredential(v *webauthn.Credential) *PasskeyUpsert
SetCredential sets the "credential" field.
func (*PasskeyUpsert) SetCredentialID ¶
func (u *PasskeyUpsert) SetCredentialID(v string) *PasskeyUpsert
SetCredentialID sets the "credential_id" field.
func (*PasskeyUpsert) SetDeletedAt ¶
func (u *PasskeyUpsert) SetDeletedAt(v time.Time) *PasskeyUpsert
SetDeletedAt sets the "deleted_at" field.
func (*PasskeyUpsert) SetName ¶
func (u *PasskeyUpsert) SetName(v string) *PasskeyUpsert
SetName sets the "name" field.
func (*PasskeyUpsert) SetUpdatedAt ¶
func (u *PasskeyUpsert) SetUpdatedAt(v time.Time) *PasskeyUpsert
SetUpdatedAt sets the "updated_at" field.
func (*PasskeyUpsert) SetUsedAt ¶
func (u *PasskeyUpsert) SetUsedAt(v time.Time) *PasskeyUpsert
SetUsedAt sets the "used_at" field.
func (*PasskeyUpsert) SetUserID ¶
func (u *PasskeyUpsert) SetUserID(v int) *PasskeyUpsert
SetUserID sets the "user_id" field.
func (*PasskeyUpsert) UpdateCredential ¶
func (u *PasskeyUpsert) UpdateCredential() *PasskeyUpsert
UpdateCredential sets the "credential" field to the value that was provided on create.
func (*PasskeyUpsert) UpdateCredentialID ¶
func (u *PasskeyUpsert) UpdateCredentialID() *PasskeyUpsert
UpdateCredentialID sets the "credential_id" field to the value that was provided on create.
func (*PasskeyUpsert) UpdateDeletedAt ¶
func (u *PasskeyUpsert) UpdateDeletedAt() *PasskeyUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PasskeyUpsert) UpdateName ¶
func (u *PasskeyUpsert) UpdateName() *PasskeyUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*PasskeyUpsert) UpdateUpdatedAt ¶
func (u *PasskeyUpsert) UpdateUpdatedAt() *PasskeyUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*PasskeyUpsert) UpdateUsedAt ¶
func (u *PasskeyUpsert) UpdateUsedAt() *PasskeyUpsert
UpdateUsedAt sets the "used_at" field to the value that was provided on create.
func (*PasskeyUpsert) UpdateUserID ¶
func (u *PasskeyUpsert) UpdateUserID() *PasskeyUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type PasskeyUpsertBulk ¶
type PasskeyUpsertBulk struct {
// contains filtered or unexported fields
}
PasskeyUpsertBulk is the builder for "upsert"-ing a bulk of Passkey nodes.
func (*PasskeyUpsertBulk) ClearDeletedAt ¶
func (u *PasskeyUpsertBulk) ClearDeletedAt() *PasskeyUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PasskeyUpsertBulk) ClearUsedAt ¶
func (u *PasskeyUpsertBulk) ClearUsedAt() *PasskeyUpsertBulk
ClearUsedAt clears the value of the "used_at" field.
func (*PasskeyUpsertBulk) DoNothing ¶
func (u *PasskeyUpsertBulk) DoNothing() *PasskeyUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PasskeyUpsertBulk) Exec ¶
func (u *PasskeyUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PasskeyUpsertBulk) ExecX ¶
func (u *PasskeyUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasskeyUpsertBulk) Ignore ¶
func (u *PasskeyUpsertBulk) Ignore() *PasskeyUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Passkey.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PasskeyUpsertBulk) SetCredential ¶
func (u *PasskeyUpsertBulk) SetCredential(v *webauthn.Credential) *PasskeyUpsertBulk
SetCredential sets the "credential" field.
func (*PasskeyUpsertBulk) SetCredentialID ¶
func (u *PasskeyUpsertBulk) SetCredentialID(v string) *PasskeyUpsertBulk
SetCredentialID sets the "credential_id" field.
func (*PasskeyUpsertBulk) SetDeletedAt ¶
func (u *PasskeyUpsertBulk) SetDeletedAt(v time.Time) *PasskeyUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*PasskeyUpsertBulk) SetName ¶
func (u *PasskeyUpsertBulk) SetName(v string) *PasskeyUpsertBulk
SetName sets the "name" field.
func (*PasskeyUpsertBulk) SetUpdatedAt ¶
func (u *PasskeyUpsertBulk) SetUpdatedAt(v time.Time) *PasskeyUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*PasskeyUpsertBulk) SetUsedAt ¶
func (u *PasskeyUpsertBulk) SetUsedAt(v time.Time) *PasskeyUpsertBulk
SetUsedAt sets the "used_at" field.
func (*PasskeyUpsertBulk) SetUserID ¶
func (u *PasskeyUpsertBulk) SetUserID(v int) *PasskeyUpsertBulk
SetUserID sets the "user_id" field.
func (*PasskeyUpsertBulk) Update ¶
func (u *PasskeyUpsertBulk) Update(set func(*PasskeyUpsert)) *PasskeyUpsertBulk
Update allows overriding fields `UPDATE` values. See the PasskeyCreateBulk.OnConflict documentation for more info.
func (*PasskeyUpsertBulk) UpdateCredential ¶
func (u *PasskeyUpsertBulk) UpdateCredential() *PasskeyUpsertBulk
UpdateCredential sets the "credential" field to the value that was provided on create.
func (*PasskeyUpsertBulk) UpdateCredentialID ¶
func (u *PasskeyUpsertBulk) UpdateCredentialID() *PasskeyUpsertBulk
UpdateCredentialID sets the "credential_id" field to the value that was provided on create.
func (*PasskeyUpsertBulk) UpdateDeletedAt ¶
func (u *PasskeyUpsertBulk) UpdateDeletedAt() *PasskeyUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PasskeyUpsertBulk) UpdateName ¶
func (u *PasskeyUpsertBulk) UpdateName() *PasskeyUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*PasskeyUpsertBulk) UpdateNewValues ¶
func (u *PasskeyUpsertBulk) UpdateNewValues() *PasskeyUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Passkey.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*PasskeyUpsertBulk) UpdateUpdatedAt ¶
func (u *PasskeyUpsertBulk) UpdateUpdatedAt() *PasskeyUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*PasskeyUpsertBulk) UpdateUsedAt ¶
func (u *PasskeyUpsertBulk) UpdateUsedAt() *PasskeyUpsertBulk
UpdateUsedAt sets the "used_at" field to the value that was provided on create.
func (*PasskeyUpsertBulk) UpdateUserID ¶
func (u *PasskeyUpsertBulk) UpdateUserID() *PasskeyUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type PasskeyUpsertOne ¶
type PasskeyUpsertOne struct {
// contains filtered or unexported fields
}
PasskeyUpsertOne is the builder for "upsert"-ing
one Passkey node.
func (*PasskeyUpsertOne) ClearDeletedAt ¶
func (u *PasskeyUpsertOne) ClearDeletedAt() *PasskeyUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PasskeyUpsertOne) ClearUsedAt ¶
func (u *PasskeyUpsertOne) ClearUsedAt() *PasskeyUpsertOne
ClearUsedAt clears the value of the "used_at" field.
func (*PasskeyUpsertOne) DoNothing ¶
func (u *PasskeyUpsertOne) DoNothing() *PasskeyUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PasskeyUpsertOne) Exec ¶
func (u *PasskeyUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*PasskeyUpsertOne) ExecX ¶
func (u *PasskeyUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PasskeyUpsertOne) ID ¶
func (u *PasskeyUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*PasskeyUpsertOne) IDX ¶
func (u *PasskeyUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*PasskeyUpsertOne) Ignore ¶
func (u *PasskeyUpsertOne) Ignore() *PasskeyUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Passkey.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*PasskeyUpsertOne) SetCredential ¶
func (u *PasskeyUpsertOne) SetCredential(v *webauthn.Credential) *PasskeyUpsertOne
SetCredential sets the "credential" field.
func (*PasskeyUpsertOne) SetCredentialID ¶
func (u *PasskeyUpsertOne) SetCredentialID(v string) *PasskeyUpsertOne
SetCredentialID sets the "credential_id" field.
func (*PasskeyUpsertOne) SetDeletedAt ¶
func (u *PasskeyUpsertOne) SetDeletedAt(v time.Time) *PasskeyUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*PasskeyUpsertOne) SetName ¶
func (u *PasskeyUpsertOne) SetName(v string) *PasskeyUpsertOne
SetName sets the "name" field.
func (*PasskeyUpsertOne) SetUpdatedAt ¶
func (u *PasskeyUpsertOne) SetUpdatedAt(v time.Time) *PasskeyUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*PasskeyUpsertOne) SetUsedAt ¶
func (u *PasskeyUpsertOne) SetUsedAt(v time.Time) *PasskeyUpsertOne
SetUsedAt sets the "used_at" field.
func (*PasskeyUpsertOne) SetUserID ¶
func (u *PasskeyUpsertOne) SetUserID(v int) *PasskeyUpsertOne
SetUserID sets the "user_id" field.
func (*PasskeyUpsertOne) Update ¶
func (u *PasskeyUpsertOne) Update(set func(*PasskeyUpsert)) *PasskeyUpsertOne
Update allows overriding fields `UPDATE` values. See the PasskeyCreate.OnConflict documentation for more info.
func (*PasskeyUpsertOne) UpdateCredential ¶
func (u *PasskeyUpsertOne) UpdateCredential() *PasskeyUpsertOne
UpdateCredential sets the "credential" field to the value that was provided on create.
func (*PasskeyUpsertOne) UpdateCredentialID ¶
func (u *PasskeyUpsertOne) UpdateCredentialID() *PasskeyUpsertOne
UpdateCredentialID sets the "credential_id" field to the value that was provided on create.
func (*PasskeyUpsertOne) UpdateDeletedAt ¶
func (u *PasskeyUpsertOne) UpdateDeletedAt() *PasskeyUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PasskeyUpsertOne) UpdateName ¶
func (u *PasskeyUpsertOne) UpdateName() *PasskeyUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*PasskeyUpsertOne) UpdateNewValues ¶
func (u *PasskeyUpsertOne) UpdateNewValues() *PasskeyUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Passkey.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*PasskeyUpsertOne) UpdateUpdatedAt ¶
func (u *PasskeyUpsertOne) UpdateUpdatedAt() *PasskeyUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*PasskeyUpsertOne) UpdateUsedAt ¶
func (u *PasskeyUpsertOne) UpdateUsedAt() *PasskeyUpsertOne
UpdateUsedAt sets the "used_at" field to the value that was provided on create.
func (*PasskeyUpsertOne) UpdateUserID ¶
func (u *PasskeyUpsertOne) UpdateUserID() *PasskeyUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Setting ¶
type Setting struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Value holds the value of the "value" field.
Value string `json:"value,omitempty"`
// contains filtered or unexported fields
}
Setting is the model entity for the Setting schema.
func (*Setting) ExecContext ¶
func (c *Setting) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Setting) GetValue ¶
GetValue returns the ent.Value that was dynamically selected and assigned to the Setting. This includes values selected through modifiers, order, etc.
func (*Setting) QueryContext ¶
func (c *Setting) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Setting) Unwrap ¶
Unwrap unwraps the Setting 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 (*Setting) Update ¶
func (s *Setting) Update() *SettingUpdateOne
Update returns a builder for updating this Setting. Note that you need to call Setting.Unwrap() before calling this method if this Setting was returned from a transaction, and the transaction was committed or rolled back.
type SettingClient ¶
type SettingClient struct {
// contains filtered or unexported fields
}
SettingClient is a client for the Setting schema.
func NewSettingClient ¶
func NewSettingClient(c config) *SettingClient
NewSettingClient returns a client for the Setting from the given config.
func (*SettingClient) Create ¶
func (c *SettingClient) Create() *SettingCreate
Create returns a builder for creating a Setting entity.
func (*SettingClient) CreateBulk ¶
func (c *SettingClient) CreateBulk(builders ...*SettingCreate) *SettingCreateBulk
CreateBulk returns a builder for creating a bulk of Setting entities.
func (*SettingClient) Delete ¶
func (c *SettingClient) Delete() *SettingDelete
Delete returns a delete builder for Setting.
func (*SettingClient) DeleteOne ¶
func (c *SettingClient) DeleteOne(s *Setting) *SettingDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SettingClient) DeleteOneID ¶
func (c *SettingClient) DeleteOneID(id int) *SettingDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SettingClient) ExecContext ¶
func (c *SettingClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SettingClient) GetX ¶
func (c *SettingClient) GetX(ctx context.Context, id int) *Setting
GetX is like Get, but panics if an error occurs.
func (*SettingClient) Hooks ¶
func (c *SettingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SettingClient) Intercept ¶
func (c *SettingClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `setting.Intercept(f(g(h())))`.
func (*SettingClient) Interceptors ¶
func (c *SettingClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SettingClient) MapCreateBulk ¶
func (c *SettingClient) MapCreateBulk(slice any, setFunc func(*SettingCreate, int)) *SettingCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SettingClient) Query ¶
func (c *SettingClient) Query() *SettingQuery
Query returns a query builder for Setting.
func (*SettingClient) QueryContext ¶
func (c *SettingClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SettingClient) Update ¶
func (c *SettingClient) Update() *SettingUpdate
Update returns an update builder for Setting.
func (*SettingClient) UpdateOne ¶
func (c *SettingClient) UpdateOne(s *Setting) *SettingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SettingClient) UpdateOneID ¶
func (c *SettingClient) UpdateOneID(id int) *SettingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SettingClient) Use ¶
func (c *SettingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `setting.Hooks(f(g(h())))`.
type SettingCreate ¶
type SettingCreate struct {
// contains filtered or unexported fields
}
SettingCreate is the builder for creating a Setting entity.
func (*SettingCreate) Exec ¶
func (sc *SettingCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SettingCreate) ExecContext ¶
func (c *SettingCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SettingCreate) ExecX ¶
func (sc *SettingCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingCreate) Mutation ¶
func (sc *SettingCreate) Mutation() *SettingMutation
Mutation returns the SettingMutation object of the builder.
func (*SettingCreate) OnConflict ¶
func (sc *SettingCreate) OnConflict(opts ...sql.ConflictOption) *SettingUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Setting.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.SettingUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*SettingCreate) OnConflictColumns ¶
func (sc *SettingCreate) OnConflictColumns(columns ...string) *SettingUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Setting.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SettingCreate) QueryContext ¶
func (c *SettingCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SettingCreate) Save ¶
func (sc *SettingCreate) Save(ctx context.Context) (*Setting, error)
Save creates the Setting in the database.
func (*SettingCreate) SaveX ¶
func (sc *SettingCreate) SaveX(ctx context.Context) *Setting
SaveX calls Save and panics if Save returns an error.
func (*SettingCreate) SetCreatedAt ¶
func (sc *SettingCreate) SetCreatedAt(t time.Time) *SettingCreate
SetCreatedAt sets the "created_at" field.
func (*SettingCreate) SetDeletedAt ¶
func (sc *SettingCreate) SetDeletedAt(t time.Time) *SettingCreate
SetDeletedAt sets the "deleted_at" field.
func (*SettingCreate) SetName ¶
func (sc *SettingCreate) SetName(s string) *SettingCreate
SetName sets the "name" field.
func (*SettingCreate) SetNillableCreatedAt ¶
func (sc *SettingCreate) SetNillableCreatedAt(t *time.Time) *SettingCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SettingCreate) SetNillableDeletedAt ¶
func (sc *SettingCreate) SetNillableDeletedAt(t *time.Time) *SettingCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SettingCreate) SetNillableUpdatedAt ¶
func (sc *SettingCreate) SetNillableUpdatedAt(t *time.Time) *SettingCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SettingCreate) SetNillableValue ¶
func (sc *SettingCreate) SetNillableValue(s *string) *SettingCreate
SetNillableValue sets the "value" field if the given value is not nil.
func (*SettingCreate) SetRawID ¶
func (m *SettingCreate) SetRawID(t int) *SettingCreate
func (*SettingCreate) SetUpdatedAt ¶
func (sc *SettingCreate) SetUpdatedAt(t time.Time) *SettingCreate
SetUpdatedAt sets the "updated_at" field.
func (*SettingCreate) SetValue ¶
func (sc *SettingCreate) SetValue(s string) *SettingCreate
SetValue sets the "value" field.
type SettingCreateBulk ¶
type SettingCreateBulk struct {
// contains filtered or unexported fields
}
SettingCreateBulk is the builder for creating many Setting entities in bulk.
func (*SettingCreateBulk) Exec ¶
func (scb *SettingCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SettingCreateBulk) ExecContext ¶
func (c *SettingCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SettingCreateBulk) ExecX ¶
func (scb *SettingCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingCreateBulk) OnConflict ¶
func (scb *SettingCreateBulk) OnConflict(opts ...sql.ConflictOption) *SettingUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Setting.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.SettingUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*SettingCreateBulk) OnConflictColumns ¶
func (scb *SettingCreateBulk) OnConflictColumns(columns ...string) *SettingUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Setting.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SettingCreateBulk) QueryContext ¶
func (c *SettingCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type SettingDelete ¶
type SettingDelete struct {
// contains filtered or unexported fields
}
SettingDelete is the builder for deleting a Setting entity.
func (*SettingDelete) Exec ¶
func (sd *SettingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SettingDelete) ExecContext ¶
func (c *SettingDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SettingDelete) ExecX ¶
func (sd *SettingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SettingDelete) QueryContext ¶
func (c *SettingDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SettingDelete) Where ¶
func (sd *SettingDelete) Where(ps ...predicate.Setting) *SettingDelete
Where appends a list predicates to the SettingDelete builder.
type SettingDeleteOne ¶
type SettingDeleteOne struct {
// contains filtered or unexported fields
}
SettingDeleteOne is the builder for deleting a single Setting entity.
func (*SettingDeleteOne) Exec ¶
func (sdo *SettingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SettingDeleteOne) ExecX ¶
func (sdo *SettingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingDeleteOne) Where ¶
func (sdo *SettingDeleteOne) Where(ps ...predicate.Setting) *SettingDeleteOne
Where appends a list predicates to the SettingDelete builder.
type SettingGroupBy ¶
type SettingGroupBy struct {
// contains filtered or unexported fields
}
SettingGroupBy is the group-by builder for Setting entities.
func (*SettingGroupBy) Aggregate ¶
func (sgb *SettingGroupBy) Aggregate(fns ...AggregateFunc) *SettingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SettingGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SettingGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SettingGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SettingGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SettingGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SettingGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SettingGroupBy) Scan ¶
func (sgb *SettingGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SettingGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SettingMutation ¶
type SettingMutation struct {
// contains filtered or unexported fields
}
SettingMutation represents an operation that mutates the Setting nodes in the graph.
func (*SettingMutation) AddField ¶
func (m *SettingMutation) 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 (*SettingMutation) AddedEdges ¶
func (m *SettingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SettingMutation) AddedField ¶
func (m *SettingMutation) 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 (*SettingMutation) AddedFields ¶
func (m *SettingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SettingMutation) AddedIDs ¶
func (m *SettingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SettingMutation) ClearDeletedAt ¶
func (m *SettingMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SettingMutation) ClearEdge ¶
func (m *SettingMutation) 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 (*SettingMutation) ClearField ¶
func (m *SettingMutation) 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 (*SettingMutation) ClearValue ¶
func (m *SettingMutation) ClearValue()
ClearValue clears the value of the "value" field.
func (*SettingMutation) ClearedEdges ¶
func (m *SettingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SettingMutation) ClearedFields ¶
func (m *SettingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SettingMutation) Client ¶
func (m SettingMutation) 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 (*SettingMutation) CreatedAt ¶
func (m *SettingMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SettingMutation) DeletedAt ¶
func (m *SettingMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*SettingMutation) DeletedAtCleared ¶
func (m *SettingMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*SettingMutation) EdgeCleared ¶
func (m *SettingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SettingMutation) ExecContext ¶
func (c *SettingMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SettingMutation) Field ¶
func (m *SettingMutation) 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 (*SettingMutation) FieldCleared ¶
func (m *SettingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SettingMutation) Fields ¶
func (m *SettingMutation) 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 (*SettingMutation) ID ¶
func (m *SettingMutation) 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 (*SettingMutation) IDs ¶
func (m *SettingMutation) 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 (*SettingMutation) Name ¶
func (m *SettingMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SettingMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Setting entity. If the Setting 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 (*SettingMutation) 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 (*SettingMutation) OldName ¶
func (m *SettingMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldValue ¶
func (m *SettingMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the Setting entity. If the Setting 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 (*SettingMutation) QueryContext ¶
func (c *SettingMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SettingMutation) RemovedEdges ¶
func (m *SettingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SettingMutation) RemovedIDs ¶
func (m *SettingMutation) 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 (*SettingMutation) ResetCreatedAt ¶
func (m *SettingMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SettingMutation) ResetDeletedAt ¶
func (m *SettingMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*SettingMutation) ResetEdge ¶
func (m *SettingMutation) 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 (*SettingMutation) ResetField ¶
func (m *SettingMutation) 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 (*SettingMutation) ResetName ¶
func (m *SettingMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SettingMutation) ResetUpdatedAt ¶
func (m *SettingMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SettingMutation) ResetValue ¶
func (m *SettingMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*SettingMutation) SetCreatedAt ¶
func (m *SettingMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SettingMutation) SetDeletedAt ¶
func (m *SettingMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*SettingMutation) SetField ¶
func (m *SettingMutation) 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 (*SettingMutation) SetName ¶
func (m *SettingMutation) SetName(s string)
SetName sets the "name" field.
func (*SettingMutation) SetOp ¶
func (m *SettingMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SettingMutation) SetRawID ¶
func (m *SettingMutation) SetRawID(t int)
func (*SettingMutation) SetUpdatedAt ¶
func (m *SettingMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SettingMutation) SetValue ¶
func (m *SettingMutation) SetValue(s string)
SetValue sets the "value" field.
func (SettingMutation) Tx ¶
func (m SettingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SettingMutation) Type ¶
func (m *SettingMutation) Type() string
Type returns the node type of this mutation (Setting).
func (*SettingMutation) UpdatedAt ¶
func (m *SettingMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SettingMutation) Value ¶
func (m *SettingMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*SettingMutation) ValueCleared ¶
func (m *SettingMutation) ValueCleared() bool
ValueCleared returns if the "value" field was cleared in this mutation.
func (*SettingMutation) Where ¶
func (m *SettingMutation) Where(ps ...predicate.Setting)
Where appends a list predicates to the SettingMutation builder.
func (*SettingMutation) WhereP ¶
func (m *SettingMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SettingMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SettingQuery ¶
type SettingQuery struct {
// contains filtered or unexported fields
}
SettingQuery is the builder for querying Setting entities.
func (*SettingQuery) Aggregate ¶
func (sq *SettingQuery) Aggregate(fns ...AggregateFunc) *SettingSelect
Aggregate returns a SettingSelect configured with the given aggregations.
func (*SettingQuery) All ¶
func (sq *SettingQuery) All(ctx context.Context) ([]*Setting, error)
All executes the query and returns a list of Settings.
func (*SettingQuery) AllX ¶
func (sq *SettingQuery) AllX(ctx context.Context) []*Setting
AllX is like All, but panics if an error occurs.
func (*SettingQuery) Clone ¶
func (sq *SettingQuery) Clone() *SettingQuery
Clone returns a duplicate of the SettingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SettingQuery) Count ¶
func (sq *SettingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SettingQuery) CountX ¶
func (sq *SettingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SettingQuery) ExecContext ¶
func (c *SettingQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SettingQuery) Exist ¶
func (sq *SettingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SettingQuery) ExistX ¶
func (sq *SettingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SettingQuery) First ¶
func (sq *SettingQuery) First(ctx context.Context) (*Setting, error)
First returns the first Setting entity from the query. Returns a *NotFoundError when no Setting was found.
func (*SettingQuery) FirstID ¶
func (sq *SettingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Setting ID from the query. Returns a *NotFoundError when no Setting ID was found.
func (*SettingQuery) FirstIDX ¶
func (sq *SettingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SettingQuery) FirstX ¶
func (sq *SettingQuery) FirstX(ctx context.Context) *Setting
FirstX is like First, but panics if an error occurs.
func (*SettingQuery) GroupBy ¶
func (sq *SettingQuery) GroupBy(field string, fields ...string) *SettingGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Setting.Query().
GroupBy(setting.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SettingQuery) IDs ¶
func (sq *SettingQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Setting IDs.
func (*SettingQuery) IDsX ¶
func (sq *SettingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SettingQuery) Limit ¶
func (sq *SettingQuery) Limit(limit int) *SettingQuery
Limit the number of records to be returned by this query.
func (*SettingQuery) Offset ¶
func (sq *SettingQuery) Offset(offset int) *SettingQuery
Offset to start from.
func (*SettingQuery) Only ¶
func (sq *SettingQuery) Only(ctx context.Context) (*Setting, error)
Only returns a single Setting entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Setting entity is found. Returns a *NotFoundError when no Setting entities are found.
func (*SettingQuery) OnlyID ¶
func (sq *SettingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Setting ID in the query. Returns a *NotSingularError when more than one Setting ID is found. Returns a *NotFoundError when no entities are found.
func (*SettingQuery) OnlyIDX ¶
func (sq *SettingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SettingQuery) OnlyX ¶
func (sq *SettingQuery) OnlyX(ctx context.Context) *Setting
OnlyX is like Only, but panics if an error occurs.
func (*SettingQuery) Order ¶
func (sq *SettingQuery) Order(o ...setting.OrderOption) *SettingQuery
Order specifies how the records should be ordered.
func (*SettingQuery) QueryContext ¶
func (c *SettingQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SettingQuery) Select ¶
func (sq *SettingQuery) Select(fields ...string) *SettingSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Setting.Query().
Select(setting.FieldCreatedAt).
Scan(ctx, &v)
func (*SettingQuery) Unique ¶
func (sq *SettingQuery) Unique(unique bool) *SettingQuery
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 (*SettingQuery) Where ¶
func (sq *SettingQuery) Where(ps ...predicate.Setting) *SettingQuery
Where adds a new predicate for the SettingQuery builder.
type SettingSelect ¶
type SettingSelect struct {
*SettingQuery
// contains filtered or unexported fields
}
SettingSelect is the builder for selecting fields of Setting entities.
func (*SettingSelect) Aggregate ¶
func (ss *SettingSelect) Aggregate(fns ...AggregateFunc) *SettingSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SettingSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SettingSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (SettingSelect) ExecContext ¶
func (c SettingSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SettingSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SettingSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SettingSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SettingSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (SettingSelect) QueryContext ¶
func (c SettingSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SettingSelect) Scan ¶
func (ss *SettingSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SettingSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SettingUpdate ¶
type SettingUpdate struct {
// contains filtered or unexported fields
}
SettingUpdate is the builder for updating Setting entities.
func (*SettingUpdate) ClearDeletedAt ¶
func (su *SettingUpdate) ClearDeletedAt() *SettingUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SettingUpdate) ClearValue ¶
func (su *SettingUpdate) ClearValue() *SettingUpdate
ClearValue clears the value of the "value" field.
func (*SettingUpdate) Exec ¶
func (su *SettingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SettingUpdate) ExecContext ¶
func (c *SettingUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SettingUpdate) ExecX ¶
func (su *SettingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingUpdate) Mutation ¶
func (su *SettingUpdate) Mutation() *SettingMutation
Mutation returns the SettingMutation object of the builder.
func (*SettingUpdate) QueryContext ¶
func (c *SettingUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SettingUpdate) Save ¶
func (su *SettingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SettingUpdate) SaveX ¶
func (su *SettingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SettingUpdate) SetDeletedAt ¶
func (su *SettingUpdate) SetDeletedAt(t time.Time) *SettingUpdate
SetDeletedAt sets the "deleted_at" field.
func (*SettingUpdate) SetName ¶
func (su *SettingUpdate) SetName(s string) *SettingUpdate
SetName sets the "name" field.
func (*SettingUpdate) SetNillableDeletedAt ¶
func (su *SettingUpdate) SetNillableDeletedAt(t *time.Time) *SettingUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SettingUpdate) SetNillableName ¶
func (su *SettingUpdate) SetNillableName(s *string) *SettingUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*SettingUpdate) SetNillableValue ¶
func (su *SettingUpdate) SetNillableValue(s *string) *SettingUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*SettingUpdate) SetUpdatedAt ¶
func (su *SettingUpdate) SetUpdatedAt(t time.Time) *SettingUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SettingUpdate) SetValue ¶
func (su *SettingUpdate) SetValue(s string) *SettingUpdate
SetValue sets the "value" field.
func (*SettingUpdate) Where ¶
func (su *SettingUpdate) Where(ps ...predicate.Setting) *SettingUpdate
Where appends a list predicates to the SettingUpdate builder.
type SettingUpdateOne ¶
type SettingUpdateOne struct {
// contains filtered or unexported fields
}
SettingUpdateOne is the builder for updating a single Setting entity.
func (*SettingUpdateOne) ClearDeletedAt ¶
func (suo *SettingUpdateOne) ClearDeletedAt() *SettingUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SettingUpdateOne) ClearValue ¶
func (suo *SettingUpdateOne) ClearValue() *SettingUpdateOne
ClearValue clears the value of the "value" field.
func (*SettingUpdateOne) Exec ¶
func (suo *SettingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SettingUpdateOne) ExecContext ¶
func (c *SettingUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SettingUpdateOne) ExecX ¶
func (suo *SettingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingUpdateOne) Mutation ¶
func (suo *SettingUpdateOne) Mutation() *SettingMutation
Mutation returns the SettingMutation object of the builder.
func (*SettingUpdateOne) QueryContext ¶
func (c *SettingUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SettingUpdateOne) Save ¶
func (suo *SettingUpdateOne) Save(ctx context.Context) (*Setting, error)
Save executes the query and returns the updated Setting entity.
func (*SettingUpdateOne) SaveX ¶
func (suo *SettingUpdateOne) SaveX(ctx context.Context) *Setting
SaveX is like Save, but panics if an error occurs.
func (*SettingUpdateOne) Select ¶
func (suo *SettingUpdateOne) Select(field string, fields ...string) *SettingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SettingUpdateOne) SetDeletedAt ¶
func (suo *SettingUpdateOne) SetDeletedAt(t time.Time) *SettingUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*SettingUpdateOne) SetName ¶
func (suo *SettingUpdateOne) SetName(s string) *SettingUpdateOne
SetName sets the "name" field.
func (*SettingUpdateOne) SetNillableDeletedAt ¶
func (suo *SettingUpdateOne) SetNillableDeletedAt(t *time.Time) *SettingUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SettingUpdateOne) SetNillableName ¶
func (suo *SettingUpdateOne) SetNillableName(s *string) *SettingUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*SettingUpdateOne) SetNillableValue ¶
func (suo *SettingUpdateOne) SetNillableValue(s *string) *SettingUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*SettingUpdateOne) SetUpdatedAt ¶
func (suo *SettingUpdateOne) SetUpdatedAt(t time.Time) *SettingUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SettingUpdateOne) SetValue ¶
func (suo *SettingUpdateOne) SetValue(s string) *SettingUpdateOne
SetValue sets the "value" field.
func (*SettingUpdateOne) Where ¶
func (suo *SettingUpdateOne) Where(ps ...predicate.Setting) *SettingUpdateOne
Where appends a list predicates to the SettingUpdate builder.
type SettingUpsert ¶
SettingUpsert is the "OnConflict" setter.
func (*SettingUpsert) ClearDeletedAt ¶
func (u *SettingUpsert) ClearDeletedAt() *SettingUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SettingUpsert) ClearValue ¶
func (u *SettingUpsert) ClearValue() *SettingUpsert
ClearValue clears the value of the "value" field.
func (*SettingUpsert) SetDeletedAt ¶
func (u *SettingUpsert) SetDeletedAt(v time.Time) *SettingUpsert
SetDeletedAt sets the "deleted_at" field.
func (*SettingUpsert) SetName ¶
func (u *SettingUpsert) SetName(v string) *SettingUpsert
SetName sets the "name" field.
func (*SettingUpsert) SetUpdatedAt ¶
func (u *SettingUpsert) SetUpdatedAt(v time.Time) *SettingUpsert
SetUpdatedAt sets the "updated_at" field.
func (*SettingUpsert) SetValue ¶
func (u *SettingUpsert) SetValue(v string) *SettingUpsert
SetValue sets the "value" field.
func (*SettingUpsert) UpdateDeletedAt ¶
func (u *SettingUpsert) UpdateDeletedAt() *SettingUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*SettingUpsert) UpdateName ¶
func (u *SettingUpsert) UpdateName() *SettingUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*SettingUpsert) UpdateUpdatedAt ¶
func (u *SettingUpsert) UpdateUpdatedAt() *SettingUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*SettingUpsert) UpdateValue ¶
func (u *SettingUpsert) UpdateValue() *SettingUpsert
UpdateValue sets the "value" field to the value that was provided on create.
type SettingUpsertBulk ¶
type SettingUpsertBulk struct {
// contains filtered or unexported fields
}
SettingUpsertBulk is the builder for "upsert"-ing a bulk of Setting nodes.
func (*SettingUpsertBulk) ClearDeletedAt ¶
func (u *SettingUpsertBulk) ClearDeletedAt() *SettingUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SettingUpsertBulk) ClearValue ¶
func (u *SettingUpsertBulk) ClearValue() *SettingUpsertBulk
ClearValue clears the value of the "value" field.
func (*SettingUpsertBulk) DoNothing ¶
func (u *SettingUpsertBulk) DoNothing() *SettingUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SettingUpsertBulk) Exec ¶
func (u *SettingUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SettingUpsertBulk) ExecX ¶
func (u *SettingUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingUpsertBulk) Ignore ¶
func (u *SettingUpsertBulk) Ignore() *SettingUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Setting.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*SettingUpsertBulk) SetDeletedAt ¶
func (u *SettingUpsertBulk) SetDeletedAt(v time.Time) *SettingUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*SettingUpsertBulk) SetName ¶
func (u *SettingUpsertBulk) SetName(v string) *SettingUpsertBulk
SetName sets the "name" field.
func (*SettingUpsertBulk) SetUpdatedAt ¶
func (u *SettingUpsertBulk) SetUpdatedAt(v time.Time) *SettingUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*SettingUpsertBulk) SetValue ¶
func (u *SettingUpsertBulk) SetValue(v string) *SettingUpsertBulk
SetValue sets the "value" field.
func (*SettingUpsertBulk) Update ¶
func (u *SettingUpsertBulk) Update(set func(*SettingUpsert)) *SettingUpsertBulk
Update allows overriding fields `UPDATE` values. See the SettingCreateBulk.OnConflict documentation for more info.
func (*SettingUpsertBulk) UpdateDeletedAt ¶
func (u *SettingUpsertBulk) UpdateDeletedAt() *SettingUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*SettingUpsertBulk) UpdateName ¶
func (u *SettingUpsertBulk) UpdateName() *SettingUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*SettingUpsertBulk) UpdateNewValues ¶
func (u *SettingUpsertBulk) UpdateNewValues() *SettingUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Setting.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*SettingUpsertBulk) UpdateUpdatedAt ¶
func (u *SettingUpsertBulk) UpdateUpdatedAt() *SettingUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*SettingUpsertBulk) UpdateValue ¶
func (u *SettingUpsertBulk) UpdateValue() *SettingUpsertBulk
UpdateValue sets the "value" field to the value that was provided on create.
type SettingUpsertOne ¶
type SettingUpsertOne struct {
// contains filtered or unexported fields
}
SettingUpsertOne is the builder for "upsert"-ing
one Setting node.
func (*SettingUpsertOne) ClearDeletedAt ¶
func (u *SettingUpsertOne) ClearDeletedAt() *SettingUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SettingUpsertOne) ClearValue ¶
func (u *SettingUpsertOne) ClearValue() *SettingUpsertOne
ClearValue clears the value of the "value" field.
func (*SettingUpsertOne) DoNothing ¶
func (u *SettingUpsertOne) DoNothing() *SettingUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SettingUpsertOne) Exec ¶
func (u *SettingUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*SettingUpsertOne) ExecX ¶
func (u *SettingUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingUpsertOne) ID ¶
func (u *SettingUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*SettingUpsertOne) IDX ¶
func (u *SettingUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*SettingUpsertOne) Ignore ¶
func (u *SettingUpsertOne) Ignore() *SettingUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Setting.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*SettingUpsertOne) SetDeletedAt ¶
func (u *SettingUpsertOne) SetDeletedAt(v time.Time) *SettingUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*SettingUpsertOne) SetName ¶
func (u *SettingUpsertOne) SetName(v string) *SettingUpsertOne
SetName sets the "name" field.
func (*SettingUpsertOne) SetUpdatedAt ¶
func (u *SettingUpsertOne) SetUpdatedAt(v time.Time) *SettingUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*SettingUpsertOne) SetValue ¶
func (u *SettingUpsertOne) SetValue(v string) *SettingUpsertOne
SetValue sets the "value" field.
func (*SettingUpsertOne) Update ¶
func (u *SettingUpsertOne) Update(set func(*SettingUpsert)) *SettingUpsertOne
Update allows overriding fields `UPDATE` values. See the SettingCreate.OnConflict documentation for more info.
func (*SettingUpsertOne) UpdateDeletedAt ¶
func (u *SettingUpsertOne) UpdateDeletedAt() *SettingUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*SettingUpsertOne) UpdateName ¶
func (u *SettingUpsertOne) UpdateName() *SettingUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*SettingUpsertOne) UpdateNewValues ¶
func (u *SettingUpsertOne) UpdateNewValues() *SettingUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Setting.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*SettingUpsertOne) UpdateUpdatedAt ¶
func (u *SettingUpsertOne) UpdateUpdatedAt() *SettingUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*SettingUpsertOne) UpdateValue ¶
func (u *SettingUpsertOne) UpdateValue() *SettingUpsertOne
UpdateValue sets the "value" field to the value that was provided on create.
type Share ¶
type Share struct {
ID int `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
Password string `json:"password,omitempty"`
Views int `json:"views,omitempty"`
Downloads int `json:"downloads,omitempty"`
Expires *time.Time `json:"expires,omitempty"`
RemainDownloads *int `json:"remain_downloads,omitempty"`
Props *types.ShareProps `json:"props,omitempty"`
// The values are being populated by the ShareQuery when eager-loading is set.
Edges ShareEdges `json:"edges"`
// contains filtered or unexported fields
}
Share is the model entity for the Share schema.
func (*Share) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Share) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Share) Unwrap ¶
Unwrap unwraps the Share 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 (*Share) Update ¶
func (s *Share) Update() *ShareUpdateOne
Update returns a builder for updating this Share. Note that you need to call Share.Unwrap() before calling this method if this Share was returned from a transaction, and the transaction was committed or rolled back.
type ShareClient ¶
type ShareClient struct {
// contains filtered or unexported fields
}
ShareClient is a client for the Share schema.
func NewShareClient ¶
func NewShareClient(c config) *ShareClient
NewShareClient returns a client for the Share from the given config.
func (*ShareClient) Create ¶
func (c *ShareClient) Create() *ShareCreate
Create returns a builder for creating a Share entity.
func (*ShareClient) CreateBulk ¶
func (c *ShareClient) CreateBulk(builders ...*ShareCreate) *ShareCreateBulk
CreateBulk returns a builder for creating a bulk of Share entities.
func (*ShareClient) Delete ¶
func (c *ShareClient) Delete() *ShareDelete
Delete returns a delete builder for Share.
func (*ShareClient) DeleteOne ¶
func (c *ShareClient) DeleteOne(s *Share) *ShareDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ShareClient) DeleteOneID ¶
func (c *ShareClient) DeleteOneID(id int) *ShareDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ShareClient) ExecContext ¶
func (c *ShareClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShareClient) GetX ¶
func (c *ShareClient) GetX(ctx context.Context, id int) *Share
GetX is like Get, but panics if an error occurs.
func (*ShareClient) Intercept ¶
func (c *ShareClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `share.Intercept(f(g(h())))`.
func (*ShareClient) Interceptors ¶
func (c *ShareClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ShareClient) MapCreateBulk ¶
func (c *ShareClient) MapCreateBulk(slice any, setFunc func(*ShareCreate, int)) *ShareCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ShareClient) Query ¶
func (c *ShareClient) Query() *ShareQuery
Query returns a query builder for Share.
func (*ShareClient) QueryContext ¶
func (c *ShareClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShareClient) QueryFile ¶
func (c *ShareClient) QueryFile(s *Share) *FileQuery
QueryFile queries the file edge of a Share.
func (*ShareClient) QueryUser ¶
func (c *ShareClient) QueryUser(s *Share) *UserQuery
QueryUser queries the user edge of a Share.
func (*ShareClient) Update ¶
func (c *ShareClient) Update() *ShareUpdate
Update returns an update builder for Share.
func (*ShareClient) UpdateOne ¶
func (c *ShareClient) UpdateOne(s *Share) *ShareUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ShareClient) UpdateOneID ¶
func (c *ShareClient) UpdateOneID(id int) *ShareUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ShareClient) Use ¶
func (c *ShareClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `share.Hooks(f(g(h())))`.
type ShareCreate ¶
type ShareCreate struct {
// contains filtered or unexported fields
}
ShareCreate is the builder for creating a Share entity.
func (*ShareCreate) Exec ¶
func (sc *ShareCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShareCreate) ExecContext ¶
func (c *ShareCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShareCreate) ExecX ¶
func (sc *ShareCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShareCreate) Mutation ¶
func (sc *ShareCreate) Mutation() *ShareMutation
Mutation returns the ShareMutation object of the builder.
func (*ShareCreate) OnConflict ¶
func (sc *ShareCreate) OnConflict(opts ...sql.ConflictOption) *ShareUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Share.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ShareUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ShareCreate) OnConflictColumns ¶
func (sc *ShareCreate) OnConflictColumns(columns ...string) *ShareUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Share.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ShareCreate) QueryContext ¶
func (c *ShareCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShareCreate) Save ¶
func (sc *ShareCreate) Save(ctx context.Context) (*Share, error)
Save creates the Share in the database.
func (*ShareCreate) SaveX ¶
func (sc *ShareCreate) SaveX(ctx context.Context) *Share
SaveX calls Save and panics if Save returns an error.
func (*ShareCreate) SetCreatedAt ¶
func (sc *ShareCreate) SetCreatedAt(t time.Time) *ShareCreate
SetCreatedAt sets the "created_at" field.
func (*ShareCreate) SetDeletedAt ¶
func (sc *ShareCreate) SetDeletedAt(t time.Time) *ShareCreate
SetDeletedAt sets the "deleted_at" field.
func (*ShareCreate) SetDownloads ¶
func (sc *ShareCreate) SetDownloads(i int) *ShareCreate
SetDownloads sets the "downloads" field.
func (*ShareCreate) SetExpires ¶
func (sc *ShareCreate) SetExpires(t time.Time) *ShareCreate
SetExpires sets the "expires" field.
func (*ShareCreate) SetFile ¶
func (sc *ShareCreate) SetFile(f *File) *ShareCreate
SetFile sets the "file" edge to the File entity.
func (*ShareCreate) SetFileID ¶
func (sc *ShareCreate) SetFileID(id int) *ShareCreate
SetFileID sets the "file" edge to the File entity by ID.
func (*ShareCreate) SetNillableCreatedAt ¶
func (sc *ShareCreate) SetNillableCreatedAt(t *time.Time) *ShareCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ShareCreate) SetNillableDeletedAt ¶
func (sc *ShareCreate) SetNillableDeletedAt(t *time.Time) *ShareCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ShareCreate) SetNillableDownloads ¶
func (sc *ShareCreate) SetNillableDownloads(i *int) *ShareCreate
SetNillableDownloads sets the "downloads" field if the given value is not nil.
func (*ShareCreate) SetNillableExpires ¶
func (sc *ShareCreate) SetNillableExpires(t *time.Time) *ShareCreate
SetNillableExpires sets the "expires" field if the given value is not nil.
func (*ShareCreate) SetNillableFileID ¶
func (sc *ShareCreate) SetNillableFileID(id *int) *ShareCreate
SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil.
func (*ShareCreate) SetNillablePassword ¶
func (sc *ShareCreate) SetNillablePassword(s *string) *ShareCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*ShareCreate) SetNillableRemainDownloads ¶
func (sc *ShareCreate) SetNillableRemainDownloads(i *int) *ShareCreate
SetNillableRemainDownloads sets the "remain_downloads" field if the given value is not nil.
func (*ShareCreate) SetNillableUpdatedAt ¶
func (sc *ShareCreate) SetNillableUpdatedAt(t *time.Time) *ShareCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ShareCreate) SetNillableUserID ¶
func (sc *ShareCreate) SetNillableUserID(id *int) *ShareCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*ShareCreate) SetNillableViews ¶
func (sc *ShareCreate) SetNillableViews(i *int) *ShareCreate
SetNillableViews sets the "views" field if the given value is not nil.
func (*ShareCreate) SetPassword ¶
func (sc *ShareCreate) SetPassword(s string) *ShareCreate
SetPassword sets the "password" field.
func (*ShareCreate) SetProps ¶
func (sc *ShareCreate) SetProps(tp *types.ShareProps) *ShareCreate
SetProps sets the "props" field.
func (*ShareCreate) SetRawID ¶
func (m *ShareCreate) SetRawID(t int) *ShareCreate
func (*ShareCreate) SetRemainDownloads ¶
func (sc *ShareCreate) SetRemainDownloads(i int) *ShareCreate
SetRemainDownloads sets the "remain_downloads" field.
func (*ShareCreate) SetUpdatedAt ¶
func (sc *ShareCreate) SetUpdatedAt(t time.Time) *ShareCreate
SetUpdatedAt sets the "updated_at" field.
func (*ShareCreate) SetUser ¶
func (sc *ShareCreate) SetUser(u *User) *ShareCreate
SetUser sets the "user" edge to the User entity.
func (*ShareCreate) SetUserID ¶
func (sc *ShareCreate) SetUserID(id int) *ShareCreate
SetUserID sets the "user" edge to the User entity by ID.
func (*ShareCreate) SetViews ¶
func (sc *ShareCreate) SetViews(i int) *ShareCreate
SetViews sets the "views" field.
type ShareCreateBulk ¶
type ShareCreateBulk struct {
// contains filtered or unexported fields
}
ShareCreateBulk is the builder for creating many Share entities in bulk.
func (*ShareCreateBulk) Exec ¶
func (scb *ShareCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ShareCreateBulk) ExecContext ¶
func (c *ShareCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShareCreateBulk) ExecX ¶
func (scb *ShareCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShareCreateBulk) OnConflict ¶
func (scb *ShareCreateBulk) OnConflict(opts ...sql.ConflictOption) *ShareUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Share.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.ShareUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ShareCreateBulk) OnConflictColumns ¶
func (scb *ShareCreateBulk) OnConflictColumns(columns ...string) *ShareUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Share.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ShareCreateBulk) QueryContext ¶
func (c *ShareCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type ShareDelete ¶
type ShareDelete struct {
// contains filtered or unexported fields
}
ShareDelete is the builder for deleting a Share entity.
func (*ShareDelete) Exec ¶
func (sd *ShareDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ShareDelete) ExecContext ¶
func (c *ShareDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShareDelete) ExecX ¶
func (sd *ShareDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ShareDelete) QueryContext ¶
func (c *ShareDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShareDelete) Where ¶
func (sd *ShareDelete) Where(ps ...predicate.Share) *ShareDelete
Where appends a list predicates to the ShareDelete builder.
type ShareDeleteOne ¶
type ShareDeleteOne struct {
// contains filtered or unexported fields
}
ShareDeleteOne is the builder for deleting a single Share entity.
func (*ShareDeleteOne) Exec ¶
func (sdo *ShareDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ShareDeleteOne) ExecX ¶
func (sdo *ShareDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShareDeleteOne) Where ¶
func (sdo *ShareDeleteOne) Where(ps ...predicate.Share) *ShareDeleteOne
Where appends a list predicates to the ShareDelete builder.
type ShareEdges ¶
type ShareEdges struct {
User *User `json:"user,omitempty"`
File *File `json:"file,omitempty"`
// contains filtered or unexported fields
}
ShareEdges holds the relations/edges for other nodes in the graph.
func (ShareEdges) FileOrErr ¶
func (e ShareEdges) FileOrErr() (*File, error)
FileOrErr returns the File value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ShareEdges) UserOrErr ¶
func (e ShareEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ShareGroupBy ¶
type ShareGroupBy struct {
// contains filtered or unexported fields
}
ShareGroupBy is the group-by builder for Share entities.
func (*ShareGroupBy) Aggregate ¶
func (sgb *ShareGroupBy) Aggregate(fns ...AggregateFunc) *ShareGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ShareGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShareGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShareGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShareGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShareGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShareGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShareGroupBy) Scan ¶
func (sgb *ShareGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShareGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShareMutation ¶
type ShareMutation struct {
// contains filtered or unexported fields
}
ShareMutation represents an operation that mutates the Share nodes in the graph.
func (*ShareMutation) AddDownloads ¶
func (m *ShareMutation) AddDownloads(i int)
AddDownloads adds i to the "downloads" field.
func (*ShareMutation) AddField ¶
func (m *ShareMutation) 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 (*ShareMutation) AddRemainDownloads ¶
func (m *ShareMutation) AddRemainDownloads(i int)
AddRemainDownloads adds i to the "remain_downloads" field.
func (*ShareMutation) AddViews ¶
func (m *ShareMutation) AddViews(i int)
AddViews adds i to the "views" field.
func (*ShareMutation) AddedDownloads ¶
func (m *ShareMutation) AddedDownloads() (r int, exists bool)
AddedDownloads returns the value that was added to the "downloads" field in this mutation.
func (*ShareMutation) AddedEdges ¶
func (m *ShareMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ShareMutation) AddedField ¶
func (m *ShareMutation) 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 (*ShareMutation) AddedFields ¶
func (m *ShareMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ShareMutation) AddedIDs ¶
func (m *ShareMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ShareMutation) AddedRemainDownloads ¶
func (m *ShareMutation) AddedRemainDownloads() (r int, exists bool)
AddedRemainDownloads returns the value that was added to the "remain_downloads" field in this mutation.
func (*ShareMutation) AddedViews ¶
func (m *ShareMutation) AddedViews() (r int, exists bool)
AddedViews returns the value that was added to the "views" field in this mutation.
func (*ShareMutation) ClearDeletedAt ¶
func (m *ShareMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ShareMutation) ClearEdge ¶
func (m *ShareMutation) 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 (*ShareMutation) ClearExpires ¶
func (m *ShareMutation) ClearExpires()
ClearExpires clears the value of the "expires" field.
func (*ShareMutation) ClearField ¶
func (m *ShareMutation) 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 (*ShareMutation) ClearFile ¶
func (m *ShareMutation) ClearFile()
ClearFile clears the "file" edge to the File entity.
func (*ShareMutation) ClearPassword ¶
func (m *ShareMutation) ClearPassword()
ClearPassword clears the value of the "password" field.
func (*ShareMutation) ClearProps ¶
func (m *ShareMutation) ClearProps()
ClearProps clears the value of the "props" field.
func (*ShareMutation) ClearRemainDownloads ¶
func (m *ShareMutation) ClearRemainDownloads()
ClearRemainDownloads clears the value of the "remain_downloads" field.
func (*ShareMutation) ClearUser ¶
func (m *ShareMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*ShareMutation) ClearedEdges ¶
func (m *ShareMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ShareMutation) ClearedFields ¶
func (m *ShareMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ShareMutation) Client ¶
func (m ShareMutation) 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 (*ShareMutation) CreatedAt ¶
func (m *ShareMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ShareMutation) DeletedAt ¶
func (m *ShareMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*ShareMutation) DeletedAtCleared ¶
func (m *ShareMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*ShareMutation) Downloads ¶
func (m *ShareMutation) Downloads() (r int, exists bool)
Downloads returns the value of the "downloads" field in the mutation.
func (*ShareMutation) EdgeCleared ¶
func (m *ShareMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ShareMutation) ExecContext ¶
func (c *ShareMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShareMutation) Expires ¶
func (m *ShareMutation) Expires() (r time.Time, exists bool)
Expires returns the value of the "expires" field in the mutation.
func (*ShareMutation) ExpiresCleared ¶
func (m *ShareMutation) ExpiresCleared() bool
ExpiresCleared returns if the "expires" field was cleared in this mutation.
func (*ShareMutation) Field ¶
func (m *ShareMutation) 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 (*ShareMutation) FieldCleared ¶
func (m *ShareMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ShareMutation) Fields ¶
func (m *ShareMutation) 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 (*ShareMutation) FileCleared ¶
func (m *ShareMutation) FileCleared() bool
FileCleared reports if the "file" edge to the File entity was cleared.
func (*ShareMutation) FileID ¶
func (m *ShareMutation) FileID() (id int, exists bool)
FileID returns the "file" edge ID in the mutation.
func (*ShareMutation) FileIDs ¶
func (m *ShareMutation) FileIDs() (ids []int)
FileIDs returns the "file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FileID instead. It exists only for internal usage by the builders.
func (*ShareMutation) ID ¶
func (m *ShareMutation) 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 (*ShareMutation) IDs ¶
func (m *ShareMutation) 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 (*ShareMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Share entity. If the Share 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 (*ShareMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Share entity. If the Share 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 (*ShareMutation) OldDownloads ¶
func (m *ShareMutation) OldDownloads(ctx context.Context) (v int, err error)
OldDownloads returns the old "downloads" field's value of the Share entity. If the Share 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 (*ShareMutation) OldExpires ¶
OldExpires returns the old "expires" field's value of the Share entity. If the Share 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 (*ShareMutation) 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 (*ShareMutation) OldPassword ¶
func (m *ShareMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the Share entity. If the Share 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 (*ShareMutation) OldProps ¶
func (m *ShareMutation) OldProps(ctx context.Context) (v *types.ShareProps, err error)
OldProps returns the old "props" field's value of the Share entity. If the Share 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 (*ShareMutation) OldRemainDownloads ¶
func (m *ShareMutation) OldRemainDownloads(ctx context.Context) (v *int, err error)
OldRemainDownloads returns the old "remain_downloads" field's value of the Share entity. If the Share 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 (*ShareMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Share entity. If the Share 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 (*ShareMutation) OldViews ¶
func (m *ShareMutation) OldViews(ctx context.Context) (v int, err error)
OldViews returns the old "views" field's value of the Share entity. If the Share 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 (*ShareMutation) Password ¶
func (m *ShareMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*ShareMutation) PasswordCleared ¶
func (m *ShareMutation) PasswordCleared() bool
PasswordCleared returns if the "password" field was cleared in this mutation.
func (*ShareMutation) Props ¶
func (m *ShareMutation) Props() (r *types.ShareProps, exists bool)
Props returns the value of the "props" field in the mutation.
func (*ShareMutation) PropsCleared ¶
func (m *ShareMutation) PropsCleared() bool
PropsCleared returns if the "props" field was cleared in this mutation.
func (*ShareMutation) QueryContext ¶
func (c *ShareMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShareMutation) RemainDownloads ¶
func (m *ShareMutation) RemainDownloads() (r int, exists bool)
RemainDownloads returns the value of the "remain_downloads" field in the mutation.
func (*ShareMutation) RemainDownloadsCleared ¶
func (m *ShareMutation) RemainDownloadsCleared() bool
RemainDownloadsCleared returns if the "remain_downloads" field was cleared in this mutation.
func (*ShareMutation) RemovedEdges ¶
func (m *ShareMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ShareMutation) RemovedIDs ¶
func (m *ShareMutation) 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 (*ShareMutation) ResetCreatedAt ¶
func (m *ShareMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ShareMutation) ResetDeletedAt ¶
func (m *ShareMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*ShareMutation) ResetDownloads ¶
func (m *ShareMutation) ResetDownloads()
ResetDownloads resets all changes to the "downloads" field.
func (*ShareMutation) ResetEdge ¶
func (m *ShareMutation) 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 (*ShareMutation) ResetExpires ¶
func (m *ShareMutation) ResetExpires()
ResetExpires resets all changes to the "expires" field.
func (*ShareMutation) ResetField ¶
func (m *ShareMutation) 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 (*ShareMutation) ResetFile ¶
func (m *ShareMutation) ResetFile()
ResetFile resets all changes to the "file" edge.
func (*ShareMutation) ResetPassword ¶
func (m *ShareMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*ShareMutation) ResetProps ¶
func (m *ShareMutation) ResetProps()
ResetProps resets all changes to the "props" field.
func (*ShareMutation) ResetRemainDownloads ¶
func (m *ShareMutation) ResetRemainDownloads()
ResetRemainDownloads resets all changes to the "remain_downloads" field.
func (*ShareMutation) ResetUpdatedAt ¶
func (m *ShareMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ShareMutation) ResetUser ¶
func (m *ShareMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*ShareMutation) ResetViews ¶
func (m *ShareMutation) ResetViews()
ResetViews resets all changes to the "views" field.
func (*ShareMutation) SetCreatedAt ¶
func (m *ShareMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ShareMutation) SetDeletedAt ¶
func (m *ShareMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*ShareMutation) SetDownloads ¶
func (m *ShareMutation) SetDownloads(i int)
SetDownloads sets the "downloads" field.
func (*ShareMutation) SetExpires ¶
func (m *ShareMutation) SetExpires(t time.Time)
SetExpires sets the "expires" field.
func (*ShareMutation) SetField ¶
func (m *ShareMutation) 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 (*ShareMutation) SetFileID ¶
func (m *ShareMutation) SetFileID(id int)
SetFileID sets the "file" edge to the File entity by id.
func (*ShareMutation) SetOp ¶
func (m *ShareMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ShareMutation) SetPassword ¶
func (m *ShareMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*ShareMutation) SetProps ¶
func (m *ShareMutation) SetProps(tp *types.ShareProps)
SetProps sets the "props" field.
func (*ShareMutation) SetRawID ¶
func (m *ShareMutation) SetRawID(t int)
func (*ShareMutation) SetRemainDownloads ¶
func (m *ShareMutation) SetRemainDownloads(i int)
SetRemainDownloads sets the "remain_downloads" field.
func (*ShareMutation) SetUpdatedAt ¶
func (m *ShareMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ShareMutation) SetUserID ¶
func (m *ShareMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*ShareMutation) SetViews ¶
func (m *ShareMutation) SetViews(i int)
SetViews sets the "views" field.
func (ShareMutation) Tx ¶
func (m ShareMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ShareMutation) Type ¶
func (m *ShareMutation) Type() string
Type returns the node type of this mutation (Share).
func (*ShareMutation) UpdatedAt ¶
func (m *ShareMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ShareMutation) UserCleared ¶
func (m *ShareMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*ShareMutation) UserID ¶
func (m *ShareMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*ShareMutation) UserIDs ¶
func (m *ShareMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*ShareMutation) Views ¶
func (m *ShareMutation) Views() (r int, exists bool)
Views returns the value of the "views" field in the mutation.
func (*ShareMutation) Where ¶
func (m *ShareMutation) Where(ps ...predicate.Share)
Where appends a list predicates to the ShareMutation builder.
func (*ShareMutation) WhereP ¶
func (m *ShareMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ShareMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ShareQuery ¶
type ShareQuery struct {
// contains filtered or unexported fields
}
ShareQuery is the builder for querying Share entities.
func (*ShareQuery) Aggregate ¶
func (sq *ShareQuery) Aggregate(fns ...AggregateFunc) *ShareSelect
Aggregate returns a ShareSelect configured with the given aggregations.
func (*ShareQuery) All ¶
func (sq *ShareQuery) All(ctx context.Context) ([]*Share, error)
All executes the query and returns a list of Shares.
func (*ShareQuery) AllX ¶
func (sq *ShareQuery) AllX(ctx context.Context) []*Share
AllX is like All, but panics if an error occurs.
func (*ShareQuery) Clone ¶
func (sq *ShareQuery) Clone() *ShareQuery
Clone returns a duplicate of the ShareQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ShareQuery) Count ¶
func (sq *ShareQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ShareQuery) CountX ¶
func (sq *ShareQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ShareQuery) ExecContext ¶
func (c *ShareQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShareQuery) Exist ¶
func (sq *ShareQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ShareQuery) ExistX ¶
func (sq *ShareQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ShareQuery) First ¶
func (sq *ShareQuery) First(ctx context.Context) (*Share, error)
First returns the first Share entity from the query. Returns a *NotFoundError when no Share was found.
func (*ShareQuery) FirstID ¶
func (sq *ShareQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Share ID from the query. Returns a *NotFoundError when no Share ID was found.
func (*ShareQuery) FirstIDX ¶
func (sq *ShareQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ShareQuery) FirstX ¶
func (sq *ShareQuery) FirstX(ctx context.Context) *Share
FirstX is like First, but panics if an error occurs.
func (*ShareQuery) GroupBy ¶
func (sq *ShareQuery) GroupBy(field string, fields ...string) *ShareGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Share.Query().
GroupBy(share.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ShareQuery) IDs ¶
func (sq *ShareQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Share IDs.
func (*ShareQuery) IDsX ¶
func (sq *ShareQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ShareQuery) Limit ¶
func (sq *ShareQuery) Limit(limit int) *ShareQuery
Limit the number of records to be returned by this query.
func (*ShareQuery) Offset ¶
func (sq *ShareQuery) Offset(offset int) *ShareQuery
Offset to start from.
func (*ShareQuery) Only ¶
func (sq *ShareQuery) Only(ctx context.Context) (*Share, error)
Only returns a single Share entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Share entity is found. Returns a *NotFoundError when no Share entities are found.
func (*ShareQuery) OnlyID ¶
func (sq *ShareQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Share ID in the query. Returns a *NotSingularError when more than one Share ID is found. Returns a *NotFoundError when no entities are found.
func (*ShareQuery) OnlyIDX ¶
func (sq *ShareQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ShareQuery) OnlyX ¶
func (sq *ShareQuery) OnlyX(ctx context.Context) *Share
OnlyX is like Only, but panics if an error occurs.
func (*ShareQuery) Order ¶
func (sq *ShareQuery) Order(o ...share.OrderOption) *ShareQuery
Order specifies how the records should be ordered.
func (*ShareQuery) QueryContext ¶
func (c *ShareQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShareQuery) QueryFile ¶
func (sq *ShareQuery) QueryFile() *FileQuery
QueryFile chains the current query on the "file" edge.
func (*ShareQuery) QueryUser ¶
func (sq *ShareQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*ShareQuery) Select ¶
func (sq *ShareQuery) Select(fields ...string) *ShareSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Share.Query().
Select(share.FieldCreatedAt).
Scan(ctx, &v)
func (*ShareQuery) Unique ¶
func (sq *ShareQuery) Unique(unique bool) *ShareQuery
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 (*ShareQuery) Where ¶
func (sq *ShareQuery) Where(ps ...predicate.Share) *ShareQuery
Where adds a new predicate for the ShareQuery builder.
func (*ShareQuery) WithFile ¶
func (sq *ShareQuery) WithFile(opts ...func(*FileQuery)) *ShareQuery
WithFile tells the query-builder to eager-load the nodes that are connected to the "file" edge. The optional arguments are used to configure the query builder of the edge.
func (*ShareQuery) WithUser ¶
func (sq *ShareQuery) WithUser(opts ...func(*UserQuery)) *ShareQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type ShareSelect ¶
type ShareSelect struct {
// contains filtered or unexported fields
}
ShareSelect is the builder for selecting fields of Share entities.
func (*ShareSelect) Aggregate ¶
func (ss *ShareSelect) Aggregate(fns ...AggregateFunc) *ShareSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ShareSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShareSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (ShareSelect) ExecContext ¶
func (c ShareSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShareSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShareSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShareSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShareSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (ShareSelect) QueryContext ¶
func (c ShareSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShareSelect) Scan ¶
func (ss *ShareSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShareSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShareUpdate ¶
type ShareUpdate struct {
// contains filtered or unexported fields
}
ShareUpdate is the builder for updating Share entities.
func (*ShareUpdate) AddDownloads ¶
func (su *ShareUpdate) AddDownloads(i int) *ShareUpdate
AddDownloads adds i to the "downloads" field.
func (*ShareUpdate) AddRemainDownloads ¶
func (su *ShareUpdate) AddRemainDownloads(i int) *ShareUpdate
AddRemainDownloads adds i to the "remain_downloads" field.
func (*ShareUpdate) AddViews ¶
func (su *ShareUpdate) AddViews(i int) *ShareUpdate
AddViews adds i to the "views" field.
func (*ShareUpdate) ClearDeletedAt ¶
func (su *ShareUpdate) ClearDeletedAt() *ShareUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ShareUpdate) ClearExpires ¶
func (su *ShareUpdate) ClearExpires() *ShareUpdate
ClearExpires clears the value of the "expires" field.
func (*ShareUpdate) ClearFile ¶
func (su *ShareUpdate) ClearFile() *ShareUpdate
ClearFile clears the "file" edge to the File entity.
func (*ShareUpdate) ClearPassword ¶
func (su *ShareUpdate) ClearPassword() *ShareUpdate
ClearPassword clears the value of the "password" field.
func (*ShareUpdate) ClearProps ¶
func (su *ShareUpdate) ClearProps() *ShareUpdate
ClearProps clears the value of the "props" field.
func (*ShareUpdate) ClearRemainDownloads ¶
func (su *ShareUpdate) ClearRemainDownloads() *ShareUpdate
ClearRemainDownloads clears the value of the "remain_downloads" field.
func (*ShareUpdate) ClearUser ¶
func (su *ShareUpdate) ClearUser() *ShareUpdate
ClearUser clears the "user" edge to the User entity.
func (*ShareUpdate) Exec ¶
func (su *ShareUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShareUpdate) ExecContext ¶
func (c *ShareUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShareUpdate) ExecX ¶
func (su *ShareUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShareUpdate) Mutation ¶
func (su *ShareUpdate) Mutation() *ShareMutation
Mutation returns the ShareMutation object of the builder.
func (*ShareUpdate) QueryContext ¶
func (c *ShareUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShareUpdate) Save ¶
func (su *ShareUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ShareUpdate) SaveX ¶
func (su *ShareUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ShareUpdate) SetDeletedAt ¶
func (su *ShareUpdate) SetDeletedAt(t time.Time) *ShareUpdate
SetDeletedAt sets the "deleted_at" field.
func (*ShareUpdate) SetDownloads ¶
func (su *ShareUpdate) SetDownloads(i int) *ShareUpdate
SetDownloads sets the "downloads" field.
func (*ShareUpdate) SetExpires ¶
func (su *ShareUpdate) SetExpires(t time.Time) *ShareUpdate
SetExpires sets the "expires" field.
func (*ShareUpdate) SetFile ¶
func (su *ShareUpdate) SetFile(f *File) *ShareUpdate
SetFile sets the "file" edge to the File entity.
func (*ShareUpdate) SetFileID ¶
func (su *ShareUpdate) SetFileID(id int) *ShareUpdate
SetFileID sets the "file" edge to the File entity by ID.
func (*ShareUpdate) SetNillableDeletedAt ¶
func (su *ShareUpdate) SetNillableDeletedAt(t *time.Time) *ShareUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ShareUpdate) SetNillableDownloads ¶
func (su *ShareUpdate) SetNillableDownloads(i *int) *ShareUpdate
SetNillableDownloads sets the "downloads" field if the given value is not nil.
func (*ShareUpdate) SetNillableExpires ¶
func (su *ShareUpdate) SetNillableExpires(t *time.Time) *ShareUpdate
SetNillableExpires sets the "expires" field if the given value is not nil.
func (*ShareUpdate) SetNillableFileID ¶
func (su *ShareUpdate) SetNillableFileID(id *int) *ShareUpdate
SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil.
func (*ShareUpdate) SetNillablePassword ¶
func (su *ShareUpdate) SetNillablePassword(s *string) *ShareUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*ShareUpdate) SetNillableRemainDownloads ¶
func (su *ShareUpdate) SetNillableRemainDownloads(i *int) *ShareUpdate
SetNillableRemainDownloads sets the "remain_downloads" field if the given value is not nil.
func (*ShareUpdate) SetNillableUserID ¶
func (su *ShareUpdate) SetNillableUserID(id *int) *ShareUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*ShareUpdate) SetNillableViews ¶
func (su *ShareUpdate) SetNillableViews(i *int) *ShareUpdate
SetNillableViews sets the "views" field if the given value is not nil.
func (*ShareUpdate) SetPassword ¶
func (su *ShareUpdate) SetPassword(s string) *ShareUpdate
SetPassword sets the "password" field.
func (*ShareUpdate) SetProps ¶
func (su *ShareUpdate) SetProps(tp *types.ShareProps) *ShareUpdate
SetProps sets the "props" field.
func (*ShareUpdate) SetRemainDownloads ¶
func (su *ShareUpdate) SetRemainDownloads(i int) *ShareUpdate
SetRemainDownloads sets the "remain_downloads" field.
func (*ShareUpdate) SetUpdatedAt ¶
func (su *ShareUpdate) SetUpdatedAt(t time.Time) *ShareUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ShareUpdate) SetUser ¶
func (su *ShareUpdate) SetUser(u *User) *ShareUpdate
SetUser sets the "user" edge to the User entity.
func (*ShareUpdate) SetUserID ¶
func (su *ShareUpdate) SetUserID(id int) *ShareUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*ShareUpdate) SetViews ¶
func (su *ShareUpdate) SetViews(i int) *ShareUpdate
SetViews sets the "views" field.
func (*ShareUpdate) Where ¶
func (su *ShareUpdate) Where(ps ...predicate.Share) *ShareUpdate
Where appends a list predicates to the ShareUpdate builder.
type ShareUpdateOne ¶
type ShareUpdateOne struct {
// contains filtered or unexported fields
}
ShareUpdateOne is the builder for updating a single Share entity.
func (*ShareUpdateOne) AddDownloads ¶
func (suo *ShareUpdateOne) AddDownloads(i int) *ShareUpdateOne
AddDownloads adds i to the "downloads" field.
func (*ShareUpdateOne) AddRemainDownloads ¶
func (suo *ShareUpdateOne) AddRemainDownloads(i int) *ShareUpdateOne
AddRemainDownloads adds i to the "remain_downloads" field.
func (*ShareUpdateOne) AddViews ¶
func (suo *ShareUpdateOne) AddViews(i int) *ShareUpdateOne
AddViews adds i to the "views" field.
func (*ShareUpdateOne) ClearDeletedAt ¶
func (suo *ShareUpdateOne) ClearDeletedAt() *ShareUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ShareUpdateOne) ClearExpires ¶
func (suo *ShareUpdateOne) ClearExpires() *ShareUpdateOne
ClearExpires clears the value of the "expires" field.
func (*ShareUpdateOne) ClearFile ¶
func (suo *ShareUpdateOne) ClearFile() *ShareUpdateOne
ClearFile clears the "file" edge to the File entity.
func (*ShareUpdateOne) ClearPassword ¶
func (suo *ShareUpdateOne) ClearPassword() *ShareUpdateOne
ClearPassword clears the value of the "password" field.
func (*ShareUpdateOne) ClearProps ¶
func (suo *ShareUpdateOne) ClearProps() *ShareUpdateOne
ClearProps clears the value of the "props" field.
func (*ShareUpdateOne) ClearRemainDownloads ¶
func (suo *ShareUpdateOne) ClearRemainDownloads() *ShareUpdateOne
ClearRemainDownloads clears the value of the "remain_downloads" field.
func (*ShareUpdateOne) ClearUser ¶
func (suo *ShareUpdateOne) ClearUser() *ShareUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*ShareUpdateOne) Exec ¶
func (suo *ShareUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ShareUpdateOne) ExecContext ¶
func (c *ShareUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShareUpdateOne) ExecX ¶
func (suo *ShareUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShareUpdateOne) Mutation ¶
func (suo *ShareUpdateOne) Mutation() *ShareMutation
Mutation returns the ShareMutation object of the builder.
func (*ShareUpdateOne) QueryContext ¶
func (c *ShareUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShareUpdateOne) Save ¶
func (suo *ShareUpdateOne) Save(ctx context.Context) (*Share, error)
Save executes the query and returns the updated Share entity.
func (*ShareUpdateOne) SaveX ¶
func (suo *ShareUpdateOne) SaveX(ctx context.Context) *Share
SaveX is like Save, but panics if an error occurs.
func (*ShareUpdateOne) Select ¶
func (suo *ShareUpdateOne) Select(field string, fields ...string) *ShareUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ShareUpdateOne) SetDeletedAt ¶
func (suo *ShareUpdateOne) SetDeletedAt(t time.Time) *ShareUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*ShareUpdateOne) SetDownloads ¶
func (suo *ShareUpdateOne) SetDownloads(i int) *ShareUpdateOne
SetDownloads sets the "downloads" field.
func (*ShareUpdateOne) SetExpires ¶
func (suo *ShareUpdateOne) SetExpires(t time.Time) *ShareUpdateOne
SetExpires sets the "expires" field.
func (*ShareUpdateOne) SetFile ¶
func (suo *ShareUpdateOne) SetFile(f *File) *ShareUpdateOne
SetFile sets the "file" edge to the File entity.
func (*ShareUpdateOne) SetFileID ¶
func (suo *ShareUpdateOne) SetFileID(id int) *ShareUpdateOne
SetFileID sets the "file" edge to the File entity by ID.
func (*ShareUpdateOne) SetNillableDeletedAt ¶
func (suo *ShareUpdateOne) SetNillableDeletedAt(t *time.Time) *ShareUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ShareUpdateOne) SetNillableDownloads ¶
func (suo *ShareUpdateOne) SetNillableDownloads(i *int) *ShareUpdateOne
SetNillableDownloads sets the "downloads" field if the given value is not nil.
func (*ShareUpdateOne) SetNillableExpires ¶
func (suo *ShareUpdateOne) SetNillableExpires(t *time.Time) *ShareUpdateOne
SetNillableExpires sets the "expires" field if the given value is not nil.
func (*ShareUpdateOne) SetNillableFileID ¶
func (suo *ShareUpdateOne) SetNillableFileID(id *int) *ShareUpdateOne
SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil.
func (*ShareUpdateOne) SetNillablePassword ¶
func (suo *ShareUpdateOne) SetNillablePassword(s *string) *ShareUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*ShareUpdateOne) SetNillableRemainDownloads ¶
func (suo *ShareUpdateOne) SetNillableRemainDownloads(i *int) *ShareUpdateOne
SetNillableRemainDownloads sets the "remain_downloads" field if the given value is not nil.
func (*ShareUpdateOne) SetNillableUserID ¶
func (suo *ShareUpdateOne) SetNillableUserID(id *int) *ShareUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*ShareUpdateOne) SetNillableViews ¶
func (suo *ShareUpdateOne) SetNillableViews(i *int) *ShareUpdateOne
SetNillableViews sets the "views" field if the given value is not nil.
func (*ShareUpdateOne) SetPassword ¶
func (suo *ShareUpdateOne) SetPassword(s string) *ShareUpdateOne
SetPassword sets the "password" field.
func (*ShareUpdateOne) SetProps ¶
func (suo *ShareUpdateOne) SetProps(tp *types.ShareProps) *ShareUpdateOne
SetProps sets the "props" field.
func (*ShareUpdateOne) SetRemainDownloads ¶
func (suo *ShareUpdateOne) SetRemainDownloads(i int) *ShareUpdateOne
SetRemainDownloads sets the "remain_downloads" field.
func (*ShareUpdateOne) SetUpdatedAt ¶
func (suo *ShareUpdateOne) SetUpdatedAt(t time.Time) *ShareUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ShareUpdateOne) SetUser ¶
func (suo *ShareUpdateOne) SetUser(u *User) *ShareUpdateOne
SetUser sets the "user" edge to the User entity.
func (*ShareUpdateOne) SetUserID ¶
func (suo *ShareUpdateOne) SetUserID(id int) *ShareUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*ShareUpdateOne) SetViews ¶
func (suo *ShareUpdateOne) SetViews(i int) *ShareUpdateOne
SetViews sets the "views" field.
func (*ShareUpdateOne) Where ¶
func (suo *ShareUpdateOne) Where(ps ...predicate.Share) *ShareUpdateOne
Where appends a list predicates to the ShareUpdate builder.
type ShareUpsert ¶
type ShareUpsert struct {
}
ShareUpsert is the "OnConflict" setter.
func (*ShareUpsert) AddDownloads ¶
func (u *ShareUpsert) AddDownloads(v int) *ShareUpsert
AddDownloads adds v to the "downloads" field.
func (*ShareUpsert) AddRemainDownloads ¶
func (u *ShareUpsert) AddRemainDownloads(v int) *ShareUpsert
AddRemainDownloads adds v to the "remain_downloads" field.
func (*ShareUpsert) AddViews ¶
func (u *ShareUpsert) AddViews(v int) *ShareUpsert
AddViews adds v to the "views" field.
func (*ShareUpsert) ClearDeletedAt ¶
func (u *ShareUpsert) ClearDeletedAt() *ShareUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ShareUpsert) ClearExpires ¶
func (u *ShareUpsert) ClearExpires() *ShareUpsert
ClearExpires clears the value of the "expires" field.
func (*ShareUpsert) ClearPassword ¶
func (u *ShareUpsert) ClearPassword() *ShareUpsert
ClearPassword clears the value of the "password" field.
func (*ShareUpsert) ClearProps ¶
func (u *ShareUpsert) ClearProps() *ShareUpsert
ClearProps clears the value of the "props" field.
func (*ShareUpsert) ClearRemainDownloads ¶
func (u *ShareUpsert) ClearRemainDownloads() *ShareUpsert
ClearRemainDownloads clears the value of the "remain_downloads" field.
func (*ShareUpsert) SetDeletedAt ¶
func (u *ShareUpsert) SetDeletedAt(v time.Time) *ShareUpsert
SetDeletedAt sets the "deleted_at" field.
func (*ShareUpsert) SetDownloads ¶
func (u *ShareUpsert) SetDownloads(v int) *ShareUpsert
SetDownloads sets the "downloads" field.
func (*ShareUpsert) SetExpires ¶
func (u *ShareUpsert) SetExpires(v time.Time) *ShareUpsert
SetExpires sets the "expires" field.
func (*ShareUpsert) SetPassword ¶
func (u *ShareUpsert) SetPassword(v string) *ShareUpsert
SetPassword sets the "password" field.
func (*ShareUpsert) SetProps ¶
func (u *ShareUpsert) SetProps(v *types.ShareProps) *ShareUpsert
SetProps sets the "props" field.
func (*ShareUpsert) SetRemainDownloads ¶
func (u *ShareUpsert) SetRemainDownloads(v int) *ShareUpsert
SetRemainDownloads sets the "remain_downloads" field.
func (*ShareUpsert) SetUpdatedAt ¶
func (u *ShareUpsert) SetUpdatedAt(v time.Time) *ShareUpsert
SetUpdatedAt sets the "updated_at" field.
func (*ShareUpsert) SetViews ¶
func (u *ShareUpsert) SetViews(v int) *ShareUpsert
SetViews sets the "views" field.
func (*ShareUpsert) UpdateDeletedAt ¶
func (u *ShareUpsert) UpdateDeletedAt() *ShareUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*ShareUpsert) UpdateDownloads ¶
func (u *ShareUpsert) UpdateDownloads() *ShareUpsert
UpdateDownloads sets the "downloads" field to the value that was provided on create.
func (*ShareUpsert) UpdateExpires ¶
func (u *ShareUpsert) UpdateExpires() *ShareUpsert
UpdateExpires sets the "expires" field to the value that was provided on create.
func (*ShareUpsert) UpdatePassword ¶
func (u *ShareUpsert) UpdatePassword() *ShareUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*ShareUpsert) UpdateProps ¶
func (u *ShareUpsert) UpdateProps() *ShareUpsert
UpdateProps sets the "props" field to the value that was provided on create.
func (*ShareUpsert) UpdateRemainDownloads ¶
func (u *ShareUpsert) UpdateRemainDownloads() *ShareUpsert
UpdateRemainDownloads sets the "remain_downloads" field to the value that was provided on create.
func (*ShareUpsert) UpdateUpdatedAt ¶
func (u *ShareUpsert) UpdateUpdatedAt() *ShareUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*ShareUpsert) UpdateViews ¶
func (u *ShareUpsert) UpdateViews() *ShareUpsert
UpdateViews sets the "views" field to the value that was provided on create.
type ShareUpsertBulk ¶
type ShareUpsertBulk struct {
// contains filtered or unexported fields
}
ShareUpsertBulk is the builder for "upsert"-ing a bulk of Share nodes.
func (*ShareUpsertBulk) AddDownloads ¶
func (u *ShareUpsertBulk) AddDownloads(v int) *ShareUpsertBulk
AddDownloads adds v to the "downloads" field.
func (*ShareUpsertBulk) AddRemainDownloads ¶
func (u *ShareUpsertBulk) AddRemainDownloads(v int) *ShareUpsertBulk
AddRemainDownloads adds v to the "remain_downloads" field.
func (*ShareUpsertBulk) AddViews ¶
func (u *ShareUpsertBulk) AddViews(v int) *ShareUpsertBulk
AddViews adds v to the "views" field.
func (*ShareUpsertBulk) ClearDeletedAt ¶
func (u *ShareUpsertBulk) ClearDeletedAt() *ShareUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ShareUpsertBulk) ClearExpires ¶
func (u *ShareUpsertBulk) ClearExpires() *ShareUpsertBulk
ClearExpires clears the value of the "expires" field.
func (*ShareUpsertBulk) ClearPassword ¶
func (u *ShareUpsertBulk) ClearPassword() *ShareUpsertBulk
ClearPassword clears the value of the "password" field.
func (*ShareUpsertBulk) ClearProps ¶
func (u *ShareUpsertBulk) ClearProps() *ShareUpsertBulk
ClearProps clears the value of the "props" field.
func (*ShareUpsertBulk) ClearRemainDownloads ¶
func (u *ShareUpsertBulk) ClearRemainDownloads() *ShareUpsertBulk
ClearRemainDownloads clears the value of the "remain_downloads" field.
func (*ShareUpsertBulk) DoNothing ¶
func (u *ShareUpsertBulk) DoNothing() *ShareUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ShareUpsertBulk) Exec ¶
func (u *ShareUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ShareUpsertBulk) ExecX ¶
func (u *ShareUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShareUpsertBulk) Ignore ¶
func (u *ShareUpsertBulk) Ignore() *ShareUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Share.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ShareUpsertBulk) SetDeletedAt ¶
func (u *ShareUpsertBulk) SetDeletedAt(v time.Time) *ShareUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*ShareUpsertBulk) SetDownloads ¶
func (u *ShareUpsertBulk) SetDownloads(v int) *ShareUpsertBulk
SetDownloads sets the "downloads" field.
func (*ShareUpsertBulk) SetExpires ¶
func (u *ShareUpsertBulk) SetExpires(v time.Time) *ShareUpsertBulk
SetExpires sets the "expires" field.
func (*ShareUpsertBulk) SetPassword ¶
func (u *ShareUpsertBulk) SetPassword(v string) *ShareUpsertBulk
SetPassword sets the "password" field.
func (*ShareUpsertBulk) SetProps ¶
func (u *ShareUpsertBulk) SetProps(v *types.ShareProps) *ShareUpsertBulk
SetProps sets the "props" field.
func (*ShareUpsertBulk) SetRemainDownloads ¶
func (u *ShareUpsertBulk) SetRemainDownloads(v int) *ShareUpsertBulk
SetRemainDownloads sets the "remain_downloads" field.
func (*ShareUpsertBulk) SetUpdatedAt ¶
func (u *ShareUpsertBulk) SetUpdatedAt(v time.Time) *ShareUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*ShareUpsertBulk) SetViews ¶
func (u *ShareUpsertBulk) SetViews(v int) *ShareUpsertBulk
SetViews sets the "views" field.
func (*ShareUpsertBulk) Update ¶
func (u *ShareUpsertBulk) Update(set func(*ShareUpsert)) *ShareUpsertBulk
Update allows overriding fields `UPDATE` values. See the ShareCreateBulk.OnConflict documentation for more info.
func (*ShareUpsertBulk) UpdateDeletedAt ¶
func (u *ShareUpsertBulk) UpdateDeletedAt() *ShareUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*ShareUpsertBulk) UpdateDownloads ¶
func (u *ShareUpsertBulk) UpdateDownloads() *ShareUpsertBulk
UpdateDownloads sets the "downloads" field to the value that was provided on create.
func (*ShareUpsertBulk) UpdateExpires ¶
func (u *ShareUpsertBulk) UpdateExpires() *ShareUpsertBulk
UpdateExpires sets the "expires" field to the value that was provided on create.
func (*ShareUpsertBulk) UpdateNewValues ¶
func (u *ShareUpsertBulk) UpdateNewValues() *ShareUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Share.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ShareUpsertBulk) UpdatePassword ¶
func (u *ShareUpsertBulk) UpdatePassword() *ShareUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*ShareUpsertBulk) UpdateProps ¶
func (u *ShareUpsertBulk) UpdateProps() *ShareUpsertBulk
UpdateProps sets the "props" field to the value that was provided on create.
func (*ShareUpsertBulk) UpdateRemainDownloads ¶
func (u *ShareUpsertBulk) UpdateRemainDownloads() *ShareUpsertBulk
UpdateRemainDownloads sets the "remain_downloads" field to the value that was provided on create.
func (*ShareUpsertBulk) UpdateUpdatedAt ¶
func (u *ShareUpsertBulk) UpdateUpdatedAt() *ShareUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*ShareUpsertBulk) UpdateViews ¶
func (u *ShareUpsertBulk) UpdateViews() *ShareUpsertBulk
UpdateViews sets the "views" field to the value that was provided on create.
type ShareUpsertOne ¶
type ShareUpsertOne struct {
// contains filtered or unexported fields
}
ShareUpsertOne is the builder for "upsert"-ing
one Share node.
func (*ShareUpsertOne) AddDownloads ¶
func (u *ShareUpsertOne) AddDownloads(v int) *ShareUpsertOne
AddDownloads adds v to the "downloads" field.
func (*ShareUpsertOne) AddRemainDownloads ¶
func (u *ShareUpsertOne) AddRemainDownloads(v int) *ShareUpsertOne
AddRemainDownloads adds v to the "remain_downloads" field.
func (*ShareUpsertOne) AddViews ¶
func (u *ShareUpsertOne) AddViews(v int) *ShareUpsertOne
AddViews adds v to the "views" field.
func (*ShareUpsertOne) ClearDeletedAt ¶
func (u *ShareUpsertOne) ClearDeletedAt() *ShareUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ShareUpsertOne) ClearExpires ¶
func (u *ShareUpsertOne) ClearExpires() *ShareUpsertOne
ClearExpires clears the value of the "expires" field.
func (*ShareUpsertOne) ClearPassword ¶
func (u *ShareUpsertOne) ClearPassword() *ShareUpsertOne
ClearPassword clears the value of the "password" field.
func (*ShareUpsertOne) ClearProps ¶
func (u *ShareUpsertOne) ClearProps() *ShareUpsertOne
ClearProps clears the value of the "props" field.
func (*ShareUpsertOne) ClearRemainDownloads ¶
func (u *ShareUpsertOne) ClearRemainDownloads() *ShareUpsertOne
ClearRemainDownloads clears the value of the "remain_downloads" field.
func (*ShareUpsertOne) DoNothing ¶
func (u *ShareUpsertOne) DoNothing() *ShareUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ShareUpsertOne) Exec ¶
func (u *ShareUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ShareUpsertOne) ExecX ¶
func (u *ShareUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShareUpsertOne) ID ¶
func (u *ShareUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ShareUpsertOne) IDX ¶
func (u *ShareUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*ShareUpsertOne) Ignore ¶
func (u *ShareUpsertOne) Ignore() *ShareUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Share.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ShareUpsertOne) SetDeletedAt ¶
func (u *ShareUpsertOne) SetDeletedAt(v time.Time) *ShareUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*ShareUpsertOne) SetDownloads ¶
func (u *ShareUpsertOne) SetDownloads(v int) *ShareUpsertOne
SetDownloads sets the "downloads" field.
func (*ShareUpsertOne) SetExpires ¶
func (u *ShareUpsertOne) SetExpires(v time.Time) *ShareUpsertOne
SetExpires sets the "expires" field.
func (*ShareUpsertOne) SetPassword ¶
func (u *ShareUpsertOne) SetPassword(v string) *ShareUpsertOne
SetPassword sets the "password" field.
func (*ShareUpsertOne) SetProps ¶
func (u *ShareUpsertOne) SetProps(v *types.ShareProps) *ShareUpsertOne
SetProps sets the "props" field.
func (*ShareUpsertOne) SetRemainDownloads ¶
func (u *ShareUpsertOne) SetRemainDownloads(v int) *ShareUpsertOne
SetRemainDownloads sets the "remain_downloads" field.
func (*ShareUpsertOne) SetUpdatedAt ¶
func (u *ShareUpsertOne) SetUpdatedAt(v time.Time) *ShareUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*ShareUpsertOne) SetViews ¶
func (u *ShareUpsertOne) SetViews(v int) *ShareUpsertOne
SetViews sets the "views" field.
func (*ShareUpsertOne) Update ¶
func (u *ShareUpsertOne) Update(set func(*ShareUpsert)) *ShareUpsertOne
Update allows overriding fields `UPDATE` values. See the ShareCreate.OnConflict documentation for more info.
func (*ShareUpsertOne) UpdateDeletedAt ¶
func (u *ShareUpsertOne) UpdateDeletedAt() *ShareUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*ShareUpsertOne) UpdateDownloads ¶
func (u *ShareUpsertOne) UpdateDownloads() *ShareUpsertOne
UpdateDownloads sets the "downloads" field to the value that was provided on create.
func (*ShareUpsertOne) UpdateExpires ¶
func (u *ShareUpsertOne) UpdateExpires() *ShareUpsertOne
UpdateExpires sets the "expires" field to the value that was provided on create.
func (*ShareUpsertOne) UpdateNewValues ¶
func (u *ShareUpsertOne) UpdateNewValues() *ShareUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Share.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ShareUpsertOne) UpdatePassword ¶
func (u *ShareUpsertOne) UpdatePassword() *ShareUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*ShareUpsertOne) UpdateProps ¶
func (u *ShareUpsertOne) UpdateProps() *ShareUpsertOne
UpdateProps sets the "props" field to the value that was provided on create.
func (*ShareUpsertOne) UpdateRemainDownloads ¶
func (u *ShareUpsertOne) UpdateRemainDownloads() *ShareUpsertOne
UpdateRemainDownloads sets the "remain_downloads" field to the value that was provided on create.
func (*ShareUpsertOne) UpdateUpdatedAt ¶
func (u *ShareUpsertOne) UpdateUpdatedAt() *ShareUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*ShareUpsertOne) UpdateViews ¶
func (u *ShareUpsertOne) UpdateViews() *ShareUpsertOne
UpdateViews sets the "views" field to the value that was provided on create.
type StoragePolicies ¶
type StoragePolicies []*StoragePolicy
StoragePolicies is a parsable slice of StoragePolicy.
type StoragePolicy ¶
type StoragePolicy struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// Server holds the value of the "server" field.
Server string `json:"server,omitempty"`
// BucketName holds the value of the "bucket_name" field.
BucketName string `json:"bucket_name,omitempty"`
// IsPrivate holds the value of the "is_private" field.
IsPrivate bool `json:"is_private,omitempty"`
// AccessKey holds the value of the "access_key" field.
AccessKey string `json:"access_key,omitempty"`
// SecretKey holds the value of the "secret_key" field.
SecretKey string `json:"secret_key,omitempty"`
// MaxSize holds the value of the "max_size" field.
MaxSize int64 `json:"max_size,omitempty"`
// DirNameRule holds the value of the "dir_name_rule" field.
DirNameRule string `json:"dir_name_rule,omitempty"`
// FileNameRule holds the value of the "file_name_rule" field.
FileNameRule string `json:"file_name_rule,omitempty"`
// Settings holds the value of the "settings" field.
Settings *types.PolicySetting `json:"settings,omitempty"`
// NodeID holds the value of the "node_id" field.
NodeID int `json:"node_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the StoragePolicyQuery when eager-loading is set.
Edges StoragePolicyEdges `json:"edges"`
// contains filtered or unexported fields
}
StoragePolicy is the model entity for the StoragePolicy schema.
func (*StoragePolicy) ExecContext ¶
func (c *StoragePolicy) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicy) QueryContext ¶
func (c *StoragePolicy) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicy) QueryEntities ¶
func (sp *StoragePolicy) QueryEntities() *EntityQuery
QueryEntities queries the "entities" edge of the StoragePolicy entity.
func (*StoragePolicy) QueryFiles ¶
func (sp *StoragePolicy) QueryFiles() *FileQuery
QueryFiles queries the "files" edge of the StoragePolicy entity.
func (*StoragePolicy) QueryGroups ¶
func (sp *StoragePolicy) QueryGroups() *GroupQuery
QueryGroups queries the "groups" edge of the StoragePolicy entity.
func (*StoragePolicy) QueryNode ¶
func (sp *StoragePolicy) QueryNode() *NodeQuery
QueryNode queries the "node" edge of the StoragePolicy entity.
func (*StoragePolicy) SetEntities ¶
func (e *StoragePolicy) SetEntities(v []*Entity)
SetEntities manually set the edge as loaded state.
func (*StoragePolicy) SetFiles ¶
func (e *StoragePolicy) SetFiles(v []*File)
SetFiles manually set the edge as loaded state.
func (*StoragePolicy) SetGroups ¶
func (e *StoragePolicy) SetGroups(v []*Group)
SetGroups manually set the edge as loaded state.
func (*StoragePolicy) SetNode ¶
func (e *StoragePolicy) SetNode(v *Node)
SetNode manually set the edge as loaded state.
func (*StoragePolicy) String ¶
func (sp *StoragePolicy) String() string
String implements the fmt.Stringer.
func (*StoragePolicy) Unwrap ¶
func (sp *StoragePolicy) Unwrap() *StoragePolicy
Unwrap unwraps the StoragePolicy 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 (*StoragePolicy) Update ¶
func (sp *StoragePolicy) Update() *StoragePolicyUpdateOne
Update returns a builder for updating this StoragePolicy. Note that you need to call StoragePolicy.Unwrap() before calling this method if this StoragePolicy was returned from a transaction, and the transaction was committed or rolled back.
type StoragePolicyClient ¶
type StoragePolicyClient struct {
// contains filtered or unexported fields
}
StoragePolicyClient is a client for the StoragePolicy schema.
func NewStoragePolicyClient ¶
func NewStoragePolicyClient(c config) *StoragePolicyClient
NewStoragePolicyClient returns a client for the StoragePolicy from the given config.
func (*StoragePolicyClient) Create ¶
func (c *StoragePolicyClient) Create() *StoragePolicyCreate
Create returns a builder for creating a StoragePolicy entity.
func (*StoragePolicyClient) CreateBulk ¶
func (c *StoragePolicyClient) CreateBulk(builders ...*StoragePolicyCreate) *StoragePolicyCreateBulk
CreateBulk returns a builder for creating a bulk of StoragePolicy entities.
func (*StoragePolicyClient) Delete ¶
func (c *StoragePolicyClient) Delete() *StoragePolicyDelete
Delete returns a delete builder for StoragePolicy.
func (*StoragePolicyClient) DeleteOne ¶
func (c *StoragePolicyClient) DeleteOne(sp *StoragePolicy) *StoragePolicyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StoragePolicyClient) DeleteOneID ¶
func (c *StoragePolicyClient) DeleteOneID(id int) *StoragePolicyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*StoragePolicyClient) ExecContext ¶
func (c *StoragePolicyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicyClient) Get ¶
func (c *StoragePolicyClient) Get(ctx context.Context, id int) (*StoragePolicy, error)
Get returns a StoragePolicy entity by its id.
func (*StoragePolicyClient) GetX ¶
func (c *StoragePolicyClient) GetX(ctx context.Context, id int) *StoragePolicy
GetX is like Get, but panics if an error occurs.
func (*StoragePolicyClient) Hooks ¶
func (c *StoragePolicyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*StoragePolicyClient) Intercept ¶
func (c *StoragePolicyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `storagepolicy.Intercept(f(g(h())))`.
func (*StoragePolicyClient) Interceptors ¶
func (c *StoragePolicyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*StoragePolicyClient) MapCreateBulk ¶
func (c *StoragePolicyClient) MapCreateBulk(slice any, setFunc func(*StoragePolicyCreate, int)) *StoragePolicyCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*StoragePolicyClient) Query ¶
func (c *StoragePolicyClient) Query() *StoragePolicyQuery
Query returns a query builder for StoragePolicy.
func (*StoragePolicyClient) QueryContext ¶
func (c *StoragePolicyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicyClient) QueryEntities ¶
func (c *StoragePolicyClient) QueryEntities(sp *StoragePolicy) *EntityQuery
QueryEntities queries the entities edge of a StoragePolicy.
func (*StoragePolicyClient) QueryFiles ¶
func (c *StoragePolicyClient) QueryFiles(sp *StoragePolicy) *FileQuery
QueryFiles queries the files edge of a StoragePolicy.
func (*StoragePolicyClient) QueryGroups ¶
func (c *StoragePolicyClient) QueryGroups(sp *StoragePolicy) *GroupQuery
QueryGroups queries the groups edge of a StoragePolicy.
func (*StoragePolicyClient) QueryNode ¶
func (c *StoragePolicyClient) QueryNode(sp *StoragePolicy) *NodeQuery
QueryNode queries the node edge of a StoragePolicy.
func (*StoragePolicyClient) Update ¶
func (c *StoragePolicyClient) Update() *StoragePolicyUpdate
Update returns an update builder for StoragePolicy.
func (*StoragePolicyClient) UpdateOne ¶
func (c *StoragePolicyClient) UpdateOne(sp *StoragePolicy) *StoragePolicyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StoragePolicyClient) UpdateOneID ¶
func (c *StoragePolicyClient) UpdateOneID(id int) *StoragePolicyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StoragePolicyClient) Use ¶
func (c *StoragePolicyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `storagepolicy.Hooks(f(g(h())))`.
type StoragePolicyCreate ¶
type StoragePolicyCreate struct {
// contains filtered or unexported fields
}
StoragePolicyCreate is the builder for creating a StoragePolicy entity.
func (*StoragePolicyCreate) AddEntities ¶
func (spc *StoragePolicyCreate) AddEntities(e ...*Entity) *StoragePolicyCreate
AddEntities adds the "entities" edges to the Entity entity.
func (*StoragePolicyCreate) AddEntityIDs ¶
func (spc *StoragePolicyCreate) AddEntityIDs(ids ...int) *StoragePolicyCreate
AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
func (*StoragePolicyCreate) AddFileIDs ¶
func (spc *StoragePolicyCreate) AddFileIDs(ids ...int) *StoragePolicyCreate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*StoragePolicyCreate) AddFiles ¶
func (spc *StoragePolicyCreate) AddFiles(f ...*File) *StoragePolicyCreate
AddFiles adds the "files" edges to the File entity.
func (*StoragePolicyCreate) AddGroupIDs ¶
func (spc *StoragePolicyCreate) AddGroupIDs(ids ...int) *StoragePolicyCreate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*StoragePolicyCreate) AddGroups ¶
func (spc *StoragePolicyCreate) AddGroups(g ...*Group) *StoragePolicyCreate
AddGroups adds the "groups" edges to the Group entity.
func (*StoragePolicyCreate) Exec ¶
func (spc *StoragePolicyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StoragePolicyCreate) ExecContext ¶
func (c *StoragePolicyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicyCreate) ExecX ¶
func (spc *StoragePolicyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StoragePolicyCreate) Mutation ¶
func (spc *StoragePolicyCreate) Mutation() *StoragePolicyMutation
Mutation returns the StoragePolicyMutation object of the builder.
func (*StoragePolicyCreate) OnConflict ¶
func (spc *StoragePolicyCreate) OnConflict(opts ...sql.ConflictOption) *StoragePolicyUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.StoragePolicy.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.StoragePolicyUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*StoragePolicyCreate) OnConflictColumns ¶
func (spc *StoragePolicyCreate) OnConflictColumns(columns ...string) *StoragePolicyUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.StoragePolicy.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*StoragePolicyCreate) QueryContext ¶
func (c *StoragePolicyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicyCreate) Save ¶
func (spc *StoragePolicyCreate) Save(ctx context.Context) (*StoragePolicy, error)
Save creates the StoragePolicy in the database.
func (*StoragePolicyCreate) SaveX ¶
func (spc *StoragePolicyCreate) SaveX(ctx context.Context) *StoragePolicy
SaveX calls Save and panics if Save returns an error.
func (*StoragePolicyCreate) SetAccessKey ¶
func (spc *StoragePolicyCreate) SetAccessKey(s string) *StoragePolicyCreate
SetAccessKey sets the "access_key" field.
func (*StoragePolicyCreate) SetBucketName ¶
func (spc *StoragePolicyCreate) SetBucketName(s string) *StoragePolicyCreate
SetBucketName sets the "bucket_name" field.
func (*StoragePolicyCreate) SetCreatedAt ¶
func (spc *StoragePolicyCreate) SetCreatedAt(t time.Time) *StoragePolicyCreate
SetCreatedAt sets the "created_at" field.
func (*StoragePolicyCreate) SetDeletedAt ¶
func (spc *StoragePolicyCreate) SetDeletedAt(t time.Time) *StoragePolicyCreate
SetDeletedAt sets the "deleted_at" field.
func (*StoragePolicyCreate) SetDirNameRule ¶
func (spc *StoragePolicyCreate) SetDirNameRule(s string) *StoragePolicyCreate
SetDirNameRule sets the "dir_name_rule" field.
func (*StoragePolicyCreate) SetFileNameRule ¶
func (spc *StoragePolicyCreate) SetFileNameRule(s string) *StoragePolicyCreate
SetFileNameRule sets the "file_name_rule" field.
func (*StoragePolicyCreate) SetIsPrivate ¶
func (spc *StoragePolicyCreate) SetIsPrivate(b bool) *StoragePolicyCreate
SetIsPrivate sets the "is_private" field.
func (*StoragePolicyCreate) SetMaxSize ¶
func (spc *StoragePolicyCreate) SetMaxSize(i int64) *StoragePolicyCreate
SetMaxSize sets the "max_size" field.
func (*StoragePolicyCreate) SetName ¶
func (spc *StoragePolicyCreate) SetName(s string) *StoragePolicyCreate
SetName sets the "name" field.
func (*StoragePolicyCreate) SetNillableAccessKey ¶
func (spc *StoragePolicyCreate) SetNillableAccessKey(s *string) *StoragePolicyCreate
SetNillableAccessKey sets the "access_key" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableBucketName ¶
func (spc *StoragePolicyCreate) SetNillableBucketName(s *string) *StoragePolicyCreate
SetNillableBucketName sets the "bucket_name" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableCreatedAt ¶
func (spc *StoragePolicyCreate) SetNillableCreatedAt(t *time.Time) *StoragePolicyCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableDeletedAt ¶
func (spc *StoragePolicyCreate) SetNillableDeletedAt(t *time.Time) *StoragePolicyCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableDirNameRule ¶
func (spc *StoragePolicyCreate) SetNillableDirNameRule(s *string) *StoragePolicyCreate
SetNillableDirNameRule sets the "dir_name_rule" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableFileNameRule ¶
func (spc *StoragePolicyCreate) SetNillableFileNameRule(s *string) *StoragePolicyCreate
SetNillableFileNameRule sets the "file_name_rule" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableIsPrivate ¶
func (spc *StoragePolicyCreate) SetNillableIsPrivate(b *bool) *StoragePolicyCreate
SetNillableIsPrivate sets the "is_private" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableMaxSize ¶
func (spc *StoragePolicyCreate) SetNillableMaxSize(i *int64) *StoragePolicyCreate
SetNillableMaxSize sets the "max_size" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableNodeID ¶
func (spc *StoragePolicyCreate) SetNillableNodeID(i *int) *StoragePolicyCreate
SetNillableNodeID sets the "node_id" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableSecretKey ¶
func (spc *StoragePolicyCreate) SetNillableSecretKey(s *string) *StoragePolicyCreate
SetNillableSecretKey sets the "secret_key" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableServer ¶
func (spc *StoragePolicyCreate) SetNillableServer(s *string) *StoragePolicyCreate
SetNillableServer sets the "server" field if the given value is not nil.
func (*StoragePolicyCreate) SetNillableUpdatedAt ¶
func (spc *StoragePolicyCreate) SetNillableUpdatedAt(t *time.Time) *StoragePolicyCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*StoragePolicyCreate) SetNode ¶
func (spc *StoragePolicyCreate) SetNode(n *Node) *StoragePolicyCreate
SetNode sets the "node" edge to the Node entity.
func (*StoragePolicyCreate) SetNodeID ¶
func (spc *StoragePolicyCreate) SetNodeID(i int) *StoragePolicyCreate
SetNodeID sets the "node_id" field.
func (*StoragePolicyCreate) SetRawID ¶
func (m *StoragePolicyCreate) SetRawID(t int) *StoragePolicyCreate
func (*StoragePolicyCreate) SetSecretKey ¶
func (spc *StoragePolicyCreate) SetSecretKey(s string) *StoragePolicyCreate
SetSecretKey sets the "secret_key" field.
func (*StoragePolicyCreate) SetServer ¶
func (spc *StoragePolicyCreate) SetServer(s string) *StoragePolicyCreate
SetServer sets the "server" field.
func (*StoragePolicyCreate) SetSettings ¶
func (spc *StoragePolicyCreate) SetSettings(ts *types.PolicySetting) *StoragePolicyCreate
SetSettings sets the "settings" field.
func (*StoragePolicyCreate) SetType ¶
func (spc *StoragePolicyCreate) SetType(s string) *StoragePolicyCreate
SetType sets the "type" field.
func (*StoragePolicyCreate) SetUpdatedAt ¶
func (spc *StoragePolicyCreate) SetUpdatedAt(t time.Time) *StoragePolicyCreate
SetUpdatedAt sets the "updated_at" field.
type StoragePolicyCreateBulk ¶
type StoragePolicyCreateBulk struct {
// contains filtered or unexported fields
}
StoragePolicyCreateBulk is the builder for creating many StoragePolicy entities in bulk.
func (*StoragePolicyCreateBulk) Exec ¶
func (spcb *StoragePolicyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StoragePolicyCreateBulk) ExecContext ¶
func (c *StoragePolicyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicyCreateBulk) ExecX ¶
func (spcb *StoragePolicyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StoragePolicyCreateBulk) OnConflict ¶
func (spcb *StoragePolicyCreateBulk) OnConflict(opts ...sql.ConflictOption) *StoragePolicyUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.StoragePolicy.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.StoragePolicyUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*StoragePolicyCreateBulk) OnConflictColumns ¶
func (spcb *StoragePolicyCreateBulk) OnConflictColumns(columns ...string) *StoragePolicyUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.StoragePolicy.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*StoragePolicyCreateBulk) QueryContext ¶
func (c *StoragePolicyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicyCreateBulk) Save ¶
func (spcb *StoragePolicyCreateBulk) Save(ctx context.Context) ([]*StoragePolicy, error)
Save creates the StoragePolicy entities in the database.
func (*StoragePolicyCreateBulk) SaveX ¶
func (spcb *StoragePolicyCreateBulk) SaveX(ctx context.Context) []*StoragePolicy
SaveX is like Save, but panics if an error occurs.
type StoragePolicyDelete ¶
type StoragePolicyDelete struct {
// contains filtered or unexported fields
}
StoragePolicyDelete is the builder for deleting a StoragePolicy entity.
func (*StoragePolicyDelete) Exec ¶
func (spd *StoragePolicyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StoragePolicyDelete) ExecContext ¶
func (c *StoragePolicyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicyDelete) ExecX ¶
func (spd *StoragePolicyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StoragePolicyDelete) QueryContext ¶
func (c *StoragePolicyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicyDelete) Where ¶
func (spd *StoragePolicyDelete) Where(ps ...predicate.StoragePolicy) *StoragePolicyDelete
Where appends a list predicates to the StoragePolicyDelete builder.
type StoragePolicyDeleteOne ¶
type StoragePolicyDeleteOne struct {
// contains filtered or unexported fields
}
StoragePolicyDeleteOne is the builder for deleting a single StoragePolicy entity.
func (*StoragePolicyDeleteOne) Exec ¶
func (spdo *StoragePolicyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StoragePolicyDeleteOne) ExecX ¶
func (spdo *StoragePolicyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StoragePolicyDeleteOne) Where ¶
func (spdo *StoragePolicyDeleteOne) Where(ps ...predicate.StoragePolicy) *StoragePolicyDeleteOne
Where appends a list predicates to the StoragePolicyDelete builder.
type StoragePolicyEdges ¶
type StoragePolicyEdges struct {
// Groups holds the value of the groups edge.
Groups []*Group `json:"groups,omitempty"`
// Files holds the value of the files edge.
Files []*File `json:"files,omitempty"`
// Entities holds the value of the entities edge.
Entities []*Entity `json:"entities,omitempty"`
// Node holds the value of the node edge.
Node *Node `json:"node,omitempty"`
// contains filtered or unexported fields
}
StoragePolicyEdges holds the relations/edges for other nodes in the graph.
func (StoragePolicyEdges) EntitiesOrErr ¶
func (e StoragePolicyEdges) EntitiesOrErr() ([]*Entity, error)
EntitiesOrErr returns the Entities value or an error if the edge was not loaded in eager-loading.
func (StoragePolicyEdges) FilesOrErr ¶
func (e StoragePolicyEdges) FilesOrErr() ([]*File, error)
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
func (StoragePolicyEdges) GroupsOrErr ¶
func (e StoragePolicyEdges) GroupsOrErr() ([]*Group, error)
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
func (StoragePolicyEdges) NodeOrErr ¶
func (e StoragePolicyEdges) NodeOrErr() (*Node, error)
NodeOrErr returns the Node value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type StoragePolicyGroupBy ¶
type StoragePolicyGroupBy struct {
// contains filtered or unexported fields
}
StoragePolicyGroupBy is the group-by builder for StoragePolicy entities.
func (*StoragePolicyGroupBy) Aggregate ¶
func (spgb *StoragePolicyGroupBy) Aggregate(fns ...AggregateFunc) *StoragePolicyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StoragePolicyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StoragePolicyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StoragePolicyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StoragePolicyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StoragePolicyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StoragePolicyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StoragePolicyGroupBy) Scan ¶
func (spgb *StoragePolicyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StoragePolicyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StoragePolicyMutation ¶
type StoragePolicyMutation struct {
// contains filtered or unexported fields
}
StoragePolicyMutation represents an operation that mutates the StoragePolicy nodes in the graph.
func (*StoragePolicyMutation) AccessKey ¶
func (m *StoragePolicyMutation) AccessKey() (r string, exists bool)
AccessKey returns the value of the "access_key" field in the mutation.
func (*StoragePolicyMutation) AccessKeyCleared ¶
func (m *StoragePolicyMutation) AccessKeyCleared() bool
AccessKeyCleared returns if the "access_key" field was cleared in this mutation.
func (*StoragePolicyMutation) AddEntityIDs ¶
func (m *StoragePolicyMutation) AddEntityIDs(ids ...int)
AddEntityIDs adds the "entities" edge to the Entity entity by ids.
func (*StoragePolicyMutation) AddField ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) AddFileIDs ¶
func (m *StoragePolicyMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "files" edge to the File entity by ids.
func (*StoragePolicyMutation) AddGroupIDs ¶
func (m *StoragePolicyMutation) AddGroupIDs(ids ...int)
AddGroupIDs adds the "groups" edge to the Group entity by ids.
func (*StoragePolicyMutation) AddMaxSize ¶
func (m *StoragePolicyMutation) AddMaxSize(i int64)
AddMaxSize adds i to the "max_size" field.
func (*StoragePolicyMutation) AddedEdges ¶
func (m *StoragePolicyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StoragePolicyMutation) AddedField ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) AddedFields ¶
func (m *StoragePolicyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StoragePolicyMutation) AddedIDs ¶
func (m *StoragePolicyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StoragePolicyMutation) AddedMaxSize ¶
func (m *StoragePolicyMutation) AddedMaxSize() (r int64, exists bool)
AddedMaxSize returns the value that was added to the "max_size" field in this mutation.
func (*StoragePolicyMutation) BucketName ¶
func (m *StoragePolicyMutation) BucketName() (r string, exists bool)
BucketName returns the value of the "bucket_name" field in the mutation.
func (*StoragePolicyMutation) BucketNameCleared ¶
func (m *StoragePolicyMutation) BucketNameCleared() bool
BucketNameCleared returns if the "bucket_name" field was cleared in this mutation.
func (*StoragePolicyMutation) ClearAccessKey ¶
func (m *StoragePolicyMutation) ClearAccessKey()
ClearAccessKey clears the value of the "access_key" field.
func (*StoragePolicyMutation) ClearBucketName ¶
func (m *StoragePolicyMutation) ClearBucketName()
ClearBucketName clears the value of the "bucket_name" field.
func (*StoragePolicyMutation) ClearDeletedAt ¶
func (m *StoragePolicyMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*StoragePolicyMutation) ClearDirNameRule ¶
func (m *StoragePolicyMutation) ClearDirNameRule()
ClearDirNameRule clears the value of the "dir_name_rule" field.
func (*StoragePolicyMutation) ClearEdge ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) ClearEntities ¶
func (m *StoragePolicyMutation) ClearEntities()
ClearEntities clears the "entities" edge to the Entity entity.
func (*StoragePolicyMutation) ClearField ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) ClearFileNameRule ¶
func (m *StoragePolicyMutation) ClearFileNameRule()
ClearFileNameRule clears the value of the "file_name_rule" field.
func (*StoragePolicyMutation) ClearFiles ¶
func (m *StoragePolicyMutation) ClearFiles()
ClearFiles clears the "files" edge to the File entity.
func (*StoragePolicyMutation) ClearGroups ¶
func (m *StoragePolicyMutation) ClearGroups()
ClearGroups clears the "groups" edge to the Group entity.
func (*StoragePolicyMutation) ClearIsPrivate ¶
func (m *StoragePolicyMutation) ClearIsPrivate()
ClearIsPrivate clears the value of the "is_private" field.
func (*StoragePolicyMutation) ClearMaxSize ¶
func (m *StoragePolicyMutation) ClearMaxSize()
ClearMaxSize clears the value of the "max_size" field.
func (*StoragePolicyMutation) ClearNode ¶
func (m *StoragePolicyMutation) ClearNode()
ClearNode clears the "node" edge to the Node entity.
func (*StoragePolicyMutation) ClearNodeID ¶
func (m *StoragePolicyMutation) ClearNodeID()
ClearNodeID clears the value of the "node_id" field.
func (*StoragePolicyMutation) ClearSecretKey ¶
func (m *StoragePolicyMutation) ClearSecretKey()
ClearSecretKey clears the value of the "secret_key" field.
func (*StoragePolicyMutation) ClearServer ¶
func (m *StoragePolicyMutation) ClearServer()
ClearServer clears the value of the "server" field.
func (*StoragePolicyMutation) ClearSettings ¶
func (m *StoragePolicyMutation) ClearSettings()
ClearSettings clears the value of the "settings" field.
func (*StoragePolicyMutation) ClearedEdges ¶
func (m *StoragePolicyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StoragePolicyMutation) ClearedFields ¶
func (m *StoragePolicyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StoragePolicyMutation) Client ¶
func (m StoragePolicyMutation) 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 (*StoragePolicyMutation) CreatedAt ¶
func (m *StoragePolicyMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*StoragePolicyMutation) DeletedAt ¶
func (m *StoragePolicyMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*StoragePolicyMutation) DeletedAtCleared ¶
func (m *StoragePolicyMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*StoragePolicyMutation) DirNameRule ¶
func (m *StoragePolicyMutation) DirNameRule() (r string, exists bool)
DirNameRule returns the value of the "dir_name_rule" field in the mutation.
func (*StoragePolicyMutation) DirNameRuleCleared ¶
func (m *StoragePolicyMutation) DirNameRuleCleared() bool
DirNameRuleCleared returns if the "dir_name_rule" field was cleared in this mutation.
func (*StoragePolicyMutation) EdgeCleared ¶
func (m *StoragePolicyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StoragePolicyMutation) EntitiesCleared ¶
func (m *StoragePolicyMutation) EntitiesCleared() bool
EntitiesCleared reports if the "entities" edge to the Entity entity was cleared.
func (*StoragePolicyMutation) EntitiesIDs ¶
func (m *StoragePolicyMutation) EntitiesIDs() (ids []int)
EntitiesIDs returns the "entities" edge IDs in the mutation.
func (*StoragePolicyMutation) ExecContext ¶
func (c *StoragePolicyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicyMutation) Field ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) FieldCleared ¶
func (m *StoragePolicyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StoragePolicyMutation) Fields ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) FileNameRule ¶
func (m *StoragePolicyMutation) FileNameRule() (r string, exists bool)
FileNameRule returns the value of the "file_name_rule" field in the mutation.
func (*StoragePolicyMutation) FileNameRuleCleared ¶
func (m *StoragePolicyMutation) FileNameRuleCleared() bool
FileNameRuleCleared returns if the "file_name_rule" field was cleared in this mutation.
func (*StoragePolicyMutation) FilesCleared ¶
func (m *StoragePolicyMutation) FilesCleared() bool
FilesCleared reports if the "files" edge to the File entity was cleared.
func (*StoragePolicyMutation) FilesIDs ¶
func (m *StoragePolicyMutation) FilesIDs() (ids []int)
FilesIDs returns the "files" edge IDs in the mutation.
func (*StoragePolicyMutation) GetType ¶
func (m *StoragePolicyMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*StoragePolicyMutation) GroupsCleared ¶
func (m *StoragePolicyMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the Group entity was cleared.
func (*StoragePolicyMutation) GroupsIDs ¶
func (m *StoragePolicyMutation) GroupsIDs() (ids []int)
GroupsIDs returns the "groups" edge IDs in the mutation.
func (*StoragePolicyMutation) ID ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) IDs ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) IsPrivate ¶
func (m *StoragePolicyMutation) IsPrivate() (r bool, exists bool)
IsPrivate returns the value of the "is_private" field in the mutation.
func (*StoragePolicyMutation) IsPrivateCleared ¶
func (m *StoragePolicyMutation) IsPrivateCleared() bool
IsPrivateCleared returns if the "is_private" field was cleared in this mutation.
func (*StoragePolicyMutation) MaxSize ¶
func (m *StoragePolicyMutation) MaxSize() (r int64, exists bool)
MaxSize returns the value of the "max_size" field in the mutation.
func (*StoragePolicyMutation) MaxSizeCleared ¶
func (m *StoragePolicyMutation) MaxSizeCleared() bool
MaxSizeCleared returns if the "max_size" field was cleared in this mutation.
func (*StoragePolicyMutation) Name ¶
func (m *StoragePolicyMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*StoragePolicyMutation) NodeCleared ¶
func (m *StoragePolicyMutation) NodeCleared() bool
NodeCleared reports if the "node" edge to the Node entity was cleared.
func (*StoragePolicyMutation) NodeID ¶
func (m *StoragePolicyMutation) NodeID() (r int, exists bool)
NodeID returns the value of the "node_id" field in the mutation.
func (*StoragePolicyMutation) NodeIDCleared ¶
func (m *StoragePolicyMutation) NodeIDCleared() bool
NodeIDCleared returns if the "node_id" field was cleared in this mutation.
func (*StoragePolicyMutation) NodeIDs ¶
func (m *StoragePolicyMutation) NodeIDs() (ids []int)
NodeIDs returns the "node" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NodeID instead. It exists only for internal usage by the builders.
func (*StoragePolicyMutation) OldAccessKey ¶
func (m *StoragePolicyMutation) OldAccessKey(ctx context.Context) (v string, err error)
OldAccessKey returns the old "access_key" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldBucketName ¶
func (m *StoragePolicyMutation) OldBucketName(ctx context.Context) (v string, err error)
OldBucketName returns the old "bucket_name" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldDirNameRule ¶
func (m *StoragePolicyMutation) OldDirNameRule(ctx context.Context) (v string, err error)
OldDirNameRule returns the old "dir_name_rule" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) 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 (*StoragePolicyMutation) OldFileNameRule ¶
func (m *StoragePolicyMutation) OldFileNameRule(ctx context.Context) (v string, err error)
OldFileNameRule returns the old "file_name_rule" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldIsPrivate ¶
func (m *StoragePolicyMutation) OldIsPrivate(ctx context.Context) (v bool, err error)
OldIsPrivate returns the old "is_private" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldMaxSize ¶
func (m *StoragePolicyMutation) OldMaxSize(ctx context.Context) (v int64, err error)
OldMaxSize returns the old "max_size" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldName ¶
func (m *StoragePolicyMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldNodeID ¶
func (m *StoragePolicyMutation) OldNodeID(ctx context.Context) (v int, err error)
OldNodeID returns the old "node_id" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldSecretKey ¶
func (m *StoragePolicyMutation) OldSecretKey(ctx context.Context) (v string, err error)
OldSecretKey returns the old "secret_key" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldServer ¶
func (m *StoragePolicyMutation) OldServer(ctx context.Context) (v string, err error)
OldServer returns the old "server" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldSettings ¶
func (m *StoragePolicyMutation) OldSettings(ctx context.Context) (v *types.PolicySetting, err error)
OldSettings returns the old "settings" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldType ¶
func (m *StoragePolicyMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the StoragePolicy entity. If the StoragePolicy 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 (*StoragePolicyMutation) Op ¶
func (m *StoragePolicyMutation) Op() Op
Op returns the operation name.
func (*StoragePolicyMutation) QueryContext ¶
func (c *StoragePolicyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicyMutation) RemoveEntityIDs ¶
func (m *StoragePolicyMutation) RemoveEntityIDs(ids ...int)
RemoveEntityIDs removes the "entities" edge to the Entity entity by IDs.
func (*StoragePolicyMutation) RemoveFileIDs ¶
func (m *StoragePolicyMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "files" edge to the File entity by IDs.
func (*StoragePolicyMutation) RemoveGroupIDs ¶
func (m *StoragePolicyMutation) RemoveGroupIDs(ids ...int)
RemoveGroupIDs removes the "groups" edge to the Group entity by IDs.
func (*StoragePolicyMutation) RemovedEdges ¶
func (m *StoragePolicyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StoragePolicyMutation) RemovedEntitiesIDs ¶
func (m *StoragePolicyMutation) RemovedEntitiesIDs() (ids []int)
RemovedEntities returns the removed IDs of the "entities" edge to the Entity entity.
func (*StoragePolicyMutation) RemovedFilesIDs ¶
func (m *StoragePolicyMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "files" edge to the File entity.
func (*StoragePolicyMutation) RemovedGroupsIDs ¶
func (m *StoragePolicyMutation) RemovedGroupsIDs() (ids []int)
RemovedGroups returns the removed IDs of the "groups" edge to the Group entity.
func (*StoragePolicyMutation) RemovedIDs ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) ResetAccessKey ¶
func (m *StoragePolicyMutation) ResetAccessKey()
ResetAccessKey resets all changes to the "access_key" field.
func (*StoragePolicyMutation) ResetBucketName ¶
func (m *StoragePolicyMutation) ResetBucketName()
ResetBucketName resets all changes to the "bucket_name" field.
func (*StoragePolicyMutation) ResetCreatedAt ¶
func (m *StoragePolicyMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*StoragePolicyMutation) ResetDeletedAt ¶
func (m *StoragePolicyMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*StoragePolicyMutation) ResetDirNameRule ¶
func (m *StoragePolicyMutation) ResetDirNameRule()
ResetDirNameRule resets all changes to the "dir_name_rule" field.
func (*StoragePolicyMutation) ResetEdge ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) ResetEntities ¶
func (m *StoragePolicyMutation) ResetEntities()
ResetEntities resets all changes to the "entities" edge.
func (*StoragePolicyMutation) ResetField ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) ResetFileNameRule ¶
func (m *StoragePolicyMutation) ResetFileNameRule()
ResetFileNameRule resets all changes to the "file_name_rule" field.
func (*StoragePolicyMutation) ResetFiles ¶
func (m *StoragePolicyMutation) ResetFiles()
ResetFiles resets all changes to the "files" edge.
func (*StoragePolicyMutation) ResetGroups ¶
func (m *StoragePolicyMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*StoragePolicyMutation) ResetIsPrivate ¶
func (m *StoragePolicyMutation) ResetIsPrivate()
ResetIsPrivate resets all changes to the "is_private" field.
func (*StoragePolicyMutation) ResetMaxSize ¶
func (m *StoragePolicyMutation) ResetMaxSize()
ResetMaxSize resets all changes to the "max_size" field.
func (*StoragePolicyMutation) ResetName ¶
func (m *StoragePolicyMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*StoragePolicyMutation) ResetNode ¶
func (m *StoragePolicyMutation) ResetNode()
ResetNode resets all changes to the "node" edge.
func (*StoragePolicyMutation) ResetNodeID ¶
func (m *StoragePolicyMutation) ResetNodeID()
ResetNodeID resets all changes to the "node_id" field.
func (*StoragePolicyMutation) ResetSecretKey ¶
func (m *StoragePolicyMutation) ResetSecretKey()
ResetSecretKey resets all changes to the "secret_key" field.
func (*StoragePolicyMutation) ResetServer ¶
func (m *StoragePolicyMutation) ResetServer()
ResetServer resets all changes to the "server" field.
func (*StoragePolicyMutation) ResetSettings ¶
func (m *StoragePolicyMutation) ResetSettings()
ResetSettings resets all changes to the "settings" field.
func (*StoragePolicyMutation) ResetType ¶
func (m *StoragePolicyMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*StoragePolicyMutation) ResetUpdatedAt ¶
func (m *StoragePolicyMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*StoragePolicyMutation) SecretKey ¶
func (m *StoragePolicyMutation) SecretKey() (r string, exists bool)
SecretKey returns the value of the "secret_key" field in the mutation.
func (*StoragePolicyMutation) SecretKeyCleared ¶
func (m *StoragePolicyMutation) SecretKeyCleared() bool
SecretKeyCleared returns if the "secret_key" field was cleared in this mutation.
func (*StoragePolicyMutation) Server ¶
func (m *StoragePolicyMutation) Server() (r string, exists bool)
Server returns the value of the "server" field in the mutation.
func (*StoragePolicyMutation) ServerCleared ¶
func (m *StoragePolicyMutation) ServerCleared() bool
ServerCleared returns if the "server" field was cleared in this mutation.
func (*StoragePolicyMutation) SetAccessKey ¶
func (m *StoragePolicyMutation) SetAccessKey(s string)
SetAccessKey sets the "access_key" field.
func (*StoragePolicyMutation) SetBucketName ¶
func (m *StoragePolicyMutation) SetBucketName(s string)
SetBucketName sets the "bucket_name" field.
func (*StoragePolicyMutation) SetCreatedAt ¶
func (m *StoragePolicyMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*StoragePolicyMutation) SetDeletedAt ¶
func (m *StoragePolicyMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*StoragePolicyMutation) SetDirNameRule ¶
func (m *StoragePolicyMutation) SetDirNameRule(s string)
SetDirNameRule sets the "dir_name_rule" field.
func (*StoragePolicyMutation) SetField ¶
func (m *StoragePolicyMutation) 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 (*StoragePolicyMutation) SetFileNameRule ¶
func (m *StoragePolicyMutation) SetFileNameRule(s string)
SetFileNameRule sets the "file_name_rule" field.
func (*StoragePolicyMutation) SetIsPrivate ¶
func (m *StoragePolicyMutation) SetIsPrivate(b bool)
SetIsPrivate sets the "is_private" field.
func (*StoragePolicyMutation) SetMaxSize ¶
func (m *StoragePolicyMutation) SetMaxSize(i int64)
SetMaxSize sets the "max_size" field.
func (*StoragePolicyMutation) SetName ¶
func (m *StoragePolicyMutation) SetName(s string)
SetName sets the "name" field.
func (*StoragePolicyMutation) SetNodeID ¶
func (m *StoragePolicyMutation) SetNodeID(i int)
SetNodeID sets the "node_id" field.
func (*StoragePolicyMutation) SetOp ¶
func (m *StoragePolicyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*StoragePolicyMutation) SetRawID ¶
func (m *StoragePolicyMutation) SetRawID(t int)
func (*StoragePolicyMutation) SetSecretKey ¶
func (m *StoragePolicyMutation) SetSecretKey(s string)
SetSecretKey sets the "secret_key" field.
func (*StoragePolicyMutation) SetServer ¶
func (m *StoragePolicyMutation) SetServer(s string)
SetServer sets the "server" field.
func (*StoragePolicyMutation) SetSettings ¶
func (m *StoragePolicyMutation) SetSettings(ts *types.PolicySetting)
SetSettings sets the "settings" field.
func (*StoragePolicyMutation) SetType ¶
func (m *StoragePolicyMutation) SetType(s string)
SetType sets the "type" field.
func (*StoragePolicyMutation) SetUpdatedAt ¶
func (m *StoragePolicyMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*StoragePolicyMutation) Settings ¶
func (m *StoragePolicyMutation) Settings() (r *types.PolicySetting, exists bool)
Settings returns the value of the "settings" field in the mutation.
func (*StoragePolicyMutation) SettingsCleared ¶
func (m *StoragePolicyMutation) SettingsCleared() bool
SettingsCleared returns if the "settings" field was cleared in this mutation.
func (StoragePolicyMutation) Tx ¶
func (m StoragePolicyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StoragePolicyMutation) Type ¶
func (m *StoragePolicyMutation) Type() string
Type returns the node type of this mutation (StoragePolicy).
func (*StoragePolicyMutation) UpdatedAt ¶
func (m *StoragePolicyMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*StoragePolicyMutation) Where ¶
func (m *StoragePolicyMutation) Where(ps ...predicate.StoragePolicy)
Where appends a list predicates to the StoragePolicyMutation builder.
func (*StoragePolicyMutation) WhereP ¶
func (m *StoragePolicyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the StoragePolicyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type StoragePolicyQuery ¶
type StoragePolicyQuery struct {
// contains filtered or unexported fields
}
StoragePolicyQuery is the builder for querying StoragePolicy entities.
func (*StoragePolicyQuery) Aggregate ¶
func (spq *StoragePolicyQuery) Aggregate(fns ...AggregateFunc) *StoragePolicySelect
Aggregate returns a StoragePolicySelect configured with the given aggregations.
func (*StoragePolicyQuery) All ¶
func (spq *StoragePolicyQuery) All(ctx context.Context) ([]*StoragePolicy, error)
All executes the query and returns a list of StoragePolicies.
func (*StoragePolicyQuery) AllX ¶
func (spq *StoragePolicyQuery) AllX(ctx context.Context) []*StoragePolicy
AllX is like All, but panics if an error occurs.
func (*StoragePolicyQuery) Clone ¶
func (spq *StoragePolicyQuery) Clone() *StoragePolicyQuery
Clone returns a duplicate of the StoragePolicyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StoragePolicyQuery) Count ¶
func (spq *StoragePolicyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StoragePolicyQuery) CountX ¶
func (spq *StoragePolicyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StoragePolicyQuery) ExecContext ¶
func (c *StoragePolicyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicyQuery) Exist ¶
func (spq *StoragePolicyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StoragePolicyQuery) ExistX ¶
func (spq *StoragePolicyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StoragePolicyQuery) First ¶
func (spq *StoragePolicyQuery) First(ctx context.Context) (*StoragePolicy, error)
First returns the first StoragePolicy entity from the query. Returns a *NotFoundError when no StoragePolicy was found.
func (*StoragePolicyQuery) FirstID ¶
func (spq *StoragePolicyQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first StoragePolicy ID from the query. Returns a *NotFoundError when no StoragePolicy ID was found.
func (*StoragePolicyQuery) FirstIDX ¶
func (spq *StoragePolicyQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*StoragePolicyQuery) FirstX ¶
func (spq *StoragePolicyQuery) FirstX(ctx context.Context) *StoragePolicy
FirstX is like First, but panics if an error occurs.
func (*StoragePolicyQuery) GroupBy ¶
func (spq *StoragePolicyQuery) GroupBy(field string, fields ...string) *StoragePolicyGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.StoragePolicy.Query().
GroupBy(storagepolicy.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*StoragePolicyQuery) IDs ¶
func (spq *StoragePolicyQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of StoragePolicy IDs.
func (*StoragePolicyQuery) IDsX ¶
func (spq *StoragePolicyQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*StoragePolicyQuery) Limit ¶
func (spq *StoragePolicyQuery) Limit(limit int) *StoragePolicyQuery
Limit the number of records to be returned by this query.
func (*StoragePolicyQuery) Offset ¶
func (spq *StoragePolicyQuery) Offset(offset int) *StoragePolicyQuery
Offset to start from.
func (*StoragePolicyQuery) Only ¶
func (spq *StoragePolicyQuery) Only(ctx context.Context) (*StoragePolicy, error)
Only returns a single StoragePolicy entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one StoragePolicy entity is found. Returns a *NotFoundError when no StoragePolicy entities are found.
func (*StoragePolicyQuery) OnlyID ¶
func (spq *StoragePolicyQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only StoragePolicy ID in the query. Returns a *NotSingularError when more than one StoragePolicy ID is found. Returns a *NotFoundError when no entities are found.
func (*StoragePolicyQuery) OnlyIDX ¶
func (spq *StoragePolicyQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StoragePolicyQuery) OnlyX ¶
func (spq *StoragePolicyQuery) OnlyX(ctx context.Context) *StoragePolicy
OnlyX is like Only, but panics if an error occurs.
func (*StoragePolicyQuery) Order ¶
func (spq *StoragePolicyQuery) Order(o ...storagepolicy.OrderOption) *StoragePolicyQuery
Order specifies how the records should be ordered.
func (*StoragePolicyQuery) QueryContext ¶
func (c *StoragePolicyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicyQuery) QueryEntities ¶
func (spq *StoragePolicyQuery) QueryEntities() *EntityQuery
QueryEntities chains the current query on the "entities" edge.
func (*StoragePolicyQuery) QueryFiles ¶
func (spq *StoragePolicyQuery) QueryFiles() *FileQuery
QueryFiles chains the current query on the "files" edge.
func (*StoragePolicyQuery) QueryGroups ¶
func (spq *StoragePolicyQuery) QueryGroups() *GroupQuery
QueryGroups chains the current query on the "groups" edge.
func (*StoragePolicyQuery) QueryNode ¶
func (spq *StoragePolicyQuery) QueryNode() *NodeQuery
QueryNode chains the current query on the "node" edge.
func (*StoragePolicyQuery) Select ¶
func (spq *StoragePolicyQuery) Select(fields ...string) *StoragePolicySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.StoragePolicy.Query().
Select(storagepolicy.FieldCreatedAt).
Scan(ctx, &v)
func (*StoragePolicyQuery) Unique ¶
func (spq *StoragePolicyQuery) Unique(unique bool) *StoragePolicyQuery
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 (*StoragePolicyQuery) Where ¶
func (spq *StoragePolicyQuery) Where(ps ...predicate.StoragePolicy) *StoragePolicyQuery
Where adds a new predicate for the StoragePolicyQuery builder.
func (*StoragePolicyQuery) WithEntities ¶
func (spq *StoragePolicyQuery) WithEntities(opts ...func(*EntityQuery)) *StoragePolicyQuery
WithEntities tells the query-builder to eager-load the nodes that are connected to the "entities" edge. The optional arguments are used to configure the query builder of the edge.
func (*StoragePolicyQuery) WithFiles ¶
func (spq *StoragePolicyQuery) WithFiles(opts ...func(*FileQuery)) *StoragePolicyQuery
WithFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge. The optional arguments are used to configure the query builder of the edge.
func (*StoragePolicyQuery) WithGroups ¶
func (spq *StoragePolicyQuery) WithGroups(opts ...func(*GroupQuery)) *StoragePolicyQuery
WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.
func (*StoragePolicyQuery) WithNode ¶
func (spq *StoragePolicyQuery) WithNode(opts ...func(*NodeQuery)) *StoragePolicyQuery
WithNode tells the query-builder to eager-load the nodes that are connected to the "node" edge. The optional arguments are used to configure the query builder of the edge.
type StoragePolicySelect ¶
type StoragePolicySelect struct {
*StoragePolicyQuery
// contains filtered or unexported fields
}
StoragePolicySelect is the builder for selecting fields of StoragePolicy entities.
func (*StoragePolicySelect) Aggregate ¶
func (sps *StoragePolicySelect) Aggregate(fns ...AggregateFunc) *StoragePolicySelect
Aggregate adds the given aggregation functions to the selector query.
func (*StoragePolicySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StoragePolicySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (StoragePolicySelect) ExecContext ¶
func (c StoragePolicySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StoragePolicySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StoragePolicySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StoragePolicySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (StoragePolicySelect) QueryContext ¶
func (c StoragePolicySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicySelect) Scan ¶
func (sps *StoragePolicySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StoragePolicySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StoragePolicyUpdate ¶
type StoragePolicyUpdate struct {
// contains filtered or unexported fields
}
StoragePolicyUpdate is the builder for updating StoragePolicy entities.
func (*StoragePolicyUpdate) AddEntities ¶
func (spu *StoragePolicyUpdate) AddEntities(e ...*Entity) *StoragePolicyUpdate
AddEntities adds the "entities" edges to the Entity entity.
func (*StoragePolicyUpdate) AddEntityIDs ¶
func (spu *StoragePolicyUpdate) AddEntityIDs(ids ...int) *StoragePolicyUpdate
AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
func (*StoragePolicyUpdate) AddFileIDs ¶
func (spu *StoragePolicyUpdate) AddFileIDs(ids ...int) *StoragePolicyUpdate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*StoragePolicyUpdate) AddFiles ¶
func (spu *StoragePolicyUpdate) AddFiles(f ...*File) *StoragePolicyUpdate
AddFiles adds the "files" edges to the File entity.
func (*StoragePolicyUpdate) AddGroupIDs ¶
func (spu *StoragePolicyUpdate) AddGroupIDs(ids ...int) *StoragePolicyUpdate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*StoragePolicyUpdate) AddGroups ¶
func (spu *StoragePolicyUpdate) AddGroups(g ...*Group) *StoragePolicyUpdate
AddGroups adds the "groups" edges to the Group entity.
func (*StoragePolicyUpdate) AddMaxSize ¶
func (spu *StoragePolicyUpdate) AddMaxSize(i int64) *StoragePolicyUpdate
AddMaxSize adds i to the "max_size" field.
func (*StoragePolicyUpdate) ClearAccessKey ¶
func (spu *StoragePolicyUpdate) ClearAccessKey() *StoragePolicyUpdate
ClearAccessKey clears the value of the "access_key" field.
func (*StoragePolicyUpdate) ClearBucketName ¶
func (spu *StoragePolicyUpdate) ClearBucketName() *StoragePolicyUpdate
ClearBucketName clears the value of the "bucket_name" field.
func (*StoragePolicyUpdate) ClearDeletedAt ¶
func (spu *StoragePolicyUpdate) ClearDeletedAt() *StoragePolicyUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*StoragePolicyUpdate) ClearDirNameRule ¶
func (spu *StoragePolicyUpdate) ClearDirNameRule() *StoragePolicyUpdate
ClearDirNameRule clears the value of the "dir_name_rule" field.
func (*StoragePolicyUpdate) ClearEntities ¶
func (spu *StoragePolicyUpdate) ClearEntities() *StoragePolicyUpdate
ClearEntities clears all "entities" edges to the Entity entity.
func (*StoragePolicyUpdate) ClearFileNameRule ¶
func (spu *StoragePolicyUpdate) ClearFileNameRule() *StoragePolicyUpdate
ClearFileNameRule clears the value of the "file_name_rule" field.
func (*StoragePolicyUpdate) ClearFiles ¶
func (spu *StoragePolicyUpdate) ClearFiles() *StoragePolicyUpdate
ClearFiles clears all "files" edges to the File entity.
func (*StoragePolicyUpdate) ClearGroups ¶
func (spu *StoragePolicyUpdate) ClearGroups() *StoragePolicyUpdate
ClearGroups clears all "groups" edges to the Group entity.
func (*StoragePolicyUpdate) ClearIsPrivate ¶
func (spu *StoragePolicyUpdate) ClearIsPrivate() *StoragePolicyUpdate
ClearIsPrivate clears the value of the "is_private" field.
func (*StoragePolicyUpdate) ClearMaxSize ¶
func (spu *StoragePolicyUpdate) ClearMaxSize() *StoragePolicyUpdate
ClearMaxSize clears the value of the "max_size" field.
func (*StoragePolicyUpdate) ClearNode ¶
func (spu *StoragePolicyUpdate) ClearNode() *StoragePolicyUpdate
ClearNode clears the "node" edge to the Node entity.
func (*StoragePolicyUpdate) ClearNodeID ¶
func (spu *StoragePolicyUpdate) ClearNodeID() *StoragePolicyUpdate
ClearNodeID clears the value of the "node_id" field.
func (*StoragePolicyUpdate) ClearSecretKey ¶
func (spu *StoragePolicyUpdate) ClearSecretKey() *StoragePolicyUpdate
ClearSecretKey clears the value of the "secret_key" field.
func (*StoragePolicyUpdate) ClearServer ¶
func (spu *StoragePolicyUpdate) ClearServer() *StoragePolicyUpdate
ClearServer clears the value of the "server" field.
func (*StoragePolicyUpdate) ClearSettings ¶
func (spu *StoragePolicyUpdate) ClearSettings() *StoragePolicyUpdate
ClearSettings clears the value of the "settings" field.
func (*StoragePolicyUpdate) Exec ¶
func (spu *StoragePolicyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StoragePolicyUpdate) ExecContext ¶
func (c *StoragePolicyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicyUpdate) ExecX ¶
func (spu *StoragePolicyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StoragePolicyUpdate) Mutation ¶
func (spu *StoragePolicyUpdate) Mutation() *StoragePolicyMutation
Mutation returns the StoragePolicyMutation object of the builder.
func (*StoragePolicyUpdate) QueryContext ¶
func (c *StoragePolicyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicyUpdate) RemoveEntities ¶
func (spu *StoragePolicyUpdate) RemoveEntities(e ...*Entity) *StoragePolicyUpdate
RemoveEntities removes "entities" edges to Entity entities.
func (*StoragePolicyUpdate) RemoveEntityIDs ¶
func (spu *StoragePolicyUpdate) RemoveEntityIDs(ids ...int) *StoragePolicyUpdate
RemoveEntityIDs removes the "entities" edge to Entity entities by IDs.
func (*StoragePolicyUpdate) RemoveFileIDs ¶
func (spu *StoragePolicyUpdate) RemoveFileIDs(ids ...int) *StoragePolicyUpdate
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*StoragePolicyUpdate) RemoveFiles ¶
func (spu *StoragePolicyUpdate) RemoveFiles(f ...*File) *StoragePolicyUpdate
RemoveFiles removes "files" edges to File entities.
func (*StoragePolicyUpdate) RemoveGroupIDs ¶
func (spu *StoragePolicyUpdate) RemoveGroupIDs(ids ...int) *StoragePolicyUpdate
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*StoragePolicyUpdate) RemoveGroups ¶
func (spu *StoragePolicyUpdate) RemoveGroups(g ...*Group) *StoragePolicyUpdate
RemoveGroups removes "groups" edges to Group entities.
func (*StoragePolicyUpdate) Save ¶
func (spu *StoragePolicyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StoragePolicyUpdate) SaveX ¶
func (spu *StoragePolicyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StoragePolicyUpdate) SetAccessKey ¶
func (spu *StoragePolicyUpdate) SetAccessKey(s string) *StoragePolicyUpdate
SetAccessKey sets the "access_key" field.
func (*StoragePolicyUpdate) SetBucketName ¶
func (spu *StoragePolicyUpdate) SetBucketName(s string) *StoragePolicyUpdate
SetBucketName sets the "bucket_name" field.
func (*StoragePolicyUpdate) SetDeletedAt ¶
func (spu *StoragePolicyUpdate) SetDeletedAt(t time.Time) *StoragePolicyUpdate
SetDeletedAt sets the "deleted_at" field.
func (*StoragePolicyUpdate) SetDirNameRule ¶
func (spu *StoragePolicyUpdate) SetDirNameRule(s string) *StoragePolicyUpdate
SetDirNameRule sets the "dir_name_rule" field.
func (*StoragePolicyUpdate) SetFileNameRule ¶
func (spu *StoragePolicyUpdate) SetFileNameRule(s string) *StoragePolicyUpdate
SetFileNameRule sets the "file_name_rule" field.
func (*StoragePolicyUpdate) SetIsPrivate ¶
func (spu *StoragePolicyUpdate) SetIsPrivate(b bool) *StoragePolicyUpdate
SetIsPrivate sets the "is_private" field.
func (*StoragePolicyUpdate) SetMaxSize ¶
func (spu *StoragePolicyUpdate) SetMaxSize(i int64) *StoragePolicyUpdate
SetMaxSize sets the "max_size" field.
func (*StoragePolicyUpdate) SetName ¶
func (spu *StoragePolicyUpdate) SetName(s string) *StoragePolicyUpdate
SetName sets the "name" field.
func (*StoragePolicyUpdate) SetNillableAccessKey ¶
func (spu *StoragePolicyUpdate) SetNillableAccessKey(s *string) *StoragePolicyUpdate
SetNillableAccessKey sets the "access_key" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableBucketName ¶
func (spu *StoragePolicyUpdate) SetNillableBucketName(s *string) *StoragePolicyUpdate
SetNillableBucketName sets the "bucket_name" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableDeletedAt ¶
func (spu *StoragePolicyUpdate) SetNillableDeletedAt(t *time.Time) *StoragePolicyUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableDirNameRule ¶
func (spu *StoragePolicyUpdate) SetNillableDirNameRule(s *string) *StoragePolicyUpdate
SetNillableDirNameRule sets the "dir_name_rule" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableFileNameRule ¶
func (spu *StoragePolicyUpdate) SetNillableFileNameRule(s *string) *StoragePolicyUpdate
SetNillableFileNameRule sets the "file_name_rule" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableIsPrivate ¶
func (spu *StoragePolicyUpdate) SetNillableIsPrivate(b *bool) *StoragePolicyUpdate
SetNillableIsPrivate sets the "is_private" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableMaxSize ¶
func (spu *StoragePolicyUpdate) SetNillableMaxSize(i *int64) *StoragePolicyUpdate
SetNillableMaxSize sets the "max_size" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableName ¶
func (spu *StoragePolicyUpdate) SetNillableName(s *string) *StoragePolicyUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableNodeID ¶
func (spu *StoragePolicyUpdate) SetNillableNodeID(i *int) *StoragePolicyUpdate
SetNillableNodeID sets the "node_id" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableSecretKey ¶
func (spu *StoragePolicyUpdate) SetNillableSecretKey(s *string) *StoragePolicyUpdate
SetNillableSecretKey sets the "secret_key" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableServer ¶
func (spu *StoragePolicyUpdate) SetNillableServer(s *string) *StoragePolicyUpdate
SetNillableServer sets the "server" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNillableType ¶
func (spu *StoragePolicyUpdate) SetNillableType(s *string) *StoragePolicyUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*StoragePolicyUpdate) SetNode ¶
func (spu *StoragePolicyUpdate) SetNode(n *Node) *StoragePolicyUpdate
SetNode sets the "node" edge to the Node entity.
func (*StoragePolicyUpdate) SetNodeID ¶
func (spu *StoragePolicyUpdate) SetNodeID(i int) *StoragePolicyUpdate
SetNodeID sets the "node_id" field.
func (*StoragePolicyUpdate) SetSecretKey ¶
func (spu *StoragePolicyUpdate) SetSecretKey(s string) *StoragePolicyUpdate
SetSecretKey sets the "secret_key" field.
func (*StoragePolicyUpdate) SetServer ¶
func (spu *StoragePolicyUpdate) SetServer(s string) *StoragePolicyUpdate
SetServer sets the "server" field.
func (*StoragePolicyUpdate) SetSettings ¶
func (spu *StoragePolicyUpdate) SetSettings(ts *types.PolicySetting) *StoragePolicyUpdate
SetSettings sets the "settings" field.
func (*StoragePolicyUpdate) SetType ¶
func (spu *StoragePolicyUpdate) SetType(s string) *StoragePolicyUpdate
SetType sets the "type" field.
func (*StoragePolicyUpdate) SetUpdatedAt ¶
func (spu *StoragePolicyUpdate) SetUpdatedAt(t time.Time) *StoragePolicyUpdate
SetUpdatedAt sets the "updated_at" field.
func (*StoragePolicyUpdate) Where ¶
func (spu *StoragePolicyUpdate) Where(ps ...predicate.StoragePolicy) *StoragePolicyUpdate
Where appends a list predicates to the StoragePolicyUpdate builder.
type StoragePolicyUpdateOne ¶
type StoragePolicyUpdateOne struct {
// contains filtered or unexported fields
}
StoragePolicyUpdateOne is the builder for updating a single StoragePolicy entity.
func (*StoragePolicyUpdateOne) AddEntities ¶
func (spuo *StoragePolicyUpdateOne) AddEntities(e ...*Entity) *StoragePolicyUpdateOne
AddEntities adds the "entities" edges to the Entity entity.
func (*StoragePolicyUpdateOne) AddEntityIDs ¶
func (spuo *StoragePolicyUpdateOne) AddEntityIDs(ids ...int) *StoragePolicyUpdateOne
AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
func (*StoragePolicyUpdateOne) AddFileIDs ¶
func (spuo *StoragePolicyUpdateOne) AddFileIDs(ids ...int) *StoragePolicyUpdateOne
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*StoragePolicyUpdateOne) AddFiles ¶
func (spuo *StoragePolicyUpdateOne) AddFiles(f ...*File) *StoragePolicyUpdateOne
AddFiles adds the "files" edges to the File entity.
func (*StoragePolicyUpdateOne) AddGroupIDs ¶
func (spuo *StoragePolicyUpdateOne) AddGroupIDs(ids ...int) *StoragePolicyUpdateOne
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*StoragePolicyUpdateOne) AddGroups ¶
func (spuo *StoragePolicyUpdateOne) AddGroups(g ...*Group) *StoragePolicyUpdateOne
AddGroups adds the "groups" edges to the Group entity.
func (*StoragePolicyUpdateOne) AddMaxSize ¶
func (spuo *StoragePolicyUpdateOne) AddMaxSize(i int64) *StoragePolicyUpdateOne
AddMaxSize adds i to the "max_size" field.
func (*StoragePolicyUpdateOne) ClearAccessKey ¶
func (spuo *StoragePolicyUpdateOne) ClearAccessKey() *StoragePolicyUpdateOne
ClearAccessKey clears the value of the "access_key" field.
func (*StoragePolicyUpdateOne) ClearBucketName ¶
func (spuo *StoragePolicyUpdateOne) ClearBucketName() *StoragePolicyUpdateOne
ClearBucketName clears the value of the "bucket_name" field.
func (*StoragePolicyUpdateOne) ClearDeletedAt ¶
func (spuo *StoragePolicyUpdateOne) ClearDeletedAt() *StoragePolicyUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*StoragePolicyUpdateOne) ClearDirNameRule ¶
func (spuo *StoragePolicyUpdateOne) ClearDirNameRule() *StoragePolicyUpdateOne
ClearDirNameRule clears the value of the "dir_name_rule" field.
func (*StoragePolicyUpdateOne) ClearEntities ¶
func (spuo *StoragePolicyUpdateOne) ClearEntities() *StoragePolicyUpdateOne
ClearEntities clears all "entities" edges to the Entity entity.
func (*StoragePolicyUpdateOne) ClearFileNameRule ¶
func (spuo *StoragePolicyUpdateOne) ClearFileNameRule() *StoragePolicyUpdateOne
ClearFileNameRule clears the value of the "file_name_rule" field.
func (*StoragePolicyUpdateOne) ClearFiles ¶
func (spuo *StoragePolicyUpdateOne) ClearFiles() *StoragePolicyUpdateOne
ClearFiles clears all "files" edges to the File entity.
func (*StoragePolicyUpdateOne) ClearGroups ¶
func (spuo *StoragePolicyUpdateOne) ClearGroups() *StoragePolicyUpdateOne
ClearGroups clears all "groups" edges to the Group entity.
func (*StoragePolicyUpdateOne) ClearIsPrivate ¶
func (spuo *StoragePolicyUpdateOne) ClearIsPrivate() *StoragePolicyUpdateOne
ClearIsPrivate clears the value of the "is_private" field.
func (*StoragePolicyUpdateOne) ClearMaxSize ¶
func (spuo *StoragePolicyUpdateOne) ClearMaxSize() *StoragePolicyUpdateOne
ClearMaxSize clears the value of the "max_size" field.
func (*StoragePolicyUpdateOne) ClearNode ¶
func (spuo *StoragePolicyUpdateOne) ClearNode() *StoragePolicyUpdateOne
ClearNode clears the "node" edge to the Node entity.
func (*StoragePolicyUpdateOne) ClearNodeID ¶
func (spuo *StoragePolicyUpdateOne) ClearNodeID() *StoragePolicyUpdateOne
ClearNodeID clears the value of the "node_id" field.
func (*StoragePolicyUpdateOne) ClearSecretKey ¶
func (spuo *StoragePolicyUpdateOne) ClearSecretKey() *StoragePolicyUpdateOne
ClearSecretKey clears the value of the "secret_key" field.
func (*StoragePolicyUpdateOne) ClearServer ¶
func (spuo *StoragePolicyUpdateOne) ClearServer() *StoragePolicyUpdateOne
ClearServer clears the value of the "server" field.
func (*StoragePolicyUpdateOne) ClearSettings ¶
func (spuo *StoragePolicyUpdateOne) ClearSettings() *StoragePolicyUpdateOne
ClearSettings clears the value of the "settings" field.
func (*StoragePolicyUpdateOne) Exec ¶
func (spuo *StoragePolicyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StoragePolicyUpdateOne) ExecContext ¶
func (c *StoragePolicyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StoragePolicyUpdateOne) ExecX ¶
func (spuo *StoragePolicyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StoragePolicyUpdateOne) Mutation ¶
func (spuo *StoragePolicyUpdateOne) Mutation() *StoragePolicyMutation
Mutation returns the StoragePolicyMutation object of the builder.
func (*StoragePolicyUpdateOne) QueryContext ¶
func (c *StoragePolicyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StoragePolicyUpdateOne) RemoveEntities ¶
func (spuo *StoragePolicyUpdateOne) RemoveEntities(e ...*Entity) *StoragePolicyUpdateOne
RemoveEntities removes "entities" edges to Entity entities.
func (*StoragePolicyUpdateOne) RemoveEntityIDs ¶
func (spuo *StoragePolicyUpdateOne) RemoveEntityIDs(ids ...int) *StoragePolicyUpdateOne
RemoveEntityIDs removes the "entities" edge to Entity entities by IDs.
func (*StoragePolicyUpdateOne) RemoveFileIDs ¶
func (spuo *StoragePolicyUpdateOne) RemoveFileIDs(ids ...int) *StoragePolicyUpdateOne
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*StoragePolicyUpdateOne) RemoveFiles ¶
func (spuo *StoragePolicyUpdateOne) RemoveFiles(f ...*File) *StoragePolicyUpdateOne
RemoveFiles removes "files" edges to File entities.
func (*StoragePolicyUpdateOne) RemoveGroupIDs ¶
func (spuo *StoragePolicyUpdateOne) RemoveGroupIDs(ids ...int) *StoragePolicyUpdateOne
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*StoragePolicyUpdateOne) RemoveGroups ¶
func (spuo *StoragePolicyUpdateOne) RemoveGroups(g ...*Group) *StoragePolicyUpdateOne
RemoveGroups removes "groups" edges to Group entities.
func (*StoragePolicyUpdateOne) Save ¶
func (spuo *StoragePolicyUpdateOne) Save(ctx context.Context) (*StoragePolicy, error)
Save executes the query and returns the updated StoragePolicy entity.
func (*StoragePolicyUpdateOne) SaveX ¶
func (spuo *StoragePolicyUpdateOne) SaveX(ctx context.Context) *StoragePolicy
SaveX is like Save, but panics if an error occurs.
func (*StoragePolicyUpdateOne) Select ¶
func (spuo *StoragePolicyUpdateOne) Select(field string, fields ...string) *StoragePolicyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StoragePolicyUpdateOne) SetAccessKey ¶
func (spuo *StoragePolicyUpdateOne) SetAccessKey(s string) *StoragePolicyUpdateOne
SetAccessKey sets the "access_key" field.
func (*StoragePolicyUpdateOne) SetBucketName ¶
func (spuo *StoragePolicyUpdateOne) SetBucketName(s string) *StoragePolicyUpdateOne
SetBucketName sets the "bucket_name" field.
func (*StoragePolicyUpdateOne) SetDeletedAt ¶
func (spuo *StoragePolicyUpdateOne) SetDeletedAt(t time.Time) *StoragePolicyUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*StoragePolicyUpdateOne) SetDirNameRule ¶
func (spuo *StoragePolicyUpdateOne) SetDirNameRule(s string) *StoragePolicyUpdateOne
SetDirNameRule sets the "dir_name_rule" field.
func (*StoragePolicyUpdateOne) SetFileNameRule ¶
func (spuo *StoragePolicyUpdateOne) SetFileNameRule(s string) *StoragePolicyUpdateOne
SetFileNameRule sets the "file_name_rule" field.
func (*StoragePolicyUpdateOne) SetIsPrivate ¶
func (spuo *StoragePolicyUpdateOne) SetIsPrivate(b bool) *StoragePolicyUpdateOne
SetIsPrivate sets the "is_private" field.
func (*StoragePolicyUpdateOne) SetMaxSize ¶
func (spuo *StoragePolicyUpdateOne) SetMaxSize(i int64) *StoragePolicyUpdateOne
SetMaxSize sets the "max_size" field.
func (*StoragePolicyUpdateOne) SetName ¶
func (spuo *StoragePolicyUpdateOne) SetName(s string) *StoragePolicyUpdateOne
SetName sets the "name" field.
func (*StoragePolicyUpdateOne) SetNillableAccessKey ¶
func (spuo *StoragePolicyUpdateOne) SetNillableAccessKey(s *string) *StoragePolicyUpdateOne
SetNillableAccessKey sets the "access_key" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableBucketName ¶
func (spuo *StoragePolicyUpdateOne) SetNillableBucketName(s *string) *StoragePolicyUpdateOne
SetNillableBucketName sets the "bucket_name" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableDeletedAt ¶
func (spuo *StoragePolicyUpdateOne) SetNillableDeletedAt(t *time.Time) *StoragePolicyUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableDirNameRule ¶
func (spuo *StoragePolicyUpdateOne) SetNillableDirNameRule(s *string) *StoragePolicyUpdateOne
SetNillableDirNameRule sets the "dir_name_rule" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableFileNameRule ¶
func (spuo *StoragePolicyUpdateOne) SetNillableFileNameRule(s *string) *StoragePolicyUpdateOne
SetNillableFileNameRule sets the "file_name_rule" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableIsPrivate ¶
func (spuo *StoragePolicyUpdateOne) SetNillableIsPrivate(b *bool) *StoragePolicyUpdateOne
SetNillableIsPrivate sets the "is_private" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableMaxSize ¶
func (spuo *StoragePolicyUpdateOne) SetNillableMaxSize(i *int64) *StoragePolicyUpdateOne
SetNillableMaxSize sets the "max_size" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableName ¶
func (spuo *StoragePolicyUpdateOne) SetNillableName(s *string) *StoragePolicyUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableNodeID ¶
func (spuo *StoragePolicyUpdateOne) SetNillableNodeID(i *int) *StoragePolicyUpdateOne
SetNillableNodeID sets the "node_id" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableSecretKey ¶
func (spuo *StoragePolicyUpdateOne) SetNillableSecretKey(s *string) *StoragePolicyUpdateOne
SetNillableSecretKey sets the "secret_key" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableServer ¶
func (spuo *StoragePolicyUpdateOne) SetNillableServer(s *string) *StoragePolicyUpdateOne
SetNillableServer sets the "server" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNillableType ¶
func (spuo *StoragePolicyUpdateOne) SetNillableType(s *string) *StoragePolicyUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*StoragePolicyUpdateOne) SetNode ¶
func (spuo *StoragePolicyUpdateOne) SetNode(n *Node) *StoragePolicyUpdateOne
SetNode sets the "node" edge to the Node entity.
func (*StoragePolicyUpdateOne) SetNodeID ¶
func (spuo *StoragePolicyUpdateOne) SetNodeID(i int) *StoragePolicyUpdateOne
SetNodeID sets the "node_id" field.
func (*StoragePolicyUpdateOne) SetSecretKey ¶
func (spuo *StoragePolicyUpdateOne) SetSecretKey(s string) *StoragePolicyUpdateOne
SetSecretKey sets the "secret_key" field.
func (*StoragePolicyUpdateOne) SetServer ¶
func (spuo *StoragePolicyUpdateOne) SetServer(s string) *StoragePolicyUpdateOne
SetServer sets the "server" field.
func (*StoragePolicyUpdateOne) SetSettings ¶
func (spuo *StoragePolicyUpdateOne) SetSettings(ts *types.PolicySetting) *StoragePolicyUpdateOne
SetSettings sets the "settings" field.
func (*StoragePolicyUpdateOne) SetType ¶
func (spuo *StoragePolicyUpdateOne) SetType(s string) *StoragePolicyUpdateOne
SetType sets the "type" field.
func (*StoragePolicyUpdateOne) SetUpdatedAt ¶
func (spuo *StoragePolicyUpdateOne) SetUpdatedAt(t time.Time) *StoragePolicyUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*StoragePolicyUpdateOne) Where ¶
func (spuo *StoragePolicyUpdateOne) Where(ps ...predicate.StoragePolicy) *StoragePolicyUpdateOne
Where appends a list predicates to the StoragePolicyUpdate builder.
type StoragePolicyUpsert ¶
StoragePolicyUpsert is the "OnConflict" setter.
func (*StoragePolicyUpsert) AddMaxSize ¶
func (u *StoragePolicyUpsert) AddMaxSize(v int64) *StoragePolicyUpsert
AddMaxSize adds v to the "max_size" field.
func (*StoragePolicyUpsert) ClearAccessKey ¶
func (u *StoragePolicyUpsert) ClearAccessKey() *StoragePolicyUpsert
ClearAccessKey clears the value of the "access_key" field.
func (*StoragePolicyUpsert) ClearBucketName ¶
func (u *StoragePolicyUpsert) ClearBucketName() *StoragePolicyUpsert
ClearBucketName clears the value of the "bucket_name" field.
func (*StoragePolicyUpsert) ClearDeletedAt ¶
func (u *StoragePolicyUpsert) ClearDeletedAt() *StoragePolicyUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*StoragePolicyUpsert) ClearDirNameRule ¶
func (u *StoragePolicyUpsert) ClearDirNameRule() *StoragePolicyUpsert
ClearDirNameRule clears the value of the "dir_name_rule" field.
func (*StoragePolicyUpsert) ClearFileNameRule ¶
func (u *StoragePolicyUpsert) ClearFileNameRule() *StoragePolicyUpsert
ClearFileNameRule clears the value of the "file_name_rule" field.
func (*StoragePolicyUpsert) ClearIsPrivate ¶
func (u *StoragePolicyUpsert) ClearIsPrivate() *StoragePolicyUpsert
ClearIsPrivate clears the value of the "is_private" field.
func (*StoragePolicyUpsert) ClearMaxSize ¶
func (u *StoragePolicyUpsert) ClearMaxSize() *StoragePolicyUpsert
ClearMaxSize clears the value of the "max_size" field.
func (*StoragePolicyUpsert) ClearNodeID ¶
func (u *StoragePolicyUpsert) ClearNodeID() *StoragePolicyUpsert
ClearNodeID clears the value of the "node_id" field.
func (*StoragePolicyUpsert) ClearSecretKey ¶
func (u *StoragePolicyUpsert) ClearSecretKey() *StoragePolicyUpsert
ClearSecretKey clears the value of the "secret_key" field.
func (*StoragePolicyUpsert) ClearServer ¶
func (u *StoragePolicyUpsert) ClearServer() *StoragePolicyUpsert
ClearServer clears the value of the "server" field.
func (*StoragePolicyUpsert) ClearSettings ¶
func (u *StoragePolicyUpsert) ClearSettings() *StoragePolicyUpsert
ClearSettings clears the value of the "settings" field.
func (*StoragePolicyUpsert) SetAccessKey ¶
func (u *StoragePolicyUpsert) SetAccessKey(v string) *StoragePolicyUpsert
SetAccessKey sets the "access_key" field.
func (*StoragePolicyUpsert) SetBucketName ¶
func (u *StoragePolicyUpsert) SetBucketName(v string) *StoragePolicyUpsert
SetBucketName sets the "bucket_name" field.
func (*StoragePolicyUpsert) SetDeletedAt ¶
func (u *StoragePolicyUpsert) SetDeletedAt(v time.Time) *StoragePolicyUpsert
SetDeletedAt sets the "deleted_at" field.
func (*StoragePolicyUpsert) SetDirNameRule ¶
func (u *StoragePolicyUpsert) SetDirNameRule(v string) *StoragePolicyUpsert
SetDirNameRule sets the "dir_name_rule" field.
func (*StoragePolicyUpsert) SetFileNameRule ¶
func (u *StoragePolicyUpsert) SetFileNameRule(v string) *StoragePolicyUpsert
SetFileNameRule sets the "file_name_rule" field.
func (*StoragePolicyUpsert) SetIsPrivate ¶
func (u *StoragePolicyUpsert) SetIsPrivate(v bool) *StoragePolicyUpsert
SetIsPrivate sets the "is_private" field.
func (*StoragePolicyUpsert) SetMaxSize ¶
func (u *StoragePolicyUpsert) SetMaxSize(v int64) *StoragePolicyUpsert
SetMaxSize sets the "max_size" field.
func (*StoragePolicyUpsert) SetName ¶
func (u *StoragePolicyUpsert) SetName(v string) *StoragePolicyUpsert
SetName sets the "name" field.
func (*StoragePolicyUpsert) SetNodeID ¶
func (u *StoragePolicyUpsert) SetNodeID(v int) *StoragePolicyUpsert
SetNodeID sets the "node_id" field.
func (*StoragePolicyUpsert) SetSecretKey ¶
func (u *StoragePolicyUpsert) SetSecretKey(v string) *StoragePolicyUpsert
SetSecretKey sets the "secret_key" field.
func (*StoragePolicyUpsert) SetServer ¶
func (u *StoragePolicyUpsert) SetServer(v string) *StoragePolicyUpsert
SetServer sets the "server" field.
func (*StoragePolicyUpsert) SetSettings ¶
func (u *StoragePolicyUpsert) SetSettings(v *types.PolicySetting) *StoragePolicyUpsert
SetSettings sets the "settings" field.
func (*StoragePolicyUpsert) SetType ¶
func (u *StoragePolicyUpsert) SetType(v string) *StoragePolicyUpsert
SetType sets the "type" field.
func (*StoragePolicyUpsert) SetUpdatedAt ¶
func (u *StoragePolicyUpsert) SetUpdatedAt(v time.Time) *StoragePolicyUpsert
SetUpdatedAt sets the "updated_at" field.
func (*StoragePolicyUpsert) UpdateAccessKey ¶
func (u *StoragePolicyUpsert) UpdateAccessKey() *StoragePolicyUpsert
UpdateAccessKey sets the "access_key" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateBucketName ¶
func (u *StoragePolicyUpsert) UpdateBucketName() *StoragePolicyUpsert
UpdateBucketName sets the "bucket_name" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateDeletedAt ¶
func (u *StoragePolicyUpsert) UpdateDeletedAt() *StoragePolicyUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateDirNameRule ¶
func (u *StoragePolicyUpsert) UpdateDirNameRule() *StoragePolicyUpsert
UpdateDirNameRule sets the "dir_name_rule" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateFileNameRule ¶
func (u *StoragePolicyUpsert) UpdateFileNameRule() *StoragePolicyUpsert
UpdateFileNameRule sets the "file_name_rule" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateIsPrivate ¶
func (u *StoragePolicyUpsert) UpdateIsPrivate() *StoragePolicyUpsert
UpdateIsPrivate sets the "is_private" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateMaxSize ¶
func (u *StoragePolicyUpsert) UpdateMaxSize() *StoragePolicyUpsert
UpdateMaxSize sets the "max_size" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateName ¶
func (u *StoragePolicyUpsert) UpdateName() *StoragePolicyUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateNodeID ¶
func (u *StoragePolicyUpsert) UpdateNodeID() *StoragePolicyUpsert
UpdateNodeID sets the "node_id" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateSecretKey ¶
func (u *StoragePolicyUpsert) UpdateSecretKey() *StoragePolicyUpsert
UpdateSecretKey sets the "secret_key" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateServer ¶
func (u *StoragePolicyUpsert) UpdateServer() *StoragePolicyUpsert
UpdateServer sets the "server" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateSettings ¶
func (u *StoragePolicyUpsert) UpdateSettings() *StoragePolicyUpsert
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateType ¶
func (u *StoragePolicyUpsert) UpdateType() *StoragePolicyUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*StoragePolicyUpsert) UpdateUpdatedAt ¶
func (u *StoragePolicyUpsert) UpdateUpdatedAt() *StoragePolicyUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type StoragePolicyUpsertBulk ¶
type StoragePolicyUpsertBulk struct {
// contains filtered or unexported fields
}
StoragePolicyUpsertBulk is the builder for "upsert"-ing a bulk of StoragePolicy nodes.
func (*StoragePolicyUpsertBulk) AddMaxSize ¶
func (u *StoragePolicyUpsertBulk) AddMaxSize(v int64) *StoragePolicyUpsertBulk
AddMaxSize adds v to the "max_size" field.
func (*StoragePolicyUpsertBulk) ClearAccessKey ¶
func (u *StoragePolicyUpsertBulk) ClearAccessKey() *StoragePolicyUpsertBulk
ClearAccessKey clears the value of the "access_key" field.
func (*StoragePolicyUpsertBulk) ClearBucketName ¶
func (u *StoragePolicyUpsertBulk) ClearBucketName() *StoragePolicyUpsertBulk
ClearBucketName clears the value of the "bucket_name" field.
func (*StoragePolicyUpsertBulk) ClearDeletedAt ¶
func (u *StoragePolicyUpsertBulk) ClearDeletedAt() *StoragePolicyUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*StoragePolicyUpsertBulk) ClearDirNameRule ¶
func (u *StoragePolicyUpsertBulk) ClearDirNameRule() *StoragePolicyUpsertBulk
ClearDirNameRule clears the value of the "dir_name_rule" field.
func (*StoragePolicyUpsertBulk) ClearFileNameRule ¶
func (u *StoragePolicyUpsertBulk) ClearFileNameRule() *StoragePolicyUpsertBulk
ClearFileNameRule clears the value of the "file_name_rule" field.
func (*StoragePolicyUpsertBulk) ClearIsPrivate ¶
func (u *StoragePolicyUpsertBulk) ClearIsPrivate() *StoragePolicyUpsertBulk
ClearIsPrivate clears the value of the "is_private" field.
func (*StoragePolicyUpsertBulk) ClearMaxSize ¶
func (u *StoragePolicyUpsertBulk) ClearMaxSize() *StoragePolicyUpsertBulk
ClearMaxSize clears the value of the "max_size" field.
func (*StoragePolicyUpsertBulk) ClearNodeID ¶
func (u *StoragePolicyUpsertBulk) ClearNodeID() *StoragePolicyUpsertBulk
ClearNodeID clears the value of the "node_id" field.
func (*StoragePolicyUpsertBulk) ClearSecretKey ¶
func (u *StoragePolicyUpsertBulk) ClearSecretKey() *StoragePolicyUpsertBulk
ClearSecretKey clears the value of the "secret_key" field.
func (*StoragePolicyUpsertBulk) ClearServer ¶
func (u *StoragePolicyUpsertBulk) ClearServer() *StoragePolicyUpsertBulk
ClearServer clears the value of the "server" field.
func (*StoragePolicyUpsertBulk) ClearSettings ¶
func (u *StoragePolicyUpsertBulk) ClearSettings() *StoragePolicyUpsertBulk
ClearSettings clears the value of the "settings" field.
func (*StoragePolicyUpsertBulk) DoNothing ¶
func (u *StoragePolicyUpsertBulk) DoNothing() *StoragePolicyUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*StoragePolicyUpsertBulk) Exec ¶
func (u *StoragePolicyUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StoragePolicyUpsertBulk) ExecX ¶
func (u *StoragePolicyUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StoragePolicyUpsertBulk) Ignore ¶
func (u *StoragePolicyUpsertBulk) Ignore() *StoragePolicyUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.StoragePolicy.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*StoragePolicyUpsertBulk) SetAccessKey ¶
func (u *StoragePolicyUpsertBulk) SetAccessKey(v string) *StoragePolicyUpsertBulk
SetAccessKey sets the "access_key" field.
func (*StoragePolicyUpsertBulk) SetBucketName ¶
func (u *StoragePolicyUpsertBulk) SetBucketName(v string) *StoragePolicyUpsertBulk
SetBucketName sets the "bucket_name" field.
func (*StoragePolicyUpsertBulk) SetDeletedAt ¶
func (u *StoragePolicyUpsertBulk) SetDeletedAt(v time.Time) *StoragePolicyUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*StoragePolicyUpsertBulk) SetDirNameRule ¶
func (u *StoragePolicyUpsertBulk) SetDirNameRule(v string) *StoragePolicyUpsertBulk
SetDirNameRule sets the "dir_name_rule" field.
func (*StoragePolicyUpsertBulk) SetFileNameRule ¶
func (u *StoragePolicyUpsertBulk) SetFileNameRule(v string) *StoragePolicyUpsertBulk
SetFileNameRule sets the "file_name_rule" field.
func (*StoragePolicyUpsertBulk) SetIsPrivate ¶
func (u *StoragePolicyUpsertBulk) SetIsPrivate(v bool) *StoragePolicyUpsertBulk
SetIsPrivate sets the "is_private" field.
func (*StoragePolicyUpsertBulk) SetMaxSize ¶
func (u *StoragePolicyUpsertBulk) SetMaxSize(v int64) *StoragePolicyUpsertBulk
SetMaxSize sets the "max_size" field.
func (*StoragePolicyUpsertBulk) SetName ¶
func (u *StoragePolicyUpsertBulk) SetName(v string) *StoragePolicyUpsertBulk
SetName sets the "name" field.
func (*StoragePolicyUpsertBulk) SetNodeID ¶
func (u *StoragePolicyUpsertBulk) SetNodeID(v int) *StoragePolicyUpsertBulk
SetNodeID sets the "node_id" field.
func (*StoragePolicyUpsertBulk) SetSecretKey ¶
func (u *StoragePolicyUpsertBulk) SetSecretKey(v string) *StoragePolicyUpsertBulk
SetSecretKey sets the "secret_key" field.
func (*StoragePolicyUpsertBulk) SetServer ¶
func (u *StoragePolicyUpsertBulk) SetServer(v string) *StoragePolicyUpsertBulk
SetServer sets the "server" field.
func (*StoragePolicyUpsertBulk) SetSettings ¶
func (u *StoragePolicyUpsertBulk) SetSettings(v *types.PolicySetting) *StoragePolicyUpsertBulk
SetSettings sets the "settings" field.
func (*StoragePolicyUpsertBulk) SetType ¶
func (u *StoragePolicyUpsertBulk) SetType(v string) *StoragePolicyUpsertBulk
SetType sets the "type" field.
func (*StoragePolicyUpsertBulk) SetUpdatedAt ¶
func (u *StoragePolicyUpsertBulk) SetUpdatedAt(v time.Time) *StoragePolicyUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*StoragePolicyUpsertBulk) Update ¶
func (u *StoragePolicyUpsertBulk) Update(set func(*StoragePolicyUpsert)) *StoragePolicyUpsertBulk
Update allows overriding fields `UPDATE` values. See the StoragePolicyCreateBulk.OnConflict documentation for more info.
func (*StoragePolicyUpsertBulk) UpdateAccessKey ¶
func (u *StoragePolicyUpsertBulk) UpdateAccessKey() *StoragePolicyUpsertBulk
UpdateAccessKey sets the "access_key" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateBucketName ¶
func (u *StoragePolicyUpsertBulk) UpdateBucketName() *StoragePolicyUpsertBulk
UpdateBucketName sets the "bucket_name" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateDeletedAt ¶
func (u *StoragePolicyUpsertBulk) UpdateDeletedAt() *StoragePolicyUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateDirNameRule ¶
func (u *StoragePolicyUpsertBulk) UpdateDirNameRule() *StoragePolicyUpsertBulk
UpdateDirNameRule sets the "dir_name_rule" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateFileNameRule ¶
func (u *StoragePolicyUpsertBulk) UpdateFileNameRule() *StoragePolicyUpsertBulk
UpdateFileNameRule sets the "file_name_rule" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateIsPrivate ¶
func (u *StoragePolicyUpsertBulk) UpdateIsPrivate() *StoragePolicyUpsertBulk
UpdateIsPrivate sets the "is_private" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateMaxSize ¶
func (u *StoragePolicyUpsertBulk) UpdateMaxSize() *StoragePolicyUpsertBulk
UpdateMaxSize sets the "max_size" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateName ¶
func (u *StoragePolicyUpsertBulk) UpdateName() *StoragePolicyUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateNewValues ¶
func (u *StoragePolicyUpsertBulk) UpdateNewValues() *StoragePolicyUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.StoragePolicy.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*StoragePolicyUpsertBulk) UpdateNodeID ¶
func (u *StoragePolicyUpsertBulk) UpdateNodeID() *StoragePolicyUpsertBulk
UpdateNodeID sets the "node_id" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateSecretKey ¶
func (u *StoragePolicyUpsertBulk) UpdateSecretKey() *StoragePolicyUpsertBulk
UpdateSecretKey sets the "secret_key" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateServer ¶
func (u *StoragePolicyUpsertBulk) UpdateServer() *StoragePolicyUpsertBulk
UpdateServer sets the "server" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateSettings ¶
func (u *StoragePolicyUpsertBulk) UpdateSettings() *StoragePolicyUpsertBulk
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateType ¶
func (u *StoragePolicyUpsertBulk) UpdateType() *StoragePolicyUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*StoragePolicyUpsertBulk) UpdateUpdatedAt ¶
func (u *StoragePolicyUpsertBulk) UpdateUpdatedAt() *StoragePolicyUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type StoragePolicyUpsertOne ¶
type StoragePolicyUpsertOne struct {
// contains filtered or unexported fields
}
StoragePolicyUpsertOne is the builder for "upsert"-ing
one StoragePolicy node.
func (*StoragePolicyUpsertOne) AddMaxSize ¶
func (u *StoragePolicyUpsertOne) AddMaxSize(v int64) *StoragePolicyUpsertOne
AddMaxSize adds v to the "max_size" field.
func (*StoragePolicyUpsertOne) ClearAccessKey ¶
func (u *StoragePolicyUpsertOne) ClearAccessKey() *StoragePolicyUpsertOne
ClearAccessKey clears the value of the "access_key" field.
func (*StoragePolicyUpsertOne) ClearBucketName ¶
func (u *StoragePolicyUpsertOne) ClearBucketName() *StoragePolicyUpsertOne
ClearBucketName clears the value of the "bucket_name" field.
func (*StoragePolicyUpsertOne) ClearDeletedAt ¶
func (u *StoragePolicyUpsertOne) ClearDeletedAt() *StoragePolicyUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*StoragePolicyUpsertOne) ClearDirNameRule ¶
func (u *StoragePolicyUpsertOne) ClearDirNameRule() *StoragePolicyUpsertOne
ClearDirNameRule clears the value of the "dir_name_rule" field.
func (*StoragePolicyUpsertOne) ClearFileNameRule ¶
func (u *StoragePolicyUpsertOne) ClearFileNameRule() *StoragePolicyUpsertOne
ClearFileNameRule clears the value of the "file_name_rule" field.
func (*StoragePolicyUpsertOne) ClearIsPrivate ¶
func (u *StoragePolicyUpsertOne) ClearIsPrivate() *StoragePolicyUpsertOne
ClearIsPrivate clears the value of the "is_private" field.
func (*StoragePolicyUpsertOne) ClearMaxSize ¶
func (u *StoragePolicyUpsertOne) ClearMaxSize() *StoragePolicyUpsertOne
ClearMaxSize clears the value of the "max_size" field.
func (*StoragePolicyUpsertOne) ClearNodeID ¶
func (u *StoragePolicyUpsertOne) ClearNodeID() *StoragePolicyUpsertOne
ClearNodeID clears the value of the "node_id" field.
func (*StoragePolicyUpsertOne) ClearSecretKey ¶
func (u *StoragePolicyUpsertOne) ClearSecretKey() *StoragePolicyUpsertOne
ClearSecretKey clears the value of the "secret_key" field.
func (*StoragePolicyUpsertOne) ClearServer ¶
func (u *StoragePolicyUpsertOne) ClearServer() *StoragePolicyUpsertOne
ClearServer clears the value of the "server" field.
func (*StoragePolicyUpsertOne) ClearSettings ¶
func (u *StoragePolicyUpsertOne) ClearSettings() *StoragePolicyUpsertOne
ClearSettings clears the value of the "settings" field.
func (*StoragePolicyUpsertOne) DoNothing ¶
func (u *StoragePolicyUpsertOne) DoNothing() *StoragePolicyUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*StoragePolicyUpsertOne) Exec ¶
func (u *StoragePolicyUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*StoragePolicyUpsertOne) ExecX ¶
func (u *StoragePolicyUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StoragePolicyUpsertOne) ID ¶
func (u *StoragePolicyUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*StoragePolicyUpsertOne) IDX ¶
func (u *StoragePolicyUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*StoragePolicyUpsertOne) Ignore ¶
func (u *StoragePolicyUpsertOne) Ignore() *StoragePolicyUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.StoragePolicy.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*StoragePolicyUpsertOne) SetAccessKey ¶
func (u *StoragePolicyUpsertOne) SetAccessKey(v string) *StoragePolicyUpsertOne
SetAccessKey sets the "access_key" field.
func (*StoragePolicyUpsertOne) SetBucketName ¶
func (u *StoragePolicyUpsertOne) SetBucketName(v string) *StoragePolicyUpsertOne
SetBucketName sets the "bucket_name" field.
func (*StoragePolicyUpsertOne) SetDeletedAt ¶
func (u *StoragePolicyUpsertOne) SetDeletedAt(v time.Time) *StoragePolicyUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*StoragePolicyUpsertOne) SetDirNameRule ¶
func (u *StoragePolicyUpsertOne) SetDirNameRule(v string) *StoragePolicyUpsertOne
SetDirNameRule sets the "dir_name_rule" field.
func (*StoragePolicyUpsertOne) SetFileNameRule ¶
func (u *StoragePolicyUpsertOne) SetFileNameRule(v string) *StoragePolicyUpsertOne
SetFileNameRule sets the "file_name_rule" field.
func (*StoragePolicyUpsertOne) SetIsPrivate ¶
func (u *StoragePolicyUpsertOne) SetIsPrivate(v bool) *StoragePolicyUpsertOne
SetIsPrivate sets the "is_private" field.
func (*StoragePolicyUpsertOne) SetMaxSize ¶
func (u *StoragePolicyUpsertOne) SetMaxSize(v int64) *StoragePolicyUpsertOne
SetMaxSize sets the "max_size" field.
func (*StoragePolicyUpsertOne) SetName ¶
func (u *StoragePolicyUpsertOne) SetName(v string) *StoragePolicyUpsertOne
SetName sets the "name" field.
func (*StoragePolicyUpsertOne) SetNodeID ¶
func (u *StoragePolicyUpsertOne) SetNodeID(v int) *StoragePolicyUpsertOne
SetNodeID sets the "node_id" field.
func (*StoragePolicyUpsertOne) SetSecretKey ¶
func (u *StoragePolicyUpsertOne) SetSecretKey(v string) *StoragePolicyUpsertOne
SetSecretKey sets the "secret_key" field.
func (*StoragePolicyUpsertOne) SetServer ¶
func (u *StoragePolicyUpsertOne) SetServer(v string) *StoragePolicyUpsertOne
SetServer sets the "server" field.
func (*StoragePolicyUpsertOne) SetSettings ¶
func (u *StoragePolicyUpsertOne) SetSettings(v *types.PolicySetting) *StoragePolicyUpsertOne
SetSettings sets the "settings" field.
func (*StoragePolicyUpsertOne) SetType ¶
func (u *StoragePolicyUpsertOne) SetType(v string) *StoragePolicyUpsertOne
SetType sets the "type" field.
func (*StoragePolicyUpsertOne) SetUpdatedAt ¶
func (u *StoragePolicyUpsertOne) SetUpdatedAt(v time.Time) *StoragePolicyUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*StoragePolicyUpsertOne) Update ¶
func (u *StoragePolicyUpsertOne) Update(set func(*StoragePolicyUpsert)) *StoragePolicyUpsertOne
Update allows overriding fields `UPDATE` values. See the StoragePolicyCreate.OnConflict documentation for more info.
func (*StoragePolicyUpsertOne) UpdateAccessKey ¶
func (u *StoragePolicyUpsertOne) UpdateAccessKey() *StoragePolicyUpsertOne
UpdateAccessKey sets the "access_key" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateBucketName ¶
func (u *StoragePolicyUpsertOne) UpdateBucketName() *StoragePolicyUpsertOne
UpdateBucketName sets the "bucket_name" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateDeletedAt ¶
func (u *StoragePolicyUpsertOne) UpdateDeletedAt() *StoragePolicyUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateDirNameRule ¶
func (u *StoragePolicyUpsertOne) UpdateDirNameRule() *StoragePolicyUpsertOne
UpdateDirNameRule sets the "dir_name_rule" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateFileNameRule ¶
func (u *StoragePolicyUpsertOne) UpdateFileNameRule() *StoragePolicyUpsertOne
UpdateFileNameRule sets the "file_name_rule" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateIsPrivate ¶
func (u *StoragePolicyUpsertOne) UpdateIsPrivate() *StoragePolicyUpsertOne
UpdateIsPrivate sets the "is_private" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateMaxSize ¶
func (u *StoragePolicyUpsertOne) UpdateMaxSize() *StoragePolicyUpsertOne
UpdateMaxSize sets the "max_size" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateName ¶
func (u *StoragePolicyUpsertOne) UpdateName() *StoragePolicyUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateNewValues ¶
func (u *StoragePolicyUpsertOne) UpdateNewValues() *StoragePolicyUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.StoragePolicy.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*StoragePolicyUpsertOne) UpdateNodeID ¶
func (u *StoragePolicyUpsertOne) UpdateNodeID() *StoragePolicyUpsertOne
UpdateNodeID sets the "node_id" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateSecretKey ¶
func (u *StoragePolicyUpsertOne) UpdateSecretKey() *StoragePolicyUpsertOne
UpdateSecretKey sets the "secret_key" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateServer ¶
func (u *StoragePolicyUpsertOne) UpdateServer() *StoragePolicyUpsertOne
UpdateServer sets the "server" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateSettings ¶
func (u *StoragePolicyUpsertOne) UpdateSettings() *StoragePolicyUpsertOne
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateType ¶
func (u *StoragePolicyUpsertOne) UpdateType() *StoragePolicyUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*StoragePolicyUpsertOne) UpdateUpdatedAt ¶
func (u *StoragePolicyUpsertOne) UpdateUpdatedAt() *StoragePolicyUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type Task ¶
type Task struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// Status holds the value of the "status" field.
Status task.Status `json:"status,omitempty"`
// PublicState holds the value of the "public_state" field.
PublicState *types.TaskPublicState `json:"public_state,omitempty"`
// PrivateState holds the value of the "private_state" field.
PrivateState string `json:"private_state,omitempty"`
// CorrelationID holds the value of the "correlation_id" field.
CorrelationID uuid.UUID `json:"correlation_id,omitempty"`
// UserTasks holds the value of the "user_tasks" field.
UserTasks int `json:"user_tasks,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the TaskQuery when eager-loading is set.
Edges TaskEdges `json:"edges"`
// contains filtered or unexported fields
}
Task is the model entity for the Task schema.
func (*Task) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Task) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Task) Unwrap ¶
Unwrap unwraps the Task 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 (*Task) Update ¶
func (t *Task) Update() *TaskUpdateOne
Update returns a builder for updating this Task. Note that you need to call Task.Unwrap() before calling this method if this Task was returned from a transaction, and the transaction was committed or rolled back.
type TaskClient ¶
type TaskClient struct {
// contains filtered or unexported fields
}
TaskClient is a client for the Task schema.
func NewTaskClient ¶
func NewTaskClient(c config) *TaskClient
NewTaskClient returns a client for the Task from the given config.
func (*TaskClient) Create ¶
func (c *TaskClient) Create() *TaskCreate
Create returns a builder for creating a Task entity.
func (*TaskClient) CreateBulk ¶
func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
CreateBulk returns a builder for creating a bulk of Task entities.
func (*TaskClient) Delete ¶
func (c *TaskClient) Delete() *TaskDelete
Delete returns a delete builder for Task.
func (*TaskClient) DeleteOne ¶
func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TaskClient) DeleteOneID ¶
func (c *TaskClient) DeleteOneID(id int) *TaskDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TaskClient) ExecContext ¶
func (c *TaskClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TaskClient) GetX ¶
func (c *TaskClient) GetX(ctx context.Context, id int) *Task
GetX is like Get, but panics if an error occurs.
func (*TaskClient) Intercept ¶
func (c *TaskClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `task.Intercept(f(g(h())))`.
func (*TaskClient) Interceptors ¶
func (c *TaskClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TaskClient) MapCreateBulk ¶
func (c *TaskClient) MapCreateBulk(slice any, setFunc func(*TaskCreate, int)) *TaskCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TaskClient) Query ¶
func (c *TaskClient) Query() *TaskQuery
Query returns a query builder for Task.
func (*TaskClient) QueryContext ¶
func (c *TaskClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TaskClient) QueryUser ¶
func (c *TaskClient) QueryUser(t *Task) *UserQuery
QueryUser queries the user edge of a Task.
func (*TaskClient) Update ¶
func (c *TaskClient) Update() *TaskUpdate
Update returns an update builder for Task.
func (*TaskClient) UpdateOne ¶
func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TaskClient) UpdateOneID ¶
func (c *TaskClient) UpdateOneID(id int) *TaskUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TaskClient) Use ¶
func (c *TaskClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `task.Hooks(f(g(h())))`.
type TaskCreate ¶
type TaskCreate struct {
// contains filtered or unexported fields
}
TaskCreate is the builder for creating a Task entity.
func (*TaskCreate) Exec ¶
func (tc *TaskCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreate) ExecContext ¶
func (c *TaskCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TaskCreate) ExecX ¶
func (tc *TaskCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCreate) Mutation ¶
func (tc *TaskCreate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskCreate) OnConflict ¶
func (tc *TaskCreate) OnConflict(opts ...sql.ConflictOption) *TaskUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Task.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.TaskUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*TaskCreate) OnConflictColumns ¶
func (tc *TaskCreate) OnConflictColumns(columns ...string) *TaskUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TaskCreate) QueryContext ¶
func (c *TaskCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TaskCreate) Save ¶
func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)
Save creates the Task in the database.
func (*TaskCreate) SaveX ¶
func (tc *TaskCreate) SaveX(ctx context.Context) *Task
SaveX calls Save and panics if Save returns an error.
func (*TaskCreate) SetCorrelationID ¶
func (tc *TaskCreate) SetCorrelationID(u uuid.UUID) *TaskCreate
SetCorrelationID sets the "correlation_id" field.
func (*TaskCreate) SetCreatedAt ¶
func (tc *TaskCreate) SetCreatedAt(t time.Time) *TaskCreate
SetCreatedAt sets the "created_at" field.
func (*TaskCreate) SetDeletedAt ¶
func (tc *TaskCreate) SetDeletedAt(t time.Time) *TaskCreate
SetDeletedAt sets the "deleted_at" field.
func (*TaskCreate) SetNillableCorrelationID ¶
func (tc *TaskCreate) SetNillableCorrelationID(u *uuid.UUID) *TaskCreate
SetNillableCorrelationID sets the "correlation_id" field if the given value is not nil.
func (*TaskCreate) SetNillableCreatedAt ¶
func (tc *TaskCreate) SetNillableCreatedAt(t *time.Time) *TaskCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TaskCreate) SetNillableDeletedAt ¶
func (tc *TaskCreate) SetNillableDeletedAt(t *time.Time) *TaskCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*TaskCreate) SetNillablePrivateState ¶
func (tc *TaskCreate) SetNillablePrivateState(s *string) *TaskCreate
SetNillablePrivateState sets the "private_state" field if the given value is not nil.
func (*TaskCreate) SetNillableStatus ¶
func (tc *TaskCreate) SetNillableStatus(t *task.Status) *TaskCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TaskCreate) SetNillableUpdatedAt ¶
func (tc *TaskCreate) SetNillableUpdatedAt(t *time.Time) *TaskCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*TaskCreate) SetNillableUserID ¶
func (tc *TaskCreate) SetNillableUserID(id *int) *TaskCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*TaskCreate) SetNillableUserTasks ¶
func (tc *TaskCreate) SetNillableUserTasks(i *int) *TaskCreate
SetNillableUserTasks sets the "user_tasks" field if the given value is not nil.
func (*TaskCreate) SetPrivateState ¶
func (tc *TaskCreate) SetPrivateState(s string) *TaskCreate
SetPrivateState sets the "private_state" field.
func (*TaskCreate) SetPublicState ¶
func (tc *TaskCreate) SetPublicState(tps *types.TaskPublicState) *TaskCreate
SetPublicState sets the "public_state" field.
func (*TaskCreate) SetRawID ¶
func (m *TaskCreate) SetRawID(t int) *TaskCreate
func (*TaskCreate) SetStatus ¶
func (tc *TaskCreate) SetStatus(t task.Status) *TaskCreate
SetStatus sets the "status" field.
func (*TaskCreate) SetType ¶
func (tc *TaskCreate) SetType(s string) *TaskCreate
SetType sets the "type" field.
func (*TaskCreate) SetUpdatedAt ¶
func (tc *TaskCreate) SetUpdatedAt(t time.Time) *TaskCreate
SetUpdatedAt sets the "updated_at" field.
func (*TaskCreate) SetUser ¶
func (tc *TaskCreate) SetUser(u *User) *TaskCreate
SetUser sets the "user" edge to the User entity.
func (*TaskCreate) SetUserID ¶
func (tc *TaskCreate) SetUserID(id int) *TaskCreate
SetUserID sets the "user" edge to the User entity by ID.
func (*TaskCreate) SetUserTasks ¶
func (tc *TaskCreate) SetUserTasks(i int) *TaskCreate
SetUserTasks sets the "user_tasks" field.
type TaskCreateBulk ¶
type TaskCreateBulk struct {
// contains filtered or unexported fields
}
TaskCreateBulk is the builder for creating many Task entities in bulk.
func (*TaskCreateBulk) Exec ¶
func (tcb *TaskCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreateBulk) ExecContext ¶
func (c *TaskCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TaskCreateBulk) ExecX ¶
func (tcb *TaskCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCreateBulk) OnConflict ¶
func (tcb *TaskCreateBulk) OnConflict(opts ...sql.ConflictOption) *TaskUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Task.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.TaskUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*TaskCreateBulk) OnConflictColumns ¶
func (tcb *TaskCreateBulk) OnConflictColumns(columns ...string) *TaskUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TaskCreateBulk) QueryContext ¶
func (c *TaskCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type TaskDelete ¶
type TaskDelete struct {
// contains filtered or unexported fields
}
TaskDelete is the builder for deleting a Task entity.
func (*TaskDelete) Exec ¶
func (td *TaskDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TaskDelete) ExecContext ¶
func (c *TaskDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TaskDelete) ExecX ¶
func (td *TaskDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TaskDelete) QueryContext ¶
func (c *TaskDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TaskDelete) Where ¶
func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete
Where appends a list predicates to the TaskDelete builder.
type TaskDeleteOne ¶
type TaskDeleteOne struct {
// contains filtered or unexported fields
}
TaskDeleteOne is the builder for deleting a single Task entity.
func (*TaskDeleteOne) Exec ¶
func (tdo *TaskDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TaskDeleteOne) ExecX ¶
func (tdo *TaskDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskDeleteOne) Where ¶
func (tdo *TaskDeleteOne) Where(ps ...predicate.Task) *TaskDeleteOne
Where appends a list predicates to the TaskDelete builder.
type TaskEdges ¶
type TaskEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
TaskEdges holds the relations/edges for other nodes in the graph.
type TaskGroupBy ¶
type TaskGroupBy struct {
// contains filtered or unexported fields
}
TaskGroupBy is the group-by builder for Task entities.
func (*TaskGroupBy) Aggregate ¶
func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TaskGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Scan ¶
func (tgb *TaskGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TaskGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TaskMutation ¶
type TaskMutation struct {
// contains filtered or unexported fields
}
TaskMutation represents an operation that mutates the Task nodes in the graph.
func (*TaskMutation) AddField ¶
func (m *TaskMutation) 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 (*TaskMutation) AddedEdges ¶
func (m *TaskMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TaskMutation) AddedField ¶
func (m *TaskMutation) 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 (*TaskMutation) AddedFields ¶
func (m *TaskMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TaskMutation) AddedIDs ¶
func (m *TaskMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TaskMutation) ClearCorrelationID ¶
func (m *TaskMutation) ClearCorrelationID()
ClearCorrelationID clears the value of the "correlation_id" field.
func (*TaskMutation) ClearDeletedAt ¶
func (m *TaskMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TaskMutation) ClearEdge ¶
func (m *TaskMutation) 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 (*TaskMutation) ClearField ¶
func (m *TaskMutation) 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 (*TaskMutation) ClearPrivateState ¶
func (m *TaskMutation) ClearPrivateState()
ClearPrivateState clears the value of the "private_state" field.
func (*TaskMutation) ClearUser ¶
func (m *TaskMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*TaskMutation) ClearUserTasks ¶
func (m *TaskMutation) ClearUserTasks()
ClearUserTasks clears the value of the "user_tasks" field.
func (*TaskMutation) ClearedEdges ¶
func (m *TaskMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TaskMutation) ClearedFields ¶
func (m *TaskMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TaskMutation) Client ¶
func (m TaskMutation) 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 (*TaskMutation) CorrelationID ¶
func (m *TaskMutation) CorrelationID() (r uuid.UUID, exists bool)
CorrelationID returns the value of the "correlation_id" field in the mutation.
func (*TaskMutation) CorrelationIDCleared ¶
func (m *TaskMutation) CorrelationIDCleared() bool
CorrelationIDCleared returns if the "correlation_id" field was cleared in this mutation.
func (*TaskMutation) CreatedAt ¶
func (m *TaskMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TaskMutation) DeletedAt ¶
func (m *TaskMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*TaskMutation) DeletedAtCleared ¶
func (m *TaskMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*TaskMutation) EdgeCleared ¶
func (m *TaskMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TaskMutation) ExecContext ¶
func (c *TaskMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TaskMutation) Field ¶
func (m *TaskMutation) 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 (*TaskMutation) FieldCleared ¶
func (m *TaskMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TaskMutation) Fields ¶
func (m *TaskMutation) 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 (*TaskMutation) GetType ¶
func (m *TaskMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*TaskMutation) ID ¶
func (m *TaskMutation) 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 (*TaskMutation) IDs ¶
func (m *TaskMutation) 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 (*TaskMutation) OldCorrelationID ¶
OldCorrelationID returns the old "correlation_id" field's value of the Task entity. If the Task 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 (*TaskMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Task entity. If the Task 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 (*TaskMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Task entity. If the Task 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 (*TaskMutation) 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 (*TaskMutation) OldPrivateState ¶
func (m *TaskMutation) OldPrivateState(ctx context.Context) (v string, err error)
OldPrivateState returns the old "private_state" field's value of the Task entity. If the Task 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 (*TaskMutation) OldPublicState ¶
func (m *TaskMutation) OldPublicState(ctx context.Context) (v *types.TaskPublicState, err error)
OldPublicState returns the old "public_state" field's value of the Task entity. If the Task 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 (*TaskMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Task entity. If the Task 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 (*TaskMutation) OldType ¶
func (m *TaskMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Task entity. If the Task 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 (*TaskMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Task entity. If the Task 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 (*TaskMutation) OldUserTasks ¶
func (m *TaskMutation) OldUserTasks(ctx context.Context) (v int, err error)
OldUserTasks returns the old "user_tasks" field's value of the Task entity. If the Task 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 (*TaskMutation) PrivateState ¶
func (m *TaskMutation) PrivateState() (r string, exists bool)
PrivateState returns the value of the "private_state" field in the mutation.
func (*TaskMutation) PrivateStateCleared ¶
func (m *TaskMutation) PrivateStateCleared() bool
PrivateStateCleared returns if the "private_state" field was cleared in this mutation.
func (*TaskMutation) PublicState ¶
func (m *TaskMutation) PublicState() (r *types.TaskPublicState, exists bool)
PublicState returns the value of the "public_state" field in the mutation.
func (*TaskMutation) QueryContext ¶
func (c *TaskMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TaskMutation) RemovedEdges ¶
func (m *TaskMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TaskMutation) RemovedIDs ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetCorrelationID ¶
func (m *TaskMutation) ResetCorrelationID()
ResetCorrelationID resets all changes to the "correlation_id" field.
func (*TaskMutation) ResetCreatedAt ¶
func (m *TaskMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TaskMutation) ResetDeletedAt ¶
func (m *TaskMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*TaskMutation) ResetEdge ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetField ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetPrivateState ¶
func (m *TaskMutation) ResetPrivateState()
ResetPrivateState resets all changes to the "private_state" field.
func (*TaskMutation) ResetPublicState ¶
func (m *TaskMutation) ResetPublicState()
ResetPublicState resets all changes to the "public_state" field.
func (*TaskMutation) ResetStatus ¶
func (m *TaskMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*TaskMutation) ResetType ¶
func (m *TaskMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*TaskMutation) ResetUpdatedAt ¶
func (m *TaskMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TaskMutation) ResetUser ¶
func (m *TaskMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*TaskMutation) ResetUserTasks ¶
func (m *TaskMutation) ResetUserTasks()
ResetUserTasks resets all changes to the "user_tasks" field.
func (*TaskMutation) SetCorrelationID ¶
func (m *TaskMutation) SetCorrelationID(u uuid.UUID)
SetCorrelationID sets the "correlation_id" field.
func (*TaskMutation) SetCreatedAt ¶
func (m *TaskMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TaskMutation) SetDeletedAt ¶
func (m *TaskMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*TaskMutation) SetField ¶
func (m *TaskMutation) 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 (*TaskMutation) SetOp ¶
func (m *TaskMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TaskMutation) SetPrivateState ¶
func (m *TaskMutation) SetPrivateState(s string)
SetPrivateState sets the "private_state" field.
func (*TaskMutation) SetPublicState ¶
func (m *TaskMutation) SetPublicState(tps *types.TaskPublicState)
SetPublicState sets the "public_state" field.
func (*TaskMutation) SetRawID ¶
func (m *TaskMutation) SetRawID(t int)
func (*TaskMutation) SetStatus ¶
func (m *TaskMutation) SetStatus(t task.Status)
SetStatus sets the "status" field.
func (*TaskMutation) SetType ¶
func (m *TaskMutation) SetType(s string)
SetType sets the "type" field.
func (*TaskMutation) SetUpdatedAt ¶
func (m *TaskMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*TaskMutation) SetUserID ¶
func (m *TaskMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*TaskMutation) SetUserTasks ¶
func (m *TaskMutation) SetUserTasks(i int)
SetUserTasks sets the "user_tasks" field.
func (*TaskMutation) Status ¶
func (m *TaskMutation) Status() (r task.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (TaskMutation) Tx ¶
func (m TaskMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TaskMutation) Type ¶
func (m *TaskMutation) Type() string
Type returns the node type of this mutation (Task).
func (*TaskMutation) UpdatedAt ¶
func (m *TaskMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*TaskMutation) UserCleared ¶
func (m *TaskMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*TaskMutation) UserID ¶
func (m *TaskMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*TaskMutation) UserIDs ¶
func (m *TaskMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*TaskMutation) UserTasks ¶
func (m *TaskMutation) UserTasks() (r int, exists bool)
UserTasks returns the value of the "user_tasks" field in the mutation.
func (*TaskMutation) UserTasksCleared ¶
func (m *TaskMutation) UserTasksCleared() bool
UserTasksCleared returns if the "user_tasks" field was cleared in this mutation.
func (*TaskMutation) Where ¶
func (m *TaskMutation) Where(ps ...predicate.Task)
Where appends a list predicates to the TaskMutation builder.
func (*TaskMutation) WhereP ¶
func (m *TaskMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TaskMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TaskQuery ¶
type TaskQuery struct {
// contains filtered or unexported fields
}
TaskQuery is the builder for querying Task entities.
func (*TaskQuery) Aggregate ¶
func (tq *TaskQuery) Aggregate(fns ...AggregateFunc) *TaskSelect
Aggregate returns a TaskSelect configured with the given aggregations.
func (*TaskQuery) Clone ¶
Clone returns a duplicate of the TaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TaskQuery) ExecContext ¶
func (c *TaskQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TaskQuery) First ¶
First returns the first Task entity from the query. Returns a *NotFoundError when no Task was found.
func (*TaskQuery) FirstID ¶
FirstID returns the first Task ID from the query. Returns a *NotFoundError when no Task ID was found.
func (*TaskQuery) GroupBy ¶
func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Task.Query().
GroupBy(task.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*TaskQuery) Only ¶
Only returns a single Task entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Task entity is found. Returns a *NotFoundError when no Task entities are found.
func (*TaskQuery) OnlyID ¶
OnlyID is like Only, but returns the only Task ID in the query. Returns a *NotSingularError when more than one Task ID is found. Returns a *NotFoundError when no entities are found.
func (*TaskQuery) Order ¶
func (tq *TaskQuery) Order(o ...task.OrderOption) *TaskQuery
Order specifies how the records should be ordered.
func (*TaskQuery) QueryContext ¶
func (c *TaskQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TaskQuery) Select ¶
func (tq *TaskQuery) Select(fields ...string) *TaskSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Task.Query().
Select(task.FieldCreatedAt).
Scan(ctx, &v)
func (*TaskQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
type TaskSelect ¶
type TaskSelect struct {
*TaskQuery
// contains filtered or unexported fields
}
TaskSelect is the builder for selecting fields of Task entities.
func (*TaskSelect) Aggregate ¶
func (ts *TaskSelect) Aggregate(fns ...AggregateFunc) *TaskSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TaskSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (TaskSelect) ExecContext ¶
func (c TaskSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TaskSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (TaskSelect) QueryContext ¶
func (c TaskSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TaskSelect) Scan ¶
func (ts *TaskSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TaskSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TaskUpdate ¶
type TaskUpdate struct {
// contains filtered or unexported fields
}
TaskUpdate is the builder for updating Task entities.
func (*TaskUpdate) ClearDeletedAt ¶
func (tu *TaskUpdate) ClearDeletedAt() *TaskUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TaskUpdate) ClearPrivateState ¶
func (tu *TaskUpdate) ClearPrivateState() *TaskUpdate
ClearPrivateState clears the value of the "private_state" field.
func (*TaskUpdate) ClearUser ¶
func (tu *TaskUpdate) ClearUser() *TaskUpdate
ClearUser clears the "user" edge to the User entity.
func (*TaskUpdate) ClearUserTasks ¶
func (tu *TaskUpdate) ClearUserTasks() *TaskUpdate
ClearUserTasks clears the value of the "user_tasks" field.
func (*TaskUpdate) Exec ¶
func (tu *TaskUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpdate) ExecContext ¶
func (c *TaskUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TaskUpdate) ExecX ¶
func (tu *TaskUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdate) Mutation ¶
func (tu *TaskUpdate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdate) QueryContext ¶
func (c *TaskUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TaskUpdate) Save ¶
func (tu *TaskUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TaskUpdate) SaveX ¶
func (tu *TaskUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdate) SetDeletedAt ¶
func (tu *TaskUpdate) SetDeletedAt(t time.Time) *TaskUpdate
SetDeletedAt sets the "deleted_at" field.
func (*TaskUpdate) SetNillableDeletedAt ¶
func (tu *TaskUpdate) SetNillableDeletedAt(t *time.Time) *TaskUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*TaskUpdate) SetNillablePrivateState ¶
func (tu *TaskUpdate) SetNillablePrivateState(s *string) *TaskUpdate
SetNillablePrivateState sets the "private_state" field if the given value is not nil.
func (*TaskUpdate) SetNillableStatus ¶
func (tu *TaskUpdate) SetNillableStatus(t *task.Status) *TaskUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TaskUpdate) SetNillableType ¶
func (tu *TaskUpdate) SetNillableType(s *string) *TaskUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*TaskUpdate) SetNillableUserID ¶
func (tu *TaskUpdate) SetNillableUserID(id *int) *TaskUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*TaskUpdate) SetNillableUserTasks ¶
func (tu *TaskUpdate) SetNillableUserTasks(i *int) *TaskUpdate
SetNillableUserTasks sets the "user_tasks" field if the given value is not nil.
func (*TaskUpdate) SetPrivateState ¶
func (tu *TaskUpdate) SetPrivateState(s string) *TaskUpdate
SetPrivateState sets the "private_state" field.
func (*TaskUpdate) SetPublicState ¶
func (tu *TaskUpdate) SetPublicState(tps *types.TaskPublicState) *TaskUpdate
SetPublicState sets the "public_state" field.
func (*TaskUpdate) SetStatus ¶
func (tu *TaskUpdate) SetStatus(t task.Status) *TaskUpdate
SetStatus sets the "status" field.
func (*TaskUpdate) SetType ¶
func (tu *TaskUpdate) SetType(s string) *TaskUpdate
SetType sets the "type" field.
func (*TaskUpdate) SetUpdatedAt ¶
func (tu *TaskUpdate) SetUpdatedAt(t time.Time) *TaskUpdate
SetUpdatedAt sets the "updated_at" field.
func (*TaskUpdate) SetUser ¶
func (tu *TaskUpdate) SetUser(u *User) *TaskUpdate
SetUser sets the "user" edge to the User entity.
func (*TaskUpdate) SetUserID ¶
func (tu *TaskUpdate) SetUserID(id int) *TaskUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*TaskUpdate) SetUserTasks ¶
func (tu *TaskUpdate) SetUserTasks(i int) *TaskUpdate
SetUserTasks sets the "user_tasks" field.
func (*TaskUpdate) Where ¶
func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
Where appends a list predicates to the TaskUpdate builder.
type TaskUpdateOne ¶
type TaskUpdateOne struct {
// contains filtered or unexported fields
}
TaskUpdateOne is the builder for updating a single Task entity.
func (*TaskUpdateOne) ClearDeletedAt ¶
func (tuo *TaskUpdateOne) ClearDeletedAt() *TaskUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TaskUpdateOne) ClearPrivateState ¶
func (tuo *TaskUpdateOne) ClearPrivateState() *TaskUpdateOne
ClearPrivateState clears the value of the "private_state" field.
func (*TaskUpdateOne) ClearUser ¶
func (tuo *TaskUpdateOne) ClearUser() *TaskUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*TaskUpdateOne) ClearUserTasks ¶
func (tuo *TaskUpdateOne) ClearUserTasks() *TaskUpdateOne
ClearUserTasks clears the value of the "user_tasks" field.
func (*TaskUpdateOne) Exec ¶
func (tuo *TaskUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TaskUpdateOne) ExecContext ¶
func (c *TaskUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TaskUpdateOne) ExecX ¶
func (tuo *TaskUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdateOne) Mutation ¶
func (tuo *TaskUpdateOne) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdateOne) QueryContext ¶
func (c *TaskUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TaskUpdateOne) Save ¶
func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
Save executes the query and returns the updated Task entity.
func (*TaskUpdateOne) SaveX ¶
func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdateOne) Select ¶
func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TaskUpdateOne) SetDeletedAt ¶
func (tuo *TaskUpdateOne) SetDeletedAt(t time.Time) *TaskUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*TaskUpdateOne) SetNillableDeletedAt ¶
func (tuo *TaskUpdateOne) SetNillableDeletedAt(t *time.Time) *TaskUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*TaskUpdateOne) SetNillablePrivateState ¶
func (tuo *TaskUpdateOne) SetNillablePrivateState(s *string) *TaskUpdateOne
SetNillablePrivateState sets the "private_state" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableStatus ¶
func (tuo *TaskUpdateOne) SetNillableStatus(t *task.Status) *TaskUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableType ¶
func (tuo *TaskUpdateOne) SetNillableType(s *string) *TaskUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableUserID ¶
func (tuo *TaskUpdateOne) SetNillableUserID(id *int) *TaskUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*TaskUpdateOne) SetNillableUserTasks ¶
func (tuo *TaskUpdateOne) SetNillableUserTasks(i *int) *TaskUpdateOne
SetNillableUserTasks sets the "user_tasks" field if the given value is not nil.
func (*TaskUpdateOne) SetPrivateState ¶
func (tuo *TaskUpdateOne) SetPrivateState(s string) *TaskUpdateOne
SetPrivateState sets the "private_state" field.
func (*TaskUpdateOne) SetPublicState ¶
func (tuo *TaskUpdateOne) SetPublicState(tps *types.TaskPublicState) *TaskUpdateOne
SetPublicState sets the "public_state" field.
func (*TaskUpdateOne) SetStatus ¶
func (tuo *TaskUpdateOne) SetStatus(t task.Status) *TaskUpdateOne
SetStatus sets the "status" field.
func (*TaskUpdateOne) SetType ¶
func (tuo *TaskUpdateOne) SetType(s string) *TaskUpdateOne
SetType sets the "type" field.
func (*TaskUpdateOne) SetUpdatedAt ¶
func (tuo *TaskUpdateOne) SetUpdatedAt(t time.Time) *TaskUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TaskUpdateOne) SetUser ¶
func (tuo *TaskUpdateOne) SetUser(u *User) *TaskUpdateOne
SetUser sets the "user" edge to the User entity.
func (*TaskUpdateOne) SetUserID ¶
func (tuo *TaskUpdateOne) SetUserID(id int) *TaskUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*TaskUpdateOne) SetUserTasks ¶
func (tuo *TaskUpdateOne) SetUserTasks(i int) *TaskUpdateOne
SetUserTasks sets the "user_tasks" field.
func (*TaskUpdateOne) Where ¶
func (tuo *TaskUpdateOne) Where(ps ...predicate.Task) *TaskUpdateOne
Where appends a list predicates to the TaskUpdate builder.
type TaskUpsert ¶
TaskUpsert is the "OnConflict" setter.
func (*TaskUpsert) ClearDeletedAt ¶
func (u *TaskUpsert) ClearDeletedAt() *TaskUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TaskUpsert) ClearPrivateState ¶
func (u *TaskUpsert) ClearPrivateState() *TaskUpsert
ClearPrivateState clears the value of the "private_state" field.
func (*TaskUpsert) ClearUserTasks ¶
func (u *TaskUpsert) ClearUserTasks() *TaskUpsert
ClearUserTasks clears the value of the "user_tasks" field.
func (*TaskUpsert) SetDeletedAt ¶
func (u *TaskUpsert) SetDeletedAt(v time.Time) *TaskUpsert
SetDeletedAt sets the "deleted_at" field.
func (*TaskUpsert) SetPrivateState ¶
func (u *TaskUpsert) SetPrivateState(v string) *TaskUpsert
SetPrivateState sets the "private_state" field.
func (*TaskUpsert) SetPublicState ¶
func (u *TaskUpsert) SetPublicState(v *types.TaskPublicState) *TaskUpsert
SetPublicState sets the "public_state" field.
func (*TaskUpsert) SetStatus ¶
func (u *TaskUpsert) SetStatus(v task.Status) *TaskUpsert
SetStatus sets the "status" field.
func (*TaskUpsert) SetType ¶
func (u *TaskUpsert) SetType(v string) *TaskUpsert
SetType sets the "type" field.
func (*TaskUpsert) SetUpdatedAt ¶
func (u *TaskUpsert) SetUpdatedAt(v time.Time) *TaskUpsert
SetUpdatedAt sets the "updated_at" field.
func (*TaskUpsert) SetUserTasks ¶
func (u *TaskUpsert) SetUserTasks(v int) *TaskUpsert
SetUserTasks sets the "user_tasks" field.
func (*TaskUpsert) UpdateDeletedAt ¶
func (u *TaskUpsert) UpdateDeletedAt() *TaskUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*TaskUpsert) UpdatePrivateState ¶
func (u *TaskUpsert) UpdatePrivateState() *TaskUpsert
UpdatePrivateState sets the "private_state" field to the value that was provided on create.
func (*TaskUpsert) UpdatePublicState ¶
func (u *TaskUpsert) UpdatePublicState() *TaskUpsert
UpdatePublicState sets the "public_state" field to the value that was provided on create.
func (*TaskUpsert) UpdateStatus ¶
func (u *TaskUpsert) UpdateStatus() *TaskUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*TaskUpsert) UpdateType ¶
func (u *TaskUpsert) UpdateType() *TaskUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*TaskUpsert) UpdateUpdatedAt ¶
func (u *TaskUpsert) UpdateUpdatedAt() *TaskUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*TaskUpsert) UpdateUserTasks ¶
func (u *TaskUpsert) UpdateUserTasks() *TaskUpsert
UpdateUserTasks sets the "user_tasks" field to the value that was provided on create.
type TaskUpsertBulk ¶
type TaskUpsertBulk struct {
// contains filtered or unexported fields
}
TaskUpsertBulk is the builder for "upsert"-ing a bulk of Task nodes.
func (*TaskUpsertBulk) ClearDeletedAt ¶
func (u *TaskUpsertBulk) ClearDeletedAt() *TaskUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TaskUpsertBulk) ClearPrivateState ¶
func (u *TaskUpsertBulk) ClearPrivateState() *TaskUpsertBulk
ClearPrivateState clears the value of the "private_state" field.
func (*TaskUpsertBulk) ClearUserTasks ¶
func (u *TaskUpsertBulk) ClearUserTasks() *TaskUpsertBulk
ClearUserTasks clears the value of the "user_tasks" field.
func (*TaskUpsertBulk) DoNothing ¶
func (u *TaskUpsertBulk) DoNothing() *TaskUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TaskUpsertBulk) Exec ¶
func (u *TaskUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpsertBulk) ExecX ¶
func (u *TaskUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpsertBulk) Ignore ¶
func (u *TaskUpsertBulk) Ignore() *TaskUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TaskUpsertBulk) SetDeletedAt ¶
func (u *TaskUpsertBulk) SetDeletedAt(v time.Time) *TaskUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*TaskUpsertBulk) SetPrivateState ¶
func (u *TaskUpsertBulk) SetPrivateState(v string) *TaskUpsertBulk
SetPrivateState sets the "private_state" field.
func (*TaskUpsertBulk) SetPublicState ¶
func (u *TaskUpsertBulk) SetPublicState(v *types.TaskPublicState) *TaskUpsertBulk
SetPublicState sets the "public_state" field.
func (*TaskUpsertBulk) SetStatus ¶
func (u *TaskUpsertBulk) SetStatus(v task.Status) *TaskUpsertBulk
SetStatus sets the "status" field.
func (*TaskUpsertBulk) SetType ¶
func (u *TaskUpsertBulk) SetType(v string) *TaskUpsertBulk
SetType sets the "type" field.
func (*TaskUpsertBulk) SetUpdatedAt ¶
func (u *TaskUpsertBulk) SetUpdatedAt(v time.Time) *TaskUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*TaskUpsertBulk) SetUserTasks ¶
func (u *TaskUpsertBulk) SetUserTasks(v int) *TaskUpsertBulk
SetUserTasks sets the "user_tasks" field.
func (*TaskUpsertBulk) Update ¶
func (u *TaskUpsertBulk) Update(set func(*TaskUpsert)) *TaskUpsertBulk
Update allows overriding fields `UPDATE` values. See the TaskCreateBulk.OnConflict documentation for more info.
func (*TaskUpsertBulk) UpdateDeletedAt ¶
func (u *TaskUpsertBulk) UpdateDeletedAt() *TaskUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateNewValues ¶
func (u *TaskUpsertBulk) UpdateNewValues() *TaskUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Task.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TaskUpsertBulk) UpdatePrivateState ¶
func (u *TaskUpsertBulk) UpdatePrivateState() *TaskUpsertBulk
UpdatePrivateState sets the "private_state" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdatePublicState ¶
func (u *TaskUpsertBulk) UpdatePublicState() *TaskUpsertBulk
UpdatePublicState sets the "public_state" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateStatus ¶
func (u *TaskUpsertBulk) UpdateStatus() *TaskUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateType ¶
func (u *TaskUpsertBulk) UpdateType() *TaskUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateUpdatedAt ¶
func (u *TaskUpsertBulk) UpdateUpdatedAt() *TaskUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateUserTasks ¶
func (u *TaskUpsertBulk) UpdateUserTasks() *TaskUpsertBulk
UpdateUserTasks sets the "user_tasks" field to the value that was provided on create.
type TaskUpsertOne ¶
type TaskUpsertOne struct {
// contains filtered or unexported fields
}
TaskUpsertOne is the builder for "upsert"-ing
one Task node.
func (*TaskUpsertOne) ClearDeletedAt ¶
func (u *TaskUpsertOne) ClearDeletedAt() *TaskUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TaskUpsertOne) ClearPrivateState ¶
func (u *TaskUpsertOne) ClearPrivateState() *TaskUpsertOne
ClearPrivateState clears the value of the "private_state" field.
func (*TaskUpsertOne) ClearUserTasks ¶
func (u *TaskUpsertOne) ClearUserTasks() *TaskUpsertOne
ClearUserTasks clears the value of the "user_tasks" field.
func (*TaskUpsertOne) DoNothing ¶
func (u *TaskUpsertOne) DoNothing() *TaskUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TaskUpsertOne) Exec ¶
func (u *TaskUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpsertOne) ExecX ¶
func (u *TaskUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpsertOne) ID ¶
func (u *TaskUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TaskUpsertOne) IDX ¶
func (u *TaskUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*TaskUpsertOne) Ignore ¶
func (u *TaskUpsertOne) Ignore() *TaskUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Task.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*TaskUpsertOne) SetDeletedAt ¶
func (u *TaskUpsertOne) SetDeletedAt(v time.Time) *TaskUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*TaskUpsertOne) SetPrivateState ¶
func (u *TaskUpsertOne) SetPrivateState(v string) *TaskUpsertOne
SetPrivateState sets the "private_state" field.
func (*TaskUpsertOne) SetPublicState ¶
func (u *TaskUpsertOne) SetPublicState(v *types.TaskPublicState) *TaskUpsertOne
SetPublicState sets the "public_state" field.
func (*TaskUpsertOne) SetStatus ¶
func (u *TaskUpsertOne) SetStatus(v task.Status) *TaskUpsertOne
SetStatus sets the "status" field.
func (*TaskUpsertOne) SetType ¶
func (u *TaskUpsertOne) SetType(v string) *TaskUpsertOne
SetType sets the "type" field.
func (*TaskUpsertOne) SetUpdatedAt ¶
func (u *TaskUpsertOne) SetUpdatedAt(v time.Time) *TaskUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*TaskUpsertOne) SetUserTasks ¶
func (u *TaskUpsertOne) SetUserTasks(v int) *TaskUpsertOne
SetUserTasks sets the "user_tasks" field.
func (*TaskUpsertOne) Update ¶
func (u *TaskUpsertOne) Update(set func(*TaskUpsert)) *TaskUpsertOne
Update allows overriding fields `UPDATE` values. See the TaskCreate.OnConflict documentation for more info.
func (*TaskUpsertOne) UpdateDeletedAt ¶
func (u *TaskUpsertOne) UpdateDeletedAt() *TaskUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateNewValues ¶
func (u *TaskUpsertOne) UpdateNewValues() *TaskUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Task.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TaskUpsertOne) UpdatePrivateState ¶
func (u *TaskUpsertOne) UpdatePrivateState() *TaskUpsertOne
UpdatePrivateState sets the "private_state" field to the value that was provided on create.
func (*TaskUpsertOne) UpdatePublicState ¶
func (u *TaskUpsertOne) UpdatePublicState() *TaskUpsertOne
UpdatePublicState sets the "public_state" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateStatus ¶
func (u *TaskUpsertOne) UpdateStatus() *TaskUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateType ¶
func (u *TaskUpsertOne) UpdateType() *TaskUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateUpdatedAt ¶
func (u *TaskUpsertOne) UpdateUpdatedAt() *TaskUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateUserTasks ¶
func (u *TaskUpsertOne) UpdateUserTasks() *TaskUpsertOne
UpdateUserTasks sets the "user_tasks" field to the value that was provided on create.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// DavAccount is the client for interacting with the DavAccount builders.
DavAccount *DavAccountClient
// DirectLink is the client for interacting with the DirectLink builders.
DirectLink *DirectLinkClient
// Entity is the client for interacting with the Entity builders.
Entity *EntityClient
// File is the client for interacting with the File builders.
File *FileClient
// FsEvent is the client for interacting with the FsEvent builders.
FsEvent *FsEventClient
// Group is the client for interacting with the Group builders.
Group *GroupClient
// Metadata is the client for interacting with the Metadata builders.
Metadata *MetadataClient
// Node is the client for interacting with the Node builders.
Node *NodeClient
// OAuthClient is the client for interacting with the OAuthClient builders.
OAuthClient *OAuthClientClient
// OAuthGrant is the client for interacting with the OAuthGrant builders.
OAuthGrant *OAuthGrantClient
// Passkey is the client for interacting with the Passkey builders.
Passkey *PasskeyClient
// Setting is the client for interacting with the Setting builders.
Setting *SettingClient
Share *ShareClient
// StoragePolicy is the client for interacting with the StoragePolicy builders.
StoragePolicy *StoragePolicyClient
// Task is the client for interacting with the Task builders.
Task *TaskClient
// User is the client for interacting with the User builders.
User *UserClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type User ¶
type User struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// Email holds the value of the "email" field.
Email string `json:"email,omitempty"`
// Nick holds the value of the "nick" field.
Nick string `json:"nick,omitempty"`
// Password holds the value of the "password" field.
Password string `json:"-"`
// Status holds the value of the "status" field.
Status user.Status `json:"status,omitempty"`
// Storage holds the value of the "storage" field.
Storage int64 `json:"storage,omitempty"`
// TwoFactorSecret holds the value of the "two_factor_secret" field.
TwoFactorSecret string `json:"-"`
// Avatar holds the value of the "avatar" field.
Avatar string `json:"avatar,omitempty"`
// Settings holds the value of the "settings" field.
Settings *types.UserSetting `json:"settings,omitempty"`
// GroupUsers holds the value of the "group_users" field.
GroupUsers int `json:"group_users,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the UserQuery when eager-loading is set.
Edges UserEdges `json:"edges"`
// contains filtered or unexported fields
}
User is the model entity for the User schema.
func (*User) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*User) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*User) QueryDavAccounts ¶
func (u *User) QueryDavAccounts() *DavAccountQuery
QueryDavAccounts queries the "dav_accounts" edge of the User entity.
func (*User) QueryEntities ¶
func (u *User) QueryEntities() *EntityQuery
QueryEntities queries the "entities" edge of the User entity.
func (*User) QueryFiles ¶
QueryFiles queries the "files" edge of the User entity.
func (*User) QueryFsevents ¶
func (u *User) QueryFsevents() *FsEventQuery
QueryFsevents queries the "fsevents" edge of the User entity.
func (*User) QueryGroup ¶
func (u *User) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the User entity.
func (*User) QueryOauthGrants ¶
func (u *User) QueryOauthGrants() *OAuthGrantQuery
QueryOauthGrants queries the "oauth_grants" edge of the User entity.
func (*User) QueryPasskey ¶
func (u *User) QueryPasskey() *PasskeyQuery
QueryPasskey queries the "passkey" edge of the User entity.
func (*User) QueryShares ¶
func (u *User) QueryShares() *ShareQuery
QueryShares queries the "shares" edge of the User entity.
func (*User) QueryTasks ¶
QueryTasks queries the "tasks" edge of the User entity.
func (*User) SetDavAccounts ¶
func (e *User) SetDavAccounts(v []*DavAccount)
SetDavAccounts manually set the edge as loaded state.
func (*User) SetEntities ¶
SetEntities manually set the edge as loaded state.
func (*User) SetFsevents ¶
SetFsevents manually set the edge as loaded state.
func (*User) SetOauthGrants ¶
func (e *User) SetOauthGrants(v []*OAuthGrant)
SetOauthGrants manually set the edge as loaded state.
func (*User) SetPasskey ¶
SetPasskey manually set the edge as loaded state.
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) ExecContext ¶
func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryContext ¶
func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserClient) QueryDavAccounts ¶
func (c *UserClient) QueryDavAccounts(u *User) *DavAccountQuery
QueryDavAccounts queries the dav_accounts edge of a User.
func (*UserClient) QueryEntities ¶
func (c *UserClient) QueryEntities(u *User) *EntityQuery
QueryEntities queries the entities edge of a User.
func (*UserClient) QueryFiles ¶
func (c *UserClient) QueryFiles(u *User) *FileQuery
QueryFiles queries the files edge of a User.
func (*UserClient) QueryFsevents ¶
func (c *UserClient) QueryFsevents(u *User) *FsEventQuery
QueryFsevents queries the fsevents edge of a User.
func (*UserClient) QueryGroup ¶
func (c *UserClient) QueryGroup(u *User) *GroupQuery
QueryGroup queries the group edge of a User.
func (*UserClient) QueryOauthGrants ¶
func (c *UserClient) QueryOauthGrants(u *User) *OAuthGrantQuery
QueryOauthGrants queries the oauth_grants edge of a User.
func (*UserClient) QueryPasskey ¶
func (c *UserClient) QueryPasskey(u *User) *PasskeyQuery
QueryPasskey queries the passkey edge of a User.
func (*UserClient) QueryShares ¶
func (c *UserClient) QueryShares(u *User) *ShareQuery
QueryShares queries the shares edge of a User.
func (*UserClient) QueryTasks ¶
func (c *UserClient) QueryTasks(u *User) *TaskQuery
QueryTasks queries the tasks edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id 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) AddDavAccountIDs ¶
func (uc *UserCreate) AddDavAccountIDs(ids ...int) *UserCreate
AddDavAccountIDs adds the "dav_accounts" edge to the DavAccount entity by IDs.
func (*UserCreate) AddDavAccounts ¶
func (uc *UserCreate) AddDavAccounts(d ...*DavAccount) *UserCreate
AddDavAccounts adds the "dav_accounts" edges to the DavAccount entity.
func (*UserCreate) AddEntities ¶
func (uc *UserCreate) AddEntities(e ...*Entity) *UserCreate
AddEntities adds the "entities" edges to the Entity entity.
func (*UserCreate) AddEntityIDs ¶
func (uc *UserCreate) AddEntityIDs(ids ...int) *UserCreate
AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
func (*UserCreate) AddFileIDs ¶
func (uc *UserCreate) AddFileIDs(ids ...int) *UserCreate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*UserCreate) AddFiles ¶
func (uc *UserCreate) AddFiles(f ...*File) *UserCreate
AddFiles adds the "files" edges to the File entity.
func (*UserCreate) AddFseventIDs ¶
func (uc *UserCreate) AddFseventIDs(ids ...int) *UserCreate
AddFseventIDs adds the "fsevents" edge to the FsEvent entity by IDs.
func (*UserCreate) AddFsevents ¶
func (uc *UserCreate) AddFsevents(f ...*FsEvent) *UserCreate
AddFsevents adds the "fsevents" edges to the FsEvent entity.
func (*UserCreate) AddOauthGrantIDs ¶
func (uc *UserCreate) AddOauthGrantIDs(ids ...int) *UserCreate
AddOauthGrantIDs adds the "oauth_grants" edge to the OAuthGrant entity by IDs.
func (*UserCreate) AddOauthGrants ¶
func (uc *UserCreate) AddOauthGrants(o ...*OAuthGrant) *UserCreate
AddOauthGrants adds the "oauth_grants" edges to the OAuthGrant entity.
func (*UserCreate) AddPasskey ¶
func (uc *UserCreate) AddPasskey(p ...*Passkey) *UserCreate
AddPasskey adds the "passkey" edges to the Passkey entity.
func (*UserCreate) AddPasskeyIDs ¶
func (uc *UserCreate) AddPasskeyIDs(ids ...int) *UserCreate
AddPasskeyIDs adds the "passkey" edge to the Passkey entity by IDs.
func (*UserCreate) AddShareIDs ¶
func (uc *UserCreate) AddShareIDs(ids ...int) *UserCreate
AddShareIDs adds the "shares" edge to the Share entity by IDs.
func (*UserCreate) AddShares ¶
func (uc *UserCreate) AddShares(s ...*Share) *UserCreate
AddShares adds the "shares" edges to the Share entity.
func (*UserCreate) AddTaskIDs ¶
func (uc *UserCreate) AddTaskIDs(ids ...int) *UserCreate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*UserCreate) AddTasks ¶
func (uc *UserCreate) AddTasks(t ...*Task) *UserCreate
AddTasks adds the "tasks" edges to the Task entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecContext ¶
func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.UserUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) QueryContext ¶
func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAvatar ¶
func (uc *UserCreate) SetAvatar(s string) *UserCreate
SetAvatar sets the "avatar" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetDeletedAt ¶
func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
SetDeletedAt sets the "deleted_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetGroup ¶
func (uc *UserCreate) SetGroup(g *Group) *UserCreate
SetGroup sets the "group" edge to the Group entity.
func (*UserCreate) SetGroupID ¶
func (uc *UserCreate) SetGroupID(id int) *UserCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*UserCreate) SetGroupUsers ¶
func (uc *UserCreate) SetGroupUsers(i int) *UserCreate
SetGroupUsers sets the "group_users" field.
func (*UserCreate) SetNick ¶
func (uc *UserCreate) SetNick(s string) *UserCreate
SetNick sets the "nick" field.
func (*UserCreate) SetNillableAvatar ¶
func (uc *UserCreate) SetNillableAvatar(s *string) *UserCreate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableDeletedAt ¶
func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserCreate) SetNillablePassword ¶
func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserCreate) SetNillableStatus ¶
func (uc *UserCreate) SetNillableStatus(u *user.Status) *UserCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserCreate) SetNillableStorage ¶
func (uc *UserCreate) SetNillableStorage(i *int64) *UserCreate
SetNillableStorage sets the "storage" field if the given value is not nil.
func (*UserCreate) SetNillableTwoFactorSecret ¶
func (uc *UserCreate) SetNillableTwoFactorSecret(s *string) *UserCreate
SetNillableTwoFactorSecret sets the "two_factor_secret" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetRawID ¶
func (m *UserCreate) SetRawID(t int) *UserCreate
func (*UserCreate) SetSettings ¶
func (uc *UserCreate) SetSettings(ts *types.UserSetting) *UserCreate
SetSettings sets the "settings" field.
func (*UserCreate) SetStatus ¶
func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
SetStatus sets the "status" field.
func (*UserCreate) SetStorage ¶
func (uc *UserCreate) SetStorage(i int64) *UserCreate
SetStorage sets the "storage" field.
func (*UserCreate) SetTwoFactorSecret ¶
func (uc *UserCreate) SetTwoFactorSecret(s string) *UserCreate
SetTwoFactorSecret sets the "two_factor_secret" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecContext ¶
func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.UserUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreateBulk) QueryContext ¶
func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecContext ¶
func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) QueryContext ¶
func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct {
// Group holds the value of the group edge.
Group *Group `json:"group,omitempty"`
// Files holds the value of the files edge.
Files []*File `json:"files,omitempty"`
// DavAccounts holds the value of the dav_accounts edge.
DavAccounts []*DavAccount `json:"dav_accounts,omitempty"`
Shares []*Share `json:"shares,omitempty"`
// Passkey holds the value of the passkey edge.
Passkey []*Passkey `json:"passkey,omitempty"`
// Tasks holds the value of the tasks edge.
Tasks []*Task `json:"tasks,omitempty"`
// Fsevents holds the value of the fsevents edge.
Fsevents []*FsEvent `json:"fsevents,omitempty"`
// Entities holds the value of the entities edge.
Entities []*Entity `json:"entities,omitempty"`
// OauthGrants holds the value of the oauth_grants edge.
OauthGrants []*OAuthGrant `json:"oauth_grants,omitempty"`
// contains filtered or unexported fields
}
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) DavAccountsOrErr ¶
func (e UserEdges) DavAccountsOrErr() ([]*DavAccount, error)
DavAccountsOrErr returns the DavAccounts value or an error if the edge was not loaded in eager-loading.
func (UserEdges) EntitiesOrErr ¶
EntitiesOrErr returns the Entities value or an error if the edge was not loaded in eager-loading.
func (UserEdges) FilesOrErr ¶
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
func (UserEdges) FseventsOrErr ¶
FseventsOrErr returns the Fsevents value or an error if the edge was not loaded in eager-loading.
func (UserEdges) GroupOrErr ¶
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) OauthGrantsOrErr ¶
func (e UserEdges) OauthGrantsOrErr() ([]*OAuthGrant, error)
OauthGrantsOrErr returns the OauthGrants value or an error if the edge was not loaded in eager-loading.
func (UserEdges) PasskeyOrErr ¶
PasskeyOrErr returns the Passkey value or an error if the edge was not loaded in eager-loading.
func (UserEdges) SharesOrErr ¶
SharesOrErr returns the Shares value or an error if the edge was not loaded in eager-loading.
func (UserEdges) TasksOrErr ¶
TasksOrErr returns the Tasks value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddDavAccountIDs ¶
func (m *UserMutation) AddDavAccountIDs(ids ...int)
AddDavAccountIDs adds the "dav_accounts" edge to the DavAccount entity by ids.
func (*UserMutation) AddEntityIDs ¶
func (m *UserMutation) AddEntityIDs(ids ...int)
AddEntityIDs adds the "entities" edge to the Entity entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddFileIDs ¶
func (m *UserMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "files" edge to the File entity by ids.
func (*UserMutation) AddFseventIDs ¶
func (m *UserMutation) AddFseventIDs(ids ...int)
AddFseventIDs adds the "fsevents" edge to the FsEvent entity by ids.
func (*UserMutation) AddOauthGrantIDs ¶
func (m *UserMutation) AddOauthGrantIDs(ids ...int)
AddOauthGrantIDs adds the "oauth_grants" edge to the OAuthGrant entity by ids.
func (*UserMutation) AddPasskeyIDs ¶
func (m *UserMutation) AddPasskeyIDs(ids ...int)
AddPasskeyIDs adds the "passkey" edge to the Passkey entity by ids.
func (*UserMutation) AddShareIDs ¶
func (m *UserMutation) AddShareIDs(ids ...int)
AddShareIDs adds the "shares" edge to the Share entity by ids.
func (*UserMutation) AddStorage ¶
func (m *UserMutation) AddStorage(i int64)
AddStorage adds i to the "storage" field.
func (*UserMutation) AddTaskIDs ¶
func (m *UserMutation) AddTaskIDs(ids ...int)
AddTaskIDs adds the "tasks" edge to the Task entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedStorage ¶
func (m *UserMutation) AddedStorage() (r int64, exists bool)
AddedStorage returns the value that was added to the "storage" field in this mutation.
func (*UserMutation) Avatar ¶
func (m *UserMutation) Avatar() (r string, exists bool)
Avatar returns the value of the "avatar" field in the mutation.
func (*UserMutation) AvatarCleared ¶
func (m *UserMutation) AvatarCleared() bool
AvatarCleared returns if the "avatar" field was cleared in this mutation.
func (*UserMutation) ClearAvatar ¶
func (m *UserMutation) ClearAvatar()
ClearAvatar clears the value of the "avatar" field.
func (*UserMutation) ClearDavAccounts ¶
func (m *UserMutation) ClearDavAccounts()
ClearDavAccounts clears the "dav_accounts" edge to the DavAccount entity.
func (*UserMutation) ClearDeletedAt ¶
func (m *UserMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearEntities ¶
func (m *UserMutation) ClearEntities()
ClearEntities clears the "entities" edge to the Entity entity.
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) ClearFiles ¶
func (m *UserMutation) ClearFiles()
ClearFiles clears the "files" edge to the File entity.
func (*UserMutation) ClearFsevents ¶
func (m *UserMutation) ClearFsevents()
ClearFsevents clears the "fsevents" edge to the FsEvent entity.
func (*UserMutation) ClearGroup ¶
func (m *UserMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*UserMutation) ClearOauthGrants ¶
func (m *UserMutation) ClearOauthGrants()
ClearOauthGrants clears the "oauth_grants" edge to the OAuthGrant entity.
func (*UserMutation) ClearPasskey ¶
func (m *UserMutation) ClearPasskey()
ClearPasskey clears the "passkey" edge to the Passkey entity.
func (*UserMutation) ClearPassword ¶
func (m *UserMutation) ClearPassword()
ClearPassword clears the value of the "password" field.
func (*UserMutation) ClearSettings ¶
func (m *UserMutation) ClearSettings()
ClearSettings clears the value of the "settings" field.
func (*UserMutation) ClearShares ¶
func (m *UserMutation) ClearShares()
ClearShares clears the "shares" edge to the Share entity.
func (*UserMutation) ClearTasks ¶
func (m *UserMutation) ClearTasks()
ClearTasks clears the "tasks" edge to the Task entity.
func (*UserMutation) ClearTwoFactorSecret ¶
func (m *UserMutation) ClearTwoFactorSecret()
ClearTwoFactorSecret clears the value of the "two_factor_secret" field.
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) DavAccountsCleared ¶
func (m *UserMutation) DavAccountsCleared() bool
DavAccountsCleared reports if the "dav_accounts" edge to the DavAccount entity was cleared.
func (*UserMutation) DavAccountsIDs ¶
func (m *UserMutation) DavAccountsIDs() (ids []int)
DavAccountsIDs returns the "dav_accounts" edge IDs in the mutation.
func (*UserMutation) DeletedAt ¶
func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*UserMutation) DeletedAtCleared ¶
func (m *UserMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) EntitiesCleared ¶
func (m *UserMutation) EntitiesCleared() bool
EntitiesCleared reports if the "entities" edge to the Entity entity was cleared.
func (*UserMutation) EntitiesIDs ¶
func (m *UserMutation) EntitiesIDs() (ids []int)
EntitiesIDs returns the "entities" edge IDs in the mutation.
func (*UserMutation) ExecContext ¶
func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserMutation) 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) FilesCleared ¶
func (m *UserMutation) FilesCleared() bool
FilesCleared reports if the "files" edge to the File entity was cleared.
func (*UserMutation) FilesIDs ¶
func (m *UserMutation) FilesIDs() (ids []int)
FilesIDs returns the "files" edge IDs in the mutation.
func (*UserMutation) FseventsCleared ¶
func (m *UserMutation) FseventsCleared() bool
FseventsCleared reports if the "fsevents" edge to the FsEvent entity was cleared.
func (*UserMutation) FseventsIDs ¶
func (m *UserMutation) FseventsIDs() (ids []int)
FseventsIDs returns the "fsevents" edge IDs in the mutation.
func (*UserMutation) GroupCleared ¶
func (m *UserMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*UserMutation) GroupID ¶
func (m *UserMutation) GroupID() (id int, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*UserMutation) GroupIDs ¶
func (m *UserMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*UserMutation) GroupUsers ¶
func (m *UserMutation) GroupUsers() (r int, exists bool)
GroupUsers returns the value of the "group_users" 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) Nick ¶
func (m *UserMutation) Nick() (r string, exists bool)
Nick returns the value of the "nick" field in the mutation.
func (*UserMutation) OauthGrantsCleared ¶
func (m *UserMutation) OauthGrantsCleared() bool
OauthGrantsCleared reports if the "oauth_grants" edge to the OAuthGrant entity was cleared.
func (*UserMutation) OauthGrantsIDs ¶
func (m *UserMutation) OauthGrantsIDs() (ids []int)
OauthGrantsIDs returns the "oauth_grants" edge IDs in the mutation.
func (*UserMutation) OldAvatar ¶
func (m *UserMutation) OldAvatar(ctx context.Context) (v string, err error)
OldAvatar returns the old "avatar" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) 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) OldGroupUsers ¶
func (m *UserMutation) OldGroupUsers(ctx context.Context) (v int, err error)
OldGroupUsers returns the old "group_users" 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) OldNick ¶
func (m *UserMutation) OldNick(ctx context.Context) (v string, err error)
OldNick returns the old "nick" 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) OldSettings ¶
func (m *UserMutation) OldSettings(ctx context.Context) (v *types.UserSetting, err error)
OldSettings returns the old "settings" 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) OldStorage ¶
func (m *UserMutation) OldStorage(ctx context.Context) (v int64, err error)
OldStorage returns the old "storage" 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) OldTwoFactorSecret ¶
func (m *UserMutation) OldTwoFactorSecret(ctx context.Context) (v string, err error)
OldTwoFactorSecret returns the old "two_factor_secret" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) PasskeyCleared ¶
func (m *UserMutation) PasskeyCleared() bool
PasskeyCleared reports if the "passkey" edge to the Passkey entity was cleared.
func (*UserMutation) PasskeyIDs ¶
func (m *UserMutation) PasskeyIDs() (ids []int)
PasskeyIDs returns the "passkey" edge IDs in the mutation.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PasswordCleared ¶
func (m *UserMutation) PasswordCleared() bool
PasswordCleared returns if the "password" field was cleared in this mutation.
func (*UserMutation) QueryContext ¶
func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserMutation) RemoveDavAccountIDs ¶
func (m *UserMutation) RemoveDavAccountIDs(ids ...int)
RemoveDavAccountIDs removes the "dav_accounts" edge to the DavAccount entity by IDs.
func (*UserMutation) RemoveEntityIDs ¶
func (m *UserMutation) RemoveEntityIDs(ids ...int)
RemoveEntityIDs removes the "entities" edge to the Entity entity by IDs.
func (*UserMutation) RemoveFileIDs ¶
func (m *UserMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "files" edge to the File entity by IDs.
func (*UserMutation) RemoveFseventIDs ¶
func (m *UserMutation) RemoveFseventIDs(ids ...int)
RemoveFseventIDs removes the "fsevents" edge to the FsEvent entity by IDs.
func (*UserMutation) RemoveOauthGrantIDs ¶
func (m *UserMutation) RemoveOauthGrantIDs(ids ...int)
RemoveOauthGrantIDs removes the "oauth_grants" edge to the OAuthGrant entity by IDs.
func (*UserMutation) RemovePasskeyIDs ¶
func (m *UserMutation) RemovePasskeyIDs(ids ...int)
RemovePasskeyIDs removes the "passkey" edge to the Passkey entity by IDs.
func (*UserMutation) RemoveShareIDs ¶
func (m *UserMutation) RemoveShareIDs(ids ...int)
RemoveShareIDs removes the "shares" edge to the Share entity by IDs.
func (*UserMutation) RemoveTaskIDs ¶
func (m *UserMutation) RemoveTaskIDs(ids ...int)
RemoveTaskIDs removes the "tasks" edge to the Task entity by IDs.
func (*UserMutation) RemovedDavAccountsIDs ¶
func (m *UserMutation) RemovedDavAccountsIDs() (ids []int)
RemovedDavAccounts returns the removed IDs of the "dav_accounts" edge to the DavAccount entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedEntitiesIDs ¶
func (m *UserMutation) RemovedEntitiesIDs() (ids []int)
RemovedEntities returns the removed IDs of the "entities" edge to the Entity entity.
func (*UserMutation) RemovedFilesIDs ¶
func (m *UserMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "files" edge to the File entity.
func (*UserMutation) RemovedFseventsIDs ¶
func (m *UserMutation) RemovedFseventsIDs() (ids []int)
RemovedFsevents returns the removed IDs of the "fsevents" edge to the FsEvent entity.
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) RemovedOauthGrantsIDs ¶
func (m *UserMutation) RemovedOauthGrantsIDs() (ids []int)
RemovedOauthGrants returns the removed IDs of the "oauth_grants" edge to the OAuthGrant entity.
func (*UserMutation) RemovedPasskeyIDs ¶
func (m *UserMutation) RemovedPasskeyIDs() (ids []int)
RemovedPasskey returns the removed IDs of the "passkey" edge to the Passkey entity.
func (*UserMutation) RemovedSharesIDs ¶
func (m *UserMutation) RemovedSharesIDs() (ids []int)
RemovedShares returns the removed IDs of the "shares" edge to the Share entity.
func (*UserMutation) RemovedTasksIDs ¶
func (m *UserMutation) RemovedTasksIDs() (ids []int)
RemovedTasks returns the removed IDs of the "tasks" edge to the Task entity.
func (*UserMutation) ResetAvatar ¶
func (m *UserMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" field.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetDavAccounts ¶
func (m *UserMutation) ResetDavAccounts()
ResetDavAccounts resets all changes to the "dav_accounts" edge.
func (*UserMutation) ResetDeletedAt ¶
func (m *UserMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_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) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetEntities ¶
func (m *UserMutation) ResetEntities()
ResetEntities resets all changes to the "entities" edge.
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) ResetFiles ¶
func (m *UserMutation) ResetFiles()
ResetFiles resets all changes to the "files" edge.
func (*UserMutation) ResetFsevents ¶
func (m *UserMutation) ResetFsevents()
ResetFsevents resets all changes to the "fsevents" edge.
func (*UserMutation) ResetGroup ¶
func (m *UserMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*UserMutation) ResetGroupUsers ¶
func (m *UserMutation) ResetGroupUsers()
ResetGroupUsers resets all changes to the "group_users" field.
func (*UserMutation) ResetNick ¶
func (m *UserMutation) ResetNick()
ResetNick resets all changes to the "nick" field.
func (*UserMutation) ResetOauthGrants ¶
func (m *UserMutation) ResetOauthGrants()
ResetOauthGrants resets all changes to the "oauth_grants" edge.
func (*UserMutation) ResetPasskey ¶
func (m *UserMutation) ResetPasskey()
ResetPasskey resets all changes to the "passkey" edge.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetSettings ¶
func (m *UserMutation) ResetSettings()
ResetSettings resets all changes to the "settings" field.
func (*UserMutation) ResetShares ¶
func (m *UserMutation) ResetShares()
ResetShares resets all changes to the "shares" edge.
func (*UserMutation) ResetStatus ¶
func (m *UserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserMutation) ResetStorage ¶
func (m *UserMutation) ResetStorage()
ResetStorage resets all changes to the "storage" field.
func (*UserMutation) ResetTasks ¶
func (m *UserMutation) ResetTasks()
ResetTasks resets all changes to the "tasks" edge.
func (*UserMutation) ResetTwoFactorSecret ¶
func (m *UserMutation) ResetTwoFactorSecret()
ResetTwoFactorSecret resets all changes to the "two_factor_secret" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) SetAvatar ¶
func (m *UserMutation) SetAvatar(s string)
SetAvatar sets the "avatar" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetDeletedAt ¶
func (m *UserMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" 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) SetGroupID ¶
func (m *UserMutation) SetGroupID(id int)
SetGroupID sets the "group" edge to the Group entity by id.
func (*UserMutation) SetGroupUsers ¶
func (m *UserMutation) SetGroupUsers(i int)
SetGroupUsers sets the "group_users" field.
func (*UserMutation) SetNick ¶
func (m *UserMutation) SetNick(s string)
SetNick sets the "nick" field.
func (*UserMutation) SetOp ¶
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) SetRawID ¶
func (m *UserMutation) SetRawID(t int)
func (*UserMutation) SetSettings ¶
func (m *UserMutation) SetSettings(ts *types.UserSetting)
SetSettings sets the "settings" field.
func (*UserMutation) SetStatus ¶
func (m *UserMutation) SetStatus(u user.Status)
SetStatus sets the "status" field.
func (*UserMutation) SetStorage ¶
func (m *UserMutation) SetStorage(i int64)
SetStorage sets the "storage" field.
func (*UserMutation) SetTwoFactorSecret ¶
func (m *UserMutation) SetTwoFactorSecret(s string)
SetTwoFactorSecret sets the "two_factor_secret" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) Settings ¶
func (m *UserMutation) Settings() (r *types.UserSetting, exists bool)
Settings returns the value of the "settings" field in the mutation.
func (*UserMutation) SettingsCleared ¶
func (m *UserMutation) SettingsCleared() bool
SettingsCleared returns if the "settings" field was cleared in this mutation.
func (*UserMutation) SharesCleared ¶
func (m *UserMutation) SharesCleared() bool
SharesCleared reports if the "shares" edge to the Share entity was cleared.
func (*UserMutation) SharesIDs ¶
func (m *UserMutation) SharesIDs() (ids []int)
SharesIDs returns the "shares" edge IDs in the mutation.
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) Storage ¶
func (m *UserMutation) Storage() (r int64, exists bool)
Storage returns the value of the "storage" field in the mutation.
func (*UserMutation) TasksCleared ¶
func (m *UserMutation) TasksCleared() bool
TasksCleared reports if the "tasks" edge to the Task entity was cleared.
func (*UserMutation) TasksIDs ¶
func (m *UserMutation) TasksIDs() (ids []int)
TasksIDs returns the "tasks" edge IDs in the mutation.
func (*UserMutation) TwoFactorSecret ¶
func (m *UserMutation) TwoFactorSecret() (r string, exists bool)
TwoFactorSecret returns the value of the "two_factor_secret" field in the mutation.
func (*UserMutation) TwoFactorSecretCleared ¶
func (m *UserMutation) TwoFactorSecretCleared() bool
TwoFactorSecretCleared returns if the "two_factor_secret" field was cleared in this 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) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) ExecContext ¶
func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.User.Query().
GroupBy(user.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryContext ¶
func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserQuery) QueryDavAccounts ¶
func (uq *UserQuery) QueryDavAccounts() *DavAccountQuery
QueryDavAccounts chains the current query on the "dav_accounts" edge.
func (*UserQuery) QueryEntities ¶
func (uq *UserQuery) QueryEntities() *EntityQuery
QueryEntities chains the current query on the "entities" edge.
func (*UserQuery) QueryFiles ¶
QueryFiles chains the current query on the "files" edge.
func (*UserQuery) QueryFsevents ¶
func (uq *UserQuery) QueryFsevents() *FsEventQuery
QueryFsevents chains the current query on the "fsevents" edge.
func (*UserQuery) QueryGroup ¶
func (uq *UserQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*UserQuery) QueryOauthGrants ¶
func (uq *UserQuery) QueryOauthGrants() *OAuthGrantQuery
QueryOauthGrants chains the current query on the "oauth_grants" edge.
func (*UserQuery) QueryPasskey ¶
func (uq *UserQuery) QueryPasskey() *PasskeyQuery
QueryPasskey chains the current query on the "passkey" edge.
func (*UserQuery) QueryShares ¶
func (uq *UserQuery) QueryShares() *ShareQuery
QueryShares chains the current query on the "shares" edge.
func (*UserQuery) QueryTasks ¶
QueryTasks chains the current query on the "tasks" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.User.Query().
Select(user.FieldCreatedAt).
Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithDavAccounts ¶
func (uq *UserQuery) WithDavAccounts(opts ...func(*DavAccountQuery)) *UserQuery
WithDavAccounts tells the query-builder to eager-load the nodes that are connected to the "dav_accounts" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithEntities ¶
func (uq *UserQuery) WithEntities(opts ...func(*EntityQuery)) *UserQuery
WithEntities tells the query-builder to eager-load the nodes that are connected to the "entities" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithFiles ¶
WithFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithFsevents ¶
func (uq *UserQuery) WithFsevents(opts ...func(*FsEventQuery)) *UserQuery
WithFsevents tells the query-builder to eager-load the nodes that are connected to the "fsevents" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGroup ¶
func (uq *UserQuery) WithGroup(opts ...func(*GroupQuery)) *UserQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithOauthGrants ¶
func (uq *UserQuery) WithOauthGrants(opts ...func(*OAuthGrantQuery)) *UserQuery
WithOauthGrants tells the query-builder to eager-load the nodes that are connected to the "oauth_grants" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithPasskey ¶
func (uq *UserQuery) WithPasskey(opts ...func(*PasskeyQuery)) *UserQuery
WithPasskey tells the query-builder to eager-load the nodes that are connected to the "passkey" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithShares ¶
func (uq *UserQuery) WithShares(opts ...func(*ShareQuery)) *UserQuery
WithShares tells the query-builder to eager-load the nodes that are connected to the "shares" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct {
*UserQuery
// contains filtered or unexported fields
}
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (UserSelect) ExecContext ¶
func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (UserSelect) QueryContext ¶
func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddDavAccountIDs ¶
func (uu *UserUpdate) AddDavAccountIDs(ids ...int) *UserUpdate
AddDavAccountIDs adds the "dav_accounts" edge to the DavAccount entity by IDs.
func (*UserUpdate) AddDavAccounts ¶
func (uu *UserUpdate) AddDavAccounts(d ...*DavAccount) *UserUpdate
AddDavAccounts adds the "dav_accounts" edges to the DavAccount entity.
func (*UserUpdate) AddEntities ¶
func (uu *UserUpdate) AddEntities(e ...*Entity) *UserUpdate
AddEntities adds the "entities" edges to the Entity entity.
func (*UserUpdate) AddEntityIDs ¶
func (uu *UserUpdate) AddEntityIDs(ids ...int) *UserUpdate
AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
func (*UserUpdate) AddFileIDs ¶
func (uu *UserUpdate) AddFileIDs(ids ...int) *UserUpdate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*UserUpdate) AddFiles ¶
func (uu *UserUpdate) AddFiles(f ...*File) *UserUpdate
AddFiles adds the "files" edges to the File entity.
func (*UserUpdate) AddFseventIDs ¶
func (uu *UserUpdate) AddFseventIDs(ids ...int) *UserUpdate
AddFseventIDs adds the "fsevents" edge to the FsEvent entity by IDs.
func (*UserUpdate) AddFsevents ¶
func (uu *UserUpdate) AddFsevents(f ...*FsEvent) *UserUpdate
AddFsevents adds the "fsevents" edges to the FsEvent entity.
func (*UserUpdate) AddOauthGrantIDs ¶
func (uu *UserUpdate) AddOauthGrantIDs(ids ...int) *UserUpdate
AddOauthGrantIDs adds the "oauth_grants" edge to the OAuthGrant entity by IDs.
func (*UserUpdate) AddOauthGrants ¶
func (uu *UserUpdate) AddOauthGrants(o ...*OAuthGrant) *UserUpdate
AddOauthGrants adds the "oauth_grants" edges to the OAuthGrant entity.
func (*UserUpdate) AddPasskey ¶
func (uu *UserUpdate) AddPasskey(p ...*Passkey) *UserUpdate
AddPasskey adds the "passkey" edges to the Passkey entity.
func (*UserUpdate) AddPasskeyIDs ¶
func (uu *UserUpdate) AddPasskeyIDs(ids ...int) *UserUpdate
AddPasskeyIDs adds the "passkey" edge to the Passkey entity by IDs.
func (*UserUpdate) AddShareIDs ¶
func (uu *UserUpdate) AddShareIDs(ids ...int) *UserUpdate
AddShareIDs adds the "shares" edge to the Share entity by IDs.
func (*UserUpdate) AddShares ¶
func (uu *UserUpdate) AddShares(s ...*Share) *UserUpdate
AddShares adds the "shares" edges to the Share entity.
func (*UserUpdate) AddStorage ¶
func (uu *UserUpdate) AddStorage(i int64) *UserUpdate
AddStorage adds i to the "storage" field.
func (*UserUpdate) AddTaskIDs ¶
func (uu *UserUpdate) AddTaskIDs(ids ...int) *UserUpdate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*UserUpdate) AddTasks ¶
func (uu *UserUpdate) AddTasks(t ...*Task) *UserUpdate
AddTasks adds the "tasks" edges to the Task entity.
func (*UserUpdate) ClearAvatar ¶
func (uu *UserUpdate) ClearAvatar() *UserUpdate
ClearAvatar clears the value of the "avatar" field.
func (*UserUpdate) ClearDavAccounts ¶
func (uu *UserUpdate) ClearDavAccounts() *UserUpdate
ClearDavAccounts clears all "dav_accounts" edges to the DavAccount entity.
func (*UserUpdate) ClearDeletedAt ¶
func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdate) ClearEntities ¶
func (uu *UserUpdate) ClearEntities() *UserUpdate
ClearEntities clears all "entities" edges to the Entity entity.
func (*UserUpdate) ClearFiles ¶
func (uu *UserUpdate) ClearFiles() *UserUpdate
ClearFiles clears all "files" edges to the File entity.
func (*UserUpdate) ClearFsevents ¶
func (uu *UserUpdate) ClearFsevents() *UserUpdate
ClearFsevents clears all "fsevents" edges to the FsEvent entity.
func (*UserUpdate) ClearGroup ¶
func (uu *UserUpdate) ClearGroup() *UserUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*UserUpdate) ClearOauthGrants ¶
func (uu *UserUpdate) ClearOauthGrants() *UserUpdate
ClearOauthGrants clears all "oauth_grants" edges to the OAuthGrant entity.
func (*UserUpdate) ClearPasskey ¶
func (uu *UserUpdate) ClearPasskey() *UserUpdate
ClearPasskey clears all "passkey" edges to the Passkey entity.
func (*UserUpdate) ClearPassword ¶
func (uu *UserUpdate) ClearPassword() *UserUpdate
ClearPassword clears the value of the "password" field.
func (*UserUpdate) ClearSettings ¶
func (uu *UserUpdate) ClearSettings() *UserUpdate
ClearSettings clears the value of the "settings" field.
func (*UserUpdate) ClearShares ¶
func (uu *UserUpdate) ClearShares() *UserUpdate
ClearShares clears all "shares" edges to the Share entity.
func (*UserUpdate) ClearTasks ¶
func (uu *UserUpdate) ClearTasks() *UserUpdate
ClearTasks clears all "tasks" edges to the Task entity.
func (*UserUpdate) ClearTwoFactorSecret ¶
func (uu *UserUpdate) ClearTwoFactorSecret() *UserUpdate
ClearTwoFactorSecret clears the value of the "two_factor_secret" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecContext ¶
func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) QueryContext ¶
func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdate) RemoveDavAccountIDs ¶
func (uu *UserUpdate) RemoveDavAccountIDs(ids ...int) *UserUpdate
RemoveDavAccountIDs removes the "dav_accounts" edge to DavAccount entities by IDs.
func (*UserUpdate) RemoveDavAccounts ¶
func (uu *UserUpdate) RemoveDavAccounts(d ...*DavAccount) *UserUpdate
RemoveDavAccounts removes "dav_accounts" edges to DavAccount entities.
func (*UserUpdate) RemoveEntities ¶
func (uu *UserUpdate) RemoveEntities(e ...*Entity) *UserUpdate
RemoveEntities removes "entities" edges to Entity entities.
func (*UserUpdate) RemoveEntityIDs ¶
func (uu *UserUpdate) RemoveEntityIDs(ids ...int) *UserUpdate
RemoveEntityIDs removes the "entities" edge to Entity entities by IDs.
func (*UserUpdate) RemoveFileIDs ¶
func (uu *UserUpdate) RemoveFileIDs(ids ...int) *UserUpdate
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*UserUpdate) RemoveFiles ¶
func (uu *UserUpdate) RemoveFiles(f ...*File) *UserUpdate
RemoveFiles removes "files" edges to File entities.
func (*UserUpdate) RemoveFseventIDs ¶
func (uu *UserUpdate) RemoveFseventIDs(ids ...int) *UserUpdate
RemoveFseventIDs removes the "fsevents" edge to FsEvent entities by IDs.
func (*UserUpdate) RemoveFsevents ¶
func (uu *UserUpdate) RemoveFsevents(f ...*FsEvent) *UserUpdate
RemoveFsevents removes "fsevents" edges to FsEvent entities.
func (*UserUpdate) RemoveOauthGrantIDs ¶
func (uu *UserUpdate) RemoveOauthGrantIDs(ids ...int) *UserUpdate
RemoveOauthGrantIDs removes the "oauth_grants" edge to OAuthGrant entities by IDs.
func (*UserUpdate) RemoveOauthGrants ¶
func (uu *UserUpdate) RemoveOauthGrants(o ...*OAuthGrant) *UserUpdate
RemoveOauthGrants removes "oauth_grants" edges to OAuthGrant entities.
func (*UserUpdate) RemovePasskey ¶
func (uu *UserUpdate) RemovePasskey(p ...*Passkey) *UserUpdate
RemovePasskey removes "passkey" edges to Passkey entities.
func (*UserUpdate) RemovePasskeyIDs ¶
func (uu *UserUpdate) RemovePasskeyIDs(ids ...int) *UserUpdate
RemovePasskeyIDs removes the "passkey" edge to Passkey entities by IDs.
func (*UserUpdate) RemoveShareIDs ¶
func (uu *UserUpdate) RemoveShareIDs(ids ...int) *UserUpdate
RemoveShareIDs removes the "shares" edge to Share entities by IDs.
func (*UserUpdate) RemoveShares ¶
func (uu *UserUpdate) RemoveShares(s ...*Share) *UserUpdate
RemoveShares removes "shares" edges to Share entities.
func (*UserUpdate) RemoveTaskIDs ¶
func (uu *UserUpdate) RemoveTaskIDs(ids ...int) *UserUpdate
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*UserUpdate) RemoveTasks ¶
func (uu *UserUpdate) RemoveTasks(t ...*Task) *UserUpdate
RemoveTasks removes "tasks" edges to Task entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAvatar ¶
func (uu *UserUpdate) SetAvatar(s string) *UserUpdate
SetAvatar sets the "avatar" field.
func (*UserUpdate) SetDeletedAt ¶
func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetGroup ¶
func (uu *UserUpdate) SetGroup(g *Group) *UserUpdate
SetGroup sets the "group" edge to the Group entity.
func (*UserUpdate) SetGroupID ¶
func (uu *UserUpdate) SetGroupID(id int) *UserUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*UserUpdate) SetGroupUsers ¶
func (uu *UserUpdate) SetGroupUsers(i int) *UserUpdate
SetGroupUsers sets the "group_users" field.
func (*UserUpdate) SetNick ¶
func (uu *UserUpdate) SetNick(s string) *UserUpdate
SetNick sets the "nick" field.
func (*UserUpdate) SetNillableAvatar ¶
func (uu *UserUpdate) SetNillableAvatar(s *string) *UserUpdate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserUpdate) SetNillableDeletedAt ¶
func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableGroupUsers ¶
func (uu *UserUpdate) SetNillableGroupUsers(i *int) *UserUpdate
SetNillableGroupUsers sets the "group_users" field if the given value is not nil.
func (*UserUpdate) SetNillableNick ¶
func (uu *UserUpdate) SetNillableNick(s *string) *UserUpdate
SetNillableNick sets the "nick" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillableStatus ¶
func (uu *UserUpdate) SetNillableStatus(u *user.Status) *UserUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserUpdate) SetNillableStorage ¶
func (uu *UserUpdate) SetNillableStorage(i *int64) *UserUpdate
SetNillableStorage sets the "storage" field if the given value is not nil.
func (*UserUpdate) SetNillableTwoFactorSecret ¶
func (uu *UserUpdate) SetNillableTwoFactorSecret(s *string) *UserUpdate
SetNillableTwoFactorSecret sets the "two_factor_secret" 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) SetSettings ¶
func (uu *UserUpdate) SetSettings(ts *types.UserSetting) *UserUpdate
SetSettings sets the "settings" field.
func (*UserUpdate) SetStatus ¶
func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
SetStatus sets the "status" field.
func (*UserUpdate) SetStorage ¶
func (uu *UserUpdate) SetStorage(i int64) *UserUpdate
SetStorage sets the "storage" field.
func (*UserUpdate) SetTwoFactorSecret ¶
func (uu *UserUpdate) SetTwoFactorSecret(s string) *UserUpdate
SetTwoFactorSecret sets the "two_factor_secret" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddDavAccountIDs ¶
func (uuo *UserUpdateOne) AddDavAccountIDs(ids ...int) *UserUpdateOne
AddDavAccountIDs adds the "dav_accounts" edge to the DavAccount entity by IDs.
func (*UserUpdateOne) AddDavAccounts ¶
func (uuo *UserUpdateOne) AddDavAccounts(d ...*DavAccount) *UserUpdateOne
AddDavAccounts adds the "dav_accounts" edges to the DavAccount entity.
func (*UserUpdateOne) AddEntities ¶
func (uuo *UserUpdateOne) AddEntities(e ...*Entity) *UserUpdateOne
AddEntities adds the "entities" edges to the Entity entity.
func (*UserUpdateOne) AddEntityIDs ¶
func (uuo *UserUpdateOne) AddEntityIDs(ids ...int) *UserUpdateOne
AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
func (*UserUpdateOne) AddFileIDs ¶
func (uuo *UserUpdateOne) AddFileIDs(ids ...int) *UserUpdateOne
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*UserUpdateOne) AddFiles ¶
func (uuo *UserUpdateOne) AddFiles(f ...*File) *UserUpdateOne
AddFiles adds the "files" edges to the File entity.
func (*UserUpdateOne) AddFseventIDs ¶
func (uuo *UserUpdateOne) AddFseventIDs(ids ...int) *UserUpdateOne
AddFseventIDs adds the "fsevents" edge to the FsEvent entity by IDs.
func (*UserUpdateOne) AddFsevents ¶
func (uuo *UserUpdateOne) AddFsevents(f ...*FsEvent) *UserUpdateOne
AddFsevents adds the "fsevents" edges to the FsEvent entity.
func (*UserUpdateOne) AddOauthGrantIDs ¶
func (uuo *UserUpdateOne) AddOauthGrantIDs(ids ...int) *UserUpdateOne
AddOauthGrantIDs adds the "oauth_grants" edge to the OAuthGrant entity by IDs.
func (*UserUpdateOne) AddOauthGrants ¶
func (uuo *UserUpdateOne) AddOauthGrants(o ...*OAuthGrant) *UserUpdateOne
AddOauthGrants adds the "oauth_grants" edges to the OAuthGrant entity.
func (*UserUpdateOne) AddPasskey ¶
func (uuo *UserUpdateOne) AddPasskey(p ...*Passkey) *UserUpdateOne
AddPasskey adds the "passkey" edges to the Passkey entity.
func (*UserUpdateOne) AddPasskeyIDs ¶
func (uuo *UserUpdateOne) AddPasskeyIDs(ids ...int) *UserUpdateOne
AddPasskeyIDs adds the "passkey" edge to the Passkey entity by IDs.
func (*UserUpdateOne) AddShareIDs ¶
func (uuo *UserUpdateOne) AddShareIDs(ids ...int) *UserUpdateOne
AddShareIDs adds the "shares" edge to the Share entity by IDs.
func (*UserUpdateOne) AddShares ¶
func (uuo *UserUpdateOne) AddShares(s ...*Share) *UserUpdateOne
AddShares adds the "shares" edges to the Share entity.
func (*UserUpdateOne) AddStorage ¶
func (uuo *UserUpdateOne) AddStorage(i int64) *UserUpdateOne
AddStorage adds i to the "storage" field.
func (*UserUpdateOne) AddTaskIDs ¶
func (uuo *UserUpdateOne) AddTaskIDs(ids ...int) *UserUpdateOne
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*UserUpdateOne) AddTasks ¶
func (uuo *UserUpdateOne) AddTasks(t ...*Task) *UserUpdateOne
AddTasks adds the "tasks" edges to the Task entity.
func (*UserUpdateOne) ClearAvatar ¶
func (uuo *UserUpdateOne) ClearAvatar() *UserUpdateOne
ClearAvatar clears the value of the "avatar" field.
func (*UserUpdateOne) ClearDavAccounts ¶
func (uuo *UserUpdateOne) ClearDavAccounts() *UserUpdateOne
ClearDavAccounts clears all "dav_accounts" edges to the DavAccount entity.
func (*UserUpdateOne) ClearDeletedAt ¶
func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdateOne) ClearEntities ¶
func (uuo *UserUpdateOne) ClearEntities() *UserUpdateOne
ClearEntities clears all "entities" edges to the Entity entity.
func (*UserUpdateOne) ClearFiles ¶
func (uuo *UserUpdateOne) ClearFiles() *UserUpdateOne
ClearFiles clears all "files" edges to the File entity.
func (*UserUpdateOne) ClearFsevents ¶
func (uuo *UserUpdateOne) ClearFsevents() *UserUpdateOne
ClearFsevents clears all "fsevents" edges to the FsEvent entity.
func (*UserUpdateOne) ClearGroup ¶
func (uuo *UserUpdateOne) ClearGroup() *UserUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*UserUpdateOne) ClearOauthGrants ¶
func (uuo *UserUpdateOne) ClearOauthGrants() *UserUpdateOne
ClearOauthGrants clears all "oauth_grants" edges to the OAuthGrant entity.
func (*UserUpdateOne) ClearPasskey ¶
func (uuo *UserUpdateOne) ClearPasskey() *UserUpdateOne
ClearPasskey clears all "passkey" edges to the Passkey entity.
func (*UserUpdateOne) ClearPassword ¶
func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
ClearPassword clears the value of the "password" field.
func (*UserUpdateOne) ClearSettings ¶
func (uuo *UserUpdateOne) ClearSettings() *UserUpdateOne
ClearSettings clears the value of the "settings" field.
func (*UserUpdateOne) ClearShares ¶
func (uuo *UserUpdateOne) ClearShares() *UserUpdateOne
ClearShares clears all "shares" edges to the Share entity.
func (*UserUpdateOne) ClearTasks ¶
func (uuo *UserUpdateOne) ClearTasks() *UserUpdateOne
ClearTasks clears all "tasks" edges to the Task entity.
func (*UserUpdateOne) ClearTwoFactorSecret ¶
func (uuo *UserUpdateOne) ClearTwoFactorSecret() *UserUpdateOne
ClearTwoFactorSecret clears the value of the "two_factor_secret" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecContext ¶
func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) QueryContext ¶
func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdateOne) RemoveDavAccountIDs ¶
func (uuo *UserUpdateOne) RemoveDavAccountIDs(ids ...int) *UserUpdateOne
RemoveDavAccountIDs removes the "dav_accounts" edge to DavAccount entities by IDs.
func (*UserUpdateOne) RemoveDavAccounts ¶
func (uuo *UserUpdateOne) RemoveDavAccounts(d ...*DavAccount) *UserUpdateOne
RemoveDavAccounts removes "dav_accounts" edges to DavAccount entities.
func (*UserUpdateOne) RemoveEntities ¶
func (uuo *UserUpdateOne) RemoveEntities(e ...*Entity) *UserUpdateOne
RemoveEntities removes "entities" edges to Entity entities.
func (*UserUpdateOne) RemoveEntityIDs ¶
func (uuo *UserUpdateOne) RemoveEntityIDs(ids ...int) *UserUpdateOne
RemoveEntityIDs removes the "entities" edge to Entity entities by IDs.
func (*UserUpdateOne) RemoveFileIDs ¶
func (uuo *UserUpdateOne) RemoveFileIDs(ids ...int) *UserUpdateOne
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*UserUpdateOne) RemoveFiles ¶
func (uuo *UserUpdateOne) RemoveFiles(f ...*File) *UserUpdateOne
RemoveFiles removes "files" edges to File entities.
func (*UserUpdateOne) RemoveFseventIDs ¶
func (uuo *UserUpdateOne) RemoveFseventIDs(ids ...int) *UserUpdateOne
RemoveFseventIDs removes the "fsevents" edge to FsEvent entities by IDs.
func (*UserUpdateOne) RemoveFsevents ¶
func (uuo *UserUpdateOne) RemoveFsevents(f ...*FsEvent) *UserUpdateOne
RemoveFsevents removes "fsevents" edges to FsEvent entities.
func (*UserUpdateOne) RemoveOauthGrantIDs ¶
func (uuo *UserUpdateOne) RemoveOauthGrantIDs(ids ...int) *UserUpdateOne
RemoveOauthGrantIDs removes the "oauth_grants" edge to OAuthGrant entities by IDs.
func (*UserUpdateOne) RemoveOauthGrants ¶
func (uuo *UserUpdateOne) RemoveOauthGrants(o ...*OAuthGrant) *UserUpdateOne
RemoveOauthGrants removes "oauth_grants" edges to OAuthGrant entities.
func (*UserUpdateOne) RemovePasskey ¶
func (uuo *UserUpdateOne) RemovePasskey(p ...*Passkey) *UserUpdateOne
RemovePasskey removes "passkey" edges to Passkey entities.
func (*UserUpdateOne) RemovePasskeyIDs ¶
func (uuo *UserUpdateOne) RemovePasskeyIDs(ids ...int) *UserUpdateOne
RemovePasskeyIDs removes the "passkey" edge to Passkey entities by IDs.
func (*UserUpdateOne) RemoveShareIDs ¶
func (uuo *UserUpdateOne) RemoveShareIDs(ids ...int) *UserUpdateOne
RemoveShareIDs removes the "shares" edge to Share entities by IDs.
func (*UserUpdateOne) RemoveShares ¶
func (uuo *UserUpdateOne) RemoveShares(s ...*Share) *UserUpdateOne
RemoveShares removes "shares" edges to Share entities.
func (*UserUpdateOne) RemoveTaskIDs ¶
func (uuo *UserUpdateOne) RemoveTaskIDs(ids ...int) *UserUpdateOne
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*UserUpdateOne) RemoveTasks ¶
func (uuo *UserUpdateOne) RemoveTasks(t ...*Task) *UserUpdateOne
RemoveTasks removes "tasks" edges to Task entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAvatar ¶
func (uuo *UserUpdateOne) SetAvatar(s string) *UserUpdateOne
SetAvatar sets the "avatar" field.
func (*UserUpdateOne) SetDeletedAt ¶
func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetGroup ¶
func (uuo *UserUpdateOne) SetGroup(g *Group) *UserUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*UserUpdateOne) SetGroupID ¶
func (uuo *UserUpdateOne) SetGroupID(id int) *UserUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*UserUpdateOne) SetGroupUsers ¶
func (uuo *UserUpdateOne) SetGroupUsers(i int) *UserUpdateOne
SetGroupUsers sets the "group_users" field.
func (*UserUpdateOne) SetNick ¶
func (uuo *UserUpdateOne) SetNick(s string) *UserUpdateOne
SetNick sets the "nick" field.
func (*UserUpdateOne) SetNillableAvatar ¶
func (uuo *UserUpdateOne) SetNillableAvatar(s *string) *UserUpdateOne
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDeletedAt ¶
func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableGroupUsers ¶
func (uuo *UserUpdateOne) SetNillableGroupUsers(i *int) *UserUpdateOne
SetNillableGroupUsers sets the "group_users" field if the given value is not nil.
func (*UserUpdateOne) SetNillableNick ¶
func (uuo *UserUpdateOne) SetNillableNick(s *string) *UserUpdateOne
SetNillableNick sets the "nick" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillableStatus ¶
func (uuo *UserUpdateOne) SetNillableStatus(u *user.Status) *UserUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserUpdateOne) SetNillableStorage ¶
func (uuo *UserUpdateOne) SetNillableStorage(i *int64) *UserUpdateOne
SetNillableStorage sets the "storage" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTwoFactorSecret ¶
func (uuo *UserUpdateOne) SetNillableTwoFactorSecret(s *string) *UserUpdateOne
SetNillableTwoFactorSecret sets the "two_factor_secret" 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) SetSettings ¶
func (uuo *UserUpdateOne) SetSettings(ts *types.UserSetting) *UserUpdateOne
SetSettings sets the "settings" field.
func (*UserUpdateOne) SetStatus ¶
func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
SetStatus sets the "status" field.
func (*UserUpdateOne) SetStorage ¶
func (uuo *UserUpdateOne) SetStorage(i int64) *UserUpdateOne
SetStorage sets the "storage" field.
func (*UserUpdateOne) SetTwoFactorSecret ¶
func (uuo *UserUpdateOne) SetTwoFactorSecret(s string) *UserUpdateOne
SetTwoFactorSecret sets the "two_factor_secret" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) AddStorage ¶
func (u *UserUpsert) AddStorage(v int64) *UserUpsert
AddStorage adds v to the "storage" field.
func (*UserUpsert) ClearAvatar ¶
func (u *UserUpsert) ClearAvatar() *UserUpsert
ClearAvatar clears the value of the "avatar" field.
func (*UserUpsert) ClearDeletedAt ¶
func (u *UserUpsert) ClearDeletedAt() *UserUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpsert) ClearPassword ¶
func (u *UserUpsert) ClearPassword() *UserUpsert
ClearPassword clears the value of the "password" field.
func (*UserUpsert) ClearSettings ¶
func (u *UserUpsert) ClearSettings() *UserUpsert
ClearSettings clears the value of the "settings" field.
func (*UserUpsert) ClearTwoFactorSecret ¶
func (u *UserUpsert) ClearTwoFactorSecret() *UserUpsert
ClearTwoFactorSecret clears the value of the "two_factor_secret" field.
func (*UserUpsert) SetAvatar ¶
func (u *UserUpsert) SetAvatar(v string) *UserUpsert
SetAvatar sets the "avatar" field.
func (*UserUpsert) SetDeletedAt ¶
func (u *UserUpsert) SetDeletedAt(v time.Time) *UserUpsert
SetDeletedAt sets the "deleted_at" field.
func (*UserUpsert) SetEmail ¶
func (u *UserUpsert) SetEmail(v string) *UserUpsert
SetEmail sets the "email" field.
func (*UserUpsert) SetGroupUsers ¶
func (u *UserUpsert) SetGroupUsers(v int) *UserUpsert
SetGroupUsers sets the "group_users" field.
func (*UserUpsert) SetNick ¶
func (u *UserUpsert) SetNick(v string) *UserUpsert
SetNick sets the "nick" field.
func (*UserUpsert) SetPassword ¶
func (u *UserUpsert) SetPassword(v string) *UserUpsert
SetPassword sets the "password" field.
func (*UserUpsert) SetSettings ¶
func (u *UserUpsert) SetSettings(v *types.UserSetting) *UserUpsert
SetSettings sets the "settings" field.
func (*UserUpsert) SetStatus ¶
func (u *UserUpsert) SetStatus(v user.Status) *UserUpsert
SetStatus sets the "status" field.
func (*UserUpsert) SetStorage ¶
func (u *UserUpsert) SetStorage(v int64) *UserUpsert
SetStorage sets the "storage" field.
func (*UserUpsert) SetTwoFactorSecret ¶
func (u *UserUpsert) SetTwoFactorSecret(v string) *UserUpsert
SetTwoFactorSecret sets the "two_factor_secret" field.
func (*UserUpsert) SetUpdatedAt ¶
func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsert) UpdateAvatar ¶
func (u *UserUpsert) UpdateAvatar() *UserUpsert
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*UserUpsert) UpdateDeletedAt ¶
func (u *UserUpsert) UpdateDeletedAt() *UserUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*UserUpsert) UpdateEmail ¶
func (u *UserUpsert) UpdateEmail() *UserUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsert) UpdateGroupUsers ¶
func (u *UserUpsert) UpdateGroupUsers() *UserUpsert
UpdateGroupUsers sets the "group_users" field to the value that was provided on create.
func (*UserUpsert) UpdateNick ¶
func (u *UserUpsert) UpdateNick() *UserUpsert
UpdateNick sets the "nick" field to the value that was provided on create.
func (*UserUpsert) UpdatePassword ¶
func (u *UserUpsert) UpdatePassword() *UserUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsert) UpdateSettings ¶
func (u *UserUpsert) UpdateSettings() *UserUpsert
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*UserUpsert) UpdateStatus ¶
func (u *UserUpsert) UpdateStatus() *UserUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*UserUpsert) UpdateStorage ¶
func (u *UserUpsert) UpdateStorage() *UserUpsert
UpdateStorage sets the "storage" field to the value that was provided on create.
func (*UserUpsert) UpdateTwoFactorSecret ¶
func (u *UserUpsert) UpdateTwoFactorSecret() *UserUpsert
UpdateTwoFactorSecret sets the "two_factor_secret" field to the value that was provided on create.
func (*UserUpsert) UpdateUpdatedAt ¶
func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) AddStorage ¶
func (u *UserUpsertBulk) AddStorage(v int64) *UserUpsertBulk
AddStorage adds v to the "storage" field.
func (*UserUpsertBulk) ClearAvatar ¶
func (u *UserUpsertBulk) ClearAvatar() *UserUpsertBulk
ClearAvatar clears the value of the "avatar" field.
func (*UserUpsertBulk) ClearDeletedAt ¶
func (u *UserUpsertBulk) ClearDeletedAt() *UserUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpsertBulk) ClearPassword ¶
func (u *UserUpsertBulk) ClearPassword() *UserUpsertBulk
ClearPassword clears the value of the "password" field.
func (*UserUpsertBulk) ClearSettings ¶
func (u *UserUpsertBulk) ClearSettings() *UserUpsertBulk
ClearSettings clears the value of the "settings" field.
func (*UserUpsertBulk) ClearTwoFactorSecret ¶
func (u *UserUpsertBulk) ClearTwoFactorSecret() *UserUpsertBulk
ClearTwoFactorSecret clears the value of the "two_factor_secret" field.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetAvatar ¶
func (u *UserUpsertBulk) SetAvatar(v string) *UserUpsertBulk
SetAvatar sets the "avatar" field.
func (*UserUpsertBulk) SetDeletedAt ¶
func (u *UserUpsertBulk) SetDeletedAt(v time.Time) *UserUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*UserUpsertBulk) SetEmail ¶
func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
SetEmail sets the "email" field.
func (*UserUpsertBulk) SetGroupUsers ¶
func (u *UserUpsertBulk) SetGroupUsers(v int) *UserUpsertBulk
SetGroupUsers sets the "group_users" field.
func (*UserUpsertBulk) SetNick ¶
func (u *UserUpsertBulk) SetNick(v string) *UserUpsertBulk
SetNick sets the "nick" field.
func (*UserUpsertBulk) SetPassword ¶
func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
SetPassword sets the "password" field.
func (*UserUpsertBulk) SetSettings ¶
func (u *UserUpsertBulk) SetSettings(v *types.UserSetting) *UserUpsertBulk
SetSettings sets the "settings" field.
func (*UserUpsertBulk) SetStatus ¶
func (u *UserUpsertBulk) SetStatus(v user.Status) *UserUpsertBulk
SetStatus sets the "status" field.
func (*UserUpsertBulk) SetStorage ¶
func (u *UserUpsertBulk) SetStorage(v int64) *UserUpsertBulk
SetStorage sets the "storage" field.
func (*UserUpsertBulk) SetTwoFactorSecret ¶
func (u *UserUpsertBulk) SetTwoFactorSecret(v string) *UserUpsertBulk
SetTwoFactorSecret sets the "two_factor_secret" field.
func (*UserUpsertBulk) SetUpdatedAt ¶
func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateAvatar ¶
func (u *UserUpsertBulk) UpdateAvatar() *UserUpsertBulk
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateDeletedAt ¶
func (u *UserUpsertBulk) UpdateDeletedAt() *UserUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateEmail ¶
func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateGroupUsers ¶
func (u *UserUpsertBulk) UpdateGroupUsers() *UserUpsertBulk
UpdateGroupUsers sets the "group_users" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertBulk) UpdateNick ¶
func (u *UserUpsertBulk) UpdateNick() *UserUpsertBulk
UpdateNick sets the "nick" field to the value that was provided on create.
func (*UserUpsertBulk) UpdatePassword ¶
func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateSettings ¶
func (u *UserUpsertBulk) UpdateSettings() *UserUpsertBulk
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateStatus ¶
func (u *UserUpsertBulk) UpdateStatus() *UserUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateStorage ¶
func (u *UserUpsertBulk) UpdateStorage() *UserUpsertBulk
UpdateStorage sets the "storage" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateTwoFactorSecret ¶
func (u *UserUpsertBulk) UpdateTwoFactorSecret() *UserUpsertBulk
UpdateTwoFactorSecret sets the "two_factor_secret" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUpdatedAt ¶
func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) AddStorage ¶
func (u *UserUpsertOne) AddStorage(v int64) *UserUpsertOne
AddStorage adds v to the "storage" field.
func (*UserUpsertOne) ClearAvatar ¶
func (u *UserUpsertOne) ClearAvatar() *UserUpsertOne
ClearAvatar clears the value of the "avatar" field.
func (*UserUpsertOne) ClearDeletedAt ¶
func (u *UserUpsertOne) ClearDeletedAt() *UserUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpsertOne) ClearPassword ¶
func (u *UserUpsertOne) ClearPassword() *UserUpsertOne
ClearPassword clears the value of the "password" field.
func (*UserUpsertOne) ClearSettings ¶
func (u *UserUpsertOne) ClearSettings() *UserUpsertOne
ClearSettings clears the value of the "settings" field.
func (*UserUpsertOne) ClearTwoFactorSecret ¶
func (u *UserUpsertOne) ClearTwoFactorSecret() *UserUpsertOne
ClearTwoFactorSecret clears the value of the "two_factor_secret" field.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶
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 ¶
func (u *UserUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*UserUpsertOne) SetAvatar ¶
func (u *UserUpsertOne) SetAvatar(v string) *UserUpsertOne
SetAvatar sets the "avatar" field.
func (*UserUpsertOne) SetDeletedAt ¶
func (u *UserUpsertOne) SetDeletedAt(v time.Time) *UserUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpsertOne) SetEmail ¶
func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
SetEmail sets the "email" field.
func (*UserUpsertOne) SetGroupUsers ¶
func (u *UserUpsertOne) SetGroupUsers(v int) *UserUpsertOne
SetGroupUsers sets the "group_users" field.
func (*UserUpsertOne) SetNick ¶
func (u *UserUpsertOne) SetNick(v string) *UserUpsertOne
SetNick sets the "nick" field.
func (*UserUpsertOne) SetPassword ¶
func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
SetPassword sets the "password" field.
func (*UserUpsertOne) SetSettings ¶
func (u *UserUpsertOne) SetSettings(v *types.UserSetting) *UserUpsertOne
SetSettings sets the "settings" field.
func (*UserUpsertOne) SetStatus ¶
func (u *UserUpsertOne) SetStatus(v user.Status) *UserUpsertOne
SetStatus sets the "status" field.
func (*UserUpsertOne) SetStorage ¶
func (u *UserUpsertOne) SetStorage(v int64) *UserUpsertOne
SetStorage sets the "storage" field.
func (*UserUpsertOne) SetTwoFactorSecret ¶
func (u *UserUpsertOne) SetTwoFactorSecret(v string) *UserUpsertOne
SetTwoFactorSecret sets the "two_factor_secret" field.
func (*UserUpsertOne) SetUpdatedAt ¶
func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateAvatar ¶
func (u *UserUpsertOne) UpdateAvatar() *UserUpsertOne
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*UserUpsertOne) UpdateDeletedAt ¶
func (u *UserUpsertOne) UpdateDeletedAt() *UserUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateEmail ¶
func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertOne) UpdateGroupUsers ¶
func (u *UserUpsertOne) UpdateGroupUsers() *UserUpsertOne
UpdateGroupUsers sets the "group_users" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertOne) UpdateNick ¶
func (u *UserUpsertOne) UpdateNick() *UserUpsertOne
UpdateNick sets the "nick" field to the value that was provided on create.
func (*UserUpsertOne) UpdatePassword ¶
func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertOne) UpdateSettings ¶
func (u *UserUpsertOne) UpdateSettings() *UserUpsertOne
UpdateSettings sets the "settings" field to the value that was provided on create.
func (*UserUpsertOne) UpdateStatus ¶
func (u *UserUpsertOne) UpdateStatus() *UserUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*UserUpsertOne) UpdateStorage ¶
func (u *UserUpsertOne) UpdateStorage() *UserUpsertOne
UpdateStorage sets the "storage" field to the value that was provided on create.
func (*UserUpsertOne) UpdateTwoFactorSecret ¶
func (u *UserUpsertOne) UpdateTwoFactorSecret() *UserUpsertOne
UpdateTwoFactorSecret sets the "two_factor_secret" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUpdatedAt ¶
func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- davaccount.go
- davaccount_create.go
- davaccount_delete.go
- davaccount_query.go
- davaccount_update.go
- directlink.go
- directlink_create.go
- directlink_delete.go
- directlink_query.go
- directlink_update.go
- ent.go
- entity.go
- entity_create.go
- entity_delete.go
- entity_query.go
- entity_update.go
- file.go
- file_create.go
- file_delete.go
- file_query.go
- file_update.go
- fsevent.go
- fsevent_create.go
- fsevent_delete.go
- fsevent_query.go
- fsevent_update.go
- generate.go
- group.go
- group_create.go
- group_delete.go
- group_query.go
- group_update.go
- metadata.go
- metadata_create.go
- metadata_delete.go
- metadata_query.go
- metadata_update.go
- mutation.go
- mutationhelper.go
- node.go
- node_create.go
- node_delete.go
- node_query.go
- node_update.go
- oauthclient.go
- oauthclient_create.go
- oauthclient_delete.go
- oauthclient_query.go
- oauthclient_update.go
- oauthgrant.go
- oauthgrant_create.go
- oauthgrant_delete.go
- oauthgrant_query.go
- oauthgrant_update.go
- passkey.go
- passkey_create.go
- passkey_delete.go
- passkey_query.go
- passkey_update.go
- runtime.go
- setting.go
- setting_create.go
- setting_delete.go
- setting_query.go
- setting_update.go
- share.go
- share_create.go
- share_delete.go
- share_query.go
- share_update.go
- storagepolicy.go
- storagepolicy_create.go
- storagepolicy_delete.go
- storagepolicy_query.go
- storagepolicy_update.go
- task.go
- task_create.go
- task_delete.go
- task_query.go
- task_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go