Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type Interaction
- type InteractionClient
- func (c *InteractionClient) Create() *InteractionCreate
- func (c *InteractionClient) CreateBulk(builders ...*InteractionCreate) *InteractionCreateBulk
- func (c *InteractionClient) Delete() *InteractionDelete
- func (c *InteractionClient) DeleteOne(i *Interaction) *InteractionDeleteOne
- func (c *InteractionClient) DeleteOneID(id int) *InteractionDeleteOne
- func (c *InteractionClient) Get(ctx context.Context, id int) (*Interaction, error)
- func (c *InteractionClient) GetX(ctx context.Context, id int) *Interaction
- func (c *InteractionClient) Hooks() []Hook
- func (c *InteractionClient) Query() *InteractionQuery
- func (c *InteractionClient) QuerySqueak(i *Interaction) *SqueakQuery
- func (c *InteractionClient) QueryUser(i *Interaction) *UserQuery
- func (c *InteractionClient) Update() *InteractionUpdate
- func (c *InteractionClient) UpdateOne(i *Interaction) *InteractionUpdateOne
- func (c *InteractionClient) UpdateOneID(id int) *InteractionUpdateOne
- func (c *InteractionClient) Use(hooks ...Hook)
- type InteractionCreate
- func (ic *InteractionCreate) Exec(ctx context.Context) error
- func (ic *InteractionCreate) ExecX(ctx context.Context)
- func (ic *InteractionCreate) Mutation() *InteractionMutation
- func (ic *InteractionCreate) Save(ctx context.Context) (*Interaction, error)
- func (ic *InteractionCreate) SaveX(ctx context.Context) *Interaction
- func (ic *InteractionCreate) SetCreateTime(t time.Time) *InteractionCreate
- func (ic *InteractionCreate) SetNillableCreateTime(t *time.Time) *InteractionCreate
- func (ic *InteractionCreate) SetNillableSqueakID(id *int) *InteractionCreate
- func (ic *InteractionCreate) SetNillableUserID(id *int) *InteractionCreate
- func (ic *InteractionCreate) SetSqueak(s *Squeak) *InteractionCreate
- func (ic *InteractionCreate) SetSqueakID(id int) *InteractionCreate
- func (ic *InteractionCreate) SetType(e enums.Interaction) *InteractionCreate
- func (ic *InteractionCreate) SetUser(u *User) *InteractionCreate
- func (ic *InteractionCreate) SetUserID(id int) *InteractionCreate
- type InteractionCreateBulk
- type InteractionDelete
- type InteractionDeleteOne
- type InteractionEdges
- type InteractionGroupBy
- func (igb *InteractionGroupBy) Aggregate(fns ...AggregateFunc) *InteractionGroupBy
- func (s *InteractionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InteractionGroupBy) BoolX(ctx context.Context) bool
- func (s *InteractionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InteractionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InteractionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InteractionGroupBy) Float64X(ctx context.Context) float64
- func (s *InteractionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InteractionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InteractionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InteractionGroupBy) IntX(ctx context.Context) int
- func (s *InteractionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InteractionGroupBy) IntsX(ctx context.Context) []int
- func (igb *InteractionGroupBy) Scan(ctx context.Context, v any) error
- func (s *InteractionGroupBy) ScanX(ctx context.Context, v any)
- func (s *InteractionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InteractionGroupBy) StringX(ctx context.Context) string
- func (s *InteractionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InteractionGroupBy) StringsX(ctx context.Context) []string
- type InteractionMutation
- func (m *InteractionMutation) AddField(name string, value ent.Value) error
- func (m *InteractionMutation) AddedEdges() []string
- func (m *InteractionMutation) AddedField(name string) (ent.Value, bool)
- func (m *InteractionMutation) AddedFields() []string
- func (m *InteractionMutation) AddedIDs(name string) []ent.Value
- func (m *InteractionMutation) ClearEdge(name string) error
- func (m *InteractionMutation) ClearField(name string) error
- func (m *InteractionMutation) ClearSqueak()
- func (m *InteractionMutation) ClearUser()
- func (m *InteractionMutation) ClearedEdges() []string
- func (m *InteractionMutation) ClearedFields() []string
- func (m InteractionMutation) Client() *Client
- func (m *InteractionMutation) CreateTime() (r time.Time, exists bool)
- func (m *InteractionMutation) EdgeCleared(name string) bool
- func (m *InteractionMutation) Field(name string) (ent.Value, bool)
- func (m *InteractionMutation) FieldCleared(name string) bool
- func (m *InteractionMutation) Fields() []string
- func (m *InteractionMutation) GetType() (r enums.Interaction, exists bool)
- func (m *InteractionMutation) ID() (id int, exists bool)
- func (m *InteractionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *InteractionMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *InteractionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InteractionMutation) OldType(ctx context.Context) (v enums.Interaction, err error)
- func (m *InteractionMutation) Op() Op
- func (m *InteractionMutation) RemovedEdges() []string
- func (m *InteractionMutation) RemovedIDs(name string) []ent.Value
- func (m *InteractionMutation) ResetCreateTime()
- func (m *InteractionMutation) ResetEdge(name string) error
- func (m *InteractionMutation) ResetField(name string) error
- func (m *InteractionMutation) ResetSqueak()
- func (m *InteractionMutation) ResetType()
- func (m *InteractionMutation) ResetUser()
- func (m *InteractionMutation) SetCreateTime(t time.Time)
- func (m *InteractionMutation) SetField(name string, value ent.Value) error
- func (m *InteractionMutation) SetSqueakID(id int)
- func (m *InteractionMutation) SetType(e enums.Interaction)
- func (m *InteractionMutation) SetUserID(id int)
- func (m *InteractionMutation) SqueakCleared() bool
- func (m *InteractionMutation) SqueakID() (id int, exists bool)
- func (m *InteractionMutation) SqueakIDs() (ids []int)
- func (m InteractionMutation) Tx() (*Tx, error)
- func (m *InteractionMutation) Type() string
- func (m *InteractionMutation) UserCleared() bool
- func (m *InteractionMutation) UserID() (id int, exists bool)
- func (m *InteractionMutation) UserIDs() (ids []int)
- func (m *InteractionMutation) Where(ps ...predicate.Interaction)
- type InteractionQuery
- func (iq *InteractionQuery) Aggregate(fns ...AggregateFunc) *InteractionSelect
- func (iq *InteractionQuery) All(ctx context.Context) ([]*Interaction, error)
- func (iq *InteractionQuery) AllX(ctx context.Context) []*Interaction
- func (iq *InteractionQuery) Clone() *InteractionQuery
- func (iq *InteractionQuery) Count(ctx context.Context) (int, error)
- func (iq *InteractionQuery) CountX(ctx context.Context) int
- func (iq *InteractionQuery) Exist(ctx context.Context) (bool, error)
- func (iq *InteractionQuery) ExistX(ctx context.Context) bool
- func (iq *InteractionQuery) First(ctx context.Context) (*Interaction, error)
- func (iq *InteractionQuery) FirstID(ctx context.Context) (id int, err error)
- func (iq *InteractionQuery) FirstIDX(ctx context.Context) int
- func (iq *InteractionQuery) FirstX(ctx context.Context) *Interaction
- func (iq *InteractionQuery) GroupBy(field string, fields ...string) *InteractionGroupBy
- func (iq *InteractionQuery) IDs(ctx context.Context) ([]int, error)
- func (iq *InteractionQuery) IDsX(ctx context.Context) []int
- func (iq *InteractionQuery) Limit(limit int) *InteractionQuery
- func (iq *InteractionQuery) Offset(offset int) *InteractionQuery
- func (iq *InteractionQuery) Only(ctx context.Context) (*Interaction, error)
- func (iq *InteractionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (iq *InteractionQuery) OnlyIDX(ctx context.Context) int
- func (iq *InteractionQuery) OnlyX(ctx context.Context) *Interaction
- func (iq *InteractionQuery) Order(o ...OrderFunc) *InteractionQuery
- func (iq *InteractionQuery) QuerySqueak() *SqueakQuery
- func (iq *InteractionQuery) QueryUser() *UserQuery
- func (iq *InteractionQuery) Select(fields ...string) *InteractionSelect
- func (iq *InteractionQuery) Unique(unique bool) *InteractionQuery
- func (iq *InteractionQuery) Where(ps ...predicate.Interaction) *InteractionQuery
- func (iq *InteractionQuery) WithSqueak(opts ...func(*SqueakQuery)) *InteractionQuery
- func (iq *InteractionQuery) WithUser(opts ...func(*UserQuery)) *InteractionQuery
- type InteractionSelect
- func (is *InteractionSelect) Aggregate(fns ...AggregateFunc) *InteractionSelect
- func (s *InteractionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InteractionSelect) BoolX(ctx context.Context) bool
- func (s *InteractionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InteractionSelect) BoolsX(ctx context.Context) []bool
- func (s *InteractionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InteractionSelect) Float64X(ctx context.Context) float64
- func (s *InteractionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InteractionSelect) Float64sX(ctx context.Context) []float64
- func (s *InteractionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InteractionSelect) IntX(ctx context.Context) int
- func (s *InteractionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InteractionSelect) IntsX(ctx context.Context) []int
- func (is *InteractionSelect) Scan(ctx context.Context, v any) error
- func (s *InteractionSelect) ScanX(ctx context.Context, v any)
- func (s *InteractionSelect) String(ctx context.Context) (_ string, err error)
- func (s *InteractionSelect) StringX(ctx context.Context) string
- func (s *InteractionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InteractionSelect) StringsX(ctx context.Context) []string
- type InteractionUpdate
- func (iu *InteractionUpdate) ClearSqueak() *InteractionUpdate
- func (iu *InteractionUpdate) ClearUser() *InteractionUpdate
- func (iu *InteractionUpdate) Exec(ctx context.Context) error
- func (iu *InteractionUpdate) ExecX(ctx context.Context)
- func (iu *InteractionUpdate) Mutation() *InteractionMutation
- func (iu *InteractionUpdate) Save(ctx context.Context) (int, error)
- func (iu *InteractionUpdate) SaveX(ctx context.Context) int
- func (iu *InteractionUpdate) SetNillableSqueakID(id *int) *InteractionUpdate
- func (iu *InteractionUpdate) SetNillableUserID(id *int) *InteractionUpdate
- func (iu *InteractionUpdate) SetSqueak(s *Squeak) *InteractionUpdate
- func (iu *InteractionUpdate) SetSqueakID(id int) *InteractionUpdate
- func (iu *InteractionUpdate) SetType(e enums.Interaction) *InteractionUpdate
- func (iu *InteractionUpdate) SetUser(u *User) *InteractionUpdate
- func (iu *InteractionUpdate) SetUserID(id int) *InteractionUpdate
- func (iu *InteractionUpdate) Where(ps ...predicate.Interaction) *InteractionUpdate
- type InteractionUpdateOne
- func (iuo *InteractionUpdateOne) ClearSqueak() *InteractionUpdateOne
- func (iuo *InteractionUpdateOne) ClearUser() *InteractionUpdateOne
- func (iuo *InteractionUpdateOne) Exec(ctx context.Context) error
- func (iuo *InteractionUpdateOne) ExecX(ctx context.Context)
- func (iuo *InteractionUpdateOne) Mutation() *InteractionMutation
- func (iuo *InteractionUpdateOne) Save(ctx context.Context) (*Interaction, error)
- func (iuo *InteractionUpdateOne) SaveX(ctx context.Context) *Interaction
- func (iuo *InteractionUpdateOne) Select(field string, fields ...string) *InteractionUpdateOne
- func (iuo *InteractionUpdateOne) SetNillableSqueakID(id *int) *InteractionUpdateOne
- func (iuo *InteractionUpdateOne) SetNillableUserID(id *int) *InteractionUpdateOne
- func (iuo *InteractionUpdateOne) SetSqueak(s *Squeak) *InteractionUpdateOne
- func (iuo *InteractionUpdateOne) SetSqueakID(id int) *InteractionUpdateOne
- func (iuo *InteractionUpdateOne) SetType(e enums.Interaction) *InteractionUpdateOne
- func (iuo *InteractionUpdateOne) SetUser(u *User) *InteractionUpdateOne
- func (iuo *InteractionUpdateOne) SetUserID(id int) *InteractionUpdateOne
- type Interactions
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Pool
- type PoolClient
- func (c *PoolClient) Create() *PoolCreate
- func (c *PoolClient) CreateBulk(builders ...*PoolCreate) *PoolCreateBulk
- func (c *PoolClient) Delete() *PoolDelete
- func (c *PoolClient) DeleteOne(po *Pool) *PoolDeleteOne
- func (c *PoolClient) DeleteOneID(id int) *PoolDeleteOne
- func (c *PoolClient) Get(ctx context.Context, id int) (*Pool, error)
- func (c *PoolClient) GetX(ctx context.Context, id int) *Pool
- func (c *PoolClient) Hooks() []Hook
- func (c *PoolClient) Query() *PoolQuery
- func (c *PoolClient) QueryPoolPasses(po *Pool) *PoolPassQuery
- func (c *PoolClient) QuerySqueak(po *Pool) *SqueakQuery
- func (c *PoolClient) Update() *PoolUpdate
- func (c *PoolClient) UpdateOne(po *Pool) *PoolUpdateOne
- func (c *PoolClient) UpdateOneID(id int) *PoolUpdateOne
- func (c *PoolClient) Use(hooks ...Hook)
- type PoolCreate
- func (pc *PoolCreate) AddPoolPassIDs(ids ...int) *PoolCreate
- func (pc *PoolCreate) AddPoolPasses(p ...*PoolPass) *PoolCreate
- func (pc *PoolCreate) Exec(ctx context.Context) error
- func (pc *PoolCreate) ExecX(ctx context.Context)
- func (pc *PoolCreate) Mutation() *PoolMutation
- func (pc *PoolCreate) Save(ctx context.Context) (*Pool, error)
- func (pc *PoolCreate) SaveX(ctx context.Context) *Pool
- func (pc *PoolCreate) SetAmount(t *types.Uint256) *PoolCreate
- func (pc *PoolCreate) SetBlockNumber(t *types.Uint256) *PoolCreate
- func (pc *PoolCreate) SetCreateTime(t time.Time) *PoolCreate
- func (pc *PoolCreate) SetNillableCreateTime(t *time.Time) *PoolCreate
- func (pc *PoolCreate) SetNillableSqueakID(id *int) *PoolCreate
- func (pc *PoolCreate) SetNillableUpdateTime(t *time.Time) *PoolCreate
- func (pc *PoolCreate) SetScore(i int) *PoolCreate
- func (pc *PoolCreate) SetShares(t *types.Uint256) *PoolCreate
- func (pc *PoolCreate) SetSqueak(s *Squeak) *PoolCreate
- func (pc *PoolCreate) SetSqueakID(id int) *PoolCreate
- func (pc *PoolCreate) SetUpdateTime(t time.Time) *PoolCreate
- type PoolCreateBulk
- type PoolDelete
- type PoolDeleteOne
- type PoolEdges
- type PoolGroupBy
- func (pgb *PoolGroupBy) Aggregate(fns ...AggregateFunc) *PoolGroupBy
- func (s *PoolGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PoolGroupBy) BoolX(ctx context.Context) bool
- func (s *PoolGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PoolGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PoolGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PoolGroupBy) Float64X(ctx context.Context) float64
- func (s *PoolGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PoolGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PoolGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PoolGroupBy) IntX(ctx context.Context) int
- func (s *PoolGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PoolGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PoolGroupBy) Scan(ctx context.Context, v any) error
- func (s *PoolGroupBy) ScanX(ctx context.Context, v any)
- func (s *PoolGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PoolGroupBy) StringX(ctx context.Context) string
- func (s *PoolGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PoolGroupBy) StringsX(ctx context.Context) []string
- type PoolMutation
- func (m *PoolMutation) AddField(name string, value ent.Value) error
- func (m *PoolMutation) AddPoolPassIDs(ids ...int)
- func (m *PoolMutation) AddScore(i int)
- func (m *PoolMutation) AddedEdges() []string
- func (m *PoolMutation) AddedField(name string) (ent.Value, bool)
- func (m *PoolMutation) AddedFields() []string
- func (m *PoolMutation) AddedIDs(name string) []ent.Value
- func (m *PoolMutation) AddedScore() (r int, exists bool)
- func (m *PoolMutation) Amount() (r *types.Uint256, exists bool)
- func (m *PoolMutation) BlockNumber() (r *types.Uint256, exists bool)
- func (m *PoolMutation) ClearEdge(name string) error
- func (m *PoolMutation) ClearField(name string) error
- func (m *PoolMutation) ClearPoolPasses()
- func (m *PoolMutation) ClearSqueak()
- func (m *PoolMutation) ClearedEdges() []string
- func (m *PoolMutation) ClearedFields() []string
- func (m PoolMutation) Client() *Client
- func (m *PoolMutation) CreateTime() (r time.Time, exists bool)
- func (m *PoolMutation) EdgeCleared(name string) bool
- func (m *PoolMutation) Field(name string) (ent.Value, bool)
- func (m *PoolMutation) FieldCleared(name string) bool
- func (m *PoolMutation) Fields() []string
- func (m *PoolMutation) ID() (id int, exists bool)
- func (m *PoolMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PoolMutation) OldAmount(ctx context.Context) (v *types.Uint256, err error)
- func (m *PoolMutation) OldBlockNumber(ctx context.Context) (v *types.Uint256, err error)
- func (m *PoolMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *PoolMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PoolMutation) OldScore(ctx context.Context) (v int, err error)
- func (m *PoolMutation) OldShares(ctx context.Context) (v *types.Uint256, err error)
- func (m *PoolMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *PoolMutation) Op() Op
- func (m *PoolMutation) PoolPassesCleared() bool
- func (m *PoolMutation) PoolPassesIDs() (ids []int)
- func (m *PoolMutation) RemovePoolPassIDs(ids ...int)
- func (m *PoolMutation) RemovedEdges() []string
- func (m *PoolMutation) RemovedIDs(name string) []ent.Value
- func (m *PoolMutation) RemovedPoolPassesIDs() (ids []int)
- func (m *PoolMutation) ResetAmount()
- func (m *PoolMutation) ResetBlockNumber()
- func (m *PoolMutation) ResetCreateTime()
- func (m *PoolMutation) ResetEdge(name string) error
- func (m *PoolMutation) ResetField(name string) error
- func (m *PoolMutation) ResetPoolPasses()
- func (m *PoolMutation) ResetScore()
- func (m *PoolMutation) ResetShares()
- func (m *PoolMutation) ResetSqueak()
- func (m *PoolMutation) ResetUpdateTime()
- func (m *PoolMutation) Score() (r int, exists bool)
- func (m *PoolMutation) SetAmount(t *types.Uint256)
- func (m *PoolMutation) SetBlockNumber(t *types.Uint256)
- func (m *PoolMutation) SetCreateTime(t time.Time)
- func (m *PoolMutation) SetField(name string, value ent.Value) error
- func (m *PoolMutation) SetScore(i int)
- func (m *PoolMutation) SetShares(t *types.Uint256)
- func (m *PoolMutation) SetSqueakID(id int)
- func (m *PoolMutation) SetUpdateTime(t time.Time)
- func (m *PoolMutation) Shares() (r *types.Uint256, exists bool)
- func (m *PoolMutation) SqueakCleared() bool
- func (m *PoolMutation) SqueakID() (id int, exists bool)
- func (m *PoolMutation) SqueakIDs() (ids []int)
- func (m PoolMutation) Tx() (*Tx, error)
- func (m *PoolMutation) Type() string
- func (m *PoolMutation) UpdateTime() (r time.Time, exists bool)
- func (m *PoolMutation) Where(ps ...predicate.Pool)
- type PoolPass
- type PoolPassClient
- func (c *PoolPassClient) Create() *PoolPassCreate
- func (c *PoolPassClient) CreateBulk(builders ...*PoolPassCreate) *PoolPassCreateBulk
- func (c *PoolPassClient) Delete() *PoolPassDelete
- func (c *PoolPassClient) DeleteOne(pp *PoolPass) *PoolPassDeleteOne
- func (c *PoolPassClient) DeleteOneID(id int) *PoolPassDeleteOne
- func (c *PoolPassClient) Get(ctx context.Context, id int) (*PoolPass, error)
- func (c *PoolPassClient) GetX(ctx context.Context, id int) *PoolPass
- func (c *PoolPassClient) Hooks() []Hook
- func (c *PoolPassClient) Query() *PoolPassQuery
- func (c *PoolPassClient) QueryPool(pp *PoolPass) *PoolQuery
- func (c *PoolPassClient) QueryUser(pp *PoolPass) *UserQuery
- func (c *PoolPassClient) Update() *PoolPassUpdate
- func (c *PoolPassClient) UpdateOne(pp *PoolPass) *PoolPassUpdateOne
- func (c *PoolPassClient) UpdateOneID(id int) *PoolPassUpdateOne
- func (c *PoolPassClient) Use(hooks ...Hook)
- type PoolPassCreate
- func (ppc *PoolPassCreate) Exec(ctx context.Context) error
- func (ppc *PoolPassCreate) ExecX(ctx context.Context)
- func (ppc *PoolPassCreate) Mutation() *PoolPassMutation
- func (ppc *PoolPassCreate) Save(ctx context.Context) (*PoolPass, error)
- func (ppc *PoolPassCreate) SaveX(ctx context.Context) *PoolPass
- func (ppc *PoolPassCreate) SetCreateTime(t time.Time) *PoolPassCreate
- func (ppc *PoolPassCreate) SetNillableCreateTime(t *time.Time) *PoolPassCreate
- func (ppc *PoolPassCreate) SetNillablePoolID(id *int) *PoolPassCreate
- func (ppc *PoolPassCreate) SetNillableUserID(id *int) *PoolPassCreate
- func (ppc *PoolPassCreate) SetPool(p *Pool) *PoolPassCreate
- func (ppc *PoolPassCreate) SetPoolID(id int) *PoolPassCreate
- func (ppc *PoolPassCreate) SetShares(t *types.Uint256) *PoolPassCreate
- func (ppc *PoolPassCreate) SetUser(u *User) *PoolPassCreate
- func (ppc *PoolPassCreate) SetUserID(id int) *PoolPassCreate
- type PoolPassCreateBulk
- type PoolPassDelete
- type PoolPassDeleteOne
- type PoolPassEdges
- type PoolPassGroupBy
- func (ppgb *PoolPassGroupBy) Aggregate(fns ...AggregateFunc) *PoolPassGroupBy
- func (s *PoolPassGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PoolPassGroupBy) BoolX(ctx context.Context) bool
- func (s *PoolPassGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PoolPassGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PoolPassGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PoolPassGroupBy) Float64X(ctx context.Context) float64
- func (s *PoolPassGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PoolPassGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PoolPassGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PoolPassGroupBy) IntX(ctx context.Context) int
- func (s *PoolPassGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PoolPassGroupBy) IntsX(ctx context.Context) []int
- func (ppgb *PoolPassGroupBy) Scan(ctx context.Context, v any) error
- func (s *PoolPassGroupBy) ScanX(ctx context.Context, v any)
- func (s *PoolPassGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PoolPassGroupBy) StringX(ctx context.Context) string
- func (s *PoolPassGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PoolPassGroupBy) StringsX(ctx context.Context) []string
- type PoolPassMutation
- func (m *PoolPassMutation) AddField(name string, value ent.Value) error
- func (m *PoolPassMutation) AddedEdges() []string
- func (m *PoolPassMutation) AddedField(name string) (ent.Value, bool)
- func (m *PoolPassMutation) AddedFields() []string
- func (m *PoolPassMutation) AddedIDs(name string) []ent.Value
- func (m *PoolPassMutation) ClearEdge(name string) error
- func (m *PoolPassMutation) ClearField(name string) error
- func (m *PoolPassMutation) ClearPool()
- func (m *PoolPassMutation) ClearUser()
- func (m *PoolPassMutation) ClearedEdges() []string
- func (m *PoolPassMutation) ClearedFields() []string
- func (m PoolPassMutation) Client() *Client
- func (m *PoolPassMutation) CreateTime() (r time.Time, exists bool)
- func (m *PoolPassMutation) EdgeCleared(name string) bool
- func (m *PoolPassMutation) Field(name string) (ent.Value, bool)
- func (m *PoolPassMutation) FieldCleared(name string) bool
- func (m *PoolPassMutation) Fields() []string
- func (m *PoolPassMutation) ID() (id int, exists bool)
- func (m *PoolPassMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PoolPassMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *PoolPassMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PoolPassMutation) OldShares(ctx context.Context) (v *types.Uint256, err error)
- func (m *PoolPassMutation) Op() Op
- func (m *PoolPassMutation) PoolCleared() bool
- func (m *PoolPassMutation) PoolID() (id int, exists bool)
- func (m *PoolPassMutation) PoolIDs() (ids []int)
- func (m *PoolPassMutation) RemovedEdges() []string
- func (m *PoolPassMutation) RemovedIDs(name string) []ent.Value
- func (m *PoolPassMutation) ResetCreateTime()
- func (m *PoolPassMutation) ResetEdge(name string) error
- func (m *PoolPassMutation) ResetField(name string) error
- func (m *PoolPassMutation) ResetPool()
- func (m *PoolPassMutation) ResetShares()
- func (m *PoolPassMutation) ResetUser()
- func (m *PoolPassMutation) SetCreateTime(t time.Time)
- func (m *PoolPassMutation) SetField(name string, value ent.Value) error
- func (m *PoolPassMutation) SetPoolID(id int)
- func (m *PoolPassMutation) SetShares(t *types.Uint256)
- func (m *PoolPassMutation) SetUserID(id int)
- func (m *PoolPassMutation) Shares() (r *types.Uint256, exists bool)
- func (m PoolPassMutation) Tx() (*Tx, error)
- func (m *PoolPassMutation) Type() string
- func (m *PoolPassMutation) UserCleared() bool
- func (m *PoolPassMutation) UserID() (id int, exists bool)
- func (m *PoolPassMutation) UserIDs() (ids []int)
- func (m *PoolPassMutation) Where(ps ...predicate.PoolPass)
- type PoolPassQuery
- func (ppq *PoolPassQuery) Aggregate(fns ...AggregateFunc) *PoolPassSelect
- func (ppq *PoolPassQuery) All(ctx context.Context) ([]*PoolPass, error)
- func (ppq *PoolPassQuery) AllX(ctx context.Context) []*PoolPass
- func (ppq *PoolPassQuery) Clone() *PoolPassQuery
- func (ppq *PoolPassQuery) Count(ctx context.Context) (int, error)
- func (ppq *PoolPassQuery) CountX(ctx context.Context) int
- func (ppq *PoolPassQuery) Exist(ctx context.Context) (bool, error)
- func (ppq *PoolPassQuery) ExistX(ctx context.Context) bool
- func (ppq *PoolPassQuery) First(ctx context.Context) (*PoolPass, error)
- func (ppq *PoolPassQuery) FirstID(ctx context.Context) (id int, err error)
- func (ppq *PoolPassQuery) FirstIDX(ctx context.Context) int
- func (ppq *PoolPassQuery) FirstX(ctx context.Context) *PoolPass
- func (ppq *PoolPassQuery) GroupBy(field string, fields ...string) *PoolPassGroupBy
- func (ppq *PoolPassQuery) IDs(ctx context.Context) ([]int, error)
- func (ppq *PoolPassQuery) IDsX(ctx context.Context) []int
- func (ppq *PoolPassQuery) Limit(limit int) *PoolPassQuery
- func (ppq *PoolPassQuery) Offset(offset int) *PoolPassQuery
- func (ppq *PoolPassQuery) Only(ctx context.Context) (*PoolPass, error)
- func (ppq *PoolPassQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ppq *PoolPassQuery) OnlyIDX(ctx context.Context) int
- func (ppq *PoolPassQuery) OnlyX(ctx context.Context) *PoolPass
- func (ppq *PoolPassQuery) Order(o ...OrderFunc) *PoolPassQuery
- func (ppq *PoolPassQuery) QueryPool() *PoolQuery
- func (ppq *PoolPassQuery) QueryUser() *UserQuery
- func (ppq *PoolPassQuery) Select(fields ...string) *PoolPassSelect
- func (ppq *PoolPassQuery) Unique(unique bool) *PoolPassQuery
- func (ppq *PoolPassQuery) Where(ps ...predicate.PoolPass) *PoolPassQuery
- func (ppq *PoolPassQuery) WithPool(opts ...func(*PoolQuery)) *PoolPassQuery
- func (ppq *PoolPassQuery) WithUser(opts ...func(*UserQuery)) *PoolPassQuery
- type PoolPassSelect
- func (pps *PoolPassSelect) Aggregate(fns ...AggregateFunc) *PoolPassSelect
- func (s *PoolPassSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PoolPassSelect) BoolX(ctx context.Context) bool
- func (s *PoolPassSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PoolPassSelect) BoolsX(ctx context.Context) []bool
- func (s *PoolPassSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PoolPassSelect) Float64X(ctx context.Context) float64
- func (s *PoolPassSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PoolPassSelect) Float64sX(ctx context.Context) []float64
- func (s *PoolPassSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PoolPassSelect) IntX(ctx context.Context) int
- func (s *PoolPassSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PoolPassSelect) IntsX(ctx context.Context) []int
- func (pps *PoolPassSelect) Scan(ctx context.Context, v any) error
- func (s *PoolPassSelect) ScanX(ctx context.Context, v any)
- func (s *PoolPassSelect) String(ctx context.Context) (_ string, err error)
- func (s *PoolPassSelect) StringX(ctx context.Context) string
- func (s *PoolPassSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PoolPassSelect) StringsX(ctx context.Context) []string
- type PoolPassUpdate
- func (ppu *PoolPassUpdate) ClearPool() *PoolPassUpdate
- func (ppu *PoolPassUpdate) ClearUser() *PoolPassUpdate
- func (ppu *PoolPassUpdate) Exec(ctx context.Context) error
- func (ppu *PoolPassUpdate) ExecX(ctx context.Context)
- func (ppu *PoolPassUpdate) Mutation() *PoolPassMutation
- func (ppu *PoolPassUpdate) Save(ctx context.Context) (int, error)
- func (ppu *PoolPassUpdate) SaveX(ctx context.Context) int
- func (ppu *PoolPassUpdate) SetNillablePoolID(id *int) *PoolPassUpdate
- func (ppu *PoolPassUpdate) SetNillableUserID(id *int) *PoolPassUpdate
- func (ppu *PoolPassUpdate) SetPool(p *Pool) *PoolPassUpdate
- func (ppu *PoolPassUpdate) SetPoolID(id int) *PoolPassUpdate
- func (ppu *PoolPassUpdate) SetUser(u *User) *PoolPassUpdate
- func (ppu *PoolPassUpdate) SetUserID(id int) *PoolPassUpdate
- func (ppu *PoolPassUpdate) Where(ps ...predicate.PoolPass) *PoolPassUpdate
- type PoolPassUpdateOne
- func (ppuo *PoolPassUpdateOne) ClearPool() *PoolPassUpdateOne
- func (ppuo *PoolPassUpdateOne) ClearUser() *PoolPassUpdateOne
- func (ppuo *PoolPassUpdateOne) Exec(ctx context.Context) error
- func (ppuo *PoolPassUpdateOne) ExecX(ctx context.Context)
- func (ppuo *PoolPassUpdateOne) Mutation() *PoolPassMutation
- func (ppuo *PoolPassUpdateOne) Save(ctx context.Context) (*PoolPass, error)
- func (ppuo *PoolPassUpdateOne) SaveX(ctx context.Context) *PoolPass
- func (ppuo *PoolPassUpdateOne) Select(field string, fields ...string) *PoolPassUpdateOne
- func (ppuo *PoolPassUpdateOne) SetNillablePoolID(id *int) *PoolPassUpdateOne
- func (ppuo *PoolPassUpdateOne) SetNillableUserID(id *int) *PoolPassUpdateOne
- func (ppuo *PoolPassUpdateOne) SetPool(p *Pool) *PoolPassUpdateOne
- func (ppuo *PoolPassUpdateOne) SetPoolID(id int) *PoolPassUpdateOne
- func (ppuo *PoolPassUpdateOne) SetUser(u *User) *PoolPassUpdateOne
- func (ppuo *PoolPassUpdateOne) SetUserID(id int) *PoolPassUpdateOne
- type PoolPasses
- type PoolQuery
- func (pq *PoolQuery) Aggregate(fns ...AggregateFunc) *PoolSelect
- func (pq *PoolQuery) All(ctx context.Context) ([]*Pool, error)
- func (pq *PoolQuery) AllX(ctx context.Context) []*Pool
- func (pq *PoolQuery) Clone() *PoolQuery
- func (pq *PoolQuery) Count(ctx context.Context) (int, error)
- func (pq *PoolQuery) CountX(ctx context.Context) int
- func (pq *PoolQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PoolQuery) ExistX(ctx context.Context) bool
- func (pq *PoolQuery) First(ctx context.Context) (*Pool, error)
- func (pq *PoolQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PoolQuery) FirstIDX(ctx context.Context) int
- func (pq *PoolQuery) FirstX(ctx context.Context) *Pool
- func (pq *PoolQuery) GroupBy(field string, fields ...string) *PoolGroupBy
- func (pq *PoolQuery) IDs(ctx context.Context) ([]int, error)
- func (pq *PoolQuery) IDsX(ctx context.Context) []int
- func (pq *PoolQuery) Limit(limit int) *PoolQuery
- func (pq *PoolQuery) Offset(offset int) *PoolQuery
- func (pq *PoolQuery) Only(ctx context.Context) (*Pool, error)
- func (pq *PoolQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PoolQuery) OnlyIDX(ctx context.Context) int
- func (pq *PoolQuery) OnlyX(ctx context.Context) *Pool
- func (pq *PoolQuery) Order(o ...OrderFunc) *PoolQuery
- func (pq *PoolQuery) QueryPoolPasses() *PoolPassQuery
- func (pq *PoolQuery) QuerySqueak() *SqueakQuery
- func (pq *PoolQuery) Select(fields ...string) *PoolSelect
- func (pq *PoolQuery) Unique(unique bool) *PoolQuery
- func (pq *PoolQuery) Where(ps ...predicate.Pool) *PoolQuery
- func (pq *PoolQuery) WithPoolPasses(opts ...func(*PoolPassQuery)) *PoolQuery
- func (pq *PoolQuery) WithSqueak(opts ...func(*SqueakQuery)) *PoolQuery
- type PoolSelect
- func (ps *PoolSelect) Aggregate(fns ...AggregateFunc) *PoolSelect
- func (s *PoolSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PoolSelect) BoolX(ctx context.Context) bool
- func (s *PoolSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PoolSelect) BoolsX(ctx context.Context) []bool
- func (s *PoolSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PoolSelect) Float64X(ctx context.Context) float64
- func (s *PoolSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PoolSelect) Float64sX(ctx context.Context) []float64
- func (s *PoolSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PoolSelect) IntX(ctx context.Context) int
- func (s *PoolSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PoolSelect) IntsX(ctx context.Context) []int
- func (ps *PoolSelect) Scan(ctx context.Context, v any) error
- func (s *PoolSelect) ScanX(ctx context.Context, v any)
- func (s *PoolSelect) String(ctx context.Context) (_ string, err error)
- func (s *PoolSelect) StringX(ctx context.Context) string
- func (s *PoolSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PoolSelect) StringsX(ctx context.Context) []string
- type PoolUpdate
- func (pu *PoolUpdate) AddPoolPassIDs(ids ...int) *PoolUpdate
- func (pu *PoolUpdate) AddPoolPasses(p ...*PoolPass) *PoolUpdate
- func (pu *PoolUpdate) ClearPoolPasses() *PoolUpdate
- func (pu *PoolUpdate) ClearSqueak() *PoolUpdate
- func (pu *PoolUpdate) Exec(ctx context.Context) error
- func (pu *PoolUpdate) ExecX(ctx context.Context)
- func (pu *PoolUpdate) Mutation() *PoolMutation
- func (pu *PoolUpdate) RemovePoolPassIDs(ids ...int) *PoolUpdate
- func (pu *PoolUpdate) RemovePoolPasses(p ...*PoolPass) *PoolUpdate
- func (pu *PoolUpdate) Save(ctx context.Context) (int, error)
- func (pu *PoolUpdate) SaveX(ctx context.Context) int
- func (pu *PoolUpdate) SetAmount(t *types.Uint256) *PoolUpdate
- func (pu *PoolUpdate) SetNillableSqueakID(id *int) *PoolUpdate
- func (pu *PoolUpdate) SetShares(t *types.Uint256) *PoolUpdate
- func (pu *PoolUpdate) SetSqueak(s *Squeak) *PoolUpdate
- func (pu *PoolUpdate) SetSqueakID(id int) *PoolUpdate
- func (pu *PoolUpdate) SetUpdateTime(t time.Time) *PoolUpdate
- func (pu *PoolUpdate) Where(ps ...predicate.Pool) *PoolUpdate
- type PoolUpdateOne
- func (puo *PoolUpdateOne) AddPoolPassIDs(ids ...int) *PoolUpdateOne
- func (puo *PoolUpdateOne) AddPoolPasses(p ...*PoolPass) *PoolUpdateOne
- func (puo *PoolUpdateOne) ClearPoolPasses() *PoolUpdateOne
- func (puo *PoolUpdateOne) ClearSqueak() *PoolUpdateOne
- func (puo *PoolUpdateOne) Exec(ctx context.Context) error
- func (puo *PoolUpdateOne) ExecX(ctx context.Context)
- func (puo *PoolUpdateOne) Mutation() *PoolMutation
- func (puo *PoolUpdateOne) RemovePoolPassIDs(ids ...int) *PoolUpdateOne
- func (puo *PoolUpdateOne) RemovePoolPasses(p ...*PoolPass) *PoolUpdateOne
- func (puo *PoolUpdateOne) Save(ctx context.Context) (*Pool, error)
- func (puo *PoolUpdateOne) SaveX(ctx context.Context) *Pool
- func (puo *PoolUpdateOne) Select(field string, fields ...string) *PoolUpdateOne
- func (puo *PoolUpdateOne) SetAmount(t *types.Uint256) *PoolUpdateOne
- func (puo *PoolUpdateOne) SetNillableSqueakID(id *int) *PoolUpdateOne
- func (puo *PoolUpdateOne) SetShares(t *types.Uint256) *PoolUpdateOne
- func (puo *PoolUpdateOne) SetSqueak(s *Squeak) *PoolUpdateOne
- func (puo *PoolUpdateOne) SetSqueakID(id int) *PoolUpdateOne
- func (puo *PoolUpdateOne) SetUpdateTime(t time.Time) *PoolUpdateOne
- type Pools
- type Query
- type Role
- type RoleClient
- func (c *RoleClient) Create() *RoleCreate
- func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
- func (c *RoleClient) Delete() *RoleDelete
- func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
- func (c *RoleClient) DeleteOneID(id int) *RoleDeleteOne
- func (c *RoleClient) Get(ctx context.Context, id int) (*Role, error)
- func (c *RoleClient) GetX(ctx context.Context, id int) *Role
- func (c *RoleClient) Hooks() []Hook
- func (c *RoleClient) Query() *RoleQuery
- func (c *RoleClient) QueryUsers(r *Role) *UserQuery
- func (c *RoleClient) Update() *RoleUpdate
- func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
- func (c *RoleClient) UpdateOneID(id int) *RoleUpdateOne
- func (c *RoleClient) Use(hooks ...Hook)
- type RoleCreate
- func (rc *RoleCreate) AddUserIDs(ids ...int) *RoleCreate
- func (rc *RoleCreate) AddUsers(u ...*User) *RoleCreate
- func (rc *RoleCreate) Exec(ctx context.Context) error
- func (rc *RoleCreate) ExecX(ctx context.Context)
- func (rc *RoleCreate) Mutation() *RoleMutation
- func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)
- func (rc *RoleCreate) SaveX(ctx context.Context) *Role
- func (rc *RoleCreate) SetCreateTime(t time.Time) *RoleCreate
- func (rc *RoleCreate) SetHash(s string) *RoleCreate
- func (rc *RoleCreate) SetNillableCreateTime(t *time.Time) *RoleCreate
- func (rc *RoleCreate) SetNillableUpdateTime(t *time.Time) *RoleCreate
- func (rc *RoleCreate) SetTitle(s string) *RoleCreate
- func (rc *RoleCreate) SetUpdateTime(t time.Time) *RoleCreate
- type RoleCreateBulk
- type RoleDelete
- type RoleDeleteOne
- type RoleEdges
- type RoleGroupBy
- func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
- func (s *RoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleGroupBy) BoolX(ctx context.Context) bool
- func (s *RoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleGroupBy) Float64X(ctx context.Context) float64
- func (s *RoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RoleGroupBy) IntX(ctx context.Context) int
- func (s *RoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RoleGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error
- func (s *RoleGroupBy) ScanX(ctx context.Context, v any)
- func (s *RoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RoleGroupBy) StringX(ctx context.Context) string
- func (s *RoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RoleGroupBy) StringsX(ctx context.Context) []string
- type RoleMutation
- func (m *RoleMutation) AddField(name string, value ent.Value) error
- func (m *RoleMutation) AddUserIDs(ids ...int)
- func (m *RoleMutation) AddedEdges() []string
- func (m *RoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoleMutation) AddedFields() []string
- func (m *RoleMutation) AddedIDs(name string) []ent.Value
- func (m *RoleMutation) ClearEdge(name string) error
- func (m *RoleMutation) ClearField(name string) error
- func (m *RoleMutation) ClearUsers()
- func (m *RoleMutation) ClearedEdges() []string
- func (m *RoleMutation) ClearedFields() []string
- func (m RoleMutation) Client() *Client
- func (m *RoleMutation) CreateTime() (r time.Time, exists bool)
- func (m *RoleMutation) EdgeCleared(name string) bool
- func (m *RoleMutation) Field(name string) (ent.Value, bool)
- func (m *RoleMutation) FieldCleared(name string) bool
- func (m *RoleMutation) Fields() []string
- func (m *RoleMutation) Hash() (r string, exists bool)
- func (m *RoleMutation) ID() (id int, exists bool)
- func (m *RoleMutation) IDs(ctx context.Context) ([]int, error)
- func (m *RoleMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *RoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoleMutation) OldHash(ctx context.Context) (v string, err error)
- func (m *RoleMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *RoleMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *RoleMutation) Op() Op
- func (m *RoleMutation) RemoveUserIDs(ids ...int)
- func (m *RoleMutation) RemovedEdges() []string
- func (m *RoleMutation) RemovedIDs(name string) []ent.Value
- func (m *RoleMutation) RemovedUsersIDs() (ids []int)
- func (m *RoleMutation) ResetCreateTime()
- func (m *RoleMutation) ResetEdge(name string) error
- func (m *RoleMutation) ResetField(name string) error
- func (m *RoleMutation) ResetHash()
- func (m *RoleMutation) ResetTitle()
- func (m *RoleMutation) ResetUpdateTime()
- func (m *RoleMutation) ResetUsers()
- func (m *RoleMutation) SetCreateTime(t time.Time)
- func (m *RoleMutation) SetField(name string, value ent.Value) error
- func (m *RoleMutation) SetHash(s string)
- func (m *RoleMutation) SetTitle(s string)
- func (m *RoleMutation) SetUpdateTime(t time.Time)
- func (m *RoleMutation) Title() (r string, exists bool)
- func (m RoleMutation) Tx() (*Tx, error)
- func (m *RoleMutation) Type() string
- func (m *RoleMutation) UpdateTime() (r time.Time, exists bool)
- func (m *RoleMutation) UsersCleared() bool
- func (m *RoleMutation) UsersIDs() (ids []int)
- func (m *RoleMutation) Where(ps ...predicate.Role)
- type RoleQuery
- func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect
- func (rq *RoleQuery) All(ctx context.Context) ([]*Role, error)
- func (rq *RoleQuery) AllX(ctx context.Context) []*Role
- func (rq *RoleQuery) Clone() *RoleQuery
- func (rq *RoleQuery) Count(ctx context.Context) (int, error)
- func (rq *RoleQuery) CountX(ctx context.Context) int
- func (rq *RoleQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RoleQuery) ExistX(ctx context.Context) bool
- func (rq *RoleQuery) First(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) FirstID(ctx context.Context) (id int, err error)
- func (rq *RoleQuery) FirstIDX(ctx context.Context) int
- func (rq *RoleQuery) FirstX(ctx context.Context) *Role
- func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
- func (rq *RoleQuery) IDs(ctx context.Context) ([]int, error)
- func (rq *RoleQuery) IDsX(ctx context.Context) []int
- func (rq *RoleQuery) Limit(limit int) *RoleQuery
- func (rq *RoleQuery) Offset(offset int) *RoleQuery
- func (rq *RoleQuery) Only(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rq *RoleQuery) OnlyIDX(ctx context.Context) int
- func (rq *RoleQuery) OnlyX(ctx context.Context) *Role
- func (rq *RoleQuery) Order(o ...OrderFunc) *RoleQuery
- func (rq *RoleQuery) QueryUsers() *UserQuery
- func (rq *RoleQuery) Select(fields ...string) *RoleSelect
- func (rq *RoleQuery) Unique(unique bool) *RoleQuery
- func (rq *RoleQuery) Where(ps ...predicate.Role) *RoleQuery
- func (rq *RoleQuery) WithUsers(opts ...func(*UserQuery)) *RoleQuery
- type RoleSelect
- func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect
- func (s *RoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleSelect) BoolX(ctx context.Context) bool
- func (s *RoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleSelect) BoolsX(ctx context.Context) []bool
- func (s *RoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleSelect) Float64X(ctx context.Context) float64
- func (s *RoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleSelect) Float64sX(ctx context.Context) []float64
- func (s *RoleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RoleSelect) IntX(ctx context.Context) int
- func (s *RoleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RoleSelect) IntsX(ctx context.Context) []int
- func (rs *RoleSelect) Scan(ctx context.Context, v any) error
- func (s *RoleSelect) ScanX(ctx context.Context, v any)
- func (s *RoleSelect) String(ctx context.Context) (_ string, err error)
- func (s *RoleSelect) StringX(ctx context.Context) string
- func (s *RoleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RoleSelect) StringsX(ctx context.Context) []string
- type RoleUpdate
- func (ru *RoleUpdate) AddUserIDs(ids ...int) *RoleUpdate
- func (ru *RoleUpdate) AddUsers(u ...*User) *RoleUpdate
- func (ru *RoleUpdate) ClearUsers() *RoleUpdate
- func (ru *RoleUpdate) Exec(ctx context.Context) error
- func (ru *RoleUpdate) ExecX(ctx context.Context)
- func (ru *RoleUpdate) Mutation() *RoleMutation
- func (ru *RoleUpdate) RemoveUserIDs(ids ...int) *RoleUpdate
- func (ru *RoleUpdate) RemoveUsers(u ...*User) *RoleUpdate
- func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
- func (ru *RoleUpdate) SaveX(ctx context.Context) int
- func (ru *RoleUpdate) SetUpdateTime(t time.Time) *RoleUpdate
- func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
- type RoleUpdateOne
- func (ruo *RoleUpdateOne) AddUserIDs(ids ...int) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddUsers(u ...*User) *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearUsers() *RoleUpdateOne
- func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
- func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
- func (ruo *RoleUpdateOne) Mutation() *RoleMutation
- func (ruo *RoleUpdateOne) RemoveUserIDs(ids ...int) *RoleUpdateOne
- func (ruo *RoleUpdateOne) RemoveUsers(u ...*User) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
- func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
- func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetUpdateTime(t time.Time) *RoleUpdateOne
- type Roles
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Squeak
- type SqueakClient
- func (c *SqueakClient) Create() *SqueakCreate
- func (c *SqueakClient) CreateBulk(builders ...*SqueakCreate) *SqueakCreateBulk
- func (c *SqueakClient) Delete() *SqueakDelete
- func (c *SqueakClient) DeleteOne(s *Squeak) *SqueakDeleteOne
- func (c *SqueakClient) DeleteOneID(id int) *SqueakDeleteOne
- func (c *SqueakClient) Get(ctx context.Context, id int) (*Squeak, error)
- func (c *SqueakClient) GetX(ctx context.Context, id int) *Squeak
- func (c *SqueakClient) Hooks() []Hook
- func (c *SqueakClient) Query() *SqueakQuery
- func (c *SqueakClient) QueryCreator(s *Squeak) *UserQuery
- func (c *SqueakClient) QueryInteractions(s *Squeak) *InteractionQuery
- func (c *SqueakClient) QueryOwner(s *Squeak) *UserQuery
- func (c *SqueakClient) QueryPool(s *Squeak) *PoolQuery
- func (c *SqueakClient) Update() *SqueakUpdate
- func (c *SqueakClient) UpdateOne(s *Squeak) *SqueakUpdateOne
- func (c *SqueakClient) UpdateOneID(id int) *SqueakUpdateOne
- func (c *SqueakClient) Use(hooks ...Hook)
- type SqueakCreate
- func (sc *SqueakCreate) AddInteractionIDs(ids ...int) *SqueakCreate
- func (sc *SqueakCreate) AddInteractions(i ...*Interaction) *SqueakCreate
- func (sc *SqueakCreate) Exec(ctx context.Context) error
- func (sc *SqueakCreate) ExecX(ctx context.Context)
- func (sc *SqueakCreate) Mutation() *SqueakMutation
- func (sc *SqueakCreate) Save(ctx context.Context) (*Squeak, error)
- func (sc *SqueakCreate) SaveX(ctx context.Context) *Squeak
- func (sc *SqueakCreate) SetBlockNumber(t *types.Uint256) *SqueakCreate
- func (sc *SqueakCreate) SetContent(s string) *SqueakCreate
- func (sc *SqueakCreate) SetCreateTime(t time.Time) *SqueakCreate
- func (sc *SqueakCreate) SetCreator(u *User) *SqueakCreate
- func (sc *SqueakCreate) SetCreatorID(id int) *SqueakCreate
- func (sc *SqueakCreate) SetNillableCreateTime(t *time.Time) *SqueakCreate
- func (sc *SqueakCreate) SetNillableCreatorID(id *int) *SqueakCreate
- func (sc *SqueakCreate) SetNillableOwnerID(id *int) *SqueakCreate
- func (sc *SqueakCreate) SetNillablePoolID(id *int) *SqueakCreate
- func (sc *SqueakCreate) SetOwner(u *User) *SqueakCreate
- func (sc *SqueakCreate) SetOwnerID(id int) *SqueakCreate
- func (sc *SqueakCreate) SetPool(p *Pool) *SqueakCreate
- func (sc *SqueakCreate) SetPoolID(id int) *SqueakCreate
- type SqueakCreateBulk
- type SqueakDelete
- type SqueakDeleteOne
- type SqueakEdges
- type SqueakGroupBy
- func (sgb *SqueakGroupBy) Aggregate(fns ...AggregateFunc) *SqueakGroupBy
- func (s *SqueakGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SqueakGroupBy) BoolX(ctx context.Context) bool
- func (s *SqueakGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SqueakGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SqueakGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SqueakGroupBy) Float64X(ctx context.Context) float64
- func (s *SqueakGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SqueakGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SqueakGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SqueakGroupBy) IntX(ctx context.Context) int
- func (s *SqueakGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SqueakGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SqueakGroupBy) Scan(ctx context.Context, v any) error
- func (s *SqueakGroupBy) ScanX(ctx context.Context, v any)
- func (s *SqueakGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SqueakGroupBy) StringX(ctx context.Context) string
- func (s *SqueakGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SqueakGroupBy) StringsX(ctx context.Context) []string
- type SqueakMutation
- func (m *SqueakMutation) AddField(name string, value ent.Value) error
- func (m *SqueakMutation) AddInteractionIDs(ids ...int)
- func (m *SqueakMutation) AddedEdges() []string
- func (m *SqueakMutation) AddedField(name string) (ent.Value, bool)
- func (m *SqueakMutation) AddedFields() []string
- func (m *SqueakMutation) AddedIDs(name string) []ent.Value
- func (m *SqueakMutation) BlockNumber() (r *types.Uint256, exists bool)
- func (m *SqueakMutation) ClearCreator()
- func (m *SqueakMutation) ClearEdge(name string) error
- func (m *SqueakMutation) ClearField(name string) error
- func (m *SqueakMutation) ClearInteractions()
- func (m *SqueakMutation) ClearOwner()
- func (m *SqueakMutation) ClearPool()
- func (m *SqueakMutation) ClearedEdges() []string
- func (m *SqueakMutation) ClearedFields() []string
- func (m SqueakMutation) Client() *Client
- func (m *SqueakMutation) Content() (r string, exists bool)
- func (m *SqueakMutation) CreateTime() (r time.Time, exists bool)
- func (m *SqueakMutation) CreatorCleared() bool
- func (m *SqueakMutation) CreatorID() (id int, exists bool)
- func (m *SqueakMutation) CreatorIDs() (ids []int)
- func (m *SqueakMutation) EdgeCleared(name string) bool
- func (m *SqueakMutation) Field(name string) (ent.Value, bool)
- func (m *SqueakMutation) FieldCleared(name string) bool
- func (m *SqueakMutation) Fields() []string
- func (m *SqueakMutation) ID() (id int, exists bool)
- func (m *SqueakMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SqueakMutation) InteractionsCleared() bool
- func (m *SqueakMutation) InteractionsIDs() (ids []int)
- func (m *SqueakMutation) OldBlockNumber(ctx context.Context) (v *types.Uint256, err error)
- func (m *SqueakMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *SqueakMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SqueakMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SqueakMutation) Op() Op
- func (m *SqueakMutation) OwnerCleared() bool
- func (m *SqueakMutation) OwnerID() (id int, exists bool)
- func (m *SqueakMutation) OwnerIDs() (ids []int)
- func (m *SqueakMutation) PoolCleared() bool
- func (m *SqueakMutation) PoolID() (id int, exists bool)
- func (m *SqueakMutation) PoolIDs() (ids []int)
- func (m *SqueakMutation) RemoveInteractionIDs(ids ...int)
- func (m *SqueakMutation) RemovedEdges() []string
- func (m *SqueakMutation) RemovedIDs(name string) []ent.Value
- func (m *SqueakMutation) RemovedInteractionsIDs() (ids []int)
- func (m *SqueakMutation) ResetBlockNumber()
- func (m *SqueakMutation) ResetContent()
- func (m *SqueakMutation) ResetCreateTime()
- func (m *SqueakMutation) ResetCreator()
- func (m *SqueakMutation) ResetEdge(name string) error
- func (m *SqueakMutation) ResetField(name string) error
- func (m *SqueakMutation) ResetInteractions()
- func (m *SqueakMutation) ResetOwner()
- func (m *SqueakMutation) ResetPool()
- func (m *SqueakMutation) SetBlockNumber(t *types.Uint256)
- func (m *SqueakMutation) SetContent(s string)
- func (m *SqueakMutation) SetCreateTime(t time.Time)
- func (m *SqueakMutation) SetCreatorID(id int)
- func (m *SqueakMutation) SetField(name string, value ent.Value) error
- func (m *SqueakMutation) SetOwnerID(id int)
- func (m *SqueakMutation) SetPoolID(id int)
- func (m SqueakMutation) Tx() (*Tx, error)
- func (m *SqueakMutation) Type() string
- func (m *SqueakMutation) Where(ps ...predicate.Squeak)
- type SqueakQuery
- func (sq *SqueakQuery) Aggregate(fns ...AggregateFunc) *SqueakSelect
- func (sq *SqueakQuery) All(ctx context.Context) ([]*Squeak, error)
- func (sq *SqueakQuery) AllX(ctx context.Context) []*Squeak
- func (sq *SqueakQuery) Clone() *SqueakQuery
- func (sq *SqueakQuery) Count(ctx context.Context) (int, error)
- func (sq *SqueakQuery) CountX(ctx context.Context) int
- func (sq *SqueakQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SqueakQuery) ExistX(ctx context.Context) bool
- func (sq *SqueakQuery) First(ctx context.Context) (*Squeak, error)
- func (sq *SqueakQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *SqueakQuery) FirstIDX(ctx context.Context) int
- func (sq *SqueakQuery) FirstX(ctx context.Context) *Squeak
- func (sq *SqueakQuery) GroupBy(field string, fields ...string) *SqueakGroupBy
- func (sq *SqueakQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *SqueakQuery) IDsX(ctx context.Context) []int
- func (sq *SqueakQuery) Limit(limit int) *SqueakQuery
- func (sq *SqueakQuery) Offset(offset int) *SqueakQuery
- func (sq *SqueakQuery) Only(ctx context.Context) (*Squeak, error)
- func (sq *SqueakQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *SqueakQuery) OnlyIDX(ctx context.Context) int
- func (sq *SqueakQuery) OnlyX(ctx context.Context) *Squeak
- func (sq *SqueakQuery) Order(o ...OrderFunc) *SqueakQuery
- func (sq *SqueakQuery) QueryCreator() *UserQuery
- func (sq *SqueakQuery) QueryInteractions() *InteractionQuery
- func (sq *SqueakQuery) QueryOwner() *UserQuery
- func (sq *SqueakQuery) QueryPool() *PoolQuery
- func (sq *SqueakQuery) Select(fields ...string) *SqueakSelect
- func (sq *SqueakQuery) Unique(unique bool) *SqueakQuery
- func (sq *SqueakQuery) Where(ps ...predicate.Squeak) *SqueakQuery
- func (sq *SqueakQuery) WithCreator(opts ...func(*UserQuery)) *SqueakQuery
- func (sq *SqueakQuery) WithInteractions(opts ...func(*InteractionQuery)) *SqueakQuery
- func (sq *SqueakQuery) WithOwner(opts ...func(*UserQuery)) *SqueakQuery
- func (sq *SqueakQuery) WithPool(opts ...func(*PoolQuery)) *SqueakQuery
- type SqueakSelect
- func (ss *SqueakSelect) Aggregate(fns ...AggregateFunc) *SqueakSelect
- func (s *SqueakSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SqueakSelect) BoolX(ctx context.Context) bool
- func (s *SqueakSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SqueakSelect) BoolsX(ctx context.Context) []bool
- func (s *SqueakSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SqueakSelect) Float64X(ctx context.Context) float64
- func (s *SqueakSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SqueakSelect) Float64sX(ctx context.Context) []float64
- func (s *SqueakSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SqueakSelect) IntX(ctx context.Context) int
- func (s *SqueakSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SqueakSelect) IntsX(ctx context.Context) []int
- func (ss *SqueakSelect) Scan(ctx context.Context, v any) error
- func (s *SqueakSelect) ScanX(ctx context.Context, v any)
- func (s *SqueakSelect) String(ctx context.Context) (_ string, err error)
- func (s *SqueakSelect) StringX(ctx context.Context) string
- func (s *SqueakSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SqueakSelect) StringsX(ctx context.Context) []string
- type SqueakUpdate
- func (su *SqueakUpdate) AddInteractionIDs(ids ...int) *SqueakUpdate
- func (su *SqueakUpdate) AddInteractions(i ...*Interaction) *SqueakUpdate
- func (su *SqueakUpdate) ClearCreator() *SqueakUpdate
- func (su *SqueakUpdate) ClearInteractions() *SqueakUpdate
- func (su *SqueakUpdate) ClearOwner() *SqueakUpdate
- func (su *SqueakUpdate) ClearPool() *SqueakUpdate
- func (su *SqueakUpdate) Exec(ctx context.Context) error
- func (su *SqueakUpdate) ExecX(ctx context.Context)
- func (su *SqueakUpdate) Mutation() *SqueakMutation
- func (su *SqueakUpdate) RemoveInteractionIDs(ids ...int) *SqueakUpdate
- func (su *SqueakUpdate) RemoveInteractions(i ...*Interaction) *SqueakUpdate
- func (su *SqueakUpdate) Save(ctx context.Context) (int, error)
- func (su *SqueakUpdate) SaveX(ctx context.Context) int
- func (su *SqueakUpdate) SetBlockNumber(t *types.Uint256) *SqueakUpdate
- func (su *SqueakUpdate) SetCreator(u *User) *SqueakUpdate
- func (su *SqueakUpdate) SetCreatorID(id int) *SqueakUpdate
- func (su *SqueakUpdate) SetNillableCreatorID(id *int) *SqueakUpdate
- func (su *SqueakUpdate) SetNillableOwnerID(id *int) *SqueakUpdate
- func (su *SqueakUpdate) SetNillablePoolID(id *int) *SqueakUpdate
- func (su *SqueakUpdate) SetOwner(u *User) *SqueakUpdate
- func (su *SqueakUpdate) SetOwnerID(id int) *SqueakUpdate
- func (su *SqueakUpdate) SetPool(p *Pool) *SqueakUpdate
- func (su *SqueakUpdate) SetPoolID(id int) *SqueakUpdate
- func (su *SqueakUpdate) Where(ps ...predicate.Squeak) *SqueakUpdate
- type SqueakUpdateOne
- func (suo *SqueakUpdateOne) AddInteractionIDs(ids ...int) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) AddInteractions(i ...*Interaction) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) ClearCreator() *SqueakUpdateOne
- func (suo *SqueakUpdateOne) ClearInteractions() *SqueakUpdateOne
- func (suo *SqueakUpdateOne) ClearOwner() *SqueakUpdateOne
- func (suo *SqueakUpdateOne) ClearPool() *SqueakUpdateOne
- func (suo *SqueakUpdateOne) Exec(ctx context.Context) error
- func (suo *SqueakUpdateOne) ExecX(ctx context.Context)
- func (suo *SqueakUpdateOne) Mutation() *SqueakMutation
- func (suo *SqueakUpdateOne) RemoveInteractionIDs(ids ...int) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) RemoveInteractions(i ...*Interaction) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) Save(ctx context.Context) (*Squeak, error)
- func (suo *SqueakUpdateOne) SaveX(ctx context.Context) *Squeak
- func (suo *SqueakUpdateOne) Select(field string, fields ...string) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetBlockNumber(t *types.Uint256) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetCreator(u *User) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetCreatorID(id int) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetNillableCreatorID(id *int) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetNillableOwnerID(id *int) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetNillablePoolID(id *int) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetOwner(u *User) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetOwnerID(id int) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetPool(p *Pool) *SqueakUpdateOne
- func (suo *SqueakUpdateOne) SetPoolID(id int) *SqueakUpdateOne
- type Squeaks
- type Tx
- type User
- func (u *User) QueryCreated() *SqueakQuery
- func (u *User) QueryFollowers() *UserQuery
- func (u *User) QueryFollowing() *UserQuery
- func (u *User) QueryInteractions() *InteractionQuery
- func (u *User) QueryOwned() *SqueakQuery
- func (u *User) QueryPoolPasses() *PoolPassQuery
- func (u *User) QueryRoles() *RoleQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryCreated(u *User) *SqueakQuery
- func (c *UserClient) QueryFollowers(u *User) *UserQuery
- func (c *UserClient) QueryFollowing(u *User) *UserQuery
- func (c *UserClient) QueryInteractions(u *User) *InteractionQuery
- func (c *UserClient) QueryOwned(u *User) *SqueakQuery
- func (c *UserClient) QueryPoolPasses(u *User) *PoolPassQuery
- func (c *UserClient) QueryRoles(u *User) *RoleQuery
- 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) AddCreated(s ...*Squeak) *UserCreate
- func (uc *UserCreate) AddCreatedIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddFollowerIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddFollowers(u ...*User) *UserCreate
- func (uc *UserCreate) AddFollowing(u ...*User) *UserCreate
- func (uc *UserCreate) AddFollowingIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddInteractionIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddInteractions(i ...*Interaction) *UserCreate
- func (uc *UserCreate) AddOwned(s ...*Squeak) *UserCreate
- func (uc *UserCreate) AddOwnedIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddPoolPassIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddPoolPasses(p ...*PoolPass) *UserCreate
- func (uc *UserCreate) AddRoleIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddRoles(r ...*Role) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAddress(s string) *UserCreate
- func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetLevel(i int8) *UserCreate
- func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableLevel(i *int8) *UserCreate
- func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
- func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- func (e UserEdges) CreatedOrErr() ([]*Squeak, error)
- func (e UserEdges) FollowersOrErr() ([]*User, error)
- func (e UserEdges) FollowingOrErr() ([]*User, error)
- func (e UserEdges) InteractionsOrErr() ([]*Interaction, error)
- func (e UserEdges) OwnedOrErr() ([]*Squeak, error)
- func (e UserEdges) PoolPassesOrErr() ([]*PoolPass, error)
- func (e UserEdges) RolesOrErr() ([]*Role, 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) AddCreatedIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddFollowerIDs(ids ...int)
- func (m *UserMutation) AddFollowingIDs(ids ...int)
- func (m *UserMutation) AddInteractionIDs(ids ...int)
- func (m *UserMutation) AddLevel(i int8)
- func (m *UserMutation) AddOwnedIDs(ids ...int)
- func (m *UserMutation) AddPoolPassIDs(ids ...int)
- func (m *UserMutation) AddRoleIDs(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) AddedLevel() (r int8, exists bool)
- func (m *UserMutation) Address() (r string, exists bool)
- func (m *UserMutation) ClearCreated()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearFollowers()
- func (m *UserMutation) ClearFollowing()
- func (m *UserMutation) ClearInteractions()
- func (m *UserMutation) ClearOwned()
- func (m *UserMutation) ClearPoolPasses()
- func (m *UserMutation) ClearRoles()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserMutation) CreatedCleared() bool
- func (m *UserMutation) CreatedIDs() (ids []int)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FollowersCleared() bool
- func (m *UserMutation) FollowersIDs() (ids []int)
- func (m *UserMutation) FollowingCleared() bool
- func (m *UserMutation) FollowingIDs() (ids []int)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) InteractionsCleared() bool
- func (m *UserMutation) InteractionsIDs() (ids []int)
- func (m *UserMutation) Level() (r int8, exists bool)
- func (m *UserMutation) OldAddress(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldLevel(ctx context.Context) (v int8, err error)
- func (m *UserMutation) OldStatus(ctx context.Context) (v user.Status, err error)
- func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) OwnedCleared() bool
- func (m *UserMutation) OwnedIDs() (ids []int)
- func (m *UserMutation) PoolPassesCleared() bool
- func (m *UserMutation) PoolPassesIDs() (ids []int)
- func (m *UserMutation) RemoveCreatedIDs(ids ...int)
- func (m *UserMutation) RemoveFollowerIDs(ids ...int)
- func (m *UserMutation) RemoveFollowingIDs(ids ...int)
- func (m *UserMutation) RemoveInteractionIDs(ids ...int)
- func (m *UserMutation) RemoveOwnedIDs(ids ...int)
- func (m *UserMutation) RemovePoolPassIDs(ids ...int)
- func (m *UserMutation) RemoveRoleIDs(ids ...int)
- func (m *UserMutation) RemovedCreatedIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedFollowersIDs() (ids []int)
- func (m *UserMutation) RemovedFollowingIDs() (ids []int)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedInteractionsIDs() (ids []int)
- func (m *UserMutation) RemovedOwnedIDs() (ids []int)
- func (m *UserMutation) RemovedPoolPassesIDs() (ids []int)
- func (m *UserMutation) RemovedRolesIDs() (ids []int)
- func (m *UserMutation) ResetAddress()
- func (m *UserMutation) ResetCreateTime()
- func (m *UserMutation) ResetCreated()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFollowers()
- func (m *UserMutation) ResetFollowing()
- func (m *UserMutation) ResetInteractions()
- func (m *UserMutation) ResetLevel()
- func (m *UserMutation) ResetOwned()
- func (m *UserMutation) ResetPoolPasses()
- func (m *UserMutation) ResetRoles()
- func (m *UserMutation) ResetStatus()
- func (m *UserMutation) ResetUpdateTime()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) RolesCleared() bool
- func (m *UserMutation) RolesIDs() (ids []int)
- func (m *UserMutation) SetAddress(s string)
- func (m *UserMutation) SetCreateTime(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetLevel(i int8)
- func (m *UserMutation) SetStatus(u user.Status)
- func (m *UserMutation) SetUpdateTime(t time.Time)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) Status() (r user.Status, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryCreated() *SqueakQuery
- func (uq *UserQuery) QueryFollowers() *UserQuery
- func (uq *UserQuery) QueryFollowing() *UserQuery
- func (uq *UserQuery) QueryInteractions() *InteractionQuery
- func (uq *UserQuery) QueryOwned() *SqueakQuery
- func (uq *UserQuery) QueryPoolPasses() *PoolPassQuery
- func (uq *UserQuery) QueryRoles() *RoleQuery
- 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) WithCreated(opts ...func(*SqueakQuery)) *UserQuery
- func (uq *UserQuery) WithFollowers(opts ...func(*UserQuery)) *UserQuery
- func (uq *UserQuery) WithFollowing(opts ...func(*UserQuery)) *UserQuery
- func (uq *UserQuery) WithInteractions(opts ...func(*InteractionQuery)) *UserQuery
- func (uq *UserQuery) WithOwned(opts ...func(*SqueakQuery)) *UserQuery
- func (uq *UserQuery) WithPoolPasses(opts ...func(*PoolPassQuery)) *UserQuery
- func (uq *UserQuery) WithRoles(opts ...func(*RoleQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddCreated(s ...*Squeak) *UserUpdate
- func (uu *UserUpdate) AddCreatedIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddFollowerIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddFollowers(u ...*User) *UserUpdate
- func (uu *UserUpdate) AddFollowing(u ...*User) *UserUpdate
- func (uu *UserUpdate) AddFollowingIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddInteractionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddInteractions(i ...*Interaction) *UserUpdate
- func (uu *UserUpdate) AddLevel(i int8) *UserUpdate
- func (uu *UserUpdate) AddOwned(s ...*Squeak) *UserUpdate
- func (uu *UserUpdate) AddOwnedIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddPoolPassIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddPoolPasses(p ...*PoolPass) *UserUpdate
- func (uu *UserUpdate) AddRoleIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddRoles(r ...*Role) *UserUpdate
- func (uu *UserUpdate) ClearCreated() *UserUpdate
- func (uu *UserUpdate) ClearFollowers() *UserUpdate
- func (uu *UserUpdate) ClearFollowing() *UserUpdate
- func (uu *UserUpdate) ClearInteractions() *UserUpdate
- func (uu *UserUpdate) ClearOwned() *UserUpdate
- func (uu *UserUpdate) ClearPoolPasses() *UserUpdate
- func (uu *UserUpdate) ClearRoles() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveCreated(s ...*Squeak) *UserUpdate
- func (uu *UserUpdate) RemoveCreatedIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveFollowerIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveFollowers(u ...*User) *UserUpdate
- func (uu *UserUpdate) RemoveFollowing(u ...*User) *UserUpdate
- func (uu *UserUpdate) RemoveFollowingIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveInteractionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveInteractions(i ...*Interaction) *UserUpdate
- func (uu *UserUpdate) RemoveOwned(s ...*Squeak) *UserUpdate
- func (uu *UserUpdate) RemoveOwnedIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemovePoolPassIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemovePoolPasses(p ...*PoolPass) *UserUpdate
- func (uu *UserUpdate) RemoveRoleIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveRoles(r ...*Role) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetLevel(i int8) *UserUpdate
- func (uu *UserUpdate) SetNillableLevel(i *int8) *UserUpdate
- func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
- func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddCreated(s ...*Squeak) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCreatedIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFollowerIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFollowers(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFollowing(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFollowingIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddInteractionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddInteractions(i ...*Interaction) *UserUpdateOne
- func (uuo *UserUpdateOne) AddLevel(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOwned(s ...*Squeak) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOwnedIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPoolPassIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPoolPasses(p ...*PoolPass) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRoleIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRoles(r ...*Role) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCreated() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFollowers() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFollowing() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearInteractions() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOwned() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPoolPasses() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveCreated(s ...*Squeak) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveCreatedIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFollowerIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFollowers(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFollowing(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFollowingIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveInteractionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveInteractions(i ...*Interaction) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveOwned(s ...*Squeak) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveOwnedIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePoolPassIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePoolPasses(p ...*PoolPass) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRoleIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRoles(r ...*Role) *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) SetLevel(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLevel(i *int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- 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. TypeInteraction = "Interaction" TypePool = "Pool" TypePoolPass = "PoolPass" TypeRole = "Role" TypeSqueak = "Squeak" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type 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 // Interaction is the client for interacting with the Interaction builders. Interaction *InteractionClient // Pool is the client for interacting with the Pool builders. Pool *PoolClient // PoolPass is the client for interacting with the PoolPass builders. PoolPass *PoolPassClient // Role is the client for interacting with the Role builders. Role *RoleClient // Squeak is the client for interacting with the Squeak builders. Squeak *SqueakClient // 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(). Interaction. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Interaction ¶
type Interaction struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // Type holds the value of the "type" field. Type enums.Interaction `json:"type,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InteractionQuery when eager-loading is set. Edges InteractionEdges `json:"edges"` // contains filtered or unexported fields }
Interaction is the model entity for the Interaction schema.
func (*Interaction) QuerySqueak ¶
func (i *Interaction) QuerySqueak() *SqueakQuery
QuerySqueak queries the "squeak" edge of the Interaction entity.
func (*Interaction) QueryUser ¶
func (i *Interaction) QueryUser() *UserQuery
QueryUser queries the "user" edge of the Interaction entity.
func (*Interaction) String ¶
func (i *Interaction) String() string
String implements the fmt.Stringer.
func (*Interaction) Unwrap ¶
func (i *Interaction) Unwrap() *Interaction
Unwrap unwraps the Interaction 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 (*Interaction) Update ¶
func (i *Interaction) Update() *InteractionUpdateOne
Update returns a builder for updating this Interaction. Note that you need to call Interaction.Unwrap() before calling this method if this Interaction was returned from a transaction, and the transaction was committed or rolled back.
type InteractionClient ¶
type InteractionClient struct {
// contains filtered or unexported fields
}
InteractionClient is a client for the Interaction schema.
func NewInteractionClient ¶
func NewInteractionClient(c config) *InteractionClient
NewInteractionClient returns a client for the Interaction from the given config.
func (*InteractionClient) Create ¶
func (c *InteractionClient) Create() *InteractionCreate
Create returns a builder for creating a Interaction entity.
func (*InteractionClient) CreateBulk ¶
func (c *InteractionClient) CreateBulk(builders ...*InteractionCreate) *InteractionCreateBulk
CreateBulk returns a builder for creating a bulk of Interaction entities.
func (*InteractionClient) Delete ¶
func (c *InteractionClient) Delete() *InteractionDelete
Delete returns a delete builder for Interaction.
func (*InteractionClient) DeleteOne ¶
func (c *InteractionClient) DeleteOne(i *Interaction) *InteractionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InteractionClient) DeleteOneID ¶
func (c *InteractionClient) DeleteOneID(id int) *InteractionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InteractionClient) Get ¶
func (c *InteractionClient) Get(ctx context.Context, id int) (*Interaction, error)
Get returns a Interaction entity by its id.
func (*InteractionClient) GetX ¶
func (c *InteractionClient) GetX(ctx context.Context, id int) *Interaction
GetX is like Get, but panics if an error occurs.
func (*InteractionClient) Hooks ¶
func (c *InteractionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InteractionClient) Query ¶
func (c *InteractionClient) Query() *InteractionQuery
Query returns a query builder for Interaction.
func (*InteractionClient) QuerySqueak ¶
func (c *InteractionClient) QuerySqueak(i *Interaction) *SqueakQuery
QuerySqueak queries the squeak edge of a Interaction.
func (*InteractionClient) QueryUser ¶
func (c *InteractionClient) QueryUser(i *Interaction) *UserQuery
QueryUser queries the user edge of a Interaction.
func (*InteractionClient) Update ¶
func (c *InteractionClient) Update() *InteractionUpdate
Update returns an update builder for Interaction.
func (*InteractionClient) UpdateOne ¶
func (c *InteractionClient) UpdateOne(i *Interaction) *InteractionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InteractionClient) UpdateOneID ¶
func (c *InteractionClient) UpdateOneID(id int) *InteractionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InteractionClient) Use ¶
func (c *InteractionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `interaction.Hooks(f(g(h())))`.
type InteractionCreate ¶
type InteractionCreate struct {
// contains filtered or unexported fields
}
InteractionCreate is the builder for creating a Interaction entity.
func (*InteractionCreate) Exec ¶
func (ic *InteractionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InteractionCreate) ExecX ¶
func (ic *InteractionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InteractionCreate) Mutation ¶
func (ic *InteractionCreate) Mutation() *InteractionMutation
Mutation returns the InteractionMutation object of the builder.
func (*InteractionCreate) Save ¶
func (ic *InteractionCreate) Save(ctx context.Context) (*Interaction, error)
Save creates the Interaction in the database.
func (*InteractionCreate) SaveX ¶
func (ic *InteractionCreate) SaveX(ctx context.Context) *Interaction
SaveX calls Save and panics if Save returns an error.
func (*InteractionCreate) SetCreateTime ¶
func (ic *InteractionCreate) SetCreateTime(t time.Time) *InteractionCreate
SetCreateTime sets the "create_time" field.
func (*InteractionCreate) SetNillableCreateTime ¶
func (ic *InteractionCreate) SetNillableCreateTime(t *time.Time) *InteractionCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*InteractionCreate) SetNillableSqueakID ¶
func (ic *InteractionCreate) SetNillableSqueakID(id *int) *InteractionCreate
SetNillableSqueakID sets the "squeak" edge to the Squeak entity by ID if the given value is not nil.
func (*InteractionCreate) SetNillableUserID ¶
func (ic *InteractionCreate) SetNillableUserID(id *int) *InteractionCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*InteractionCreate) SetSqueak ¶
func (ic *InteractionCreate) SetSqueak(s *Squeak) *InteractionCreate
SetSqueak sets the "squeak" edge to the Squeak entity.
func (*InteractionCreate) SetSqueakID ¶
func (ic *InteractionCreate) SetSqueakID(id int) *InteractionCreate
SetSqueakID sets the "squeak" edge to the Squeak entity by ID.
func (*InteractionCreate) SetType ¶
func (ic *InteractionCreate) SetType(e enums.Interaction) *InteractionCreate
SetType sets the "type" field.
func (*InteractionCreate) SetUser ¶
func (ic *InteractionCreate) SetUser(u *User) *InteractionCreate
SetUser sets the "user" edge to the User entity.
func (*InteractionCreate) SetUserID ¶
func (ic *InteractionCreate) SetUserID(id int) *InteractionCreate
SetUserID sets the "user" edge to the User entity by ID.
type InteractionCreateBulk ¶
type InteractionCreateBulk struct {
// contains filtered or unexported fields
}
InteractionCreateBulk is the builder for creating many Interaction entities in bulk.
func (*InteractionCreateBulk) Exec ¶
func (icb *InteractionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InteractionCreateBulk) ExecX ¶
func (icb *InteractionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InteractionCreateBulk) Save ¶
func (icb *InteractionCreateBulk) Save(ctx context.Context) ([]*Interaction, error)
Save creates the Interaction entities in the database.
func (*InteractionCreateBulk) SaveX ¶
func (icb *InteractionCreateBulk) SaveX(ctx context.Context) []*Interaction
SaveX is like Save, but panics if an error occurs.
type InteractionDelete ¶
type InteractionDelete struct {
// contains filtered or unexported fields
}
InteractionDelete is the builder for deleting a Interaction entity.
func (*InteractionDelete) Exec ¶
func (id *InteractionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InteractionDelete) ExecX ¶
func (id *InteractionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InteractionDelete) Where ¶
func (id *InteractionDelete) Where(ps ...predicate.Interaction) *InteractionDelete
Where appends a list predicates to the InteractionDelete builder.
type InteractionDeleteOne ¶
type InteractionDeleteOne struct {
// contains filtered or unexported fields
}
InteractionDeleteOne is the builder for deleting a single Interaction entity.
func (*InteractionDeleteOne) Exec ¶
func (ido *InteractionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InteractionDeleteOne) ExecX ¶
func (ido *InteractionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type InteractionEdges ¶
type InteractionEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Squeak holds the value of the squeak edge. Squeak *Squeak `json:"squeak,omitempty"` // contains filtered or unexported fields }
InteractionEdges holds the relations/edges for other nodes in the graph.
func (InteractionEdges) SqueakOrErr ¶
func (e InteractionEdges) SqueakOrErr() (*Squeak, error)
SqueakOrErr returns the Squeak value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (InteractionEdges) UserOrErr ¶
func (e InteractionEdges) 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 InteractionGroupBy ¶
type InteractionGroupBy struct {
// contains filtered or unexported fields
}
InteractionGroupBy is the group-by builder for Interaction entities.
func (*InteractionGroupBy) Aggregate ¶
func (igb *InteractionGroupBy) Aggregate(fns ...AggregateFunc) *InteractionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InteractionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InteractionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InteractionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InteractionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InteractionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InteractionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InteractionGroupBy) Scan ¶
func (igb *InteractionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*InteractionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InteractionMutation ¶
type InteractionMutation struct {
// contains filtered or unexported fields
}
InteractionMutation represents an operation that mutates the Interaction nodes in the graph.
func (*InteractionMutation) AddField ¶
func (m *InteractionMutation) 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 (*InteractionMutation) AddedEdges ¶
func (m *InteractionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InteractionMutation) AddedField ¶
func (m *InteractionMutation) 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 (*InteractionMutation) AddedFields ¶
func (m *InteractionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InteractionMutation) AddedIDs ¶
func (m *InteractionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InteractionMutation) ClearEdge ¶
func (m *InteractionMutation) 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 (*InteractionMutation) ClearField ¶
func (m *InteractionMutation) 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 (*InteractionMutation) ClearSqueak ¶
func (m *InteractionMutation) ClearSqueak()
ClearSqueak clears the "squeak" edge to the Squeak entity.
func (*InteractionMutation) ClearUser ¶
func (m *InteractionMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*InteractionMutation) ClearedEdges ¶
func (m *InteractionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InteractionMutation) ClearedFields ¶
func (m *InteractionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InteractionMutation) Client ¶
func (m InteractionMutation) 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 (*InteractionMutation) CreateTime ¶
func (m *InteractionMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*InteractionMutation) EdgeCleared ¶
func (m *InteractionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InteractionMutation) Field ¶
func (m *InteractionMutation) 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 (*InteractionMutation) FieldCleared ¶
func (m *InteractionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InteractionMutation) Fields ¶
func (m *InteractionMutation) 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 (*InteractionMutation) GetType ¶
func (m *InteractionMutation) GetType() (r enums.Interaction, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*InteractionMutation) ID ¶
func (m *InteractionMutation) 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 (*InteractionMutation) IDs ¶
func (m *InteractionMutation) 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 (*InteractionMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Interaction entity. If the Interaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*InteractionMutation) 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 (*InteractionMutation) OldType ¶
func (m *InteractionMutation) OldType(ctx context.Context) (v enums.Interaction, err error)
OldType returns the old "type" field's value of the Interaction entity. If the Interaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*InteractionMutation) Op ¶
func (m *InteractionMutation) Op() Op
Op returns the operation name.
func (*InteractionMutation) RemovedEdges ¶
func (m *InteractionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InteractionMutation) RemovedIDs ¶
func (m *InteractionMutation) 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 (*InteractionMutation) ResetCreateTime ¶
func (m *InteractionMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*InteractionMutation) ResetEdge ¶
func (m *InteractionMutation) 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 (*InteractionMutation) ResetField ¶
func (m *InteractionMutation) 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 (*InteractionMutation) ResetSqueak ¶
func (m *InteractionMutation) ResetSqueak()
ResetSqueak resets all changes to the "squeak" edge.
func (*InteractionMutation) ResetType ¶
func (m *InteractionMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*InteractionMutation) ResetUser ¶
func (m *InteractionMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*InteractionMutation) SetCreateTime ¶
func (m *InteractionMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*InteractionMutation) SetField ¶
func (m *InteractionMutation) 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 (*InteractionMutation) SetSqueakID ¶
func (m *InteractionMutation) SetSqueakID(id int)
SetSqueakID sets the "squeak" edge to the Squeak entity by id.
func (*InteractionMutation) SetType ¶
func (m *InteractionMutation) SetType(e enums.Interaction)
SetType sets the "type" field.
func (*InteractionMutation) SetUserID ¶
func (m *InteractionMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*InteractionMutation) SqueakCleared ¶
func (m *InteractionMutation) SqueakCleared() bool
SqueakCleared reports if the "squeak" edge to the Squeak entity was cleared.
func (*InteractionMutation) SqueakID ¶
func (m *InteractionMutation) SqueakID() (id int, exists bool)
SqueakID returns the "squeak" edge ID in the mutation.
func (*InteractionMutation) SqueakIDs ¶
func (m *InteractionMutation) SqueakIDs() (ids []int)
SqueakIDs returns the "squeak" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SqueakID instead. It exists only for internal usage by the builders.
func (InteractionMutation) Tx ¶
func (m InteractionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InteractionMutation) Type ¶
func (m *InteractionMutation) Type() string
Type returns the node type of this mutation (Interaction).
func (*InteractionMutation) UserCleared ¶
func (m *InteractionMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*InteractionMutation) UserID ¶
func (m *InteractionMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*InteractionMutation) UserIDs ¶
func (m *InteractionMutation) 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 (*InteractionMutation) Where ¶
func (m *InteractionMutation) Where(ps ...predicate.Interaction)
Where appends a list predicates to the InteractionMutation builder.
type InteractionQuery ¶
type InteractionQuery struct {
// contains filtered or unexported fields
}
InteractionQuery is the builder for querying Interaction entities.
func (*InteractionQuery) Aggregate ¶
func (iq *InteractionQuery) Aggregate(fns ...AggregateFunc) *InteractionSelect
Aggregate returns a InteractionSelect configured with the given aggregations.
func (*InteractionQuery) All ¶
func (iq *InteractionQuery) All(ctx context.Context) ([]*Interaction, error)
All executes the query and returns a list of Interactions.
func (*InteractionQuery) AllX ¶
func (iq *InteractionQuery) AllX(ctx context.Context) []*Interaction
AllX is like All, but panics if an error occurs.
func (*InteractionQuery) Clone ¶
func (iq *InteractionQuery) Clone() *InteractionQuery
Clone returns a duplicate of the InteractionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InteractionQuery) Count ¶
func (iq *InteractionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InteractionQuery) CountX ¶
func (iq *InteractionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InteractionQuery) Exist ¶
func (iq *InteractionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InteractionQuery) ExistX ¶
func (iq *InteractionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InteractionQuery) First ¶
func (iq *InteractionQuery) First(ctx context.Context) (*Interaction, error)
First returns the first Interaction entity from the query. Returns a *NotFoundError when no Interaction was found.
func (*InteractionQuery) FirstID ¶
func (iq *InteractionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Interaction ID from the query. Returns a *NotFoundError when no Interaction ID was found.
func (*InteractionQuery) FirstIDX ¶
func (iq *InteractionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*InteractionQuery) FirstX ¶
func (iq *InteractionQuery) FirstX(ctx context.Context) *Interaction
FirstX is like First, but panics if an error occurs.
func (*InteractionQuery) GroupBy ¶
func (iq *InteractionQuery) GroupBy(field string, fields ...string) *InteractionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Interaction.Query(). GroupBy(interaction.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InteractionQuery) IDs ¶
func (iq *InteractionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Interaction IDs.
func (*InteractionQuery) IDsX ¶
func (iq *InteractionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*InteractionQuery) Limit ¶
func (iq *InteractionQuery) Limit(limit int) *InteractionQuery
Limit adds a limit step to the query.
func (*InteractionQuery) Offset ¶
func (iq *InteractionQuery) Offset(offset int) *InteractionQuery
Offset adds an offset step to the query.
func (*InteractionQuery) Only ¶
func (iq *InteractionQuery) Only(ctx context.Context) (*Interaction, error)
Only returns a single Interaction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Interaction entity is found. Returns a *NotFoundError when no Interaction entities are found.
func (*InteractionQuery) OnlyID ¶
func (iq *InteractionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Interaction ID in the query. Returns a *NotSingularError when more than one Interaction ID is found. Returns a *NotFoundError when no entities are found.
func (*InteractionQuery) OnlyIDX ¶
func (iq *InteractionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InteractionQuery) OnlyX ¶
func (iq *InteractionQuery) OnlyX(ctx context.Context) *Interaction
OnlyX is like Only, but panics if an error occurs.
func (*InteractionQuery) Order ¶
func (iq *InteractionQuery) Order(o ...OrderFunc) *InteractionQuery
Order adds an order step to the query.
func (*InteractionQuery) QuerySqueak ¶
func (iq *InteractionQuery) QuerySqueak() *SqueakQuery
QuerySqueak chains the current query on the "squeak" edge.
func (*InteractionQuery) QueryUser ¶
func (iq *InteractionQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*InteractionQuery) Select ¶
func (iq *InteractionQuery) Select(fields ...string) *InteractionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Interaction.Query(). Select(interaction.FieldCreateTime). Scan(ctx, &v)
func (*InteractionQuery) Unique ¶
func (iq *InteractionQuery) Unique(unique bool) *InteractionQuery
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 (*InteractionQuery) Where ¶
func (iq *InteractionQuery) Where(ps ...predicate.Interaction) *InteractionQuery
Where adds a new predicate for the InteractionQuery builder.
func (*InteractionQuery) WithSqueak ¶
func (iq *InteractionQuery) WithSqueak(opts ...func(*SqueakQuery)) *InteractionQuery
WithSqueak tells the query-builder to eager-load the nodes that are connected to the "squeak" edge. The optional arguments are used to configure the query builder of the edge.
func (*InteractionQuery) WithUser ¶
func (iq *InteractionQuery) WithUser(opts ...func(*UserQuery)) *InteractionQuery
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 InteractionSelect ¶
type InteractionSelect struct { *InteractionQuery // contains filtered or unexported fields }
InteractionSelect is the builder for selecting fields of Interaction entities.
func (*InteractionSelect) Aggregate ¶
func (is *InteractionSelect) Aggregate(fns ...AggregateFunc) *InteractionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*InteractionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InteractionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InteractionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InteractionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InteractionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InteractionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InteractionSelect) Scan ¶
func (is *InteractionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InteractionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InteractionUpdate ¶
type InteractionUpdate struct {
// contains filtered or unexported fields
}
InteractionUpdate is the builder for updating Interaction entities.
func (*InteractionUpdate) ClearSqueak ¶
func (iu *InteractionUpdate) ClearSqueak() *InteractionUpdate
ClearSqueak clears the "squeak" edge to the Squeak entity.
func (*InteractionUpdate) ClearUser ¶
func (iu *InteractionUpdate) ClearUser() *InteractionUpdate
ClearUser clears the "user" edge to the User entity.
func (*InteractionUpdate) Exec ¶
func (iu *InteractionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InteractionUpdate) ExecX ¶
func (iu *InteractionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InteractionUpdate) Mutation ¶
func (iu *InteractionUpdate) Mutation() *InteractionMutation
Mutation returns the InteractionMutation object of the builder.
func (*InteractionUpdate) Save ¶
func (iu *InteractionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InteractionUpdate) SaveX ¶
func (iu *InteractionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InteractionUpdate) SetNillableSqueakID ¶
func (iu *InteractionUpdate) SetNillableSqueakID(id *int) *InteractionUpdate
SetNillableSqueakID sets the "squeak" edge to the Squeak entity by ID if the given value is not nil.
func (*InteractionUpdate) SetNillableUserID ¶
func (iu *InteractionUpdate) SetNillableUserID(id *int) *InteractionUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*InteractionUpdate) SetSqueak ¶
func (iu *InteractionUpdate) SetSqueak(s *Squeak) *InteractionUpdate
SetSqueak sets the "squeak" edge to the Squeak entity.
func (*InteractionUpdate) SetSqueakID ¶
func (iu *InteractionUpdate) SetSqueakID(id int) *InteractionUpdate
SetSqueakID sets the "squeak" edge to the Squeak entity by ID.
func (*InteractionUpdate) SetType ¶
func (iu *InteractionUpdate) SetType(e enums.Interaction) *InteractionUpdate
SetType sets the "type" field.
func (*InteractionUpdate) SetUser ¶
func (iu *InteractionUpdate) SetUser(u *User) *InteractionUpdate
SetUser sets the "user" edge to the User entity.
func (*InteractionUpdate) SetUserID ¶
func (iu *InteractionUpdate) SetUserID(id int) *InteractionUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*InteractionUpdate) Where ¶
func (iu *InteractionUpdate) Where(ps ...predicate.Interaction) *InteractionUpdate
Where appends a list predicates to the InteractionUpdate builder.
type InteractionUpdateOne ¶
type InteractionUpdateOne struct {
// contains filtered or unexported fields
}
InteractionUpdateOne is the builder for updating a single Interaction entity.
func (*InteractionUpdateOne) ClearSqueak ¶
func (iuo *InteractionUpdateOne) ClearSqueak() *InteractionUpdateOne
ClearSqueak clears the "squeak" edge to the Squeak entity.
func (*InteractionUpdateOne) ClearUser ¶
func (iuo *InteractionUpdateOne) ClearUser() *InteractionUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*InteractionUpdateOne) Exec ¶
func (iuo *InteractionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InteractionUpdateOne) ExecX ¶
func (iuo *InteractionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InteractionUpdateOne) Mutation ¶
func (iuo *InteractionUpdateOne) Mutation() *InteractionMutation
Mutation returns the InteractionMutation object of the builder.
func (*InteractionUpdateOne) Save ¶
func (iuo *InteractionUpdateOne) Save(ctx context.Context) (*Interaction, error)
Save executes the query and returns the updated Interaction entity.
func (*InteractionUpdateOne) SaveX ¶
func (iuo *InteractionUpdateOne) SaveX(ctx context.Context) *Interaction
SaveX is like Save, but panics if an error occurs.
func (*InteractionUpdateOne) Select ¶
func (iuo *InteractionUpdateOne) Select(field string, fields ...string) *InteractionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InteractionUpdateOne) SetNillableSqueakID ¶
func (iuo *InteractionUpdateOne) SetNillableSqueakID(id *int) *InteractionUpdateOne
SetNillableSqueakID sets the "squeak" edge to the Squeak entity by ID if the given value is not nil.
func (*InteractionUpdateOne) SetNillableUserID ¶
func (iuo *InteractionUpdateOne) SetNillableUserID(id *int) *InteractionUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*InteractionUpdateOne) SetSqueak ¶
func (iuo *InteractionUpdateOne) SetSqueak(s *Squeak) *InteractionUpdateOne
SetSqueak sets the "squeak" edge to the Squeak entity.
func (*InteractionUpdateOne) SetSqueakID ¶
func (iuo *InteractionUpdateOne) SetSqueakID(id int) *InteractionUpdateOne
SetSqueakID sets the "squeak" edge to the Squeak entity by ID.
func (*InteractionUpdateOne) SetType ¶
func (iuo *InteractionUpdateOne) SetType(e enums.Interaction) *InteractionUpdateOne
SetType sets the "type" field.
func (*InteractionUpdateOne) SetUser ¶
func (iuo *InteractionUpdateOne) SetUser(u *User) *InteractionUpdateOne
SetUser sets the "user" edge to the User entity.
func (*InteractionUpdateOne) SetUserID ¶
func (iuo *InteractionUpdateOne) SetUserID(id int) *InteractionUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type Interactions ¶
type Interactions []*Interaction
Interactions is a parsable slice of Interaction.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Pool ¶
type Pool struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Amount holds the value of the "amount" field. Amount *types.Uint256 `json:"amount,omitempty"` Shares *types.Uint256 `json:"shares,omitempty"` // BlockNumber holds the value of the "block_number" field. BlockNumber *types.Uint256 `json:"block_number,omitempty"` // Score holds the value of the "score" field. Score int `json:"score,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PoolQuery when eager-loading is set. Edges PoolEdges `json:"edges"` // contains filtered or unexported fields }
Pool is the model entity for the Pool schema.
func (*Pool) QueryPoolPasses ¶
func (po *Pool) QueryPoolPasses() *PoolPassQuery
QueryPoolPasses queries the "pool_passes" edge of the Pool entity.
func (*Pool) QuerySqueak ¶
func (po *Pool) QuerySqueak() *SqueakQuery
QuerySqueak queries the "squeak" edge of the Pool entity.
func (*Pool) Unwrap ¶
Unwrap unwraps the Pool 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 (*Pool) Update ¶
func (po *Pool) Update() *PoolUpdateOne
Update returns a builder for updating this Pool. Note that you need to call Pool.Unwrap() before calling this method if this Pool was returned from a transaction, and the transaction was committed or rolled back.
type PoolClient ¶
type PoolClient struct {
// contains filtered or unexported fields
}
PoolClient is a client for the Pool schema.
func NewPoolClient ¶
func NewPoolClient(c config) *PoolClient
NewPoolClient returns a client for the Pool from the given config.
func (*PoolClient) Create ¶
func (c *PoolClient) Create() *PoolCreate
Create returns a builder for creating a Pool entity.
func (*PoolClient) CreateBulk ¶
func (c *PoolClient) CreateBulk(builders ...*PoolCreate) *PoolCreateBulk
CreateBulk returns a builder for creating a bulk of Pool entities.
func (*PoolClient) Delete ¶
func (c *PoolClient) Delete() *PoolDelete
Delete returns a delete builder for Pool.
func (*PoolClient) DeleteOne ¶
func (c *PoolClient) DeleteOne(po *Pool) *PoolDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PoolClient) DeleteOneID ¶
func (c *PoolClient) DeleteOneID(id int) *PoolDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PoolClient) GetX ¶
func (c *PoolClient) GetX(ctx context.Context, id int) *Pool
GetX is like Get, but panics if an error occurs.
func (*PoolClient) Query ¶
func (c *PoolClient) Query() *PoolQuery
Query returns a query builder for Pool.
func (*PoolClient) QueryPoolPasses ¶
func (c *PoolClient) QueryPoolPasses(po *Pool) *PoolPassQuery
QueryPoolPasses queries the pool_passes edge of a Pool.
func (*PoolClient) QuerySqueak ¶
func (c *PoolClient) QuerySqueak(po *Pool) *SqueakQuery
QuerySqueak queries the squeak edge of a Pool.
func (*PoolClient) Update ¶
func (c *PoolClient) Update() *PoolUpdate
Update returns an update builder for Pool.
func (*PoolClient) UpdateOne ¶
func (c *PoolClient) UpdateOne(po *Pool) *PoolUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PoolClient) UpdateOneID ¶
func (c *PoolClient) UpdateOneID(id int) *PoolUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PoolClient) Use ¶
func (c *PoolClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `pool.Hooks(f(g(h())))`.
type PoolCreate ¶
type PoolCreate struct {
// contains filtered or unexported fields
}
PoolCreate is the builder for creating a Pool entity.
func (*PoolCreate) AddPoolPassIDs ¶
func (pc *PoolCreate) AddPoolPassIDs(ids ...int) *PoolCreate
AddPoolPassIDs adds the "pool_passes" edge to the PoolPass entity by IDs.
func (*PoolCreate) AddPoolPasses ¶
func (pc *PoolCreate) AddPoolPasses(p ...*PoolPass) *PoolCreate
AddPoolPasses adds the "pool_passes" edges to the PoolPass entity.
func (*PoolCreate) Exec ¶
func (pc *PoolCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PoolCreate) ExecX ¶
func (pc *PoolCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolCreate) Mutation ¶
func (pc *PoolCreate) Mutation() *PoolMutation
Mutation returns the PoolMutation object of the builder.
func (*PoolCreate) Save ¶
func (pc *PoolCreate) Save(ctx context.Context) (*Pool, error)
Save creates the Pool in the database.
func (*PoolCreate) SaveX ¶
func (pc *PoolCreate) SaveX(ctx context.Context) *Pool
SaveX calls Save and panics if Save returns an error.
func (*PoolCreate) SetAmount ¶
func (pc *PoolCreate) SetAmount(t *types.Uint256) *PoolCreate
SetAmount sets the "amount" field.
func (*PoolCreate) SetBlockNumber ¶
func (pc *PoolCreate) SetBlockNumber(t *types.Uint256) *PoolCreate
SetBlockNumber sets the "block_number" field.
func (*PoolCreate) SetCreateTime ¶
func (pc *PoolCreate) SetCreateTime(t time.Time) *PoolCreate
SetCreateTime sets the "create_time" field.
func (*PoolCreate) SetNillableCreateTime ¶
func (pc *PoolCreate) SetNillableCreateTime(t *time.Time) *PoolCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*PoolCreate) SetNillableSqueakID ¶
func (pc *PoolCreate) SetNillableSqueakID(id *int) *PoolCreate
SetNillableSqueakID sets the "squeak" edge to the Squeak entity by ID if the given value is not nil.
func (*PoolCreate) SetNillableUpdateTime ¶
func (pc *PoolCreate) SetNillableUpdateTime(t *time.Time) *PoolCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*PoolCreate) SetScore ¶
func (pc *PoolCreate) SetScore(i int) *PoolCreate
SetScore sets the "score" field.
func (*PoolCreate) SetShares ¶
func (pc *PoolCreate) SetShares(t *types.Uint256) *PoolCreate
SetShares sets the "shares" field.
func (*PoolCreate) SetSqueak ¶
func (pc *PoolCreate) SetSqueak(s *Squeak) *PoolCreate
SetSqueak sets the "squeak" edge to the Squeak entity.
func (*PoolCreate) SetSqueakID ¶
func (pc *PoolCreate) SetSqueakID(id int) *PoolCreate
SetSqueakID sets the "squeak" edge to the Squeak entity by ID.
func (*PoolCreate) SetUpdateTime ¶
func (pc *PoolCreate) SetUpdateTime(t time.Time) *PoolCreate
SetUpdateTime sets the "update_time" field.
type PoolCreateBulk ¶
type PoolCreateBulk struct {
// contains filtered or unexported fields
}
PoolCreateBulk is the builder for creating many Pool entities in bulk.
func (*PoolCreateBulk) Exec ¶
func (pcb *PoolCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PoolCreateBulk) ExecX ¶
func (pcb *PoolCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PoolDelete ¶
type PoolDelete struct {
// contains filtered or unexported fields
}
PoolDelete is the builder for deleting a Pool entity.
func (*PoolDelete) Exec ¶
func (pd *PoolDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PoolDelete) ExecX ¶
func (pd *PoolDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PoolDelete) Where ¶
func (pd *PoolDelete) Where(ps ...predicate.Pool) *PoolDelete
Where appends a list predicates to the PoolDelete builder.
type PoolDeleteOne ¶
type PoolDeleteOne struct {
// contains filtered or unexported fields
}
PoolDeleteOne is the builder for deleting a single Pool entity.
func (*PoolDeleteOne) Exec ¶
func (pdo *PoolDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PoolDeleteOne) ExecX ¶
func (pdo *PoolDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PoolEdges ¶
type PoolEdges struct { // PoolPasses holds the value of the pool_passes edge. PoolPasses []*PoolPass `json:"pool_passes,omitempty"` // Squeak holds the value of the squeak edge. Squeak *Squeak `json:"squeak,omitempty"` // contains filtered or unexported fields }
PoolEdges holds the relations/edges for other nodes in the graph.
func (PoolEdges) PoolPassesOrErr ¶
PoolPassesOrErr returns the PoolPasses value or an error if the edge was not loaded in eager-loading.
func (PoolEdges) SqueakOrErr ¶
SqueakOrErr returns the Squeak value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PoolGroupBy ¶
type PoolGroupBy struct {
// contains filtered or unexported fields
}
PoolGroupBy is the group-by builder for Pool entities.
func (*PoolGroupBy) Aggregate ¶
func (pgb *PoolGroupBy) Aggregate(fns ...AggregateFunc) *PoolGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PoolGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Scan ¶
func (pgb *PoolGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*PoolGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PoolMutation ¶
type PoolMutation struct {
// contains filtered or unexported fields
}
PoolMutation represents an operation that mutates the Pool nodes in the graph.
func (*PoolMutation) AddField ¶
func (m *PoolMutation) 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 (*PoolMutation) AddPoolPassIDs ¶
func (m *PoolMutation) AddPoolPassIDs(ids ...int)
AddPoolPassIDs adds the "pool_passes" edge to the PoolPass entity by ids.
func (*PoolMutation) AddScore ¶
func (m *PoolMutation) AddScore(i int)
AddScore adds i to the "score" field.
func (*PoolMutation) AddedEdges ¶
func (m *PoolMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PoolMutation) AddedField ¶
func (m *PoolMutation) 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 (*PoolMutation) AddedFields ¶
func (m *PoolMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PoolMutation) AddedIDs ¶
func (m *PoolMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PoolMutation) AddedScore ¶
func (m *PoolMutation) AddedScore() (r int, exists bool)
AddedScore returns the value that was added to the "score" field in this mutation.
func (*PoolMutation) Amount ¶
func (m *PoolMutation) Amount() (r *types.Uint256, exists bool)
Amount returns the value of the "amount" field in the mutation.
func (*PoolMutation) BlockNumber ¶
func (m *PoolMutation) BlockNumber() (r *types.Uint256, exists bool)
BlockNumber returns the value of the "block_number" field in the mutation.
func (*PoolMutation) ClearEdge ¶
func (m *PoolMutation) 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 (*PoolMutation) ClearField ¶
func (m *PoolMutation) 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 (*PoolMutation) ClearPoolPasses ¶
func (m *PoolMutation) ClearPoolPasses()
ClearPoolPasses clears the "pool_passes" edge to the PoolPass entity.
func (*PoolMutation) ClearSqueak ¶
func (m *PoolMutation) ClearSqueak()
ClearSqueak clears the "squeak" edge to the Squeak entity.
func (*PoolMutation) ClearedEdges ¶
func (m *PoolMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PoolMutation) ClearedFields ¶
func (m *PoolMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PoolMutation) Client ¶
func (m PoolMutation) 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 (*PoolMutation) CreateTime ¶
func (m *PoolMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*PoolMutation) EdgeCleared ¶
func (m *PoolMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PoolMutation) Field ¶
func (m *PoolMutation) 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 (*PoolMutation) FieldCleared ¶
func (m *PoolMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PoolMutation) Fields ¶
func (m *PoolMutation) 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 (*PoolMutation) ID ¶
func (m *PoolMutation) 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 (*PoolMutation) IDs ¶
func (m *PoolMutation) 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 (*PoolMutation) OldAmount ¶
OldAmount returns the old "amount" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) OldBlockNumber ¶
OldBlockNumber returns the old "block_number" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) 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 (*PoolMutation) OldScore ¶
func (m *PoolMutation) OldScore(ctx context.Context) (v int, err error)
OldScore returns the old "score" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) OldShares ¶
OldShares returns the old "shares" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) PoolPassesCleared ¶
func (m *PoolMutation) PoolPassesCleared() bool
PoolPassesCleared reports if the "pool_passes" edge to the PoolPass entity was cleared.
func (*PoolMutation) PoolPassesIDs ¶
func (m *PoolMutation) PoolPassesIDs() (ids []int)
PoolPassesIDs returns the "pool_passes" edge IDs in the mutation.
func (*PoolMutation) RemovePoolPassIDs ¶
func (m *PoolMutation) RemovePoolPassIDs(ids ...int)
RemovePoolPassIDs removes the "pool_passes" edge to the PoolPass entity by IDs.
func (*PoolMutation) RemovedEdges ¶
func (m *PoolMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PoolMutation) RemovedIDs ¶
func (m *PoolMutation) 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 (*PoolMutation) RemovedPoolPassesIDs ¶
func (m *PoolMutation) RemovedPoolPassesIDs() (ids []int)
RemovedPoolPasses returns the removed IDs of the "pool_passes" edge to the PoolPass entity.
func (*PoolMutation) ResetAmount ¶
func (m *PoolMutation) ResetAmount()
ResetAmount resets all changes to the "amount" field.
func (*PoolMutation) ResetBlockNumber ¶
func (m *PoolMutation) ResetBlockNumber()
ResetBlockNumber resets all changes to the "block_number" field.
func (*PoolMutation) ResetCreateTime ¶
func (m *PoolMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*PoolMutation) ResetEdge ¶
func (m *PoolMutation) 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 (*PoolMutation) ResetField ¶
func (m *PoolMutation) 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 (*PoolMutation) ResetPoolPasses ¶
func (m *PoolMutation) ResetPoolPasses()
ResetPoolPasses resets all changes to the "pool_passes" edge.
func (*PoolMutation) ResetScore ¶
func (m *PoolMutation) ResetScore()
ResetScore resets all changes to the "score" field.
func (*PoolMutation) ResetShares ¶
func (m *PoolMutation) ResetShares()
ResetShares resets all changes to the "shares" field.
func (*PoolMutation) ResetSqueak ¶
func (m *PoolMutation) ResetSqueak()
ResetSqueak resets all changes to the "squeak" edge.
func (*PoolMutation) ResetUpdateTime ¶
func (m *PoolMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*PoolMutation) Score ¶
func (m *PoolMutation) Score() (r int, exists bool)
Score returns the value of the "score" field in the mutation.
func (*PoolMutation) SetAmount ¶
func (m *PoolMutation) SetAmount(t *types.Uint256)
SetAmount sets the "amount" field.
func (*PoolMutation) SetBlockNumber ¶
func (m *PoolMutation) SetBlockNumber(t *types.Uint256)
SetBlockNumber sets the "block_number" field.
func (*PoolMutation) SetCreateTime ¶
func (m *PoolMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*PoolMutation) SetField ¶
func (m *PoolMutation) 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 (*PoolMutation) SetScore ¶
func (m *PoolMutation) SetScore(i int)
SetScore sets the "score" field.
func (*PoolMutation) SetShares ¶
func (m *PoolMutation) SetShares(t *types.Uint256)
SetShares sets the "shares" field.
func (*PoolMutation) SetSqueakID ¶
func (m *PoolMutation) SetSqueakID(id int)
SetSqueakID sets the "squeak" edge to the Squeak entity by id.
func (*PoolMutation) SetUpdateTime ¶
func (m *PoolMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*PoolMutation) Shares ¶
func (m *PoolMutation) Shares() (r *types.Uint256, exists bool)
Shares returns the value of the "shares" field in the mutation.
func (*PoolMutation) SqueakCleared ¶
func (m *PoolMutation) SqueakCleared() bool
SqueakCleared reports if the "squeak" edge to the Squeak entity was cleared.
func (*PoolMutation) SqueakID ¶
func (m *PoolMutation) SqueakID() (id int, exists bool)
SqueakID returns the "squeak" edge ID in the mutation.
func (*PoolMutation) SqueakIDs ¶
func (m *PoolMutation) SqueakIDs() (ids []int)
SqueakIDs returns the "squeak" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SqueakID instead. It exists only for internal usage by the builders.
func (PoolMutation) Tx ¶
func (m PoolMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PoolMutation) Type ¶
func (m *PoolMutation) Type() string
Type returns the node type of this mutation (Pool).
func (*PoolMutation) UpdateTime ¶
func (m *PoolMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*PoolMutation) Where ¶
func (m *PoolMutation) Where(ps ...predicate.Pool)
Where appends a list predicates to the PoolMutation builder.
type PoolPass ¶
type PoolPass struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` Shares *types.Uint256 `json:"shares,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PoolPassQuery when eager-loading is set. Edges PoolPassEdges `json:"edges"` // contains filtered or unexported fields }
PoolPass is the model entity for the PoolPass schema.
func (*PoolPass) Unwrap ¶
Unwrap unwraps the PoolPass 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 (*PoolPass) Update ¶
func (pp *PoolPass) Update() *PoolPassUpdateOne
Update returns a builder for updating this PoolPass. Note that you need to call PoolPass.Unwrap() before calling this method if this PoolPass was returned from a transaction, and the transaction was committed or rolled back.
type PoolPassClient ¶
type PoolPassClient struct {
// contains filtered or unexported fields
}
PoolPassClient is a client for the PoolPass schema.
func NewPoolPassClient ¶
func NewPoolPassClient(c config) *PoolPassClient
NewPoolPassClient returns a client for the PoolPass from the given config.
func (*PoolPassClient) Create ¶
func (c *PoolPassClient) Create() *PoolPassCreate
Create returns a builder for creating a PoolPass entity.
func (*PoolPassClient) CreateBulk ¶
func (c *PoolPassClient) CreateBulk(builders ...*PoolPassCreate) *PoolPassCreateBulk
CreateBulk returns a builder for creating a bulk of PoolPass entities.
func (*PoolPassClient) Delete ¶
func (c *PoolPassClient) Delete() *PoolPassDelete
Delete returns a delete builder for PoolPass.
func (*PoolPassClient) DeleteOne ¶
func (c *PoolPassClient) DeleteOne(pp *PoolPass) *PoolPassDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PoolPassClient) DeleteOneID ¶
func (c *PoolPassClient) DeleteOneID(id int) *PoolPassDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PoolPassClient) GetX ¶
func (c *PoolPassClient) GetX(ctx context.Context, id int) *PoolPass
GetX is like Get, but panics if an error occurs.
func (*PoolPassClient) Hooks ¶
func (c *PoolPassClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PoolPassClient) Query ¶
func (c *PoolPassClient) Query() *PoolPassQuery
Query returns a query builder for PoolPass.
func (*PoolPassClient) QueryPool ¶
func (c *PoolPassClient) QueryPool(pp *PoolPass) *PoolQuery
QueryPool queries the pool edge of a PoolPass.
func (*PoolPassClient) QueryUser ¶
func (c *PoolPassClient) QueryUser(pp *PoolPass) *UserQuery
QueryUser queries the user edge of a PoolPass.
func (*PoolPassClient) Update ¶
func (c *PoolPassClient) Update() *PoolPassUpdate
Update returns an update builder for PoolPass.
func (*PoolPassClient) UpdateOne ¶
func (c *PoolPassClient) UpdateOne(pp *PoolPass) *PoolPassUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PoolPassClient) UpdateOneID ¶
func (c *PoolPassClient) UpdateOneID(id int) *PoolPassUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PoolPassClient) Use ¶
func (c *PoolPassClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `poolpass.Hooks(f(g(h())))`.
type PoolPassCreate ¶
type PoolPassCreate struct {
// contains filtered or unexported fields
}
PoolPassCreate is the builder for creating a PoolPass entity.
func (*PoolPassCreate) Exec ¶
func (ppc *PoolPassCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PoolPassCreate) ExecX ¶
func (ppc *PoolPassCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolPassCreate) Mutation ¶
func (ppc *PoolPassCreate) Mutation() *PoolPassMutation
Mutation returns the PoolPassMutation object of the builder.
func (*PoolPassCreate) Save ¶
func (ppc *PoolPassCreate) Save(ctx context.Context) (*PoolPass, error)
Save creates the PoolPass in the database.
func (*PoolPassCreate) SaveX ¶
func (ppc *PoolPassCreate) SaveX(ctx context.Context) *PoolPass
SaveX calls Save and panics if Save returns an error.
func (*PoolPassCreate) SetCreateTime ¶
func (ppc *PoolPassCreate) SetCreateTime(t time.Time) *PoolPassCreate
SetCreateTime sets the "create_time" field.
func (*PoolPassCreate) SetNillableCreateTime ¶
func (ppc *PoolPassCreate) SetNillableCreateTime(t *time.Time) *PoolPassCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*PoolPassCreate) SetNillablePoolID ¶
func (ppc *PoolPassCreate) SetNillablePoolID(id *int) *PoolPassCreate
SetNillablePoolID sets the "pool" edge to the Pool entity by ID if the given value is not nil.
func (*PoolPassCreate) SetNillableUserID ¶
func (ppc *PoolPassCreate) SetNillableUserID(id *int) *PoolPassCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*PoolPassCreate) SetPool ¶
func (ppc *PoolPassCreate) SetPool(p *Pool) *PoolPassCreate
SetPool sets the "pool" edge to the Pool entity.
func (*PoolPassCreate) SetPoolID ¶
func (ppc *PoolPassCreate) SetPoolID(id int) *PoolPassCreate
SetPoolID sets the "pool" edge to the Pool entity by ID.
func (*PoolPassCreate) SetShares ¶
func (ppc *PoolPassCreate) SetShares(t *types.Uint256) *PoolPassCreate
SetShares sets the "shares" field.
func (*PoolPassCreate) SetUser ¶
func (ppc *PoolPassCreate) SetUser(u *User) *PoolPassCreate
SetUser sets the "user" edge to the User entity.
func (*PoolPassCreate) SetUserID ¶
func (ppc *PoolPassCreate) SetUserID(id int) *PoolPassCreate
SetUserID sets the "user" edge to the User entity by ID.
type PoolPassCreateBulk ¶
type PoolPassCreateBulk struct {
// contains filtered or unexported fields
}
PoolPassCreateBulk is the builder for creating many PoolPass entities in bulk.
func (*PoolPassCreateBulk) Exec ¶
func (ppcb *PoolPassCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PoolPassCreateBulk) ExecX ¶
func (ppcb *PoolPassCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PoolPassDelete ¶
type PoolPassDelete struct {
// contains filtered or unexported fields
}
PoolPassDelete is the builder for deleting a PoolPass entity.
func (*PoolPassDelete) Exec ¶
func (ppd *PoolPassDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PoolPassDelete) ExecX ¶
func (ppd *PoolPassDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PoolPassDelete) Where ¶
func (ppd *PoolPassDelete) Where(ps ...predicate.PoolPass) *PoolPassDelete
Where appends a list predicates to the PoolPassDelete builder.
type PoolPassDeleteOne ¶
type PoolPassDeleteOne struct {
// contains filtered or unexported fields
}
PoolPassDeleteOne is the builder for deleting a single PoolPass entity.
func (*PoolPassDeleteOne) Exec ¶
func (ppdo *PoolPassDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PoolPassDeleteOne) ExecX ¶
func (ppdo *PoolPassDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PoolPassEdges ¶
type PoolPassEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Pool holds the value of the pool edge. Pool *Pool `json:"pool,omitempty"` // contains filtered or unexported fields }
PoolPassEdges holds the relations/edges for other nodes in the graph.
func (PoolPassEdges) PoolOrErr ¶
func (e PoolPassEdges) PoolOrErr() (*Pool, error)
PoolOrErr returns the Pool value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PoolPassEdges) UserOrErr ¶
func (e PoolPassEdges) 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 PoolPassGroupBy ¶
type PoolPassGroupBy struct {
// contains filtered or unexported fields
}
PoolPassGroupBy is the group-by builder for PoolPass entities.
func (*PoolPassGroupBy) Aggregate ¶
func (ppgb *PoolPassGroupBy) Aggregate(fns ...AggregateFunc) *PoolPassGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PoolPassGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PoolPassGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PoolPassGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PoolPassGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PoolPassGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PoolPassGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PoolPassGroupBy) Scan ¶
func (ppgb *PoolPassGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*PoolPassGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PoolPassMutation ¶
type PoolPassMutation struct {
// contains filtered or unexported fields
}
PoolPassMutation represents an operation that mutates the PoolPass nodes in the graph.
func (*PoolPassMutation) AddField ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) AddedEdges ¶
func (m *PoolPassMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PoolPassMutation) AddedField ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) AddedFields ¶
func (m *PoolPassMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PoolPassMutation) AddedIDs ¶
func (m *PoolPassMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PoolPassMutation) ClearEdge ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) ClearField ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) ClearPool ¶
func (m *PoolPassMutation) ClearPool()
ClearPool clears the "pool" edge to the Pool entity.
func (*PoolPassMutation) ClearUser ¶
func (m *PoolPassMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*PoolPassMutation) ClearedEdges ¶
func (m *PoolPassMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PoolPassMutation) ClearedFields ¶
func (m *PoolPassMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PoolPassMutation) Client ¶
func (m PoolPassMutation) 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 (*PoolPassMutation) CreateTime ¶
func (m *PoolPassMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*PoolPassMutation) EdgeCleared ¶
func (m *PoolPassMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PoolPassMutation) Field ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) FieldCleared ¶
func (m *PoolPassMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PoolPassMutation) Fields ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) ID ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) IDs ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the PoolPass entity. If the PoolPass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolPassMutation) 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 (*PoolPassMutation) OldShares ¶
OldShares returns the old "shares" field's value of the PoolPass entity. If the PoolPass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolPassMutation) PoolCleared ¶
func (m *PoolPassMutation) PoolCleared() bool
PoolCleared reports if the "pool" edge to the Pool entity was cleared.
func (*PoolPassMutation) PoolID ¶
func (m *PoolPassMutation) PoolID() (id int, exists bool)
PoolID returns the "pool" edge ID in the mutation.
func (*PoolPassMutation) PoolIDs ¶
func (m *PoolPassMutation) PoolIDs() (ids []int)
PoolIDs returns the "pool" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PoolID instead. It exists only for internal usage by the builders.
func (*PoolPassMutation) RemovedEdges ¶
func (m *PoolPassMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PoolPassMutation) RemovedIDs ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) ResetCreateTime ¶
func (m *PoolPassMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*PoolPassMutation) ResetEdge ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) ResetField ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) ResetPool ¶
func (m *PoolPassMutation) ResetPool()
ResetPool resets all changes to the "pool" edge.
func (*PoolPassMutation) ResetShares ¶
func (m *PoolPassMutation) ResetShares()
ResetShares resets all changes to the "shares" field.
func (*PoolPassMutation) ResetUser ¶
func (m *PoolPassMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*PoolPassMutation) SetCreateTime ¶
func (m *PoolPassMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*PoolPassMutation) SetField ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) SetPoolID ¶
func (m *PoolPassMutation) SetPoolID(id int)
SetPoolID sets the "pool" edge to the Pool entity by id.
func (*PoolPassMutation) SetShares ¶
func (m *PoolPassMutation) SetShares(t *types.Uint256)
SetShares sets the "shares" field.
func (*PoolPassMutation) SetUserID ¶
func (m *PoolPassMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*PoolPassMutation) Shares ¶
func (m *PoolPassMutation) Shares() (r *types.Uint256, exists bool)
Shares returns the value of the "shares" field in the mutation.
func (PoolPassMutation) Tx ¶
func (m PoolPassMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PoolPassMutation) Type ¶
func (m *PoolPassMutation) Type() string
Type returns the node type of this mutation (PoolPass).
func (*PoolPassMutation) UserCleared ¶
func (m *PoolPassMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*PoolPassMutation) UserID ¶
func (m *PoolPassMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*PoolPassMutation) UserIDs ¶
func (m *PoolPassMutation) 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 (*PoolPassMutation) Where ¶
func (m *PoolPassMutation) Where(ps ...predicate.PoolPass)
Where appends a list predicates to the PoolPassMutation builder.
type PoolPassQuery ¶
type PoolPassQuery struct {
// contains filtered or unexported fields
}
PoolPassQuery is the builder for querying PoolPass entities.
func (*PoolPassQuery) Aggregate ¶
func (ppq *PoolPassQuery) Aggregate(fns ...AggregateFunc) *PoolPassSelect
Aggregate returns a PoolPassSelect configured with the given aggregations.
func (*PoolPassQuery) All ¶
func (ppq *PoolPassQuery) All(ctx context.Context) ([]*PoolPass, error)
All executes the query and returns a list of PoolPasses.
func (*PoolPassQuery) AllX ¶
func (ppq *PoolPassQuery) AllX(ctx context.Context) []*PoolPass
AllX is like All, but panics if an error occurs.
func (*PoolPassQuery) Clone ¶
func (ppq *PoolPassQuery) Clone() *PoolPassQuery
Clone returns a duplicate of the PoolPassQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PoolPassQuery) Count ¶
func (ppq *PoolPassQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PoolPassQuery) CountX ¶
func (ppq *PoolPassQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PoolPassQuery) Exist ¶
func (ppq *PoolPassQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PoolPassQuery) ExistX ¶
func (ppq *PoolPassQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PoolPassQuery) First ¶
func (ppq *PoolPassQuery) First(ctx context.Context) (*PoolPass, error)
First returns the first PoolPass entity from the query. Returns a *NotFoundError when no PoolPass was found.
func (*PoolPassQuery) FirstID ¶
func (ppq *PoolPassQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PoolPass ID from the query. Returns a *NotFoundError when no PoolPass ID was found.
func (*PoolPassQuery) FirstIDX ¶
func (ppq *PoolPassQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PoolPassQuery) FirstX ¶
func (ppq *PoolPassQuery) FirstX(ctx context.Context) *PoolPass
FirstX is like First, but panics if an error occurs.
func (*PoolPassQuery) GroupBy ¶
func (ppq *PoolPassQuery) GroupBy(field string, fields ...string) *PoolPassGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.PoolPass.Query(). GroupBy(poolpass.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PoolPassQuery) IDs ¶
func (ppq *PoolPassQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of PoolPass IDs.
func (*PoolPassQuery) IDsX ¶
func (ppq *PoolPassQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PoolPassQuery) Limit ¶
func (ppq *PoolPassQuery) Limit(limit int) *PoolPassQuery
Limit adds a limit step to the query.
func (*PoolPassQuery) Offset ¶
func (ppq *PoolPassQuery) Offset(offset int) *PoolPassQuery
Offset adds an offset step to the query.
func (*PoolPassQuery) Only ¶
func (ppq *PoolPassQuery) Only(ctx context.Context) (*PoolPass, error)
Only returns a single PoolPass entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PoolPass entity is found. Returns a *NotFoundError when no PoolPass entities are found.
func (*PoolPassQuery) OnlyID ¶
func (ppq *PoolPassQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PoolPass ID in the query. Returns a *NotSingularError when more than one PoolPass ID is found. Returns a *NotFoundError when no entities are found.
func (*PoolPassQuery) OnlyIDX ¶
func (ppq *PoolPassQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PoolPassQuery) OnlyX ¶
func (ppq *PoolPassQuery) OnlyX(ctx context.Context) *PoolPass
OnlyX is like Only, but panics if an error occurs.
func (*PoolPassQuery) Order ¶
func (ppq *PoolPassQuery) Order(o ...OrderFunc) *PoolPassQuery
Order adds an order step to the query.
func (*PoolPassQuery) QueryPool ¶
func (ppq *PoolPassQuery) QueryPool() *PoolQuery
QueryPool chains the current query on the "pool" edge.
func (*PoolPassQuery) QueryUser ¶
func (ppq *PoolPassQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*PoolPassQuery) Select ¶
func (ppq *PoolPassQuery) Select(fields ...string) *PoolPassSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.PoolPass.Query(). Select(poolpass.FieldCreateTime). Scan(ctx, &v)
func (*PoolPassQuery) Unique ¶
func (ppq *PoolPassQuery) Unique(unique bool) *PoolPassQuery
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 (*PoolPassQuery) Where ¶
func (ppq *PoolPassQuery) Where(ps ...predicate.PoolPass) *PoolPassQuery
Where adds a new predicate for the PoolPassQuery builder.
func (*PoolPassQuery) WithPool ¶
func (ppq *PoolPassQuery) WithPool(opts ...func(*PoolQuery)) *PoolPassQuery
WithPool tells the query-builder to eager-load the nodes that are connected to the "pool" edge. The optional arguments are used to configure the query builder of the edge.
func (*PoolPassQuery) WithUser ¶
func (ppq *PoolPassQuery) WithUser(opts ...func(*UserQuery)) *PoolPassQuery
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 PoolPassSelect ¶
type PoolPassSelect struct { *PoolPassQuery // contains filtered or unexported fields }
PoolPassSelect is the builder for selecting fields of PoolPass entities.
func (*PoolPassSelect) Aggregate ¶
func (pps *PoolPassSelect) Aggregate(fns ...AggregateFunc) *PoolPassSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PoolPassSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PoolPassSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PoolPassSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PoolPassSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PoolPassSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PoolPassSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PoolPassSelect) Scan ¶
func (pps *PoolPassSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PoolPassSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PoolPassUpdate ¶
type PoolPassUpdate struct {
// contains filtered or unexported fields
}
PoolPassUpdate is the builder for updating PoolPass entities.
func (*PoolPassUpdate) ClearPool ¶
func (ppu *PoolPassUpdate) ClearPool() *PoolPassUpdate
ClearPool clears the "pool" edge to the Pool entity.
func (*PoolPassUpdate) ClearUser ¶
func (ppu *PoolPassUpdate) ClearUser() *PoolPassUpdate
ClearUser clears the "user" edge to the User entity.
func (*PoolPassUpdate) Exec ¶
func (ppu *PoolPassUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PoolPassUpdate) ExecX ¶
func (ppu *PoolPassUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolPassUpdate) Mutation ¶
func (ppu *PoolPassUpdate) Mutation() *PoolPassMutation
Mutation returns the PoolPassMutation object of the builder.
func (*PoolPassUpdate) Save ¶
func (ppu *PoolPassUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PoolPassUpdate) SaveX ¶
func (ppu *PoolPassUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PoolPassUpdate) SetNillablePoolID ¶
func (ppu *PoolPassUpdate) SetNillablePoolID(id *int) *PoolPassUpdate
SetNillablePoolID sets the "pool" edge to the Pool entity by ID if the given value is not nil.
func (*PoolPassUpdate) SetNillableUserID ¶
func (ppu *PoolPassUpdate) SetNillableUserID(id *int) *PoolPassUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*PoolPassUpdate) SetPool ¶
func (ppu *PoolPassUpdate) SetPool(p *Pool) *PoolPassUpdate
SetPool sets the "pool" edge to the Pool entity.
func (*PoolPassUpdate) SetPoolID ¶
func (ppu *PoolPassUpdate) SetPoolID(id int) *PoolPassUpdate
SetPoolID sets the "pool" edge to the Pool entity by ID.
func (*PoolPassUpdate) SetUser ¶
func (ppu *PoolPassUpdate) SetUser(u *User) *PoolPassUpdate
SetUser sets the "user" edge to the User entity.
func (*PoolPassUpdate) SetUserID ¶
func (ppu *PoolPassUpdate) SetUserID(id int) *PoolPassUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*PoolPassUpdate) Where ¶
func (ppu *PoolPassUpdate) Where(ps ...predicate.PoolPass) *PoolPassUpdate
Where appends a list predicates to the PoolPassUpdate builder.
type PoolPassUpdateOne ¶
type PoolPassUpdateOne struct {
// contains filtered or unexported fields
}
PoolPassUpdateOne is the builder for updating a single PoolPass entity.
func (*PoolPassUpdateOne) ClearPool ¶
func (ppuo *PoolPassUpdateOne) ClearPool() *PoolPassUpdateOne
ClearPool clears the "pool" edge to the Pool entity.
func (*PoolPassUpdateOne) ClearUser ¶
func (ppuo *PoolPassUpdateOne) ClearUser() *PoolPassUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*PoolPassUpdateOne) Exec ¶
func (ppuo *PoolPassUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PoolPassUpdateOne) ExecX ¶
func (ppuo *PoolPassUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolPassUpdateOne) Mutation ¶
func (ppuo *PoolPassUpdateOne) Mutation() *PoolPassMutation
Mutation returns the PoolPassMutation object of the builder.
func (*PoolPassUpdateOne) Save ¶
func (ppuo *PoolPassUpdateOne) Save(ctx context.Context) (*PoolPass, error)
Save executes the query and returns the updated PoolPass entity.
func (*PoolPassUpdateOne) SaveX ¶
func (ppuo *PoolPassUpdateOne) SaveX(ctx context.Context) *PoolPass
SaveX is like Save, but panics if an error occurs.
func (*PoolPassUpdateOne) Select ¶
func (ppuo *PoolPassUpdateOne) Select(field string, fields ...string) *PoolPassUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PoolPassUpdateOne) SetNillablePoolID ¶
func (ppuo *PoolPassUpdateOne) SetNillablePoolID(id *int) *PoolPassUpdateOne
SetNillablePoolID sets the "pool" edge to the Pool entity by ID if the given value is not nil.
func (*PoolPassUpdateOne) SetNillableUserID ¶
func (ppuo *PoolPassUpdateOne) SetNillableUserID(id *int) *PoolPassUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*PoolPassUpdateOne) SetPool ¶
func (ppuo *PoolPassUpdateOne) SetPool(p *Pool) *PoolPassUpdateOne
SetPool sets the "pool" edge to the Pool entity.
func (*PoolPassUpdateOne) SetPoolID ¶
func (ppuo *PoolPassUpdateOne) SetPoolID(id int) *PoolPassUpdateOne
SetPoolID sets the "pool" edge to the Pool entity by ID.
func (*PoolPassUpdateOne) SetUser ¶
func (ppuo *PoolPassUpdateOne) SetUser(u *User) *PoolPassUpdateOne
SetUser sets the "user" edge to the User entity.
func (*PoolPassUpdateOne) SetUserID ¶
func (ppuo *PoolPassUpdateOne) SetUserID(id int) *PoolPassUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type PoolQuery ¶
type PoolQuery struct {
// contains filtered or unexported fields
}
PoolQuery is the builder for querying Pool entities.
func (*PoolQuery) Aggregate ¶
func (pq *PoolQuery) Aggregate(fns ...AggregateFunc) *PoolSelect
Aggregate returns a PoolSelect configured with the given aggregations.
func (*PoolQuery) Clone ¶
Clone returns a duplicate of the PoolQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PoolQuery) First ¶
First returns the first Pool entity from the query. Returns a *NotFoundError when no Pool was found.
func (*PoolQuery) FirstID ¶
FirstID returns the first Pool ID from the query. Returns a *NotFoundError when no Pool ID was found.
func (*PoolQuery) GroupBy ¶
func (pq *PoolQuery) GroupBy(field string, fields ...string) *PoolGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Pool.Query(). GroupBy(pool.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PoolQuery) Only ¶
Only returns a single Pool entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Pool entity is found. Returns a *NotFoundError when no Pool entities are found.
func (*PoolQuery) OnlyID ¶
OnlyID is like Only, but returns the only Pool ID in the query. Returns a *NotSingularError when more than one Pool ID is found. Returns a *NotFoundError when no entities are found.
func (*PoolQuery) QueryPoolPasses ¶
func (pq *PoolQuery) QueryPoolPasses() *PoolPassQuery
QueryPoolPasses chains the current query on the "pool_passes" edge.
func (*PoolQuery) QuerySqueak ¶
func (pq *PoolQuery) QuerySqueak() *SqueakQuery
QuerySqueak chains the current query on the "squeak" edge.
func (*PoolQuery) Select ¶
func (pq *PoolQuery) Select(fields ...string) *PoolSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Pool.Query(). Select(pool.FieldCreateTime). Scan(ctx, &v)
func (*PoolQuery) 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 (*PoolQuery) WithPoolPasses ¶
func (pq *PoolQuery) WithPoolPasses(opts ...func(*PoolPassQuery)) *PoolQuery
WithPoolPasses tells the query-builder to eager-load the nodes that are connected to the "pool_passes" edge. The optional arguments are used to configure the query builder of the edge.
func (*PoolQuery) WithSqueak ¶
func (pq *PoolQuery) WithSqueak(opts ...func(*SqueakQuery)) *PoolQuery
WithSqueak tells the query-builder to eager-load the nodes that are connected to the "squeak" edge. The optional arguments are used to configure the query builder of the edge.
type PoolSelect ¶
type PoolSelect struct { *PoolQuery // contains filtered or unexported fields }
PoolSelect is the builder for selecting fields of Pool entities.
func (*PoolSelect) Aggregate ¶
func (ps *PoolSelect) Aggregate(fns ...AggregateFunc) *PoolSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PoolSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Scan ¶
func (ps *PoolSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PoolSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PoolUpdate ¶
type PoolUpdate struct {
// contains filtered or unexported fields
}
PoolUpdate is the builder for updating Pool entities.
func (*PoolUpdate) AddPoolPassIDs ¶
func (pu *PoolUpdate) AddPoolPassIDs(ids ...int) *PoolUpdate
AddPoolPassIDs adds the "pool_passes" edge to the PoolPass entity by IDs.
func (*PoolUpdate) AddPoolPasses ¶
func (pu *PoolUpdate) AddPoolPasses(p ...*PoolPass) *PoolUpdate
AddPoolPasses adds the "pool_passes" edges to the PoolPass entity.
func (*PoolUpdate) ClearPoolPasses ¶
func (pu *PoolUpdate) ClearPoolPasses() *PoolUpdate
ClearPoolPasses clears all "pool_passes" edges to the PoolPass entity.
func (*PoolUpdate) ClearSqueak ¶
func (pu *PoolUpdate) ClearSqueak() *PoolUpdate
ClearSqueak clears the "squeak" edge to the Squeak entity.
func (*PoolUpdate) Exec ¶
func (pu *PoolUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PoolUpdate) ExecX ¶
func (pu *PoolUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolUpdate) Mutation ¶
func (pu *PoolUpdate) Mutation() *PoolMutation
Mutation returns the PoolMutation object of the builder.
func (*PoolUpdate) RemovePoolPassIDs ¶
func (pu *PoolUpdate) RemovePoolPassIDs(ids ...int) *PoolUpdate
RemovePoolPassIDs removes the "pool_passes" edge to PoolPass entities by IDs.
func (*PoolUpdate) RemovePoolPasses ¶
func (pu *PoolUpdate) RemovePoolPasses(p ...*PoolPass) *PoolUpdate
RemovePoolPasses removes "pool_passes" edges to PoolPass entities.
func (*PoolUpdate) Save ¶
func (pu *PoolUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PoolUpdate) SaveX ¶
func (pu *PoolUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PoolUpdate) SetAmount ¶
func (pu *PoolUpdate) SetAmount(t *types.Uint256) *PoolUpdate
SetAmount sets the "amount" field.
func (*PoolUpdate) SetNillableSqueakID ¶
func (pu *PoolUpdate) SetNillableSqueakID(id *int) *PoolUpdate
SetNillableSqueakID sets the "squeak" edge to the Squeak entity by ID if the given value is not nil.
func (*PoolUpdate) SetShares ¶
func (pu *PoolUpdate) SetShares(t *types.Uint256) *PoolUpdate
SetShares sets the "shares" field.
func (*PoolUpdate) SetSqueak ¶
func (pu *PoolUpdate) SetSqueak(s *Squeak) *PoolUpdate
SetSqueak sets the "squeak" edge to the Squeak entity.
func (*PoolUpdate) SetSqueakID ¶
func (pu *PoolUpdate) SetSqueakID(id int) *PoolUpdate
SetSqueakID sets the "squeak" edge to the Squeak entity by ID.
func (*PoolUpdate) SetUpdateTime ¶
func (pu *PoolUpdate) SetUpdateTime(t time.Time) *PoolUpdate
SetUpdateTime sets the "update_time" field.
func (*PoolUpdate) Where ¶
func (pu *PoolUpdate) Where(ps ...predicate.Pool) *PoolUpdate
Where appends a list predicates to the PoolUpdate builder.
type PoolUpdateOne ¶
type PoolUpdateOne struct {
// contains filtered or unexported fields
}
PoolUpdateOne is the builder for updating a single Pool entity.
func (*PoolUpdateOne) AddPoolPassIDs ¶
func (puo *PoolUpdateOne) AddPoolPassIDs(ids ...int) *PoolUpdateOne
AddPoolPassIDs adds the "pool_passes" edge to the PoolPass entity by IDs.
func (*PoolUpdateOne) AddPoolPasses ¶
func (puo *PoolUpdateOne) AddPoolPasses(p ...*PoolPass) *PoolUpdateOne
AddPoolPasses adds the "pool_passes" edges to the PoolPass entity.
func (*PoolUpdateOne) ClearPoolPasses ¶
func (puo *PoolUpdateOne) ClearPoolPasses() *PoolUpdateOne
ClearPoolPasses clears all "pool_passes" edges to the PoolPass entity.
func (*PoolUpdateOne) ClearSqueak ¶
func (puo *PoolUpdateOne) ClearSqueak() *PoolUpdateOne
ClearSqueak clears the "squeak" edge to the Squeak entity.
func (*PoolUpdateOne) Exec ¶
func (puo *PoolUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PoolUpdateOne) ExecX ¶
func (puo *PoolUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolUpdateOne) Mutation ¶
func (puo *PoolUpdateOne) Mutation() *PoolMutation
Mutation returns the PoolMutation object of the builder.
func (*PoolUpdateOne) RemovePoolPassIDs ¶
func (puo *PoolUpdateOne) RemovePoolPassIDs(ids ...int) *PoolUpdateOne
RemovePoolPassIDs removes the "pool_passes" edge to PoolPass entities by IDs.
func (*PoolUpdateOne) RemovePoolPasses ¶
func (puo *PoolUpdateOne) RemovePoolPasses(p ...*PoolPass) *PoolUpdateOne
RemovePoolPasses removes "pool_passes" edges to PoolPass entities.
func (*PoolUpdateOne) Save ¶
func (puo *PoolUpdateOne) Save(ctx context.Context) (*Pool, error)
Save executes the query and returns the updated Pool entity.
func (*PoolUpdateOne) SaveX ¶
func (puo *PoolUpdateOne) SaveX(ctx context.Context) *Pool
SaveX is like Save, but panics if an error occurs.
func (*PoolUpdateOne) Select ¶
func (puo *PoolUpdateOne) Select(field string, fields ...string) *PoolUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PoolUpdateOne) SetAmount ¶
func (puo *PoolUpdateOne) SetAmount(t *types.Uint256) *PoolUpdateOne
SetAmount sets the "amount" field.
func (*PoolUpdateOne) SetNillableSqueakID ¶
func (puo *PoolUpdateOne) SetNillableSqueakID(id *int) *PoolUpdateOne
SetNillableSqueakID sets the "squeak" edge to the Squeak entity by ID if the given value is not nil.
func (*PoolUpdateOne) SetShares ¶
func (puo *PoolUpdateOne) SetShares(t *types.Uint256) *PoolUpdateOne
SetShares sets the "shares" field.
func (*PoolUpdateOne) SetSqueak ¶
func (puo *PoolUpdateOne) SetSqueak(s *Squeak) *PoolUpdateOne
SetSqueak sets the "squeak" edge to the Squeak entity.
func (*PoolUpdateOne) SetSqueakID ¶
func (puo *PoolUpdateOne) SetSqueakID(id int) *PoolUpdateOne
SetSqueakID sets the "squeak" edge to the Squeak entity by ID.
func (*PoolUpdateOne) SetUpdateTime ¶
func (puo *PoolUpdateOne) SetUpdateTime(t time.Time) *PoolUpdateOne
SetUpdateTime sets the "update_time" field.
type Role ¶
type Role struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Hash holds the value of the "hash" field. Hash string `json:"hash,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RoleQuery when eager-loading is set. Edges RoleEdges `json:"edges"` // contains filtered or unexported fields }
Role is the model entity for the Role schema.
func (*Role) QueryUsers ¶
QueryUsers queries the "users" edge of the Role entity.
func (*Role) Unwrap ¶
Unwrap unwraps the Role entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Role) Update ¶
func (r *Role) Update() *RoleUpdateOne
Update returns a builder for updating this Role. Note that you need to call Role.Unwrap() before calling this method if this Role was returned from a transaction, and the transaction was committed or rolled back.
type RoleClient ¶
type RoleClient struct {
// contains filtered or unexported fields
}
RoleClient is a client for the Role schema.
func NewRoleClient ¶
func NewRoleClient(c config) *RoleClient
NewRoleClient returns a client for the Role from the given config.
func (*RoleClient) Create ¶
func (c *RoleClient) Create() *RoleCreate
Create returns a builder for creating a Role entity.
func (*RoleClient) CreateBulk ¶
func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
CreateBulk returns a builder for creating a bulk of Role entities.
func (*RoleClient) Delete ¶
func (c *RoleClient) Delete() *RoleDelete
Delete returns a delete builder for Role.
func (*RoleClient) DeleteOne ¶
func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RoleClient) DeleteOneID ¶
func (c *RoleClient) DeleteOneID(id int) *RoleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RoleClient) GetX ¶
func (c *RoleClient) GetX(ctx context.Context, id int) *Role
GetX is like Get, but panics if an error occurs.
func (*RoleClient) Query ¶
func (c *RoleClient) Query() *RoleQuery
Query returns a query builder for Role.
func (*RoleClient) QueryUsers ¶
func (c *RoleClient) QueryUsers(r *Role) *UserQuery
QueryUsers queries the users edge of a Role.
func (*RoleClient) Update ¶
func (c *RoleClient) Update() *RoleUpdate
Update returns an update builder for Role.
func (*RoleClient) UpdateOne ¶
func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoleClient) UpdateOneID ¶
func (c *RoleClient) UpdateOneID(id int) *RoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RoleClient) Use ¶
func (c *RoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `role.Hooks(f(g(h())))`.
type RoleCreate ¶
type RoleCreate struct {
// contains filtered or unexported fields
}
RoleCreate is the builder for creating a Role entity.
func (*RoleCreate) AddUserIDs ¶
func (rc *RoleCreate) AddUserIDs(ids ...int) *RoleCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*RoleCreate) AddUsers ¶
func (rc *RoleCreate) AddUsers(u ...*User) *RoleCreate
AddUsers adds the "users" edges to the User entity.
func (*RoleCreate) Exec ¶
func (rc *RoleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreate) ExecX ¶
func (rc *RoleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleCreate) Mutation ¶
func (rc *RoleCreate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleCreate) Save ¶
func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)
Save creates the Role in the database.
func (*RoleCreate) SaveX ¶
func (rc *RoleCreate) SaveX(ctx context.Context) *Role
SaveX calls Save and panics if Save returns an error.
func (*RoleCreate) SetCreateTime ¶
func (rc *RoleCreate) SetCreateTime(t time.Time) *RoleCreate
SetCreateTime sets the "create_time" field.
func (*RoleCreate) SetHash ¶
func (rc *RoleCreate) SetHash(s string) *RoleCreate
SetHash sets the "hash" field.
func (*RoleCreate) SetNillableCreateTime ¶
func (rc *RoleCreate) SetNillableCreateTime(t *time.Time) *RoleCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RoleCreate) SetNillableUpdateTime ¶
func (rc *RoleCreate) SetNillableUpdateTime(t *time.Time) *RoleCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*RoleCreate) SetTitle ¶
func (rc *RoleCreate) SetTitle(s string) *RoleCreate
SetTitle sets the "title" field.
func (*RoleCreate) SetUpdateTime ¶
func (rc *RoleCreate) SetUpdateTime(t time.Time) *RoleCreate
SetUpdateTime sets the "update_time" field.
type RoleCreateBulk ¶
type RoleCreateBulk struct {
// contains filtered or unexported fields
}
RoleCreateBulk is the builder for creating many Role entities in bulk.
func (*RoleCreateBulk) Exec ¶
func (rcb *RoleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreateBulk) ExecX ¶
func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoleDelete ¶
type RoleDelete struct {
// contains filtered or unexported fields
}
RoleDelete is the builder for deleting a Role entity.
func (*RoleDelete) Exec ¶
func (rd *RoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoleDelete) ExecX ¶
func (rd *RoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoleDelete) Where ¶
func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete
Where appends a list predicates to the RoleDelete builder.
type RoleDeleteOne ¶
type RoleDeleteOne struct {
// contains filtered or unexported fields
}
RoleDeleteOne is the builder for deleting a single Role entity.
func (*RoleDeleteOne) Exec ¶
func (rdo *RoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoleDeleteOne) ExecX ¶
func (rdo *RoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoleEdges ¶
type RoleEdges struct { // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
RoleEdges holds the relations/edges for other nodes in the graph.
func (RoleEdges) UsersOrErr ¶
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type RoleGroupBy ¶
type RoleGroupBy struct {
// contains filtered or unexported fields
}
RoleGroupBy is the group-by builder for Role entities.
func (*RoleGroupBy) Aggregate ¶
func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Scan ¶
func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*RoleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoleMutation ¶
type RoleMutation struct {
// contains filtered or unexported fields
}
RoleMutation represents an operation that mutates the Role nodes in the graph.
func (*RoleMutation) AddField ¶
func (m *RoleMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RoleMutation) AddUserIDs ¶
func (m *RoleMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*RoleMutation) AddedEdges ¶
func (m *RoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoleMutation) AddedField ¶
func (m *RoleMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RoleMutation) AddedFields ¶
func (m *RoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoleMutation) AddedIDs ¶
func (m *RoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoleMutation) ClearEdge ¶
func (m *RoleMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*RoleMutation) ClearField ¶
func (m *RoleMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*RoleMutation) ClearUsers ¶
func (m *RoleMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*RoleMutation) ClearedEdges ¶
func (m *RoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoleMutation) ClearedFields ¶
func (m *RoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoleMutation) Client ¶
func (m RoleMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*RoleMutation) CreateTime ¶
func (m *RoleMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*RoleMutation) EdgeCleared ¶
func (m *RoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoleMutation) Field ¶
func (m *RoleMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RoleMutation) FieldCleared ¶
func (m *RoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoleMutation) Fields ¶
func (m *RoleMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*RoleMutation) Hash ¶
func (m *RoleMutation) Hash() (r string, exists bool)
Hash returns the value of the "hash" field in the mutation.
func (*RoleMutation) ID ¶
func (m *RoleMutation) 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 (*RoleMutation) IDs ¶
func (m *RoleMutation) 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 (*RoleMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Role entity. If the Role object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoleMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*RoleMutation) OldHash ¶
func (m *RoleMutation) OldHash(ctx context.Context) (v string, err error)
OldHash returns the old "hash" field's value of the Role entity. If the Role object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoleMutation) OldTitle ¶
func (m *RoleMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Role entity. If the Role object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoleMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Role entity. If the Role object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoleMutation) RemoveUserIDs ¶
func (m *RoleMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*RoleMutation) RemovedEdges ¶
func (m *RoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoleMutation) RemovedIDs ¶
func (m *RoleMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*RoleMutation) RemovedUsersIDs ¶
func (m *RoleMutation) RemovedUsersIDs() (ids []int)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*RoleMutation) ResetCreateTime ¶
func (m *RoleMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*RoleMutation) ResetEdge ¶
func (m *RoleMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*RoleMutation) ResetField ¶
func (m *RoleMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*RoleMutation) ResetHash ¶
func (m *RoleMutation) ResetHash()
ResetHash resets all changes to the "hash" field.
func (*RoleMutation) ResetTitle ¶
func (m *RoleMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*RoleMutation) ResetUpdateTime ¶
func (m *RoleMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*RoleMutation) ResetUsers ¶
func (m *RoleMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*RoleMutation) SetCreateTime ¶
func (m *RoleMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*RoleMutation) SetField ¶
func (m *RoleMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RoleMutation) SetHash ¶
func (m *RoleMutation) SetHash(s string)
SetHash sets the "hash" field.
func (*RoleMutation) SetTitle ¶
func (m *RoleMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*RoleMutation) SetUpdateTime ¶
func (m *RoleMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*RoleMutation) Title ¶
func (m *RoleMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (RoleMutation) Tx ¶
func (m RoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoleMutation) Type ¶
func (m *RoleMutation) Type() string
Type returns the node type of this mutation (Role).
func (*RoleMutation) UpdateTime ¶
func (m *RoleMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*RoleMutation) UsersCleared ¶
func (m *RoleMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*RoleMutation) UsersIDs ¶
func (m *RoleMutation) UsersIDs() (ids []int)
UsersIDs returns the "users" edge IDs in the mutation.
func (*RoleMutation) Where ¶
func (m *RoleMutation) Where(ps ...predicate.Role)
Where appends a list predicates to the RoleMutation builder.
type RoleQuery ¶
type RoleQuery struct {
// contains filtered or unexported fields
}
RoleQuery is the builder for querying Role entities.
func (*RoleQuery) Aggregate ¶
func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect
Aggregate returns a RoleSelect configured with the given aggregations.
func (*RoleQuery) Clone ¶
Clone returns a duplicate of the RoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoleQuery) First ¶
First returns the first Role entity from the query. Returns a *NotFoundError when no Role was found.
func (*RoleQuery) FirstID ¶
FirstID returns the first Role ID from the query. Returns a *NotFoundError when no Role ID was found.
func (*RoleQuery) GroupBy ¶
func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Role.Query(). GroupBy(role.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RoleQuery) Only ¶
Only returns a single Role entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Role entity is found. Returns a *NotFoundError when no Role entities are found.
func (*RoleQuery) OnlyID ¶
OnlyID is like Only, but returns the only Role ID in the query. Returns a *NotSingularError when more than one Role ID is found. Returns a *NotFoundError when no entities are found.
func (*RoleQuery) QueryUsers ¶
QueryUsers chains the current query on the "users" edge.
func (*RoleQuery) Select ¶
func (rq *RoleQuery) Select(fields ...string) *RoleSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Role.Query(). Select(role.FieldCreateTime). Scan(ctx, &v)
func (*RoleQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
type RoleSelect ¶
type RoleSelect struct { *RoleQuery // contains filtered or unexported fields }
RoleSelect is the builder for selecting fields of Role entities.
func (*RoleSelect) Aggregate ¶
func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RoleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Scan ¶
func (rs *RoleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoleUpdate ¶
type RoleUpdate struct {
// contains filtered or unexported fields
}
RoleUpdate is the builder for updating Role entities.
func (*RoleUpdate) AddUserIDs ¶
func (ru *RoleUpdate) AddUserIDs(ids ...int) *RoleUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*RoleUpdate) AddUsers ¶
func (ru *RoleUpdate) AddUsers(u ...*User) *RoleUpdate
AddUsers adds the "users" edges to the User entity.
func (*RoleUpdate) ClearUsers ¶
func (ru *RoleUpdate) ClearUsers() *RoleUpdate
ClearUsers clears all "users" edges to the User entity.
func (*RoleUpdate) Exec ¶
func (ru *RoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpdate) ExecX ¶
func (ru *RoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdate) Mutation ¶
func (ru *RoleUpdate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdate) RemoveUserIDs ¶
func (ru *RoleUpdate) RemoveUserIDs(ids ...int) *RoleUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*RoleUpdate) RemoveUsers ¶
func (ru *RoleUpdate) RemoveUsers(u ...*User) *RoleUpdate
RemoveUsers removes "users" edges to User entities.
func (*RoleUpdate) Save ¶
func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoleUpdate) SaveX ¶
func (ru *RoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdate) SetUpdateTime ¶
func (ru *RoleUpdate) SetUpdateTime(t time.Time) *RoleUpdate
SetUpdateTime sets the "update_time" field.
func (*RoleUpdate) Where ¶
func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
Where appends a list predicates to the RoleUpdate builder.
type RoleUpdateOne ¶
type RoleUpdateOne struct {
// contains filtered or unexported fields
}
RoleUpdateOne is the builder for updating a single Role entity.
func (*RoleUpdateOne) AddUserIDs ¶
func (ruo *RoleUpdateOne) AddUserIDs(ids ...int) *RoleUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*RoleUpdateOne) AddUsers ¶
func (ruo *RoleUpdateOne) AddUsers(u ...*User) *RoleUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*RoleUpdateOne) ClearUsers ¶
func (ruo *RoleUpdateOne) ClearUsers() *RoleUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*RoleUpdateOne) Exec ¶
func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoleUpdateOne) ExecX ¶
func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdateOne) Mutation ¶
func (ruo *RoleUpdateOne) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdateOne) RemoveUserIDs ¶
func (ruo *RoleUpdateOne) RemoveUserIDs(ids ...int) *RoleUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*RoleUpdateOne) RemoveUsers ¶
func (ruo *RoleUpdateOne) RemoveUsers(u ...*User) *RoleUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*RoleUpdateOne) Save ¶
func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
Save executes the query and returns the updated Role entity.
func (*RoleUpdateOne) SaveX ¶
func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdateOne) Select ¶
func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoleUpdateOne) SetUpdateTime ¶
func (ruo *RoleUpdateOne) SetUpdateTime(t time.Time) *RoleUpdateOne
SetUpdateTime sets the "update_time" field.
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 Squeak ¶
type Squeak struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // BlockNumber holds the value of the "block_number" field. BlockNumber *types.Uint256 `json:"block_number,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SqueakQuery when eager-loading is set. Edges SqueakEdges `json:"edges"` // contains filtered or unexported fields }
Squeak is the model entity for the Squeak schema.
func (*Squeak) QueryCreator ¶
QueryCreator queries the "creator" edge of the Squeak entity.
func (*Squeak) QueryInteractions ¶
func (s *Squeak) QueryInteractions() *InteractionQuery
QueryInteractions queries the "interactions" edge of the Squeak entity.
func (*Squeak) QueryOwner ¶
QueryOwner queries the "owner" edge of the Squeak entity.
func (*Squeak) Unwrap ¶
Unwrap unwraps the Squeak 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 (*Squeak) Update ¶
func (s *Squeak) Update() *SqueakUpdateOne
Update returns a builder for updating this Squeak. Note that you need to call Squeak.Unwrap() before calling this method if this Squeak was returned from a transaction, and the transaction was committed or rolled back.
type SqueakClient ¶
type SqueakClient struct {
// contains filtered or unexported fields
}
SqueakClient is a client for the Squeak schema.
func NewSqueakClient ¶
func NewSqueakClient(c config) *SqueakClient
NewSqueakClient returns a client for the Squeak from the given config.
func (*SqueakClient) Create ¶
func (c *SqueakClient) Create() *SqueakCreate
Create returns a builder for creating a Squeak entity.
func (*SqueakClient) CreateBulk ¶
func (c *SqueakClient) CreateBulk(builders ...*SqueakCreate) *SqueakCreateBulk
CreateBulk returns a builder for creating a bulk of Squeak entities.
func (*SqueakClient) Delete ¶
func (c *SqueakClient) Delete() *SqueakDelete
Delete returns a delete builder for Squeak.
func (*SqueakClient) DeleteOne ¶
func (c *SqueakClient) DeleteOne(s *Squeak) *SqueakDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SqueakClient) DeleteOneID ¶
func (c *SqueakClient) DeleteOneID(id int) *SqueakDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SqueakClient) GetX ¶
func (c *SqueakClient) GetX(ctx context.Context, id int) *Squeak
GetX is like Get, but panics if an error occurs.
func (*SqueakClient) Query ¶
func (c *SqueakClient) Query() *SqueakQuery
Query returns a query builder for Squeak.
func (*SqueakClient) QueryCreator ¶
func (c *SqueakClient) QueryCreator(s *Squeak) *UserQuery
QueryCreator queries the creator edge of a Squeak.
func (*SqueakClient) QueryInteractions ¶
func (c *SqueakClient) QueryInteractions(s *Squeak) *InteractionQuery
QueryInteractions queries the interactions edge of a Squeak.
func (*SqueakClient) QueryOwner ¶
func (c *SqueakClient) QueryOwner(s *Squeak) *UserQuery
QueryOwner queries the owner edge of a Squeak.
func (*SqueakClient) QueryPool ¶
func (c *SqueakClient) QueryPool(s *Squeak) *PoolQuery
QueryPool queries the pool edge of a Squeak.
func (*SqueakClient) Update ¶
func (c *SqueakClient) Update() *SqueakUpdate
Update returns an update builder for Squeak.
func (*SqueakClient) UpdateOne ¶
func (c *SqueakClient) UpdateOne(s *Squeak) *SqueakUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SqueakClient) UpdateOneID ¶
func (c *SqueakClient) UpdateOneID(id int) *SqueakUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SqueakClient) Use ¶
func (c *SqueakClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `squeak.Hooks(f(g(h())))`.
type SqueakCreate ¶
type SqueakCreate struct {
// contains filtered or unexported fields
}
SqueakCreate is the builder for creating a Squeak entity.
func (*SqueakCreate) AddInteractionIDs ¶
func (sc *SqueakCreate) AddInteractionIDs(ids ...int) *SqueakCreate
AddInteractionIDs adds the "interactions" edge to the Interaction entity by IDs.
func (*SqueakCreate) AddInteractions ¶
func (sc *SqueakCreate) AddInteractions(i ...*Interaction) *SqueakCreate
AddInteractions adds the "interactions" edges to the Interaction entity.
func (*SqueakCreate) Exec ¶
func (sc *SqueakCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SqueakCreate) ExecX ¶
func (sc *SqueakCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SqueakCreate) Mutation ¶
func (sc *SqueakCreate) Mutation() *SqueakMutation
Mutation returns the SqueakMutation object of the builder.
func (*SqueakCreate) Save ¶
func (sc *SqueakCreate) Save(ctx context.Context) (*Squeak, error)
Save creates the Squeak in the database.
func (*SqueakCreate) SaveX ¶
func (sc *SqueakCreate) SaveX(ctx context.Context) *Squeak
SaveX calls Save and panics if Save returns an error.
func (*SqueakCreate) SetBlockNumber ¶
func (sc *SqueakCreate) SetBlockNumber(t *types.Uint256) *SqueakCreate
SetBlockNumber sets the "block_number" field.
func (*SqueakCreate) SetContent ¶
func (sc *SqueakCreate) SetContent(s string) *SqueakCreate
SetContent sets the "content" field.
func (*SqueakCreate) SetCreateTime ¶
func (sc *SqueakCreate) SetCreateTime(t time.Time) *SqueakCreate
SetCreateTime sets the "create_time" field.
func (*SqueakCreate) SetCreator ¶
func (sc *SqueakCreate) SetCreator(u *User) *SqueakCreate
SetCreator sets the "creator" edge to the User entity.
func (*SqueakCreate) SetCreatorID ¶
func (sc *SqueakCreate) SetCreatorID(id int) *SqueakCreate
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*SqueakCreate) SetNillableCreateTime ¶
func (sc *SqueakCreate) SetNillableCreateTime(t *time.Time) *SqueakCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*SqueakCreate) SetNillableCreatorID ¶
func (sc *SqueakCreate) SetNillableCreatorID(id *int) *SqueakCreate
SetNillableCreatorID sets the "creator" edge to the User entity by ID if the given value is not nil.
func (*SqueakCreate) SetNillableOwnerID ¶
func (sc *SqueakCreate) SetNillableOwnerID(id *int) *SqueakCreate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*SqueakCreate) SetNillablePoolID ¶
func (sc *SqueakCreate) SetNillablePoolID(id *int) *SqueakCreate
SetNillablePoolID sets the "pool" edge to the Pool entity by ID if the given value is not nil.
func (*SqueakCreate) SetOwner ¶
func (sc *SqueakCreate) SetOwner(u *User) *SqueakCreate
SetOwner sets the "owner" edge to the User entity.
func (*SqueakCreate) SetOwnerID ¶
func (sc *SqueakCreate) SetOwnerID(id int) *SqueakCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*SqueakCreate) SetPool ¶
func (sc *SqueakCreate) SetPool(p *Pool) *SqueakCreate
SetPool sets the "pool" edge to the Pool entity.
func (*SqueakCreate) SetPoolID ¶
func (sc *SqueakCreate) SetPoolID(id int) *SqueakCreate
SetPoolID sets the "pool" edge to the Pool entity by ID.
type SqueakCreateBulk ¶
type SqueakCreateBulk struct {
// contains filtered or unexported fields
}
SqueakCreateBulk is the builder for creating many Squeak entities in bulk.
func (*SqueakCreateBulk) Exec ¶
func (scb *SqueakCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SqueakCreateBulk) ExecX ¶
func (scb *SqueakCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SqueakDelete ¶
type SqueakDelete struct {
// contains filtered or unexported fields
}
SqueakDelete is the builder for deleting a Squeak entity.
func (*SqueakDelete) Exec ¶
func (sd *SqueakDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SqueakDelete) ExecX ¶
func (sd *SqueakDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SqueakDelete) Where ¶
func (sd *SqueakDelete) Where(ps ...predicate.Squeak) *SqueakDelete
Where appends a list predicates to the SqueakDelete builder.
type SqueakDeleteOne ¶
type SqueakDeleteOne struct {
// contains filtered or unexported fields
}
SqueakDeleteOne is the builder for deleting a single Squeak entity.
func (*SqueakDeleteOne) Exec ¶
func (sdo *SqueakDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SqueakDeleteOne) ExecX ¶
func (sdo *SqueakDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SqueakEdges ¶
type SqueakEdges struct { // Interactions holds the value of the interactions edge. Interactions []*Interaction `json:"interactions,omitempty"` // Pool holds the value of the pool edge. Pool *Pool `json:"pool,omitempty"` // Creator holds the value of the creator edge. Creator *User `json:"creator,omitempty"` // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
SqueakEdges holds the relations/edges for other nodes in the graph.
func (SqueakEdges) CreatorOrErr ¶
func (e SqueakEdges) CreatorOrErr() (*User, error)
CreatorOrErr returns the Creator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SqueakEdges) InteractionsOrErr ¶
func (e SqueakEdges) InteractionsOrErr() ([]*Interaction, error)
InteractionsOrErr returns the Interactions value or an error if the edge was not loaded in eager-loading.
func (SqueakEdges) OwnerOrErr ¶
func (e SqueakEdges) 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.
func (SqueakEdges) PoolOrErr ¶
func (e SqueakEdges) PoolOrErr() (*Pool, error)
PoolOrErr returns the Pool value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SqueakGroupBy ¶
type SqueakGroupBy struct {
// contains filtered or unexported fields
}
SqueakGroupBy is the group-by builder for Squeak entities.
func (*SqueakGroupBy) Aggregate ¶
func (sgb *SqueakGroupBy) Aggregate(fns ...AggregateFunc) *SqueakGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SqueakGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SqueakGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SqueakGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SqueakGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SqueakGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SqueakGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SqueakGroupBy) Scan ¶
func (sgb *SqueakGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*SqueakGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SqueakMutation ¶
type SqueakMutation struct {
// contains filtered or unexported fields
}
SqueakMutation represents an operation that mutates the Squeak nodes in the graph.
func (*SqueakMutation) AddField ¶
func (m *SqueakMutation) 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 (*SqueakMutation) AddInteractionIDs ¶
func (m *SqueakMutation) AddInteractionIDs(ids ...int)
AddInteractionIDs adds the "interactions" edge to the Interaction entity by ids.
func (*SqueakMutation) AddedEdges ¶
func (m *SqueakMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SqueakMutation) AddedField ¶
func (m *SqueakMutation) 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 (*SqueakMutation) AddedFields ¶
func (m *SqueakMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SqueakMutation) AddedIDs ¶
func (m *SqueakMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SqueakMutation) BlockNumber ¶
func (m *SqueakMutation) BlockNumber() (r *types.Uint256, exists bool)
BlockNumber returns the value of the "block_number" field in the mutation.
func (*SqueakMutation) ClearCreator ¶
func (m *SqueakMutation) ClearCreator()
ClearCreator clears the "creator" edge to the User entity.
func (*SqueakMutation) ClearEdge ¶
func (m *SqueakMutation) 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 (*SqueakMutation) ClearField ¶
func (m *SqueakMutation) 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 (*SqueakMutation) ClearInteractions ¶
func (m *SqueakMutation) ClearInteractions()
ClearInteractions clears the "interactions" edge to the Interaction entity.
func (*SqueakMutation) ClearOwner ¶
func (m *SqueakMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*SqueakMutation) ClearPool ¶
func (m *SqueakMutation) ClearPool()
ClearPool clears the "pool" edge to the Pool entity.
func (*SqueakMutation) ClearedEdges ¶
func (m *SqueakMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SqueakMutation) ClearedFields ¶
func (m *SqueakMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SqueakMutation) Client ¶
func (m SqueakMutation) 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 (*SqueakMutation) Content ¶
func (m *SqueakMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*SqueakMutation) CreateTime ¶
func (m *SqueakMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*SqueakMutation) CreatorCleared ¶
func (m *SqueakMutation) CreatorCleared() bool
CreatorCleared reports if the "creator" edge to the User entity was cleared.
func (*SqueakMutation) CreatorID ¶
func (m *SqueakMutation) CreatorID() (id int, exists bool)
CreatorID returns the "creator" edge ID in the mutation.
func (*SqueakMutation) CreatorIDs ¶
func (m *SqueakMutation) CreatorIDs() (ids []int)
CreatorIDs returns the "creator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatorID instead. It exists only for internal usage by the builders.
func (*SqueakMutation) EdgeCleared ¶
func (m *SqueakMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SqueakMutation) Field ¶
func (m *SqueakMutation) 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 (*SqueakMutation) FieldCleared ¶
func (m *SqueakMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SqueakMutation) Fields ¶
func (m *SqueakMutation) 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 (*SqueakMutation) ID ¶
func (m *SqueakMutation) 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 (*SqueakMutation) IDs ¶
func (m *SqueakMutation) 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 (*SqueakMutation) InteractionsCleared ¶
func (m *SqueakMutation) InteractionsCleared() bool
InteractionsCleared reports if the "interactions" edge to the Interaction entity was cleared.
func (*SqueakMutation) InteractionsIDs ¶
func (m *SqueakMutation) InteractionsIDs() (ids []int)
InteractionsIDs returns the "interactions" edge IDs in the mutation.
func (*SqueakMutation) OldBlockNumber ¶
OldBlockNumber returns the old "block_number" field's value of the Squeak entity. If the Squeak object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SqueakMutation) OldContent ¶
func (m *SqueakMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Squeak entity. If the Squeak object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SqueakMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Squeak entity. If the Squeak object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SqueakMutation) 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 (*SqueakMutation) OwnerCleared ¶
func (m *SqueakMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*SqueakMutation) OwnerID ¶
func (m *SqueakMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*SqueakMutation) OwnerIDs ¶
func (m *SqueakMutation) 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 (*SqueakMutation) PoolCleared ¶
func (m *SqueakMutation) PoolCleared() bool
PoolCleared reports if the "pool" edge to the Pool entity was cleared.
func (*SqueakMutation) PoolID ¶
func (m *SqueakMutation) PoolID() (id int, exists bool)
PoolID returns the "pool" edge ID in the mutation.
func (*SqueakMutation) PoolIDs ¶
func (m *SqueakMutation) PoolIDs() (ids []int)
PoolIDs returns the "pool" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PoolID instead. It exists only for internal usage by the builders.
func (*SqueakMutation) RemoveInteractionIDs ¶
func (m *SqueakMutation) RemoveInteractionIDs(ids ...int)
RemoveInteractionIDs removes the "interactions" edge to the Interaction entity by IDs.
func (*SqueakMutation) RemovedEdges ¶
func (m *SqueakMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SqueakMutation) RemovedIDs ¶
func (m *SqueakMutation) 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 (*SqueakMutation) RemovedInteractionsIDs ¶
func (m *SqueakMutation) RemovedInteractionsIDs() (ids []int)
RemovedInteractions returns the removed IDs of the "interactions" edge to the Interaction entity.
func (*SqueakMutation) ResetBlockNumber ¶
func (m *SqueakMutation) ResetBlockNumber()
ResetBlockNumber resets all changes to the "block_number" field.
func (*SqueakMutation) ResetContent ¶
func (m *SqueakMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*SqueakMutation) ResetCreateTime ¶
func (m *SqueakMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*SqueakMutation) ResetCreator ¶
func (m *SqueakMutation) ResetCreator()
ResetCreator resets all changes to the "creator" edge.
func (*SqueakMutation) ResetEdge ¶
func (m *SqueakMutation) 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 (*SqueakMutation) ResetField ¶
func (m *SqueakMutation) 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 (*SqueakMutation) ResetInteractions ¶
func (m *SqueakMutation) ResetInteractions()
ResetInteractions resets all changes to the "interactions" edge.
func (*SqueakMutation) ResetOwner ¶
func (m *SqueakMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*SqueakMutation) ResetPool ¶
func (m *SqueakMutation) ResetPool()
ResetPool resets all changes to the "pool" edge.
func (*SqueakMutation) SetBlockNumber ¶
func (m *SqueakMutation) SetBlockNumber(t *types.Uint256)
SetBlockNumber sets the "block_number" field.
func (*SqueakMutation) SetContent ¶
func (m *SqueakMutation) SetContent(s string)
SetContent sets the "content" field.
func (*SqueakMutation) SetCreateTime ¶
func (m *SqueakMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*SqueakMutation) SetCreatorID ¶
func (m *SqueakMutation) SetCreatorID(id int)
SetCreatorID sets the "creator" edge to the User entity by id.
func (*SqueakMutation) SetField ¶
func (m *SqueakMutation) 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 (*SqueakMutation) SetOwnerID ¶
func (m *SqueakMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (*SqueakMutation) SetPoolID ¶
func (m *SqueakMutation) SetPoolID(id int)
SetPoolID sets the "pool" edge to the Pool entity by id.
func (SqueakMutation) Tx ¶
func (m SqueakMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SqueakMutation) Type ¶
func (m *SqueakMutation) Type() string
Type returns the node type of this mutation (Squeak).
func (*SqueakMutation) Where ¶
func (m *SqueakMutation) Where(ps ...predicate.Squeak)
Where appends a list predicates to the SqueakMutation builder.
type SqueakQuery ¶
type SqueakQuery struct {
// contains filtered or unexported fields
}
SqueakQuery is the builder for querying Squeak entities.
func (*SqueakQuery) Aggregate ¶
func (sq *SqueakQuery) Aggregate(fns ...AggregateFunc) *SqueakSelect
Aggregate returns a SqueakSelect configured with the given aggregations.
func (*SqueakQuery) All ¶
func (sq *SqueakQuery) All(ctx context.Context) ([]*Squeak, error)
All executes the query and returns a list of Squeaks.
func (*SqueakQuery) AllX ¶
func (sq *SqueakQuery) AllX(ctx context.Context) []*Squeak
AllX is like All, but panics if an error occurs.
func (*SqueakQuery) Clone ¶
func (sq *SqueakQuery) Clone() *SqueakQuery
Clone returns a duplicate of the SqueakQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SqueakQuery) Count ¶
func (sq *SqueakQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SqueakQuery) CountX ¶
func (sq *SqueakQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SqueakQuery) Exist ¶
func (sq *SqueakQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SqueakQuery) ExistX ¶
func (sq *SqueakQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SqueakQuery) First ¶
func (sq *SqueakQuery) First(ctx context.Context) (*Squeak, error)
First returns the first Squeak entity from the query. Returns a *NotFoundError when no Squeak was found.
func (*SqueakQuery) FirstID ¶
func (sq *SqueakQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Squeak ID from the query. Returns a *NotFoundError when no Squeak ID was found.
func (*SqueakQuery) FirstIDX ¶
func (sq *SqueakQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SqueakQuery) FirstX ¶
func (sq *SqueakQuery) FirstX(ctx context.Context) *Squeak
FirstX is like First, but panics if an error occurs.
func (*SqueakQuery) GroupBy ¶
func (sq *SqueakQuery) GroupBy(field string, fields ...string) *SqueakGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Squeak.Query(). GroupBy(squeak.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SqueakQuery) IDs ¶
func (sq *SqueakQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Squeak IDs.
func (*SqueakQuery) IDsX ¶
func (sq *SqueakQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SqueakQuery) Limit ¶
func (sq *SqueakQuery) Limit(limit int) *SqueakQuery
Limit adds a limit step to the query.
func (*SqueakQuery) Offset ¶
func (sq *SqueakQuery) Offset(offset int) *SqueakQuery
Offset adds an offset step to the query.
func (*SqueakQuery) Only ¶
func (sq *SqueakQuery) Only(ctx context.Context) (*Squeak, error)
Only returns a single Squeak entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Squeak entity is found. Returns a *NotFoundError when no Squeak entities are found.
func (*SqueakQuery) OnlyID ¶
func (sq *SqueakQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Squeak ID in the query. Returns a *NotSingularError when more than one Squeak ID is found. Returns a *NotFoundError when no entities are found.
func (*SqueakQuery) OnlyIDX ¶
func (sq *SqueakQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SqueakQuery) OnlyX ¶
func (sq *SqueakQuery) OnlyX(ctx context.Context) *Squeak
OnlyX is like Only, but panics if an error occurs.
func (*SqueakQuery) Order ¶
func (sq *SqueakQuery) Order(o ...OrderFunc) *SqueakQuery
Order adds an order step to the query.
func (*SqueakQuery) QueryCreator ¶
func (sq *SqueakQuery) QueryCreator() *UserQuery
QueryCreator chains the current query on the "creator" edge.
func (*SqueakQuery) QueryInteractions ¶
func (sq *SqueakQuery) QueryInteractions() *InteractionQuery
QueryInteractions chains the current query on the "interactions" edge.
func (*SqueakQuery) QueryOwner ¶
func (sq *SqueakQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*SqueakQuery) QueryPool ¶
func (sq *SqueakQuery) QueryPool() *PoolQuery
QueryPool chains the current query on the "pool" edge.
func (*SqueakQuery) Select ¶
func (sq *SqueakQuery) Select(fields ...string) *SqueakSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Squeak.Query(). Select(squeak.FieldCreateTime). Scan(ctx, &v)
func (*SqueakQuery) Unique ¶
func (sq *SqueakQuery) Unique(unique bool) *SqueakQuery
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 (*SqueakQuery) Where ¶
func (sq *SqueakQuery) Where(ps ...predicate.Squeak) *SqueakQuery
Where adds a new predicate for the SqueakQuery builder.
func (*SqueakQuery) WithCreator ¶
func (sq *SqueakQuery) WithCreator(opts ...func(*UserQuery)) *SqueakQuery
WithCreator tells the query-builder to eager-load the nodes that are connected to the "creator" edge. The optional arguments are used to configure the query builder of the edge.
func (*SqueakQuery) WithInteractions ¶
func (sq *SqueakQuery) WithInteractions(opts ...func(*InteractionQuery)) *SqueakQuery
WithInteractions tells the query-builder to eager-load the nodes that are connected to the "interactions" edge. The optional arguments are used to configure the query builder of the edge.
func (*SqueakQuery) WithOwner ¶
func (sq *SqueakQuery) WithOwner(opts ...func(*UserQuery)) *SqueakQuery
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 (*SqueakQuery) WithPool ¶
func (sq *SqueakQuery) WithPool(opts ...func(*PoolQuery)) *SqueakQuery
WithPool tells the query-builder to eager-load the nodes that are connected to the "pool" edge. The optional arguments are used to configure the query builder of the edge.
type SqueakSelect ¶
type SqueakSelect struct { *SqueakQuery // contains filtered or unexported fields }
SqueakSelect is the builder for selecting fields of Squeak entities.
func (*SqueakSelect) Aggregate ¶
func (ss *SqueakSelect) Aggregate(fns ...AggregateFunc) *SqueakSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SqueakSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SqueakSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SqueakSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SqueakSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SqueakSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SqueakSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SqueakSelect) Scan ¶
func (ss *SqueakSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SqueakSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SqueakUpdate ¶
type SqueakUpdate struct {
// contains filtered or unexported fields
}
SqueakUpdate is the builder for updating Squeak entities.
func (*SqueakUpdate) AddInteractionIDs ¶
func (su *SqueakUpdate) AddInteractionIDs(ids ...int) *SqueakUpdate
AddInteractionIDs adds the "interactions" edge to the Interaction entity by IDs.
func (*SqueakUpdate) AddInteractions ¶
func (su *SqueakUpdate) AddInteractions(i ...*Interaction) *SqueakUpdate
AddInteractions adds the "interactions" edges to the Interaction entity.
func (*SqueakUpdate) ClearCreator ¶
func (su *SqueakUpdate) ClearCreator() *SqueakUpdate
ClearCreator clears the "creator" edge to the User entity.
func (*SqueakUpdate) ClearInteractions ¶
func (su *SqueakUpdate) ClearInteractions() *SqueakUpdate
ClearInteractions clears all "interactions" edges to the Interaction entity.
func (*SqueakUpdate) ClearOwner ¶
func (su *SqueakUpdate) ClearOwner() *SqueakUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*SqueakUpdate) ClearPool ¶
func (su *SqueakUpdate) ClearPool() *SqueakUpdate
ClearPool clears the "pool" edge to the Pool entity.
func (*SqueakUpdate) Exec ¶
func (su *SqueakUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SqueakUpdate) ExecX ¶
func (su *SqueakUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SqueakUpdate) Mutation ¶
func (su *SqueakUpdate) Mutation() *SqueakMutation
Mutation returns the SqueakMutation object of the builder.
func (*SqueakUpdate) RemoveInteractionIDs ¶
func (su *SqueakUpdate) RemoveInteractionIDs(ids ...int) *SqueakUpdate
RemoveInteractionIDs removes the "interactions" edge to Interaction entities by IDs.
func (*SqueakUpdate) RemoveInteractions ¶
func (su *SqueakUpdate) RemoveInteractions(i ...*Interaction) *SqueakUpdate
RemoveInteractions removes "interactions" edges to Interaction entities.
func (*SqueakUpdate) Save ¶
func (su *SqueakUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SqueakUpdate) SaveX ¶
func (su *SqueakUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SqueakUpdate) SetBlockNumber ¶
func (su *SqueakUpdate) SetBlockNumber(t *types.Uint256) *SqueakUpdate
SetBlockNumber sets the "block_number" field.
func (*SqueakUpdate) SetCreator ¶
func (su *SqueakUpdate) SetCreator(u *User) *SqueakUpdate
SetCreator sets the "creator" edge to the User entity.
func (*SqueakUpdate) SetCreatorID ¶
func (su *SqueakUpdate) SetCreatorID(id int) *SqueakUpdate
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*SqueakUpdate) SetNillableCreatorID ¶
func (su *SqueakUpdate) SetNillableCreatorID(id *int) *SqueakUpdate
SetNillableCreatorID sets the "creator" edge to the User entity by ID if the given value is not nil.
func (*SqueakUpdate) SetNillableOwnerID ¶
func (su *SqueakUpdate) SetNillableOwnerID(id *int) *SqueakUpdate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*SqueakUpdate) SetNillablePoolID ¶
func (su *SqueakUpdate) SetNillablePoolID(id *int) *SqueakUpdate
SetNillablePoolID sets the "pool" edge to the Pool entity by ID if the given value is not nil.
func (*SqueakUpdate) SetOwner ¶
func (su *SqueakUpdate) SetOwner(u *User) *SqueakUpdate
SetOwner sets the "owner" edge to the User entity.
func (*SqueakUpdate) SetOwnerID ¶
func (su *SqueakUpdate) SetOwnerID(id int) *SqueakUpdate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*SqueakUpdate) SetPool ¶
func (su *SqueakUpdate) SetPool(p *Pool) *SqueakUpdate
SetPool sets the "pool" edge to the Pool entity.
func (*SqueakUpdate) SetPoolID ¶
func (su *SqueakUpdate) SetPoolID(id int) *SqueakUpdate
SetPoolID sets the "pool" edge to the Pool entity by ID.
func (*SqueakUpdate) Where ¶
func (su *SqueakUpdate) Where(ps ...predicate.Squeak) *SqueakUpdate
Where appends a list predicates to the SqueakUpdate builder.
type SqueakUpdateOne ¶
type SqueakUpdateOne struct {
// contains filtered or unexported fields
}
SqueakUpdateOne is the builder for updating a single Squeak entity.
func (*SqueakUpdateOne) AddInteractionIDs ¶
func (suo *SqueakUpdateOne) AddInteractionIDs(ids ...int) *SqueakUpdateOne
AddInteractionIDs adds the "interactions" edge to the Interaction entity by IDs.
func (*SqueakUpdateOne) AddInteractions ¶
func (suo *SqueakUpdateOne) AddInteractions(i ...*Interaction) *SqueakUpdateOne
AddInteractions adds the "interactions" edges to the Interaction entity.
func (*SqueakUpdateOne) ClearCreator ¶
func (suo *SqueakUpdateOne) ClearCreator() *SqueakUpdateOne
ClearCreator clears the "creator" edge to the User entity.
func (*SqueakUpdateOne) ClearInteractions ¶
func (suo *SqueakUpdateOne) ClearInteractions() *SqueakUpdateOne
ClearInteractions clears all "interactions" edges to the Interaction entity.
func (*SqueakUpdateOne) ClearOwner ¶
func (suo *SqueakUpdateOne) ClearOwner() *SqueakUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*SqueakUpdateOne) ClearPool ¶
func (suo *SqueakUpdateOne) ClearPool() *SqueakUpdateOne
ClearPool clears the "pool" edge to the Pool entity.
func (*SqueakUpdateOne) Exec ¶
func (suo *SqueakUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SqueakUpdateOne) ExecX ¶
func (suo *SqueakUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SqueakUpdateOne) Mutation ¶
func (suo *SqueakUpdateOne) Mutation() *SqueakMutation
Mutation returns the SqueakMutation object of the builder.
func (*SqueakUpdateOne) RemoveInteractionIDs ¶
func (suo *SqueakUpdateOne) RemoveInteractionIDs(ids ...int) *SqueakUpdateOne
RemoveInteractionIDs removes the "interactions" edge to Interaction entities by IDs.
func (*SqueakUpdateOne) RemoveInteractions ¶
func (suo *SqueakUpdateOne) RemoveInteractions(i ...*Interaction) *SqueakUpdateOne
RemoveInteractions removes "interactions" edges to Interaction entities.
func (*SqueakUpdateOne) Save ¶
func (suo *SqueakUpdateOne) Save(ctx context.Context) (*Squeak, error)
Save executes the query and returns the updated Squeak entity.
func (*SqueakUpdateOne) SaveX ¶
func (suo *SqueakUpdateOne) SaveX(ctx context.Context) *Squeak
SaveX is like Save, but panics if an error occurs.
func (*SqueakUpdateOne) Select ¶
func (suo *SqueakUpdateOne) Select(field string, fields ...string) *SqueakUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SqueakUpdateOne) SetBlockNumber ¶
func (suo *SqueakUpdateOne) SetBlockNumber(t *types.Uint256) *SqueakUpdateOne
SetBlockNumber sets the "block_number" field.
func (*SqueakUpdateOne) SetCreator ¶
func (suo *SqueakUpdateOne) SetCreator(u *User) *SqueakUpdateOne
SetCreator sets the "creator" edge to the User entity.
func (*SqueakUpdateOne) SetCreatorID ¶
func (suo *SqueakUpdateOne) SetCreatorID(id int) *SqueakUpdateOne
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*SqueakUpdateOne) SetNillableCreatorID ¶
func (suo *SqueakUpdateOne) SetNillableCreatorID(id *int) *SqueakUpdateOne
SetNillableCreatorID sets the "creator" edge to the User entity by ID if the given value is not nil.
func (*SqueakUpdateOne) SetNillableOwnerID ¶
func (suo *SqueakUpdateOne) SetNillableOwnerID(id *int) *SqueakUpdateOne
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*SqueakUpdateOne) SetNillablePoolID ¶
func (suo *SqueakUpdateOne) SetNillablePoolID(id *int) *SqueakUpdateOne
SetNillablePoolID sets the "pool" edge to the Pool entity by ID if the given value is not nil.
func (*SqueakUpdateOne) SetOwner ¶
func (suo *SqueakUpdateOne) SetOwner(u *User) *SqueakUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*SqueakUpdateOne) SetOwnerID ¶
func (suo *SqueakUpdateOne) SetOwnerID(id int) *SqueakUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*SqueakUpdateOne) SetPool ¶
func (suo *SqueakUpdateOne) SetPool(p *Pool) *SqueakUpdateOne
SetPool sets the "pool" edge to the Pool entity.
func (*SqueakUpdateOne) SetPoolID ¶
func (suo *SqueakUpdateOne) SetPoolID(id int) *SqueakUpdateOne
SetPoolID sets the "pool" edge to the Pool entity by ID.
type Tx ¶
type Tx struct { // Interaction is the client for interacting with the Interaction builders. Interaction *InteractionClient // Pool is the client for interacting with the Pool builders. Pool *PoolClient // PoolPass is the client for interacting with the PoolPass builders. PoolPass *PoolPassClient // Role is the client for interacting with the Role builders. Role *RoleClient // Squeak is the client for interacting with the Squeak builders. Squeak *SqueakClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Address holds the value of the "address" field. Address string `json:"address,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Status holds the value of the "status" field. Status user.Status `json:"status,omitempty"` // Level holds the value of the "level" field. Level int8 `json:"level,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) QueryCreated ¶
func (u *User) QueryCreated() *SqueakQuery
QueryCreated queries the "created" edge of the User entity.
func (*User) QueryFollowers ¶
QueryFollowers queries the "followers" edge of the User entity.
func (*User) QueryFollowing ¶
QueryFollowing queries the "following" edge of the User entity.
func (*User) QueryInteractions ¶
func (u *User) QueryInteractions() *InteractionQuery
QueryInteractions queries the "interactions" edge of the User entity.
func (*User) QueryOwned ¶
func (u *User) QueryOwned() *SqueakQuery
QueryOwned queries the "owned" edge of the User entity.
func (*User) QueryPoolPasses ¶
func (u *User) QueryPoolPasses() *PoolPassQuery
QueryPoolPasses queries the "pool_passes" edge of the User entity.
func (*User) QueryRoles ¶
QueryRoles queries the "roles" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryCreated ¶
func (c *UserClient) QueryCreated(u *User) *SqueakQuery
QueryCreated queries the created edge of a User.
func (*UserClient) QueryFollowers ¶
func (c *UserClient) QueryFollowers(u *User) *UserQuery
QueryFollowers queries the followers edge of a User.
func (*UserClient) QueryFollowing ¶
func (c *UserClient) QueryFollowing(u *User) *UserQuery
QueryFollowing queries the following edge of a User.
func (*UserClient) QueryInteractions ¶
func (c *UserClient) QueryInteractions(u *User) *InteractionQuery
QueryInteractions queries the interactions edge of a User.
func (*UserClient) QueryOwned ¶
func (c *UserClient) QueryOwned(u *User) *SqueakQuery
QueryOwned queries the owned edge of a User.
func (*UserClient) QueryPoolPasses ¶
func (c *UserClient) QueryPoolPasses(u *User) *PoolPassQuery
QueryPoolPasses queries the pool_passes edge of a User.
func (*UserClient) QueryRoles ¶
func (c *UserClient) QueryRoles(u *User) *RoleQuery
QueryRoles queries the roles 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) AddCreated ¶
func (uc *UserCreate) AddCreated(s ...*Squeak) *UserCreate
AddCreated adds the "created" edges to the Squeak entity.
func (*UserCreate) AddCreatedIDs ¶
func (uc *UserCreate) AddCreatedIDs(ids ...int) *UserCreate
AddCreatedIDs adds the "created" edge to the Squeak entity by IDs.
func (*UserCreate) AddFollowerIDs ¶
func (uc *UserCreate) AddFollowerIDs(ids ...int) *UserCreate
AddFollowerIDs adds the "followers" edge to the User entity by IDs.
func (*UserCreate) AddFollowers ¶
func (uc *UserCreate) AddFollowers(u ...*User) *UserCreate
AddFollowers adds the "followers" edges to the User entity.
func (*UserCreate) AddFollowing ¶
func (uc *UserCreate) AddFollowing(u ...*User) *UserCreate
AddFollowing adds the "following" edges to the User entity.
func (*UserCreate) AddFollowingIDs ¶
func (uc *UserCreate) AddFollowingIDs(ids ...int) *UserCreate
AddFollowingIDs adds the "following" edge to the User entity by IDs.
func (*UserCreate) AddInteractionIDs ¶
func (uc *UserCreate) AddInteractionIDs(ids ...int) *UserCreate
AddInteractionIDs adds the "interactions" edge to the Interaction entity by IDs.
func (*UserCreate) AddInteractions ¶
func (uc *UserCreate) AddInteractions(i ...*Interaction) *UserCreate
AddInteractions adds the "interactions" edges to the Interaction entity.
func (*UserCreate) AddOwned ¶
func (uc *UserCreate) AddOwned(s ...*Squeak) *UserCreate
AddOwned adds the "owned" edges to the Squeak entity.
func (*UserCreate) AddOwnedIDs ¶
func (uc *UserCreate) AddOwnedIDs(ids ...int) *UserCreate
AddOwnedIDs adds the "owned" edge to the Squeak entity by IDs.
func (*UserCreate) AddPoolPassIDs ¶
func (uc *UserCreate) AddPoolPassIDs(ids ...int) *UserCreate
AddPoolPassIDs adds the "pool_passes" edge to the PoolPass entity by IDs.
func (*UserCreate) AddPoolPasses ¶
func (uc *UserCreate) AddPoolPasses(p ...*PoolPass) *UserCreate
AddPoolPasses adds the "pool_passes" edges to the PoolPass entity.
func (*UserCreate) AddRoleIDs ¶
func (uc *UserCreate) AddRoleIDs(ids ...int) *UserCreate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*UserCreate) AddRoles ¶
func (uc *UserCreate) AddRoles(r ...*Role) *UserCreate
AddRoles adds the "roles" edges to the Role entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) 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) SetAddress ¶
func (uc *UserCreate) SetAddress(s string) *UserCreate
SetAddress sets the "address" field.
func (*UserCreate) SetCreateTime ¶
func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
SetCreateTime sets the "create_time" field.
func (*UserCreate) SetLevel ¶
func (uc *UserCreate) SetLevel(i int8) *UserCreate
SetLevel sets the "level" field.
func (*UserCreate) SetNillableCreateTime ¶
func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserCreate) SetNillableLevel ¶
func (uc *UserCreate) SetNillableLevel(i *int8) *UserCreate
SetNillableLevel sets the "level" field if the given value is not nil.
func (*UserCreate) SetNillableUpdateTime ¶
func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserCreate) SetStatus ¶
func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
SetStatus sets the "status" field.
func (*UserCreate) SetUpdateTime ¶
func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
SetUpdateTime sets the "update_time" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct { // Interactions holds the value of the interactions edge. Interactions []*Interaction `json:"interactions,omitempty"` // PoolPasses holds the value of the pool_passes edge. PoolPasses []*PoolPass `json:"pool_passes,omitempty"` // Roles holds the value of the roles edge. Roles []*Role `json:"roles,omitempty"` // Created holds the value of the created edge. Created []*Squeak `json:"created,omitempty"` // Owned holds the value of the owned edge. Owned []*Squeak `json:"owned,omitempty"` // Followers holds the value of the followers edge. Followers []*User `json:"followers,omitempty"` // Following holds the value of the following edge. Following []*User `json:"following,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) CreatedOrErr ¶
CreatedOrErr returns the Created value or an error if the edge was not loaded in eager-loading.
func (UserEdges) FollowersOrErr ¶
FollowersOrErr returns the Followers value or an error if the edge was not loaded in eager-loading.
func (UserEdges) FollowingOrErr ¶
FollowingOrErr returns the Following value or an error if the edge was not loaded in eager-loading.
func (UserEdges) InteractionsOrErr ¶
func (e UserEdges) InteractionsOrErr() ([]*Interaction, error)
InteractionsOrErr returns the Interactions value or an error if the edge was not loaded in eager-loading.
func (UserEdges) OwnedOrErr ¶
OwnedOrErr returns the Owned value or an error if the edge was not loaded in eager-loading.
func (UserEdges) PoolPassesOrErr ¶
PoolPassesOrErr returns the PoolPasses value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RolesOrErr ¶
RolesOrErr returns the Roles 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 group-by 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) AddCreatedIDs ¶
func (m *UserMutation) AddCreatedIDs(ids ...int)
AddCreatedIDs adds the "created" edge to the Squeak 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) AddFollowerIDs ¶
func (m *UserMutation) AddFollowerIDs(ids ...int)
AddFollowerIDs adds the "followers" edge to the User entity by ids.
func (*UserMutation) AddFollowingIDs ¶
func (m *UserMutation) AddFollowingIDs(ids ...int)
AddFollowingIDs adds the "following" edge to the User entity by ids.
func (*UserMutation) AddInteractionIDs ¶
func (m *UserMutation) AddInteractionIDs(ids ...int)
AddInteractionIDs adds the "interactions" edge to the Interaction entity by ids.
func (*UserMutation) AddLevel ¶
func (m *UserMutation) AddLevel(i int8)
AddLevel adds i to the "level" field.
func (*UserMutation) AddOwnedIDs ¶
func (m *UserMutation) AddOwnedIDs(ids ...int)
AddOwnedIDs adds the "owned" edge to the Squeak entity by ids.
func (*UserMutation) AddPoolPassIDs ¶
func (m *UserMutation) AddPoolPassIDs(ids ...int)
AddPoolPassIDs adds the "pool_passes" edge to the PoolPass entity by ids.
func (*UserMutation) AddRoleIDs ¶
func (m *UserMutation) AddRoleIDs(ids ...int)
AddRoleIDs adds the "roles" edge to the Role 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) AddedLevel ¶
func (m *UserMutation) AddedLevel() (r int8, exists bool)
AddedLevel returns the value that was added to the "level" field in this mutation.
func (*UserMutation) Address ¶
func (m *UserMutation) Address() (r string, exists bool)
Address returns the value of the "address" field in the mutation.
func (*UserMutation) ClearCreated ¶
func (m *UserMutation) ClearCreated()
ClearCreated clears the "created" edge to the Squeak entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) 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) ClearFollowers ¶
func (m *UserMutation) ClearFollowers()
ClearFollowers clears the "followers" edge to the User entity.
func (*UserMutation) ClearFollowing ¶
func (m *UserMutation) ClearFollowing()
ClearFollowing clears the "following" edge to the User entity.
func (*UserMutation) ClearInteractions ¶
func (m *UserMutation) ClearInteractions()
ClearInteractions clears the "interactions" edge to the Interaction entity.
func (*UserMutation) ClearOwned ¶
func (m *UserMutation) ClearOwned()
ClearOwned clears the "owned" edge to the Squeak entity.
func (*UserMutation) ClearPoolPasses ¶
func (m *UserMutation) ClearPoolPasses()
ClearPoolPasses clears the "pool_passes" edge to the PoolPass entity.
func (*UserMutation) ClearRoles ¶
func (m *UserMutation) ClearRoles()
ClearRoles clears the "roles" edge to the Role entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreateTime ¶
func (m *UserMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserMutation) CreatedCleared ¶
func (m *UserMutation) CreatedCleared() bool
CreatedCleared reports if the "created" edge to the Squeak entity was cleared.
func (*UserMutation) CreatedIDs ¶
func (m *UserMutation) CreatedIDs() (ids []int)
CreatedIDs returns the "created" edge IDs in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) FollowersCleared ¶
func (m *UserMutation) FollowersCleared() bool
FollowersCleared reports if the "followers" edge to the User entity was cleared.
func (*UserMutation) FollowersIDs ¶
func (m *UserMutation) FollowersIDs() (ids []int)
FollowersIDs returns the "followers" edge IDs in the mutation.
func (*UserMutation) FollowingCleared ¶
func (m *UserMutation) FollowingCleared() bool
FollowingCleared reports if the "following" edge to the User entity was cleared.
func (*UserMutation) FollowingIDs ¶
func (m *UserMutation) FollowingIDs() (ids []int)
FollowingIDs returns the "following" edge IDs 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) InteractionsCleared ¶
func (m *UserMutation) InteractionsCleared() bool
InteractionsCleared reports if the "interactions" edge to the Interaction entity was cleared.
func (*UserMutation) InteractionsIDs ¶
func (m *UserMutation) InteractionsIDs() (ids []int)
InteractionsIDs returns the "interactions" edge IDs in the mutation.
func (*UserMutation) Level ¶
func (m *UserMutation) Level() (r int8, exists bool)
Level returns the value of the "level" field in the mutation.
func (*UserMutation) OldAddress ¶
func (m *UserMutation) OldAddress(ctx context.Context) (v string, err error)
OldAddress returns the old "address" 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) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) 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) OldLevel ¶
func (m *UserMutation) OldLevel(ctx context.Context) (v int8, err error)
OldLevel returns the old "level" 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) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OwnedCleared ¶
func (m *UserMutation) OwnedCleared() bool
OwnedCleared reports if the "owned" edge to the Squeak entity was cleared.
func (*UserMutation) OwnedIDs ¶
func (m *UserMutation) OwnedIDs() (ids []int)
OwnedIDs returns the "owned" edge IDs in the mutation.
func (*UserMutation) PoolPassesCleared ¶
func (m *UserMutation) PoolPassesCleared() bool
PoolPassesCleared reports if the "pool_passes" edge to the PoolPass entity was cleared.
func (*UserMutation) PoolPassesIDs ¶
func (m *UserMutation) PoolPassesIDs() (ids []int)
PoolPassesIDs returns the "pool_passes" edge IDs in the mutation.
func (*UserMutation) RemoveCreatedIDs ¶
func (m *UserMutation) RemoveCreatedIDs(ids ...int)
RemoveCreatedIDs removes the "created" edge to the Squeak entity by IDs.
func (*UserMutation) RemoveFollowerIDs ¶
func (m *UserMutation) RemoveFollowerIDs(ids ...int)
RemoveFollowerIDs removes the "followers" edge to the User entity by IDs.
func (*UserMutation) RemoveFollowingIDs ¶
func (m *UserMutation) RemoveFollowingIDs(ids ...int)
RemoveFollowingIDs removes the "following" edge to the User entity by IDs.
func (*UserMutation) RemoveInteractionIDs ¶
func (m *UserMutation) RemoveInteractionIDs(ids ...int)
RemoveInteractionIDs removes the "interactions" edge to the Interaction entity by IDs.
func (*UserMutation) RemoveOwnedIDs ¶
func (m *UserMutation) RemoveOwnedIDs(ids ...int)
RemoveOwnedIDs removes the "owned" edge to the Squeak entity by IDs.
func (*UserMutation) RemovePoolPassIDs ¶
func (m *UserMutation) RemovePoolPassIDs(ids ...int)
RemovePoolPassIDs removes the "pool_passes" edge to the PoolPass entity by IDs.
func (*UserMutation) RemoveRoleIDs ¶
func (m *UserMutation) RemoveRoleIDs(ids ...int)
RemoveRoleIDs removes the "roles" edge to the Role entity by IDs.
func (*UserMutation) RemovedCreatedIDs ¶
func (m *UserMutation) RemovedCreatedIDs() (ids []int)
RemovedCreated returns the removed IDs of the "created" edge to the Squeak entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedFollowersIDs ¶
func (m *UserMutation) RemovedFollowersIDs() (ids []int)
RemovedFollowers returns the removed IDs of the "followers" edge to the User entity.
func (*UserMutation) RemovedFollowingIDs ¶
func (m *UserMutation) RemovedFollowingIDs() (ids []int)
RemovedFollowing returns the removed IDs of the "following" edge to the User 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) RemovedInteractionsIDs ¶
func (m *UserMutation) RemovedInteractionsIDs() (ids []int)
RemovedInteractions returns the removed IDs of the "interactions" edge to the Interaction entity.
func (*UserMutation) RemovedOwnedIDs ¶
func (m *UserMutation) RemovedOwnedIDs() (ids []int)
RemovedOwned returns the removed IDs of the "owned" edge to the Squeak entity.
func (*UserMutation) RemovedPoolPassesIDs ¶
func (m *UserMutation) RemovedPoolPassesIDs() (ids []int)
RemovedPoolPasses returns the removed IDs of the "pool_passes" edge to the PoolPass entity.
func (*UserMutation) RemovedRolesIDs ¶
func (m *UserMutation) RemovedRolesIDs() (ids []int)
RemovedRoles returns the removed IDs of the "roles" edge to the Role entity.
func (*UserMutation) ResetAddress ¶
func (m *UserMutation) ResetAddress()
ResetAddress resets all changes to the "address" field.
func (*UserMutation) ResetCreateTime ¶
func (m *UserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserMutation) ResetCreated ¶
func (m *UserMutation) ResetCreated()
ResetCreated resets all changes to the "created" edge.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetFollowers ¶
func (m *UserMutation) ResetFollowers()
ResetFollowers resets all changes to the "followers" edge.
func (*UserMutation) ResetFollowing ¶
func (m *UserMutation) ResetFollowing()
ResetFollowing resets all changes to the "following" edge.
func (*UserMutation) ResetInteractions ¶
func (m *UserMutation) ResetInteractions()
ResetInteractions resets all changes to the "interactions" edge.
func (*UserMutation) ResetLevel ¶
func (m *UserMutation) ResetLevel()
ResetLevel resets all changes to the "level" field.
func (*UserMutation) ResetOwned ¶
func (m *UserMutation) ResetOwned()
ResetOwned resets all changes to the "owned" edge.
func (*UserMutation) ResetPoolPasses ¶
func (m *UserMutation) ResetPoolPasses()
ResetPoolPasses resets all changes to the "pool_passes" edge.
func (*UserMutation) ResetRoles ¶
func (m *UserMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*UserMutation) ResetStatus ¶
func (m *UserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserMutation) ResetUpdateTime ¶
func (m *UserMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) RolesCleared ¶
func (m *UserMutation) RolesCleared() bool
RolesCleared reports if the "roles" edge to the Role entity was cleared.
func (*UserMutation) RolesIDs ¶
func (m *UserMutation) RolesIDs() (ids []int)
RolesIDs returns the "roles" edge IDs in the mutation.
func (*UserMutation) SetAddress ¶
func (m *UserMutation) SetAddress(s string)
SetAddress sets the "address" field.
func (*UserMutation) SetCreateTime ¶
func (m *UserMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" 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) SetLevel ¶
func (m *UserMutation) SetLevel(i int8)
SetLevel sets the "level" field.
func (*UserMutation) SetStatus ¶
func (m *UserMutation) SetStatus(u user.Status)
SetStatus sets the "status" field.
func (*UserMutation) SetUpdateTime ¶
func (m *UserMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UserMutation) Status ¶
func (m *UserMutation) Status() (r user.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdateTime ¶
func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
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) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryCreated ¶
func (uq *UserQuery) QueryCreated() *SqueakQuery
QueryCreated chains the current query on the "created" edge.
func (*UserQuery) QueryFollowers ¶
QueryFollowers chains the current query on the "followers" edge.
func (*UserQuery) QueryFollowing ¶
QueryFollowing chains the current query on the "following" edge.
func (*UserQuery) QueryInteractions ¶
func (uq *UserQuery) QueryInteractions() *InteractionQuery
QueryInteractions chains the current query on the "interactions" edge.
func (*UserQuery) QueryOwned ¶
func (uq *UserQuery) QueryOwned() *SqueakQuery
QueryOwned chains the current query on the "owned" edge.
func (*UserQuery) QueryPoolPasses ¶
func (uq *UserQuery) QueryPoolPasses() *PoolPassQuery
QueryPoolPasses chains the current query on the "pool_passes" edge.
func (*UserQuery) QueryRoles ¶
QueryRoles chains the current query on the "roles" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.User.Query(). Select(user.FieldCreateTime). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithCreated ¶
func (uq *UserQuery) WithCreated(opts ...func(*SqueakQuery)) *UserQuery
WithCreated tells the query-builder to eager-load the nodes that are connected to the "created" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithFollowers ¶
WithFollowers tells the query-builder to eager-load the nodes that are connected to the "followers" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithFollowing ¶
WithFollowing tells the query-builder to eager-load the nodes that are connected to the "following" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithInteractions ¶
func (uq *UserQuery) WithInteractions(opts ...func(*InteractionQuery)) *UserQuery
WithInteractions tells the query-builder to eager-load the nodes that are connected to the "interactions" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithOwned ¶
func (uq *UserQuery) WithOwned(opts ...func(*SqueakQuery)) *UserQuery
WithOwned tells the query-builder to eager-load the nodes that are connected to the "owned" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithPoolPasses ¶
func (uq *UserQuery) WithPoolPasses(opts ...func(*PoolPassQuery)) *UserQuery
WithPoolPasses tells the query-builder to eager-load the nodes that are connected to the "pool_passes" 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) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddCreated ¶
func (uu *UserUpdate) AddCreated(s ...*Squeak) *UserUpdate
AddCreated adds the "created" edges to the Squeak entity.
func (*UserUpdate) AddCreatedIDs ¶
func (uu *UserUpdate) AddCreatedIDs(ids ...int) *UserUpdate
AddCreatedIDs adds the "created" edge to the Squeak entity by IDs.
func (*UserUpdate) AddFollowerIDs ¶
func (uu *UserUpdate) AddFollowerIDs(ids ...int) *UserUpdate
AddFollowerIDs adds the "followers" edge to the User entity by IDs.
func (*UserUpdate) AddFollowers ¶
func (uu *UserUpdate) AddFollowers(u ...*User) *UserUpdate
AddFollowers adds the "followers" edges to the User entity.
func (*UserUpdate) AddFollowing ¶
func (uu *UserUpdate) AddFollowing(u ...*User) *UserUpdate
AddFollowing adds the "following" edges to the User entity.
func (*UserUpdate) AddFollowingIDs ¶
func (uu *UserUpdate) AddFollowingIDs(ids ...int) *UserUpdate
AddFollowingIDs adds the "following" edge to the User entity by IDs.
func (*UserUpdate) AddInteractionIDs ¶
func (uu *UserUpdate) AddInteractionIDs(ids ...int) *UserUpdate
AddInteractionIDs adds the "interactions" edge to the Interaction entity by IDs.
func (*UserUpdate) AddInteractions ¶
func (uu *UserUpdate) AddInteractions(i ...*Interaction) *UserUpdate
AddInteractions adds the "interactions" edges to the Interaction entity.
func (*UserUpdate) AddLevel ¶
func (uu *UserUpdate) AddLevel(i int8) *UserUpdate
AddLevel adds i to the "level" field.
func (*UserUpdate) AddOwned ¶
func (uu *UserUpdate) AddOwned(s ...*Squeak) *UserUpdate
AddOwned adds the "owned" edges to the Squeak entity.
func (*UserUpdate) AddOwnedIDs ¶
func (uu *UserUpdate) AddOwnedIDs(ids ...int) *UserUpdate
AddOwnedIDs adds the "owned" edge to the Squeak entity by IDs.
func (*UserUpdate) AddPoolPassIDs ¶
func (uu *UserUpdate) AddPoolPassIDs(ids ...int) *UserUpdate
AddPoolPassIDs adds the "pool_passes" edge to the PoolPass entity by IDs.
func (*UserUpdate) AddPoolPasses ¶
func (uu *UserUpdate) AddPoolPasses(p ...*PoolPass) *UserUpdate
AddPoolPasses adds the "pool_passes" edges to the PoolPass entity.
func (*UserUpdate) AddRoleIDs ¶
func (uu *UserUpdate) AddRoleIDs(ids ...int) *UserUpdate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*UserUpdate) AddRoles ¶
func (uu *UserUpdate) AddRoles(r ...*Role) *UserUpdate
AddRoles adds the "roles" edges to the Role entity.
func (*UserUpdate) ClearCreated ¶
func (uu *UserUpdate) ClearCreated() *UserUpdate
ClearCreated clears all "created" edges to the Squeak entity.
func (*UserUpdate) ClearFollowers ¶
func (uu *UserUpdate) ClearFollowers() *UserUpdate
ClearFollowers clears all "followers" edges to the User entity.
func (*UserUpdate) ClearFollowing ¶
func (uu *UserUpdate) ClearFollowing() *UserUpdate
ClearFollowing clears all "following" edges to the User entity.
func (*UserUpdate) ClearInteractions ¶
func (uu *UserUpdate) ClearInteractions() *UserUpdate
ClearInteractions clears all "interactions" edges to the Interaction entity.
func (*UserUpdate) ClearOwned ¶
func (uu *UserUpdate) ClearOwned() *UserUpdate
ClearOwned clears all "owned" edges to the Squeak entity.
func (*UserUpdate) ClearPoolPasses ¶
func (uu *UserUpdate) ClearPoolPasses() *UserUpdate
ClearPoolPasses clears all "pool_passes" edges to the PoolPass entity.
func (*UserUpdate) ClearRoles ¶
func (uu *UserUpdate) ClearRoles() *UserUpdate
ClearRoles clears all "roles" edges to the Role entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveCreated ¶
func (uu *UserUpdate) RemoveCreated(s ...*Squeak) *UserUpdate
RemoveCreated removes "created" edges to Squeak entities.
func (*UserUpdate) RemoveCreatedIDs ¶
func (uu *UserUpdate) RemoveCreatedIDs(ids ...int) *UserUpdate
RemoveCreatedIDs removes the "created" edge to Squeak entities by IDs.
func (*UserUpdate) RemoveFollowerIDs ¶
func (uu *UserUpdate) RemoveFollowerIDs(ids ...int) *UserUpdate
RemoveFollowerIDs removes the "followers" edge to User entities by IDs.
func (*UserUpdate) RemoveFollowers ¶
func (uu *UserUpdate) RemoveFollowers(u ...*User) *UserUpdate
RemoveFollowers removes "followers" edges to User entities.
func (*UserUpdate) RemoveFollowing ¶
func (uu *UserUpdate) RemoveFollowing(u ...*User) *UserUpdate
RemoveFollowing removes "following" edges to User entities.
func (*UserUpdate) RemoveFollowingIDs ¶
func (uu *UserUpdate) RemoveFollowingIDs(ids ...int) *UserUpdate
RemoveFollowingIDs removes the "following" edge to User entities by IDs.
func (*UserUpdate) RemoveInteractionIDs ¶
func (uu *UserUpdate) RemoveInteractionIDs(ids ...int) *UserUpdate
RemoveInteractionIDs removes the "interactions" edge to Interaction entities by IDs.
func (*UserUpdate) RemoveInteractions ¶
func (uu *UserUpdate) RemoveInteractions(i ...*Interaction) *UserUpdate
RemoveInteractions removes "interactions" edges to Interaction entities.
func (*UserUpdate) RemoveOwned ¶
func (uu *UserUpdate) RemoveOwned(s ...*Squeak) *UserUpdate
RemoveOwned removes "owned" edges to Squeak entities.
func (*UserUpdate) RemoveOwnedIDs ¶
func (uu *UserUpdate) RemoveOwnedIDs(ids ...int) *UserUpdate
RemoveOwnedIDs removes the "owned" edge to Squeak entities by IDs.
func (*UserUpdate) RemovePoolPassIDs ¶
func (uu *UserUpdate) RemovePoolPassIDs(ids ...int) *UserUpdate
RemovePoolPassIDs removes the "pool_passes" edge to PoolPass entities by IDs.
func (*UserUpdate) RemovePoolPasses ¶
func (uu *UserUpdate) RemovePoolPasses(p ...*PoolPass) *UserUpdate
RemovePoolPasses removes "pool_passes" edges to PoolPass entities.
func (*UserUpdate) RemoveRoleIDs ¶
func (uu *UserUpdate) RemoveRoleIDs(ids ...int) *UserUpdate
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*UserUpdate) RemoveRoles ¶
func (uu *UserUpdate) RemoveRoles(r ...*Role) *UserUpdate
RemoveRoles removes "roles" edges to Role 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) SetLevel ¶
func (uu *UserUpdate) SetLevel(i int8) *UserUpdate
SetLevel sets the "level" field.
func (*UserUpdate) SetNillableLevel ¶
func (uu *UserUpdate) SetNillableLevel(i *int8) *UserUpdate
SetNillableLevel sets the "level" field if the given value is not nil.
func (*UserUpdate) SetStatus ¶
func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
SetStatus sets the "status" field.
func (*UserUpdate) SetUpdateTime ¶
func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
SetUpdateTime sets the "update_time" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddCreated ¶
func (uuo *UserUpdateOne) AddCreated(s ...*Squeak) *UserUpdateOne
AddCreated adds the "created" edges to the Squeak entity.
func (*UserUpdateOne) AddCreatedIDs ¶
func (uuo *UserUpdateOne) AddCreatedIDs(ids ...int) *UserUpdateOne
AddCreatedIDs adds the "created" edge to the Squeak entity by IDs.
func (*UserUpdateOne) AddFollowerIDs ¶
func (uuo *UserUpdateOne) AddFollowerIDs(ids ...int) *UserUpdateOne
AddFollowerIDs adds the "followers" edge to the User entity by IDs.
func (*UserUpdateOne) AddFollowers ¶
func (uuo *UserUpdateOne) AddFollowers(u ...*User) *UserUpdateOne
AddFollowers adds the "followers" edges to the User entity.
func (*UserUpdateOne) AddFollowing ¶
func (uuo *UserUpdateOne) AddFollowing(u ...*User) *UserUpdateOne
AddFollowing adds the "following" edges to the User entity.
func (*UserUpdateOne) AddFollowingIDs ¶
func (uuo *UserUpdateOne) AddFollowingIDs(ids ...int) *UserUpdateOne
AddFollowingIDs adds the "following" edge to the User entity by IDs.
func (*UserUpdateOne) AddInteractionIDs ¶
func (uuo *UserUpdateOne) AddInteractionIDs(ids ...int) *UserUpdateOne
AddInteractionIDs adds the "interactions" edge to the Interaction entity by IDs.
func (*UserUpdateOne) AddInteractions ¶
func (uuo *UserUpdateOne) AddInteractions(i ...*Interaction) *UserUpdateOne
AddInteractions adds the "interactions" edges to the Interaction entity.
func (*UserUpdateOne) AddLevel ¶
func (uuo *UserUpdateOne) AddLevel(i int8) *UserUpdateOne
AddLevel adds i to the "level" field.
func (*UserUpdateOne) AddOwned ¶
func (uuo *UserUpdateOne) AddOwned(s ...*Squeak) *UserUpdateOne
AddOwned adds the "owned" edges to the Squeak entity.
func (*UserUpdateOne) AddOwnedIDs ¶
func (uuo *UserUpdateOne) AddOwnedIDs(ids ...int) *UserUpdateOne
AddOwnedIDs adds the "owned" edge to the Squeak entity by IDs.
func (*UserUpdateOne) AddPoolPassIDs ¶
func (uuo *UserUpdateOne) AddPoolPassIDs(ids ...int) *UserUpdateOne
AddPoolPassIDs adds the "pool_passes" edge to the PoolPass entity by IDs.
func (*UserUpdateOne) AddPoolPasses ¶
func (uuo *UserUpdateOne) AddPoolPasses(p ...*PoolPass) *UserUpdateOne
AddPoolPasses adds the "pool_passes" edges to the PoolPass entity.
func (*UserUpdateOne) AddRoleIDs ¶
func (uuo *UserUpdateOne) AddRoleIDs(ids ...int) *UserUpdateOne
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*UserUpdateOne) AddRoles ¶
func (uuo *UserUpdateOne) AddRoles(r ...*Role) *UserUpdateOne
AddRoles adds the "roles" edges to the Role entity.
func (*UserUpdateOne) ClearCreated ¶
func (uuo *UserUpdateOne) ClearCreated() *UserUpdateOne
ClearCreated clears all "created" edges to the Squeak entity.
func (*UserUpdateOne) ClearFollowers ¶
func (uuo *UserUpdateOne) ClearFollowers() *UserUpdateOne
ClearFollowers clears all "followers" edges to the User entity.
func (*UserUpdateOne) ClearFollowing ¶
func (uuo *UserUpdateOne) ClearFollowing() *UserUpdateOne
ClearFollowing clears all "following" edges to the User entity.
func (*UserUpdateOne) ClearInteractions ¶
func (uuo *UserUpdateOne) ClearInteractions() *UserUpdateOne
ClearInteractions clears all "interactions" edges to the Interaction entity.
func (*UserUpdateOne) ClearOwned ¶
func (uuo *UserUpdateOne) ClearOwned() *UserUpdateOne
ClearOwned clears all "owned" edges to the Squeak entity.
func (*UserUpdateOne) ClearPoolPasses ¶
func (uuo *UserUpdateOne) ClearPoolPasses() *UserUpdateOne
ClearPoolPasses clears all "pool_passes" edges to the PoolPass entity.
func (*UserUpdateOne) ClearRoles ¶
func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
ClearRoles clears all "roles" edges to the Role entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveCreated ¶
func (uuo *UserUpdateOne) RemoveCreated(s ...*Squeak) *UserUpdateOne
RemoveCreated removes "created" edges to Squeak entities.
func (*UserUpdateOne) RemoveCreatedIDs ¶
func (uuo *UserUpdateOne) RemoveCreatedIDs(ids ...int) *UserUpdateOne
RemoveCreatedIDs removes the "created" edge to Squeak entities by IDs.
func (*UserUpdateOne) RemoveFollowerIDs ¶
func (uuo *UserUpdateOne) RemoveFollowerIDs(ids ...int) *UserUpdateOne
RemoveFollowerIDs removes the "followers" edge to User entities by IDs.
func (*UserUpdateOne) RemoveFollowers ¶
func (uuo *UserUpdateOne) RemoveFollowers(u ...*User) *UserUpdateOne
RemoveFollowers removes "followers" edges to User entities.
func (*UserUpdateOne) RemoveFollowing ¶
func (uuo *UserUpdateOne) RemoveFollowing(u ...*User) *UserUpdateOne
RemoveFollowing removes "following" edges to User entities.
func (*UserUpdateOne) RemoveFollowingIDs ¶
func (uuo *UserUpdateOne) RemoveFollowingIDs(ids ...int) *UserUpdateOne
RemoveFollowingIDs removes the "following" edge to User entities by IDs.
func (*UserUpdateOne) RemoveInteractionIDs ¶
func (uuo *UserUpdateOne) RemoveInteractionIDs(ids ...int) *UserUpdateOne
RemoveInteractionIDs removes the "interactions" edge to Interaction entities by IDs.
func (*UserUpdateOne) RemoveInteractions ¶
func (uuo *UserUpdateOne) RemoveInteractions(i ...*Interaction) *UserUpdateOne
RemoveInteractions removes "interactions" edges to Interaction entities.
func (*UserUpdateOne) RemoveOwned ¶
func (uuo *UserUpdateOne) RemoveOwned(s ...*Squeak) *UserUpdateOne
RemoveOwned removes "owned" edges to Squeak entities.
func (*UserUpdateOne) RemoveOwnedIDs ¶
func (uuo *UserUpdateOne) RemoveOwnedIDs(ids ...int) *UserUpdateOne
RemoveOwnedIDs removes the "owned" edge to Squeak entities by IDs.
func (*UserUpdateOne) RemovePoolPassIDs ¶
func (uuo *UserUpdateOne) RemovePoolPassIDs(ids ...int) *UserUpdateOne
RemovePoolPassIDs removes the "pool_passes" edge to PoolPass entities by IDs.
func (*UserUpdateOne) RemovePoolPasses ¶
func (uuo *UserUpdateOne) RemovePoolPasses(p ...*PoolPass) *UserUpdateOne
RemovePoolPasses removes "pool_passes" edges to PoolPass entities.
func (*UserUpdateOne) RemoveRoleIDs ¶
func (uuo *UserUpdateOne) RemoveRoleIDs(ids ...int) *UserUpdateOne
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*UserUpdateOne) RemoveRoles ¶
func (uuo *UserUpdateOne) RemoveRoles(r ...*Role) *UserUpdateOne
RemoveRoles removes "roles" edges to Role 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) SetLevel ¶
func (uuo *UserUpdateOne) SetLevel(i int8) *UserUpdateOne
SetLevel sets the "level" field.
func (*UserUpdateOne) SetNillableLevel ¶
func (uuo *UserUpdateOne) SetNillableLevel(i *int8) *UserUpdateOne
SetNillableLevel sets the "level" field if the given value is not nil.
func (*UserUpdateOne) SetStatus ¶
func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
SetStatus sets the "status" field.
func (*UserUpdateOne) SetUpdateTime ¶
func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
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
- config.go
- context.go
- ent.go
- generate.go
- interaction.go
- interaction_create.go
- interaction_delete.go
- interaction_query.go
- interaction_update.go
- mutation.go
- pool.go
- pool_create.go
- pool_delete.go
- pool_query.go
- pool_update.go
- poolpass.go
- poolpass_create.go
- poolpass_delete.go
- poolpass_query.go
- poolpass_update.go
- role.go
- role_create.go
- role_delete.go
- role_query.go
- role_update.go
- runtime.go
- squeak.go
- squeak_create.go
- squeak_delete.go
- squeak_query.go
- squeak_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go