Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(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 Cities
- type City
- type CityClient
- func (c *CityClient) Create() *CityCreate
- func (c *CityClient) Delete() *CityDelete
- func (c *CityClient) DeleteOne(ci *City) *CityDeleteOne
- func (c *CityClient) DeleteOneID(id int) *CityDeleteOne
- func (c *CityClient) Get(ctx context.Context, id int) (*City, error)
- func (c *CityClient) GetX(ctx context.Context, id int) *City
- func (c *CityClient) Hooks() []Hook
- func (c *CityClient) Query() *CityQuery
- func (c *CityClient) QueryConstructions(ci *City) *ConstructionQuery
- func (c *CityClient) QueryOwner(ci *City) *UserQuery
- func (c *CityClient) QueryQueue(ci *City) *QueueQuery
- func (c *CityClient) Update() *CityUpdate
- func (c *CityClient) UpdateOne(ci *City) *CityUpdateOne
- func (c *CityClient) UpdateOneID(id int) *CityUpdateOne
- func (c *CityClient) Use(hooks ...Hook)
- type CityCreate
- func (cc *CityCreate) AddConstructionIDs(ids ...int) *CityCreate
- func (cc *CityCreate) AddConstructions(c ...*Construction) *CityCreate
- func (cc *CityCreate) AddQueue(q ...*Queue) *CityCreate
- func (cc *CityCreate) AddQueueIDs(ids ...int) *CityCreate
- func (cc *CityCreate) Save(ctx context.Context) (*City, error)
- func (cc *CityCreate) SaveX(ctx context.Context) *City
- func (cc *CityCreate) SetConstructionSpeed(i int) *CityCreate
- func (cc *CityCreate) SetFoodLimit(i int) *CityCreate
- func (cc *CityCreate) SetFoodProduction(i int) *CityCreate
- func (cc *CityCreate) SetFoodStored(i int) *CityCreate
- func (cc *CityCreate) SetIronLimit(i int) *CityCreate
- func (cc *CityCreate) SetIronProduction(i int) *CityCreate
- func (cc *CityCreate) SetIronStored(i int) *CityCreate
- func (cc *CityCreate) SetName(s string) *CityCreate
- func (cc *CityCreate) SetNillableConstructionSpeed(i *int) *CityCreate
- func (cc *CityCreate) SetNillableFoodLimit(i *int) *CityCreate
- func (cc *CityCreate) SetNillableFoodProduction(i *int) *CityCreate
- func (cc *CityCreate) SetNillableFoodStored(i *int) *CityCreate
- func (cc *CityCreate) SetNillableIronLimit(i *int) *CityCreate
- func (cc *CityCreate) SetNillableIronProduction(i *int) *CityCreate
- func (cc *CityCreate) SetNillableIronStored(i *int) *CityCreate
- func (cc *CityCreate) SetNillableName(s *string) *CityCreate
- func (cc *CityCreate) SetNillableOwnerID(id *int) *CityCreate
- func (cc *CityCreate) SetNillablePoints(i *int) *CityCreate
- func (cc *CityCreate) SetNillableQueueTime(t *time.Time) *CityCreate
- func (cc *CityCreate) SetNillableStoneLimit(i *int) *CityCreate
- func (cc *CityCreate) SetNillableStoneProduction(i *int) *CityCreate
- func (cc *CityCreate) SetNillableStoneStored(i *int) *CityCreate
- func (cc *CityCreate) SetNillableWoodLimit(i *int) *CityCreate
- func (cc *CityCreate) SetNillableWoodProduction(i *int) *CityCreate
- func (cc *CityCreate) SetNillableWoodStored(i *int) *CityCreate
- func (cc *CityCreate) SetNillableX(i *int) *CityCreate
- func (cc *CityCreate) SetNillableY(i *int) *CityCreate
- func (cc *CityCreate) SetOwner(u *User) *CityCreate
- func (cc *CityCreate) SetOwnerID(id int) *CityCreate
- func (cc *CityCreate) SetPoints(i int) *CityCreate
- func (cc *CityCreate) SetQueueTime(t time.Time) *CityCreate
- func (cc *CityCreate) SetStoneLimit(i int) *CityCreate
- func (cc *CityCreate) SetStoneProduction(i int) *CityCreate
- func (cc *CityCreate) SetStoneStored(i int) *CityCreate
- func (cc *CityCreate) SetWoodLimit(i int) *CityCreate
- func (cc *CityCreate) SetWoodProduction(i int) *CityCreate
- func (cc *CityCreate) SetWoodStored(i int) *CityCreate
- func (cc *CityCreate) SetX(i int) *CityCreate
- func (cc *CityCreate) SetY(i int) *CityCreate
- type CityDelete
- type CityDeleteOne
- type CityEdges
- type CityGroupBy
- func (cgb *CityGroupBy) Aggregate(fns ...AggregateFunc) *CityGroupBy
- func (cgb *CityGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (cgb *CityGroupBy) BoolsX(ctx context.Context) []bool
- func (cgb *CityGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (cgb *CityGroupBy) Float64sX(ctx context.Context) []float64
- func (cgb *CityGroupBy) Ints(ctx context.Context) ([]int, error)
- func (cgb *CityGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CityGroupBy) Scan(ctx context.Context, v interface{}) error
- func (cgb *CityGroupBy) ScanX(ctx context.Context, v interface{})
- func (cgb *CityGroupBy) Strings(ctx context.Context) ([]string, error)
- func (cgb *CityGroupBy) StringsX(ctx context.Context) []string
- type CityMutation
- func (m *CityMutation) AddConstructionIDs(ids ...int)
- func (m *CityMutation) AddConstructionSpeed(i int)
- func (m *CityMutation) AddField(name string, value ent.Value) error
- func (m *CityMutation) AddFoodLimit(i int)
- func (m *CityMutation) AddFoodProduction(i int)
- func (m *CityMutation) AddFoodStored(i int)
- func (m *CityMutation) AddIronLimit(i int)
- func (m *CityMutation) AddIronProduction(i int)
- func (m *CityMutation) AddIronStored(i int)
- func (m *CityMutation) AddPoints(i int)
- func (m *CityMutation) AddQueueIDs(ids ...int)
- func (m *CityMutation) AddStoneLimit(i int)
- func (m *CityMutation) AddStoneProduction(i int)
- func (m *CityMutation) AddStoneStored(i int)
- func (m *CityMutation) AddWoodLimit(i int)
- func (m *CityMutation) AddWoodProduction(i int)
- func (m *CityMutation) AddWoodStored(i int)
- func (m *CityMutation) AddX(i int)
- func (m *CityMutation) AddY(i int)
- func (m *CityMutation) AddedConstructionSpeed() (r int, exists bool)
- func (m *CityMutation) AddedEdges() []string
- func (m *CityMutation) AddedField(name string) (ent.Value, bool)
- func (m *CityMutation) AddedFields() []string
- func (m *CityMutation) AddedFoodLimit() (r int, exists bool)
- func (m *CityMutation) AddedFoodProduction() (r int, exists bool)
- func (m *CityMutation) AddedFoodStored() (r int, exists bool)
- func (m *CityMutation) AddedIDs(name string) []ent.Value
- func (m *CityMutation) AddedIronLimit() (r int, exists bool)
- func (m *CityMutation) AddedIronProduction() (r int, exists bool)
- func (m *CityMutation) AddedIronStored() (r int, exists bool)
- func (m *CityMutation) AddedPoints() (r int, exists bool)
- func (m *CityMutation) AddedStoneLimit() (r int, exists bool)
- func (m *CityMutation) AddedStoneProduction() (r int, exists bool)
- func (m *CityMutation) AddedStoneStored() (r int, exists bool)
- func (m *CityMutation) AddedWoodLimit() (r int, exists bool)
- func (m *CityMutation) AddedWoodProduction() (r int, exists bool)
- func (m *CityMutation) AddedWoodStored() (r int, exists bool)
- func (m *CityMutation) AddedX() (r int, exists bool)
- func (m *CityMutation) AddedY() (r int, exists bool)
- func (m *CityMutation) ClearEdge(name string) error
- func (m *CityMutation) ClearField(name string) error
- func (m *CityMutation) ClearOwner()
- func (m *CityMutation) ClearedEdges() []string
- func (m *CityMutation) ClearedFields() []string
- func (m CityMutation) Client() *Client
- func (m *CityMutation) ConstructionSpeed() (r int, exists bool)
- func (m *CityMutation) ConstructionsIDs() (ids []int)
- func (m *CityMutation) EdgeCleared(name string) bool
- func (m *CityMutation) Field(name string) (ent.Value, bool)
- func (m *CityMutation) FieldCleared(name string) bool
- func (m *CityMutation) Fields() []string
- func (m *CityMutation) FoodLimit() (r int, exists bool)
- func (m *CityMutation) FoodProduction() (r int, exists bool)
- func (m *CityMutation) FoodStored() (r int, exists bool)
- func (m *CityMutation) ID() (id int, exists bool)
- func (m *CityMutation) IronLimit() (r int, exists bool)
- func (m *CityMutation) IronProduction() (r int, exists bool)
- func (m *CityMutation) IronStored() (r int, exists bool)
- func (m *CityMutation) Name() (r string, exists bool)
- func (m *CityMutation) Op() Op
- func (m *CityMutation) OwnerCleared() bool
- func (m *CityMutation) OwnerID() (id int, exists bool)
- func (m *CityMutation) OwnerIDs() (ids []int)
- func (m *CityMutation) Points() (r int, exists bool)
- func (m *CityMutation) QueueIDs() (ids []int)
- func (m *CityMutation) QueueTime() (r time.Time, exists bool)
- func (m *CityMutation) RemoveConstructionIDs(ids ...int)
- func (m *CityMutation) RemoveQueueIDs(ids ...int)
- func (m *CityMutation) RemovedConstructionsIDs() (ids []int)
- func (m *CityMutation) RemovedEdges() []string
- func (m *CityMutation) RemovedIDs(name string) []ent.Value
- func (m *CityMutation) RemovedQueueIDs() (ids []int)
- func (m *CityMutation) ResetConstructionSpeed()
- func (m *CityMutation) ResetConstructions()
- func (m *CityMutation) ResetEdge(name string) error
- func (m *CityMutation) ResetField(name string) error
- func (m *CityMutation) ResetFoodLimit()
- func (m *CityMutation) ResetFoodProduction()
- func (m *CityMutation) ResetFoodStored()
- func (m *CityMutation) ResetIronLimit()
- func (m *CityMutation) ResetIronProduction()
- func (m *CityMutation) ResetIronStored()
- func (m *CityMutation) ResetName()
- func (m *CityMutation) ResetOwner()
- func (m *CityMutation) ResetPoints()
- func (m *CityMutation) ResetQueue()
- func (m *CityMutation) ResetQueueTime()
- func (m *CityMutation) ResetStoneLimit()
- func (m *CityMutation) ResetStoneProduction()
- func (m *CityMutation) ResetStoneStored()
- func (m *CityMutation) ResetWoodLimit()
- func (m *CityMutation) ResetWoodProduction()
- func (m *CityMutation) ResetWoodStored()
- func (m *CityMutation) ResetX()
- func (m *CityMutation) ResetY()
- func (m *CityMutation) SetConstructionSpeed(i int)
- func (m *CityMutation) SetField(name string, value ent.Value) error
- func (m *CityMutation) SetFoodLimit(i int)
- func (m *CityMutation) SetFoodProduction(i int)
- func (m *CityMutation) SetFoodStored(i int)
- func (m *CityMutation) SetIronLimit(i int)
- func (m *CityMutation) SetIronProduction(i int)
- func (m *CityMutation) SetIronStored(i int)
- func (m *CityMutation) SetName(s string)
- func (m *CityMutation) SetOwnerID(id int)
- func (m *CityMutation) SetPoints(i int)
- func (m *CityMutation) SetQueueTime(t time.Time)
- func (m *CityMutation) SetStoneLimit(i int)
- func (m *CityMutation) SetStoneProduction(i int)
- func (m *CityMutation) SetStoneStored(i int)
- func (m *CityMutation) SetWoodLimit(i int)
- func (m *CityMutation) SetWoodProduction(i int)
- func (m *CityMutation) SetWoodStored(i int)
- func (m *CityMutation) SetX(i int)
- func (m *CityMutation) SetY(i int)
- func (m *CityMutation) StoneLimit() (r int, exists bool)
- func (m *CityMutation) StoneProduction() (r int, exists bool)
- func (m *CityMutation) StoneStored() (r int, exists bool)
- func (m CityMutation) Tx() (*Tx, error)
- func (m *CityMutation) Type() string
- func (m *CityMutation) WoodLimit() (r int, exists bool)
- func (m *CityMutation) WoodProduction() (r int, exists bool)
- func (m *CityMutation) WoodStored() (r int, exists bool)
- func (m *CityMutation) X() (r int, exists bool)
- func (m *CityMutation) Y() (r int, exists bool)
- type CityQuery
- func (cq *CityQuery) All(ctx context.Context) ([]*City, error)
- func (cq *CityQuery) AllX(ctx context.Context) []*City
- func (cq *CityQuery) Clone() *CityQuery
- func (cq *CityQuery) Count(ctx context.Context) (int, error)
- func (cq *CityQuery) CountX(ctx context.Context) int
- func (cq *CityQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CityQuery) ExistX(ctx context.Context) bool
- func (cq *CityQuery) First(ctx context.Context) (*City, error)
- func (cq *CityQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *CityQuery) FirstX(ctx context.Context) *City
- func (cq *CityQuery) FirstXID(ctx context.Context) int
- func (cq *CityQuery) GroupBy(field string, fields ...string) *CityGroupBy
- func (cq *CityQuery) IDs(ctx context.Context) ([]int, error)
- func (cq *CityQuery) IDsX(ctx context.Context) []int
- func (cq *CityQuery) Limit(limit int) *CityQuery
- func (cq *CityQuery) Offset(offset int) *CityQuery
- func (cq *CityQuery) Only(ctx context.Context) (*City, error)
- func (cq *CityQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *CityQuery) OnlyX(ctx context.Context) *City
- func (cq *CityQuery) OnlyXID(ctx context.Context) int
- func (cq *CityQuery) Order(o ...OrderFunc) *CityQuery
- func (cq *CityQuery) QueryConstructions() *ConstructionQuery
- func (cq *CityQuery) QueryOwner() *UserQuery
- func (cq *CityQuery) QueryQueue() *QueueQuery
- func (cq *CityQuery) Select(field string, fields ...string) *CitySelect
- func (cq *CityQuery) Where(ps ...predicate.City) *CityQuery
- func (cq *CityQuery) WithConstructions(opts ...func(*ConstructionQuery)) *CityQuery
- func (cq *CityQuery) WithOwner(opts ...func(*UserQuery)) *CityQuery
- func (cq *CityQuery) WithQueue(opts ...func(*QueueQuery)) *CityQuery
- type CitySelect
- func (cs *CitySelect) Bools(ctx context.Context) ([]bool, error)
- func (cs *CitySelect) BoolsX(ctx context.Context) []bool
- func (cs *CitySelect) Float64s(ctx context.Context) ([]float64, error)
- func (cs *CitySelect) Float64sX(ctx context.Context) []float64
- func (cs *CitySelect) Ints(ctx context.Context) ([]int, error)
- func (cs *CitySelect) IntsX(ctx context.Context) []int
- func (cs *CitySelect) Scan(ctx context.Context, v interface{}) error
- func (cs *CitySelect) ScanX(ctx context.Context, v interface{})
- func (cs *CitySelect) Strings(ctx context.Context) ([]string, error)
- func (cs *CitySelect) StringsX(ctx context.Context) []string
- type CityUpdate
- func (cu *CityUpdate) AddConstructionIDs(ids ...int) *CityUpdate
- func (cu *CityUpdate) AddConstructionSpeed(i int) *CityUpdate
- func (cu *CityUpdate) AddConstructions(c ...*Construction) *CityUpdate
- func (cu *CityUpdate) AddFoodLimit(i int) *CityUpdate
- func (cu *CityUpdate) AddFoodProduction(i int) *CityUpdate
- func (cu *CityUpdate) AddFoodStored(i int) *CityUpdate
- func (cu *CityUpdate) AddIronLimit(i int) *CityUpdate
- func (cu *CityUpdate) AddIronProduction(i int) *CityUpdate
- func (cu *CityUpdate) AddIronStored(i int) *CityUpdate
- func (cu *CityUpdate) AddPoints(i int) *CityUpdate
- func (cu *CityUpdate) AddQueue(q ...*Queue) *CityUpdate
- func (cu *CityUpdate) AddQueueIDs(ids ...int) *CityUpdate
- func (cu *CityUpdate) AddStoneLimit(i int) *CityUpdate
- func (cu *CityUpdate) AddStoneProduction(i int) *CityUpdate
- func (cu *CityUpdate) AddStoneStored(i int) *CityUpdate
- func (cu *CityUpdate) AddWoodLimit(i int) *CityUpdate
- func (cu *CityUpdate) AddWoodProduction(i int) *CityUpdate
- func (cu *CityUpdate) AddWoodStored(i int) *CityUpdate
- func (cu *CityUpdate) AddX(i int) *CityUpdate
- func (cu *CityUpdate) AddY(i int) *CityUpdate
- func (cu *CityUpdate) ClearOwner() *CityUpdate
- func (cu *CityUpdate) Exec(ctx context.Context) error
- func (cu *CityUpdate) ExecX(ctx context.Context)
- func (cu *CityUpdate) RemoveConstructionIDs(ids ...int) *CityUpdate
- func (cu *CityUpdate) RemoveConstructions(c ...*Construction) *CityUpdate
- func (cu *CityUpdate) RemoveQueue(q ...*Queue) *CityUpdate
- func (cu *CityUpdate) RemoveQueueIDs(ids ...int) *CityUpdate
- func (cu *CityUpdate) Save(ctx context.Context) (int, error)
- func (cu *CityUpdate) SaveX(ctx context.Context) int
- func (cu *CityUpdate) SetConstructionSpeed(i int) *CityUpdate
- func (cu *CityUpdate) SetFoodLimit(i int) *CityUpdate
- func (cu *CityUpdate) SetFoodProduction(i int) *CityUpdate
- func (cu *CityUpdate) SetFoodStored(i int) *CityUpdate
- func (cu *CityUpdate) SetIronLimit(i int) *CityUpdate
- func (cu *CityUpdate) SetIronProduction(i int) *CityUpdate
- func (cu *CityUpdate) SetIronStored(i int) *CityUpdate
- func (cu *CityUpdate) SetName(s string) *CityUpdate
- func (cu *CityUpdate) SetNillableConstructionSpeed(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableFoodLimit(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableFoodProduction(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableFoodStored(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableIronLimit(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableIronProduction(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableIronStored(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableName(s *string) *CityUpdate
- func (cu *CityUpdate) SetNillableOwnerID(id *int) *CityUpdate
- func (cu *CityUpdate) SetNillablePoints(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableQueueTime(t *time.Time) *CityUpdate
- func (cu *CityUpdate) SetNillableStoneLimit(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableStoneProduction(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableStoneStored(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableWoodLimit(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableWoodProduction(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableWoodStored(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableX(i *int) *CityUpdate
- func (cu *CityUpdate) SetNillableY(i *int) *CityUpdate
- func (cu *CityUpdate) SetOwner(u *User) *CityUpdate
- func (cu *CityUpdate) SetOwnerID(id int) *CityUpdate
- func (cu *CityUpdate) SetPoints(i int) *CityUpdate
- func (cu *CityUpdate) SetQueueTime(t time.Time) *CityUpdate
- func (cu *CityUpdate) SetStoneLimit(i int) *CityUpdate
- func (cu *CityUpdate) SetStoneProduction(i int) *CityUpdate
- func (cu *CityUpdate) SetStoneStored(i int) *CityUpdate
- func (cu *CityUpdate) SetWoodLimit(i int) *CityUpdate
- func (cu *CityUpdate) SetWoodProduction(i int) *CityUpdate
- func (cu *CityUpdate) SetWoodStored(i int) *CityUpdate
- func (cu *CityUpdate) SetX(i int) *CityUpdate
- func (cu *CityUpdate) SetY(i int) *CityUpdate
- func (cu *CityUpdate) Where(ps ...predicate.City) *CityUpdate
- type CityUpdateOne
- func (cuo *CityUpdateOne) AddConstructionIDs(ids ...int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddConstructionSpeed(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddConstructions(c ...*Construction) *CityUpdateOne
- func (cuo *CityUpdateOne) AddFoodLimit(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddFoodProduction(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddFoodStored(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddIronLimit(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddIronProduction(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddIronStored(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddPoints(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddQueue(q ...*Queue) *CityUpdateOne
- func (cuo *CityUpdateOne) AddQueueIDs(ids ...int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddStoneLimit(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddStoneProduction(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddStoneStored(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddWoodLimit(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddWoodProduction(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddWoodStored(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddX(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) AddY(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) ClearOwner() *CityUpdateOne
- func (cuo *CityUpdateOne) Exec(ctx context.Context) error
- func (cuo *CityUpdateOne) ExecX(ctx context.Context)
- func (cuo *CityUpdateOne) RemoveConstructionIDs(ids ...int) *CityUpdateOne
- func (cuo *CityUpdateOne) RemoveConstructions(c ...*Construction) *CityUpdateOne
- func (cuo *CityUpdateOne) RemoveQueue(q ...*Queue) *CityUpdateOne
- func (cuo *CityUpdateOne) RemoveQueueIDs(ids ...int) *CityUpdateOne
- func (cuo *CityUpdateOne) Save(ctx context.Context) (*City, error)
- func (cuo *CityUpdateOne) SaveX(ctx context.Context) *City
- func (cuo *CityUpdateOne) SetConstructionSpeed(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetFoodLimit(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetFoodProduction(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetFoodStored(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetIronLimit(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetIronProduction(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetIronStored(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetName(s string) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableConstructionSpeed(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableFoodLimit(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableFoodProduction(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableFoodStored(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableIronLimit(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableIronProduction(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableIronStored(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableName(s *string) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableOwnerID(id *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillablePoints(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableQueueTime(t *time.Time) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableStoneLimit(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableStoneProduction(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableStoneStored(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableWoodLimit(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableWoodProduction(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableWoodStored(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableX(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableY(i *int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetOwner(u *User) *CityUpdateOne
- func (cuo *CityUpdateOne) SetOwnerID(id int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetPoints(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetQueueTime(t time.Time) *CityUpdateOne
- func (cuo *CityUpdateOne) SetStoneLimit(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetStoneProduction(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetStoneStored(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetWoodLimit(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetWoodProduction(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetWoodStored(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetX(i int) *CityUpdateOne
- func (cuo *CityUpdateOne) SetY(i int) *CityUpdateOne
- type Client
- type ConstraintError
- type Construction
- type ConstructionClient
- func (c *ConstructionClient) Create() *ConstructionCreate
- func (c *ConstructionClient) Delete() *ConstructionDelete
- func (c *ConstructionClient) DeleteOne(co *Construction) *ConstructionDeleteOne
- func (c *ConstructionClient) DeleteOneID(id int) *ConstructionDeleteOne
- func (c *ConstructionClient) Get(ctx context.Context, id int) (*Construction, error)
- func (c *ConstructionClient) GetX(ctx context.Context, id int) *Construction
- func (c *ConstructionClient) Hooks() []Hook
- func (c *ConstructionClient) Query() *ConstructionQuery
- func (c *ConstructionClient) QueryCity(co *Construction) *CityQuery
- func (c *ConstructionClient) QueryQueue(co *Construction) *QueueQuery
- func (c *ConstructionClient) Update() *ConstructionUpdate
- func (c *ConstructionClient) UpdateOne(co *Construction) *ConstructionUpdateOne
- func (c *ConstructionClient) UpdateOneID(id int) *ConstructionUpdateOne
- func (c *ConstructionClient) Use(hooks ...Hook)
- type ConstructionCreate
- func (cc *ConstructionCreate) AddQueue(q ...*Queue) *ConstructionCreate
- func (cc *ConstructionCreate) AddQueueIDs(ids ...int) *ConstructionCreate
- func (cc *ConstructionCreate) Save(ctx context.Context) (*Construction, error)
- func (cc *ConstructionCreate) SaveX(ctx context.Context) *Construction
- func (cc *ConstructionCreate) SetCity(c *City) *ConstructionCreate
- func (cc *ConstructionCreate) SetCityID(id int) *ConstructionCreate
- func (cc *ConstructionCreate) SetLevel(i int) *ConstructionCreate
- func (cc *ConstructionCreate) SetModifier(f float64) *ConstructionCreate
- func (cc *ConstructionCreate) SetNeedRefresh(b bool) *ConstructionCreate
- func (cc *ConstructionCreate) SetNillableCityID(id *int) *ConstructionCreate
- func (cc *ConstructionCreate) SetNillableLevel(i *int) *ConstructionCreate
- func (cc *ConstructionCreate) SetNillableModifier(f *float64) *ConstructionCreate
- func (cc *ConstructionCreate) SetNillableNeedRefresh(b *bool) *ConstructionCreate
- func (cc *ConstructionCreate) SetNillableRawProduction(i *int) *ConstructionCreate
- func (cc *ConstructionCreate) SetNillableType(i *int) *ConstructionCreate
- func (cc *ConstructionCreate) SetRawProduction(i int) *ConstructionCreate
- func (cc *ConstructionCreate) SetType(i int) *ConstructionCreate
- func (cc *ConstructionCreate) SetX(i int) *ConstructionCreate
- func (cc *ConstructionCreate) SetY(i int) *ConstructionCreate
- type ConstructionDelete
- type ConstructionDeleteOne
- type ConstructionEdges
- type ConstructionGroupBy
- func (cgb *ConstructionGroupBy) Aggregate(fns ...AggregateFunc) *ConstructionGroupBy
- func (cgb *ConstructionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (cgb *ConstructionGroupBy) BoolsX(ctx context.Context) []bool
- func (cgb *ConstructionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (cgb *ConstructionGroupBy) Float64sX(ctx context.Context) []float64
- func (cgb *ConstructionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (cgb *ConstructionGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ConstructionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (cgb *ConstructionGroupBy) ScanX(ctx context.Context, v interface{})
- func (cgb *ConstructionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (cgb *ConstructionGroupBy) StringsX(ctx context.Context) []string
- type ConstructionMutation
- func (m *ConstructionMutation) AddField(name string, value ent.Value) error
- func (m *ConstructionMutation) AddLevel(i int)
- func (m *ConstructionMutation) AddModifier(f float64)
- func (m *ConstructionMutation) AddQueueIDs(ids ...int)
- func (m *ConstructionMutation) AddRawProduction(i int)
- func (m *ConstructionMutation) AddType(i int)
- func (m *ConstructionMutation) AddX(i int)
- func (m *ConstructionMutation) AddY(i int)
- func (m *ConstructionMutation) AddedEdges() []string
- func (m *ConstructionMutation) AddedField(name string) (ent.Value, bool)
- func (m *ConstructionMutation) AddedFields() []string
- func (m *ConstructionMutation) AddedIDs(name string) []ent.Value
- func (m *ConstructionMutation) AddedLevel() (r int, exists bool)
- func (m *ConstructionMutation) AddedModifier() (r float64, exists bool)
- func (m *ConstructionMutation) AddedRawProduction() (r int, exists bool)
- func (m *ConstructionMutation) AddedType() (r int, exists bool)
- func (m *ConstructionMutation) AddedX() (r int, exists bool)
- func (m *ConstructionMutation) AddedY() (r int, exists bool)
- func (m *ConstructionMutation) CityCleared() bool
- func (m *ConstructionMutation) CityID() (id int, exists bool)
- func (m *ConstructionMutation) CityIDs() (ids []int)
- func (m *ConstructionMutation) ClearCity()
- func (m *ConstructionMutation) ClearEdge(name string) error
- func (m *ConstructionMutation) ClearField(name string) error
- func (m *ConstructionMutation) ClearedEdges() []string
- func (m *ConstructionMutation) ClearedFields() []string
- func (m ConstructionMutation) Client() *Client
- func (m *ConstructionMutation) EdgeCleared(name string) bool
- func (m *ConstructionMutation) Field(name string) (ent.Value, bool)
- func (m *ConstructionMutation) FieldCleared(name string) bool
- func (m *ConstructionMutation) Fields() []string
- func (m *ConstructionMutation) GetType() (r int, exists bool)
- func (m *ConstructionMutation) ID() (id int, exists bool)
- func (m *ConstructionMutation) Level() (r int, exists bool)
- func (m *ConstructionMutation) Modifier() (r float64, exists bool)
- func (m *ConstructionMutation) NeedRefresh() (r bool, exists bool)
- func (m *ConstructionMutation) Op() Op
- func (m *ConstructionMutation) QueueIDs() (ids []int)
- func (m *ConstructionMutation) RawProduction() (r int, exists bool)
- func (m *ConstructionMutation) RemoveQueueIDs(ids ...int)
- func (m *ConstructionMutation) RemovedEdges() []string
- func (m *ConstructionMutation) RemovedIDs(name string) []ent.Value
- func (m *ConstructionMutation) RemovedQueueIDs() (ids []int)
- func (m *ConstructionMutation) ResetCity()
- func (m *ConstructionMutation) ResetEdge(name string) error
- func (m *ConstructionMutation) ResetField(name string) error
- func (m *ConstructionMutation) ResetLevel()
- func (m *ConstructionMutation) ResetModifier()
- func (m *ConstructionMutation) ResetNeedRefresh()
- func (m *ConstructionMutation) ResetQueue()
- func (m *ConstructionMutation) ResetRawProduction()
- func (m *ConstructionMutation) ResetType()
- func (m *ConstructionMutation) ResetX()
- func (m *ConstructionMutation) ResetY()
- func (m *ConstructionMutation) SetCityID(id int)
- func (m *ConstructionMutation) SetField(name string, value ent.Value) error
- func (m *ConstructionMutation) SetLevel(i int)
- func (m *ConstructionMutation) SetModifier(f float64)
- func (m *ConstructionMutation) SetNeedRefresh(b bool)
- func (m *ConstructionMutation) SetRawProduction(i int)
- func (m *ConstructionMutation) SetType(i int)
- func (m *ConstructionMutation) SetX(i int)
- func (m *ConstructionMutation) SetY(i int)
- func (m ConstructionMutation) Tx() (*Tx, error)
- func (m *ConstructionMutation) Type() string
- func (m *ConstructionMutation) X() (r int, exists bool)
- func (m *ConstructionMutation) Y() (r int, exists bool)
- type ConstructionQuery
- func (cq *ConstructionQuery) All(ctx context.Context) ([]*Construction, error)
- func (cq *ConstructionQuery) AllX(ctx context.Context) []*Construction
- func (cq *ConstructionQuery) Clone() *ConstructionQuery
- func (cq *ConstructionQuery) Count(ctx context.Context) (int, error)
- func (cq *ConstructionQuery) CountX(ctx context.Context) int
- func (cq *ConstructionQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ConstructionQuery) ExistX(ctx context.Context) bool
- func (cq *ConstructionQuery) First(ctx context.Context) (*Construction, error)
- func (cq *ConstructionQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *ConstructionQuery) FirstX(ctx context.Context) *Construction
- func (cq *ConstructionQuery) FirstXID(ctx context.Context) int
- func (cq *ConstructionQuery) GroupBy(field string, fields ...string) *ConstructionGroupBy
- func (cq *ConstructionQuery) IDs(ctx context.Context) ([]int, error)
- func (cq *ConstructionQuery) IDsX(ctx context.Context) []int
- func (cq *ConstructionQuery) Limit(limit int) *ConstructionQuery
- func (cq *ConstructionQuery) Offset(offset int) *ConstructionQuery
- func (cq *ConstructionQuery) Only(ctx context.Context) (*Construction, error)
- func (cq *ConstructionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *ConstructionQuery) OnlyX(ctx context.Context) *Construction
- func (cq *ConstructionQuery) OnlyXID(ctx context.Context) int
- func (cq *ConstructionQuery) Order(o ...OrderFunc) *ConstructionQuery
- func (cq *ConstructionQuery) QueryCity() *CityQuery
- func (cq *ConstructionQuery) QueryQueue() *QueueQuery
- func (cq *ConstructionQuery) Select(field string, fields ...string) *ConstructionSelect
- func (cq *ConstructionQuery) Where(ps ...predicate.Construction) *ConstructionQuery
- func (cq *ConstructionQuery) WithCity(opts ...func(*CityQuery)) *ConstructionQuery
- func (cq *ConstructionQuery) WithQueue(opts ...func(*QueueQuery)) *ConstructionQuery
- type ConstructionSelect
- func (cs *ConstructionSelect) Bools(ctx context.Context) ([]bool, error)
- func (cs *ConstructionSelect) BoolsX(ctx context.Context) []bool
- func (cs *ConstructionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (cs *ConstructionSelect) Float64sX(ctx context.Context) []float64
- func (cs *ConstructionSelect) Ints(ctx context.Context) ([]int, error)
- func (cs *ConstructionSelect) IntsX(ctx context.Context) []int
- func (cs *ConstructionSelect) Scan(ctx context.Context, v interface{}) error
- func (cs *ConstructionSelect) ScanX(ctx context.Context, v interface{})
- func (cs *ConstructionSelect) Strings(ctx context.Context) ([]string, error)
- func (cs *ConstructionSelect) StringsX(ctx context.Context) []string
- type ConstructionUpdate
- func (cu *ConstructionUpdate) AddLevel(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) AddModifier(f float64) *ConstructionUpdate
- func (cu *ConstructionUpdate) AddQueue(q ...*Queue) *ConstructionUpdate
- func (cu *ConstructionUpdate) AddQueueIDs(ids ...int) *ConstructionUpdate
- func (cu *ConstructionUpdate) AddRawProduction(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) AddType(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) AddX(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) AddY(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) ClearCity() *ConstructionUpdate
- func (cu *ConstructionUpdate) Exec(ctx context.Context) error
- func (cu *ConstructionUpdate) ExecX(ctx context.Context)
- func (cu *ConstructionUpdate) RemoveQueue(q ...*Queue) *ConstructionUpdate
- func (cu *ConstructionUpdate) RemoveQueueIDs(ids ...int) *ConstructionUpdate
- func (cu *ConstructionUpdate) Save(ctx context.Context) (int, error)
- func (cu *ConstructionUpdate) SaveX(ctx context.Context) int
- func (cu *ConstructionUpdate) SetCity(c *City) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetCityID(id int) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetLevel(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetModifier(f float64) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetNeedRefresh(b bool) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetNillableCityID(id *int) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetNillableLevel(i *int) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetNillableModifier(f *float64) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetNillableNeedRefresh(b *bool) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetNillableRawProduction(i *int) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetNillableType(i *int) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetRawProduction(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetType(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetX(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) SetY(i int) *ConstructionUpdate
- func (cu *ConstructionUpdate) Where(ps ...predicate.Construction) *ConstructionUpdate
- type ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) AddLevel(i int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) AddModifier(f float64) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) AddQueue(q ...*Queue) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) AddQueueIDs(ids ...int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) AddRawProduction(i int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) AddType(i int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) AddX(i int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) AddY(i int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) ClearCity() *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) Exec(ctx context.Context) error
- func (cuo *ConstructionUpdateOne) ExecX(ctx context.Context)
- func (cuo *ConstructionUpdateOne) RemoveQueue(q ...*Queue) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) RemoveQueueIDs(ids ...int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) Save(ctx context.Context) (*Construction, error)
- func (cuo *ConstructionUpdateOne) SaveX(ctx context.Context) *Construction
- func (cuo *ConstructionUpdateOne) SetCity(c *City) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetCityID(id int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetLevel(i int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetModifier(f float64) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetNeedRefresh(b bool) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetNillableCityID(id *int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetNillableLevel(i *int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetNillableModifier(f *float64) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetNillableNeedRefresh(b *bool) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetNillableRawProduction(i *int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetNillableType(i *int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetRawProduction(i int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetType(i int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetX(i int) *ConstructionUpdateOne
- func (cuo *ConstructionUpdateOne) SetY(i int) *ConstructionUpdateOne
- type Constructions
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type Queue
- type QueueClient
- func (c *QueueClient) Create() *QueueCreate
- func (c *QueueClient) Delete() *QueueDelete
- func (c *QueueClient) DeleteOne(q *Queue) *QueueDeleteOne
- func (c *QueueClient) DeleteOneID(id int) *QueueDeleteOne
- func (c *QueueClient) Get(ctx context.Context, id int) (*Queue, error)
- func (c *QueueClient) GetX(ctx context.Context, id int) *Queue
- func (c *QueueClient) Hooks() []Hook
- func (c *QueueClient) Query() *QueueQuery
- func (c *QueueClient) QueryCity(q *Queue) *CityQuery
- func (c *QueueClient) QueryConstruction(q *Queue) *ConstructionQuery
- func (c *QueueClient) Update() *QueueUpdate
- func (c *QueueClient) UpdateOne(q *Queue) *QueueUpdateOne
- func (c *QueueClient) UpdateOneID(id int) *QueueUpdateOne
- func (c *QueueClient) Use(hooks ...Hook)
- type QueueCreate
- func (qc *QueueCreate) Save(ctx context.Context) (*Queue, error)
- func (qc *QueueCreate) SaveX(ctx context.Context) *Queue
- func (qc *QueueCreate) SetAction(i int) *QueueCreate
- func (qc *QueueCreate) SetCity(c *City) *QueueCreate
- func (qc *QueueCreate) SetCityID(id int) *QueueCreate
- func (qc *QueueCreate) SetCompletion(t time.Time) *QueueCreate
- func (qc *QueueCreate) SetConstruction(c *Construction) *QueueCreate
- func (qc *QueueCreate) SetConstructionID(id int) *QueueCreate
- func (qc *QueueCreate) SetNillableCityID(id *int) *QueueCreate
- func (qc *QueueCreate) SetNillableConstructionID(id *int) *QueueCreate
- func (qc *QueueCreate) SetOrder(i int) *QueueCreate
- type QueueDelete
- type QueueDeleteOne
- type QueueEdges
- type QueueGroupBy
- func (qgb *QueueGroupBy) Aggregate(fns ...AggregateFunc) *QueueGroupBy
- func (qgb *QueueGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (qgb *QueueGroupBy) BoolsX(ctx context.Context) []bool
- func (qgb *QueueGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (qgb *QueueGroupBy) Float64sX(ctx context.Context) []float64
- func (qgb *QueueGroupBy) Ints(ctx context.Context) ([]int, error)
- func (qgb *QueueGroupBy) IntsX(ctx context.Context) []int
- func (qgb *QueueGroupBy) Scan(ctx context.Context, v interface{}) error
- func (qgb *QueueGroupBy) ScanX(ctx context.Context, v interface{})
- func (qgb *QueueGroupBy) Strings(ctx context.Context) ([]string, error)
- func (qgb *QueueGroupBy) StringsX(ctx context.Context) []string
- type QueueMutation
- func (m *QueueMutation) Action() (r int, exists bool)
- func (m *QueueMutation) AddAction(i int)
- func (m *QueueMutation) AddField(name string, value ent.Value) error
- func (m *QueueMutation) AddOrder(i int)
- func (m *QueueMutation) AddedAction() (r int, exists bool)
- func (m *QueueMutation) AddedEdges() []string
- func (m *QueueMutation) AddedField(name string) (ent.Value, bool)
- func (m *QueueMutation) AddedFields() []string
- func (m *QueueMutation) AddedIDs(name string) []ent.Value
- func (m *QueueMutation) AddedOrder() (r int, exists bool)
- func (m *QueueMutation) CityCleared() bool
- func (m *QueueMutation) CityID() (id int, exists bool)
- func (m *QueueMutation) CityIDs() (ids []int)
- func (m *QueueMutation) ClearCity()
- func (m *QueueMutation) ClearConstruction()
- func (m *QueueMutation) ClearEdge(name string) error
- func (m *QueueMutation) ClearField(name string) error
- func (m *QueueMutation) ClearedEdges() []string
- func (m *QueueMutation) ClearedFields() []string
- func (m QueueMutation) Client() *Client
- func (m *QueueMutation) Completion() (r time.Time, exists bool)
- func (m *QueueMutation) ConstructionCleared() bool
- func (m *QueueMutation) ConstructionID() (id int, exists bool)
- func (m *QueueMutation) ConstructionIDs() (ids []int)
- func (m *QueueMutation) EdgeCleared(name string) bool
- func (m *QueueMutation) Field(name string) (ent.Value, bool)
- func (m *QueueMutation) FieldCleared(name string) bool
- func (m *QueueMutation) Fields() []string
- func (m *QueueMutation) ID() (id int, exists bool)
- func (m *QueueMutation) Op() Op
- func (m *QueueMutation) Order() (r int, exists bool)
- func (m *QueueMutation) RemovedEdges() []string
- func (m *QueueMutation) RemovedIDs(name string) []ent.Value
- func (m *QueueMutation) ResetAction()
- func (m *QueueMutation) ResetCity()
- func (m *QueueMutation) ResetCompletion()
- func (m *QueueMutation) ResetConstruction()
- func (m *QueueMutation) ResetEdge(name string) error
- func (m *QueueMutation) ResetField(name string) error
- func (m *QueueMutation) ResetOrder()
- func (m *QueueMutation) SetAction(i int)
- func (m *QueueMutation) SetCityID(id int)
- func (m *QueueMutation) SetCompletion(t time.Time)
- func (m *QueueMutation) SetConstructionID(id int)
- func (m *QueueMutation) SetField(name string, value ent.Value) error
- func (m *QueueMutation) SetOrder(i int)
- func (m QueueMutation) Tx() (*Tx, error)
- func (m *QueueMutation) Type() string
- type QueueQuery
- func (qq *QueueQuery) All(ctx context.Context) ([]*Queue, error)
- func (qq *QueueQuery) AllX(ctx context.Context) []*Queue
- func (qq *QueueQuery) Clone() *QueueQuery
- func (qq *QueueQuery) Count(ctx context.Context) (int, error)
- func (qq *QueueQuery) CountX(ctx context.Context) int
- func (qq *QueueQuery) Exist(ctx context.Context) (bool, error)
- func (qq *QueueQuery) ExistX(ctx context.Context) bool
- func (qq *QueueQuery) First(ctx context.Context) (*Queue, error)
- func (qq *QueueQuery) FirstID(ctx context.Context) (id int, err error)
- func (qq *QueueQuery) FirstX(ctx context.Context) *Queue
- func (qq *QueueQuery) FirstXID(ctx context.Context) int
- func (qq *QueueQuery) GroupBy(field string, fields ...string) *QueueGroupBy
- func (qq *QueueQuery) IDs(ctx context.Context) ([]int, error)
- func (qq *QueueQuery) IDsX(ctx context.Context) []int
- func (qq *QueueQuery) Limit(limit int) *QueueQuery
- func (qq *QueueQuery) Offset(offset int) *QueueQuery
- func (qq *QueueQuery) Only(ctx context.Context) (*Queue, error)
- func (qq *QueueQuery) OnlyID(ctx context.Context) (id int, err error)
- func (qq *QueueQuery) OnlyX(ctx context.Context) *Queue
- func (qq *QueueQuery) OnlyXID(ctx context.Context) int
- func (qq *QueueQuery) Order(o ...OrderFunc) *QueueQuery
- func (qq *QueueQuery) QueryCity() *CityQuery
- func (qq *QueueQuery) QueryConstruction() *ConstructionQuery
- func (qq *QueueQuery) Select(field string, fields ...string) *QueueSelect
- func (qq *QueueQuery) Where(ps ...predicate.Queue) *QueueQuery
- func (qq *QueueQuery) WithCity(opts ...func(*CityQuery)) *QueueQuery
- func (qq *QueueQuery) WithConstruction(opts ...func(*ConstructionQuery)) *QueueQuery
- type QueueSelect
- func (qs *QueueSelect) Bools(ctx context.Context) ([]bool, error)
- func (qs *QueueSelect) BoolsX(ctx context.Context) []bool
- func (qs *QueueSelect) Float64s(ctx context.Context) ([]float64, error)
- func (qs *QueueSelect) Float64sX(ctx context.Context) []float64
- func (qs *QueueSelect) Ints(ctx context.Context) ([]int, error)
- func (qs *QueueSelect) IntsX(ctx context.Context) []int
- func (qs *QueueSelect) Scan(ctx context.Context, v interface{}) error
- func (qs *QueueSelect) ScanX(ctx context.Context, v interface{})
- func (qs *QueueSelect) Strings(ctx context.Context) ([]string, error)
- func (qs *QueueSelect) StringsX(ctx context.Context) []string
- type QueueUpdate
- func (qu *QueueUpdate) AddAction(i int) *QueueUpdate
- func (qu *QueueUpdate) AddOrder(i int) *QueueUpdate
- func (qu *QueueUpdate) ClearCity() *QueueUpdate
- func (qu *QueueUpdate) ClearConstruction() *QueueUpdate
- func (qu *QueueUpdate) Exec(ctx context.Context) error
- func (qu *QueueUpdate) ExecX(ctx context.Context)
- func (qu *QueueUpdate) Save(ctx context.Context) (int, error)
- func (qu *QueueUpdate) SaveX(ctx context.Context) int
- func (qu *QueueUpdate) SetAction(i int) *QueueUpdate
- func (qu *QueueUpdate) SetCity(c *City) *QueueUpdate
- func (qu *QueueUpdate) SetCityID(id int) *QueueUpdate
- func (qu *QueueUpdate) SetCompletion(t time.Time) *QueueUpdate
- func (qu *QueueUpdate) SetConstruction(c *Construction) *QueueUpdate
- func (qu *QueueUpdate) SetConstructionID(id int) *QueueUpdate
- func (qu *QueueUpdate) SetNillableCityID(id *int) *QueueUpdate
- func (qu *QueueUpdate) SetNillableConstructionID(id *int) *QueueUpdate
- func (qu *QueueUpdate) SetOrder(i int) *QueueUpdate
- func (qu *QueueUpdate) Where(ps ...predicate.Queue) *QueueUpdate
- type QueueUpdateOne
- func (quo *QueueUpdateOne) AddAction(i int) *QueueUpdateOne
- func (quo *QueueUpdateOne) AddOrder(i int) *QueueUpdateOne
- func (quo *QueueUpdateOne) ClearCity() *QueueUpdateOne
- func (quo *QueueUpdateOne) ClearConstruction() *QueueUpdateOne
- func (quo *QueueUpdateOne) Exec(ctx context.Context) error
- func (quo *QueueUpdateOne) ExecX(ctx context.Context)
- func (quo *QueueUpdateOne) Save(ctx context.Context) (*Queue, error)
- func (quo *QueueUpdateOne) SaveX(ctx context.Context) *Queue
- func (quo *QueueUpdateOne) SetAction(i int) *QueueUpdateOne
- func (quo *QueueUpdateOne) SetCity(c *City) *QueueUpdateOne
- func (quo *QueueUpdateOne) SetCityID(id int) *QueueUpdateOne
- func (quo *QueueUpdateOne) SetCompletion(t time.Time) *QueueUpdateOne
- func (quo *QueueUpdateOne) SetConstruction(c *Construction) *QueueUpdateOne
- func (quo *QueueUpdateOne) SetConstructionID(id int) *QueueUpdateOne
- func (quo *QueueUpdateOne) SetNillableCityID(id *int) *QueueUpdateOne
- func (quo *QueueUpdateOne) SetNillableConstructionID(id *int) *QueueUpdateOne
- func (quo *QueueUpdateOne) SetOrder(i int) *QueueUpdateOne
- type Queues
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- 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) QueryCities(u *User) *CityQuery
- 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) AddCities(c ...*City) *UserCreate
- func (uc *UserCreate) AddCityIDs(ids ...int) *UserCreate
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAllianceRank(i int) *UserCreate
- func (uc *UserCreate) SetDarkwood(i int) *UserCreate
- func (uc *UserCreate) SetDiamonds(i int) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetGold(i int) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableAllianceRank(i *int) *UserCreate
- func (uc *UserCreate) SetNillableDarkwood(i *int) *UserCreate
- func (uc *UserCreate) SetNillableDiamonds(i *int) *UserCreate
- func (uc *UserCreate) SetNillableGold(i *int) *UserCreate
- func (uc *UserCreate) SetNillableRank(i *int) *UserCreate
- func (uc *UserCreate) SetNillableRunestone(i *int) *UserCreate
- func (uc *UserCreate) SetNillableTrueseed(i *int) *UserCreate
- func (uc *UserCreate) SetNillableVeritium(i *int) *UserCreate
- func (uc *UserCreate) SetPasswordHash(s string) *UserCreate
- func (uc *UserCreate) SetRank(i int) *UserCreate
- func (uc *UserCreate) SetRunestone(i int) *UserCreate
- func (uc *UserCreate) SetTrueseed(i int) *UserCreate
- func (uc *UserCreate) SetVeritium(i int) *UserCreate
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddAllianceRank(i int)
- func (m *UserMutation) AddCityIDs(ids ...int)
- func (m *UserMutation) AddDarkwood(i int)
- func (m *UserMutation) AddDiamonds(i int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddGold(i int)
- func (m *UserMutation) AddRank(i int)
- func (m *UserMutation) AddRunestone(i int)
- func (m *UserMutation) AddTrueseed(i int)
- func (m *UserMutation) AddVeritium(i int)
- func (m *UserMutation) AddedAllianceRank() (r int, exists bool)
- func (m *UserMutation) AddedDarkwood() (r int, exists bool)
- func (m *UserMutation) AddedDiamonds() (r int, exists bool)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedGold() (r int, exists bool)
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedRank() (r int, exists bool)
- func (m *UserMutation) AddedRunestone() (r int, exists bool)
- func (m *UserMutation) AddedTrueseed() (r int, exists bool)
- func (m *UserMutation) AddedVeritium() (r int, exists bool)
- func (m *UserMutation) AllianceRank() (r int, exists bool)
- func (m *UserMutation) CitiesIDs() (ids []int)
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) Darkwood() (r int, exists bool)
- func (m *UserMutation) Diamonds() (r int, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists 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) Gold() (r int, exists bool)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) PasswordHash() (r string, exists bool)
- func (m *UserMutation) Rank() (r int, exists bool)
- func (m *UserMutation) RemoveCityIDs(ids ...int)
- func (m *UserMutation) RemovedCitiesIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetAllianceRank()
- func (m *UserMutation) ResetCities()
- func (m *UserMutation) ResetDarkwood()
- func (m *UserMutation) ResetDiamonds()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetGold()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetPasswordHash()
- func (m *UserMutation) ResetRank()
- func (m *UserMutation) ResetRunestone()
- func (m *UserMutation) ResetTrueseed()
- func (m *UserMutation) ResetVeritium()
- func (m *UserMutation) Runestone() (r int, exists bool)
- func (m *UserMutation) SetAllianceRank(i int)
- func (m *UserMutation) SetDarkwood(i int)
- func (m *UserMutation) SetDiamonds(i int)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetGold(i int)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetPasswordHash(s string)
- func (m *UserMutation) SetRank(i int)
- func (m *UserMutation) SetRunestone(i int)
- func (m *UserMutation) SetTrueseed(i int)
- func (m *UserMutation) SetVeritium(i int)
- func (m *UserMutation) Trueseed() (r int, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Veritium() (r int, exists bool)
- type UserQuery
- 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) FirstX(ctx context.Context) *User
- func (uq *UserQuery) FirstXID(ctx context.Context) int
- 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) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) OnlyXID(ctx context.Context) int
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryCities() *CityQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithCities(opts ...func(*CityQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UserSelect) ScanX(ctx context.Context, v interface{})
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddAllianceRank(i int) *UserUpdate
- func (uu *UserUpdate) AddCities(c ...*City) *UserUpdate
- func (uu *UserUpdate) AddCityIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddDarkwood(i int) *UserUpdate
- func (uu *UserUpdate) AddDiamonds(i int) *UserUpdate
- func (uu *UserUpdate) AddGold(i int) *UserUpdate
- func (uu *UserUpdate) AddRank(i int) *UserUpdate
- func (uu *UserUpdate) AddRunestone(i int) *UserUpdate
- func (uu *UserUpdate) AddTrueseed(i int) *UserUpdate
- func (uu *UserUpdate) AddVeritium(i int) *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) RemoveCities(c ...*City) *UserUpdate
- func (uu *UserUpdate) RemoveCityIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAllianceRank(i int) *UserUpdate
- func (uu *UserUpdate) SetDarkwood(i int) *UserUpdate
- func (uu *UserUpdate) SetDiamonds(i int) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetGold(i int) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableAllianceRank(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableDarkwood(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableDiamonds(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableGold(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableRank(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableRunestone(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableTrueseed(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableVeritium(i *int) *UserUpdate
- func (uu *UserUpdate) SetPasswordHash(s string) *UserUpdate
- func (uu *UserUpdate) SetRank(i int) *UserUpdate
- func (uu *UserUpdate) SetRunestone(i int) *UserUpdate
- func (uu *UserUpdate) SetTrueseed(i int) *UserUpdate
- func (uu *UserUpdate) SetVeritium(i int) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAllianceRank(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCities(c ...*City) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCityIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddDarkwood(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddDiamonds(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGold(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRank(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRunestone(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTrueseed(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddVeritium(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) RemoveCities(c ...*City) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveCityIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) SetAllianceRank(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDarkwood(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDiamonds(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGold(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAllianceRank(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDarkwood(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDiamonds(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableGold(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRank(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRunestone(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTrueseed(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableVeritium(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPasswordHash(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRank(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRunestone(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTrueseed(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetVeritium(i int) *UserUpdateOne
- type Users
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeCity = "City" TypeConstruction = "Construction" TypeQueue = "Queue" 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 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 City ¶
type City struct { // ID of the ent. ID int `json:"id,omitempty"` // X holds the value of the "x" field. X int `json:"x,omitempty"` // Y holds the value of the "y" field. Y int `json:"y,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Points holds the value of the "points" field. Points int `json:"points,omitempty"` // WoodProduction holds the value of the "wood_production" field. WoodProduction int `json:"wood_production,omitempty"` // StoneProduction holds the value of the "stone_production" field. StoneProduction int `json:"stone_production,omitempty"` // IronProduction holds the value of the "iron_production" field. IronProduction int `json:"iron_production,omitempty"` // FoodProduction holds the value of the "food_production" field. FoodProduction int `json:"food_production,omitempty"` // WoodStored holds the value of the "wood_stored" field. WoodStored int `json:"wood_stored,omitempty"` // StoneStored holds the value of the "stone_stored" field. StoneStored int `json:"stone_stored,omitempty"` // IronStored holds the value of the "iron_stored" field. IronStored int `json:"iron_stored,omitempty"` // FoodStored holds the value of the "food_stored" field. FoodStored int `json:"food_stored,omitempty"` // WoodLimit holds the value of the "wood_limit" field. WoodLimit int `json:"wood_limit,omitempty"` // StoneLimit holds the value of the "stone_limit" field. StoneLimit int `json:"stone_limit,omitempty"` // IronLimit holds the value of the "iron_limit" field. IronLimit int `json:"iron_limit,omitempty"` // FoodLimit holds the value of the "food_limit" field. FoodLimit int `json:"food_limit,omitempty"` // QueueTime holds the value of the "queue_time" field. QueueTime time.Time `json:"queue_time,omitempty"` // ConstructionSpeed holds the value of the "construction_speed" field. ConstructionSpeed int `json:"construction_speed,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CityQuery when eager-loading is set. Edges CityEdges `json:"edges"` // contains filtered or unexported fields }
City is the model entity for the City schema.
func (*City) QueryConstructions ¶
func (c *City) QueryConstructions() *ConstructionQuery
QueryConstructions queries the constructions edge of the City.
func (*City) QueryOwner ¶
QueryOwner queries the owner edge of the City.
func (*City) QueryQueue ¶
func (c *City) QueryQueue() *QueueQuery
QueryQueue queries the queue edge of the City.
func (*City) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*City) Update ¶
func (c *City) Update() *CityUpdateOne
Update returns a builder for updating this City. Note that, you need to call City.Unwrap() before calling this method, if this City was returned from a transaction, and the transaction was committed or rolled back.
type CityClient ¶
type CityClient struct {
// contains filtered or unexported fields
}
CityClient is a client for the City schema.
func NewCityClient ¶
func NewCityClient(c config) *CityClient
NewCityClient returns a client for the City from the given config.
func (*CityClient) Create ¶
func (c *CityClient) Create() *CityCreate
Create returns a create builder for City.
func (*CityClient) Delete ¶
func (c *CityClient) Delete() *CityDelete
Delete returns a delete builder for City.
func (*CityClient) DeleteOne ¶
func (c *CityClient) DeleteOne(ci *City) *CityDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*CityClient) DeleteOneID ¶
func (c *CityClient) DeleteOneID(id int) *CityDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*CityClient) GetX ¶
func (c *CityClient) GetX(ctx context.Context, id int) *City
GetX is like Get, but panics if an error occurs.
func (*CityClient) Query ¶
func (c *CityClient) Query() *CityQuery
Create returns a query builder for City.
func (*CityClient) QueryConstructions ¶
func (c *CityClient) QueryConstructions(ci *City) *ConstructionQuery
QueryConstructions queries the constructions edge of a City.
func (*CityClient) QueryOwner ¶
func (c *CityClient) QueryOwner(ci *City) *UserQuery
QueryOwner queries the owner edge of a City.
func (*CityClient) QueryQueue ¶
func (c *CityClient) QueryQueue(ci *City) *QueueQuery
QueryQueue queries the queue edge of a City.
func (*CityClient) Update ¶
func (c *CityClient) Update() *CityUpdate
Update returns an update builder for City.
func (*CityClient) UpdateOne ¶
func (c *CityClient) UpdateOne(ci *City) *CityUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CityClient) UpdateOneID ¶
func (c *CityClient) UpdateOneID(id int) *CityUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CityClient) Use ¶
func (c *CityClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `city.Hooks(f(g(h())))`.
type CityCreate ¶
type CityCreate struct {
// contains filtered or unexported fields
}
CityCreate is the builder for creating a City entity.
func (*CityCreate) AddConstructionIDs ¶
func (cc *CityCreate) AddConstructionIDs(ids ...int) *CityCreate
AddConstructionIDs adds the constructions edge to Construction by ids.
func (*CityCreate) AddConstructions ¶
func (cc *CityCreate) AddConstructions(c ...*Construction) *CityCreate
AddConstructions adds the constructions edges to Construction.
func (*CityCreate) AddQueue ¶
func (cc *CityCreate) AddQueue(q ...*Queue) *CityCreate
AddQueue adds the queue edges to Queue.
func (*CityCreate) AddQueueIDs ¶
func (cc *CityCreate) AddQueueIDs(ids ...int) *CityCreate
AddQueueIDs adds the queue edge to Queue by ids.
func (*CityCreate) Save ¶
func (cc *CityCreate) Save(ctx context.Context) (*City, error)
Save creates the City in the database.
func (*CityCreate) SaveX ¶
func (cc *CityCreate) SaveX(ctx context.Context) *City
SaveX calls Save and panics if Save returns an error.
func (*CityCreate) SetConstructionSpeed ¶
func (cc *CityCreate) SetConstructionSpeed(i int) *CityCreate
SetConstructionSpeed sets the construction_speed field.
func (*CityCreate) SetFoodLimit ¶
func (cc *CityCreate) SetFoodLimit(i int) *CityCreate
SetFoodLimit sets the food_limit field.
func (*CityCreate) SetFoodProduction ¶
func (cc *CityCreate) SetFoodProduction(i int) *CityCreate
SetFoodProduction sets the food_production field.
func (*CityCreate) SetFoodStored ¶
func (cc *CityCreate) SetFoodStored(i int) *CityCreate
SetFoodStored sets the food_stored field.
func (*CityCreate) SetIronLimit ¶
func (cc *CityCreate) SetIronLimit(i int) *CityCreate
SetIronLimit sets the iron_limit field.
func (*CityCreate) SetIronProduction ¶
func (cc *CityCreate) SetIronProduction(i int) *CityCreate
SetIronProduction sets the iron_production field.
func (*CityCreate) SetIronStored ¶
func (cc *CityCreate) SetIronStored(i int) *CityCreate
SetIronStored sets the iron_stored field.
func (*CityCreate) SetName ¶
func (cc *CityCreate) SetName(s string) *CityCreate
SetName sets the name field.
func (*CityCreate) SetNillableConstructionSpeed ¶
func (cc *CityCreate) SetNillableConstructionSpeed(i *int) *CityCreate
SetNillableConstructionSpeed sets the construction_speed field if the given value is not nil.
func (*CityCreate) SetNillableFoodLimit ¶
func (cc *CityCreate) SetNillableFoodLimit(i *int) *CityCreate
SetNillableFoodLimit sets the food_limit field if the given value is not nil.
func (*CityCreate) SetNillableFoodProduction ¶
func (cc *CityCreate) SetNillableFoodProduction(i *int) *CityCreate
SetNillableFoodProduction sets the food_production field if the given value is not nil.
func (*CityCreate) SetNillableFoodStored ¶
func (cc *CityCreate) SetNillableFoodStored(i *int) *CityCreate
SetNillableFoodStored sets the food_stored field if the given value is not nil.
func (*CityCreate) SetNillableIronLimit ¶
func (cc *CityCreate) SetNillableIronLimit(i *int) *CityCreate
SetNillableIronLimit sets the iron_limit field if the given value is not nil.
func (*CityCreate) SetNillableIronProduction ¶
func (cc *CityCreate) SetNillableIronProduction(i *int) *CityCreate
SetNillableIronProduction sets the iron_production field if the given value is not nil.
func (*CityCreate) SetNillableIronStored ¶
func (cc *CityCreate) SetNillableIronStored(i *int) *CityCreate
SetNillableIronStored sets the iron_stored field if the given value is not nil.
func (*CityCreate) SetNillableName ¶
func (cc *CityCreate) SetNillableName(s *string) *CityCreate
SetNillableName sets the name field if the given value is not nil.
func (*CityCreate) SetNillableOwnerID ¶
func (cc *CityCreate) SetNillableOwnerID(id *int) *CityCreate
SetNillableOwnerID sets the owner edge to User by id if the given value is not nil.
func (*CityCreate) SetNillablePoints ¶
func (cc *CityCreate) SetNillablePoints(i *int) *CityCreate
SetNillablePoints sets the points field if the given value is not nil.
func (*CityCreate) SetNillableQueueTime ¶
func (cc *CityCreate) SetNillableQueueTime(t *time.Time) *CityCreate
SetNillableQueueTime sets the queue_time field if the given value is not nil.
func (*CityCreate) SetNillableStoneLimit ¶
func (cc *CityCreate) SetNillableStoneLimit(i *int) *CityCreate
SetNillableStoneLimit sets the stone_limit field if the given value is not nil.
func (*CityCreate) SetNillableStoneProduction ¶
func (cc *CityCreate) SetNillableStoneProduction(i *int) *CityCreate
SetNillableStoneProduction sets the stone_production field if the given value is not nil.
func (*CityCreate) SetNillableStoneStored ¶
func (cc *CityCreate) SetNillableStoneStored(i *int) *CityCreate
SetNillableStoneStored sets the stone_stored field if the given value is not nil.
func (*CityCreate) SetNillableWoodLimit ¶
func (cc *CityCreate) SetNillableWoodLimit(i *int) *CityCreate
SetNillableWoodLimit sets the wood_limit field if the given value is not nil.
func (*CityCreate) SetNillableWoodProduction ¶
func (cc *CityCreate) SetNillableWoodProduction(i *int) *CityCreate
SetNillableWoodProduction sets the wood_production field if the given value is not nil.
func (*CityCreate) SetNillableWoodStored ¶
func (cc *CityCreate) SetNillableWoodStored(i *int) *CityCreate
SetNillableWoodStored sets the wood_stored field if the given value is not nil.
func (*CityCreate) SetNillableX ¶
func (cc *CityCreate) SetNillableX(i *int) *CityCreate
SetNillableX sets the x field if the given value is not nil.
func (*CityCreate) SetNillableY ¶
func (cc *CityCreate) SetNillableY(i *int) *CityCreate
SetNillableY sets the y field if the given value is not nil.
func (*CityCreate) SetOwner ¶
func (cc *CityCreate) SetOwner(u *User) *CityCreate
SetOwner sets the owner edge to User.
func (*CityCreate) SetOwnerID ¶
func (cc *CityCreate) SetOwnerID(id int) *CityCreate
SetOwnerID sets the owner edge to User by id.
func (*CityCreate) SetPoints ¶
func (cc *CityCreate) SetPoints(i int) *CityCreate
SetPoints sets the points field.
func (*CityCreate) SetQueueTime ¶
func (cc *CityCreate) SetQueueTime(t time.Time) *CityCreate
SetQueueTime sets the queue_time field.
func (*CityCreate) SetStoneLimit ¶
func (cc *CityCreate) SetStoneLimit(i int) *CityCreate
SetStoneLimit sets the stone_limit field.
func (*CityCreate) SetStoneProduction ¶
func (cc *CityCreate) SetStoneProduction(i int) *CityCreate
SetStoneProduction sets the stone_production field.
func (*CityCreate) SetStoneStored ¶
func (cc *CityCreate) SetStoneStored(i int) *CityCreate
SetStoneStored sets the stone_stored field.
func (*CityCreate) SetWoodLimit ¶
func (cc *CityCreate) SetWoodLimit(i int) *CityCreate
SetWoodLimit sets the wood_limit field.
func (*CityCreate) SetWoodProduction ¶
func (cc *CityCreate) SetWoodProduction(i int) *CityCreate
SetWoodProduction sets the wood_production field.
func (*CityCreate) SetWoodStored ¶
func (cc *CityCreate) SetWoodStored(i int) *CityCreate
SetWoodStored sets the wood_stored field.
type CityDelete ¶
type CityDelete struct {
// contains filtered or unexported fields
}
CityDelete is the builder for deleting a City entity.
func (*CityDelete) Exec ¶
func (cd *CityDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CityDelete) ExecX ¶
func (cd *CityDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CityDelete) Where ¶
func (cd *CityDelete) Where(ps ...predicate.City) *CityDelete
Where adds a new predicate to the delete builder.
type CityDeleteOne ¶
type CityDeleteOne struct {
// contains filtered or unexported fields
}
CityDeleteOne is the builder for deleting a single City entity.
func (*CityDeleteOne) Exec ¶
func (cdo *CityDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CityDeleteOne) ExecX ¶
func (cdo *CityDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CityEdges ¶
type CityEdges struct { // Owner holds the value of the owner edge. Owner *User // Constructions holds the value of the constructions edge. Constructions []*Construction // Queue holds the value of the queue edge. Queue []*Queue // contains filtered or unexported fields }
CityEdges holds the relations/edges for other nodes in the graph.
func (CityEdges) ConstructionsOrErr ¶
func (e CityEdges) ConstructionsOrErr() ([]*Construction, error)
ConstructionsOrErr returns the Constructions value or an error if the edge was not loaded in eager-loading.
func (CityEdges) OwnerOrErr ¶
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CityEdges) QueueOrErr ¶
QueueOrErr returns the Queue value or an error if the edge was not loaded in eager-loading.
type CityGroupBy ¶
type CityGroupBy struct {
// contains filtered or unexported fields
}
CityGroupBy is the builder for group-by City entities.
func (*CityGroupBy) Aggregate ¶
func (cgb *CityGroupBy) Aggregate(fns ...AggregateFunc) *CityGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CityGroupBy) Bools ¶
func (cgb *CityGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*CityGroupBy) BoolsX ¶
func (cgb *CityGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CityGroupBy) Float64s ¶
func (cgb *CityGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*CityGroupBy) Float64sX ¶
func (cgb *CityGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CityGroupBy) Ints ¶
func (cgb *CityGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*CityGroupBy) IntsX ¶
func (cgb *CityGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CityGroupBy) Scan ¶
func (cgb *CityGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*CityGroupBy) ScanX ¶
func (cgb *CityGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type CityMutation ¶
type CityMutation struct {
// contains filtered or unexported fields
}
CityMutation represents an operation that mutate the Cities nodes in the graph.
func (*CityMutation) AddConstructionIDs ¶
func (m *CityMutation) AddConstructionIDs(ids ...int)
AddConstructionIDs adds the constructions edge to Construction by ids.
func (*CityMutation) AddConstructionSpeed ¶
func (m *CityMutation) AddConstructionSpeed(i int)
AddConstructionSpeed adds i to construction_speed.
func (*CityMutation) AddField ¶
func (m *CityMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*CityMutation) AddFoodLimit ¶
func (m *CityMutation) AddFoodLimit(i int)
AddFoodLimit adds i to food_limit.
func (*CityMutation) AddFoodProduction ¶
func (m *CityMutation) AddFoodProduction(i int)
AddFoodProduction adds i to food_production.
func (*CityMutation) AddFoodStored ¶
func (m *CityMutation) AddFoodStored(i int)
AddFoodStored adds i to food_stored.
func (*CityMutation) AddIronLimit ¶
func (m *CityMutation) AddIronLimit(i int)
AddIronLimit adds i to iron_limit.
func (*CityMutation) AddIronProduction ¶
func (m *CityMutation) AddIronProduction(i int)
AddIronProduction adds i to iron_production.
func (*CityMutation) AddIronStored ¶
func (m *CityMutation) AddIronStored(i int)
AddIronStored adds i to iron_stored.
func (*CityMutation) AddPoints ¶
func (m *CityMutation) AddPoints(i int)
AddPoints adds i to points.
func (*CityMutation) AddQueueIDs ¶
func (m *CityMutation) AddQueueIDs(ids ...int)
AddQueueIDs adds the queue edge to Queue by ids.
func (*CityMutation) AddStoneLimit ¶
func (m *CityMutation) AddStoneLimit(i int)
AddStoneLimit adds i to stone_limit.
func (*CityMutation) AddStoneProduction ¶
func (m *CityMutation) AddStoneProduction(i int)
AddStoneProduction adds i to stone_production.
func (*CityMutation) AddStoneStored ¶
func (m *CityMutation) AddStoneStored(i int)
AddStoneStored adds i to stone_stored.
func (*CityMutation) AddWoodLimit ¶
func (m *CityMutation) AddWoodLimit(i int)
AddWoodLimit adds i to wood_limit.
func (*CityMutation) AddWoodProduction ¶
func (m *CityMutation) AddWoodProduction(i int)
AddWoodProduction adds i to wood_production.
func (*CityMutation) AddWoodStored ¶
func (m *CityMutation) AddWoodStored(i int)
AddWoodStored adds i to wood_stored.
func (*CityMutation) AddedConstructionSpeed ¶
func (m *CityMutation) AddedConstructionSpeed() (r int, exists bool)
AddedConstructionSpeed returns the value that was added to the construction_speed field in this mutation.
func (*CityMutation) AddedEdges ¶
func (m *CityMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CityMutation) AddedField ¶
func (m *CityMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*CityMutation) AddedFields ¶
func (m *CityMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*CityMutation) AddedFoodLimit ¶
func (m *CityMutation) AddedFoodLimit() (r int, exists bool)
AddedFoodLimit returns the value that was added to the food_limit field in this mutation.
func (*CityMutation) AddedFoodProduction ¶
func (m *CityMutation) AddedFoodProduction() (r int, exists bool)
AddedFoodProduction returns the value that was added to the food_production field in this mutation.
func (*CityMutation) AddedFoodStored ¶
func (m *CityMutation) AddedFoodStored() (r int, exists bool)
AddedFoodStored returns the value that was added to the food_stored field in this mutation.
func (*CityMutation) AddedIDs ¶
func (m *CityMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*CityMutation) AddedIronLimit ¶
func (m *CityMutation) AddedIronLimit() (r int, exists bool)
AddedIronLimit returns the value that was added to the iron_limit field in this mutation.
func (*CityMutation) AddedIronProduction ¶
func (m *CityMutation) AddedIronProduction() (r int, exists bool)
AddedIronProduction returns the value that was added to the iron_production field in this mutation.
func (*CityMutation) AddedIronStored ¶
func (m *CityMutation) AddedIronStored() (r int, exists bool)
AddedIronStored returns the value that was added to the iron_stored field in this mutation.
func (*CityMutation) AddedPoints ¶
func (m *CityMutation) AddedPoints() (r int, exists bool)
AddedPoints returns the value that was added to the points field in this mutation.
func (*CityMutation) AddedStoneLimit ¶
func (m *CityMutation) AddedStoneLimit() (r int, exists bool)
AddedStoneLimit returns the value that was added to the stone_limit field in this mutation.
func (*CityMutation) AddedStoneProduction ¶
func (m *CityMutation) AddedStoneProduction() (r int, exists bool)
AddedStoneProduction returns the value that was added to the stone_production field in this mutation.
func (*CityMutation) AddedStoneStored ¶
func (m *CityMutation) AddedStoneStored() (r int, exists bool)
AddedStoneStored returns the value that was added to the stone_stored field in this mutation.
func (*CityMutation) AddedWoodLimit ¶
func (m *CityMutation) AddedWoodLimit() (r int, exists bool)
AddedWoodLimit returns the value that was added to the wood_limit field in this mutation.
func (*CityMutation) AddedWoodProduction ¶
func (m *CityMutation) AddedWoodProduction() (r int, exists bool)
AddedWoodProduction returns the value that was added to the wood_production field in this mutation.
func (*CityMutation) AddedWoodStored ¶
func (m *CityMutation) AddedWoodStored() (r int, exists bool)
AddedWoodStored returns the value that was added to the wood_stored field in this mutation.
func (*CityMutation) AddedX ¶
func (m *CityMutation) AddedX() (r int, exists bool)
AddedX returns the value that was added to the x field in this mutation.
func (*CityMutation) AddedY ¶
func (m *CityMutation) AddedY() (r int, exists bool)
AddedY returns the value that was added to the y field in this mutation.
func (*CityMutation) ClearEdge ¶
func (m *CityMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*CityMutation) ClearField ¶
func (m *CityMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*CityMutation) ClearOwner ¶
func (m *CityMutation) ClearOwner()
ClearOwner clears the owner edge to User.
func (*CityMutation) ClearedEdges ¶
func (m *CityMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CityMutation) ClearedFields ¶
func (m *CityMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CityMutation) Client ¶
func (m CityMutation) 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 (*CityMutation) ConstructionSpeed ¶
func (m *CityMutation) ConstructionSpeed() (r int, exists bool)
ConstructionSpeed returns the construction_speed value in the mutation.
func (*CityMutation) ConstructionsIDs ¶
func (m *CityMutation) ConstructionsIDs() (ids []int)
ConstructionsIDs returns the constructions ids in the mutation.
func (*CityMutation) EdgeCleared ¶
func (m *CityMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*CityMutation) Field ¶
func (m *CityMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*CityMutation) FieldCleared ¶
func (m *CityMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*CityMutation) Fields ¶
func (m *CityMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*CityMutation) FoodLimit ¶
func (m *CityMutation) FoodLimit() (r int, exists bool)
FoodLimit returns the food_limit value in the mutation.
func (*CityMutation) FoodProduction ¶
func (m *CityMutation) FoodProduction() (r int, exists bool)
FoodProduction returns the food_production value in the mutation.
func (*CityMutation) FoodStored ¶
func (m *CityMutation) FoodStored() (r int, exists bool)
FoodStored returns the food_stored value in the mutation.
func (*CityMutation) ID ¶
func (m *CityMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*CityMutation) IronLimit ¶
func (m *CityMutation) IronLimit() (r int, exists bool)
IronLimit returns the iron_limit value in the mutation.
func (*CityMutation) IronProduction ¶
func (m *CityMutation) IronProduction() (r int, exists bool)
IronProduction returns the iron_production value in the mutation.
func (*CityMutation) IronStored ¶
func (m *CityMutation) IronStored() (r int, exists bool)
IronStored returns the iron_stored value in the mutation.
func (*CityMutation) Name ¶
func (m *CityMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*CityMutation) OwnerCleared ¶
func (m *CityMutation) OwnerCleared() bool
OwnerCleared returns if the edge owner was cleared.
func (*CityMutation) OwnerID ¶
func (m *CityMutation) OwnerID() (id int, exists bool)
OwnerID returns the owner id in the mutation.
func (*CityMutation) OwnerIDs ¶
func (m *CityMutation) OwnerIDs() (ids []int)
OwnerIDs returns the owner 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 (*CityMutation) Points ¶
func (m *CityMutation) Points() (r int, exists bool)
Points returns the points value in the mutation.
func (*CityMutation) QueueIDs ¶
func (m *CityMutation) QueueIDs() (ids []int)
QueueIDs returns the queue ids in the mutation.
func (*CityMutation) QueueTime ¶
func (m *CityMutation) QueueTime() (r time.Time, exists bool)
QueueTime returns the queue_time value in the mutation.
func (*CityMutation) RemoveConstructionIDs ¶
func (m *CityMutation) RemoveConstructionIDs(ids ...int)
RemoveConstructionIDs removes the constructions edge to Construction by ids.
func (*CityMutation) RemoveQueueIDs ¶
func (m *CityMutation) RemoveQueueIDs(ids ...int)
RemoveQueueIDs removes the queue edge to Queue by ids.
func (*CityMutation) RemovedConstructionsIDs ¶
func (m *CityMutation) RemovedConstructionsIDs() (ids []int)
RemovedConstructions returns the removed ids of constructions.
func (*CityMutation) RemovedEdges ¶
func (m *CityMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CityMutation) RemovedIDs ¶
func (m *CityMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*CityMutation) RemovedQueueIDs ¶
func (m *CityMutation) RemovedQueueIDs() (ids []int)
RemovedQueue returns the removed ids of queue.
func (*CityMutation) ResetConstructionSpeed ¶
func (m *CityMutation) ResetConstructionSpeed()
ResetConstructionSpeed reset all changes of the construction_speed field.
func (*CityMutation) ResetConstructions ¶
func (m *CityMutation) ResetConstructions()
ResetConstructions reset all changes of the constructions edge.
func (*CityMutation) ResetEdge ¶
func (m *CityMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*CityMutation) ResetField ¶
func (m *CityMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*CityMutation) ResetFoodLimit ¶
func (m *CityMutation) ResetFoodLimit()
ResetFoodLimit reset all changes of the food_limit field.
func (*CityMutation) ResetFoodProduction ¶
func (m *CityMutation) ResetFoodProduction()
ResetFoodProduction reset all changes of the food_production field.
func (*CityMutation) ResetFoodStored ¶
func (m *CityMutation) ResetFoodStored()
ResetFoodStored reset all changes of the food_stored field.
func (*CityMutation) ResetIronLimit ¶
func (m *CityMutation) ResetIronLimit()
ResetIronLimit reset all changes of the iron_limit field.
func (*CityMutation) ResetIronProduction ¶
func (m *CityMutation) ResetIronProduction()
ResetIronProduction reset all changes of the iron_production field.
func (*CityMutation) ResetIronStored ¶
func (m *CityMutation) ResetIronStored()
ResetIronStored reset all changes of the iron_stored field.
func (*CityMutation) ResetName ¶
func (m *CityMutation) ResetName()
ResetName reset all changes of the name field.
func (*CityMutation) ResetOwner ¶
func (m *CityMutation) ResetOwner()
ResetOwner reset all changes of the owner edge.
func (*CityMutation) ResetPoints ¶
func (m *CityMutation) ResetPoints()
ResetPoints reset all changes of the points field.
func (*CityMutation) ResetQueue ¶
func (m *CityMutation) ResetQueue()
ResetQueue reset all changes of the queue edge.
func (*CityMutation) ResetQueueTime ¶
func (m *CityMutation) ResetQueueTime()
ResetQueueTime reset all changes of the queue_time field.
func (*CityMutation) ResetStoneLimit ¶
func (m *CityMutation) ResetStoneLimit()
ResetStoneLimit reset all changes of the stone_limit field.
func (*CityMutation) ResetStoneProduction ¶
func (m *CityMutation) ResetStoneProduction()
ResetStoneProduction reset all changes of the stone_production field.
func (*CityMutation) ResetStoneStored ¶
func (m *CityMutation) ResetStoneStored()
ResetStoneStored reset all changes of the stone_stored field.
func (*CityMutation) ResetWoodLimit ¶
func (m *CityMutation) ResetWoodLimit()
ResetWoodLimit reset all changes of the wood_limit field.
func (*CityMutation) ResetWoodProduction ¶
func (m *CityMutation) ResetWoodProduction()
ResetWoodProduction reset all changes of the wood_production field.
func (*CityMutation) ResetWoodStored ¶
func (m *CityMutation) ResetWoodStored()
ResetWoodStored reset all changes of the wood_stored field.
func (*CityMutation) ResetX ¶
func (m *CityMutation) ResetX()
ResetX reset all changes of the x field.
func (*CityMutation) ResetY ¶
func (m *CityMutation) ResetY()
ResetY reset all changes of the y field.
func (*CityMutation) SetConstructionSpeed ¶
func (m *CityMutation) SetConstructionSpeed(i int)
SetConstructionSpeed sets the construction_speed field.
func (*CityMutation) SetField ¶
func (m *CityMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*CityMutation) SetFoodLimit ¶
func (m *CityMutation) SetFoodLimit(i int)
SetFoodLimit sets the food_limit field.
func (*CityMutation) SetFoodProduction ¶
func (m *CityMutation) SetFoodProduction(i int)
SetFoodProduction sets the food_production field.
func (*CityMutation) SetFoodStored ¶
func (m *CityMutation) SetFoodStored(i int)
SetFoodStored sets the food_stored field.
func (*CityMutation) SetIronLimit ¶
func (m *CityMutation) SetIronLimit(i int)
SetIronLimit sets the iron_limit field.
func (*CityMutation) SetIronProduction ¶
func (m *CityMutation) SetIronProduction(i int)
SetIronProduction sets the iron_production field.
func (*CityMutation) SetIronStored ¶
func (m *CityMutation) SetIronStored(i int)
SetIronStored sets the iron_stored field.
func (*CityMutation) SetName ¶
func (m *CityMutation) SetName(s string)
SetName sets the name field.
func (*CityMutation) SetOwnerID ¶
func (m *CityMutation) SetOwnerID(id int)
SetOwnerID sets the owner edge to User by id.
func (*CityMutation) SetPoints ¶
func (m *CityMutation) SetPoints(i int)
SetPoints sets the points field.
func (*CityMutation) SetQueueTime ¶
func (m *CityMutation) SetQueueTime(t time.Time)
SetQueueTime sets the queue_time field.
func (*CityMutation) SetStoneLimit ¶
func (m *CityMutation) SetStoneLimit(i int)
SetStoneLimit sets the stone_limit field.
func (*CityMutation) SetStoneProduction ¶
func (m *CityMutation) SetStoneProduction(i int)
SetStoneProduction sets the stone_production field.
func (*CityMutation) SetStoneStored ¶
func (m *CityMutation) SetStoneStored(i int)
SetStoneStored sets the stone_stored field.
func (*CityMutation) SetWoodLimit ¶
func (m *CityMutation) SetWoodLimit(i int)
SetWoodLimit sets the wood_limit field.
func (*CityMutation) SetWoodProduction ¶
func (m *CityMutation) SetWoodProduction(i int)
SetWoodProduction sets the wood_production field.
func (*CityMutation) SetWoodStored ¶
func (m *CityMutation) SetWoodStored(i int)
SetWoodStored sets the wood_stored field.
func (*CityMutation) StoneLimit ¶
func (m *CityMutation) StoneLimit() (r int, exists bool)
StoneLimit returns the stone_limit value in the mutation.
func (*CityMutation) StoneProduction ¶
func (m *CityMutation) StoneProduction() (r int, exists bool)
StoneProduction returns the stone_production value in the mutation.
func (*CityMutation) StoneStored ¶
func (m *CityMutation) StoneStored() (r int, exists bool)
StoneStored returns the stone_stored value in the mutation.
func (CityMutation) Tx ¶
func (m CityMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CityMutation) Type ¶
func (m *CityMutation) Type() string
Type returns the node type of this mutation (City).
func (*CityMutation) WoodLimit ¶
func (m *CityMutation) WoodLimit() (r int, exists bool)
WoodLimit returns the wood_limit value in the mutation.
func (*CityMutation) WoodProduction ¶
func (m *CityMutation) WoodProduction() (r int, exists bool)
WoodProduction returns the wood_production value in the mutation.
func (*CityMutation) WoodStored ¶
func (m *CityMutation) WoodStored() (r int, exists bool)
WoodStored returns the wood_stored value in the mutation.
func (*CityMutation) X ¶
func (m *CityMutation) X() (r int, exists bool)
X returns the x value in the mutation.
func (*CityMutation) Y ¶
func (m *CityMutation) Y() (r int, exists bool)
Y returns the y value in the mutation.
type CityQuery ¶
type CityQuery struct {
// contains filtered or unexported fields
}
CityQuery is the builder for querying City entities.
func (*CityQuery) Clone ¶
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CityQuery) First ¶
First returns the first City entity in the query. Returns *NotFoundError when no city was found.
func (*CityQuery) FirstID ¶
FirstID returns the first City id in the query. Returns *NotFoundError when no id was found.
func (*CityQuery) GroupBy ¶
func (cq *CityQuery) GroupBy(field string, fields ...string) *CityGroupBy
GroupBy 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 { X int `json:"x,omitempty"` Count int `json:"count,omitempty"` } client.City.Query(). GroupBy(city.FieldX). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CityQuery) Only ¶
Only returns the only City entity in the query, returns an error if not exactly one entity was returned.
func (*CityQuery) OnlyID ¶
OnlyID returns the only City id in the query, returns an error if not exactly one id was returned.
func (*CityQuery) QueryConstructions ¶
func (cq *CityQuery) QueryConstructions() *ConstructionQuery
QueryConstructions chains the current query on the constructions edge.
func (*CityQuery) QueryOwner ¶
QueryOwner chains the current query on the owner edge.
func (*CityQuery) QueryQueue ¶
func (cq *CityQuery) QueryQueue() *QueueQuery
QueryQueue chains the current query on the queue edge.
func (*CityQuery) Select ¶
func (cq *CityQuery) Select(field string, fields ...string) *CitySelect
Select one or more fields from the given query.
Example:
var v []struct { X int `json:"x,omitempty"` } client.City.Query(). Select(city.FieldX). Scan(ctx, &v)
func (*CityQuery) WithConstructions ¶
func (cq *CityQuery) WithConstructions(opts ...func(*ConstructionQuery)) *CityQuery
WithConstructions tells the query-builder to eager-loads the nodes that are connected to
the "constructions" edge. The optional arguments used to configure the query builder of the edge.
func (*CityQuery) WithOwner ¶
WithOwner tells the query-builder to eager-loads the nodes that are connected to
the "owner" edge. The optional arguments used to configure the query builder of the edge.
func (*CityQuery) WithQueue ¶
func (cq *CityQuery) WithQueue(opts ...func(*QueueQuery)) *CityQuery
WithQueue tells the query-builder to eager-loads the nodes that are connected to
the "queue" edge. The optional arguments used to configure the query builder of the edge.
type CitySelect ¶
type CitySelect struct {
// contains filtered or unexported fields
}
CitySelect is the builder for select fields of City entities.
func (*CitySelect) Bools ¶
func (cs *CitySelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*CitySelect) BoolsX ¶
func (cs *CitySelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CitySelect) Float64s ¶
func (cs *CitySelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*CitySelect) Float64sX ¶
func (cs *CitySelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CitySelect) Ints ¶
func (cs *CitySelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*CitySelect) IntsX ¶
func (cs *CitySelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CitySelect) Scan ¶
func (cs *CitySelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*CitySelect) ScanX ¶
func (cs *CitySelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type CityUpdate ¶
type CityUpdate struct {
// contains filtered or unexported fields
}
CityUpdate is the builder for updating City entities.
func (*CityUpdate) AddConstructionIDs ¶
func (cu *CityUpdate) AddConstructionIDs(ids ...int) *CityUpdate
AddConstructionIDs adds the constructions edge to Construction by ids.
func (*CityUpdate) AddConstructionSpeed ¶
func (cu *CityUpdate) AddConstructionSpeed(i int) *CityUpdate
AddConstructionSpeed adds i to construction_speed.
func (*CityUpdate) AddConstructions ¶
func (cu *CityUpdate) AddConstructions(c ...*Construction) *CityUpdate
AddConstructions adds the constructions edges to Construction.
func (*CityUpdate) AddFoodLimit ¶
func (cu *CityUpdate) AddFoodLimit(i int) *CityUpdate
AddFoodLimit adds i to food_limit.
func (*CityUpdate) AddFoodProduction ¶
func (cu *CityUpdate) AddFoodProduction(i int) *CityUpdate
AddFoodProduction adds i to food_production.
func (*CityUpdate) AddFoodStored ¶
func (cu *CityUpdate) AddFoodStored(i int) *CityUpdate
AddFoodStored adds i to food_stored.
func (*CityUpdate) AddIronLimit ¶
func (cu *CityUpdate) AddIronLimit(i int) *CityUpdate
AddIronLimit adds i to iron_limit.
func (*CityUpdate) AddIronProduction ¶
func (cu *CityUpdate) AddIronProduction(i int) *CityUpdate
AddIronProduction adds i to iron_production.
func (*CityUpdate) AddIronStored ¶
func (cu *CityUpdate) AddIronStored(i int) *CityUpdate
AddIronStored adds i to iron_stored.
func (*CityUpdate) AddPoints ¶
func (cu *CityUpdate) AddPoints(i int) *CityUpdate
AddPoints adds i to points.
func (*CityUpdate) AddQueue ¶
func (cu *CityUpdate) AddQueue(q ...*Queue) *CityUpdate
AddQueue adds the queue edges to Queue.
func (*CityUpdate) AddQueueIDs ¶
func (cu *CityUpdate) AddQueueIDs(ids ...int) *CityUpdate
AddQueueIDs adds the queue edge to Queue by ids.
func (*CityUpdate) AddStoneLimit ¶
func (cu *CityUpdate) AddStoneLimit(i int) *CityUpdate
AddStoneLimit adds i to stone_limit.
func (*CityUpdate) AddStoneProduction ¶
func (cu *CityUpdate) AddStoneProduction(i int) *CityUpdate
AddStoneProduction adds i to stone_production.
func (*CityUpdate) AddStoneStored ¶
func (cu *CityUpdate) AddStoneStored(i int) *CityUpdate
AddStoneStored adds i to stone_stored.
func (*CityUpdate) AddWoodLimit ¶
func (cu *CityUpdate) AddWoodLimit(i int) *CityUpdate
AddWoodLimit adds i to wood_limit.
func (*CityUpdate) AddWoodProduction ¶
func (cu *CityUpdate) AddWoodProduction(i int) *CityUpdate
AddWoodProduction adds i to wood_production.
func (*CityUpdate) AddWoodStored ¶
func (cu *CityUpdate) AddWoodStored(i int) *CityUpdate
AddWoodStored adds i to wood_stored.
func (*CityUpdate) ClearOwner ¶
func (cu *CityUpdate) ClearOwner() *CityUpdate
ClearOwner clears the owner edge to User.
func (*CityUpdate) Exec ¶
func (cu *CityUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CityUpdate) ExecX ¶
func (cu *CityUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CityUpdate) RemoveConstructionIDs ¶
func (cu *CityUpdate) RemoveConstructionIDs(ids ...int) *CityUpdate
RemoveConstructionIDs removes the constructions edge to Construction by ids.
func (*CityUpdate) RemoveConstructions ¶
func (cu *CityUpdate) RemoveConstructions(c ...*Construction) *CityUpdate
RemoveConstructions removes constructions edges to Construction.
func (*CityUpdate) RemoveQueue ¶
func (cu *CityUpdate) RemoveQueue(q ...*Queue) *CityUpdate
RemoveQueue removes queue edges to Queue.
func (*CityUpdate) RemoveQueueIDs ¶
func (cu *CityUpdate) RemoveQueueIDs(ids ...int) *CityUpdate
RemoveQueueIDs removes the queue edge to Queue by ids.
func (*CityUpdate) Save ¶
func (cu *CityUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*CityUpdate) SaveX ¶
func (cu *CityUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CityUpdate) SetConstructionSpeed ¶
func (cu *CityUpdate) SetConstructionSpeed(i int) *CityUpdate
SetConstructionSpeed sets the construction_speed field.
func (*CityUpdate) SetFoodLimit ¶
func (cu *CityUpdate) SetFoodLimit(i int) *CityUpdate
SetFoodLimit sets the food_limit field.
func (*CityUpdate) SetFoodProduction ¶
func (cu *CityUpdate) SetFoodProduction(i int) *CityUpdate
SetFoodProduction sets the food_production field.
func (*CityUpdate) SetFoodStored ¶
func (cu *CityUpdate) SetFoodStored(i int) *CityUpdate
SetFoodStored sets the food_stored field.
func (*CityUpdate) SetIronLimit ¶
func (cu *CityUpdate) SetIronLimit(i int) *CityUpdate
SetIronLimit sets the iron_limit field.
func (*CityUpdate) SetIronProduction ¶
func (cu *CityUpdate) SetIronProduction(i int) *CityUpdate
SetIronProduction sets the iron_production field.
func (*CityUpdate) SetIronStored ¶
func (cu *CityUpdate) SetIronStored(i int) *CityUpdate
SetIronStored sets the iron_stored field.
func (*CityUpdate) SetName ¶
func (cu *CityUpdate) SetName(s string) *CityUpdate
SetName sets the name field.
func (*CityUpdate) SetNillableConstructionSpeed ¶
func (cu *CityUpdate) SetNillableConstructionSpeed(i *int) *CityUpdate
SetNillableConstructionSpeed sets the construction_speed field if the given value is not nil.
func (*CityUpdate) SetNillableFoodLimit ¶
func (cu *CityUpdate) SetNillableFoodLimit(i *int) *CityUpdate
SetNillableFoodLimit sets the food_limit field if the given value is not nil.
func (*CityUpdate) SetNillableFoodProduction ¶
func (cu *CityUpdate) SetNillableFoodProduction(i *int) *CityUpdate
SetNillableFoodProduction sets the food_production field if the given value is not nil.
func (*CityUpdate) SetNillableFoodStored ¶
func (cu *CityUpdate) SetNillableFoodStored(i *int) *CityUpdate
SetNillableFoodStored sets the food_stored field if the given value is not nil.
func (*CityUpdate) SetNillableIronLimit ¶
func (cu *CityUpdate) SetNillableIronLimit(i *int) *CityUpdate
SetNillableIronLimit sets the iron_limit field if the given value is not nil.
func (*CityUpdate) SetNillableIronProduction ¶
func (cu *CityUpdate) SetNillableIronProduction(i *int) *CityUpdate
SetNillableIronProduction sets the iron_production field if the given value is not nil.
func (*CityUpdate) SetNillableIronStored ¶
func (cu *CityUpdate) SetNillableIronStored(i *int) *CityUpdate
SetNillableIronStored sets the iron_stored field if the given value is not nil.
func (*CityUpdate) SetNillableName ¶
func (cu *CityUpdate) SetNillableName(s *string) *CityUpdate
SetNillableName sets the name field if the given value is not nil.
func (*CityUpdate) SetNillableOwnerID ¶
func (cu *CityUpdate) SetNillableOwnerID(id *int) *CityUpdate
SetNillableOwnerID sets the owner edge to User by id if the given value is not nil.
func (*CityUpdate) SetNillablePoints ¶
func (cu *CityUpdate) SetNillablePoints(i *int) *CityUpdate
SetNillablePoints sets the points field if the given value is not nil.
func (*CityUpdate) SetNillableQueueTime ¶
func (cu *CityUpdate) SetNillableQueueTime(t *time.Time) *CityUpdate
SetNillableQueueTime sets the queue_time field if the given value is not nil.
func (*CityUpdate) SetNillableStoneLimit ¶
func (cu *CityUpdate) SetNillableStoneLimit(i *int) *CityUpdate
SetNillableStoneLimit sets the stone_limit field if the given value is not nil.
func (*CityUpdate) SetNillableStoneProduction ¶
func (cu *CityUpdate) SetNillableStoneProduction(i *int) *CityUpdate
SetNillableStoneProduction sets the stone_production field if the given value is not nil.
func (*CityUpdate) SetNillableStoneStored ¶
func (cu *CityUpdate) SetNillableStoneStored(i *int) *CityUpdate
SetNillableStoneStored sets the stone_stored field if the given value is not nil.
func (*CityUpdate) SetNillableWoodLimit ¶
func (cu *CityUpdate) SetNillableWoodLimit(i *int) *CityUpdate
SetNillableWoodLimit sets the wood_limit field if the given value is not nil.
func (*CityUpdate) SetNillableWoodProduction ¶
func (cu *CityUpdate) SetNillableWoodProduction(i *int) *CityUpdate
SetNillableWoodProduction sets the wood_production field if the given value is not nil.
func (*CityUpdate) SetNillableWoodStored ¶
func (cu *CityUpdate) SetNillableWoodStored(i *int) *CityUpdate
SetNillableWoodStored sets the wood_stored field if the given value is not nil.
func (*CityUpdate) SetNillableX ¶
func (cu *CityUpdate) SetNillableX(i *int) *CityUpdate
SetNillableX sets the x field if the given value is not nil.
func (*CityUpdate) SetNillableY ¶
func (cu *CityUpdate) SetNillableY(i *int) *CityUpdate
SetNillableY sets the y field if the given value is not nil.
func (*CityUpdate) SetOwner ¶
func (cu *CityUpdate) SetOwner(u *User) *CityUpdate
SetOwner sets the owner edge to User.
func (*CityUpdate) SetOwnerID ¶
func (cu *CityUpdate) SetOwnerID(id int) *CityUpdate
SetOwnerID sets the owner edge to User by id.
func (*CityUpdate) SetPoints ¶
func (cu *CityUpdate) SetPoints(i int) *CityUpdate
SetPoints sets the points field.
func (*CityUpdate) SetQueueTime ¶
func (cu *CityUpdate) SetQueueTime(t time.Time) *CityUpdate
SetQueueTime sets the queue_time field.
func (*CityUpdate) SetStoneLimit ¶
func (cu *CityUpdate) SetStoneLimit(i int) *CityUpdate
SetStoneLimit sets the stone_limit field.
func (*CityUpdate) SetStoneProduction ¶
func (cu *CityUpdate) SetStoneProduction(i int) *CityUpdate
SetStoneProduction sets the stone_production field.
func (*CityUpdate) SetStoneStored ¶
func (cu *CityUpdate) SetStoneStored(i int) *CityUpdate
SetStoneStored sets the stone_stored field.
func (*CityUpdate) SetWoodLimit ¶
func (cu *CityUpdate) SetWoodLimit(i int) *CityUpdate
SetWoodLimit sets the wood_limit field.
func (*CityUpdate) SetWoodProduction ¶
func (cu *CityUpdate) SetWoodProduction(i int) *CityUpdate
SetWoodProduction sets the wood_production field.
func (*CityUpdate) SetWoodStored ¶
func (cu *CityUpdate) SetWoodStored(i int) *CityUpdate
SetWoodStored sets the wood_stored field.
func (*CityUpdate) Where ¶
func (cu *CityUpdate) Where(ps ...predicate.City) *CityUpdate
Where adds a new predicate for the builder.
type CityUpdateOne ¶
type CityUpdateOne struct {
// contains filtered or unexported fields
}
CityUpdateOne is the builder for updating a single City entity.
func (*CityUpdateOne) AddConstructionIDs ¶
func (cuo *CityUpdateOne) AddConstructionIDs(ids ...int) *CityUpdateOne
AddConstructionIDs adds the constructions edge to Construction by ids.
func (*CityUpdateOne) AddConstructionSpeed ¶
func (cuo *CityUpdateOne) AddConstructionSpeed(i int) *CityUpdateOne
AddConstructionSpeed adds i to construction_speed.
func (*CityUpdateOne) AddConstructions ¶
func (cuo *CityUpdateOne) AddConstructions(c ...*Construction) *CityUpdateOne
AddConstructions adds the constructions edges to Construction.
func (*CityUpdateOne) AddFoodLimit ¶
func (cuo *CityUpdateOne) AddFoodLimit(i int) *CityUpdateOne
AddFoodLimit adds i to food_limit.
func (*CityUpdateOne) AddFoodProduction ¶
func (cuo *CityUpdateOne) AddFoodProduction(i int) *CityUpdateOne
AddFoodProduction adds i to food_production.
func (*CityUpdateOne) AddFoodStored ¶
func (cuo *CityUpdateOne) AddFoodStored(i int) *CityUpdateOne
AddFoodStored adds i to food_stored.
func (*CityUpdateOne) AddIronLimit ¶
func (cuo *CityUpdateOne) AddIronLimit(i int) *CityUpdateOne
AddIronLimit adds i to iron_limit.
func (*CityUpdateOne) AddIronProduction ¶
func (cuo *CityUpdateOne) AddIronProduction(i int) *CityUpdateOne
AddIronProduction adds i to iron_production.
func (*CityUpdateOne) AddIronStored ¶
func (cuo *CityUpdateOne) AddIronStored(i int) *CityUpdateOne
AddIronStored adds i to iron_stored.
func (*CityUpdateOne) AddPoints ¶
func (cuo *CityUpdateOne) AddPoints(i int) *CityUpdateOne
AddPoints adds i to points.
func (*CityUpdateOne) AddQueue ¶
func (cuo *CityUpdateOne) AddQueue(q ...*Queue) *CityUpdateOne
AddQueue adds the queue edges to Queue.
func (*CityUpdateOne) AddQueueIDs ¶
func (cuo *CityUpdateOne) AddQueueIDs(ids ...int) *CityUpdateOne
AddQueueIDs adds the queue edge to Queue by ids.
func (*CityUpdateOne) AddStoneLimit ¶
func (cuo *CityUpdateOne) AddStoneLimit(i int) *CityUpdateOne
AddStoneLimit adds i to stone_limit.
func (*CityUpdateOne) AddStoneProduction ¶
func (cuo *CityUpdateOne) AddStoneProduction(i int) *CityUpdateOne
AddStoneProduction adds i to stone_production.
func (*CityUpdateOne) AddStoneStored ¶
func (cuo *CityUpdateOne) AddStoneStored(i int) *CityUpdateOne
AddStoneStored adds i to stone_stored.
func (*CityUpdateOne) AddWoodLimit ¶
func (cuo *CityUpdateOne) AddWoodLimit(i int) *CityUpdateOne
AddWoodLimit adds i to wood_limit.
func (*CityUpdateOne) AddWoodProduction ¶
func (cuo *CityUpdateOne) AddWoodProduction(i int) *CityUpdateOne
AddWoodProduction adds i to wood_production.
func (*CityUpdateOne) AddWoodStored ¶
func (cuo *CityUpdateOne) AddWoodStored(i int) *CityUpdateOne
AddWoodStored adds i to wood_stored.
func (*CityUpdateOne) ClearOwner ¶
func (cuo *CityUpdateOne) ClearOwner() *CityUpdateOne
ClearOwner clears the owner edge to User.
func (*CityUpdateOne) Exec ¶
func (cuo *CityUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CityUpdateOne) ExecX ¶
func (cuo *CityUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CityUpdateOne) RemoveConstructionIDs ¶
func (cuo *CityUpdateOne) RemoveConstructionIDs(ids ...int) *CityUpdateOne
RemoveConstructionIDs removes the constructions edge to Construction by ids.
func (*CityUpdateOne) RemoveConstructions ¶
func (cuo *CityUpdateOne) RemoveConstructions(c ...*Construction) *CityUpdateOne
RemoveConstructions removes constructions edges to Construction.
func (*CityUpdateOne) RemoveQueue ¶
func (cuo *CityUpdateOne) RemoveQueue(q ...*Queue) *CityUpdateOne
RemoveQueue removes queue edges to Queue.
func (*CityUpdateOne) RemoveQueueIDs ¶
func (cuo *CityUpdateOne) RemoveQueueIDs(ids ...int) *CityUpdateOne
RemoveQueueIDs removes the queue edge to Queue by ids.
func (*CityUpdateOne) Save ¶
func (cuo *CityUpdateOne) Save(ctx context.Context) (*City, error)
Save executes the query and returns the updated entity.
func (*CityUpdateOne) SaveX ¶
func (cuo *CityUpdateOne) SaveX(ctx context.Context) *City
SaveX is like Save, but panics if an error occurs.
func (*CityUpdateOne) SetConstructionSpeed ¶
func (cuo *CityUpdateOne) SetConstructionSpeed(i int) *CityUpdateOne
SetConstructionSpeed sets the construction_speed field.
func (*CityUpdateOne) SetFoodLimit ¶
func (cuo *CityUpdateOne) SetFoodLimit(i int) *CityUpdateOne
SetFoodLimit sets the food_limit field.
func (*CityUpdateOne) SetFoodProduction ¶
func (cuo *CityUpdateOne) SetFoodProduction(i int) *CityUpdateOne
SetFoodProduction sets the food_production field.
func (*CityUpdateOne) SetFoodStored ¶
func (cuo *CityUpdateOne) SetFoodStored(i int) *CityUpdateOne
SetFoodStored sets the food_stored field.
func (*CityUpdateOne) SetIronLimit ¶
func (cuo *CityUpdateOne) SetIronLimit(i int) *CityUpdateOne
SetIronLimit sets the iron_limit field.
func (*CityUpdateOne) SetIronProduction ¶
func (cuo *CityUpdateOne) SetIronProduction(i int) *CityUpdateOne
SetIronProduction sets the iron_production field.
func (*CityUpdateOne) SetIronStored ¶
func (cuo *CityUpdateOne) SetIronStored(i int) *CityUpdateOne
SetIronStored sets the iron_stored field.
func (*CityUpdateOne) SetName ¶
func (cuo *CityUpdateOne) SetName(s string) *CityUpdateOne
SetName sets the name field.
func (*CityUpdateOne) SetNillableConstructionSpeed ¶
func (cuo *CityUpdateOne) SetNillableConstructionSpeed(i *int) *CityUpdateOne
SetNillableConstructionSpeed sets the construction_speed field if the given value is not nil.
func (*CityUpdateOne) SetNillableFoodLimit ¶
func (cuo *CityUpdateOne) SetNillableFoodLimit(i *int) *CityUpdateOne
SetNillableFoodLimit sets the food_limit field if the given value is not nil.
func (*CityUpdateOne) SetNillableFoodProduction ¶
func (cuo *CityUpdateOne) SetNillableFoodProduction(i *int) *CityUpdateOne
SetNillableFoodProduction sets the food_production field if the given value is not nil.
func (*CityUpdateOne) SetNillableFoodStored ¶
func (cuo *CityUpdateOne) SetNillableFoodStored(i *int) *CityUpdateOne
SetNillableFoodStored sets the food_stored field if the given value is not nil.
func (*CityUpdateOne) SetNillableIronLimit ¶
func (cuo *CityUpdateOne) SetNillableIronLimit(i *int) *CityUpdateOne
SetNillableIronLimit sets the iron_limit field if the given value is not nil.
func (*CityUpdateOne) SetNillableIronProduction ¶
func (cuo *CityUpdateOne) SetNillableIronProduction(i *int) *CityUpdateOne
SetNillableIronProduction sets the iron_production field if the given value is not nil.
func (*CityUpdateOne) SetNillableIronStored ¶
func (cuo *CityUpdateOne) SetNillableIronStored(i *int) *CityUpdateOne
SetNillableIronStored sets the iron_stored field if the given value is not nil.
func (*CityUpdateOne) SetNillableName ¶
func (cuo *CityUpdateOne) SetNillableName(s *string) *CityUpdateOne
SetNillableName sets the name field if the given value is not nil.
func (*CityUpdateOne) SetNillableOwnerID ¶
func (cuo *CityUpdateOne) SetNillableOwnerID(id *int) *CityUpdateOne
SetNillableOwnerID sets the owner edge to User by id if the given value is not nil.
func (*CityUpdateOne) SetNillablePoints ¶
func (cuo *CityUpdateOne) SetNillablePoints(i *int) *CityUpdateOne
SetNillablePoints sets the points field if the given value is not nil.
func (*CityUpdateOne) SetNillableQueueTime ¶
func (cuo *CityUpdateOne) SetNillableQueueTime(t *time.Time) *CityUpdateOne
SetNillableQueueTime sets the queue_time field if the given value is not nil.
func (*CityUpdateOne) SetNillableStoneLimit ¶
func (cuo *CityUpdateOne) SetNillableStoneLimit(i *int) *CityUpdateOne
SetNillableStoneLimit sets the stone_limit field if the given value is not nil.
func (*CityUpdateOne) SetNillableStoneProduction ¶
func (cuo *CityUpdateOne) SetNillableStoneProduction(i *int) *CityUpdateOne
SetNillableStoneProduction sets the stone_production field if the given value is not nil.
func (*CityUpdateOne) SetNillableStoneStored ¶
func (cuo *CityUpdateOne) SetNillableStoneStored(i *int) *CityUpdateOne
SetNillableStoneStored sets the stone_stored field if the given value is not nil.
func (*CityUpdateOne) SetNillableWoodLimit ¶
func (cuo *CityUpdateOne) SetNillableWoodLimit(i *int) *CityUpdateOne
SetNillableWoodLimit sets the wood_limit field if the given value is not nil.
func (*CityUpdateOne) SetNillableWoodProduction ¶
func (cuo *CityUpdateOne) SetNillableWoodProduction(i *int) *CityUpdateOne
SetNillableWoodProduction sets the wood_production field if the given value is not nil.
func (*CityUpdateOne) SetNillableWoodStored ¶
func (cuo *CityUpdateOne) SetNillableWoodStored(i *int) *CityUpdateOne
SetNillableWoodStored sets the wood_stored field if the given value is not nil.
func (*CityUpdateOne) SetNillableX ¶
func (cuo *CityUpdateOne) SetNillableX(i *int) *CityUpdateOne
SetNillableX sets the x field if the given value is not nil.
func (*CityUpdateOne) SetNillableY ¶
func (cuo *CityUpdateOne) SetNillableY(i *int) *CityUpdateOne
SetNillableY sets the y field if the given value is not nil.
func (*CityUpdateOne) SetOwner ¶
func (cuo *CityUpdateOne) SetOwner(u *User) *CityUpdateOne
SetOwner sets the owner edge to User.
func (*CityUpdateOne) SetOwnerID ¶
func (cuo *CityUpdateOne) SetOwnerID(id int) *CityUpdateOne
SetOwnerID sets the owner edge to User by id.
func (*CityUpdateOne) SetPoints ¶
func (cuo *CityUpdateOne) SetPoints(i int) *CityUpdateOne
SetPoints sets the points field.
func (*CityUpdateOne) SetQueueTime ¶
func (cuo *CityUpdateOne) SetQueueTime(t time.Time) *CityUpdateOne
SetQueueTime sets the queue_time field.
func (*CityUpdateOne) SetStoneLimit ¶
func (cuo *CityUpdateOne) SetStoneLimit(i int) *CityUpdateOne
SetStoneLimit sets the stone_limit field.
func (*CityUpdateOne) SetStoneProduction ¶
func (cuo *CityUpdateOne) SetStoneProduction(i int) *CityUpdateOne
SetStoneProduction sets the stone_production field.
func (*CityUpdateOne) SetStoneStored ¶
func (cuo *CityUpdateOne) SetStoneStored(i int) *CityUpdateOne
SetStoneStored sets the stone_stored field.
func (*CityUpdateOne) SetWoodLimit ¶
func (cuo *CityUpdateOne) SetWoodLimit(i int) *CityUpdateOne
SetWoodLimit sets the wood_limit field.
func (*CityUpdateOne) SetWoodProduction ¶
func (cuo *CityUpdateOne) SetWoodProduction(i int) *CityUpdateOne
SetWoodProduction sets the wood_production field.
func (*CityUpdateOne) SetWoodStored ¶
func (cuo *CityUpdateOne) SetWoodStored(i int) *CityUpdateOne
SetWoodStored sets the wood_stored field.
func (*CityUpdateOne) SetX ¶
func (cuo *CityUpdateOne) SetX(i int) *CityUpdateOne
SetX sets the x field.
func (*CityUpdateOne) SetY ¶
func (cuo *CityUpdateOne) SetY(i int) *CityUpdateOne
SetY sets the y field.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // City is the client for interacting with the City builders. City *CityClient // Construction is the client for interacting with the Construction builders. Construction *ConstructionClient // Queue is the client for interacting with the Queue builders. Queue *QueueClient // 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 the Client stored in a context, or nil if there isn't one.
func Open ¶
Open opens a connection to the database specified by the driver name and a driver-specific 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(). City. Query(). Count(ctx)
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 Construction ¶
type Construction struct { // ID of the ent. ID int `json:"id,omitempty"` // X holds the value of the "x" field. X int `json:"x,omitempty"` // Y holds the value of the "y" field. Y int `json:"y,omitempty"` // RawProduction holds the value of the "raw_production" field. RawProduction int `json:"raw_production,omitempty"` // Type holds the value of the "type" field. Type int `json:"type,omitempty"` // Level holds the value of the "level" field. Level int `json:"level,omitempty"` // Modifier holds the value of the "modifier" field. Modifier float64 `json:"modifier,omitempty"` // NeedRefresh holds the value of the "need_refresh" field. NeedRefresh bool `json:"need_refresh,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ConstructionQuery when eager-loading is set. Edges ConstructionEdges `json:"edges"` // contains filtered or unexported fields }
Construction is the model entity for the Construction schema.
func (*Construction) QueryCity ¶
func (c *Construction) QueryCity() *CityQuery
QueryCity queries the city edge of the Construction.
func (*Construction) QueryQueue ¶
func (c *Construction) QueryQueue() *QueueQuery
QueryQueue queries the queue edge of the Construction.
func (*Construction) String ¶
func (c *Construction) String() string
String implements the fmt.Stringer.
func (*Construction) Unwrap ¶
func (c *Construction) Unwrap() *Construction
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Construction) Update ¶
func (c *Construction) Update() *ConstructionUpdateOne
Update returns a builder for updating this Construction. Note that, you need to call Construction.Unwrap() before calling this method, if this Construction was returned from a transaction, and the transaction was committed or rolled back.
type ConstructionClient ¶
type ConstructionClient struct {
// contains filtered or unexported fields
}
ConstructionClient is a client for the Construction schema.
func NewConstructionClient ¶
func NewConstructionClient(c config) *ConstructionClient
NewConstructionClient returns a client for the Construction from the given config.
func (*ConstructionClient) Create ¶
func (c *ConstructionClient) Create() *ConstructionCreate
Create returns a create builder for Construction.
func (*ConstructionClient) Delete ¶
func (c *ConstructionClient) Delete() *ConstructionDelete
Delete returns a delete builder for Construction.
func (*ConstructionClient) DeleteOne ¶
func (c *ConstructionClient) DeleteOne(co *Construction) *ConstructionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ConstructionClient) DeleteOneID ¶
func (c *ConstructionClient) DeleteOneID(id int) *ConstructionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ConstructionClient) Get ¶
func (c *ConstructionClient) Get(ctx context.Context, id int) (*Construction, error)
Get returns a Construction entity by its id.
func (*ConstructionClient) GetX ¶
func (c *ConstructionClient) GetX(ctx context.Context, id int) *Construction
GetX is like Get, but panics if an error occurs.
func (*ConstructionClient) Hooks ¶
func (c *ConstructionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ConstructionClient) Query ¶
func (c *ConstructionClient) Query() *ConstructionQuery
Create returns a query builder for Construction.
func (*ConstructionClient) QueryCity ¶
func (c *ConstructionClient) QueryCity(co *Construction) *CityQuery
QueryCity queries the city edge of a Construction.
func (*ConstructionClient) QueryQueue ¶
func (c *ConstructionClient) QueryQueue(co *Construction) *QueueQuery
QueryQueue queries the queue edge of a Construction.
func (*ConstructionClient) Update ¶
func (c *ConstructionClient) Update() *ConstructionUpdate
Update returns an update builder for Construction.
func (*ConstructionClient) UpdateOne ¶
func (c *ConstructionClient) UpdateOne(co *Construction) *ConstructionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ConstructionClient) UpdateOneID ¶
func (c *ConstructionClient) UpdateOneID(id int) *ConstructionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ConstructionClient) Use ¶
func (c *ConstructionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `construction.Hooks(f(g(h())))`.
type ConstructionCreate ¶
type ConstructionCreate struct {
// contains filtered or unexported fields
}
ConstructionCreate is the builder for creating a Construction entity.
func (*ConstructionCreate) AddQueue ¶
func (cc *ConstructionCreate) AddQueue(q ...*Queue) *ConstructionCreate
AddQueue adds the queue edges to Queue.
func (*ConstructionCreate) AddQueueIDs ¶
func (cc *ConstructionCreate) AddQueueIDs(ids ...int) *ConstructionCreate
AddQueueIDs adds the queue edge to Queue by ids.
func (*ConstructionCreate) Save ¶
func (cc *ConstructionCreate) Save(ctx context.Context) (*Construction, error)
Save creates the Construction in the database.
func (*ConstructionCreate) SaveX ¶
func (cc *ConstructionCreate) SaveX(ctx context.Context) *Construction
SaveX calls Save and panics if Save returns an error.
func (*ConstructionCreate) SetCity ¶
func (cc *ConstructionCreate) SetCity(c *City) *ConstructionCreate
SetCity sets the city edge to City.
func (*ConstructionCreate) SetCityID ¶
func (cc *ConstructionCreate) SetCityID(id int) *ConstructionCreate
SetCityID sets the city edge to City by id.
func (*ConstructionCreate) SetLevel ¶
func (cc *ConstructionCreate) SetLevel(i int) *ConstructionCreate
SetLevel sets the level field.
func (*ConstructionCreate) SetModifier ¶
func (cc *ConstructionCreate) SetModifier(f float64) *ConstructionCreate
SetModifier sets the modifier field.
func (*ConstructionCreate) SetNeedRefresh ¶
func (cc *ConstructionCreate) SetNeedRefresh(b bool) *ConstructionCreate
SetNeedRefresh sets the need_refresh field.
func (*ConstructionCreate) SetNillableCityID ¶
func (cc *ConstructionCreate) SetNillableCityID(id *int) *ConstructionCreate
SetNillableCityID sets the city edge to City by id if the given value is not nil.
func (*ConstructionCreate) SetNillableLevel ¶
func (cc *ConstructionCreate) SetNillableLevel(i *int) *ConstructionCreate
SetNillableLevel sets the level field if the given value is not nil.
func (*ConstructionCreate) SetNillableModifier ¶
func (cc *ConstructionCreate) SetNillableModifier(f *float64) *ConstructionCreate
SetNillableModifier sets the modifier field if the given value is not nil.
func (*ConstructionCreate) SetNillableNeedRefresh ¶
func (cc *ConstructionCreate) SetNillableNeedRefresh(b *bool) *ConstructionCreate
SetNillableNeedRefresh sets the need_refresh field if the given value is not nil.
func (*ConstructionCreate) SetNillableRawProduction ¶
func (cc *ConstructionCreate) SetNillableRawProduction(i *int) *ConstructionCreate
SetNillableRawProduction sets the raw_production field if the given value is not nil.
func (*ConstructionCreate) SetNillableType ¶
func (cc *ConstructionCreate) SetNillableType(i *int) *ConstructionCreate
SetNillableType sets the type field if the given value is not nil.
func (*ConstructionCreate) SetRawProduction ¶
func (cc *ConstructionCreate) SetRawProduction(i int) *ConstructionCreate
SetRawProduction sets the raw_production field.
func (*ConstructionCreate) SetType ¶
func (cc *ConstructionCreate) SetType(i int) *ConstructionCreate
SetType sets the type field.
func (*ConstructionCreate) SetX ¶
func (cc *ConstructionCreate) SetX(i int) *ConstructionCreate
SetX sets the x field.
func (*ConstructionCreate) SetY ¶
func (cc *ConstructionCreate) SetY(i int) *ConstructionCreate
SetY sets the y field.
type ConstructionDelete ¶
type ConstructionDelete struct {
// contains filtered or unexported fields
}
ConstructionDelete is the builder for deleting a Construction entity.
func (*ConstructionDelete) Exec ¶
func (cd *ConstructionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ConstructionDelete) ExecX ¶
func (cd *ConstructionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ConstructionDelete) Where ¶
func (cd *ConstructionDelete) Where(ps ...predicate.Construction) *ConstructionDelete
Where adds a new predicate to the delete builder.
type ConstructionDeleteOne ¶
type ConstructionDeleteOne struct {
// contains filtered or unexported fields
}
ConstructionDeleteOne is the builder for deleting a single Construction entity.
func (*ConstructionDeleteOne) Exec ¶
func (cdo *ConstructionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ConstructionDeleteOne) ExecX ¶
func (cdo *ConstructionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ConstructionEdges ¶
type ConstructionEdges struct { // City holds the value of the city edge. City *City // Queue holds the value of the queue edge. Queue []*Queue // contains filtered or unexported fields }
ConstructionEdges holds the relations/edges for other nodes in the graph.
func (ConstructionEdges) CityOrErr ¶
func (e ConstructionEdges) CityOrErr() (*City, error)
CityOrErr returns the City value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ConstructionEdges) QueueOrErr ¶
func (e ConstructionEdges) QueueOrErr() ([]*Queue, error)
QueueOrErr returns the Queue value or an error if the edge was not loaded in eager-loading.
type ConstructionGroupBy ¶
type ConstructionGroupBy struct {
// contains filtered or unexported fields
}
ConstructionGroupBy is the builder for group-by Construction entities.
func (*ConstructionGroupBy) Aggregate ¶
func (cgb *ConstructionGroupBy) Aggregate(fns ...AggregateFunc) *ConstructionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ConstructionGroupBy) Bools ¶
func (cgb *ConstructionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*ConstructionGroupBy) BoolsX ¶
func (cgb *ConstructionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ConstructionGroupBy) Float64s ¶
func (cgb *ConstructionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*ConstructionGroupBy) Float64sX ¶
func (cgb *ConstructionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ConstructionGroupBy) Ints ¶
func (cgb *ConstructionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*ConstructionGroupBy) IntsX ¶
func (cgb *ConstructionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ConstructionGroupBy) Scan ¶
func (cgb *ConstructionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*ConstructionGroupBy) ScanX ¶
func (cgb *ConstructionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type ConstructionMutation ¶
type ConstructionMutation struct {
// contains filtered or unexported fields
}
ConstructionMutation represents an operation that mutate the Constructions nodes in the graph.
func (*ConstructionMutation) AddField ¶
func (m *ConstructionMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*ConstructionMutation) AddLevel ¶
func (m *ConstructionMutation) AddLevel(i int)
AddLevel adds i to level.
func (*ConstructionMutation) AddModifier ¶
func (m *ConstructionMutation) AddModifier(f float64)
AddModifier adds f to modifier.
func (*ConstructionMutation) AddQueueIDs ¶
func (m *ConstructionMutation) AddQueueIDs(ids ...int)
AddQueueIDs adds the queue edge to Queue by ids.
func (*ConstructionMutation) AddRawProduction ¶
func (m *ConstructionMutation) AddRawProduction(i int)
AddRawProduction adds i to raw_production.
func (*ConstructionMutation) AddType ¶
func (m *ConstructionMutation) AddType(i int)
AddType adds i to type.
func (*ConstructionMutation) AddedEdges ¶
func (m *ConstructionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ConstructionMutation) AddedField ¶
func (m *ConstructionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*ConstructionMutation) AddedFields ¶
func (m *ConstructionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*ConstructionMutation) AddedIDs ¶
func (m *ConstructionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*ConstructionMutation) AddedLevel ¶
func (m *ConstructionMutation) AddedLevel() (r int, exists bool)
AddedLevel returns the value that was added to the level field in this mutation.
func (*ConstructionMutation) AddedModifier ¶
func (m *ConstructionMutation) AddedModifier() (r float64, exists bool)
AddedModifier returns the value that was added to the modifier field in this mutation.
func (*ConstructionMutation) AddedRawProduction ¶
func (m *ConstructionMutation) AddedRawProduction() (r int, exists bool)
AddedRawProduction returns the value that was added to the raw_production field in this mutation.
func (*ConstructionMutation) AddedType ¶
func (m *ConstructionMutation) AddedType() (r int, exists bool)
AddedType returns the value that was added to the type field in this mutation.
func (*ConstructionMutation) AddedX ¶
func (m *ConstructionMutation) AddedX() (r int, exists bool)
AddedX returns the value that was added to the x field in this mutation.
func (*ConstructionMutation) AddedY ¶
func (m *ConstructionMutation) AddedY() (r int, exists bool)
AddedY returns the value that was added to the y field in this mutation.
func (*ConstructionMutation) CityCleared ¶
func (m *ConstructionMutation) CityCleared() bool
CityCleared returns if the edge city was cleared.
func (*ConstructionMutation) CityID ¶
func (m *ConstructionMutation) CityID() (id int, exists bool)
CityID returns the city id in the mutation.
func (*ConstructionMutation) CityIDs ¶
func (m *ConstructionMutation) CityIDs() (ids []int)
CityIDs returns the city ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use CityID instead. It exists only for internal usage by the builders.
func (*ConstructionMutation) ClearCity ¶
func (m *ConstructionMutation) ClearCity()
ClearCity clears the city edge to City.
func (*ConstructionMutation) ClearEdge ¶
func (m *ConstructionMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*ConstructionMutation) ClearField ¶
func (m *ConstructionMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*ConstructionMutation) ClearedEdges ¶
func (m *ConstructionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ConstructionMutation) ClearedFields ¶
func (m *ConstructionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ConstructionMutation) Client ¶
func (m ConstructionMutation) 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 (*ConstructionMutation) EdgeCleared ¶
func (m *ConstructionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*ConstructionMutation) Field ¶
func (m *ConstructionMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*ConstructionMutation) FieldCleared ¶
func (m *ConstructionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*ConstructionMutation) Fields ¶
func (m *ConstructionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*ConstructionMutation) GetType ¶
func (m *ConstructionMutation) GetType() (r int, exists bool)
GetType returns the type value in the mutation.
func (*ConstructionMutation) ID ¶
func (m *ConstructionMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*ConstructionMutation) Level ¶
func (m *ConstructionMutation) Level() (r int, exists bool)
Level returns the level value in the mutation.
func (*ConstructionMutation) Modifier ¶
func (m *ConstructionMutation) Modifier() (r float64, exists bool)
Modifier returns the modifier value in the mutation.
func (*ConstructionMutation) NeedRefresh ¶
func (m *ConstructionMutation) NeedRefresh() (r bool, exists bool)
NeedRefresh returns the need_refresh value in the mutation.
func (*ConstructionMutation) Op ¶
func (m *ConstructionMutation) Op() Op
Op returns the operation name.
func (*ConstructionMutation) QueueIDs ¶
func (m *ConstructionMutation) QueueIDs() (ids []int)
QueueIDs returns the queue ids in the mutation.
func (*ConstructionMutation) RawProduction ¶
func (m *ConstructionMutation) RawProduction() (r int, exists bool)
RawProduction returns the raw_production value in the mutation.
func (*ConstructionMutation) RemoveQueueIDs ¶
func (m *ConstructionMutation) RemoveQueueIDs(ids ...int)
RemoveQueueIDs removes the queue edge to Queue by ids.
func (*ConstructionMutation) RemovedEdges ¶
func (m *ConstructionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ConstructionMutation) RemovedIDs ¶
func (m *ConstructionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*ConstructionMutation) RemovedQueueIDs ¶
func (m *ConstructionMutation) RemovedQueueIDs() (ids []int)
RemovedQueue returns the removed ids of queue.
func (*ConstructionMutation) ResetCity ¶
func (m *ConstructionMutation) ResetCity()
ResetCity reset all changes of the city edge.
func (*ConstructionMutation) ResetEdge ¶
func (m *ConstructionMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*ConstructionMutation) ResetField ¶
func (m *ConstructionMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*ConstructionMutation) ResetLevel ¶
func (m *ConstructionMutation) ResetLevel()
ResetLevel reset all changes of the level field.
func (*ConstructionMutation) ResetModifier ¶
func (m *ConstructionMutation) ResetModifier()
ResetModifier reset all changes of the modifier field.
func (*ConstructionMutation) ResetNeedRefresh ¶
func (m *ConstructionMutation) ResetNeedRefresh()
ResetNeedRefresh reset all changes of the need_refresh field.
func (*ConstructionMutation) ResetQueue ¶
func (m *ConstructionMutation) ResetQueue()
ResetQueue reset all changes of the queue edge.
func (*ConstructionMutation) ResetRawProduction ¶
func (m *ConstructionMutation) ResetRawProduction()
ResetRawProduction reset all changes of the raw_production field.
func (*ConstructionMutation) ResetType ¶
func (m *ConstructionMutation) ResetType()
ResetType reset all changes of the type field.
func (*ConstructionMutation) ResetX ¶
func (m *ConstructionMutation) ResetX()
ResetX reset all changes of the x field.
func (*ConstructionMutation) ResetY ¶
func (m *ConstructionMutation) ResetY()
ResetY reset all changes of the y field.
func (*ConstructionMutation) SetCityID ¶
func (m *ConstructionMutation) SetCityID(id int)
SetCityID sets the city edge to City by id.
func (*ConstructionMutation) SetField ¶
func (m *ConstructionMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*ConstructionMutation) SetLevel ¶
func (m *ConstructionMutation) SetLevel(i int)
SetLevel sets the level field.
func (*ConstructionMutation) SetModifier ¶
func (m *ConstructionMutation) SetModifier(f float64)
SetModifier sets the modifier field.
func (*ConstructionMutation) SetNeedRefresh ¶
func (m *ConstructionMutation) SetNeedRefresh(b bool)
SetNeedRefresh sets the need_refresh field.
func (*ConstructionMutation) SetRawProduction ¶
func (m *ConstructionMutation) SetRawProduction(i int)
SetRawProduction sets the raw_production field.
func (*ConstructionMutation) SetType ¶
func (m *ConstructionMutation) SetType(i int)
SetType sets the type field.
func (*ConstructionMutation) SetX ¶
func (m *ConstructionMutation) SetX(i int)
SetX sets the x field.
func (*ConstructionMutation) SetY ¶
func (m *ConstructionMutation) SetY(i int)
SetY sets the y field.
func (ConstructionMutation) Tx ¶
func (m ConstructionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ConstructionMutation) Type ¶
func (m *ConstructionMutation) Type() string
Type returns the node type of this mutation (Construction).
func (*ConstructionMutation) X ¶
func (m *ConstructionMutation) X() (r int, exists bool)
X returns the x value in the mutation.
func (*ConstructionMutation) Y ¶
func (m *ConstructionMutation) Y() (r int, exists bool)
Y returns the y value in the mutation.
type ConstructionQuery ¶
type ConstructionQuery struct {
// contains filtered or unexported fields
}
ConstructionQuery is the builder for querying Construction entities.
func (*ConstructionQuery) All ¶
func (cq *ConstructionQuery) All(ctx context.Context) ([]*Construction, error)
All executes the query and returns a list of Constructions.
func (*ConstructionQuery) AllX ¶
func (cq *ConstructionQuery) AllX(ctx context.Context) []*Construction
AllX is like All, but panics if an error occurs.
func (*ConstructionQuery) Clone ¶
func (cq *ConstructionQuery) Clone() *ConstructionQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ConstructionQuery) Count ¶
func (cq *ConstructionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ConstructionQuery) CountX ¶
func (cq *ConstructionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ConstructionQuery) Exist ¶
func (cq *ConstructionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ConstructionQuery) ExistX ¶
func (cq *ConstructionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ConstructionQuery) First ¶
func (cq *ConstructionQuery) First(ctx context.Context) (*Construction, error)
First returns the first Construction entity in the query. Returns *NotFoundError when no construction was found.
func (*ConstructionQuery) FirstID ¶
func (cq *ConstructionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Construction id in the query. Returns *NotFoundError when no id was found.
func (*ConstructionQuery) FirstX ¶
func (cq *ConstructionQuery) FirstX(ctx context.Context) *Construction
FirstX is like First, but panics if an error occurs.
func (*ConstructionQuery) FirstXID ¶
func (cq *ConstructionQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*ConstructionQuery) GroupBy ¶
func (cq *ConstructionQuery) GroupBy(field string, fields ...string) *ConstructionGroupBy
GroupBy 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 { X int `json:"x,omitempty"` Count int `json:"count,omitempty"` } client.Construction.Query(). GroupBy(construction.FieldX). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ConstructionQuery) IDs ¶
func (cq *ConstructionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Construction ids.
func (*ConstructionQuery) IDsX ¶
func (cq *ConstructionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ConstructionQuery) Limit ¶
func (cq *ConstructionQuery) Limit(limit int) *ConstructionQuery
Limit adds a limit step to the query.
func (*ConstructionQuery) Offset ¶
func (cq *ConstructionQuery) Offset(offset int) *ConstructionQuery
Offset adds an offset step to the query.
func (*ConstructionQuery) Only ¶
func (cq *ConstructionQuery) Only(ctx context.Context) (*Construction, error)
Only returns the only Construction entity in the query, returns an error if not exactly one entity was returned.
func (*ConstructionQuery) OnlyID ¶
func (cq *ConstructionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Construction id in the query, returns an error if not exactly one id was returned.
func (*ConstructionQuery) OnlyX ¶
func (cq *ConstructionQuery) OnlyX(ctx context.Context) *Construction
OnlyX is like Only, but panics if an error occurs.
func (*ConstructionQuery) OnlyXID ¶
func (cq *ConstructionQuery) OnlyXID(ctx context.Context) int
OnlyXID is like OnlyID, but panics if an error occurs.
func (*ConstructionQuery) Order ¶
func (cq *ConstructionQuery) Order(o ...OrderFunc) *ConstructionQuery
Order adds an order step to the query.
func (*ConstructionQuery) QueryCity ¶
func (cq *ConstructionQuery) QueryCity() *CityQuery
QueryCity chains the current query on the city edge.
func (*ConstructionQuery) QueryQueue ¶
func (cq *ConstructionQuery) QueryQueue() *QueueQuery
QueryQueue chains the current query on the queue edge.
func (*ConstructionQuery) Select ¶
func (cq *ConstructionQuery) Select(field string, fields ...string) *ConstructionSelect
Select one or more fields from the given query.
Example:
var v []struct { X int `json:"x,omitempty"` } client.Construction.Query(). Select(construction.FieldX). Scan(ctx, &v)
func (*ConstructionQuery) Where ¶
func (cq *ConstructionQuery) Where(ps ...predicate.Construction) *ConstructionQuery
Where adds a new predicate for the builder.
func (*ConstructionQuery) WithCity ¶
func (cq *ConstructionQuery) WithCity(opts ...func(*CityQuery)) *ConstructionQuery
WithCity tells the query-builder to eager-loads the nodes that are connected to
the "city" edge. The optional arguments used to configure the query builder of the edge.
func (*ConstructionQuery) WithQueue ¶
func (cq *ConstructionQuery) WithQueue(opts ...func(*QueueQuery)) *ConstructionQuery
WithQueue tells the query-builder to eager-loads the nodes that are connected to
the "queue" edge. The optional arguments used to configure the query builder of the edge.
type ConstructionSelect ¶
type ConstructionSelect struct {
// contains filtered or unexported fields
}
ConstructionSelect is the builder for select fields of Construction entities.
func (*ConstructionSelect) Bools ¶
func (cs *ConstructionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*ConstructionSelect) BoolsX ¶
func (cs *ConstructionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ConstructionSelect) Float64s ¶
func (cs *ConstructionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*ConstructionSelect) Float64sX ¶
func (cs *ConstructionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ConstructionSelect) Ints ¶
func (cs *ConstructionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*ConstructionSelect) IntsX ¶
func (cs *ConstructionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ConstructionSelect) Scan ¶
func (cs *ConstructionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*ConstructionSelect) ScanX ¶
func (cs *ConstructionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type ConstructionUpdate ¶
type ConstructionUpdate struct {
// contains filtered or unexported fields
}
ConstructionUpdate is the builder for updating Construction entities.
func (*ConstructionUpdate) AddLevel ¶
func (cu *ConstructionUpdate) AddLevel(i int) *ConstructionUpdate
AddLevel adds i to level.
func (*ConstructionUpdate) AddModifier ¶
func (cu *ConstructionUpdate) AddModifier(f float64) *ConstructionUpdate
AddModifier adds f to modifier.
func (*ConstructionUpdate) AddQueue ¶
func (cu *ConstructionUpdate) AddQueue(q ...*Queue) *ConstructionUpdate
AddQueue adds the queue edges to Queue.
func (*ConstructionUpdate) AddQueueIDs ¶
func (cu *ConstructionUpdate) AddQueueIDs(ids ...int) *ConstructionUpdate
AddQueueIDs adds the queue edge to Queue by ids.
func (*ConstructionUpdate) AddRawProduction ¶
func (cu *ConstructionUpdate) AddRawProduction(i int) *ConstructionUpdate
AddRawProduction adds i to raw_production.
func (*ConstructionUpdate) AddType ¶
func (cu *ConstructionUpdate) AddType(i int) *ConstructionUpdate
AddType adds i to type.
func (*ConstructionUpdate) AddX ¶
func (cu *ConstructionUpdate) AddX(i int) *ConstructionUpdate
AddX adds i to x.
func (*ConstructionUpdate) AddY ¶
func (cu *ConstructionUpdate) AddY(i int) *ConstructionUpdate
AddY adds i to y.
func (*ConstructionUpdate) ClearCity ¶
func (cu *ConstructionUpdate) ClearCity() *ConstructionUpdate
ClearCity clears the city edge to City.
func (*ConstructionUpdate) Exec ¶
func (cu *ConstructionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConstructionUpdate) ExecX ¶
func (cu *ConstructionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConstructionUpdate) RemoveQueue ¶
func (cu *ConstructionUpdate) RemoveQueue(q ...*Queue) *ConstructionUpdate
RemoveQueue removes queue edges to Queue.
func (*ConstructionUpdate) RemoveQueueIDs ¶
func (cu *ConstructionUpdate) RemoveQueueIDs(ids ...int) *ConstructionUpdate
RemoveQueueIDs removes the queue edge to Queue by ids.
func (*ConstructionUpdate) Save ¶
func (cu *ConstructionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*ConstructionUpdate) SaveX ¶
func (cu *ConstructionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ConstructionUpdate) SetCity ¶
func (cu *ConstructionUpdate) SetCity(c *City) *ConstructionUpdate
SetCity sets the city edge to City.
func (*ConstructionUpdate) SetCityID ¶
func (cu *ConstructionUpdate) SetCityID(id int) *ConstructionUpdate
SetCityID sets the city edge to City by id.
func (*ConstructionUpdate) SetLevel ¶
func (cu *ConstructionUpdate) SetLevel(i int) *ConstructionUpdate
SetLevel sets the level field.
func (*ConstructionUpdate) SetModifier ¶
func (cu *ConstructionUpdate) SetModifier(f float64) *ConstructionUpdate
SetModifier sets the modifier field.
func (*ConstructionUpdate) SetNeedRefresh ¶
func (cu *ConstructionUpdate) SetNeedRefresh(b bool) *ConstructionUpdate
SetNeedRefresh sets the need_refresh field.
func (*ConstructionUpdate) SetNillableCityID ¶
func (cu *ConstructionUpdate) SetNillableCityID(id *int) *ConstructionUpdate
SetNillableCityID sets the city edge to City by id if the given value is not nil.
func (*ConstructionUpdate) SetNillableLevel ¶
func (cu *ConstructionUpdate) SetNillableLevel(i *int) *ConstructionUpdate
SetNillableLevel sets the level field if the given value is not nil.
func (*ConstructionUpdate) SetNillableModifier ¶
func (cu *ConstructionUpdate) SetNillableModifier(f *float64) *ConstructionUpdate
SetNillableModifier sets the modifier field if the given value is not nil.
func (*ConstructionUpdate) SetNillableNeedRefresh ¶
func (cu *ConstructionUpdate) SetNillableNeedRefresh(b *bool) *ConstructionUpdate
SetNillableNeedRefresh sets the need_refresh field if the given value is not nil.
func (*ConstructionUpdate) SetNillableRawProduction ¶
func (cu *ConstructionUpdate) SetNillableRawProduction(i *int) *ConstructionUpdate
SetNillableRawProduction sets the raw_production field if the given value is not nil.
func (*ConstructionUpdate) SetNillableType ¶
func (cu *ConstructionUpdate) SetNillableType(i *int) *ConstructionUpdate
SetNillableType sets the type field if the given value is not nil.
func (*ConstructionUpdate) SetRawProduction ¶
func (cu *ConstructionUpdate) SetRawProduction(i int) *ConstructionUpdate
SetRawProduction sets the raw_production field.
func (*ConstructionUpdate) SetType ¶
func (cu *ConstructionUpdate) SetType(i int) *ConstructionUpdate
SetType sets the type field.
func (*ConstructionUpdate) SetX ¶
func (cu *ConstructionUpdate) SetX(i int) *ConstructionUpdate
SetX sets the x field.
func (*ConstructionUpdate) SetY ¶
func (cu *ConstructionUpdate) SetY(i int) *ConstructionUpdate
SetY sets the y field.
func (*ConstructionUpdate) Where ¶
func (cu *ConstructionUpdate) Where(ps ...predicate.Construction) *ConstructionUpdate
Where adds a new predicate for the builder.
type ConstructionUpdateOne ¶
type ConstructionUpdateOne struct {
// contains filtered or unexported fields
}
ConstructionUpdateOne is the builder for updating a single Construction entity.
func (*ConstructionUpdateOne) AddLevel ¶
func (cuo *ConstructionUpdateOne) AddLevel(i int) *ConstructionUpdateOne
AddLevel adds i to level.
func (*ConstructionUpdateOne) AddModifier ¶
func (cuo *ConstructionUpdateOne) AddModifier(f float64) *ConstructionUpdateOne
AddModifier adds f to modifier.
func (*ConstructionUpdateOne) AddQueue ¶
func (cuo *ConstructionUpdateOne) AddQueue(q ...*Queue) *ConstructionUpdateOne
AddQueue adds the queue edges to Queue.
func (*ConstructionUpdateOne) AddQueueIDs ¶
func (cuo *ConstructionUpdateOne) AddQueueIDs(ids ...int) *ConstructionUpdateOne
AddQueueIDs adds the queue edge to Queue by ids.
func (*ConstructionUpdateOne) AddRawProduction ¶
func (cuo *ConstructionUpdateOne) AddRawProduction(i int) *ConstructionUpdateOne
AddRawProduction adds i to raw_production.
func (*ConstructionUpdateOne) AddType ¶
func (cuo *ConstructionUpdateOne) AddType(i int) *ConstructionUpdateOne
AddType adds i to type.
func (*ConstructionUpdateOne) AddX ¶
func (cuo *ConstructionUpdateOne) AddX(i int) *ConstructionUpdateOne
AddX adds i to x.
func (*ConstructionUpdateOne) AddY ¶
func (cuo *ConstructionUpdateOne) AddY(i int) *ConstructionUpdateOne
AddY adds i to y.
func (*ConstructionUpdateOne) ClearCity ¶
func (cuo *ConstructionUpdateOne) ClearCity() *ConstructionUpdateOne
ClearCity clears the city edge to City.
func (*ConstructionUpdateOne) Exec ¶
func (cuo *ConstructionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ConstructionUpdateOne) ExecX ¶
func (cuo *ConstructionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConstructionUpdateOne) RemoveQueue ¶
func (cuo *ConstructionUpdateOne) RemoveQueue(q ...*Queue) *ConstructionUpdateOne
RemoveQueue removes queue edges to Queue.
func (*ConstructionUpdateOne) RemoveQueueIDs ¶
func (cuo *ConstructionUpdateOne) RemoveQueueIDs(ids ...int) *ConstructionUpdateOne
RemoveQueueIDs removes the queue edge to Queue by ids.
func (*ConstructionUpdateOne) Save ¶
func (cuo *ConstructionUpdateOne) Save(ctx context.Context) (*Construction, error)
Save executes the query and returns the updated entity.
func (*ConstructionUpdateOne) SaveX ¶
func (cuo *ConstructionUpdateOne) SaveX(ctx context.Context) *Construction
SaveX is like Save, but panics if an error occurs.
func (*ConstructionUpdateOne) SetCity ¶
func (cuo *ConstructionUpdateOne) SetCity(c *City) *ConstructionUpdateOne
SetCity sets the city edge to City.
func (*ConstructionUpdateOne) SetCityID ¶
func (cuo *ConstructionUpdateOne) SetCityID(id int) *ConstructionUpdateOne
SetCityID sets the city edge to City by id.
func (*ConstructionUpdateOne) SetLevel ¶
func (cuo *ConstructionUpdateOne) SetLevel(i int) *ConstructionUpdateOne
SetLevel sets the level field.
func (*ConstructionUpdateOne) SetModifier ¶
func (cuo *ConstructionUpdateOne) SetModifier(f float64) *ConstructionUpdateOne
SetModifier sets the modifier field.
func (*ConstructionUpdateOne) SetNeedRefresh ¶
func (cuo *ConstructionUpdateOne) SetNeedRefresh(b bool) *ConstructionUpdateOne
SetNeedRefresh sets the need_refresh field.
func (*ConstructionUpdateOne) SetNillableCityID ¶
func (cuo *ConstructionUpdateOne) SetNillableCityID(id *int) *ConstructionUpdateOne
SetNillableCityID sets the city edge to City by id if the given value is not nil.
func (*ConstructionUpdateOne) SetNillableLevel ¶
func (cuo *ConstructionUpdateOne) SetNillableLevel(i *int) *ConstructionUpdateOne
SetNillableLevel sets the level field if the given value is not nil.
func (*ConstructionUpdateOne) SetNillableModifier ¶
func (cuo *ConstructionUpdateOne) SetNillableModifier(f *float64) *ConstructionUpdateOne
SetNillableModifier sets the modifier field if the given value is not nil.
func (*ConstructionUpdateOne) SetNillableNeedRefresh ¶
func (cuo *ConstructionUpdateOne) SetNillableNeedRefresh(b *bool) *ConstructionUpdateOne
SetNillableNeedRefresh sets the need_refresh field if the given value is not nil.
func (*ConstructionUpdateOne) SetNillableRawProduction ¶
func (cuo *ConstructionUpdateOne) SetNillableRawProduction(i *int) *ConstructionUpdateOne
SetNillableRawProduction sets the raw_production field if the given value is not nil.
func (*ConstructionUpdateOne) SetNillableType ¶
func (cuo *ConstructionUpdateOne) SetNillableType(i *int) *ConstructionUpdateOne
SetNillableType sets the type field if the given value is not nil.
func (*ConstructionUpdateOne) SetRawProduction ¶
func (cuo *ConstructionUpdateOne) SetRawProduction(i int) *ConstructionUpdateOne
SetRawProduction sets the raw_production field.
func (*ConstructionUpdateOne) SetType ¶
func (cuo *ConstructionUpdateOne) SetType(i int) *ConstructionUpdateOne
SetType sets the type field.
func (*ConstructionUpdateOne) SetX ¶
func (cuo *ConstructionUpdateOne) SetX(i int) *ConstructionUpdateOne
SetX sets the x field.
func (*ConstructionUpdateOne) SetY ¶
func (cuo *ConstructionUpdateOne) SetY(i int) *ConstructionUpdateOne
SetY sets the y field.
type Constructions ¶
type Constructions []*Construction
Constructions is a parsable slice of Construction.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflict 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 Queue ¶
type Queue struct { // ID of the ent. ID int `json:"id,omitempty"` // Completion holds the value of the "completion" field. Completion time.Time `json:"completion,omitempty"` // Action holds the value of the "action" field. Action int `json:"action,omitempty"` // Order holds the value of the "order" field. Order int `json:"order,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the QueueQuery when eager-loading is set. Edges QueueEdges `json:"edges"` // contains filtered or unexported fields }
Queue is the model entity for the Queue schema.
func (*Queue) QueryConstruction ¶
func (q *Queue) QueryConstruction() *ConstructionQuery
QueryConstruction queries the construction edge of the Queue.
func (*Queue) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Queue) Update ¶
func (q *Queue) Update() *QueueUpdateOne
Update returns a builder for updating this Queue. Note that, you need to call Queue.Unwrap() before calling this method, if this Queue was returned from a transaction, and the transaction was committed or rolled back.
type QueueClient ¶
type QueueClient struct {
// contains filtered or unexported fields
}
QueueClient is a client for the Queue schema.
func NewQueueClient ¶
func NewQueueClient(c config) *QueueClient
NewQueueClient returns a client for the Queue from the given config.
func (*QueueClient) Create ¶
func (c *QueueClient) Create() *QueueCreate
Create returns a create builder for Queue.
func (*QueueClient) Delete ¶
func (c *QueueClient) Delete() *QueueDelete
Delete returns a delete builder for Queue.
func (*QueueClient) DeleteOne ¶
func (c *QueueClient) DeleteOne(q *Queue) *QueueDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*QueueClient) DeleteOneID ¶
func (c *QueueClient) DeleteOneID(id int) *QueueDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*QueueClient) GetX ¶
func (c *QueueClient) GetX(ctx context.Context, id int) *Queue
GetX is like Get, but panics if an error occurs.
func (*QueueClient) Query ¶
func (c *QueueClient) Query() *QueueQuery
Create returns a query builder for Queue.
func (*QueueClient) QueryCity ¶
func (c *QueueClient) QueryCity(q *Queue) *CityQuery
QueryCity queries the city edge of a Queue.
func (*QueueClient) QueryConstruction ¶
func (c *QueueClient) QueryConstruction(q *Queue) *ConstructionQuery
QueryConstruction queries the construction edge of a Queue.
func (*QueueClient) Update ¶
func (c *QueueClient) Update() *QueueUpdate
Update returns an update builder for Queue.
func (*QueueClient) UpdateOne ¶
func (c *QueueClient) UpdateOne(q *Queue) *QueueUpdateOne
UpdateOne returns an update builder for the given entity.
func (*QueueClient) UpdateOneID ¶
func (c *QueueClient) UpdateOneID(id int) *QueueUpdateOne
UpdateOneID returns an update builder for the given id.
func (*QueueClient) Use ¶
func (c *QueueClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `queue.Hooks(f(g(h())))`.
type QueueCreate ¶
type QueueCreate struct {
// contains filtered or unexported fields
}
QueueCreate is the builder for creating a Queue entity.
func (*QueueCreate) Save ¶
func (qc *QueueCreate) Save(ctx context.Context) (*Queue, error)
Save creates the Queue in the database.
func (*QueueCreate) SaveX ¶
func (qc *QueueCreate) SaveX(ctx context.Context) *Queue
SaveX calls Save and panics if Save returns an error.
func (*QueueCreate) SetAction ¶
func (qc *QueueCreate) SetAction(i int) *QueueCreate
SetAction sets the action field.
func (*QueueCreate) SetCity ¶
func (qc *QueueCreate) SetCity(c *City) *QueueCreate
SetCity sets the city edge to City.
func (*QueueCreate) SetCityID ¶
func (qc *QueueCreate) SetCityID(id int) *QueueCreate
SetCityID sets the city edge to City by id.
func (*QueueCreate) SetCompletion ¶
func (qc *QueueCreate) SetCompletion(t time.Time) *QueueCreate
SetCompletion sets the completion field.
func (*QueueCreate) SetConstruction ¶
func (qc *QueueCreate) SetConstruction(c *Construction) *QueueCreate
SetConstruction sets the construction edge to Construction.
func (*QueueCreate) SetConstructionID ¶
func (qc *QueueCreate) SetConstructionID(id int) *QueueCreate
SetConstructionID sets the construction edge to Construction by id.
func (*QueueCreate) SetNillableCityID ¶
func (qc *QueueCreate) SetNillableCityID(id *int) *QueueCreate
SetNillableCityID sets the city edge to City by id if the given value is not nil.
func (*QueueCreate) SetNillableConstructionID ¶
func (qc *QueueCreate) SetNillableConstructionID(id *int) *QueueCreate
SetNillableConstructionID sets the construction edge to Construction by id if the given value is not nil.
func (*QueueCreate) SetOrder ¶
func (qc *QueueCreate) SetOrder(i int) *QueueCreate
SetOrder sets the order field.
type QueueDelete ¶
type QueueDelete struct {
// contains filtered or unexported fields
}
QueueDelete is the builder for deleting a Queue entity.
func (*QueueDelete) Exec ¶
func (qd *QueueDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*QueueDelete) ExecX ¶
func (qd *QueueDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*QueueDelete) Where ¶
func (qd *QueueDelete) Where(ps ...predicate.Queue) *QueueDelete
Where adds a new predicate to the delete builder.
type QueueDeleteOne ¶
type QueueDeleteOne struct {
// contains filtered or unexported fields
}
QueueDeleteOne is the builder for deleting a single Queue entity.
func (*QueueDeleteOne) Exec ¶
func (qdo *QueueDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*QueueDeleteOne) ExecX ¶
func (qdo *QueueDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type QueueEdges ¶
type QueueEdges struct { // City holds the value of the city edge. City *City // Construction holds the value of the construction edge. Construction *Construction // contains filtered or unexported fields }
QueueEdges holds the relations/edges for other nodes in the graph.
func (QueueEdges) CityOrErr ¶
func (e QueueEdges) CityOrErr() (*City, error)
CityOrErr returns the City value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (QueueEdges) ConstructionOrErr ¶
func (e QueueEdges) ConstructionOrErr() (*Construction, error)
ConstructionOrErr returns the Construction value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type QueueGroupBy ¶
type QueueGroupBy struct {
// contains filtered or unexported fields
}
QueueGroupBy is the builder for group-by Queue entities.
func (*QueueGroupBy) Aggregate ¶
func (qgb *QueueGroupBy) Aggregate(fns ...AggregateFunc) *QueueGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*QueueGroupBy) Bools ¶
func (qgb *QueueGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*QueueGroupBy) BoolsX ¶
func (qgb *QueueGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*QueueGroupBy) Float64s ¶
func (qgb *QueueGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*QueueGroupBy) Float64sX ¶
func (qgb *QueueGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*QueueGroupBy) Ints ¶
func (qgb *QueueGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*QueueGroupBy) IntsX ¶
func (qgb *QueueGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*QueueGroupBy) Scan ¶
func (qgb *QueueGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*QueueGroupBy) ScanX ¶
func (qgb *QueueGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type QueueMutation ¶
type QueueMutation struct {
// contains filtered or unexported fields
}
QueueMutation represents an operation that mutate the Queues nodes in the graph.
func (*QueueMutation) Action ¶
func (m *QueueMutation) Action() (r int, exists bool)
Action returns the action value in the mutation.
func (*QueueMutation) AddAction ¶
func (m *QueueMutation) AddAction(i int)
AddAction adds i to action.
func (*QueueMutation) AddField ¶
func (m *QueueMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*QueueMutation) AddedAction ¶
func (m *QueueMutation) AddedAction() (r int, exists bool)
AddedAction returns the value that was added to the action field in this mutation.
func (*QueueMutation) AddedEdges ¶
func (m *QueueMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*QueueMutation) AddedField ¶
func (m *QueueMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*QueueMutation) AddedFields ¶
func (m *QueueMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*QueueMutation) AddedIDs ¶
func (m *QueueMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*QueueMutation) AddedOrder ¶
func (m *QueueMutation) AddedOrder() (r int, exists bool)
AddedOrder returns the value that was added to the order field in this mutation.
func (*QueueMutation) CityCleared ¶
func (m *QueueMutation) CityCleared() bool
CityCleared returns if the edge city was cleared.
func (*QueueMutation) CityID ¶
func (m *QueueMutation) CityID() (id int, exists bool)
CityID returns the city id in the mutation.
func (*QueueMutation) CityIDs ¶
func (m *QueueMutation) CityIDs() (ids []int)
CityIDs returns the city ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use CityID instead. It exists only for internal usage by the builders.
func (*QueueMutation) ClearCity ¶
func (m *QueueMutation) ClearCity()
ClearCity clears the city edge to City.
func (*QueueMutation) ClearConstruction ¶
func (m *QueueMutation) ClearConstruction()
ClearConstruction clears the construction edge to Construction.
func (*QueueMutation) ClearEdge ¶
func (m *QueueMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*QueueMutation) ClearField ¶
func (m *QueueMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*QueueMutation) ClearedEdges ¶
func (m *QueueMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*QueueMutation) ClearedFields ¶
func (m *QueueMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (QueueMutation) Client ¶
func (m QueueMutation) 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 (*QueueMutation) Completion ¶
func (m *QueueMutation) Completion() (r time.Time, exists bool)
Completion returns the completion value in the mutation.
func (*QueueMutation) ConstructionCleared ¶
func (m *QueueMutation) ConstructionCleared() bool
ConstructionCleared returns if the edge construction was cleared.
func (*QueueMutation) ConstructionID ¶
func (m *QueueMutation) ConstructionID() (id int, exists bool)
ConstructionID returns the construction id in the mutation.
func (*QueueMutation) ConstructionIDs ¶
func (m *QueueMutation) ConstructionIDs() (ids []int)
ConstructionIDs returns the construction ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use ConstructionID instead. It exists only for internal usage by the builders.
func (*QueueMutation) EdgeCleared ¶
func (m *QueueMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*QueueMutation) Field ¶
func (m *QueueMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*QueueMutation) FieldCleared ¶
func (m *QueueMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*QueueMutation) Fields ¶
func (m *QueueMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*QueueMutation) ID ¶
func (m *QueueMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*QueueMutation) Order ¶
func (m *QueueMutation) Order() (r int, exists bool)
Order returns the order value in the mutation.
func (*QueueMutation) RemovedEdges ¶
func (m *QueueMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*QueueMutation) RemovedIDs ¶
func (m *QueueMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*QueueMutation) ResetAction ¶
func (m *QueueMutation) ResetAction()
ResetAction reset all changes of the action field.
func (*QueueMutation) ResetCity ¶
func (m *QueueMutation) ResetCity()
ResetCity reset all changes of the city edge.
func (*QueueMutation) ResetCompletion ¶
func (m *QueueMutation) ResetCompletion()
ResetCompletion reset all changes of the completion field.
func (*QueueMutation) ResetConstruction ¶
func (m *QueueMutation) ResetConstruction()
ResetConstruction reset all changes of the construction edge.
func (*QueueMutation) ResetEdge ¶
func (m *QueueMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*QueueMutation) ResetField ¶
func (m *QueueMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*QueueMutation) ResetOrder ¶
func (m *QueueMutation) ResetOrder()
ResetOrder reset all changes of the order field.
func (*QueueMutation) SetAction ¶
func (m *QueueMutation) SetAction(i int)
SetAction sets the action field.
func (*QueueMutation) SetCityID ¶
func (m *QueueMutation) SetCityID(id int)
SetCityID sets the city edge to City by id.
func (*QueueMutation) SetCompletion ¶
func (m *QueueMutation) SetCompletion(t time.Time)
SetCompletion sets the completion field.
func (*QueueMutation) SetConstructionID ¶
func (m *QueueMutation) SetConstructionID(id int)
SetConstructionID sets the construction edge to Construction by id.
func (*QueueMutation) SetField ¶
func (m *QueueMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*QueueMutation) SetOrder ¶
func (m *QueueMutation) SetOrder(i int)
SetOrder sets the order field.
func (QueueMutation) Tx ¶
func (m QueueMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*QueueMutation) Type ¶
func (m *QueueMutation) Type() string
Type returns the node type of this mutation (Queue).
type QueueQuery ¶
type QueueQuery struct {
// contains filtered or unexported fields
}
QueueQuery is the builder for querying Queue entities.
func (*QueueQuery) All ¶
func (qq *QueueQuery) All(ctx context.Context) ([]*Queue, error)
All executes the query and returns a list of Queues.
func (*QueueQuery) AllX ¶
func (qq *QueueQuery) AllX(ctx context.Context) []*Queue
AllX is like All, but panics if an error occurs.
func (*QueueQuery) Clone ¶
func (qq *QueueQuery) Clone() *QueueQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*QueueQuery) Count ¶
func (qq *QueueQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*QueueQuery) CountX ¶
func (qq *QueueQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*QueueQuery) Exist ¶
func (qq *QueueQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*QueueQuery) ExistX ¶
func (qq *QueueQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*QueueQuery) First ¶
func (qq *QueueQuery) First(ctx context.Context) (*Queue, error)
First returns the first Queue entity in the query. Returns *NotFoundError when no queue was found.
func (*QueueQuery) FirstID ¶
func (qq *QueueQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Queue id in the query. Returns *NotFoundError when no id was found.
func (*QueueQuery) FirstX ¶
func (qq *QueueQuery) FirstX(ctx context.Context) *Queue
FirstX is like First, but panics if an error occurs.
func (*QueueQuery) FirstXID ¶
func (qq *QueueQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*QueueQuery) GroupBy ¶
func (qq *QueueQuery) GroupBy(field string, fields ...string) *QueueGroupBy
GroupBy 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 { Completion time.Time `json:"completion,omitempty"` Count int `json:"count,omitempty"` } client.Queue.Query(). GroupBy(queue.FieldCompletion). Aggregate(ent.Count()). Scan(ctx, &v)
func (*QueueQuery) IDs ¶
func (qq *QueueQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Queue ids.
func (*QueueQuery) IDsX ¶
func (qq *QueueQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*QueueQuery) Limit ¶
func (qq *QueueQuery) Limit(limit int) *QueueQuery
Limit adds a limit step to the query.
func (*QueueQuery) Offset ¶
func (qq *QueueQuery) Offset(offset int) *QueueQuery
Offset adds an offset step to the query.
func (*QueueQuery) Only ¶
func (qq *QueueQuery) Only(ctx context.Context) (*Queue, error)
Only returns the only Queue entity in the query, returns an error if not exactly one entity was returned.
func (*QueueQuery) OnlyID ¶
func (qq *QueueQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Queue id in the query, returns an error if not exactly one id was returned.
func (*QueueQuery) OnlyX ¶
func (qq *QueueQuery) OnlyX(ctx context.Context) *Queue
OnlyX is like Only, but panics if an error occurs.
func (*QueueQuery) OnlyXID ¶
func (qq *QueueQuery) OnlyXID(ctx context.Context) int
OnlyXID is like OnlyID, but panics if an error occurs.
func (*QueueQuery) Order ¶
func (qq *QueueQuery) Order(o ...OrderFunc) *QueueQuery
Order adds an order step to the query.
func (*QueueQuery) QueryCity ¶
func (qq *QueueQuery) QueryCity() *CityQuery
QueryCity chains the current query on the city edge.
func (*QueueQuery) QueryConstruction ¶
func (qq *QueueQuery) QueryConstruction() *ConstructionQuery
QueryConstruction chains the current query on the construction edge.
func (*QueueQuery) Select ¶
func (qq *QueueQuery) Select(field string, fields ...string) *QueueSelect
Select one or more fields from the given query.
Example:
var v []struct { Completion time.Time `json:"completion,omitempty"` } client.Queue.Query(). Select(queue.FieldCompletion). Scan(ctx, &v)
func (*QueueQuery) Where ¶
func (qq *QueueQuery) Where(ps ...predicate.Queue) *QueueQuery
Where adds a new predicate for the builder.
func (*QueueQuery) WithCity ¶
func (qq *QueueQuery) WithCity(opts ...func(*CityQuery)) *QueueQuery
WithCity tells the query-builder to eager-loads the nodes that are connected to
the "city" edge. The optional arguments used to configure the query builder of the edge.
func (*QueueQuery) WithConstruction ¶
func (qq *QueueQuery) WithConstruction(opts ...func(*ConstructionQuery)) *QueueQuery
WithConstruction tells the query-builder to eager-loads the nodes that are connected to
the "construction" edge. The optional arguments used to configure the query builder of the edge.
type QueueSelect ¶
type QueueSelect struct {
// contains filtered or unexported fields
}
QueueSelect is the builder for select fields of Queue entities.
func (*QueueSelect) Bools ¶
func (qs *QueueSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*QueueSelect) BoolsX ¶
func (qs *QueueSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*QueueSelect) Float64s ¶
func (qs *QueueSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*QueueSelect) Float64sX ¶
func (qs *QueueSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*QueueSelect) Ints ¶
func (qs *QueueSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*QueueSelect) IntsX ¶
func (qs *QueueSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*QueueSelect) Scan ¶
func (qs *QueueSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*QueueSelect) ScanX ¶
func (qs *QueueSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type QueueUpdate ¶
type QueueUpdate struct {
// contains filtered or unexported fields
}
QueueUpdate is the builder for updating Queue entities.
func (*QueueUpdate) AddAction ¶
func (qu *QueueUpdate) AddAction(i int) *QueueUpdate
AddAction adds i to action.
func (*QueueUpdate) AddOrder ¶
func (qu *QueueUpdate) AddOrder(i int) *QueueUpdate
AddOrder adds i to order.
func (*QueueUpdate) ClearCity ¶
func (qu *QueueUpdate) ClearCity() *QueueUpdate
ClearCity clears the city edge to City.
func (*QueueUpdate) ClearConstruction ¶
func (qu *QueueUpdate) ClearConstruction() *QueueUpdate
ClearConstruction clears the construction edge to Construction.
func (*QueueUpdate) Exec ¶
func (qu *QueueUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*QueueUpdate) ExecX ¶
func (qu *QueueUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QueueUpdate) Save ¶
func (qu *QueueUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*QueueUpdate) SaveX ¶
func (qu *QueueUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*QueueUpdate) SetAction ¶
func (qu *QueueUpdate) SetAction(i int) *QueueUpdate
SetAction sets the action field.
func (*QueueUpdate) SetCity ¶
func (qu *QueueUpdate) SetCity(c *City) *QueueUpdate
SetCity sets the city edge to City.
func (*QueueUpdate) SetCityID ¶
func (qu *QueueUpdate) SetCityID(id int) *QueueUpdate
SetCityID sets the city edge to City by id.
func (*QueueUpdate) SetCompletion ¶
func (qu *QueueUpdate) SetCompletion(t time.Time) *QueueUpdate
SetCompletion sets the completion field.
func (*QueueUpdate) SetConstruction ¶
func (qu *QueueUpdate) SetConstruction(c *Construction) *QueueUpdate
SetConstruction sets the construction edge to Construction.
func (*QueueUpdate) SetConstructionID ¶
func (qu *QueueUpdate) SetConstructionID(id int) *QueueUpdate
SetConstructionID sets the construction edge to Construction by id.
func (*QueueUpdate) SetNillableCityID ¶
func (qu *QueueUpdate) SetNillableCityID(id *int) *QueueUpdate
SetNillableCityID sets the city edge to City by id if the given value is not nil.
func (*QueueUpdate) SetNillableConstructionID ¶
func (qu *QueueUpdate) SetNillableConstructionID(id *int) *QueueUpdate
SetNillableConstructionID sets the construction edge to Construction by id if the given value is not nil.
func (*QueueUpdate) SetOrder ¶
func (qu *QueueUpdate) SetOrder(i int) *QueueUpdate
SetOrder sets the order field.
func (*QueueUpdate) Where ¶
func (qu *QueueUpdate) Where(ps ...predicate.Queue) *QueueUpdate
Where adds a new predicate for the builder.
type QueueUpdateOne ¶
type QueueUpdateOne struct {
// contains filtered or unexported fields
}
QueueUpdateOne is the builder for updating a single Queue entity.
func (*QueueUpdateOne) AddAction ¶
func (quo *QueueUpdateOne) AddAction(i int) *QueueUpdateOne
AddAction adds i to action.
func (*QueueUpdateOne) AddOrder ¶
func (quo *QueueUpdateOne) AddOrder(i int) *QueueUpdateOne
AddOrder adds i to order.
func (*QueueUpdateOne) ClearCity ¶
func (quo *QueueUpdateOne) ClearCity() *QueueUpdateOne
ClearCity clears the city edge to City.
func (*QueueUpdateOne) ClearConstruction ¶
func (quo *QueueUpdateOne) ClearConstruction() *QueueUpdateOne
ClearConstruction clears the construction edge to Construction.
func (*QueueUpdateOne) Exec ¶
func (quo *QueueUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*QueueUpdateOne) ExecX ¶
func (quo *QueueUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QueueUpdateOne) Save ¶
func (quo *QueueUpdateOne) Save(ctx context.Context) (*Queue, error)
Save executes the query and returns the updated entity.
func (*QueueUpdateOne) SaveX ¶
func (quo *QueueUpdateOne) SaveX(ctx context.Context) *Queue
SaveX is like Save, but panics if an error occurs.
func (*QueueUpdateOne) SetAction ¶
func (quo *QueueUpdateOne) SetAction(i int) *QueueUpdateOne
SetAction sets the action field.
func (*QueueUpdateOne) SetCity ¶
func (quo *QueueUpdateOne) SetCity(c *City) *QueueUpdateOne
SetCity sets the city edge to City.
func (*QueueUpdateOne) SetCityID ¶
func (quo *QueueUpdateOne) SetCityID(id int) *QueueUpdateOne
SetCityID sets the city edge to City by id.
func (*QueueUpdateOne) SetCompletion ¶
func (quo *QueueUpdateOne) SetCompletion(t time.Time) *QueueUpdateOne
SetCompletion sets the completion field.
func (*QueueUpdateOne) SetConstruction ¶
func (quo *QueueUpdateOne) SetConstruction(c *Construction) *QueueUpdateOne
SetConstruction sets the construction edge to Construction.
func (*QueueUpdateOne) SetConstructionID ¶
func (quo *QueueUpdateOne) SetConstructionID(id int) *QueueUpdateOne
SetConstructionID sets the construction edge to Construction by id.
func (*QueueUpdateOne) SetNillableCityID ¶
func (quo *QueueUpdateOne) SetNillableCityID(id *int) *QueueUpdateOne
SetNillableCityID sets the city edge to City by id if the given value is not nil.
func (*QueueUpdateOne) SetNillableConstructionID ¶
func (quo *QueueUpdateOne) SetNillableConstructionID(id *int) *QueueUpdateOne
SetNillableConstructionID sets the construction edge to Construction by id if the given value is not nil.
func (*QueueUpdateOne) SetOrder ¶
func (quo *QueueUpdateOne) SetOrder(i int) *QueueUpdateOne
SetOrder sets the order field.
type Tx ¶
type Tx struct { // City is the client for interacting with the City builders. City *CityClient // Construction is the client for interacting with the Construction builders. Construction *ConstructionClient // Queue is the client for interacting with the Queue builders. Queue *QueueClient // 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 the Tx stored in a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
OnRollback adds a function to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // PasswordHash holds the value of the "password_hash" field. PasswordHash string `json:"password_hash,omitempty"` // Gold holds the value of the "gold" field. Gold int `json:"gold,omitempty"` // Diamonds holds the value of the "diamonds" field. Diamonds int `json:"diamonds,omitempty"` // Darkwood holds the value of the "darkwood" field. Darkwood int `json:"darkwood,omitempty"` // Runestone holds the value of the "runestone" field. Runestone int `json:"runestone,omitempty"` // Veritium holds the value of the "veritium" field. Veritium int `json:"veritium,omitempty"` // Trueseed holds the value of the "trueseed" field. Trueseed int `json:"trueseed,omitempty"` // Rank holds the value of the "rank" field. Rank int `json:"rank,omitempty"` // AllianceRank holds the value of the "alliance_rank" field. AllianceRank int `json:"alliance_rank,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) QueryCities ¶
QueryCities queries the cities edge of the User.
func (*User) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next 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 create builder for User.
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 delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a delete builder for the given 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
Create returns a query builder for User.
func (*UserClient) QueryCities ¶
func (c *UserClient) QueryCities(u *User) *CityQuery
QueryCities queries the cities 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) AddCities ¶
func (uc *UserCreate) AddCities(c ...*City) *UserCreate
AddCities adds the cities edges to City.
func (*UserCreate) AddCityIDs ¶
func (uc *UserCreate) AddCityIDs(ids ...int) *UserCreate
AddCityIDs adds the cities edge to City by ids.
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) SetAllianceRank ¶
func (uc *UserCreate) SetAllianceRank(i int) *UserCreate
SetAllianceRank sets the alliance_rank field.
func (*UserCreate) SetDarkwood ¶
func (uc *UserCreate) SetDarkwood(i int) *UserCreate
SetDarkwood sets the darkwood field.
func (*UserCreate) SetDiamonds ¶
func (uc *UserCreate) SetDiamonds(i int) *UserCreate
SetDiamonds sets the diamonds field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the email field.
func (*UserCreate) SetGold ¶
func (uc *UserCreate) SetGold(i int) *UserCreate
SetGold sets the gold field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the name field.
func (*UserCreate) SetNillableAllianceRank ¶
func (uc *UserCreate) SetNillableAllianceRank(i *int) *UserCreate
SetNillableAllianceRank sets the alliance_rank field if the given value is not nil.
func (*UserCreate) SetNillableDarkwood ¶
func (uc *UserCreate) SetNillableDarkwood(i *int) *UserCreate
SetNillableDarkwood sets the darkwood field if the given value is not nil.
func (*UserCreate) SetNillableDiamonds ¶
func (uc *UserCreate) SetNillableDiamonds(i *int) *UserCreate
SetNillableDiamonds sets the diamonds field if the given value is not nil.
func (*UserCreate) SetNillableGold ¶
func (uc *UserCreate) SetNillableGold(i *int) *UserCreate
SetNillableGold sets the gold field if the given value is not nil.
func (*UserCreate) SetNillableRank ¶
func (uc *UserCreate) SetNillableRank(i *int) *UserCreate
SetNillableRank sets the rank field if the given value is not nil.
func (*UserCreate) SetNillableRunestone ¶
func (uc *UserCreate) SetNillableRunestone(i *int) *UserCreate
SetNillableRunestone sets the runestone field if the given value is not nil.
func (*UserCreate) SetNillableTrueseed ¶
func (uc *UserCreate) SetNillableTrueseed(i *int) *UserCreate
SetNillableTrueseed sets the trueseed field if the given value is not nil.
func (*UserCreate) SetNillableVeritium ¶
func (uc *UserCreate) SetNillableVeritium(i *int) *UserCreate
SetNillableVeritium sets the veritium field if the given value is not nil.
func (*UserCreate) SetPasswordHash ¶
func (uc *UserCreate) SetPasswordHash(s string) *UserCreate
SetPasswordHash sets the password_hash field.
func (*UserCreate) SetRank ¶
func (uc *UserCreate) SetRank(i int) *UserCreate
SetRank sets the rank field.
func (*UserCreate) SetRunestone ¶
func (uc *UserCreate) SetRunestone(i int) *UserCreate
SetRunestone sets the runestone field.
func (*UserCreate) SetTrueseed ¶
func (uc *UserCreate) SetTrueseed(i int) *UserCreate
SetTrueseed sets the trueseed field.
func (*UserCreate) SetVeritium ¶
func (uc *UserCreate) SetVeritium(i int) *UserCreate
SetVeritium sets the veritium field.
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 adds a new predicate to the delete 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 { // Cities holds the value of the cities edge. Cities []*City // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) CitiesOrErr ¶
CitiesOrErr returns the Cities 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 builder for group-by 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) Bools ¶
func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) BoolsX ¶
func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶
func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) Float64sX ¶
func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Ints ¶
func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) IntsX ¶
func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*UserGroupBy) ScanX ¶
func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutate the Users nodes in the graph.
func (*UserMutation) AddAllianceRank ¶
func (m *UserMutation) AddAllianceRank(i int)
AddAllianceRank adds i to alliance_rank.
func (*UserMutation) AddCityIDs ¶
func (m *UserMutation) AddCityIDs(ids ...int)
AddCityIDs adds the cities edge to City by ids.
func (*UserMutation) AddDarkwood ¶
func (m *UserMutation) AddDarkwood(i int)
AddDarkwood adds i to darkwood.
func (*UserMutation) AddDiamonds ¶
func (m *UserMutation) AddDiamonds(i int)
AddDiamonds adds i to diamonds.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*UserMutation) AddRunestone ¶
func (m *UserMutation) AddRunestone(i int)
AddRunestone adds i to runestone.
func (*UserMutation) AddTrueseed ¶
func (m *UserMutation) AddTrueseed(i int)
AddTrueseed adds i to trueseed.
func (*UserMutation) AddVeritium ¶
func (m *UserMutation) AddVeritium(i int)
AddVeritium adds i to veritium.
func (*UserMutation) AddedAllianceRank ¶
func (m *UserMutation) AddedAllianceRank() (r int, exists bool)
AddedAllianceRank returns the value that was added to the alliance_rank field in this mutation.
func (*UserMutation) AddedDarkwood ¶
func (m *UserMutation) AddedDarkwood() (r int, exists bool)
AddedDarkwood returns the value that was added to the darkwood field in this mutation.
func (*UserMutation) AddedDiamonds ¶
func (m *UserMutation) AddedDiamonds() (r int, exists bool)
AddedDiamonds returns the value that was added to the diamonds field in this mutation.
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 in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*UserMutation) AddedGold ¶
func (m *UserMutation) AddedGold() (r int, exists bool)
AddedGold returns the value that was added to the gold field in 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.
func (*UserMutation) AddedRank ¶
func (m *UserMutation) AddedRank() (r int, exists bool)
AddedRank returns the value that was added to the rank field in this mutation.
func (*UserMutation) AddedRunestone ¶
func (m *UserMutation) AddedRunestone() (r int, exists bool)
AddedRunestone returns the value that was added to the runestone field in this mutation.
func (*UserMutation) AddedTrueseed ¶
func (m *UserMutation) AddedTrueseed() (r int, exists bool)
AddedTrueseed returns the value that was added to the trueseed field in this mutation.
func (*UserMutation) AddedVeritium ¶
func (m *UserMutation) AddedVeritium() (r int, exists bool)
AddedVeritium returns the value that was added to the veritium field in this mutation.
func (*UserMutation) AllianceRank ¶
func (m *UserMutation) AllianceRank() (r int, exists bool)
AllianceRank returns the alliance_rank value in the mutation.
func (*UserMutation) CitiesIDs ¶
func (m *UserMutation) CitiesIDs() (ids []int)
CitiesIDs returns the cities ids in the mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) Darkwood ¶
func (m *UserMutation) Darkwood() (r int, exists bool)
Darkwood returns the darkwood value in the mutation.
func (*UserMutation) Diamonds ¶
func (m *UserMutation) Diamonds() (r int, exists bool)
Diamonds returns the diamonds value in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the email value in the 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 value indicates that this field was not set, or was not define in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field 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 in/decremented, call AddedFields().
func (*UserMutation) Gold ¶
func (m *UserMutation) Gold() (r int, exists bool)
Gold returns the gold value 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 available only if it was provided to the builder.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*UserMutation) PasswordHash ¶
func (m *UserMutation) PasswordHash() (r string, exists bool)
PasswordHash returns the password_hash value in the mutation.
func (*UserMutation) Rank ¶
func (m *UserMutation) Rank() (r int, exists bool)
Rank returns the rank value in the mutation.
func (*UserMutation) RemoveCityIDs ¶
func (m *UserMutation) RemoveCityIDs(ids ...int)
RemoveCityIDs removes the cities edge to City by ids.
func (*UserMutation) RemovedCitiesIDs ¶
func (m *UserMutation) RemovedCitiesIDs() (ids []int)
RemovedCities returns the removed ids of cities.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*UserMutation) ResetAllianceRank ¶
func (m *UserMutation) ResetAllianceRank()
ResetAllianceRank reset all changes of the alliance_rank field.
func (*UserMutation) ResetCities ¶
func (m *UserMutation) ResetCities()
ResetCities reset all changes of the cities edge.
func (*UserMutation) ResetDarkwood ¶
func (m *UserMutation) ResetDarkwood()
ResetDarkwood reset all changes of the darkwood field.
func (*UserMutation) ResetDiamonds ¶
func (m *UserMutation) ResetDiamonds()
ResetDiamonds reset all changes of the diamonds field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail reset all changes of the email field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetGold ¶
func (m *UserMutation) ResetGold()
ResetGold reset all changes of the gold field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName reset all changes of the name field.
func (*UserMutation) ResetPasswordHash ¶
func (m *UserMutation) ResetPasswordHash()
ResetPasswordHash reset all changes of the password_hash field.
func (*UserMutation) ResetRank ¶
func (m *UserMutation) ResetRank()
ResetRank reset all changes of the rank field.
func (*UserMutation) ResetRunestone ¶
func (m *UserMutation) ResetRunestone()
ResetRunestone reset all changes of the runestone field.
func (*UserMutation) ResetTrueseed ¶
func (m *UserMutation) ResetTrueseed()
ResetTrueseed reset all changes of the trueseed field.
func (*UserMutation) ResetVeritium ¶
func (m *UserMutation) ResetVeritium()
ResetVeritium reset all changes of the veritium field.
func (*UserMutation) Runestone ¶
func (m *UserMutation) Runestone() (r int, exists bool)
Runestone returns the runestone value in the mutation.
func (*UserMutation) SetAllianceRank ¶
func (m *UserMutation) SetAllianceRank(i int)
SetAllianceRank sets the alliance_rank field.
func (*UserMutation) SetDarkwood ¶
func (m *UserMutation) SetDarkwood(i int)
SetDarkwood sets the darkwood field.
func (*UserMutation) SetDiamonds ¶
func (m *UserMutation) SetDiamonds(i int)
SetDiamonds sets the diamonds field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the email field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the name field.
func (*UserMutation) SetPasswordHash ¶
func (m *UserMutation) SetPasswordHash(s string)
SetPasswordHash sets the password_hash field.
func (*UserMutation) SetRunestone ¶
func (m *UserMutation) SetRunestone(i int)
SetRunestone sets the runestone field.
func (*UserMutation) SetTrueseed ¶
func (m *UserMutation) SetTrueseed(i int)
SetTrueseed sets the trueseed field.
func (*UserMutation) SetVeritium ¶
func (m *UserMutation) SetVeritium(i int)
SetVeritium sets the veritium field.
func (*UserMutation) Trueseed ¶
func (m *UserMutation) Trueseed() (r int, exists bool)
Trueseed returns the trueseed value 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) Veritium ¶
func (m *UserMutation) Veritium() (r int, exists bool)
Veritium returns the veritium value in the mutation.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the query 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 in the query. Returns *NotFoundError when no user was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User id in the query. Returns *NotFoundError when no id was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy 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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns the only User entity in the query, returns an error if not exactly one entity was returned.
func (*UserQuery) OnlyID ¶
OnlyID returns the only User id in the query, returns an error if not exactly one id was returned.
func (*UserQuery) QueryCities ¶
QueryCities chains the current query on the cities edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
Select one or more fields from the given query.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.User.Query(). Select(user.FieldName). Scan(ctx, &v)
func (*UserQuery) WithCities ¶
WithCities tells the query-builder to eager-loads the nodes that are connected to
the "cities" edge. The optional arguments used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct {
// contains filtered or unexported fields
}
UserSelect is the builder for select fields of User entities.
func (*UserSelect) Bools ¶
func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*UserSelect) BoolsX ¶
func (us *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSelect) Float64s ¶
func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶
func (us *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Ints ¶
func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*UserSelect) IntsX ¶
func (us *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*UserSelect) ScanX ¶
func (us *UserSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddAllianceRank ¶
func (uu *UserUpdate) AddAllianceRank(i int) *UserUpdate
AddAllianceRank adds i to alliance_rank.
func (*UserUpdate) AddCities ¶
func (uu *UserUpdate) AddCities(c ...*City) *UserUpdate
AddCities adds the cities edges to City.
func (*UserUpdate) AddCityIDs ¶
func (uu *UserUpdate) AddCityIDs(ids ...int) *UserUpdate
AddCityIDs adds the cities edge to City by ids.
func (*UserUpdate) AddDarkwood ¶
func (uu *UserUpdate) AddDarkwood(i int) *UserUpdate
AddDarkwood adds i to darkwood.
func (*UserUpdate) AddDiamonds ¶
func (uu *UserUpdate) AddDiamonds(i int) *UserUpdate
AddDiamonds adds i to diamonds.
func (*UserUpdate) AddGold ¶
func (uu *UserUpdate) AddGold(i int) *UserUpdate
AddGold adds i to gold.
func (*UserUpdate) AddRank ¶
func (uu *UserUpdate) AddRank(i int) *UserUpdate
AddRank adds i to rank.
func (*UserUpdate) AddRunestone ¶
func (uu *UserUpdate) AddRunestone(i int) *UserUpdate
AddRunestone adds i to runestone.
func (*UserUpdate) AddTrueseed ¶
func (uu *UserUpdate) AddTrueseed(i int) *UserUpdate
AddTrueseed adds i to trueseed.
func (*UserUpdate) AddVeritium ¶
func (uu *UserUpdate) AddVeritium(i int) *UserUpdate
AddVeritium adds i to veritium.
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) RemoveCities ¶
func (uu *UserUpdate) RemoveCities(c ...*City) *UserUpdate
RemoveCities removes cities edges to City.
func (*UserUpdate) RemoveCityIDs ¶
func (uu *UserUpdate) RemoveCityIDs(ids ...int) *UserUpdate
RemoveCityIDs removes the cities edge to City by ids.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAllianceRank ¶
func (uu *UserUpdate) SetAllianceRank(i int) *UserUpdate
SetAllianceRank sets the alliance_rank field.
func (*UserUpdate) SetDarkwood ¶
func (uu *UserUpdate) SetDarkwood(i int) *UserUpdate
SetDarkwood sets the darkwood field.
func (*UserUpdate) SetDiamonds ¶
func (uu *UserUpdate) SetDiamonds(i int) *UserUpdate
SetDiamonds sets the diamonds field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the email field.
func (*UserUpdate) SetGold ¶
func (uu *UserUpdate) SetGold(i int) *UserUpdate
SetGold sets the gold field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the name field.
func (*UserUpdate) SetNillableAllianceRank ¶
func (uu *UserUpdate) SetNillableAllianceRank(i *int) *UserUpdate
SetNillableAllianceRank sets the alliance_rank field if the given value is not nil.
func (*UserUpdate) SetNillableDarkwood ¶
func (uu *UserUpdate) SetNillableDarkwood(i *int) *UserUpdate
SetNillableDarkwood sets the darkwood field if the given value is not nil.
func (*UserUpdate) SetNillableDiamonds ¶
func (uu *UserUpdate) SetNillableDiamonds(i *int) *UserUpdate
SetNillableDiamonds sets the diamonds field if the given value is not nil.
func (*UserUpdate) SetNillableGold ¶
func (uu *UserUpdate) SetNillableGold(i *int) *UserUpdate
SetNillableGold sets the gold field if the given value is not nil.
func (*UserUpdate) SetNillableRank ¶
func (uu *UserUpdate) SetNillableRank(i *int) *UserUpdate
SetNillableRank sets the rank field if the given value is not nil.
func (*UserUpdate) SetNillableRunestone ¶
func (uu *UserUpdate) SetNillableRunestone(i *int) *UserUpdate
SetNillableRunestone sets the runestone field if the given value is not nil.
func (*UserUpdate) SetNillableTrueseed ¶
func (uu *UserUpdate) SetNillableTrueseed(i *int) *UserUpdate
SetNillableTrueseed sets the trueseed field if the given value is not nil.
func (*UserUpdate) SetNillableVeritium ¶
func (uu *UserUpdate) SetNillableVeritium(i *int) *UserUpdate
SetNillableVeritium sets the veritium field if the given value is not nil.
func (*UserUpdate) SetPasswordHash ¶
func (uu *UserUpdate) SetPasswordHash(s string) *UserUpdate
SetPasswordHash sets the password_hash field.
func (*UserUpdate) SetRank ¶
func (uu *UserUpdate) SetRank(i int) *UserUpdate
SetRank sets the rank field.
func (*UserUpdate) SetRunestone ¶
func (uu *UserUpdate) SetRunestone(i int) *UserUpdate
SetRunestone sets the runestone field.
func (*UserUpdate) SetTrueseed ¶
func (uu *UserUpdate) SetTrueseed(i int) *UserUpdate
SetTrueseed sets the trueseed field.
func (*UserUpdate) SetVeritium ¶
func (uu *UserUpdate) SetVeritium(i int) *UserUpdate
SetVeritium sets the veritium field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where adds a new predicate for the builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddAllianceRank ¶
func (uuo *UserUpdateOne) AddAllianceRank(i int) *UserUpdateOne
AddAllianceRank adds i to alliance_rank.
func (*UserUpdateOne) AddCities ¶
func (uuo *UserUpdateOne) AddCities(c ...*City) *UserUpdateOne
AddCities adds the cities edges to City.
func (*UserUpdateOne) AddCityIDs ¶
func (uuo *UserUpdateOne) AddCityIDs(ids ...int) *UserUpdateOne
AddCityIDs adds the cities edge to City by ids.
func (*UserUpdateOne) AddDarkwood ¶
func (uuo *UserUpdateOne) AddDarkwood(i int) *UserUpdateOne
AddDarkwood adds i to darkwood.
func (*UserUpdateOne) AddDiamonds ¶
func (uuo *UserUpdateOne) AddDiamonds(i int) *UserUpdateOne
AddDiamonds adds i to diamonds.
func (*UserUpdateOne) AddGold ¶
func (uuo *UserUpdateOne) AddGold(i int) *UserUpdateOne
AddGold adds i to gold.
func (*UserUpdateOne) AddRank ¶
func (uuo *UserUpdateOne) AddRank(i int) *UserUpdateOne
AddRank adds i to rank.
func (*UserUpdateOne) AddRunestone ¶
func (uuo *UserUpdateOne) AddRunestone(i int) *UserUpdateOne
AddRunestone adds i to runestone.
func (*UserUpdateOne) AddTrueseed ¶
func (uuo *UserUpdateOne) AddTrueseed(i int) *UserUpdateOne
AddTrueseed adds i to trueseed.
func (*UserUpdateOne) AddVeritium ¶
func (uuo *UserUpdateOne) AddVeritium(i int) *UserUpdateOne
AddVeritium adds i to veritium.
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) RemoveCities ¶
func (uuo *UserUpdateOne) RemoveCities(c ...*City) *UserUpdateOne
RemoveCities removes cities edges to City.
func (*UserUpdateOne) RemoveCityIDs ¶
func (uuo *UserUpdateOne) RemoveCityIDs(ids ...int) *UserUpdateOne
RemoveCityIDs removes the cities edge to City by ids.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) SetAllianceRank ¶
func (uuo *UserUpdateOne) SetAllianceRank(i int) *UserUpdateOne
SetAllianceRank sets the alliance_rank field.
func (*UserUpdateOne) SetDarkwood ¶
func (uuo *UserUpdateOne) SetDarkwood(i int) *UserUpdateOne
SetDarkwood sets the darkwood field.
func (*UserUpdateOne) SetDiamonds ¶
func (uuo *UserUpdateOne) SetDiamonds(i int) *UserUpdateOne
SetDiamonds sets the diamonds field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the email field.
func (*UserUpdateOne) SetGold ¶
func (uuo *UserUpdateOne) SetGold(i int) *UserUpdateOne
SetGold sets the gold field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the name field.
func (*UserUpdateOne) SetNillableAllianceRank ¶
func (uuo *UserUpdateOne) SetNillableAllianceRank(i *int) *UserUpdateOne
SetNillableAllianceRank sets the alliance_rank field if the given value is not nil.
func (*UserUpdateOne) SetNillableDarkwood ¶
func (uuo *UserUpdateOne) SetNillableDarkwood(i *int) *UserUpdateOne
SetNillableDarkwood sets the darkwood field if the given value is not nil.
func (*UserUpdateOne) SetNillableDiamonds ¶
func (uuo *UserUpdateOne) SetNillableDiamonds(i *int) *UserUpdateOne
SetNillableDiamonds sets the diamonds field if the given value is not nil.
func (*UserUpdateOne) SetNillableGold ¶
func (uuo *UserUpdateOne) SetNillableGold(i *int) *UserUpdateOne
SetNillableGold sets the gold field if the given value is not nil.
func (*UserUpdateOne) SetNillableRank ¶
func (uuo *UserUpdateOne) SetNillableRank(i *int) *UserUpdateOne
SetNillableRank sets the rank field if the given value is not nil.
func (*UserUpdateOne) SetNillableRunestone ¶
func (uuo *UserUpdateOne) SetNillableRunestone(i *int) *UserUpdateOne
SetNillableRunestone sets the runestone field if the given value is not nil.
func (*UserUpdateOne) SetNillableTrueseed ¶
func (uuo *UserUpdateOne) SetNillableTrueseed(i *int) *UserUpdateOne
SetNillableTrueseed sets the trueseed field if the given value is not nil.
func (*UserUpdateOne) SetNillableVeritium ¶
func (uuo *UserUpdateOne) SetNillableVeritium(i *int) *UserUpdateOne
SetNillableVeritium sets the veritium field if the given value is not nil.
func (*UserUpdateOne) SetPasswordHash ¶
func (uuo *UserUpdateOne) SetPasswordHash(s string) *UserUpdateOne
SetPasswordHash sets the password_hash field.
func (*UserUpdateOne) SetRank ¶
func (uuo *UserUpdateOne) SetRank(i int) *UserUpdateOne
SetRank sets the rank field.
func (*UserUpdateOne) SetRunestone ¶
func (uuo *UserUpdateOne) SetRunestone(i int) *UserUpdateOne
SetRunestone sets the runestone field.
func (*UserUpdateOne) SetTrueseed ¶
func (uuo *UserUpdateOne) SetTrueseed(i int) *UserUpdateOne
SetTrueseed sets the trueseed field.
func (*UserUpdateOne) SetVeritium ¶
func (uuo *UserUpdateOne) SetVeritium(i int) *UserUpdateOne
SetVeritium sets the veritium field.
Source Files ¶
- city.go
- city_create.go
- city_delete.go
- city_query.go
- city_update.go
- client.go
- config.go
- construction.go
- construction_create.go
- construction_delete.go
- construction_query.go
- construction_update.go
- context.go
- ent.go
- generate.go
- mutation.go
- queue.go
- queue_create.go
- queue_delete.go
- queue_query.go
- queue_update.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go