Documentation ¶
Index ¶
- Constants
- Variables
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type Activation
- func (a *Activation) Actor(ctx context.Context) ([]*User, error)
- func (a *Activation) Node(ctx context.Context) (node *Node, err error)
- func (a *Activation) QueryActor() *UserQuery
- func (a *Activation) QueryUser() *UserQuery
- func (a *Activation) String() string
- func (a *Activation) ToEdge(order *ActivationOrder) *ActivationEdge
- func (a *Activation) Unwrap() *Activation
- func (a *Activation) Update() *ActivationUpdateOne
- func (a *Activation) User(ctx context.Context) ([]*User, error)
- type ActivationClient
- func (c *ActivationClient) Create() *ActivationCreate
- func (c *ActivationClient) CreateBulk(builders ...*ActivationCreate) *ActivationCreateBulk
- func (c *ActivationClient) Delete() *ActivationDelete
- func (c *ActivationClient) DeleteOne(a *Activation) *ActivationDeleteOne
- func (c *ActivationClient) DeleteOneID(id int) *ActivationDeleteOne
- func (c *ActivationClient) Get(ctx context.Context, id int) (*Activation, error)
- func (c *ActivationClient) GetX(ctx context.Context, id int) *Activation
- func (c *ActivationClient) Hooks() []Hook
- func (c *ActivationClient) Query() *ActivationQuery
- func (c *ActivationClient) QueryActor(a *Activation) *UserQuery
- func (c *ActivationClient) QueryUser(a *Activation) *UserQuery
- func (c *ActivationClient) Update() *ActivationUpdate
- func (c *ActivationClient) UpdateOne(a *Activation) *ActivationUpdateOne
- func (c *ActivationClient) UpdateOneID(id int) *ActivationUpdateOne
- func (c *ActivationClient) Use(hooks ...Hook)
- type ActivationConnection
- type ActivationCreate
- func (ac *ActivationCreate) AddActor(u ...*User) *ActivationCreate
- func (ac *ActivationCreate) AddActorIDs(ids ...int) *ActivationCreate
- func (ac *ActivationCreate) AddUser(u ...*User) *ActivationCreate
- func (ac *ActivationCreate) AddUserIDs(ids ...int) *ActivationCreate
- func (ac *ActivationCreate) Mutation() *ActivationMutation
- func (ac *ActivationCreate) Save(ctx context.Context) (*Activation, error)
- func (ac *ActivationCreate) SaveX(ctx context.Context) *Activation
- func (ac *ActivationCreate) SetComments(s string) *ActivationCreate
- func (ac *ActivationCreate) SetCreatedAt(t time.Time) *ActivationCreate
- func (ac *ActivationCreate) SetInternalComments(s string) *ActivationCreate
- func (ac *ActivationCreate) SetNillableComments(s *string) *ActivationCreate
- func (ac *ActivationCreate) SetNillableCreatedAt(t *time.Time) *ActivationCreate
- func (ac *ActivationCreate) SetNillableInternalComments(s *string) *ActivationCreate
- func (ac *ActivationCreate) SetNillableUpdatedAt(t *time.Time) *ActivationCreate
- func (ac *ActivationCreate) SetUpdatedAt(t time.Time) *ActivationCreate
- type ActivationCreateBulk
- type ActivationDelete
- type ActivationDeleteOne
- type ActivationEdge
- type ActivationEdges
- type ActivationGroupBy
- func (agb *ActivationGroupBy) Aggregate(fns ...AggregateFunc) *ActivationGroupBy
- func (agb *ActivationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (agb *ActivationGroupBy) BoolX(ctx context.Context) bool
- func (agb *ActivationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (agb *ActivationGroupBy) BoolsX(ctx context.Context) []bool
- func (agb *ActivationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (agb *ActivationGroupBy) Float64X(ctx context.Context) float64
- func (agb *ActivationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (agb *ActivationGroupBy) Float64sX(ctx context.Context) []float64
- func (agb *ActivationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (agb *ActivationGroupBy) IntX(ctx context.Context) int
- func (agb *ActivationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (agb *ActivationGroupBy) IntsX(ctx context.Context) []int
- func (agb *ActivationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (agb *ActivationGroupBy) ScanX(ctx context.Context, v interface{})
- func (agb *ActivationGroupBy) String(ctx context.Context) (_ string, err error)
- func (agb *ActivationGroupBy) StringX(ctx context.Context) string
- func (agb *ActivationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (agb *ActivationGroupBy) StringsX(ctx context.Context) []string
- type ActivationMutation
- func (m *ActivationMutation) ActorCleared() bool
- func (m *ActivationMutation) ActorIDs() (ids []int)
- func (m *ActivationMutation) AddActorIDs(ids ...int)
- func (m *ActivationMutation) AddField(name string, value ent.Value) error
- func (m *ActivationMutation) AddUserIDs(ids ...int)
- func (m *ActivationMutation) AddedEdges() []string
- func (m *ActivationMutation) AddedField(name string) (ent.Value, bool)
- func (m *ActivationMutation) AddedFields() []string
- func (m *ActivationMutation) AddedIDs(name string) []ent.Value
- func (m *ActivationMutation) ClearActor()
- func (m *ActivationMutation) ClearComments()
- func (m *ActivationMutation) ClearEdge(name string) error
- func (m *ActivationMutation) ClearField(name string) error
- func (m *ActivationMutation) ClearInternalComments()
- func (m *ActivationMutation) ClearUser()
- func (m *ActivationMutation) ClearedEdges() []string
- func (m *ActivationMutation) ClearedFields() []string
- func (m ActivationMutation) Client() *Client
- func (m *ActivationMutation) Comments() (r string, exists bool)
- func (m *ActivationMutation) CommentsCleared() bool
- func (m *ActivationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ActivationMutation) EdgeCleared(name string) bool
- func (m *ActivationMutation) Field(name string) (ent.Value, bool)
- func (m *ActivationMutation) FieldCleared(name string) bool
- func (m *ActivationMutation) Fields() []string
- func (m *ActivationMutation) ID() (id int, exists bool)
- func (m *ActivationMutation) InternalComments() (r string, exists bool)
- func (m *ActivationMutation) InternalCommentsCleared() bool
- func (m *ActivationMutation) OldComments(ctx context.Context) (v *string, err error)
- func (m *ActivationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ActivationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ActivationMutation) OldInternalComments(ctx context.Context) (v *string, err error)
- func (m *ActivationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ActivationMutation) Op() Op
- func (m *ActivationMutation) RemoveActorIDs(ids ...int)
- func (m *ActivationMutation) RemoveUserIDs(ids ...int)
- func (m *ActivationMutation) RemovedActorIDs() (ids []int)
- func (m *ActivationMutation) RemovedEdges() []string
- func (m *ActivationMutation) RemovedIDs(name string) []ent.Value
- func (m *ActivationMutation) RemovedUserIDs() (ids []int)
- func (m *ActivationMutation) ResetActor()
- func (m *ActivationMutation) ResetComments()
- func (m *ActivationMutation) ResetCreatedAt()
- func (m *ActivationMutation) ResetEdge(name string) error
- func (m *ActivationMutation) ResetField(name string) error
- func (m *ActivationMutation) ResetInternalComments()
- func (m *ActivationMutation) ResetUpdatedAt()
- func (m *ActivationMutation) ResetUser()
- func (m *ActivationMutation) SetComments(s string)
- func (m *ActivationMutation) SetCreatedAt(t time.Time)
- func (m *ActivationMutation) SetField(name string, value ent.Value) error
- func (m *ActivationMutation) SetInternalComments(s string)
- func (m *ActivationMutation) SetUpdatedAt(t time.Time)
- func (m ActivationMutation) Tx() (*Tx, error)
- func (m *ActivationMutation) Type() string
- func (m *ActivationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ActivationMutation) UserCleared() bool
- func (m *ActivationMutation) UserIDs() (ids []int)
- type ActivationOrder
- type ActivationOrderField
- type ActivationPaginateOption
- type ActivationQuery
- func (aq *ActivationQuery) All(ctx context.Context) ([]*Activation, error)
- func (aq *ActivationQuery) AllX(ctx context.Context) []*Activation
- func (aq *ActivationQuery) Clone() *ActivationQuery
- func (a *ActivationQuery) CollectFields(ctx context.Context, satisfies ...string) *ActivationQuery
- func (aq *ActivationQuery) Count(ctx context.Context) (int, error)
- func (aq *ActivationQuery) CountX(ctx context.Context) int
- func (aq *ActivationQuery) Exist(ctx context.Context) (bool, error)
- func (aq *ActivationQuery) ExistX(ctx context.Context) bool
- func (aq *ActivationQuery) First(ctx context.Context) (*Activation, error)
- func (aq *ActivationQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *ActivationQuery) FirstIDX(ctx context.Context) int
- func (aq *ActivationQuery) FirstX(ctx context.Context) *Activation
- func (aq *ActivationQuery) GroupBy(field string, fields ...string) *ActivationGroupBy
- func (aq *ActivationQuery) IDs(ctx context.Context) ([]int, error)
- func (aq *ActivationQuery) IDsX(ctx context.Context) []int
- func (aq *ActivationQuery) Limit(limit int) *ActivationQuery
- func (aq *ActivationQuery) Offset(offset int) *ActivationQuery
- func (aq *ActivationQuery) Only(ctx context.Context) (*Activation, error)
- func (aq *ActivationQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *ActivationQuery) OnlyIDX(ctx context.Context) int
- func (aq *ActivationQuery) OnlyX(ctx context.Context) *Activation
- func (aq *ActivationQuery) Order(o ...OrderFunc) *ActivationQuery
- func (a *ActivationQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*ActivationConnection, error)
- func (aq *ActivationQuery) QueryActor() *UserQuery
- func (aq *ActivationQuery) QueryUser() *UserQuery
- func (aq *ActivationQuery) Select(field string, fields ...string) *ActivationSelect
- func (aq *ActivationQuery) Where(ps ...predicate.Activation) *ActivationQuery
- func (aq *ActivationQuery) WithActor(opts ...func(*UserQuery)) *ActivationQuery
- func (aq *ActivationQuery) WithUser(opts ...func(*UserQuery)) *ActivationQuery
- type ActivationSelect
- func (as *ActivationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (as *ActivationSelect) BoolX(ctx context.Context) bool
- func (as *ActivationSelect) Bools(ctx context.Context) ([]bool, error)
- func (as *ActivationSelect) BoolsX(ctx context.Context) []bool
- func (as *ActivationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (as *ActivationSelect) Float64X(ctx context.Context) float64
- func (as *ActivationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (as *ActivationSelect) Float64sX(ctx context.Context) []float64
- func (as *ActivationSelect) Int(ctx context.Context) (_ int, err error)
- func (as *ActivationSelect) IntX(ctx context.Context) int
- func (as *ActivationSelect) Ints(ctx context.Context) ([]int, error)
- func (as *ActivationSelect) IntsX(ctx context.Context) []int
- func (as *ActivationSelect) Scan(ctx context.Context, v interface{}) error
- func (as *ActivationSelect) ScanX(ctx context.Context, v interface{})
- func (as *ActivationSelect) String(ctx context.Context) (_ string, err error)
- func (as *ActivationSelect) StringX(ctx context.Context) string
- func (as *ActivationSelect) Strings(ctx context.Context) ([]string, error)
- func (as *ActivationSelect) StringsX(ctx context.Context) []string
- type ActivationUpdate
- func (au *ActivationUpdate) AddActor(u ...*User) *ActivationUpdate
- func (au *ActivationUpdate) AddActorIDs(ids ...int) *ActivationUpdate
- func (au *ActivationUpdate) AddUser(u ...*User) *ActivationUpdate
- func (au *ActivationUpdate) AddUserIDs(ids ...int) *ActivationUpdate
- func (au *ActivationUpdate) ClearActor() *ActivationUpdate
- func (au *ActivationUpdate) ClearComments() *ActivationUpdate
- func (au *ActivationUpdate) ClearInternalComments() *ActivationUpdate
- func (au *ActivationUpdate) ClearUser() *ActivationUpdate
- func (au *ActivationUpdate) Exec(ctx context.Context) error
- func (au *ActivationUpdate) ExecX(ctx context.Context)
- func (au *ActivationUpdate) Mutation() *ActivationMutation
- func (au *ActivationUpdate) RemoveActor(u ...*User) *ActivationUpdate
- func (au *ActivationUpdate) RemoveActorIDs(ids ...int) *ActivationUpdate
- func (au *ActivationUpdate) RemoveUser(u ...*User) *ActivationUpdate
- func (au *ActivationUpdate) RemoveUserIDs(ids ...int) *ActivationUpdate
- func (au *ActivationUpdate) Save(ctx context.Context) (int, error)
- func (au *ActivationUpdate) SaveX(ctx context.Context) int
- func (au *ActivationUpdate) SetComments(s string) *ActivationUpdate
- func (au *ActivationUpdate) SetInternalComments(s string) *ActivationUpdate
- func (au *ActivationUpdate) SetNillableComments(s *string) *ActivationUpdate
- func (au *ActivationUpdate) SetNillableInternalComments(s *string) *ActivationUpdate
- func (au *ActivationUpdate) SetUpdatedAt(t time.Time) *ActivationUpdate
- func (au *ActivationUpdate) Where(ps ...predicate.Activation) *ActivationUpdate
- type ActivationUpdateOne
- func (auo *ActivationUpdateOne) AddActor(u ...*User) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) AddActorIDs(ids ...int) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) AddUser(u ...*User) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) AddUserIDs(ids ...int) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) ClearActor() *ActivationUpdateOne
- func (auo *ActivationUpdateOne) ClearComments() *ActivationUpdateOne
- func (auo *ActivationUpdateOne) ClearInternalComments() *ActivationUpdateOne
- func (auo *ActivationUpdateOne) ClearUser() *ActivationUpdateOne
- func (auo *ActivationUpdateOne) Exec(ctx context.Context) error
- func (auo *ActivationUpdateOne) ExecX(ctx context.Context)
- func (auo *ActivationUpdateOne) Mutation() *ActivationMutation
- func (auo *ActivationUpdateOne) RemoveActor(u ...*User) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) RemoveActorIDs(ids ...int) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) RemoveUser(u ...*User) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) RemoveUserIDs(ids ...int) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) Save(ctx context.Context) (*Activation, error)
- func (auo *ActivationUpdateOne) SaveX(ctx context.Context) *Activation
- func (auo *ActivationUpdateOne) SetComments(s string) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) SetInternalComments(s string) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) SetNillableComments(s *string) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) SetNillableInternalComments(s *string) *ActivationUpdateOne
- func (auo *ActivationUpdateOne) SetUpdatedAt(t time.Time) *ActivationUpdateOne
- type Activations
- type AggregateFunc
- type AuthSession
- type AuthSessionClient
- func (c *AuthSessionClient) Create() *AuthSessionCreate
- func (c *AuthSessionClient) CreateBulk(builders ...*AuthSessionCreate) *AuthSessionCreateBulk
- func (c *AuthSessionClient) Delete() *AuthSessionDelete
- func (c *AuthSessionClient) DeleteOne(as *AuthSession) *AuthSessionDeleteOne
- func (c *AuthSessionClient) DeleteOneID(id int) *AuthSessionDeleteOne
- func (c *AuthSessionClient) Get(ctx context.Context, id int) (*AuthSession, error)
- func (c *AuthSessionClient) GetX(ctx context.Context, id int) *AuthSession
- func (c *AuthSessionClient) Hooks() []Hook
- func (c *AuthSessionClient) Query() *AuthSessionQuery
- func (c *AuthSessionClient) Update() *AuthSessionUpdate
- func (c *AuthSessionClient) UpdateOne(as *AuthSession) *AuthSessionUpdateOne
- func (c *AuthSessionClient) UpdateOneID(id int) *AuthSessionUpdateOne
- func (c *AuthSessionClient) Use(hooks ...Hook)
- type AuthSessionConnection
- type AuthSessionCreate
- type AuthSessionCreateBulk
- type AuthSessionDelete
- type AuthSessionDeleteOne
- type AuthSessionEdge
- type AuthSessionGroupBy
- func (asgb *AuthSessionGroupBy) Aggregate(fns ...AggregateFunc) *AuthSessionGroupBy
- func (asgb *AuthSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (asgb *AuthSessionGroupBy) BoolX(ctx context.Context) bool
- func (asgb *AuthSessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (asgb *AuthSessionGroupBy) BoolsX(ctx context.Context) []bool
- func (asgb *AuthSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (asgb *AuthSessionGroupBy) Float64X(ctx context.Context) float64
- func (asgb *AuthSessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (asgb *AuthSessionGroupBy) Float64sX(ctx context.Context) []float64
- func (asgb *AuthSessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (asgb *AuthSessionGroupBy) IntX(ctx context.Context) int
- func (asgb *AuthSessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (asgb *AuthSessionGroupBy) IntsX(ctx context.Context) []int
- func (asgb *AuthSessionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (asgb *AuthSessionGroupBy) ScanX(ctx context.Context, v interface{})
- func (asgb *AuthSessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (asgb *AuthSessionGroupBy) StringX(ctx context.Context) string
- func (asgb *AuthSessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (asgb *AuthSessionGroupBy) StringsX(ctx context.Context) []string
- type AuthSessionMutation
- func (m *AuthSessionMutation) AddField(name string, value ent.Value) error
- func (m *AuthSessionMutation) AddedEdges() []string
- func (m *AuthSessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *AuthSessionMutation) AddedFields() []string
- func (m *AuthSessionMutation) AddedIDs(name string) []ent.Value
- func (m *AuthSessionMutation) ClearEdge(name string) error
- func (m *AuthSessionMutation) ClearField(name string) error
- func (m *AuthSessionMutation) ClearedEdges() []string
- func (m *AuthSessionMutation) ClearedFields() []string
- func (m AuthSessionMutation) Client() *Client
- func (m *AuthSessionMutation) EdgeCleared(name string) bool
- func (m *AuthSessionMutation) Field(name string) (ent.Value, bool)
- func (m *AuthSessionMutation) FieldCleared(name string) bool
- func (m *AuthSessionMutation) Fields() []string
- func (m *AuthSessionMutation) ID() (id int, exists bool)
- func (m *AuthSessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AuthSessionMutation) Op() Op
- func (m *AuthSessionMutation) RemovedEdges() []string
- func (m *AuthSessionMutation) RemovedIDs(name string) []ent.Value
- func (m *AuthSessionMutation) ResetEdge(name string) error
- func (m *AuthSessionMutation) ResetField(name string) error
- func (m *AuthSessionMutation) SetField(name string, value ent.Value) error
- func (m AuthSessionMutation) Tx() (*Tx, error)
- func (m *AuthSessionMutation) Type() string
- type AuthSessionOrder
- type AuthSessionOrderField
- type AuthSessionPaginateOption
- type AuthSessionQuery
- func (asq *AuthSessionQuery) All(ctx context.Context) ([]*AuthSession, error)
- func (asq *AuthSessionQuery) AllX(ctx context.Context) []*AuthSession
- func (asq *AuthSessionQuery) Clone() *AuthSessionQuery
- func (as *AuthSessionQuery) CollectFields(ctx context.Context, satisfies ...string) *AuthSessionQuery
- func (asq *AuthSessionQuery) Count(ctx context.Context) (int, error)
- func (asq *AuthSessionQuery) CountX(ctx context.Context) int
- func (asq *AuthSessionQuery) Exist(ctx context.Context) (bool, error)
- func (asq *AuthSessionQuery) ExistX(ctx context.Context) bool
- func (asq *AuthSessionQuery) First(ctx context.Context) (*AuthSession, error)
- func (asq *AuthSessionQuery) FirstID(ctx context.Context) (id int, err error)
- func (asq *AuthSessionQuery) FirstIDX(ctx context.Context) int
- func (asq *AuthSessionQuery) FirstX(ctx context.Context) *AuthSession
- func (asq *AuthSessionQuery) GroupBy(field string, fields ...string) *AuthSessionGroupBy
- func (asq *AuthSessionQuery) IDs(ctx context.Context) ([]int, error)
- func (asq *AuthSessionQuery) IDsX(ctx context.Context) []int
- func (asq *AuthSessionQuery) Limit(limit int) *AuthSessionQuery
- func (asq *AuthSessionQuery) Offset(offset int) *AuthSessionQuery
- func (asq *AuthSessionQuery) Only(ctx context.Context) (*AuthSession, error)
- func (asq *AuthSessionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (asq *AuthSessionQuery) OnlyIDX(ctx context.Context) int
- func (asq *AuthSessionQuery) OnlyX(ctx context.Context) *AuthSession
- func (asq *AuthSessionQuery) Order(o ...OrderFunc) *AuthSessionQuery
- func (as *AuthSessionQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*AuthSessionConnection, error)
- func (asq *AuthSessionQuery) Select(field string, fields ...string) *AuthSessionSelect
- func (asq *AuthSessionQuery) Where(ps ...predicate.AuthSession) *AuthSessionQuery
- type AuthSessionSelect
- func (ass *AuthSessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ass *AuthSessionSelect) BoolX(ctx context.Context) bool
- func (ass *AuthSessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (ass *AuthSessionSelect) BoolsX(ctx context.Context) []bool
- func (ass *AuthSessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ass *AuthSessionSelect) Float64X(ctx context.Context) float64
- func (ass *AuthSessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ass *AuthSessionSelect) Float64sX(ctx context.Context) []float64
- func (ass *AuthSessionSelect) Int(ctx context.Context) (_ int, err error)
- func (ass *AuthSessionSelect) IntX(ctx context.Context) int
- func (ass *AuthSessionSelect) Ints(ctx context.Context) ([]int, error)
- func (ass *AuthSessionSelect) IntsX(ctx context.Context) []int
- func (ass *AuthSessionSelect) Scan(ctx context.Context, v interface{}) error
- func (ass *AuthSessionSelect) ScanX(ctx context.Context, v interface{})
- func (ass *AuthSessionSelect) String(ctx context.Context) (_ string, err error)
- func (ass *AuthSessionSelect) StringX(ctx context.Context) string
- func (ass *AuthSessionSelect) Strings(ctx context.Context) ([]string, error)
- func (ass *AuthSessionSelect) StringsX(ctx context.Context) []string
- type AuthSessionUpdate
- func (asu *AuthSessionUpdate) Exec(ctx context.Context) error
- func (asu *AuthSessionUpdate) ExecX(ctx context.Context)
- func (asu *AuthSessionUpdate) Mutation() *AuthSessionMutation
- func (asu *AuthSessionUpdate) Save(ctx context.Context) (int, error)
- func (asu *AuthSessionUpdate) SaveX(ctx context.Context) int
- func (asu *AuthSessionUpdate) Where(ps ...predicate.AuthSession) *AuthSessionUpdate
- type AuthSessionUpdateOne
- func (asuo *AuthSessionUpdateOne) Exec(ctx context.Context) error
- func (asuo *AuthSessionUpdateOne) ExecX(ctx context.Context)
- func (asuo *AuthSessionUpdateOne) Mutation() *AuthSessionMutation
- func (asuo *AuthSessionUpdateOne) Save(ctx context.Context) (*AuthSession, error)
- func (asuo *AuthSessionUpdateOne) SaveX(ctx context.Context) *AuthSession
- type AuthSessions
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Node(ctx context.Context, id int) (*Node, error)
- func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Cursor
- type Edge
- type Field
- type Hook
- type MapLayer
- func (ml *MapLayer) MapType(ctx context.Context) (*MapType, error)
- func (ml *MapLayer) Metadata(ctx context.Context) (*Metadata, error)
- func (ml *MapLayer) Node(ctx context.Context) (node *Node, err error)
- func (ml *MapLayer) QueryMapType() *MapTypeQuery
- func (ml *MapLayer) QueryMetadata() *MetadataQuery
- func (ml *MapLayer) String() string
- func (ml *MapLayer) ToEdge(order *MapLayerOrder) *MapLayerEdge
- func (ml *MapLayer) Unwrap() *MapLayer
- func (ml *MapLayer) Update() *MapLayerUpdateOne
- type MapLayerClient
- func (c *MapLayerClient) Create() *MapLayerCreate
- func (c *MapLayerClient) CreateBulk(builders ...*MapLayerCreate) *MapLayerCreateBulk
- func (c *MapLayerClient) Delete() *MapLayerDelete
- func (c *MapLayerClient) DeleteOne(ml *MapLayer) *MapLayerDeleteOne
- func (c *MapLayerClient) DeleteOneID(id int) *MapLayerDeleteOne
- func (c *MapLayerClient) Get(ctx context.Context, id int) (*MapLayer, error)
- func (c *MapLayerClient) GetX(ctx context.Context, id int) *MapLayer
- func (c *MapLayerClient) Hooks() []Hook
- func (c *MapLayerClient) Query() *MapLayerQuery
- func (c *MapLayerClient) QueryMapType(ml *MapLayer) *MapTypeQuery
- func (c *MapLayerClient) QueryMetadata(ml *MapLayer) *MetadataQuery
- func (c *MapLayerClient) Update() *MapLayerUpdate
- func (c *MapLayerClient) UpdateOne(ml *MapLayer) *MapLayerUpdateOne
- func (c *MapLayerClient) UpdateOneID(id int) *MapLayerUpdateOne
- func (c *MapLayerClient) Use(hooks ...Hook)
- type MapLayerConnection
- type MapLayerCreate
- func (mlc *MapLayerCreate) Mutation() *MapLayerMutation
- func (mlc *MapLayerCreate) Save(ctx context.Context) (*MapLayer, error)
- func (mlc *MapLayerCreate) SaveX(ctx context.Context) *MapLayer
- func (mlc *MapLayerCreate) SetCreatedAt(t time.Time) *MapLayerCreate
- func (mlc *MapLayerCreate) SetIsPublic(b bool) *MapLayerCreate
- func (mlc *MapLayerCreate) SetMapType(m *MapType) *MapLayerCreate
- func (mlc *MapLayerCreate) SetMapTypeID(id int) *MapLayerCreate
- func (mlc *MapLayerCreate) SetMetadata(m *Metadata) *MapLayerCreate
- func (mlc *MapLayerCreate) SetMetadataID(id int) *MapLayerCreate
- func (mlc *MapLayerCreate) SetName(s string) *MapLayerCreate
- func (mlc *MapLayerCreate) SetNillableCreatedAt(t *time.Time) *MapLayerCreate
- func (mlc *MapLayerCreate) SetNillableMapTypeID(id *int) *MapLayerCreate
- func (mlc *MapLayerCreate) SetNillableMetadataID(id *int) *MapLayerCreate
- func (mlc *MapLayerCreate) SetNillableUpdatedAt(t *time.Time) *MapLayerCreate
- func (mlc *MapLayerCreate) SetURLTemplate(s string) *MapLayerCreate
- func (mlc *MapLayerCreate) SetUpdatedAt(t time.Time) *MapLayerCreate
- type MapLayerCreateBulk
- type MapLayerDelete
- type MapLayerDeleteOne
- type MapLayerEdge
- type MapLayerEdges
- type MapLayerGroupBy
- func (mlgb *MapLayerGroupBy) Aggregate(fns ...AggregateFunc) *MapLayerGroupBy
- func (mlgb *MapLayerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (mlgb *MapLayerGroupBy) BoolX(ctx context.Context) bool
- func (mlgb *MapLayerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (mlgb *MapLayerGroupBy) BoolsX(ctx context.Context) []bool
- func (mlgb *MapLayerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (mlgb *MapLayerGroupBy) Float64X(ctx context.Context) float64
- func (mlgb *MapLayerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (mlgb *MapLayerGroupBy) Float64sX(ctx context.Context) []float64
- func (mlgb *MapLayerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (mlgb *MapLayerGroupBy) IntX(ctx context.Context) int
- func (mlgb *MapLayerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (mlgb *MapLayerGroupBy) IntsX(ctx context.Context) []int
- func (mlgb *MapLayerGroupBy) Scan(ctx context.Context, v interface{}) error
- func (mlgb *MapLayerGroupBy) ScanX(ctx context.Context, v interface{})
- func (mlgb *MapLayerGroupBy) String(ctx context.Context) (_ string, err error)
- func (mlgb *MapLayerGroupBy) StringX(ctx context.Context) string
- func (mlgb *MapLayerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (mlgb *MapLayerGroupBy) StringsX(ctx context.Context) []string
- type MapLayerMutation
- func (m *MapLayerMutation) AddField(name string, value ent.Value) error
- func (m *MapLayerMutation) AddedEdges() []string
- func (m *MapLayerMutation) AddedField(name string) (ent.Value, bool)
- func (m *MapLayerMutation) AddedFields() []string
- func (m *MapLayerMutation) AddedIDs(name string) []ent.Value
- func (m *MapLayerMutation) ClearEdge(name string) error
- func (m *MapLayerMutation) ClearField(name string) error
- func (m *MapLayerMutation) ClearMapType()
- func (m *MapLayerMutation) ClearMetadata()
- func (m *MapLayerMutation) ClearedEdges() []string
- func (m *MapLayerMutation) ClearedFields() []string
- func (m MapLayerMutation) Client() *Client
- func (m *MapLayerMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MapLayerMutation) EdgeCleared(name string) bool
- func (m *MapLayerMutation) Field(name string) (ent.Value, bool)
- func (m *MapLayerMutation) FieldCleared(name string) bool
- func (m *MapLayerMutation) Fields() []string
- func (m *MapLayerMutation) ID() (id int, exists bool)
- func (m *MapLayerMutation) IsPublic() (r bool, exists bool)
- func (m *MapLayerMutation) MapTypeCleared() bool
- func (m *MapLayerMutation) MapTypeID() (id int, exists bool)
- func (m *MapLayerMutation) MapTypeIDs() (ids []int)
- func (m *MapLayerMutation) MetadataCleared() bool
- func (m *MapLayerMutation) MetadataID() (id int, exists bool)
- func (m *MapLayerMutation) MetadataIDs() (ids []int)
- func (m *MapLayerMutation) Name() (r string, exists bool)
- func (m *MapLayerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MapLayerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MapLayerMutation) OldIsPublic(ctx context.Context) (v bool, err error)
- func (m *MapLayerMutation) OldName(ctx context.Context) (v string, err error)
- func (m *MapLayerMutation) OldURLTemplate(ctx context.Context) (v string, err error)
- func (m *MapLayerMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MapLayerMutation) Op() Op
- func (m *MapLayerMutation) RemovedEdges() []string
- func (m *MapLayerMutation) RemovedIDs(name string) []ent.Value
- func (m *MapLayerMutation) ResetCreatedAt()
- func (m *MapLayerMutation) ResetEdge(name string) error
- func (m *MapLayerMutation) ResetField(name string) error
- func (m *MapLayerMutation) ResetIsPublic()
- func (m *MapLayerMutation) ResetMapType()
- func (m *MapLayerMutation) ResetMetadata()
- func (m *MapLayerMutation) ResetName()
- func (m *MapLayerMutation) ResetURLTemplate()
- func (m *MapLayerMutation) ResetUpdatedAt()
- func (m *MapLayerMutation) SetCreatedAt(t time.Time)
- func (m *MapLayerMutation) SetField(name string, value ent.Value) error
- func (m *MapLayerMutation) SetIsPublic(b bool)
- func (m *MapLayerMutation) SetMapTypeID(id int)
- func (m *MapLayerMutation) SetMetadataID(id int)
- func (m *MapLayerMutation) SetName(s string)
- func (m *MapLayerMutation) SetURLTemplate(s string)
- func (m *MapLayerMutation) SetUpdatedAt(t time.Time)
- func (m MapLayerMutation) Tx() (*Tx, error)
- func (m *MapLayerMutation) Type() string
- func (m *MapLayerMutation) URLTemplate() (r string, exists bool)
- func (m *MapLayerMutation) UpdatedAt() (r time.Time, exists bool)
- type MapLayerOrder
- type MapLayerOrderField
- type MapLayerPaginateOption
- type MapLayerQuery
- func (mlq *MapLayerQuery) All(ctx context.Context) ([]*MapLayer, error)
- func (mlq *MapLayerQuery) AllX(ctx context.Context) []*MapLayer
- func (mlq *MapLayerQuery) Clone() *MapLayerQuery
- func (ml *MapLayerQuery) CollectFields(ctx context.Context, satisfies ...string) *MapLayerQuery
- func (mlq *MapLayerQuery) Count(ctx context.Context) (int, error)
- func (mlq *MapLayerQuery) CountX(ctx context.Context) int
- func (mlq *MapLayerQuery) Exist(ctx context.Context) (bool, error)
- func (mlq *MapLayerQuery) ExistX(ctx context.Context) bool
- func (mlq *MapLayerQuery) First(ctx context.Context) (*MapLayer, error)
- func (mlq *MapLayerQuery) FirstID(ctx context.Context) (id int, err error)
- func (mlq *MapLayerQuery) FirstIDX(ctx context.Context) int
- func (mlq *MapLayerQuery) FirstX(ctx context.Context) *MapLayer
- func (mlq *MapLayerQuery) GroupBy(field string, fields ...string) *MapLayerGroupBy
- func (mlq *MapLayerQuery) IDs(ctx context.Context) ([]int, error)
- func (mlq *MapLayerQuery) IDsX(ctx context.Context) []int
- func (mlq *MapLayerQuery) Limit(limit int) *MapLayerQuery
- func (mlq *MapLayerQuery) Offset(offset int) *MapLayerQuery
- func (mlq *MapLayerQuery) Only(ctx context.Context) (*MapLayer, error)
- func (mlq *MapLayerQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mlq *MapLayerQuery) OnlyIDX(ctx context.Context) int
- func (mlq *MapLayerQuery) OnlyX(ctx context.Context) *MapLayer
- func (mlq *MapLayerQuery) Order(o ...OrderFunc) *MapLayerQuery
- func (ml *MapLayerQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*MapLayerConnection, error)
- func (mlq *MapLayerQuery) QueryMapType() *MapTypeQuery
- func (mlq *MapLayerQuery) QueryMetadata() *MetadataQuery
- func (mlq *MapLayerQuery) Select(field string, fields ...string) *MapLayerSelect
- func (mlq *MapLayerQuery) Where(ps ...predicate.MapLayer) *MapLayerQuery
- func (mlq *MapLayerQuery) WithMapType(opts ...func(*MapTypeQuery)) *MapLayerQuery
- func (mlq *MapLayerQuery) WithMetadata(opts ...func(*MetadataQuery)) *MapLayerQuery
- type MapLayerSelect
- func (mls *MapLayerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (mls *MapLayerSelect) BoolX(ctx context.Context) bool
- func (mls *MapLayerSelect) Bools(ctx context.Context) ([]bool, error)
- func (mls *MapLayerSelect) BoolsX(ctx context.Context) []bool
- func (mls *MapLayerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (mls *MapLayerSelect) Float64X(ctx context.Context) float64
- func (mls *MapLayerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (mls *MapLayerSelect) Float64sX(ctx context.Context) []float64
- func (mls *MapLayerSelect) Int(ctx context.Context) (_ int, err error)
- func (mls *MapLayerSelect) IntX(ctx context.Context) int
- func (mls *MapLayerSelect) Ints(ctx context.Context) ([]int, error)
- func (mls *MapLayerSelect) IntsX(ctx context.Context) []int
- func (mls *MapLayerSelect) Scan(ctx context.Context, v interface{}) error
- func (mls *MapLayerSelect) ScanX(ctx context.Context, v interface{})
- func (mls *MapLayerSelect) String(ctx context.Context) (_ string, err error)
- func (mls *MapLayerSelect) StringX(ctx context.Context) string
- func (mls *MapLayerSelect) Strings(ctx context.Context) ([]string, error)
- func (mls *MapLayerSelect) StringsX(ctx context.Context) []string
- type MapLayerUpdate
- func (mlu *MapLayerUpdate) ClearMapType() *MapLayerUpdate
- func (mlu *MapLayerUpdate) ClearMetadata() *MapLayerUpdate
- func (mlu *MapLayerUpdate) Exec(ctx context.Context) error
- func (mlu *MapLayerUpdate) ExecX(ctx context.Context)
- func (mlu *MapLayerUpdate) Mutation() *MapLayerMutation
- func (mlu *MapLayerUpdate) Save(ctx context.Context) (int, error)
- func (mlu *MapLayerUpdate) SaveX(ctx context.Context) int
- func (mlu *MapLayerUpdate) SetIsPublic(b bool) *MapLayerUpdate
- func (mlu *MapLayerUpdate) SetMapType(m *MapType) *MapLayerUpdate
- func (mlu *MapLayerUpdate) SetMapTypeID(id int) *MapLayerUpdate
- func (mlu *MapLayerUpdate) SetMetadata(m *Metadata) *MapLayerUpdate
- func (mlu *MapLayerUpdate) SetMetadataID(id int) *MapLayerUpdate
- func (mlu *MapLayerUpdate) SetName(s string) *MapLayerUpdate
- func (mlu *MapLayerUpdate) SetNillableMapTypeID(id *int) *MapLayerUpdate
- func (mlu *MapLayerUpdate) SetNillableMetadataID(id *int) *MapLayerUpdate
- func (mlu *MapLayerUpdate) SetURLTemplate(s string) *MapLayerUpdate
- func (mlu *MapLayerUpdate) SetUpdatedAt(t time.Time) *MapLayerUpdate
- func (mlu *MapLayerUpdate) Where(ps ...predicate.MapLayer) *MapLayerUpdate
- type MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) ClearMapType() *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) ClearMetadata() *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) Exec(ctx context.Context) error
- func (mluo *MapLayerUpdateOne) ExecX(ctx context.Context)
- func (mluo *MapLayerUpdateOne) Mutation() *MapLayerMutation
- func (mluo *MapLayerUpdateOne) Save(ctx context.Context) (*MapLayer, error)
- func (mluo *MapLayerUpdateOne) SaveX(ctx context.Context) *MapLayer
- func (mluo *MapLayerUpdateOne) SetIsPublic(b bool) *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) SetMapType(m *MapType) *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) SetMapTypeID(id int) *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) SetMetadata(m *Metadata) *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) SetMetadataID(id int) *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) SetName(s string) *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) SetNillableMapTypeID(id *int) *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) SetNillableMetadataID(id *int) *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) SetURLTemplate(s string) *MapLayerUpdateOne
- func (mluo *MapLayerUpdateOne) SetUpdatedAt(t time.Time) *MapLayerUpdateOne
- type MapLayers
- type MapType
- func (mt *MapType) MapLayers(ctx context.Context) ([]*MapLayer, error)
- func (mt *MapType) Metadata(ctx context.Context) (*Metadata, error)
- func (mt *MapType) Node(ctx context.Context) (node *Node, err error)
- func (mt *MapType) QueryMapLayers() *MapLayerQuery
- func (mt *MapType) QueryMetadata() *MetadataQuery
- func (mt *MapType) QueryServers() *ServerQuery
- func (mt *MapType) Servers(ctx context.Context) ([]*Server, error)
- func (mt *MapType) String() string
- func (mt *MapType) ToEdge(order *MapTypeOrder) *MapTypeEdge
- func (mt *MapType) Unwrap() *MapType
- func (mt *MapType) Update() *MapTypeUpdateOne
- type MapTypeClient
- func (c *MapTypeClient) Create() *MapTypeCreate
- func (c *MapTypeClient) CreateBulk(builders ...*MapTypeCreate) *MapTypeCreateBulk
- func (c *MapTypeClient) Delete() *MapTypeDelete
- func (c *MapTypeClient) DeleteOne(mt *MapType) *MapTypeDeleteOne
- func (c *MapTypeClient) DeleteOneID(id int) *MapTypeDeleteOne
- func (c *MapTypeClient) Get(ctx context.Context, id int) (*MapType, error)
- func (c *MapTypeClient) GetX(ctx context.Context, id int) *MapType
- func (c *MapTypeClient) Hooks() []Hook
- func (c *MapTypeClient) Query() *MapTypeQuery
- func (c *MapTypeClient) QueryMapLayers(mt *MapType) *MapLayerQuery
- func (c *MapTypeClient) QueryMetadata(mt *MapType) *MetadataQuery
- func (c *MapTypeClient) QueryServers(mt *MapType) *ServerQuery
- func (c *MapTypeClient) Update() *MapTypeUpdate
- func (c *MapTypeClient) UpdateOne(mt *MapType) *MapTypeUpdateOne
- func (c *MapTypeClient) UpdateOneID(id int) *MapTypeUpdateOne
- func (c *MapTypeClient) Use(hooks ...Hook)
- type MapTypeConnection
- type MapTypeCreate
- func (mtc *MapTypeCreate) AddMapLayerIDs(ids ...int) *MapTypeCreate
- func (mtc *MapTypeCreate) AddMapLayers(m ...*MapLayer) *MapTypeCreate
- func (mtc *MapTypeCreate) AddServerIDs(ids ...int) *MapTypeCreate
- func (mtc *MapTypeCreate) AddServers(s ...*Server) *MapTypeCreate
- func (mtc *MapTypeCreate) Mutation() *MapTypeMutation
- func (mtc *MapTypeCreate) Save(ctx context.Context) (*MapType, error)
- func (mtc *MapTypeCreate) SaveX(ctx context.Context) *MapType
- func (mtc *MapTypeCreate) SetCreatedAt(t time.Time) *MapTypeCreate
- func (mtc *MapTypeCreate) SetMaxX(f float64) *MapTypeCreate
- func (mtc *MapTypeCreate) SetMaxY(f float64) *MapTypeCreate
- func (mtc *MapTypeCreate) SetMaxZoom(i int) *MapTypeCreate
- func (mtc *MapTypeCreate) SetMetadata(m *Metadata) *MapTypeCreate
- func (mtc *MapTypeCreate) SetMetadataID(id int) *MapTypeCreate
- func (mtc *MapTypeCreate) SetMinX(f float64) *MapTypeCreate
- func (mtc *MapTypeCreate) SetMinY(f float64) *MapTypeCreate
- func (mtc *MapTypeCreate) SetMinZoom(i int) *MapTypeCreate
- func (mtc *MapTypeCreate) SetName(s string) *MapTypeCreate
- func (mtc *MapTypeCreate) SetNillableCreatedAt(t *time.Time) *MapTypeCreate
- func (mtc *MapTypeCreate) SetNillableMetadataID(id *int) *MapTypeCreate
- func (mtc *MapTypeCreate) SetNillableUpdatedAt(t *time.Time) *MapTypeCreate
- func (mtc *MapTypeCreate) SetUpdatedAt(t time.Time) *MapTypeCreate
- type MapTypeCreateBulk
- type MapTypeDelete
- type MapTypeDeleteOne
- type MapTypeEdge
- type MapTypeEdges
- type MapTypeGroupBy
- func (mtgb *MapTypeGroupBy) Aggregate(fns ...AggregateFunc) *MapTypeGroupBy
- func (mtgb *MapTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (mtgb *MapTypeGroupBy) BoolX(ctx context.Context) bool
- func (mtgb *MapTypeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (mtgb *MapTypeGroupBy) BoolsX(ctx context.Context) []bool
- func (mtgb *MapTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (mtgb *MapTypeGroupBy) Float64X(ctx context.Context) float64
- func (mtgb *MapTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (mtgb *MapTypeGroupBy) Float64sX(ctx context.Context) []float64
- func (mtgb *MapTypeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (mtgb *MapTypeGroupBy) IntX(ctx context.Context) int
- func (mtgb *MapTypeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (mtgb *MapTypeGroupBy) IntsX(ctx context.Context) []int
- func (mtgb *MapTypeGroupBy) Scan(ctx context.Context, v interface{}) error
- func (mtgb *MapTypeGroupBy) ScanX(ctx context.Context, v interface{})
- func (mtgb *MapTypeGroupBy) String(ctx context.Context) (_ string, err error)
- func (mtgb *MapTypeGroupBy) StringX(ctx context.Context) string
- func (mtgb *MapTypeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (mtgb *MapTypeGroupBy) StringsX(ctx context.Context) []string
- type MapTypeMutation
- func (m *MapTypeMutation) AddField(name string, value ent.Value) error
- func (m *MapTypeMutation) AddMapLayerIDs(ids ...int)
- func (m *MapTypeMutation) AddMaxX(f float64)
- func (m *MapTypeMutation) AddMaxY(f float64)
- func (m *MapTypeMutation) AddMaxZoom(i int)
- func (m *MapTypeMutation) AddMinX(f float64)
- func (m *MapTypeMutation) AddMinY(f float64)
- func (m *MapTypeMutation) AddMinZoom(i int)
- func (m *MapTypeMutation) AddServerIDs(ids ...int)
- func (m *MapTypeMutation) AddedEdges() []string
- func (m *MapTypeMutation) AddedField(name string) (ent.Value, bool)
- func (m *MapTypeMutation) AddedFields() []string
- func (m *MapTypeMutation) AddedIDs(name string) []ent.Value
- func (m *MapTypeMutation) AddedMaxX() (r float64, exists bool)
- func (m *MapTypeMutation) AddedMaxY() (r float64, exists bool)
- func (m *MapTypeMutation) AddedMaxZoom() (r int, exists bool)
- func (m *MapTypeMutation) AddedMinX() (r float64, exists bool)
- func (m *MapTypeMutation) AddedMinY() (r float64, exists bool)
- func (m *MapTypeMutation) AddedMinZoom() (r int, exists bool)
- func (m *MapTypeMutation) ClearEdge(name string) error
- func (m *MapTypeMutation) ClearField(name string) error
- func (m *MapTypeMutation) ClearMapLayers()
- func (m *MapTypeMutation) ClearMetadata()
- func (m *MapTypeMutation) ClearServers()
- func (m *MapTypeMutation) ClearedEdges() []string
- func (m *MapTypeMutation) ClearedFields() []string
- func (m MapTypeMutation) Client() *Client
- func (m *MapTypeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MapTypeMutation) EdgeCleared(name string) bool
- func (m *MapTypeMutation) Field(name string) (ent.Value, bool)
- func (m *MapTypeMutation) FieldCleared(name string) bool
- func (m *MapTypeMutation) Fields() []string
- func (m *MapTypeMutation) ID() (id int, exists bool)
- func (m *MapTypeMutation) MapLayersCleared() bool
- func (m *MapTypeMutation) MapLayersIDs() (ids []int)
- func (m *MapTypeMutation) MaxX() (r float64, exists bool)
- func (m *MapTypeMutation) MaxY() (r float64, exists bool)
- func (m *MapTypeMutation) MaxZoom() (r int, exists bool)
- func (m *MapTypeMutation) MetadataCleared() bool
- func (m *MapTypeMutation) MetadataID() (id int, exists bool)
- func (m *MapTypeMutation) MetadataIDs() (ids []int)
- func (m *MapTypeMutation) MinX() (r float64, exists bool)
- func (m *MapTypeMutation) MinY() (r float64, exists bool)
- func (m *MapTypeMutation) MinZoom() (r int, exists bool)
- func (m *MapTypeMutation) Name() (r string, exists bool)
- func (m *MapTypeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MapTypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MapTypeMutation) OldMaxX(ctx context.Context) (v float64, err error)
- func (m *MapTypeMutation) OldMaxY(ctx context.Context) (v float64, err error)
- func (m *MapTypeMutation) OldMaxZoom(ctx context.Context) (v int, err error)
- func (m *MapTypeMutation) OldMinX(ctx context.Context) (v float64, err error)
- func (m *MapTypeMutation) OldMinY(ctx context.Context) (v float64, err error)
- func (m *MapTypeMutation) OldMinZoom(ctx context.Context) (v int, err error)
- func (m *MapTypeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *MapTypeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MapTypeMutation) Op() Op
- func (m *MapTypeMutation) RemoveMapLayerIDs(ids ...int)
- func (m *MapTypeMutation) RemoveServerIDs(ids ...int)
- func (m *MapTypeMutation) RemovedEdges() []string
- func (m *MapTypeMutation) RemovedIDs(name string) []ent.Value
- func (m *MapTypeMutation) RemovedMapLayersIDs() (ids []int)
- func (m *MapTypeMutation) RemovedServersIDs() (ids []int)
- func (m *MapTypeMutation) ResetCreatedAt()
- func (m *MapTypeMutation) ResetEdge(name string) error
- func (m *MapTypeMutation) ResetField(name string) error
- func (m *MapTypeMutation) ResetMapLayers()
- func (m *MapTypeMutation) ResetMaxX()
- func (m *MapTypeMutation) ResetMaxY()
- func (m *MapTypeMutation) ResetMaxZoom()
- func (m *MapTypeMutation) ResetMetadata()
- func (m *MapTypeMutation) ResetMinX()
- func (m *MapTypeMutation) ResetMinY()
- func (m *MapTypeMutation) ResetMinZoom()
- func (m *MapTypeMutation) ResetName()
- func (m *MapTypeMutation) ResetServers()
- func (m *MapTypeMutation) ResetUpdatedAt()
- func (m *MapTypeMutation) ServersCleared() bool
- func (m *MapTypeMutation) ServersIDs() (ids []int)
- func (m *MapTypeMutation) SetCreatedAt(t time.Time)
- func (m *MapTypeMutation) SetField(name string, value ent.Value) error
- func (m *MapTypeMutation) SetMaxX(f float64)
- func (m *MapTypeMutation) SetMaxY(f float64)
- func (m *MapTypeMutation) SetMaxZoom(i int)
- func (m *MapTypeMutation) SetMetadataID(id int)
- func (m *MapTypeMutation) SetMinX(f float64)
- func (m *MapTypeMutation) SetMinY(f float64)
- func (m *MapTypeMutation) SetMinZoom(i int)
- func (m *MapTypeMutation) SetName(s string)
- func (m *MapTypeMutation) SetUpdatedAt(t time.Time)
- func (m MapTypeMutation) Tx() (*Tx, error)
- func (m *MapTypeMutation) Type() string
- func (m *MapTypeMutation) UpdatedAt() (r time.Time, exists bool)
- type MapTypeOrder
- type MapTypeOrderField
- type MapTypePaginateOption
- type MapTypeQuery
- func (mtq *MapTypeQuery) All(ctx context.Context) ([]*MapType, error)
- func (mtq *MapTypeQuery) AllX(ctx context.Context) []*MapType
- func (mtq *MapTypeQuery) Clone() *MapTypeQuery
- func (mt *MapTypeQuery) CollectFields(ctx context.Context, satisfies ...string) *MapTypeQuery
- func (mtq *MapTypeQuery) Count(ctx context.Context) (int, error)
- func (mtq *MapTypeQuery) CountX(ctx context.Context) int
- func (mtq *MapTypeQuery) Exist(ctx context.Context) (bool, error)
- func (mtq *MapTypeQuery) ExistX(ctx context.Context) bool
- func (mtq *MapTypeQuery) First(ctx context.Context) (*MapType, error)
- func (mtq *MapTypeQuery) FirstID(ctx context.Context) (id int, err error)
- func (mtq *MapTypeQuery) FirstIDX(ctx context.Context) int
- func (mtq *MapTypeQuery) FirstX(ctx context.Context) *MapType
- func (mtq *MapTypeQuery) GroupBy(field string, fields ...string) *MapTypeGroupBy
- func (mtq *MapTypeQuery) IDs(ctx context.Context) ([]int, error)
- func (mtq *MapTypeQuery) IDsX(ctx context.Context) []int
- func (mtq *MapTypeQuery) Limit(limit int) *MapTypeQuery
- func (mtq *MapTypeQuery) Offset(offset int) *MapTypeQuery
- func (mtq *MapTypeQuery) Only(ctx context.Context) (*MapType, error)
- func (mtq *MapTypeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mtq *MapTypeQuery) OnlyIDX(ctx context.Context) int
- func (mtq *MapTypeQuery) OnlyX(ctx context.Context) *MapType
- func (mtq *MapTypeQuery) Order(o ...OrderFunc) *MapTypeQuery
- func (mt *MapTypeQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*MapTypeConnection, error)
- func (mtq *MapTypeQuery) QueryMapLayers() *MapLayerQuery
- func (mtq *MapTypeQuery) QueryMetadata() *MetadataQuery
- func (mtq *MapTypeQuery) QueryServers() *ServerQuery
- func (mtq *MapTypeQuery) Select(field string, fields ...string) *MapTypeSelect
- func (mtq *MapTypeQuery) Where(ps ...predicate.MapType) *MapTypeQuery
- func (mtq *MapTypeQuery) WithMapLayers(opts ...func(*MapLayerQuery)) *MapTypeQuery
- func (mtq *MapTypeQuery) WithMetadata(opts ...func(*MetadataQuery)) *MapTypeQuery
- func (mtq *MapTypeQuery) WithServers(opts ...func(*ServerQuery)) *MapTypeQuery
- type MapTypeSelect
- func (mts *MapTypeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (mts *MapTypeSelect) BoolX(ctx context.Context) bool
- func (mts *MapTypeSelect) Bools(ctx context.Context) ([]bool, error)
- func (mts *MapTypeSelect) BoolsX(ctx context.Context) []bool
- func (mts *MapTypeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (mts *MapTypeSelect) Float64X(ctx context.Context) float64
- func (mts *MapTypeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (mts *MapTypeSelect) Float64sX(ctx context.Context) []float64
- func (mts *MapTypeSelect) Int(ctx context.Context) (_ int, err error)
- func (mts *MapTypeSelect) IntX(ctx context.Context) int
- func (mts *MapTypeSelect) Ints(ctx context.Context) ([]int, error)
- func (mts *MapTypeSelect) IntsX(ctx context.Context) []int
- func (mts *MapTypeSelect) Scan(ctx context.Context, v interface{}) error
- func (mts *MapTypeSelect) ScanX(ctx context.Context, v interface{})
- func (mts *MapTypeSelect) String(ctx context.Context) (_ string, err error)
- func (mts *MapTypeSelect) StringX(ctx context.Context) string
- func (mts *MapTypeSelect) Strings(ctx context.Context) ([]string, error)
- func (mts *MapTypeSelect) StringsX(ctx context.Context) []string
- type MapTypeUpdate
- func (mtu *MapTypeUpdate) AddMapLayerIDs(ids ...int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) AddMapLayers(m ...*MapLayer) *MapTypeUpdate
- func (mtu *MapTypeUpdate) AddMaxX(f float64) *MapTypeUpdate
- func (mtu *MapTypeUpdate) AddMaxY(f float64) *MapTypeUpdate
- func (mtu *MapTypeUpdate) AddMaxZoom(i int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) AddMinX(f float64) *MapTypeUpdate
- func (mtu *MapTypeUpdate) AddMinY(f float64) *MapTypeUpdate
- func (mtu *MapTypeUpdate) AddMinZoom(i int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) AddServerIDs(ids ...int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) AddServers(s ...*Server) *MapTypeUpdate
- func (mtu *MapTypeUpdate) ClearMapLayers() *MapTypeUpdate
- func (mtu *MapTypeUpdate) ClearMetadata() *MapTypeUpdate
- func (mtu *MapTypeUpdate) ClearServers() *MapTypeUpdate
- func (mtu *MapTypeUpdate) Exec(ctx context.Context) error
- func (mtu *MapTypeUpdate) ExecX(ctx context.Context)
- func (mtu *MapTypeUpdate) Mutation() *MapTypeMutation
- func (mtu *MapTypeUpdate) RemoveMapLayerIDs(ids ...int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) RemoveMapLayers(m ...*MapLayer) *MapTypeUpdate
- func (mtu *MapTypeUpdate) RemoveServerIDs(ids ...int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) RemoveServers(s ...*Server) *MapTypeUpdate
- func (mtu *MapTypeUpdate) Save(ctx context.Context) (int, error)
- func (mtu *MapTypeUpdate) SaveX(ctx context.Context) int
- func (mtu *MapTypeUpdate) SetMaxX(f float64) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetMaxY(f float64) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetMaxZoom(i int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetMetadata(m *Metadata) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetMetadataID(id int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetMinX(f float64) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetMinY(f float64) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetMinZoom(i int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetName(s string) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetNillableMetadataID(id *int) *MapTypeUpdate
- func (mtu *MapTypeUpdate) SetUpdatedAt(t time.Time) *MapTypeUpdate
- func (mtu *MapTypeUpdate) Where(ps ...predicate.MapType) *MapTypeUpdate
- type MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddMapLayerIDs(ids ...int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddMapLayers(m ...*MapLayer) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddMaxX(f float64) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddMaxY(f float64) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddMaxZoom(i int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddMinX(f float64) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddMinY(f float64) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddMinZoom(i int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddServerIDs(ids ...int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) AddServers(s ...*Server) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) ClearMapLayers() *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) ClearMetadata() *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) ClearServers() *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) Exec(ctx context.Context) error
- func (mtuo *MapTypeUpdateOne) ExecX(ctx context.Context)
- func (mtuo *MapTypeUpdateOne) Mutation() *MapTypeMutation
- func (mtuo *MapTypeUpdateOne) RemoveMapLayerIDs(ids ...int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) RemoveMapLayers(m ...*MapLayer) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) RemoveServerIDs(ids ...int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) RemoveServers(s ...*Server) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) Save(ctx context.Context) (*MapType, error)
- func (mtuo *MapTypeUpdateOne) SaveX(ctx context.Context) *MapType
- func (mtuo *MapTypeUpdateOne) SetMaxX(f float64) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetMaxY(f float64) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetMaxZoom(i int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetMetadata(m *Metadata) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetMetadataID(id int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetMinX(f float64) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetMinY(f float64) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetMinZoom(i int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetName(s string) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetNillableMetadataID(id *int) *MapTypeUpdateOne
- func (mtuo *MapTypeUpdateOne) SetUpdatedAt(t time.Time) *MapTypeUpdateOne
- type MapTypes
- type Metadata
- func (m *Metadata) MapType(ctx context.Context) (*MapType, error)
- func (m *Metadata) Node(ctx context.Context) (node *Node, err error)
- func (m *Metadata) QueryMapType() *MapTypeQuery
- func (m *Metadata) QueryUser() *UserQuery
- func (m *Metadata) String() string
- func (m *Metadata) ToEdge(order *MetadataOrder) *MetadataEdge
- func (m *Metadata) Unwrap() *Metadata
- func (m *Metadata) Update() *MetadataUpdateOne
- func (m *Metadata) User(ctx context.Context) (*User, error)
- type MetadataClient
- func (c *MetadataClient) Create() *MetadataCreate
- func (c *MetadataClient) CreateBulk(builders ...*MetadataCreate) *MetadataCreateBulk
- func (c *MetadataClient) Delete() *MetadataDelete
- func (c *MetadataClient) DeleteOne(m *Metadata) *MetadataDeleteOne
- func (c *MetadataClient) DeleteOneID(id int) *MetadataDeleteOne
- func (c *MetadataClient) Get(ctx context.Context, id int) (*Metadata, error)
- func (c *MetadataClient) GetX(ctx context.Context, id int) *Metadata
- func (c *MetadataClient) Hooks() []Hook
- func (c *MetadataClient) Query() *MetadataQuery
- func (c *MetadataClient) QueryMapType(m *Metadata) *MapTypeQuery
- func (c *MetadataClient) QueryUser(m *Metadata) *UserQuery
- func (c *MetadataClient) Update() *MetadataUpdate
- func (c *MetadataClient) UpdateOne(m *Metadata) *MetadataUpdateOne
- func (c *MetadataClient) UpdateOneID(id int) *MetadataUpdateOne
- func (c *MetadataClient) Use(hooks ...Hook)
- type MetadataConnection
- type MetadataCreate
- func (mc *MetadataCreate) Mutation() *MetadataMutation
- func (mc *MetadataCreate) Save(ctx context.Context) (*Metadata, error)
- func (mc *MetadataCreate) SaveX(ctx context.Context) *Metadata
- func (mc *MetadataCreate) SetData(m map[string]interface{}) *MetadataCreate
- func (mc *MetadataCreate) SetMapType(m *MapType) *MetadataCreate
- func (mc *MetadataCreate) SetMapTypeID(id int) *MetadataCreate
- func (mc *MetadataCreate) SetNillableMapTypeID(id *int) *MetadataCreate
- func (mc *MetadataCreate) SetNillableUserID(id *int) *MetadataCreate
- func (mc *MetadataCreate) SetUser(u *User) *MetadataCreate
- func (mc *MetadataCreate) SetUserID(id int) *MetadataCreate
- type MetadataCreateBulk
- type MetadataDelete
- type MetadataDeleteOne
- type MetadataEdge
- type MetadataEdges
- type MetadataGroupBy
- func (mgb *MetadataGroupBy) Aggregate(fns ...AggregateFunc) *MetadataGroupBy
- func (mgb *MetadataGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (mgb *MetadataGroupBy) BoolX(ctx context.Context) bool
- func (mgb *MetadataGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (mgb *MetadataGroupBy) BoolsX(ctx context.Context) []bool
- func (mgb *MetadataGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (mgb *MetadataGroupBy) Float64X(ctx context.Context) float64
- func (mgb *MetadataGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (mgb *MetadataGroupBy) Float64sX(ctx context.Context) []float64
- func (mgb *MetadataGroupBy) Int(ctx context.Context) (_ int, err error)
- func (mgb *MetadataGroupBy) IntX(ctx context.Context) int
- func (mgb *MetadataGroupBy) Ints(ctx context.Context) ([]int, error)
- func (mgb *MetadataGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MetadataGroupBy) Scan(ctx context.Context, v interface{}) error
- func (mgb *MetadataGroupBy) ScanX(ctx context.Context, v interface{})
- func (mgb *MetadataGroupBy) String(ctx context.Context) (_ string, err error)
- func (mgb *MetadataGroupBy) StringX(ctx context.Context) string
- func (mgb *MetadataGroupBy) Strings(ctx context.Context) ([]string, error)
- func (mgb *MetadataGroupBy) StringsX(ctx context.Context) []string
- type MetadataMutation
- func (m *MetadataMutation) AddField(name string, value ent.Value) error
- func (m *MetadataMutation) AddedEdges() []string
- func (m *MetadataMutation) AddedField(name string) (ent.Value, bool)
- func (m *MetadataMutation) AddedFields() []string
- func (m *MetadataMutation) AddedIDs(name string) []ent.Value
- func (m *MetadataMutation) ClearEdge(name string) error
- func (m *MetadataMutation) ClearField(name string) error
- func (m *MetadataMutation) ClearMapType()
- func (m *MetadataMutation) ClearUser()
- func (m *MetadataMutation) ClearedEdges() []string
- func (m *MetadataMutation) ClearedFields() []string
- func (m MetadataMutation) Client() *Client
- func (m *MetadataMutation) Data() (r map[string]interface{}, exists bool)
- func (m *MetadataMutation) EdgeCleared(name string) bool
- func (m *MetadataMutation) Field(name string) (ent.Value, bool)
- func (m *MetadataMutation) FieldCleared(name string) bool
- func (m *MetadataMutation) Fields() []string
- func (m *MetadataMutation) ID() (id int, exists bool)
- func (m *MetadataMutation) MapTypeCleared() bool
- func (m *MetadataMutation) MapTypeID() (id int, exists bool)
- func (m *MetadataMutation) MapTypeIDs() (ids []int)
- func (m *MetadataMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)
- func (m *MetadataMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MetadataMutation) Op() Op
- func (m *MetadataMutation) RemovedEdges() []string
- func (m *MetadataMutation) RemovedIDs(name string) []ent.Value
- func (m *MetadataMutation) ResetData()
- func (m *MetadataMutation) ResetEdge(name string) error
- func (m *MetadataMutation) ResetField(name string) error
- func (m *MetadataMutation) ResetMapType()
- func (m *MetadataMutation) ResetUser()
- func (m *MetadataMutation) SetData(value map[string]interface{})
- func (m *MetadataMutation) SetField(name string, value ent.Value) error
- func (m *MetadataMutation) SetMapTypeID(id int)
- func (m *MetadataMutation) SetUserID(id int)
- func (m MetadataMutation) Tx() (*Tx, error)
- func (m *MetadataMutation) Type() string
- func (m *MetadataMutation) UserCleared() bool
- func (m *MetadataMutation) UserID() (id int, exists bool)
- func (m *MetadataMutation) UserIDs() (ids []int)
- type MetadataOrder
- type MetadataOrderField
- type MetadataPaginateOption
- type MetadataQuery
- func (mq *MetadataQuery) All(ctx context.Context) ([]*Metadata, error)
- func (mq *MetadataQuery) AllX(ctx context.Context) []*Metadata
- func (mq *MetadataQuery) Clone() *MetadataQuery
- func (m *MetadataQuery) CollectFields(ctx context.Context, satisfies ...string) *MetadataQuery
- func (mq *MetadataQuery) Count(ctx context.Context) (int, error)
- func (mq *MetadataQuery) CountX(ctx context.Context) int
- func (mq *MetadataQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MetadataQuery) ExistX(ctx context.Context) bool
- func (mq *MetadataQuery) First(ctx context.Context) (*Metadata, error)
- func (mq *MetadataQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MetadataQuery) FirstIDX(ctx context.Context) int
- func (mq *MetadataQuery) FirstX(ctx context.Context) *Metadata
- func (mq *MetadataQuery) GroupBy(field string, fields ...string) *MetadataGroupBy
- func (mq *MetadataQuery) IDs(ctx context.Context) ([]int, error)
- func (mq *MetadataQuery) IDsX(ctx context.Context) []int
- func (mq *MetadataQuery) Limit(limit int) *MetadataQuery
- func (mq *MetadataQuery) Offset(offset int) *MetadataQuery
- func (mq *MetadataQuery) Only(ctx context.Context) (*Metadata, error)
- func (mq *MetadataQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MetadataQuery) OnlyIDX(ctx context.Context) int
- func (mq *MetadataQuery) OnlyX(ctx context.Context) *Metadata
- func (mq *MetadataQuery) Order(o ...OrderFunc) *MetadataQuery
- func (m *MetadataQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*MetadataConnection, error)
- func (mq *MetadataQuery) QueryMapType() *MapTypeQuery
- func (mq *MetadataQuery) QueryUser() *UserQuery
- func (mq *MetadataQuery) Select(field string, fields ...string) *MetadataSelect
- func (mq *MetadataQuery) Where(ps ...predicate.Metadata) *MetadataQuery
- func (mq *MetadataQuery) WithMapType(opts ...func(*MapTypeQuery)) *MetadataQuery
- func (mq *MetadataQuery) WithUser(opts ...func(*UserQuery)) *MetadataQuery
- type MetadataSelect
- func (ms *MetadataSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ms *MetadataSelect) BoolX(ctx context.Context) bool
- func (ms *MetadataSelect) Bools(ctx context.Context) ([]bool, error)
- func (ms *MetadataSelect) BoolsX(ctx context.Context) []bool
- func (ms *MetadataSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ms *MetadataSelect) Float64X(ctx context.Context) float64
- func (ms *MetadataSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ms *MetadataSelect) Float64sX(ctx context.Context) []float64
- func (ms *MetadataSelect) Int(ctx context.Context) (_ int, err error)
- func (ms *MetadataSelect) IntX(ctx context.Context) int
- func (ms *MetadataSelect) Ints(ctx context.Context) ([]int, error)
- func (ms *MetadataSelect) IntsX(ctx context.Context) []int
- func (ms *MetadataSelect) Scan(ctx context.Context, v interface{}) error
- func (ms *MetadataSelect) ScanX(ctx context.Context, v interface{})
- func (ms *MetadataSelect) String(ctx context.Context) (_ string, err error)
- func (ms *MetadataSelect) StringX(ctx context.Context) string
- func (ms *MetadataSelect) Strings(ctx context.Context) ([]string, error)
- func (ms *MetadataSelect) StringsX(ctx context.Context) []string
- type MetadataSlice
- type MetadataUpdate
- func (mu *MetadataUpdate) ClearMapType() *MetadataUpdate
- func (mu *MetadataUpdate) ClearUser() *MetadataUpdate
- func (mu *MetadataUpdate) Exec(ctx context.Context) error
- func (mu *MetadataUpdate) ExecX(ctx context.Context)
- func (mu *MetadataUpdate) Mutation() *MetadataMutation
- func (mu *MetadataUpdate) Save(ctx context.Context) (int, error)
- func (mu *MetadataUpdate) SaveX(ctx context.Context) int
- func (mu *MetadataUpdate) SetData(m map[string]interface{}) *MetadataUpdate
- func (mu *MetadataUpdate) SetMapType(m *MapType) *MetadataUpdate
- func (mu *MetadataUpdate) SetMapTypeID(id int) *MetadataUpdate
- func (mu *MetadataUpdate) SetNillableMapTypeID(id *int) *MetadataUpdate
- func (mu *MetadataUpdate) SetNillableUserID(id *int) *MetadataUpdate
- func (mu *MetadataUpdate) SetUser(u *User) *MetadataUpdate
- func (mu *MetadataUpdate) SetUserID(id int) *MetadataUpdate
- func (mu *MetadataUpdate) Where(ps ...predicate.Metadata) *MetadataUpdate
- type MetadataUpdateOne
- func (muo *MetadataUpdateOne) ClearMapType() *MetadataUpdateOne
- func (muo *MetadataUpdateOne) ClearUser() *MetadataUpdateOne
- func (muo *MetadataUpdateOne) Exec(ctx context.Context) error
- func (muo *MetadataUpdateOne) ExecX(ctx context.Context)
- func (muo *MetadataUpdateOne) Mutation() *MetadataMutation
- func (muo *MetadataUpdateOne) Save(ctx context.Context) (*Metadata, error)
- func (muo *MetadataUpdateOne) SaveX(ctx context.Context) *Metadata
- func (muo *MetadataUpdateOne) SetData(m map[string]interface{}) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetMapType(m *MapType) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetMapTypeID(id int) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetNillableMapTypeID(id *int) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetNillableUserID(id *int) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetUser(u *User) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) SetUserID(id int) *MetadataUpdateOne
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Player
- func (pl *Player) Identifiers(ctx context.Context) ([]*PlayerIdentifier, error)
- func (pl *Player) Metadata(ctx context.Context) (*Metadata, error)
- func (pl *Player) Node(ctx context.Context) (node *Node, err error)
- func (pl *Player) QueryIdentifiers() *PlayerIdentifierQuery
- func (pl *Player) QueryMetadata() *MetadataQuery
- func (pl *Player) QueryServers() *ServerQuery
- func (pl *Player) QueryUser() *UserQuery
- func (pl *Player) Servers(ctx context.Context) ([]*Server, error)
- func (pl *Player) String() string
- func (pl *Player) ToEdge(order *PlayerOrder) *PlayerEdge
- func (pl *Player) Unwrap() *Player
- func (pl *Player) Update() *PlayerUpdateOne
- func (pl *Player) User(ctx context.Context) (*User, error)
- type PlayerClient
- func (c *PlayerClient) Create() *PlayerCreate
- func (c *PlayerClient) CreateBulk(builders ...*PlayerCreate) *PlayerCreateBulk
- func (c *PlayerClient) Delete() *PlayerDelete
- func (c *PlayerClient) DeleteOne(pl *Player) *PlayerDeleteOne
- func (c *PlayerClient) DeleteOneID(id int) *PlayerDeleteOne
- func (c *PlayerClient) Get(ctx context.Context, id int) (*Player, error)
- func (c *PlayerClient) GetX(ctx context.Context, id int) *Player
- func (c *PlayerClient) Hooks() []Hook
- func (c *PlayerClient) Query() *PlayerQuery
- func (c *PlayerClient) QueryIdentifiers(pl *Player) *PlayerIdentifierQuery
- func (c *PlayerClient) QueryMetadata(pl *Player) *MetadataQuery
- func (c *PlayerClient) QueryServers(pl *Player) *ServerQuery
- func (c *PlayerClient) QueryUser(pl *Player) *UserQuery
- func (c *PlayerClient) Update() *PlayerUpdate
- func (c *PlayerClient) UpdateOne(pl *Player) *PlayerUpdateOne
- func (c *PlayerClient) UpdateOneID(id int) *PlayerUpdateOne
- func (c *PlayerClient) Use(hooks ...Hook)
- type PlayerConnection
- type PlayerCreate
- func (pc *PlayerCreate) AddIdentifierIDs(ids ...int) *PlayerCreate
- func (pc *PlayerCreate) AddIdentifiers(p ...*PlayerIdentifier) *PlayerCreate
- func (pc *PlayerCreate) AddServerIDs(ids ...int) *PlayerCreate
- func (pc *PlayerCreate) AddServers(s ...*Server) *PlayerCreate
- func (pc *PlayerCreate) Mutation() *PlayerMutation
- func (pc *PlayerCreate) Save(ctx context.Context) (*Player, error)
- func (pc *PlayerCreate) SaveX(ctx context.Context) *Player
- func (pc *PlayerCreate) SetCreatedAt(t time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetLastSeenAt(t time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetMetadata(m *Metadata) *PlayerCreate
- func (pc *PlayerCreate) SetMetadataID(id int) *PlayerCreate
- func (pc *PlayerCreate) SetName(s string) *PlayerCreate
- func (pc *PlayerCreate) SetNillableCreatedAt(t *time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetNillableLastSeenAt(t *time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetNillableMetadataID(id *int) *PlayerCreate
- func (pc *PlayerCreate) SetNillableSessionEndedAt(t *time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetNillableSessionStartedAt(t *time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetNillableTotalMinutes(i *int) *PlayerCreate
- func (pc *PlayerCreate) SetNillableUpdatedAt(t *time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetNillableUserID(id *int) *PlayerCreate
- func (pc *PlayerCreate) SetSessionEndedAt(t time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetSessionStartedAt(t time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetTotalMinutes(i int) *PlayerCreate
- func (pc *PlayerCreate) SetUpdatedAt(t time.Time) *PlayerCreate
- func (pc *PlayerCreate) SetUser(u *User) *PlayerCreate
- func (pc *PlayerCreate) SetUserID(id int) *PlayerCreate
- type PlayerCreateBulk
- type PlayerDelete
- type PlayerDeleteOne
- type PlayerEdge
- type PlayerEdges
- type PlayerGroupBy
- func (pgb *PlayerGroupBy) Aggregate(fns ...AggregateFunc) *PlayerGroupBy
- func (pgb *PlayerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (pgb *PlayerGroupBy) BoolX(ctx context.Context) bool
- func (pgb *PlayerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (pgb *PlayerGroupBy) BoolsX(ctx context.Context) []bool
- func (pgb *PlayerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (pgb *PlayerGroupBy) Float64X(ctx context.Context) float64
- func (pgb *PlayerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (pgb *PlayerGroupBy) Float64sX(ctx context.Context) []float64
- func (pgb *PlayerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (pgb *PlayerGroupBy) IntX(ctx context.Context) int
- func (pgb *PlayerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (pgb *PlayerGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PlayerGroupBy) Scan(ctx context.Context, v interface{}) error
- func (pgb *PlayerGroupBy) ScanX(ctx context.Context, v interface{})
- func (pgb *PlayerGroupBy) String(ctx context.Context) (_ string, err error)
- func (pgb *PlayerGroupBy) StringX(ctx context.Context) string
- func (pgb *PlayerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (pgb *PlayerGroupBy) StringsX(ctx context.Context) []string
- type PlayerIdentifier
- func (pi *PlayerIdentifier) Metadata(ctx context.Context) (*Metadata, error)
- func (pi *PlayerIdentifier) Node(ctx context.Context) (node *Node, err error)
- func (pi *PlayerIdentifier) Player(ctx context.Context) (*Player, error)
- func (pi *PlayerIdentifier) QueryMetadata() *MetadataQuery
- func (pi *PlayerIdentifier) QueryPlayer() *PlayerQuery
- func (pi *PlayerIdentifier) String() string
- func (pi *PlayerIdentifier) ToEdge(order *PlayerIdentifierOrder) *PlayerIdentifierEdge
- func (pi *PlayerIdentifier) Unwrap() *PlayerIdentifier
- func (pi *PlayerIdentifier) Update() *PlayerIdentifierUpdateOne
- type PlayerIdentifierClient
- func (c *PlayerIdentifierClient) Create() *PlayerIdentifierCreate
- func (c *PlayerIdentifierClient) CreateBulk(builders ...*PlayerIdentifierCreate) *PlayerIdentifierCreateBulk
- func (c *PlayerIdentifierClient) Delete() *PlayerIdentifierDelete
- func (c *PlayerIdentifierClient) DeleteOne(pi *PlayerIdentifier) *PlayerIdentifierDeleteOne
- func (c *PlayerIdentifierClient) DeleteOneID(id int) *PlayerIdentifierDeleteOne
- func (c *PlayerIdentifierClient) Get(ctx context.Context, id int) (*PlayerIdentifier, error)
- func (c *PlayerIdentifierClient) GetX(ctx context.Context, id int) *PlayerIdentifier
- func (c *PlayerIdentifierClient) Hooks() []Hook
- func (c *PlayerIdentifierClient) Query() *PlayerIdentifierQuery
- func (c *PlayerIdentifierClient) QueryMetadata(pi *PlayerIdentifier) *MetadataQuery
- func (c *PlayerIdentifierClient) QueryPlayer(pi *PlayerIdentifier) *PlayerQuery
- func (c *PlayerIdentifierClient) Update() *PlayerIdentifierUpdate
- func (c *PlayerIdentifierClient) UpdateOne(pi *PlayerIdentifier) *PlayerIdentifierUpdateOne
- func (c *PlayerIdentifierClient) UpdateOneID(id int) *PlayerIdentifierUpdateOne
- func (c *PlayerIdentifierClient) Use(hooks ...Hook)
- type PlayerIdentifierConnection
- type PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) Mutation() *PlayerIdentifierMutation
- func (pic *PlayerIdentifierCreate) Save(ctx context.Context) (*PlayerIdentifier, error)
- func (pic *PlayerIdentifierCreate) SaveX(ctx context.Context) *PlayerIdentifier
- func (pic *PlayerIdentifierCreate) SetCreatedAt(t time.Time) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetIdentifier(s string) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetMetadata(m *Metadata) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetMetadataID(id int) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetNillableCreatedAt(t *time.Time) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetNillableMetadataID(id *int) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetNillablePlayerID(id *int) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetNillableUpdatedAt(t *time.Time) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetPlayer(p *Player) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetPlayerID(id int) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetType(s string) *PlayerIdentifierCreate
- func (pic *PlayerIdentifierCreate) SetUpdatedAt(t time.Time) *PlayerIdentifierCreate
- type PlayerIdentifierCreateBulk
- type PlayerIdentifierDelete
- type PlayerIdentifierDeleteOne
- type PlayerIdentifierEdge
- type PlayerIdentifierEdges
- type PlayerIdentifierGroupBy
- func (pigb *PlayerIdentifierGroupBy) Aggregate(fns ...AggregateFunc) *PlayerIdentifierGroupBy
- func (pigb *PlayerIdentifierGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (pigb *PlayerIdentifierGroupBy) BoolX(ctx context.Context) bool
- func (pigb *PlayerIdentifierGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (pigb *PlayerIdentifierGroupBy) BoolsX(ctx context.Context) []bool
- func (pigb *PlayerIdentifierGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (pigb *PlayerIdentifierGroupBy) Float64X(ctx context.Context) float64
- func (pigb *PlayerIdentifierGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (pigb *PlayerIdentifierGroupBy) Float64sX(ctx context.Context) []float64
- func (pigb *PlayerIdentifierGroupBy) Int(ctx context.Context) (_ int, err error)
- func (pigb *PlayerIdentifierGroupBy) IntX(ctx context.Context) int
- func (pigb *PlayerIdentifierGroupBy) Ints(ctx context.Context) ([]int, error)
- func (pigb *PlayerIdentifierGroupBy) IntsX(ctx context.Context) []int
- func (pigb *PlayerIdentifierGroupBy) Scan(ctx context.Context, v interface{}) error
- func (pigb *PlayerIdentifierGroupBy) ScanX(ctx context.Context, v interface{})
- func (pigb *PlayerIdentifierGroupBy) String(ctx context.Context) (_ string, err error)
- func (pigb *PlayerIdentifierGroupBy) StringX(ctx context.Context) string
- func (pigb *PlayerIdentifierGroupBy) Strings(ctx context.Context) ([]string, error)
- func (pigb *PlayerIdentifierGroupBy) StringsX(ctx context.Context) []string
- type PlayerIdentifierMutation
- func (m *PlayerIdentifierMutation) AddField(name string, value ent.Value) error
- func (m *PlayerIdentifierMutation) AddedEdges() []string
- func (m *PlayerIdentifierMutation) AddedField(name string) (ent.Value, bool)
- func (m *PlayerIdentifierMutation) AddedFields() []string
- func (m *PlayerIdentifierMutation) AddedIDs(name string) []ent.Value
- func (m *PlayerIdentifierMutation) ClearEdge(name string) error
- func (m *PlayerIdentifierMutation) ClearField(name string) error
- func (m *PlayerIdentifierMutation) ClearMetadata()
- func (m *PlayerIdentifierMutation) ClearPlayer()
- func (m *PlayerIdentifierMutation) ClearedEdges() []string
- func (m *PlayerIdentifierMutation) ClearedFields() []string
- func (m PlayerIdentifierMutation) Client() *Client
- func (m *PlayerIdentifierMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PlayerIdentifierMutation) EdgeCleared(name string) bool
- func (m *PlayerIdentifierMutation) Field(name string) (ent.Value, bool)
- func (m *PlayerIdentifierMutation) FieldCleared(name string) bool
- func (m *PlayerIdentifierMutation) Fields() []string
- func (m *PlayerIdentifierMutation) GetType() (r string, exists bool)
- func (m *PlayerIdentifierMutation) ID() (id int, exists bool)
- func (m *PlayerIdentifierMutation) Identifier() (r string, exists bool)
- func (m *PlayerIdentifierMutation) MetadataCleared() bool
- func (m *PlayerIdentifierMutation) MetadataID() (id int, exists bool)
- func (m *PlayerIdentifierMutation) MetadataIDs() (ids []int)
- func (m *PlayerIdentifierMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PlayerIdentifierMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PlayerIdentifierMutation) OldIdentifier(ctx context.Context) (v string, err error)
- func (m *PlayerIdentifierMutation) OldType(ctx context.Context) (v string, err error)
- func (m *PlayerIdentifierMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PlayerIdentifierMutation) Op() Op
- func (m *PlayerIdentifierMutation) PlayerCleared() bool
- func (m *PlayerIdentifierMutation) PlayerID() (id int, exists bool)
- func (m *PlayerIdentifierMutation) PlayerIDs() (ids []int)
- func (m *PlayerIdentifierMutation) RemovedEdges() []string
- func (m *PlayerIdentifierMutation) RemovedIDs(name string) []ent.Value
- func (m *PlayerIdentifierMutation) ResetCreatedAt()
- func (m *PlayerIdentifierMutation) ResetEdge(name string) error
- func (m *PlayerIdentifierMutation) ResetField(name string) error
- func (m *PlayerIdentifierMutation) ResetIdentifier()
- func (m *PlayerIdentifierMutation) ResetMetadata()
- func (m *PlayerIdentifierMutation) ResetPlayer()
- func (m *PlayerIdentifierMutation) ResetType()
- func (m *PlayerIdentifierMutation) ResetUpdatedAt()
- func (m *PlayerIdentifierMutation) SetCreatedAt(t time.Time)
- func (m *PlayerIdentifierMutation) SetField(name string, value ent.Value) error
- func (m *PlayerIdentifierMutation) SetIdentifier(s string)
- func (m *PlayerIdentifierMutation) SetMetadataID(id int)
- func (m *PlayerIdentifierMutation) SetPlayerID(id int)
- func (m *PlayerIdentifierMutation) SetType(s string)
- func (m *PlayerIdentifierMutation) SetUpdatedAt(t time.Time)
- func (m PlayerIdentifierMutation) Tx() (*Tx, error)
- func (m *PlayerIdentifierMutation) Type() string
- func (m *PlayerIdentifierMutation) UpdatedAt() (r time.Time, exists bool)
- type PlayerIdentifierOrder
- type PlayerIdentifierOrderField
- type PlayerIdentifierPaginateOption
- type PlayerIdentifierQuery
- func (piq *PlayerIdentifierQuery) All(ctx context.Context) ([]*PlayerIdentifier, error)
- func (piq *PlayerIdentifierQuery) AllX(ctx context.Context) []*PlayerIdentifier
- func (piq *PlayerIdentifierQuery) Clone() *PlayerIdentifierQuery
- func (pi *PlayerIdentifierQuery) CollectFields(ctx context.Context, satisfies ...string) *PlayerIdentifierQuery
- func (piq *PlayerIdentifierQuery) Count(ctx context.Context) (int, error)
- func (piq *PlayerIdentifierQuery) CountX(ctx context.Context) int
- func (piq *PlayerIdentifierQuery) Exist(ctx context.Context) (bool, error)
- func (piq *PlayerIdentifierQuery) ExistX(ctx context.Context) bool
- func (piq *PlayerIdentifierQuery) First(ctx context.Context) (*PlayerIdentifier, error)
- func (piq *PlayerIdentifierQuery) FirstID(ctx context.Context) (id int, err error)
- func (piq *PlayerIdentifierQuery) FirstIDX(ctx context.Context) int
- func (piq *PlayerIdentifierQuery) FirstX(ctx context.Context) *PlayerIdentifier
- func (piq *PlayerIdentifierQuery) GroupBy(field string, fields ...string) *PlayerIdentifierGroupBy
- func (piq *PlayerIdentifierQuery) IDs(ctx context.Context) ([]int, error)
- func (piq *PlayerIdentifierQuery) IDsX(ctx context.Context) []int
- func (piq *PlayerIdentifierQuery) Limit(limit int) *PlayerIdentifierQuery
- func (piq *PlayerIdentifierQuery) Offset(offset int) *PlayerIdentifierQuery
- func (piq *PlayerIdentifierQuery) Only(ctx context.Context) (*PlayerIdentifier, error)
- func (piq *PlayerIdentifierQuery) OnlyID(ctx context.Context) (id int, err error)
- func (piq *PlayerIdentifierQuery) OnlyIDX(ctx context.Context) int
- func (piq *PlayerIdentifierQuery) OnlyX(ctx context.Context) *PlayerIdentifier
- func (piq *PlayerIdentifierQuery) Order(o ...OrderFunc) *PlayerIdentifierQuery
- func (pi *PlayerIdentifierQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*PlayerIdentifierConnection, error)
- func (piq *PlayerIdentifierQuery) QueryMetadata() *MetadataQuery
- func (piq *PlayerIdentifierQuery) QueryPlayer() *PlayerQuery
- func (piq *PlayerIdentifierQuery) Select(field string, fields ...string) *PlayerIdentifierSelect
- func (piq *PlayerIdentifierQuery) Where(ps ...predicate.PlayerIdentifier) *PlayerIdentifierQuery
- func (piq *PlayerIdentifierQuery) WithMetadata(opts ...func(*MetadataQuery)) *PlayerIdentifierQuery
- func (piq *PlayerIdentifierQuery) WithPlayer(opts ...func(*PlayerQuery)) *PlayerIdentifierQuery
- type PlayerIdentifierSelect
- func (pis *PlayerIdentifierSelect) Bool(ctx context.Context) (_ bool, err error)
- func (pis *PlayerIdentifierSelect) BoolX(ctx context.Context) bool
- func (pis *PlayerIdentifierSelect) Bools(ctx context.Context) ([]bool, error)
- func (pis *PlayerIdentifierSelect) BoolsX(ctx context.Context) []bool
- func (pis *PlayerIdentifierSelect) Float64(ctx context.Context) (_ float64, err error)
- func (pis *PlayerIdentifierSelect) Float64X(ctx context.Context) float64
- func (pis *PlayerIdentifierSelect) Float64s(ctx context.Context) ([]float64, error)
- func (pis *PlayerIdentifierSelect) Float64sX(ctx context.Context) []float64
- func (pis *PlayerIdentifierSelect) Int(ctx context.Context) (_ int, err error)
- func (pis *PlayerIdentifierSelect) IntX(ctx context.Context) int
- func (pis *PlayerIdentifierSelect) Ints(ctx context.Context) ([]int, error)
- func (pis *PlayerIdentifierSelect) IntsX(ctx context.Context) []int
- func (pis *PlayerIdentifierSelect) Scan(ctx context.Context, v interface{}) error
- func (pis *PlayerIdentifierSelect) ScanX(ctx context.Context, v interface{})
- func (pis *PlayerIdentifierSelect) String(ctx context.Context) (_ string, err error)
- func (pis *PlayerIdentifierSelect) StringX(ctx context.Context) string
- func (pis *PlayerIdentifierSelect) Strings(ctx context.Context) ([]string, error)
- func (pis *PlayerIdentifierSelect) StringsX(ctx context.Context) []string
- type PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) ClearMetadata() *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) ClearPlayer() *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) Exec(ctx context.Context) error
- func (piu *PlayerIdentifierUpdate) ExecX(ctx context.Context)
- func (piu *PlayerIdentifierUpdate) Mutation() *PlayerIdentifierMutation
- func (piu *PlayerIdentifierUpdate) Save(ctx context.Context) (int, error)
- func (piu *PlayerIdentifierUpdate) SaveX(ctx context.Context) int
- func (piu *PlayerIdentifierUpdate) SetIdentifier(s string) *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) SetMetadata(m *Metadata) *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) SetMetadataID(id int) *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) SetNillableMetadataID(id *int) *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) SetNillablePlayerID(id *int) *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) SetPlayer(p *Player) *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) SetPlayerID(id int) *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) SetType(s string) *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) SetUpdatedAt(t time.Time) *PlayerIdentifierUpdate
- func (piu *PlayerIdentifierUpdate) Where(ps ...predicate.PlayerIdentifier) *PlayerIdentifierUpdate
- type PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) ClearMetadata() *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) ClearPlayer() *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) Exec(ctx context.Context) error
- func (piuo *PlayerIdentifierUpdateOne) ExecX(ctx context.Context)
- func (piuo *PlayerIdentifierUpdateOne) Mutation() *PlayerIdentifierMutation
- func (piuo *PlayerIdentifierUpdateOne) Save(ctx context.Context) (*PlayerIdentifier, error)
- func (piuo *PlayerIdentifierUpdateOne) SaveX(ctx context.Context) *PlayerIdentifier
- func (piuo *PlayerIdentifierUpdateOne) SetIdentifier(s string) *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) SetMetadata(m *Metadata) *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) SetMetadataID(id int) *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) SetNillableMetadataID(id *int) *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) SetNillablePlayerID(id *int) *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) SetPlayer(p *Player) *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) SetPlayerID(id int) *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) SetType(s string) *PlayerIdentifierUpdateOne
- func (piuo *PlayerIdentifierUpdateOne) SetUpdatedAt(t time.Time) *PlayerIdentifierUpdateOne
- type PlayerIdentifiers
- type PlayerMutation
- func (m *PlayerMutation) AddField(name string, value ent.Value) error
- func (m *PlayerMutation) AddIdentifierIDs(ids ...int)
- func (m *PlayerMutation) AddServerIDs(ids ...int)
- func (m *PlayerMutation) AddTotalMinutes(i int)
- func (m *PlayerMutation) AddedEdges() []string
- func (m *PlayerMutation) AddedField(name string) (ent.Value, bool)
- func (m *PlayerMutation) AddedFields() []string
- func (m *PlayerMutation) AddedIDs(name string) []ent.Value
- func (m *PlayerMutation) AddedTotalMinutes() (r int, exists bool)
- func (m *PlayerMutation) ClearEdge(name string) error
- func (m *PlayerMutation) ClearField(name string) error
- func (m *PlayerMutation) ClearIdentifiers()
- func (m *PlayerMutation) ClearLastSeenAt()
- func (m *PlayerMutation) ClearMetadata()
- func (m *PlayerMutation) ClearServers()
- func (m *PlayerMutation) ClearSessionEndedAt()
- func (m *PlayerMutation) ClearSessionStartedAt()
- func (m *PlayerMutation) ClearUser()
- func (m *PlayerMutation) ClearedEdges() []string
- func (m *PlayerMutation) ClearedFields() []string
- func (m PlayerMutation) Client() *Client
- func (m *PlayerMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PlayerMutation) EdgeCleared(name string) bool
- func (m *PlayerMutation) Field(name string) (ent.Value, bool)
- func (m *PlayerMutation) FieldCleared(name string) bool
- func (m *PlayerMutation) Fields() []string
- func (m *PlayerMutation) ID() (id int, exists bool)
- func (m *PlayerMutation) IdentifiersCleared() bool
- func (m *PlayerMutation) IdentifiersIDs() (ids []int)
- func (m *PlayerMutation) LastSeenAt() (r time.Time, exists bool)
- func (m *PlayerMutation) LastSeenAtCleared() bool
- func (m *PlayerMutation) MetadataCleared() bool
- func (m *PlayerMutation) MetadataID() (id int, exists bool)
- func (m *PlayerMutation) MetadataIDs() (ids []int)
- func (m *PlayerMutation) Name() (r string, exists bool)
- func (m *PlayerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PlayerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PlayerMutation) OldLastSeenAt(ctx context.Context) (v *time.Time, err error)
- func (m *PlayerMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PlayerMutation) OldSessionEndedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PlayerMutation) OldSessionStartedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PlayerMutation) OldTotalMinutes(ctx context.Context) (v int, err error)
- func (m *PlayerMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PlayerMutation) Op() Op
- func (m *PlayerMutation) RemoveIdentifierIDs(ids ...int)
- func (m *PlayerMutation) RemoveServerIDs(ids ...int)
- func (m *PlayerMutation) RemovedEdges() []string
- func (m *PlayerMutation) RemovedIDs(name string) []ent.Value
- func (m *PlayerMutation) RemovedIdentifiersIDs() (ids []int)
- func (m *PlayerMutation) RemovedServersIDs() (ids []int)
- func (m *PlayerMutation) ResetCreatedAt()
- func (m *PlayerMutation) ResetEdge(name string) error
- func (m *PlayerMutation) ResetField(name string) error
- func (m *PlayerMutation) ResetIdentifiers()
- func (m *PlayerMutation) ResetLastSeenAt()
- func (m *PlayerMutation) ResetMetadata()
- func (m *PlayerMutation) ResetName()
- func (m *PlayerMutation) ResetServers()
- func (m *PlayerMutation) ResetSessionEndedAt()
- func (m *PlayerMutation) ResetSessionStartedAt()
- func (m *PlayerMutation) ResetTotalMinutes()
- func (m *PlayerMutation) ResetUpdatedAt()
- func (m *PlayerMutation) ResetUser()
- func (m *PlayerMutation) ServersCleared() bool
- func (m *PlayerMutation) ServersIDs() (ids []int)
- func (m *PlayerMutation) SessionEndedAt() (r time.Time, exists bool)
- func (m *PlayerMutation) SessionEndedAtCleared() bool
- func (m *PlayerMutation) SessionStartedAt() (r time.Time, exists bool)
- func (m *PlayerMutation) SessionStartedAtCleared() bool
- func (m *PlayerMutation) SetCreatedAt(t time.Time)
- func (m *PlayerMutation) SetField(name string, value ent.Value) error
- func (m *PlayerMutation) SetLastSeenAt(t time.Time)
- func (m *PlayerMutation) SetMetadataID(id int)
- func (m *PlayerMutation) SetName(s string)
- func (m *PlayerMutation) SetSessionEndedAt(t time.Time)
- func (m *PlayerMutation) SetSessionStartedAt(t time.Time)
- func (m *PlayerMutation) SetTotalMinutes(i int)
- func (m *PlayerMutation) SetUpdatedAt(t time.Time)
- func (m *PlayerMutation) SetUserID(id int)
- func (m *PlayerMutation) TotalMinutes() (r int, exists bool)
- func (m PlayerMutation) Tx() (*Tx, error)
- func (m *PlayerMutation) Type() string
- func (m *PlayerMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PlayerMutation) UserCleared() bool
- func (m *PlayerMutation) UserID() (id int, exists bool)
- func (m *PlayerMutation) UserIDs() (ids []int)
- type PlayerOrder
- type PlayerOrderField
- type PlayerPaginateOption
- type PlayerQuery
- func (pq *PlayerQuery) All(ctx context.Context) ([]*Player, error)
- func (pq *PlayerQuery) AllX(ctx context.Context) []*Player
- func (pq *PlayerQuery) Clone() *PlayerQuery
- func (pl *PlayerQuery) CollectFields(ctx context.Context, satisfies ...string) *PlayerQuery
- func (pq *PlayerQuery) Count(ctx context.Context) (int, error)
- func (pq *PlayerQuery) CountX(ctx context.Context) int
- func (pq *PlayerQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PlayerQuery) ExistX(ctx context.Context) bool
- func (pq *PlayerQuery) First(ctx context.Context) (*Player, error)
- func (pq *PlayerQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PlayerQuery) FirstIDX(ctx context.Context) int
- func (pq *PlayerQuery) FirstX(ctx context.Context) *Player
- func (pq *PlayerQuery) GroupBy(field string, fields ...string) *PlayerGroupBy
- func (pq *PlayerQuery) IDs(ctx context.Context) ([]int, error)
- func (pq *PlayerQuery) IDsX(ctx context.Context) []int
- func (pq *PlayerQuery) Limit(limit int) *PlayerQuery
- func (pq *PlayerQuery) Offset(offset int) *PlayerQuery
- func (pq *PlayerQuery) Only(ctx context.Context) (*Player, error)
- func (pq *PlayerQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PlayerQuery) OnlyIDX(ctx context.Context) int
- func (pq *PlayerQuery) OnlyX(ctx context.Context) *Player
- func (pq *PlayerQuery) Order(o ...OrderFunc) *PlayerQuery
- func (pl *PlayerQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*PlayerConnection, error)
- func (pq *PlayerQuery) QueryIdentifiers() *PlayerIdentifierQuery
- func (pq *PlayerQuery) QueryMetadata() *MetadataQuery
- func (pq *PlayerQuery) QueryServers() *ServerQuery
- func (pq *PlayerQuery) QueryUser() *UserQuery
- func (pq *PlayerQuery) Select(field string, fields ...string) *PlayerSelect
- func (pq *PlayerQuery) Where(ps ...predicate.Player) *PlayerQuery
- func (pq *PlayerQuery) WithIdentifiers(opts ...func(*PlayerIdentifierQuery)) *PlayerQuery
- func (pq *PlayerQuery) WithMetadata(opts ...func(*MetadataQuery)) *PlayerQuery
- func (pq *PlayerQuery) WithServers(opts ...func(*ServerQuery)) *PlayerQuery
- func (pq *PlayerQuery) WithUser(opts ...func(*UserQuery)) *PlayerQuery
- type PlayerSelect
- func (ps *PlayerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ps *PlayerSelect) BoolX(ctx context.Context) bool
- func (ps *PlayerSelect) Bools(ctx context.Context) ([]bool, error)
- func (ps *PlayerSelect) BoolsX(ctx context.Context) []bool
- func (ps *PlayerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ps *PlayerSelect) Float64X(ctx context.Context) float64
- func (ps *PlayerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ps *PlayerSelect) Float64sX(ctx context.Context) []float64
- func (ps *PlayerSelect) Int(ctx context.Context) (_ int, err error)
- func (ps *PlayerSelect) IntX(ctx context.Context) int
- func (ps *PlayerSelect) Ints(ctx context.Context) ([]int, error)
- func (ps *PlayerSelect) IntsX(ctx context.Context) []int
- func (ps *PlayerSelect) Scan(ctx context.Context, v interface{}) error
- func (ps *PlayerSelect) ScanX(ctx context.Context, v interface{})
- func (ps *PlayerSelect) String(ctx context.Context) (_ string, err error)
- func (ps *PlayerSelect) StringX(ctx context.Context) string
- func (ps *PlayerSelect) Strings(ctx context.Context) ([]string, error)
- func (ps *PlayerSelect) StringsX(ctx context.Context) []string
- type PlayerUpdate
- func (pu *PlayerUpdate) AddIdentifierIDs(ids ...int) *PlayerUpdate
- func (pu *PlayerUpdate) AddIdentifiers(p ...*PlayerIdentifier) *PlayerUpdate
- func (pu *PlayerUpdate) AddServerIDs(ids ...int) *PlayerUpdate
- func (pu *PlayerUpdate) AddServers(s ...*Server) *PlayerUpdate
- func (pu *PlayerUpdate) AddTotalMinutes(i int) *PlayerUpdate
- func (pu *PlayerUpdate) ClearIdentifiers() *PlayerUpdate
- func (pu *PlayerUpdate) ClearLastSeenAt() *PlayerUpdate
- func (pu *PlayerUpdate) ClearMetadata() *PlayerUpdate
- func (pu *PlayerUpdate) ClearServers() *PlayerUpdate
- func (pu *PlayerUpdate) ClearSessionEndedAt() *PlayerUpdate
- func (pu *PlayerUpdate) ClearSessionStartedAt() *PlayerUpdate
- func (pu *PlayerUpdate) ClearUser() *PlayerUpdate
- func (pu *PlayerUpdate) Exec(ctx context.Context) error
- func (pu *PlayerUpdate) ExecX(ctx context.Context)
- func (pu *PlayerUpdate) Mutation() *PlayerMutation
- func (pu *PlayerUpdate) RemoveIdentifierIDs(ids ...int) *PlayerUpdate
- func (pu *PlayerUpdate) RemoveIdentifiers(p ...*PlayerIdentifier) *PlayerUpdate
- func (pu *PlayerUpdate) RemoveServerIDs(ids ...int) *PlayerUpdate
- func (pu *PlayerUpdate) RemoveServers(s ...*Server) *PlayerUpdate
- func (pu *PlayerUpdate) Save(ctx context.Context) (int, error)
- func (pu *PlayerUpdate) SaveX(ctx context.Context) int
- func (pu *PlayerUpdate) SetLastSeenAt(t time.Time) *PlayerUpdate
- func (pu *PlayerUpdate) SetMetadata(m *Metadata) *PlayerUpdate
- func (pu *PlayerUpdate) SetMetadataID(id int) *PlayerUpdate
- func (pu *PlayerUpdate) SetName(s string) *PlayerUpdate
- func (pu *PlayerUpdate) SetNillableLastSeenAt(t *time.Time) *PlayerUpdate
- func (pu *PlayerUpdate) SetNillableMetadataID(id *int) *PlayerUpdate
- func (pu *PlayerUpdate) SetNillableSessionEndedAt(t *time.Time) *PlayerUpdate
- func (pu *PlayerUpdate) SetNillableSessionStartedAt(t *time.Time) *PlayerUpdate
- func (pu *PlayerUpdate) SetNillableTotalMinutes(i *int) *PlayerUpdate
- func (pu *PlayerUpdate) SetNillableUserID(id *int) *PlayerUpdate
- func (pu *PlayerUpdate) SetSessionEndedAt(t time.Time) *PlayerUpdate
- func (pu *PlayerUpdate) SetSessionStartedAt(t time.Time) *PlayerUpdate
- func (pu *PlayerUpdate) SetTotalMinutes(i int) *PlayerUpdate
- func (pu *PlayerUpdate) SetUpdatedAt(t time.Time) *PlayerUpdate
- func (pu *PlayerUpdate) SetUser(u *User) *PlayerUpdate
- func (pu *PlayerUpdate) SetUserID(id int) *PlayerUpdate
- func (pu *PlayerUpdate) Where(ps ...predicate.Player) *PlayerUpdate
- type PlayerUpdateOne
- func (puo *PlayerUpdateOne) AddIdentifierIDs(ids ...int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) AddIdentifiers(p ...*PlayerIdentifier) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) AddServerIDs(ids ...int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) AddServers(s ...*Server) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) AddTotalMinutes(i int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) ClearIdentifiers() *PlayerUpdateOne
- func (puo *PlayerUpdateOne) ClearLastSeenAt() *PlayerUpdateOne
- func (puo *PlayerUpdateOne) ClearMetadata() *PlayerUpdateOne
- func (puo *PlayerUpdateOne) ClearServers() *PlayerUpdateOne
- func (puo *PlayerUpdateOne) ClearSessionEndedAt() *PlayerUpdateOne
- func (puo *PlayerUpdateOne) ClearSessionStartedAt() *PlayerUpdateOne
- func (puo *PlayerUpdateOne) ClearUser() *PlayerUpdateOne
- func (puo *PlayerUpdateOne) Exec(ctx context.Context) error
- func (puo *PlayerUpdateOne) ExecX(ctx context.Context)
- func (puo *PlayerUpdateOne) Mutation() *PlayerMutation
- func (puo *PlayerUpdateOne) RemoveIdentifierIDs(ids ...int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) RemoveIdentifiers(p ...*PlayerIdentifier) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) RemoveServerIDs(ids ...int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) RemoveServers(s ...*Server) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) Save(ctx context.Context) (*Player, error)
- func (puo *PlayerUpdateOne) SaveX(ctx context.Context) *Player
- func (puo *PlayerUpdateOne) SetLastSeenAt(t time.Time) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetMetadata(m *Metadata) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetMetadataID(id int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetName(s string) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetNillableLastSeenAt(t *time.Time) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetNillableMetadataID(id *int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetNillableSessionEndedAt(t *time.Time) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetNillableSessionStartedAt(t *time.Time) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetNillableTotalMinutes(i *int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetNillableUserID(id *int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetSessionEndedAt(t time.Time) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetSessionStartedAt(t time.Time) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetTotalMinutes(i int) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetUpdatedAt(t time.Time) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetUser(u *User) *PlayerUpdateOne
- func (puo *PlayerUpdateOne) SetUserID(id int) *PlayerUpdateOne
- type Players
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Server
- func (s *Server) MapType(ctx context.Context) (*MapType, error)
- func (s *Server) Metadata(ctx context.Context) (*Metadata, error)
- func (s *Server) Node(ctx context.Context) (node *Node, err error)
- func (s *Server) Players(ctx context.Context) ([]*Player, error)
- func (s *Server) QueryMapType() *MapTypeQuery
- func (s *Server) QueryMetadata() *MetadataQuery
- func (s *Server) QueryPlayers() *PlayerQuery
- func (s *Server) QueryServerType() *ServerTypeQuery
- func (s *Server) ServerType(ctx context.Context) (*ServerType, error)
- func (s *Server) String() string
- func (s *Server) ToEdge(order *ServerOrder) *ServerEdge
- func (s *Server) Unwrap() *Server
- func (s *Server) Update() *ServerUpdateOne
- type ServerClient
- func (c *ServerClient) Create() *ServerCreate
- func (c *ServerClient) CreateBulk(builders ...*ServerCreate) *ServerCreateBulk
- func (c *ServerClient) Delete() *ServerDelete
- func (c *ServerClient) DeleteOne(s *Server) *ServerDeleteOne
- func (c *ServerClient) DeleteOneID(id int) *ServerDeleteOne
- func (c *ServerClient) Get(ctx context.Context, id int) (*Server, error)
- func (c *ServerClient) GetX(ctx context.Context, id int) *Server
- func (c *ServerClient) Hooks() []Hook
- func (c *ServerClient) Query() *ServerQuery
- func (c *ServerClient) QueryMapType(s *Server) *MapTypeQuery
- func (c *ServerClient) QueryMetadata(s *Server) *MetadataQuery
- func (c *ServerClient) QueryPlayers(s *Server) *PlayerQuery
- func (c *ServerClient) QueryServerType(s *Server) *ServerTypeQuery
- func (c *ServerClient) Update() *ServerUpdate
- func (c *ServerClient) UpdateOne(s *Server) *ServerUpdateOne
- func (c *ServerClient) UpdateOneID(id int) *ServerUpdateOne
- func (c *ServerClient) Use(hooks ...Hook)
- type ServerConnection
- type ServerCreate
- func (sc *ServerCreate) AddPlayerIDs(ids ...int) *ServerCreate
- func (sc *ServerCreate) AddPlayers(p ...*Player) *ServerCreate
- func (sc *ServerCreate) Mutation() *ServerMutation
- func (sc *ServerCreate) Save(ctx context.Context) (*Server, error)
- func (sc *ServerCreate) SaveX(ctx context.Context) *Server
- func (sc *ServerCreate) SetAPIAddress(s string) *ServerCreate
- func (sc *ServerCreate) SetAPIPort(s string) *ServerCreate
- func (sc *ServerCreate) SetAPISecret(s string) *ServerCreate
- func (sc *ServerCreate) SetAPIUsername(s string) *ServerCreate
- func (sc *ServerCreate) SetCreatedAt(t time.Time) *ServerCreate
- func (sc *ServerCreate) SetMapType(m *MapType) *ServerCreate
- func (sc *ServerCreate) SetMapTypeID(id int) *ServerCreate
- func (sc *ServerCreate) SetMetadata(m *Metadata) *ServerCreate
- func (sc *ServerCreate) SetMetadataID(id int) *ServerCreate
- func (sc *ServerCreate) SetName(s string) *ServerCreate
- func (sc *ServerCreate) SetNillableAPIAddress(s *string) *ServerCreate
- func (sc *ServerCreate) SetNillableAPIPort(s *string) *ServerCreate
- func (sc *ServerCreate) SetNillableAPISecret(s *string) *ServerCreate
- func (sc *ServerCreate) SetNillableAPIUsername(s *string) *ServerCreate
- func (sc *ServerCreate) SetNillableCreatedAt(t *time.Time) *ServerCreate
- func (sc *ServerCreate) SetNillableMapTypeID(id *int) *ServerCreate
- func (sc *ServerCreate) SetNillableMetadataID(id *int) *ServerCreate
- func (sc *ServerCreate) SetNillableServerTypeID(id *int) *ServerCreate
- func (sc *ServerCreate) SetNillableUpdatedAt(t *time.Time) *ServerCreate
- func (sc *ServerCreate) SetServerType(s *ServerType) *ServerCreate
- func (sc *ServerCreate) SetServerTypeID(id int) *ServerCreate
- func (sc *ServerCreate) SetUpdatedAt(t time.Time) *ServerCreate
- type ServerCreateBulk
- type ServerDelete
- type ServerDeleteOne
- type ServerEdge
- type ServerEdges
- type ServerGroupBy
- func (sgb *ServerGroupBy) Aggregate(fns ...AggregateFunc) *ServerGroupBy
- func (sgb *ServerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sgb *ServerGroupBy) BoolX(ctx context.Context) bool
- func (sgb *ServerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *ServerGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *ServerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sgb *ServerGroupBy) Float64X(ctx context.Context) float64
- func (sgb *ServerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *ServerGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *ServerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sgb *ServerGroupBy) IntX(ctx context.Context) int
- func (sgb *ServerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *ServerGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ServerGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *ServerGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *ServerGroupBy) String(ctx context.Context) (_ string, err error)
- func (sgb *ServerGroupBy) StringX(ctx context.Context) string
- func (sgb *ServerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *ServerGroupBy) StringsX(ctx context.Context) []string
- type ServerMutation
- func (m *ServerMutation) APIAddress() (r string, exists bool)
- func (m *ServerMutation) APIAddressCleared() bool
- func (m *ServerMutation) APIPort() (r string, exists bool)
- func (m *ServerMutation) APIPortCleared() bool
- func (m *ServerMutation) APISecret() (r string, exists bool)
- func (m *ServerMutation) APISecretCleared() bool
- func (m *ServerMutation) APIUsername() (r string, exists bool)
- func (m *ServerMutation) APIUsernameCleared() bool
- func (m *ServerMutation) AddField(name string, value ent.Value) error
- func (m *ServerMutation) AddPlayerIDs(ids ...int)
- func (m *ServerMutation) AddedEdges() []string
- func (m *ServerMutation) AddedField(name string) (ent.Value, bool)
- func (m *ServerMutation) AddedFields() []string
- func (m *ServerMutation) AddedIDs(name string) []ent.Value
- func (m *ServerMutation) ClearAPIAddress()
- func (m *ServerMutation) ClearAPIPort()
- func (m *ServerMutation) ClearAPISecret()
- func (m *ServerMutation) ClearAPIUsername()
- func (m *ServerMutation) ClearEdge(name string) error
- func (m *ServerMutation) ClearField(name string) error
- func (m *ServerMutation) ClearMapType()
- func (m *ServerMutation) ClearMetadata()
- func (m *ServerMutation) ClearPlayers()
- func (m *ServerMutation) ClearServerType()
- func (m *ServerMutation) ClearedEdges() []string
- func (m *ServerMutation) ClearedFields() []string
- func (m ServerMutation) Client() *Client
- func (m *ServerMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ServerMutation) EdgeCleared(name string) bool
- func (m *ServerMutation) Field(name string) (ent.Value, bool)
- func (m *ServerMutation) FieldCleared(name string) bool
- func (m *ServerMutation) Fields() []string
- func (m *ServerMutation) ID() (id int, exists bool)
- func (m *ServerMutation) MapTypeCleared() bool
- func (m *ServerMutation) MapTypeID() (id int, exists bool)
- func (m *ServerMutation) MapTypeIDs() (ids []int)
- func (m *ServerMutation) MetadataCleared() bool
- func (m *ServerMutation) MetadataID() (id int, exists bool)
- func (m *ServerMutation) MetadataIDs() (ids []int)
- func (m *ServerMutation) Name() (r string, exists bool)
- func (m *ServerMutation) OldAPIAddress(ctx context.Context) (v *string, err error)
- func (m *ServerMutation) OldAPIPort(ctx context.Context) (v *string, err error)
- func (m *ServerMutation) OldAPISecret(ctx context.Context) (v *string, err error)
- func (m *ServerMutation) OldAPIUsername(ctx context.Context) (v *string, err error)
- func (m *ServerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ServerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ServerMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ServerMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ServerMutation) Op() Op
- func (m *ServerMutation) PlayersCleared() bool
- func (m *ServerMutation) PlayersIDs() (ids []int)
- func (m *ServerMutation) RemovePlayerIDs(ids ...int)
- func (m *ServerMutation) RemovedEdges() []string
- func (m *ServerMutation) RemovedIDs(name string) []ent.Value
- func (m *ServerMutation) RemovedPlayersIDs() (ids []int)
- func (m *ServerMutation) ResetAPIAddress()
- func (m *ServerMutation) ResetAPIPort()
- func (m *ServerMutation) ResetAPISecret()
- func (m *ServerMutation) ResetAPIUsername()
- func (m *ServerMutation) ResetCreatedAt()
- func (m *ServerMutation) ResetEdge(name string) error
- func (m *ServerMutation) ResetField(name string) error
- func (m *ServerMutation) ResetMapType()
- func (m *ServerMutation) ResetMetadata()
- func (m *ServerMutation) ResetName()
- func (m *ServerMutation) ResetPlayers()
- func (m *ServerMutation) ResetServerType()
- func (m *ServerMutation) ResetUpdatedAt()
- func (m *ServerMutation) ServerTypeCleared() bool
- func (m *ServerMutation) ServerTypeID() (id int, exists bool)
- func (m *ServerMutation) ServerTypeIDs() (ids []int)
- func (m *ServerMutation) SetAPIAddress(s string)
- func (m *ServerMutation) SetAPIPort(s string)
- func (m *ServerMutation) SetAPISecret(s string)
- func (m *ServerMutation) SetAPIUsername(s string)
- func (m *ServerMutation) SetCreatedAt(t time.Time)
- func (m *ServerMutation) SetField(name string, value ent.Value) error
- func (m *ServerMutation) SetMapTypeID(id int)
- func (m *ServerMutation) SetMetadataID(id int)
- func (m *ServerMutation) SetName(s string)
- func (m *ServerMutation) SetServerTypeID(id int)
- func (m *ServerMutation) SetUpdatedAt(t time.Time)
- func (m ServerMutation) Tx() (*Tx, error)
- func (m *ServerMutation) Type() string
- func (m *ServerMutation) UpdatedAt() (r time.Time, exists bool)
- type ServerOrder
- type ServerOrderField
- type ServerPaginateOption
- type ServerQuery
- func (sq *ServerQuery) All(ctx context.Context) ([]*Server, error)
- func (sq *ServerQuery) AllX(ctx context.Context) []*Server
- func (sq *ServerQuery) Clone() *ServerQuery
- func (s *ServerQuery) CollectFields(ctx context.Context, satisfies ...string) *ServerQuery
- func (sq *ServerQuery) Count(ctx context.Context) (int, error)
- func (sq *ServerQuery) CountX(ctx context.Context) int
- func (sq *ServerQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ServerQuery) ExistX(ctx context.Context) bool
- func (sq *ServerQuery) First(ctx context.Context) (*Server, error)
- func (sq *ServerQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *ServerQuery) FirstIDX(ctx context.Context) int
- func (sq *ServerQuery) FirstX(ctx context.Context) *Server
- func (sq *ServerQuery) GroupBy(field string, fields ...string) *ServerGroupBy
- func (sq *ServerQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *ServerQuery) IDsX(ctx context.Context) []int
- func (sq *ServerQuery) Limit(limit int) *ServerQuery
- func (sq *ServerQuery) Offset(offset int) *ServerQuery
- func (sq *ServerQuery) Only(ctx context.Context) (*Server, error)
- func (sq *ServerQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *ServerQuery) OnlyIDX(ctx context.Context) int
- func (sq *ServerQuery) OnlyX(ctx context.Context) *Server
- func (sq *ServerQuery) Order(o ...OrderFunc) *ServerQuery
- func (s *ServerQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*ServerConnection, error)
- func (sq *ServerQuery) QueryMapType() *MapTypeQuery
- func (sq *ServerQuery) QueryMetadata() *MetadataQuery
- func (sq *ServerQuery) QueryPlayers() *PlayerQuery
- func (sq *ServerQuery) QueryServerType() *ServerTypeQuery
- func (sq *ServerQuery) Select(field string, fields ...string) *ServerSelect
- func (sq *ServerQuery) Where(ps ...predicate.Server) *ServerQuery
- func (sq *ServerQuery) WithMapType(opts ...func(*MapTypeQuery)) *ServerQuery
- func (sq *ServerQuery) WithMetadata(opts ...func(*MetadataQuery)) *ServerQuery
- func (sq *ServerQuery) WithPlayers(opts ...func(*PlayerQuery)) *ServerQuery
- func (sq *ServerQuery) WithServerType(opts ...func(*ServerTypeQuery)) *ServerQuery
- type ServerSelect
- func (ss *ServerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ss *ServerSelect) BoolX(ctx context.Context) bool
- func (ss *ServerSelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *ServerSelect) BoolsX(ctx context.Context) []bool
- func (ss *ServerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ss *ServerSelect) Float64X(ctx context.Context) float64
- func (ss *ServerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *ServerSelect) Float64sX(ctx context.Context) []float64
- func (ss *ServerSelect) Int(ctx context.Context) (_ int, err error)
- func (ss *ServerSelect) IntX(ctx context.Context) int
- func (ss *ServerSelect) Ints(ctx context.Context) ([]int, error)
- func (ss *ServerSelect) IntsX(ctx context.Context) []int
- func (ss *ServerSelect) Scan(ctx context.Context, v interface{}) error
- func (ss *ServerSelect) ScanX(ctx context.Context, v interface{})
- func (ss *ServerSelect) String(ctx context.Context) (_ string, err error)
- func (ss *ServerSelect) StringX(ctx context.Context) string
- func (ss *ServerSelect) Strings(ctx context.Context) ([]string, error)
- func (ss *ServerSelect) StringsX(ctx context.Context) []string
- type ServerType
- func (st *ServerType) Node(ctx context.Context) (node *Node, err error)
- func (st *ServerType) QueryServers() *ServerQuery
- func (st *ServerType) Servers(ctx context.Context) ([]*Server, error)
- func (st *ServerType) String() string
- func (st *ServerType) ToEdge(order *ServerTypeOrder) *ServerTypeEdge
- func (st *ServerType) Unwrap() *ServerType
- func (st *ServerType) Update() *ServerTypeUpdateOne
- type ServerTypeClient
- func (c *ServerTypeClient) Create() *ServerTypeCreate
- func (c *ServerTypeClient) CreateBulk(builders ...*ServerTypeCreate) *ServerTypeCreateBulk
- func (c *ServerTypeClient) Delete() *ServerTypeDelete
- func (c *ServerTypeClient) DeleteOne(st *ServerType) *ServerTypeDeleteOne
- func (c *ServerTypeClient) DeleteOneID(id int) *ServerTypeDeleteOne
- func (c *ServerTypeClient) Get(ctx context.Context, id int) (*ServerType, error)
- func (c *ServerTypeClient) GetX(ctx context.Context, id int) *ServerType
- func (c *ServerTypeClient) Hooks() []Hook
- func (c *ServerTypeClient) Query() *ServerTypeQuery
- func (c *ServerTypeClient) QueryServers(st *ServerType) *ServerQuery
- func (c *ServerTypeClient) Update() *ServerTypeUpdate
- func (c *ServerTypeClient) UpdateOne(st *ServerType) *ServerTypeUpdateOne
- func (c *ServerTypeClient) UpdateOneID(id int) *ServerTypeUpdateOne
- func (c *ServerTypeClient) Use(hooks ...Hook)
- type ServerTypeConnection
- type ServerTypeCreate
- func (stc *ServerTypeCreate) AddServerIDs(ids ...int) *ServerTypeCreate
- func (stc *ServerTypeCreate) AddServers(s ...*Server) *ServerTypeCreate
- func (stc *ServerTypeCreate) Mutation() *ServerTypeMutation
- func (stc *ServerTypeCreate) Save(ctx context.Context) (*ServerType, error)
- func (stc *ServerTypeCreate) SaveX(ctx context.Context) *ServerType
- func (stc *ServerTypeCreate) SetDescription(s string) *ServerTypeCreate
- func (stc *ServerTypeCreate) SetKey(s string) *ServerTypeCreate
- func (stc *ServerTypeCreate) SetName(s string) *ServerTypeCreate
- func (stc *ServerTypeCreate) SetNillableDescription(s *string) *ServerTypeCreate
- type ServerTypeCreateBulk
- type ServerTypeDelete
- type ServerTypeDeleteOne
- type ServerTypeEdge
- type ServerTypeEdges
- type ServerTypeGroupBy
- func (stgb *ServerTypeGroupBy) Aggregate(fns ...AggregateFunc) *ServerTypeGroupBy
- func (stgb *ServerTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (stgb *ServerTypeGroupBy) BoolX(ctx context.Context) bool
- func (stgb *ServerTypeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (stgb *ServerTypeGroupBy) BoolsX(ctx context.Context) []bool
- func (stgb *ServerTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (stgb *ServerTypeGroupBy) Float64X(ctx context.Context) float64
- func (stgb *ServerTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (stgb *ServerTypeGroupBy) Float64sX(ctx context.Context) []float64
- func (stgb *ServerTypeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (stgb *ServerTypeGroupBy) IntX(ctx context.Context) int
- func (stgb *ServerTypeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (stgb *ServerTypeGroupBy) IntsX(ctx context.Context) []int
- func (stgb *ServerTypeGroupBy) Scan(ctx context.Context, v interface{}) error
- func (stgb *ServerTypeGroupBy) ScanX(ctx context.Context, v interface{})
- func (stgb *ServerTypeGroupBy) String(ctx context.Context) (_ string, err error)
- func (stgb *ServerTypeGroupBy) StringX(ctx context.Context) string
- func (stgb *ServerTypeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (stgb *ServerTypeGroupBy) StringsX(ctx context.Context) []string
- type ServerTypeMutation
- func (m *ServerTypeMutation) AddField(name string, value ent.Value) error
- func (m *ServerTypeMutation) AddServerIDs(ids ...int)
- func (m *ServerTypeMutation) AddedEdges() []string
- func (m *ServerTypeMutation) AddedField(name string) (ent.Value, bool)
- func (m *ServerTypeMutation) AddedFields() []string
- func (m *ServerTypeMutation) AddedIDs(name string) []ent.Value
- func (m *ServerTypeMutation) ClearDescription()
- func (m *ServerTypeMutation) ClearEdge(name string) error
- func (m *ServerTypeMutation) ClearField(name string) error
- func (m *ServerTypeMutation) ClearServers()
- func (m *ServerTypeMutation) ClearedEdges() []string
- func (m *ServerTypeMutation) ClearedFields() []string
- func (m ServerTypeMutation) Client() *Client
- func (m *ServerTypeMutation) Description() (r string, exists bool)
- func (m *ServerTypeMutation) DescriptionCleared() bool
- func (m *ServerTypeMutation) EdgeCleared(name string) bool
- func (m *ServerTypeMutation) Field(name string) (ent.Value, bool)
- func (m *ServerTypeMutation) FieldCleared(name string) bool
- func (m *ServerTypeMutation) Fields() []string
- func (m *ServerTypeMutation) ID() (id int, exists bool)
- func (m *ServerTypeMutation) Key() (r string, exists bool)
- func (m *ServerTypeMutation) Name() (r string, exists bool)
- func (m *ServerTypeMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *ServerTypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ServerTypeMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *ServerTypeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ServerTypeMutation) Op() Op
- func (m *ServerTypeMutation) RemoveServerIDs(ids ...int)
- func (m *ServerTypeMutation) RemovedEdges() []string
- func (m *ServerTypeMutation) RemovedIDs(name string) []ent.Value
- func (m *ServerTypeMutation) RemovedServersIDs() (ids []int)
- func (m *ServerTypeMutation) ResetDescription()
- func (m *ServerTypeMutation) ResetEdge(name string) error
- func (m *ServerTypeMutation) ResetField(name string) error
- func (m *ServerTypeMutation) ResetKey()
- func (m *ServerTypeMutation) ResetName()
- func (m *ServerTypeMutation) ResetServers()
- func (m *ServerTypeMutation) ServersCleared() bool
- func (m *ServerTypeMutation) ServersIDs() (ids []int)
- func (m *ServerTypeMutation) SetDescription(s string)
- func (m *ServerTypeMutation) SetField(name string, value ent.Value) error
- func (m *ServerTypeMutation) SetKey(s string)
- func (m *ServerTypeMutation) SetName(s string)
- func (m ServerTypeMutation) Tx() (*Tx, error)
- func (m *ServerTypeMutation) Type() string
- type ServerTypeOrder
- type ServerTypeOrderField
- type ServerTypePaginateOption
- type ServerTypeQuery
- func (stq *ServerTypeQuery) All(ctx context.Context) ([]*ServerType, error)
- func (stq *ServerTypeQuery) AllX(ctx context.Context) []*ServerType
- func (stq *ServerTypeQuery) Clone() *ServerTypeQuery
- func (st *ServerTypeQuery) CollectFields(ctx context.Context, satisfies ...string) *ServerTypeQuery
- func (stq *ServerTypeQuery) Count(ctx context.Context) (int, error)
- func (stq *ServerTypeQuery) CountX(ctx context.Context) int
- func (stq *ServerTypeQuery) Exist(ctx context.Context) (bool, error)
- func (stq *ServerTypeQuery) ExistX(ctx context.Context) bool
- func (stq *ServerTypeQuery) First(ctx context.Context) (*ServerType, error)
- func (stq *ServerTypeQuery) FirstID(ctx context.Context) (id int, err error)
- func (stq *ServerTypeQuery) FirstIDX(ctx context.Context) int
- func (stq *ServerTypeQuery) FirstX(ctx context.Context) *ServerType
- func (stq *ServerTypeQuery) GroupBy(field string, fields ...string) *ServerTypeGroupBy
- func (stq *ServerTypeQuery) IDs(ctx context.Context) ([]int, error)
- func (stq *ServerTypeQuery) IDsX(ctx context.Context) []int
- func (stq *ServerTypeQuery) Limit(limit int) *ServerTypeQuery
- func (stq *ServerTypeQuery) Offset(offset int) *ServerTypeQuery
- func (stq *ServerTypeQuery) Only(ctx context.Context) (*ServerType, error)
- func (stq *ServerTypeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (stq *ServerTypeQuery) OnlyIDX(ctx context.Context) int
- func (stq *ServerTypeQuery) OnlyX(ctx context.Context) *ServerType
- func (stq *ServerTypeQuery) Order(o ...OrderFunc) *ServerTypeQuery
- func (st *ServerTypeQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*ServerTypeConnection, error)
- func (stq *ServerTypeQuery) QueryServers() *ServerQuery
- func (stq *ServerTypeQuery) Select(field string, fields ...string) *ServerTypeSelect
- func (stq *ServerTypeQuery) Where(ps ...predicate.ServerType) *ServerTypeQuery
- func (stq *ServerTypeQuery) WithServers(opts ...func(*ServerQuery)) *ServerTypeQuery
- type ServerTypeSelect
- func (sts *ServerTypeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (sts *ServerTypeSelect) BoolX(ctx context.Context) bool
- func (sts *ServerTypeSelect) Bools(ctx context.Context) ([]bool, error)
- func (sts *ServerTypeSelect) BoolsX(ctx context.Context) []bool
- func (sts *ServerTypeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (sts *ServerTypeSelect) Float64X(ctx context.Context) float64
- func (sts *ServerTypeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (sts *ServerTypeSelect) Float64sX(ctx context.Context) []float64
- func (sts *ServerTypeSelect) Int(ctx context.Context) (_ int, err error)
- func (sts *ServerTypeSelect) IntX(ctx context.Context) int
- func (sts *ServerTypeSelect) Ints(ctx context.Context) ([]int, error)
- func (sts *ServerTypeSelect) IntsX(ctx context.Context) []int
- func (sts *ServerTypeSelect) Scan(ctx context.Context, v interface{}) error
- func (sts *ServerTypeSelect) ScanX(ctx context.Context, v interface{})
- func (sts *ServerTypeSelect) String(ctx context.Context) (_ string, err error)
- func (sts *ServerTypeSelect) StringX(ctx context.Context) string
- func (sts *ServerTypeSelect) Strings(ctx context.Context) ([]string, error)
- func (sts *ServerTypeSelect) StringsX(ctx context.Context) []string
- type ServerTypeUpdate
- func (stu *ServerTypeUpdate) AddServerIDs(ids ...int) *ServerTypeUpdate
- func (stu *ServerTypeUpdate) AddServers(s ...*Server) *ServerTypeUpdate
- func (stu *ServerTypeUpdate) ClearDescription() *ServerTypeUpdate
- func (stu *ServerTypeUpdate) ClearServers() *ServerTypeUpdate
- func (stu *ServerTypeUpdate) Exec(ctx context.Context) error
- func (stu *ServerTypeUpdate) ExecX(ctx context.Context)
- func (stu *ServerTypeUpdate) Mutation() *ServerTypeMutation
- func (stu *ServerTypeUpdate) RemoveServerIDs(ids ...int) *ServerTypeUpdate
- func (stu *ServerTypeUpdate) RemoveServers(s ...*Server) *ServerTypeUpdate
- func (stu *ServerTypeUpdate) Save(ctx context.Context) (int, error)
- func (stu *ServerTypeUpdate) SaveX(ctx context.Context) int
- func (stu *ServerTypeUpdate) SetDescription(s string) *ServerTypeUpdate
- func (stu *ServerTypeUpdate) SetName(s string) *ServerTypeUpdate
- func (stu *ServerTypeUpdate) SetNillableDescription(s *string) *ServerTypeUpdate
- func (stu *ServerTypeUpdate) Where(ps ...predicate.ServerType) *ServerTypeUpdate
- type ServerTypeUpdateOne
- func (stuo *ServerTypeUpdateOne) AddServerIDs(ids ...int) *ServerTypeUpdateOne
- func (stuo *ServerTypeUpdateOne) AddServers(s ...*Server) *ServerTypeUpdateOne
- func (stuo *ServerTypeUpdateOne) ClearDescription() *ServerTypeUpdateOne
- func (stuo *ServerTypeUpdateOne) ClearServers() *ServerTypeUpdateOne
- func (stuo *ServerTypeUpdateOne) Exec(ctx context.Context) error
- func (stuo *ServerTypeUpdateOne) ExecX(ctx context.Context)
- func (stuo *ServerTypeUpdateOne) Mutation() *ServerTypeMutation
- func (stuo *ServerTypeUpdateOne) RemoveServerIDs(ids ...int) *ServerTypeUpdateOne
- func (stuo *ServerTypeUpdateOne) RemoveServers(s ...*Server) *ServerTypeUpdateOne
- func (stuo *ServerTypeUpdateOne) Save(ctx context.Context) (*ServerType, error)
- func (stuo *ServerTypeUpdateOne) SaveX(ctx context.Context) *ServerType
- func (stuo *ServerTypeUpdateOne) SetDescription(s string) *ServerTypeUpdateOne
- func (stuo *ServerTypeUpdateOne) SetName(s string) *ServerTypeUpdateOne
- func (stuo *ServerTypeUpdateOne) SetNillableDescription(s *string) *ServerTypeUpdateOne
- type ServerTypes
- type ServerUpdate
- func (su *ServerUpdate) AddPlayerIDs(ids ...int) *ServerUpdate
- func (su *ServerUpdate) AddPlayers(p ...*Player) *ServerUpdate
- func (su *ServerUpdate) ClearAPIAddress() *ServerUpdate
- func (su *ServerUpdate) ClearAPIPort() *ServerUpdate
- func (su *ServerUpdate) ClearAPISecret() *ServerUpdate
- func (su *ServerUpdate) ClearAPIUsername() *ServerUpdate
- func (su *ServerUpdate) ClearMapType() *ServerUpdate
- func (su *ServerUpdate) ClearMetadata() *ServerUpdate
- func (su *ServerUpdate) ClearPlayers() *ServerUpdate
- func (su *ServerUpdate) ClearServerType() *ServerUpdate
- func (su *ServerUpdate) Exec(ctx context.Context) error
- func (su *ServerUpdate) ExecX(ctx context.Context)
- func (su *ServerUpdate) Mutation() *ServerMutation
- func (su *ServerUpdate) RemovePlayerIDs(ids ...int) *ServerUpdate
- func (su *ServerUpdate) RemovePlayers(p ...*Player) *ServerUpdate
- func (su *ServerUpdate) Save(ctx context.Context) (int, error)
- func (su *ServerUpdate) SaveX(ctx context.Context) int
- func (su *ServerUpdate) SetAPIAddress(s string) *ServerUpdate
- func (su *ServerUpdate) SetAPIPort(s string) *ServerUpdate
- func (su *ServerUpdate) SetAPISecret(s string) *ServerUpdate
- func (su *ServerUpdate) SetAPIUsername(s string) *ServerUpdate
- func (su *ServerUpdate) SetMapType(m *MapType) *ServerUpdate
- func (su *ServerUpdate) SetMapTypeID(id int) *ServerUpdate
- func (su *ServerUpdate) SetMetadata(m *Metadata) *ServerUpdate
- func (su *ServerUpdate) SetMetadataID(id int) *ServerUpdate
- func (su *ServerUpdate) SetName(s string) *ServerUpdate
- func (su *ServerUpdate) SetNillableAPIAddress(s *string) *ServerUpdate
- func (su *ServerUpdate) SetNillableAPIPort(s *string) *ServerUpdate
- func (su *ServerUpdate) SetNillableAPISecret(s *string) *ServerUpdate
- func (su *ServerUpdate) SetNillableAPIUsername(s *string) *ServerUpdate
- func (su *ServerUpdate) SetNillableMapTypeID(id *int) *ServerUpdate
- func (su *ServerUpdate) SetNillableMetadataID(id *int) *ServerUpdate
- func (su *ServerUpdate) SetNillableServerTypeID(id *int) *ServerUpdate
- func (su *ServerUpdate) SetServerType(s *ServerType) *ServerUpdate
- func (su *ServerUpdate) SetServerTypeID(id int) *ServerUpdate
- func (su *ServerUpdate) SetUpdatedAt(t time.Time) *ServerUpdate
- func (su *ServerUpdate) Where(ps ...predicate.Server) *ServerUpdate
- type ServerUpdateOne
- func (suo *ServerUpdateOne) AddPlayerIDs(ids ...int) *ServerUpdateOne
- func (suo *ServerUpdateOne) AddPlayers(p ...*Player) *ServerUpdateOne
- func (suo *ServerUpdateOne) ClearAPIAddress() *ServerUpdateOne
- func (suo *ServerUpdateOne) ClearAPIPort() *ServerUpdateOne
- func (suo *ServerUpdateOne) ClearAPISecret() *ServerUpdateOne
- func (suo *ServerUpdateOne) ClearAPIUsername() *ServerUpdateOne
- func (suo *ServerUpdateOne) ClearMapType() *ServerUpdateOne
- func (suo *ServerUpdateOne) ClearMetadata() *ServerUpdateOne
- func (suo *ServerUpdateOne) ClearPlayers() *ServerUpdateOne
- func (suo *ServerUpdateOne) ClearServerType() *ServerUpdateOne
- func (suo *ServerUpdateOne) Exec(ctx context.Context) error
- func (suo *ServerUpdateOne) ExecX(ctx context.Context)
- func (suo *ServerUpdateOne) Mutation() *ServerMutation
- func (suo *ServerUpdateOne) RemovePlayerIDs(ids ...int) *ServerUpdateOne
- func (suo *ServerUpdateOne) RemovePlayers(p ...*Player) *ServerUpdateOne
- func (suo *ServerUpdateOne) Save(ctx context.Context) (*Server, error)
- func (suo *ServerUpdateOne) SaveX(ctx context.Context) *Server
- func (suo *ServerUpdateOne) SetAPIAddress(s string) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetAPIPort(s string) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetAPISecret(s string) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetAPIUsername(s string) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetMapType(m *MapType) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetMapTypeID(id int) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetMetadata(m *Metadata) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetMetadataID(id int) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetName(s string) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetNillableAPIAddress(s *string) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetNillableAPIPort(s *string) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetNillableAPISecret(s *string) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetNillableAPIUsername(s *string) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetNillableMapTypeID(id *int) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetNillableMetadataID(id *int) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetNillableServerTypeID(id *int) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetServerType(s *ServerType) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetServerTypeID(id int) *ServerUpdateOne
- func (suo *ServerUpdateOne) SetUpdatedAt(t time.Time) *ServerUpdateOne
- type Servers
- type Session
- func (s *Session) Node(ctx context.Context) (node *Node, err error)
- func (s *Session) QueryToken() *TokenQuery
- func (s *Session) QueryUser() *UserQuery
- func (s *Session) String() string
- func (s *Session) ToEdge(order *SessionOrder) *SessionEdge
- func (s *Session) Token(ctx context.Context) (*Token, error)
- func (s *Session) Unwrap() *Session
- func (s *Session) Update() *SessionUpdateOne
- func (s *Session) User(ctx context.Context) (*User, error)
- type SessionClient
- func (c *SessionClient) Create() *SessionCreate
- func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
- func (c *SessionClient) Delete() *SessionDelete
- func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
- func (c *SessionClient) DeleteOneID(id int) *SessionDeleteOne
- func (c *SessionClient) Get(ctx context.Context, id int) (*Session, error)
- func (c *SessionClient) GetX(ctx context.Context, id int) *Session
- func (c *SessionClient) Hooks() []Hook
- func (c *SessionClient) Query() *SessionQuery
- func (c *SessionClient) QueryToken(s *Session) *TokenQuery
- func (c *SessionClient) QueryUser(s *Session) *UserQuery
- func (c *SessionClient) Update() *SessionUpdate
- func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
- func (c *SessionClient) UpdateOneID(id int) *SessionUpdateOne
- func (c *SessionClient) Use(hooks ...Hook)
- type SessionConnection
- type SessionCreate
- func (sc *SessionCreate) Mutation() *SessionMutation
- func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
- func (sc *SessionCreate) SaveX(ctx context.Context) *Session
- func (sc *SessionCreate) SetBrowserName(s string) *SessionCreate
- func (sc *SessionCreate) SetBrowserVersion(s string) *SessionCreate
- func (sc *SessionCreate) SetCreateTime(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetDeviceOs(s string) *SessionCreate
- func (sc *SessionCreate) SetDeviceType(s string) *SessionCreate
- func (sc *SessionCreate) SetIPAddress(s string) *SessionCreate
- func (sc *SessionCreate) SetNillableCreateTime(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableTerminatedAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableTokenID(id *int) *SessionCreate
- func (sc *SessionCreate) SetNillableUpdateTime(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableUserID(id *int) *SessionCreate
- func (sc *SessionCreate) SetTerminatedAt(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetToken(t *Token) *SessionCreate
- func (sc *SessionCreate) SetTokenID(id int) *SessionCreate
- func (sc *SessionCreate) SetUpdateTime(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetUser(u *User) *SessionCreate
- func (sc *SessionCreate) SetUserID(id int) *SessionCreate
- type SessionCreateBulk
- type SessionDelete
- type SessionDeleteOne
- type SessionEdge
- type SessionEdges
- type SessionGroupBy
- func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
- func (sgb *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sgb *SessionGroupBy) BoolX(ctx context.Context) bool
- func (sgb *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *SessionGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sgb *SessionGroupBy) Float64X(ctx context.Context) float64
- func (sgb *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *SessionGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sgb *SessionGroupBy) IntX(ctx context.Context) int
- func (sgb *SessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *SessionGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SessionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *SessionGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *SessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (sgb *SessionGroupBy) StringX(ctx context.Context) string
- func (sgb *SessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *SessionGroupBy) StringsX(ctx context.Context) []string
- type SessionMutation
- func (m *SessionMutation) AddField(name string, value ent.Value) error
- func (m *SessionMutation) AddedEdges() []string
- func (m *SessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *SessionMutation) AddedFields() []string
- func (m *SessionMutation) AddedIDs(name string) []ent.Value
- func (m *SessionMutation) BrowserName() (r string, exists bool)
- func (m *SessionMutation) BrowserVersion() (r string, exists bool)
- func (m *SessionMutation) ClearEdge(name string) error
- func (m *SessionMutation) ClearField(name string) error
- func (m *SessionMutation) ClearTerminatedAt()
- func (m *SessionMutation) ClearToken()
- func (m *SessionMutation) ClearUser()
- func (m *SessionMutation) ClearedEdges() []string
- func (m *SessionMutation) ClearedFields() []string
- func (m SessionMutation) Client() *Client
- func (m *SessionMutation) CreateTime() (r time.Time, exists bool)
- func (m *SessionMutation) DeviceOs() (r string, exists bool)
- func (m *SessionMutation) DeviceType() (r string, exists bool)
- func (m *SessionMutation) EdgeCleared(name string) bool
- func (m *SessionMutation) Field(name string) (ent.Value, bool)
- func (m *SessionMutation) FieldCleared(name string) bool
- func (m *SessionMutation) Fields() []string
- func (m *SessionMutation) ID() (id int, exists bool)
- func (m *SessionMutation) IPAddress() (r string, exists bool)
- func (m *SessionMutation) OldBrowserName(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldBrowserVersion(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) OldDeviceOs(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldDeviceType(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SessionMutation) OldIPAddress(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldTerminatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *SessionMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) Op() Op
- func (m *SessionMutation) RemovedEdges() []string
- func (m *SessionMutation) RemovedIDs(name string) []ent.Value
- func (m *SessionMutation) ResetBrowserName()
- func (m *SessionMutation) ResetBrowserVersion()
- func (m *SessionMutation) ResetCreateTime()
- func (m *SessionMutation) ResetDeviceOs()
- func (m *SessionMutation) ResetDeviceType()
- func (m *SessionMutation) ResetEdge(name string) error
- func (m *SessionMutation) ResetField(name string) error
- func (m *SessionMutation) ResetIPAddress()
- func (m *SessionMutation) ResetTerminatedAt()
- func (m *SessionMutation) ResetToken()
- func (m *SessionMutation) ResetUpdateTime()
- func (m *SessionMutation) ResetUser()
- func (m *SessionMutation) SetBrowserName(s string)
- func (m *SessionMutation) SetBrowserVersion(s string)
- func (m *SessionMutation) SetCreateTime(t time.Time)
- func (m *SessionMutation) SetDeviceOs(s string)
- func (m *SessionMutation) SetDeviceType(s string)
- func (m *SessionMutation) SetField(name string, value ent.Value) error
- func (m *SessionMutation) SetIPAddress(s string)
- func (m *SessionMutation) SetTerminatedAt(t time.Time)
- func (m *SessionMutation) SetTokenID(id int)
- func (m *SessionMutation) SetUpdateTime(t time.Time)
- func (m *SessionMutation) SetUserID(id int)
- func (m *SessionMutation) TerminatedAt() (r time.Time, exists bool)
- func (m *SessionMutation) TerminatedAtCleared() bool
- func (m *SessionMutation) TokenCleared() bool
- func (m *SessionMutation) TokenID() (id int, exists bool)
- func (m *SessionMutation) TokenIDs() (ids []int)
- func (m SessionMutation) Tx() (*Tx, error)
- func (m *SessionMutation) Type() string
- func (m *SessionMutation) UpdateTime() (r time.Time, exists bool)
- func (m *SessionMutation) UserCleared() bool
- func (m *SessionMutation) UserID() (id int, exists bool)
- func (m *SessionMutation) UserIDs() (ids []int)
- type SessionOrder
- type SessionOrderField
- type SessionPaginateOption
- type SessionQuery
- func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
- func (sq *SessionQuery) AllX(ctx context.Context) []*Session
- func (sq *SessionQuery) Clone() *SessionQuery
- func (s *SessionQuery) CollectFields(ctx context.Context, satisfies ...string) *SessionQuery
- func (sq *SessionQuery) Count(ctx context.Context) (int, error)
- func (sq *SessionQuery) CountX(ctx context.Context) int
- func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SessionQuery) ExistX(ctx context.Context) bool
- func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *SessionQuery) FirstIDX(ctx context.Context) int
- func (sq *SessionQuery) FirstX(ctx context.Context) *Session
- func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
- func (sq *SessionQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *SessionQuery) IDsX(ctx context.Context) []int
- func (sq *SessionQuery) Limit(limit int) *SessionQuery
- func (sq *SessionQuery) Offset(offset int) *SessionQuery
- func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *SessionQuery) OnlyIDX(ctx context.Context) int
- func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
- func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
- func (s *SessionQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*SessionConnection, error)
- func (sq *SessionQuery) QueryToken() *TokenQuery
- func (sq *SessionQuery) QueryUser() *UserQuery
- func (sq *SessionQuery) Select(field string, fields ...string) *SessionSelect
- func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
- func (sq *SessionQuery) WithToken(opts ...func(*TokenQuery)) *SessionQuery
- func (sq *SessionQuery) WithUser(opts ...func(*UserQuery)) *SessionQuery
- type SessionSelect
- func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ss *SessionSelect) BoolX(ctx context.Context) bool
- func (ss *SessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *SessionSelect) BoolsX(ctx context.Context) []bool
- func (ss *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ss *SessionSelect) Float64X(ctx context.Context) float64
- func (ss *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *SessionSelect) Float64sX(ctx context.Context) []float64
- func (ss *SessionSelect) Int(ctx context.Context) (_ int, err error)
- func (ss *SessionSelect) IntX(ctx context.Context) int
- func (ss *SessionSelect) Ints(ctx context.Context) ([]int, error)
- func (ss *SessionSelect) IntsX(ctx context.Context) []int
- func (ss *SessionSelect) Scan(ctx context.Context, v interface{}) error
- func (ss *SessionSelect) ScanX(ctx context.Context, v interface{})
- func (ss *SessionSelect) String(ctx context.Context) (_ string, err error)
- func (ss *SessionSelect) StringX(ctx context.Context) string
- func (ss *SessionSelect) Strings(ctx context.Context) ([]string, error)
- func (ss *SessionSelect) StringsX(ctx context.Context) []string
- type SessionUpdate
- func (su *SessionUpdate) ClearTerminatedAt() *SessionUpdate
- func (su *SessionUpdate) ClearToken() *SessionUpdate
- func (su *SessionUpdate) ClearUser() *SessionUpdate
- func (su *SessionUpdate) Exec(ctx context.Context) error
- func (su *SessionUpdate) ExecX(ctx context.Context)
- func (su *SessionUpdate) Mutation() *SessionMutation
- func (su *SessionUpdate) Save(ctx context.Context) (int, error)
- func (su *SessionUpdate) SaveX(ctx context.Context) int
- func (su *SessionUpdate) SetBrowserName(s string) *SessionUpdate
- func (su *SessionUpdate) SetBrowserVersion(s string) *SessionUpdate
- func (su *SessionUpdate) SetDeviceOs(s string) *SessionUpdate
- func (su *SessionUpdate) SetDeviceType(s string) *SessionUpdate
- func (su *SessionUpdate) SetIPAddress(s string) *SessionUpdate
- func (su *SessionUpdate) SetNillableTerminatedAt(t *time.Time) *SessionUpdate
- func (su *SessionUpdate) SetNillableTokenID(id *int) *SessionUpdate
- func (su *SessionUpdate) SetNillableUserID(id *int) *SessionUpdate
- func (su *SessionUpdate) SetTerminatedAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) SetToken(t *Token) *SessionUpdate
- func (su *SessionUpdate) SetTokenID(id int) *SessionUpdate
- func (su *SessionUpdate) SetUser(u *User) *SessionUpdate
- func (su *SessionUpdate) SetUserID(id int) *SessionUpdate
- func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
- type SessionUpdateOne
- func (suo *SessionUpdateOne) ClearTerminatedAt() *SessionUpdateOne
- func (suo *SessionUpdateOne) ClearToken() *SessionUpdateOne
- func (suo *SessionUpdateOne) ClearUser() *SessionUpdateOne
- func (suo *SessionUpdateOne) Exec(ctx context.Context) error
- func (suo *SessionUpdateOne) ExecX(ctx context.Context)
- func (suo *SessionUpdateOne) Mutation() *SessionMutation
- func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
- func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
- func (suo *SessionUpdateOne) SetBrowserName(s string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetBrowserVersion(s string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetDeviceOs(s string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetDeviceType(s string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetIPAddress(s string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableTerminatedAt(t *time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableTokenID(id *int) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableUserID(id *int) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetTerminatedAt(t time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetToken(t *Token) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetTokenID(id int) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetUser(u *User) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetUserID(id int) *SessionUpdateOne
- type Sessions
- type Token
- func (t *Token) Node(ctx context.Context) (node *Node, err error)
- func (t *Token) QuerySession() *SessionQuery
- func (t *Token) Session(ctx context.Context) (*Session, error)
- func (t *Token) String() string
- func (t *Token) ToEdge(order *TokenOrder) *TokenEdge
- func (t *Token) Unwrap() *Token
- func (t *Token) Update() *TokenUpdateOne
- type TokenClient
- func (c *TokenClient) Create() *TokenCreate
- func (c *TokenClient) CreateBulk(builders ...*TokenCreate) *TokenCreateBulk
- func (c *TokenClient) Delete() *TokenDelete
- func (c *TokenClient) DeleteOne(t *Token) *TokenDeleteOne
- func (c *TokenClient) DeleteOneID(id int) *TokenDeleteOne
- func (c *TokenClient) Get(ctx context.Context, id int) (*Token, error)
- func (c *TokenClient) GetX(ctx context.Context, id int) *Token
- func (c *TokenClient) Hooks() []Hook
- func (c *TokenClient) Query() *TokenQuery
- func (c *TokenClient) QuerySession(t *Token) *SessionQuery
- func (c *TokenClient) Update() *TokenUpdate
- func (c *TokenClient) UpdateOne(t *Token) *TokenUpdateOne
- func (c *TokenClient) UpdateOneID(id int) *TokenUpdateOne
- func (c *TokenClient) Use(hooks ...Hook)
- type TokenConnection
- type TokenCreate
- func (tc *TokenCreate) Mutation() *TokenMutation
- func (tc *TokenCreate) Save(ctx context.Context) (*Token, error)
- func (tc *TokenCreate) SaveX(ctx context.Context) *Token
- func (tc *TokenCreate) SetBlockedAt(t time.Time) *TokenCreate
- func (tc *TokenCreate) SetClaims(s string) *TokenCreate
- func (tc *TokenCreate) SetExpiredAt(t time.Time) *TokenCreate
- func (tc *TokenCreate) SetNillableBlockedAt(t *time.Time) *TokenCreate
- func (tc *TokenCreate) SetNillableSessionID(id *int) *TokenCreate
- func (tc *TokenCreate) SetSession(s *Session) *TokenCreate
- func (tc *TokenCreate) SetSessionID(id int) *TokenCreate
- type TokenCreateBulk
- type TokenDelete
- type TokenDeleteOne
- type TokenEdge
- type TokenEdges
- type TokenGroupBy
- func (tgb *TokenGroupBy) Aggregate(fns ...AggregateFunc) *TokenGroupBy
- func (tgb *TokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (tgb *TokenGroupBy) BoolX(ctx context.Context) bool
- func (tgb *TokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (tgb *TokenGroupBy) BoolsX(ctx context.Context) []bool
- func (tgb *TokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (tgb *TokenGroupBy) Float64X(ctx context.Context) float64
- func (tgb *TokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (tgb *TokenGroupBy) Float64sX(ctx context.Context) []float64
- func (tgb *TokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (tgb *TokenGroupBy) IntX(ctx context.Context) int
- func (tgb *TokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (tgb *TokenGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TokenGroupBy) Scan(ctx context.Context, v interface{}) error
- func (tgb *TokenGroupBy) ScanX(ctx context.Context, v interface{})
- func (tgb *TokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (tgb *TokenGroupBy) StringX(ctx context.Context) string
- func (tgb *TokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (tgb *TokenGroupBy) StringsX(ctx context.Context) []string
- type TokenMutation
- func (m *TokenMutation) AddField(name string, value ent.Value) error
- func (m *TokenMutation) AddedEdges() []string
- func (m *TokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *TokenMutation) AddedFields() []string
- func (m *TokenMutation) AddedIDs(name string) []ent.Value
- func (m *TokenMutation) BlockedAt() (r time.Time, exists bool)
- func (m *TokenMutation) BlockedAtCleared() bool
- func (m *TokenMutation) Claims() (r string, exists bool)
- func (m *TokenMutation) ClearBlockedAt()
- func (m *TokenMutation) ClearEdge(name string) error
- func (m *TokenMutation) ClearField(name string) error
- func (m *TokenMutation) ClearSession()
- func (m *TokenMutation) ClearedEdges() []string
- func (m *TokenMutation) ClearedFields() []string
- func (m TokenMutation) Client() *Client
- func (m *TokenMutation) EdgeCleared(name string) bool
- func (m *TokenMutation) ExpiredAt() (r time.Time, exists bool)
- func (m *TokenMutation) Field(name string) (ent.Value, bool)
- func (m *TokenMutation) FieldCleared(name string) bool
- func (m *TokenMutation) Fields() []string
- func (m *TokenMutation) ID() (id int, exists bool)
- func (m *TokenMutation) OldBlockedAt(ctx context.Context) (v *time.Time, err error)
- func (m *TokenMutation) OldClaims(ctx context.Context) (v string, err error)
- func (m *TokenMutation) OldExpiredAt(ctx context.Context) (v time.Time, err error)
- func (m *TokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TokenMutation) Op() Op
- func (m *TokenMutation) RemovedEdges() []string
- func (m *TokenMutation) RemovedIDs(name string) []ent.Value
- func (m *TokenMutation) ResetBlockedAt()
- func (m *TokenMutation) ResetClaims()
- func (m *TokenMutation) ResetEdge(name string) error
- func (m *TokenMutation) ResetExpiredAt()
- func (m *TokenMutation) ResetField(name string) error
- func (m *TokenMutation) ResetSession()
- func (m *TokenMutation) SessionCleared() bool
- func (m *TokenMutation) SessionID() (id int, exists bool)
- func (m *TokenMutation) SessionIDs() (ids []int)
- func (m *TokenMutation) SetBlockedAt(t time.Time)
- func (m *TokenMutation) SetClaims(s string)
- func (m *TokenMutation) SetExpiredAt(t time.Time)
- func (m *TokenMutation) SetField(name string, value ent.Value) error
- func (m *TokenMutation) SetSessionID(id int)
- func (m TokenMutation) Tx() (*Tx, error)
- func (m *TokenMutation) Type() string
- type TokenOrder
- type TokenOrderField
- type TokenPaginateOption
- type TokenQuery
- func (tq *TokenQuery) All(ctx context.Context) ([]*Token, error)
- func (tq *TokenQuery) AllX(ctx context.Context) []*Token
- func (tq *TokenQuery) Clone() *TokenQuery
- func (t *TokenQuery) CollectFields(ctx context.Context, satisfies ...string) *TokenQuery
- func (tq *TokenQuery) Count(ctx context.Context) (int, error)
- func (tq *TokenQuery) CountX(ctx context.Context) int
- func (tq *TokenQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TokenQuery) ExistX(ctx context.Context) bool
- func (tq *TokenQuery) First(ctx context.Context) (*Token, error)
- func (tq *TokenQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TokenQuery) FirstIDX(ctx context.Context) int
- func (tq *TokenQuery) FirstX(ctx context.Context) *Token
- func (tq *TokenQuery) GroupBy(field string, fields ...string) *TokenGroupBy
- func (tq *TokenQuery) IDs(ctx context.Context) ([]int, error)
- func (tq *TokenQuery) IDsX(ctx context.Context) []int
- func (tq *TokenQuery) Limit(limit int) *TokenQuery
- func (tq *TokenQuery) Offset(offset int) *TokenQuery
- func (tq *TokenQuery) Only(ctx context.Context) (*Token, error)
- func (tq *TokenQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TokenQuery) OnlyIDX(ctx context.Context) int
- func (tq *TokenQuery) OnlyX(ctx context.Context) *Token
- func (tq *TokenQuery) Order(o ...OrderFunc) *TokenQuery
- func (t *TokenQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*TokenConnection, error)
- func (tq *TokenQuery) QuerySession() *SessionQuery
- func (tq *TokenQuery) Select(field string, fields ...string) *TokenSelect
- func (tq *TokenQuery) Where(ps ...predicate.Token) *TokenQuery
- func (tq *TokenQuery) WithSession(opts ...func(*SessionQuery)) *TokenQuery
- type TokenSelect
- func (ts *TokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ts *TokenSelect) BoolX(ctx context.Context) bool
- func (ts *TokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (ts *TokenSelect) BoolsX(ctx context.Context) []bool
- func (ts *TokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ts *TokenSelect) Float64X(ctx context.Context) float64
- func (ts *TokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ts *TokenSelect) Float64sX(ctx context.Context) []float64
- func (ts *TokenSelect) Int(ctx context.Context) (_ int, err error)
- func (ts *TokenSelect) IntX(ctx context.Context) int
- func (ts *TokenSelect) Ints(ctx context.Context) ([]int, error)
- func (ts *TokenSelect) IntsX(ctx context.Context) []int
- func (ts *TokenSelect) Scan(ctx context.Context, v interface{}) error
- func (ts *TokenSelect) ScanX(ctx context.Context, v interface{})
- func (ts *TokenSelect) String(ctx context.Context) (_ string, err error)
- func (ts *TokenSelect) StringX(ctx context.Context) string
- func (ts *TokenSelect) Strings(ctx context.Context) ([]string, error)
- func (ts *TokenSelect) StringsX(ctx context.Context) []string
- type TokenUpdate
- func (tu *TokenUpdate) ClearBlockedAt() *TokenUpdate
- func (tu *TokenUpdate) ClearSession() *TokenUpdate
- func (tu *TokenUpdate) Exec(ctx context.Context) error
- func (tu *TokenUpdate) ExecX(ctx context.Context)
- func (tu *TokenUpdate) Mutation() *TokenMutation
- func (tu *TokenUpdate) Save(ctx context.Context) (int, error)
- func (tu *TokenUpdate) SaveX(ctx context.Context) int
- func (tu *TokenUpdate) SetBlockedAt(t time.Time) *TokenUpdate
- func (tu *TokenUpdate) SetClaims(s string) *TokenUpdate
- func (tu *TokenUpdate) SetExpiredAt(t time.Time) *TokenUpdate
- func (tu *TokenUpdate) SetNillableBlockedAt(t *time.Time) *TokenUpdate
- func (tu *TokenUpdate) SetNillableSessionID(id *int) *TokenUpdate
- func (tu *TokenUpdate) SetSession(s *Session) *TokenUpdate
- func (tu *TokenUpdate) SetSessionID(id int) *TokenUpdate
- func (tu *TokenUpdate) Where(ps ...predicate.Token) *TokenUpdate
- type TokenUpdateOne
- func (tuo *TokenUpdateOne) ClearBlockedAt() *TokenUpdateOne
- func (tuo *TokenUpdateOne) ClearSession() *TokenUpdateOne
- func (tuo *TokenUpdateOne) Exec(ctx context.Context) error
- func (tuo *TokenUpdateOne) ExecX(ctx context.Context)
- func (tuo *TokenUpdateOne) Mutation() *TokenMutation
- func (tuo *TokenUpdateOne) Save(ctx context.Context) (*Token, error)
- func (tuo *TokenUpdateOne) SaveX(ctx context.Context) *Token
- func (tuo *TokenUpdateOne) SetBlockedAt(t time.Time) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetClaims(s string) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetExpiredAt(t time.Time) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetNillableBlockedAt(t *time.Time) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetNillableSessionID(id *int) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetSession(s *Session) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetSessionID(id int) *TokenUpdateOne
- type Tokens
- type Tx
- type User
- func (u *User) Activation(ctx context.Context) (*Activation, error)
- func (u *User) Activations(ctx context.Context) ([]*Activation, error)
- func (u *User) Metadata(ctx context.Context) (*Metadata, error)
- func (u *User) Node(ctx context.Context) (node *Node, err error)
- func (u *User) Players(ctx context.Context) ([]*Player, error)
- func (u *User) QueryActivation() *ActivationQuery
- func (u *User) QueryActivations() *ActivationQuery
- func (u *User) QueryMetadata() *MetadataQuery
- func (u *User) QueryPlayers() *PlayerQuery
- func (u *User) QuerySessions() *SessionQuery
- func (u *User) Sessions(ctx context.Context) ([]*Session, error)
- func (u *User) String() string
- func (u *User) ToEdge(order *UserOrder) *UserEdge
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryActivation(u *User) *ActivationQuery
- func (c *UserClient) QueryActivations(u *User) *ActivationQuery
- func (c *UserClient) QueryMetadata(u *User) *MetadataQuery
- func (c *UserClient) QueryPlayers(u *User) *PlayerQuery
- func (c *UserClient) QuerySessions(u *User) *SessionQuery
- 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 UserConnection
- type UserCreate
- func (uc *UserCreate) AddActivationIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddActivations(a ...*Activation) *UserCreate
- func (uc *UserCreate) AddPlayerIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddPlayers(p ...*Player) *UserCreate
- func (uc *UserCreate) AddSessionIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddSessions(s ...*Session) *UserCreate
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetActivatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetActivation(a *Activation) *UserCreate
- func (uc *UserCreate) SetActivationComment(s string) *UserCreate
- func (uc *UserCreate) SetActivationID(id int) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDisabledAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDisabledReason(s string) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetIsSystem(b bool) *UserCreate
- func (uc *UserCreate) SetMetadata(m *Metadata) *UserCreate
- func (uc *UserCreate) SetMetadataID(id int) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableActivatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableActivationComment(s *string) *UserCreate
- func (uc *UserCreate) SetNillableActivationID(id *int) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDisabledAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDisabledReason(s *string) *UserCreate
- func (uc *UserCreate) SetNillableIsSystem(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableMetadataID(id *int) *UserCreate
- func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdge
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UserGroupBy) IntX(ctx context.Context) int
- 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) String(ctx context.Context) (_ string, err error)
- func (ugb *UserGroupBy) StringX(ctx context.Context) string
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) ActivatedAt() (r time.Time, exists bool)
- func (m *UserMutation) ActivatedAtCleared() bool
- func (m *UserMutation) ActivationCleared() bool
- func (m *UserMutation) ActivationComment() (r string, exists bool)
- func (m *UserMutation) ActivationCommentCleared() bool
- func (m *UserMutation) ActivationID() (id int, exists bool)
- func (m *UserMutation) ActivationIDs() (ids []int)
- func (m *UserMutation) ActivationsCleared() bool
- func (m *UserMutation) ActivationsIDs() (ids []int)
- func (m *UserMutation) AddActivationIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddPlayerIDs(ids ...int)
- func (m *UserMutation) AddSessionIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearActivatedAt()
- func (m *UserMutation) ClearActivation()
- func (m *UserMutation) ClearActivationComment()
- func (m *UserMutation) ClearActivations()
- func (m *UserMutation) ClearDisabledAt()
- func (m *UserMutation) ClearDisabledReason()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearMetadata()
- func (m *UserMutation) ClearPassword()
- func (m *UserMutation) ClearPlayers()
- func (m *UserMutation) ClearSessions()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) DisabledAt() (r time.Time, exists bool)
- func (m *UserMutation) DisabledAtCleared() bool
- func (m *UserMutation) DisabledReason() (r string, exists bool)
- func (m *UserMutation) DisabledReasonCleared() 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) ID() (id int, exists bool)
- func (m *UserMutation) IsSystem() (r bool, exists bool)
- func (m *UserMutation) MetadataCleared() bool
- func (m *UserMutation) MetadataID() (id int, exists bool)
- func (m *UserMutation) MetadataIDs() (ids []int)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldActivatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldActivationComment(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDisabledAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldDisabledReason(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIsSystem(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PasswordCleared() bool
- func (m *UserMutation) PlayersCleared() bool
- func (m *UserMutation) PlayersIDs() (ids []int)
- func (m *UserMutation) RemoveActivationIDs(ids ...int)
- func (m *UserMutation) RemovePlayerIDs(ids ...int)
- func (m *UserMutation) RemoveSessionIDs(ids ...int)
- func (m *UserMutation) RemovedActivationsIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedPlayersIDs() (ids []int)
- func (m *UserMutation) RemovedSessionsIDs() (ids []int)
- func (m *UserMutation) ResetActivatedAt()
- func (m *UserMutation) ResetActivation()
- func (m *UserMutation) ResetActivationComment()
- func (m *UserMutation) ResetActivations()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDisabledAt()
- func (m *UserMutation) ResetDisabledReason()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIsSystem()
- func (m *UserMutation) ResetMetadata()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPlayers()
- func (m *UserMutation) ResetSessions()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) SessionsCleared() bool
- func (m *UserMutation) SessionsIDs() (ids []int)
- func (m *UserMutation) SetActivatedAt(t time.Time)
- func (m *UserMutation) SetActivationComment(s string)
- func (m *UserMutation) SetActivationID(id int)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDisabledAt(t time.Time)
- func (m *UserMutation) SetDisabledReason(s string)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetIsSystem(b bool)
- func (m *UserMutation) SetMetadataID(id int)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- type UserOrder
- type UserOrderField
- type UserPaginateOption
- 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 (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (u *UserQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*UserConnection, error)
- func (uq *UserQuery) QueryActivation() *ActivationQuery
- func (uq *UserQuery) QueryActivations() *ActivationQuery
- func (uq *UserQuery) QueryMetadata() *MetadataQuery
- func (uq *UserQuery) QueryPlayers() *PlayerQuery
- func (uq *UserQuery) QuerySessions() *SessionQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithActivation(opts ...func(*ActivationQuery)) *UserQuery
- func (uq *UserQuery) WithActivations(opts ...func(*ActivationQuery)) *UserQuery
- func (uq *UserQuery) WithMetadata(opts ...func(*MetadataQuery)) *UserQuery
- func (uq *UserQuery) WithPlayers(opts ...func(*PlayerQuery)) *UserQuery
- func (uq *UserQuery) WithSessions(opts ...func(*SessionQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UserSelect) BoolX(ctx context.Context) bool
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UserSelect) Float64X(ctx context.Context) float64
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UserSelect) IntX(ctx context.Context) int
- 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) String(ctx context.Context) (_ string, err error)
- func (us *UserSelect) StringX(ctx context.Context) string
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddActivationIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddActivations(a ...*Activation) *UserUpdate
- func (uu *UserUpdate) AddPlayerIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddPlayers(p ...*Player) *UserUpdate
- func (uu *UserUpdate) AddSessionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddSessions(s ...*Session) *UserUpdate
- func (uu *UserUpdate) ClearActivatedAt() *UserUpdate
- func (uu *UserUpdate) ClearActivation() *UserUpdate
- func (uu *UserUpdate) ClearActivationComment() *UserUpdate
- func (uu *UserUpdate) ClearActivations() *UserUpdate
- func (uu *UserUpdate) ClearDisabledAt() *UserUpdate
- func (uu *UserUpdate) ClearDisabledReason() *UserUpdate
- func (uu *UserUpdate) ClearMetadata() *UserUpdate
- func (uu *UserUpdate) ClearPassword() *UserUpdate
- func (uu *UserUpdate) ClearPlayers() *UserUpdate
- func (uu *UserUpdate) ClearSessions() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveActivationIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveActivations(a ...*Activation) *UserUpdate
- func (uu *UserUpdate) RemovePlayerIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemovePlayers(p ...*Player) *UserUpdate
- func (uu *UserUpdate) RemoveSessionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveSessions(s ...*Session) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetActivatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetActivation(a *Activation) *UserUpdate
- func (uu *UserUpdate) SetActivationComment(s string) *UserUpdate
- func (uu *UserUpdate) SetActivationID(id int) *UserUpdate
- func (uu *UserUpdate) SetDisabledAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetDisabledReason(s string) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetIsSystem(b bool) *UserUpdate
- func (uu *UserUpdate) SetMetadata(m *Metadata) *UserUpdate
- func (uu *UserUpdate) SetMetadataID(id int) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableActivatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableActivationComment(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableActivationID(id *int) *UserUpdate
- func (uu *UserUpdate) SetNillableDisabledAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableDisabledReason(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableIsSystem(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableMetadataID(id *int) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddActivationIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddActivations(a ...*Activation) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPlayerIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPlayers(p ...*Player) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSessionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSessions(s ...*Session) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearActivatedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearActivation() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearActivationComment() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearActivations() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDisabledAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDisabledReason() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMetadata() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPlayers() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSessions() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveActivationIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveActivations(a ...*Activation) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePlayerIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePlayers(p ...*Player) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSessionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSessions(s ...*Session) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) SetActivatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetActivation(a *Activation) *UserUpdateOne
- func (uuo *UserUpdateOne) SetActivationComment(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetActivationID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDisabledAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDisabledReason(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsSystem(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMetadata(m *Metadata) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMetadataID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableActivatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableActivationComment(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableActivationID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDisabledAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDisabledReason(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsSystem(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableMetadataID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeActivation = "Activation" TypeAuthSession = "AuthSession" TypeMapLayer = "MapLayer" TypeMapType = "MapType" TypeMetadata = "Metadata" TypePlayer = "Player" TypePlayerIdentifier = "PlayerIdentifier" TypeServer = "Server" TypeServerType = "ServerType" TypeSession = "Session" TypeToken = "Token" TypeUser = "User" )
Variables ¶
var ( // ActivationOrderFieldCreatedAt orders Activation by created_at. ActivationOrderFieldCreatedAt = &ActivationOrderField{ field: activation.FieldCreatedAt, toCursor: func(a *Activation) Cursor { return Cursor{ ID: a.ID, Value: a.CreatedAt, } }, } // ActivationOrderFieldUpdatedAt orders Activation by updated_at. ActivationOrderFieldUpdatedAt = &ActivationOrderField{ field: activation.FieldUpdatedAt, toCursor: func(a *Activation) Cursor { return Cursor{ ID: a.ID, Value: a.UpdatedAt, } }, } )
var ( // MapLayerOrderFieldCreatedAt orders MapLayer by created_at. MapLayerOrderFieldCreatedAt = &MapLayerOrderField{ field: maplayer.FieldCreatedAt, toCursor: func(ml *MapLayer) Cursor { return Cursor{ ID: ml.ID, Value: ml.CreatedAt, } }, } // MapLayerOrderFieldUpdatedAt orders MapLayer by updated_at. MapLayerOrderFieldUpdatedAt = &MapLayerOrderField{ field: maplayer.FieldUpdatedAt, toCursor: func(ml *MapLayer) Cursor { return Cursor{ ID: ml.ID, Value: ml.UpdatedAt, } }, } )
var ( // MapTypeOrderFieldCreatedAt orders MapType by created_at. MapTypeOrderFieldCreatedAt = &MapTypeOrderField{ field: maptype.FieldCreatedAt, toCursor: func(mt *MapType) Cursor { return Cursor{ ID: mt.ID, Value: mt.CreatedAt, } }, } // MapTypeOrderFieldUpdatedAt orders MapType by updated_at. MapTypeOrderFieldUpdatedAt = &MapTypeOrderField{ field: maptype.FieldUpdatedAt, toCursor: func(mt *MapType) Cursor { return Cursor{ ID: mt.ID, Value: mt.UpdatedAt, } }, } )
var ( // PlayerOrderFieldCreatedAt orders Player by created_at. PlayerOrderFieldCreatedAt = &PlayerOrderField{ field: player.FieldCreatedAt, toCursor: func(pl *Player) Cursor { return Cursor{ ID: pl.ID, Value: pl.CreatedAt, } }, } // PlayerOrderFieldUpdatedAt orders Player by updated_at. PlayerOrderFieldUpdatedAt = &PlayerOrderField{ field: player.FieldUpdatedAt, toCursor: func(pl *Player) Cursor { return Cursor{ ID: pl.ID, Value: pl.UpdatedAt, } }, } // PlayerOrderFieldTotalMinutes orders Player by total_minutes. PlayerOrderFieldTotalMinutes = &PlayerOrderField{ field: player.FieldTotalMinutes, toCursor: func(pl *Player) Cursor { return Cursor{ ID: pl.ID, Value: pl.TotalMinutes, } }, } // PlayerOrderFieldSessionStartedAt orders Player by session_started_at. PlayerOrderFieldSessionStartedAt = &PlayerOrderField{ field: player.FieldSessionStartedAt, toCursor: func(pl *Player) Cursor { return Cursor{ ID: pl.ID, Value: pl.SessionStartedAt, } }, } // PlayerOrderFieldSessionEndedAt orders Player by session_ended_at. PlayerOrderFieldSessionEndedAt = &PlayerOrderField{ field: player.FieldSessionEndedAt, toCursor: func(pl *Player) Cursor { return Cursor{ ID: pl.ID, Value: pl.SessionEndedAt, } }, } // PlayerOrderFieldLastSeenAt orders Player by last_seen_at. PlayerOrderFieldLastSeenAt = &PlayerOrderField{ field: player.FieldLastSeenAt, toCursor: func(pl *Player) Cursor { return Cursor{ ID: pl.ID, Value: pl.LastSeenAt, } }, } )
var ( // PlayerIdentifierOrderFieldCreatedAt orders PlayerIdentifier by created_at. PlayerIdentifierOrderFieldCreatedAt = &PlayerIdentifierOrderField{ field: playeridentifier.FieldCreatedAt, toCursor: func(pi *PlayerIdentifier) Cursor { return Cursor{ ID: pi.ID, Value: pi.CreatedAt, } }, } // PlayerIdentifierOrderFieldUpdatedAt orders PlayerIdentifier by updated_at. PlayerIdentifierOrderFieldUpdatedAt = &PlayerIdentifierOrderField{ field: playeridentifier.FieldUpdatedAt, toCursor: func(pi *PlayerIdentifier) Cursor { return Cursor{ ID: pi.ID, Value: pi.UpdatedAt, } }, } )
var ( // ServerOrderFieldCreatedAt orders Server by created_at. ServerOrderFieldCreatedAt = &ServerOrderField{ field: server.FieldCreatedAt, toCursor: func(s *Server) Cursor { return Cursor{ ID: s.ID, Value: s.CreatedAt, } }, } // ServerOrderFieldUpdatedAt orders Server by updated_at. ServerOrderFieldUpdatedAt = &ServerOrderField{ field: server.FieldUpdatedAt, toCursor: func(s *Server) Cursor { return Cursor{ ID: s.ID, Value: s.UpdatedAt, } }, } )
var ( // UserOrderFieldCreatedAt orders User by created_at. UserOrderFieldCreatedAt = &UserOrderField{ field: user.FieldCreatedAt, toCursor: func(u *User) Cursor { return Cursor{ ID: u.ID, Value: u.CreatedAt, } }, } // UserOrderFieldUpdatedAt orders User by updated_at. UserOrderFieldUpdatedAt = &UserOrderField{ field: user.FieldUpdatedAt, toCursor: func(u *User) Cursor { return Cursor{ ID: u.ID, Value: u.UpdatedAt, } }, } )
var DefaultActivationOrder = &ActivationOrder{ Direction: OrderDirectionAsc, Field: &ActivationOrderField{ field: activation.FieldID, toCursor: func(a *Activation) Cursor { return Cursor{ID: a.ID} }, }, }
DefaultActivationOrder is the default ordering of Activation.
var DefaultAuthSessionOrder = &AuthSessionOrder{ Direction: OrderDirectionAsc, Field: &AuthSessionOrderField{ field: authsession.FieldID, toCursor: func(as *AuthSession) Cursor { return Cursor{ID: as.ID} }, }, }
DefaultAuthSessionOrder is the default ordering of AuthSession.
var DefaultMapLayerOrder = &MapLayerOrder{ Direction: OrderDirectionAsc, Field: &MapLayerOrderField{ field: maplayer.FieldID, toCursor: func(ml *MapLayer) Cursor { return Cursor{ID: ml.ID} }, }, }
DefaultMapLayerOrder is the default ordering of MapLayer.
var DefaultMapTypeOrder = &MapTypeOrder{ Direction: OrderDirectionAsc, Field: &MapTypeOrderField{ field: maptype.FieldID, toCursor: func(mt *MapType) Cursor { return Cursor{ID: mt.ID} }, }, }
DefaultMapTypeOrder is the default ordering of MapType.
var DefaultMetadataOrder = &MetadataOrder{ Direction: OrderDirectionAsc, Field: &MetadataOrderField{ field: metadata.FieldID, toCursor: func(m *Metadata) Cursor { return Cursor{ID: m.ID} }, }, }
DefaultMetadataOrder is the default ordering of Metadata.
var DefaultPlayerIdentifierOrder = &PlayerIdentifierOrder{ Direction: OrderDirectionAsc, Field: &PlayerIdentifierOrderField{ field: playeridentifier.FieldID, toCursor: func(pi *PlayerIdentifier) Cursor { return Cursor{ID: pi.ID} }, }, }
DefaultPlayerIdentifierOrder is the default ordering of PlayerIdentifier.
var DefaultPlayerOrder = &PlayerOrder{ Direction: OrderDirectionAsc, Field: &PlayerOrderField{ field: player.FieldID, toCursor: func(pl *Player) Cursor { return Cursor{ID: pl.ID} }, }, }
DefaultPlayerOrder is the default ordering of Player.
var DefaultServerOrder = &ServerOrder{ Direction: OrderDirectionAsc, Field: &ServerOrderField{ field: server.FieldID, toCursor: func(s *Server) Cursor { return Cursor{ID: s.ID} }, }, }
DefaultServerOrder is the default ordering of Server.
var DefaultServerTypeOrder = &ServerTypeOrder{ Direction: OrderDirectionAsc, Field: &ServerTypeOrderField{ field: servertype.FieldID, toCursor: func(st *ServerType) Cursor { return Cursor{ID: st.ID} }, }, }
DefaultServerTypeOrder is the default ordering of ServerType.
var DefaultSessionOrder = &SessionOrder{ Direction: OrderDirectionAsc, Field: &SessionOrderField{ field: session.FieldID, toCursor: func(s *Session) Cursor { return Cursor{ID: s.ID} }, }, }
DefaultSessionOrder is the default ordering of Session.
var DefaultTokenOrder = &TokenOrder{ Direction: OrderDirectionAsc, Field: &TokenOrderField{ field: token.FieldID, toCursor: func(t *Token) Cursor { return Cursor{ID: t.ID} }, }, }
DefaultTokenOrder is the default ordering of Token.
var DefaultUserOrder = &UserOrder{ Direction: OrderDirectionAsc, Field: &UserOrderField{ field: user.FieldID, toCursor: func(u *User) Cursor { return Cursor{ID: u.ID} }, }, }
DefaultUserOrder is the default ordering of User.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
func NewTxContext ¶
NewTxContext returns a new context with the given Client attached.
Types ¶
type Activation ¶
type Activation struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // InternalComments holds the value of the "internal_comments" field. InternalComments *string `json:"internal_comments,omitempty"` // Comments holds the value of the "comments" field. Comments *string `json:"comments,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ActivationQuery when eager-loading is set. Edges ActivationEdges `json:"edges"` // contains filtered or unexported fields }
Activation is the model entity for the Activation schema.
func (*Activation) QueryActor ¶
func (a *Activation) QueryActor() *UserQuery
QueryActor queries the actor edge of the Activation.
func (*Activation) QueryUser ¶
func (a *Activation) QueryUser() *UserQuery
QueryUser queries the user edge of the Activation.
func (*Activation) String ¶
func (a *Activation) String() string
String implements the fmt.Stringer.
func (*Activation) ToEdge ¶
func (a *Activation) ToEdge(order *ActivationOrder) *ActivationEdge
ToEdge converts Activation into ActivationEdge.
func (*Activation) Unwrap ¶
func (a *Activation) Unwrap() *Activation
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 (*Activation) Update ¶
func (a *Activation) Update() *ActivationUpdateOne
Update returns a builder for updating this Activation. Note that, you need to call Activation.Unwrap() before calling this method, if this Activation was returned from a transaction, and the transaction was committed or rolled back.
type ActivationClient ¶
type ActivationClient struct {
// contains filtered or unexported fields
}
ActivationClient is a client for the Activation schema.
func NewActivationClient ¶
func NewActivationClient(c config) *ActivationClient
NewActivationClient returns a client for the Activation from the given config.
func (*ActivationClient) Create ¶
func (c *ActivationClient) Create() *ActivationCreate
Create returns a create builder for Activation.
func (*ActivationClient) CreateBulk ¶
func (c *ActivationClient) CreateBulk(builders ...*ActivationCreate) *ActivationCreateBulk
CreateBulk returns a builder for creating a bulk of Activation entities.
func (*ActivationClient) Delete ¶
func (c *ActivationClient) Delete() *ActivationDelete
Delete returns a delete builder for Activation.
func (*ActivationClient) DeleteOne ¶
func (c *ActivationClient) DeleteOne(a *Activation) *ActivationDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ActivationClient) DeleteOneID ¶
func (c *ActivationClient) DeleteOneID(id int) *ActivationDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ActivationClient) Get ¶
func (c *ActivationClient) Get(ctx context.Context, id int) (*Activation, error)
Get returns a Activation entity by its id.
func (*ActivationClient) GetX ¶
func (c *ActivationClient) GetX(ctx context.Context, id int) *Activation
GetX is like Get, but panics if an error occurs.
func (*ActivationClient) Hooks ¶
func (c *ActivationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ActivationClient) Query ¶
func (c *ActivationClient) Query() *ActivationQuery
Query returns a query builder for Activation.
func (*ActivationClient) QueryActor ¶
func (c *ActivationClient) QueryActor(a *Activation) *UserQuery
QueryActor queries the actor edge of a Activation.
func (*ActivationClient) QueryUser ¶
func (c *ActivationClient) QueryUser(a *Activation) *UserQuery
QueryUser queries the user edge of a Activation.
func (*ActivationClient) Update ¶
func (c *ActivationClient) Update() *ActivationUpdate
Update returns an update builder for Activation.
func (*ActivationClient) UpdateOne ¶
func (c *ActivationClient) UpdateOne(a *Activation) *ActivationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ActivationClient) UpdateOneID ¶
func (c *ActivationClient) UpdateOneID(id int) *ActivationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ActivationClient) Use ¶
func (c *ActivationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `activation.Hooks(f(g(h())))`.
type ActivationConnection ¶
type ActivationConnection struct { Edges []*ActivationEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
ActivationConnection is the connection containing edges to Activation.
type ActivationCreate ¶
type ActivationCreate struct {
// contains filtered or unexported fields
}
ActivationCreate is the builder for creating a Activation entity.
func (*ActivationCreate) AddActor ¶
func (ac *ActivationCreate) AddActor(u ...*User) *ActivationCreate
AddActor adds the actor edges to User.
func (*ActivationCreate) AddActorIDs ¶
func (ac *ActivationCreate) AddActorIDs(ids ...int) *ActivationCreate
AddActorIDs adds the actor edge to User by ids.
func (*ActivationCreate) AddUser ¶
func (ac *ActivationCreate) AddUser(u ...*User) *ActivationCreate
AddUser adds the user edges to User.
func (*ActivationCreate) AddUserIDs ¶
func (ac *ActivationCreate) AddUserIDs(ids ...int) *ActivationCreate
AddUserIDs adds the user edge to User by ids.
func (*ActivationCreate) Mutation ¶
func (ac *ActivationCreate) Mutation() *ActivationMutation
Mutation returns the ActivationMutation object of the builder.
func (*ActivationCreate) Save ¶
func (ac *ActivationCreate) Save(ctx context.Context) (*Activation, error)
Save creates the Activation in the database.
func (*ActivationCreate) SaveX ¶
func (ac *ActivationCreate) SaveX(ctx context.Context) *Activation
SaveX calls Save and panics if Save returns an error.
func (*ActivationCreate) SetComments ¶
func (ac *ActivationCreate) SetComments(s string) *ActivationCreate
SetComments sets the comments field.
func (*ActivationCreate) SetCreatedAt ¶
func (ac *ActivationCreate) SetCreatedAt(t time.Time) *ActivationCreate
SetCreatedAt sets the created_at field.
func (*ActivationCreate) SetInternalComments ¶
func (ac *ActivationCreate) SetInternalComments(s string) *ActivationCreate
SetInternalComments sets the internal_comments field.
func (*ActivationCreate) SetNillableComments ¶
func (ac *ActivationCreate) SetNillableComments(s *string) *ActivationCreate
SetNillableComments sets the comments field if the given value is not nil.
func (*ActivationCreate) SetNillableCreatedAt ¶
func (ac *ActivationCreate) SetNillableCreatedAt(t *time.Time) *ActivationCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*ActivationCreate) SetNillableInternalComments ¶
func (ac *ActivationCreate) SetNillableInternalComments(s *string) *ActivationCreate
SetNillableInternalComments sets the internal_comments field if the given value is not nil.
func (*ActivationCreate) SetNillableUpdatedAt ¶
func (ac *ActivationCreate) SetNillableUpdatedAt(t *time.Time) *ActivationCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*ActivationCreate) SetUpdatedAt ¶
func (ac *ActivationCreate) SetUpdatedAt(t time.Time) *ActivationCreate
SetUpdatedAt sets the updated_at field.
type ActivationCreateBulk ¶
type ActivationCreateBulk struct {
// contains filtered or unexported fields
}
ActivationCreateBulk is the builder for creating a bulk of Activation entities.
func (*ActivationCreateBulk) Save ¶
func (acb *ActivationCreateBulk) Save(ctx context.Context) ([]*Activation, error)
Save creates the Activation entities in the database.
func (*ActivationCreateBulk) SaveX ¶
func (acb *ActivationCreateBulk) SaveX(ctx context.Context) []*Activation
SaveX calls Save and panics if Save returns an error.
type ActivationDelete ¶
type ActivationDelete struct {
// contains filtered or unexported fields
}
ActivationDelete is the builder for deleting a Activation entity.
func (*ActivationDelete) Exec ¶
func (ad *ActivationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ActivationDelete) ExecX ¶
func (ad *ActivationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ActivationDelete) Where ¶
func (ad *ActivationDelete) Where(ps ...predicate.Activation) *ActivationDelete
Where adds a new predicate to the delete builder.
type ActivationDeleteOne ¶
type ActivationDeleteOne struct {
// contains filtered or unexported fields
}
ActivationDeleteOne is the builder for deleting a single Activation entity.
func (*ActivationDeleteOne) Exec ¶
func (ado *ActivationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ActivationDeleteOne) ExecX ¶
func (ado *ActivationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ActivationEdge ¶
type ActivationEdge struct { Node *Activation `json:"node"` Cursor Cursor `json:"cursor"` }
ActivationEdge is the edge representation of Activation.
type ActivationEdges ¶
type ActivationEdges struct { // User holds the value of the user edge. User []*User // Actor holds the value of the actor edge. Actor []*User // contains filtered or unexported fields }
ActivationEdges holds the relations/edges for other nodes in the graph.
func (ActivationEdges) ActorOrErr ¶
func (e ActivationEdges) ActorOrErr() ([]*User, error)
ActorOrErr returns the Actor value or an error if the edge was not loaded in eager-loading.
func (ActivationEdges) UserOrErr ¶
func (e ActivationEdges) UserOrErr() ([]*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading.
type ActivationGroupBy ¶
type ActivationGroupBy struct {
// contains filtered or unexported fields
}
ActivationGroupBy is the builder for group-by Activation entities.
func (*ActivationGroupBy) Aggregate ¶
func (agb *ActivationGroupBy) Aggregate(fns ...AggregateFunc) *ActivationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ActivationGroupBy) Bool ¶
func (agb *ActivationGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*ActivationGroupBy) BoolX ¶
func (agb *ActivationGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ActivationGroupBy) Bools ¶
func (agb *ActivationGroupBy) 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 (*ActivationGroupBy) BoolsX ¶
func (agb *ActivationGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ActivationGroupBy) Float64 ¶
func (agb *ActivationGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*ActivationGroupBy) Float64X ¶
func (agb *ActivationGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ActivationGroupBy) Float64s ¶
func (agb *ActivationGroupBy) 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 (*ActivationGroupBy) Float64sX ¶
func (agb *ActivationGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ActivationGroupBy) Int ¶
func (agb *ActivationGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*ActivationGroupBy) IntX ¶
func (agb *ActivationGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ActivationGroupBy) Ints ¶
func (agb *ActivationGroupBy) 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 (*ActivationGroupBy) IntsX ¶
func (agb *ActivationGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ActivationGroupBy) Scan ¶
func (agb *ActivationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*ActivationGroupBy) ScanX ¶
func (agb *ActivationGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ActivationGroupBy) String ¶
func (agb *ActivationGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*ActivationGroupBy) StringX ¶
func (agb *ActivationGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ActivationMutation ¶
type ActivationMutation struct {
// contains filtered or unexported fields
}
ActivationMutation represents an operation that mutate the Activations nodes in the graph.
func (*ActivationMutation) ActorCleared ¶
func (m *ActivationMutation) ActorCleared() bool
ActorCleared returns if the edge actor was cleared.
func (*ActivationMutation) ActorIDs ¶
func (m *ActivationMutation) ActorIDs() (ids []int)
ActorIDs returns the actor ids in the mutation.
func (*ActivationMutation) AddActorIDs ¶
func (m *ActivationMutation) AddActorIDs(ids ...int)
AddActorIDs adds the actor edge to User by ids.
func (*ActivationMutation) AddField ¶
func (m *ActivationMutation) 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 (*ActivationMutation) AddUserIDs ¶
func (m *ActivationMutation) AddUserIDs(ids ...int)
AddUserIDs adds the user edge to User by ids.
func (*ActivationMutation) AddedEdges ¶
func (m *ActivationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ActivationMutation) AddedField ¶
func (m *ActivationMutation) 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 (*ActivationMutation) AddedFields ¶
func (m *ActivationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*ActivationMutation) AddedIDs ¶
func (m *ActivationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*ActivationMutation) ClearActor ¶
func (m *ActivationMutation) ClearActor()
ClearActor clears the actor edge to User.
func (*ActivationMutation) ClearComments ¶
func (m *ActivationMutation) ClearComments()
ClearComments clears the value of comments.
func (*ActivationMutation) ClearEdge ¶
func (m *ActivationMutation) 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 (*ActivationMutation) ClearField ¶
func (m *ActivationMutation) 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 (*ActivationMutation) ClearInternalComments ¶
func (m *ActivationMutation) ClearInternalComments()
ClearInternalComments clears the value of internal_comments.
func (*ActivationMutation) ClearUser ¶
func (m *ActivationMutation) ClearUser()
ClearUser clears the user edge to User.
func (*ActivationMutation) ClearedEdges ¶
func (m *ActivationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ActivationMutation) ClearedFields ¶
func (m *ActivationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ActivationMutation) Client ¶
func (m ActivationMutation) 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 (*ActivationMutation) Comments ¶
func (m *ActivationMutation) Comments() (r string, exists bool)
Comments returns the comments value in the mutation.
func (*ActivationMutation) CommentsCleared ¶
func (m *ActivationMutation) CommentsCleared() bool
CommentsCleared returns if the field comments was cleared in this mutation.
func (*ActivationMutation) CreatedAt ¶
func (m *ActivationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*ActivationMutation) EdgeCleared ¶
func (m *ActivationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*ActivationMutation) Field ¶
func (m *ActivationMutation) 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 (*ActivationMutation) FieldCleared ¶
func (m *ActivationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*ActivationMutation) Fields ¶
func (m *ActivationMutation) 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 (*ActivationMutation) ID ¶
func (m *ActivationMutation) 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 (*ActivationMutation) InternalComments ¶
func (m *ActivationMutation) InternalComments() (r string, exists bool)
InternalComments returns the internal_comments value in the mutation.
func (*ActivationMutation) InternalCommentsCleared ¶
func (m *ActivationMutation) InternalCommentsCleared() bool
InternalCommentsCleared returns if the field internal_comments was cleared in this mutation.
func (*ActivationMutation) OldComments ¶
func (m *ActivationMutation) OldComments(ctx context.Context) (v *string, err error)
OldComments returns the old comments value of the Activation. If the Activation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ActivationMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the Activation. If the Activation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ActivationMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*ActivationMutation) OldInternalComments ¶
func (m *ActivationMutation) OldInternalComments(ctx context.Context) (v *string, err error)
OldInternalComments returns the old internal_comments value of the Activation. If the Activation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ActivationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the Activation. If the Activation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ActivationMutation) RemoveActorIDs ¶
func (m *ActivationMutation) RemoveActorIDs(ids ...int)
RemoveActorIDs removes the actor edge to User by ids.
func (*ActivationMutation) RemoveUserIDs ¶
func (m *ActivationMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the user edge to User by ids.
func (*ActivationMutation) RemovedActorIDs ¶
func (m *ActivationMutation) RemovedActorIDs() (ids []int)
RemovedActor returns the removed ids of actor.
func (*ActivationMutation) RemovedEdges ¶
func (m *ActivationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ActivationMutation) RemovedIDs ¶
func (m *ActivationMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*ActivationMutation) RemovedUserIDs ¶
func (m *ActivationMutation) RemovedUserIDs() (ids []int)
RemovedUser returns the removed ids of user.
func (*ActivationMutation) ResetActor ¶
func (m *ActivationMutation) ResetActor()
ResetActor reset all changes of the "actor" edge.
func (*ActivationMutation) ResetComments ¶
func (m *ActivationMutation) ResetComments()
ResetComments reset all changes of the "comments" field.
func (*ActivationMutation) ResetCreatedAt ¶
func (m *ActivationMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*ActivationMutation) ResetEdge ¶
func (m *ActivationMutation) 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 (*ActivationMutation) ResetField ¶
func (m *ActivationMutation) 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 (*ActivationMutation) ResetInternalComments ¶
func (m *ActivationMutation) ResetInternalComments()
ResetInternalComments reset all changes of the "internal_comments" field.
func (*ActivationMutation) ResetUpdatedAt ¶
func (m *ActivationMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*ActivationMutation) ResetUser ¶
func (m *ActivationMutation) ResetUser()
ResetUser reset all changes of the "user" edge.
func (*ActivationMutation) SetComments ¶
func (m *ActivationMutation) SetComments(s string)
SetComments sets the comments field.
func (*ActivationMutation) SetCreatedAt ¶
func (m *ActivationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*ActivationMutation) SetField ¶
func (m *ActivationMutation) 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 (*ActivationMutation) SetInternalComments ¶
func (m *ActivationMutation) SetInternalComments(s string)
SetInternalComments sets the internal_comments field.
func (*ActivationMutation) SetUpdatedAt ¶
func (m *ActivationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (ActivationMutation) Tx ¶
func (m ActivationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ActivationMutation) Type ¶
func (m *ActivationMutation) Type() string
Type returns the node type of this mutation (Activation).
func (*ActivationMutation) UpdatedAt ¶
func (m *ActivationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*ActivationMutation) UserCleared ¶
func (m *ActivationMutation) UserCleared() bool
UserCleared returns if the edge user was cleared.
func (*ActivationMutation) UserIDs ¶
func (m *ActivationMutation) UserIDs() (ids []int)
UserIDs returns the user ids in the mutation.
type ActivationOrder ¶
type ActivationOrder struct { Direction OrderDirection `json:"direction"` Field *ActivationOrderField `json:"field"` }
ActivationOrder defines the ordering of Activation.
type ActivationOrderField ¶
type ActivationOrderField struct {
// contains filtered or unexported fields
}
ActivationOrderField defines the ordering field of Activation.
func (ActivationOrderField) MarshalGQL ¶
func (f ActivationOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (ActivationOrderField) String ¶
func (f ActivationOrderField) String() string
String implement fmt.Stringer interface.
func (*ActivationOrderField) UnmarshalGQL ¶
func (f *ActivationOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type ActivationPaginateOption ¶
type ActivationPaginateOption func(*activationPager) error
ActivationPaginateOption enables pagination customization.
func WithActivationFilter ¶
func WithActivationFilter(filter func(*ActivationQuery) (*ActivationQuery, error)) ActivationPaginateOption
WithActivationFilter configures pagination filter.
func WithActivationOrder ¶
func WithActivationOrder(order *ActivationOrder) ActivationPaginateOption
WithActivationOrder configures pagination ordering.
type ActivationQuery ¶
type ActivationQuery struct {
// contains filtered or unexported fields
}
ActivationQuery is the builder for querying Activation entities.
func (*ActivationQuery) All ¶
func (aq *ActivationQuery) All(ctx context.Context) ([]*Activation, error)
All executes the query and returns a list of Activations.
func (*ActivationQuery) AllX ¶
func (aq *ActivationQuery) AllX(ctx context.Context) []*Activation
AllX is like All, but panics if an error occurs.
func (*ActivationQuery) Clone ¶
func (aq *ActivationQuery) Clone() *ActivationQuery
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 (*ActivationQuery) CollectFields ¶
func (a *ActivationQuery) CollectFields(ctx context.Context, satisfies ...string) *ActivationQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*ActivationQuery) Count ¶
func (aq *ActivationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ActivationQuery) CountX ¶
func (aq *ActivationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ActivationQuery) Exist ¶
func (aq *ActivationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ActivationQuery) ExistX ¶
func (aq *ActivationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ActivationQuery) First ¶
func (aq *ActivationQuery) First(ctx context.Context) (*Activation, error)
First returns the first Activation entity in the query. Returns *NotFoundError when no activation was found.
func (*ActivationQuery) FirstID ¶
func (aq *ActivationQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Activation id in the query. Returns *NotFoundError when no id was found.
func (*ActivationQuery) FirstIDX ¶
func (aq *ActivationQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ActivationQuery) FirstX ¶
func (aq *ActivationQuery) FirstX(ctx context.Context) *Activation
FirstX is like First, but panics if an error occurs.
func (*ActivationQuery) GroupBy ¶
func (aq *ActivationQuery) GroupBy(field string, fields ...string) *ActivationGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Activation.Query(). GroupBy(activation.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ActivationQuery) IDs ¶
func (aq *ActivationQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Activation ids.
func (*ActivationQuery) IDsX ¶
func (aq *ActivationQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ActivationQuery) Limit ¶
func (aq *ActivationQuery) Limit(limit int) *ActivationQuery
Limit adds a limit step to the query.
func (*ActivationQuery) Offset ¶
func (aq *ActivationQuery) Offset(offset int) *ActivationQuery
Offset adds an offset step to the query.
func (*ActivationQuery) Only ¶
func (aq *ActivationQuery) Only(ctx context.Context) (*Activation, error)
Only returns the only Activation entity in the query, returns an error if not exactly one entity was returned.
func (*ActivationQuery) OnlyID ¶
func (aq *ActivationQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Activation id in the query, returns an error if not exactly one id was returned.
func (*ActivationQuery) OnlyIDX ¶
func (aq *ActivationQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ActivationQuery) OnlyX ¶
func (aq *ActivationQuery) OnlyX(ctx context.Context) *Activation
OnlyX is like Only, but panics if an error occurs.
func (*ActivationQuery) Order ¶
func (aq *ActivationQuery) Order(o ...OrderFunc) *ActivationQuery
Order adds an order step to the query.
func (*ActivationQuery) Paginate ¶
func (a *ActivationQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...ActivationPaginateOption, ) (*ActivationConnection, error)
Paginate executes the query and returns a relay based cursor connection to Activation.
func (*ActivationQuery) QueryActor ¶
func (aq *ActivationQuery) QueryActor() *UserQuery
QueryActor chains the current query on the actor edge.
func (*ActivationQuery) QueryUser ¶
func (aq *ActivationQuery) QueryUser() *UserQuery
QueryUser chains the current query on the user edge.
func (*ActivationQuery) Select ¶
func (aq *ActivationQuery) Select(field string, fields ...string) *ActivationSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Activation.Query(). Select(activation.FieldCreatedAt). Scan(ctx, &v)
func (*ActivationQuery) Where ¶
func (aq *ActivationQuery) Where(ps ...predicate.Activation) *ActivationQuery
Where adds a new predicate for the builder.
func (*ActivationQuery) WithActor ¶
func (aq *ActivationQuery) WithActor(opts ...func(*UserQuery)) *ActivationQuery
WithActor tells the query-builder to eager-loads the nodes that are connected to
the "actor" edge. The optional arguments used to configure the query builder of the edge.
func (*ActivationQuery) WithUser ¶
func (aq *ActivationQuery) WithUser(opts ...func(*UserQuery)) *ActivationQuery
WithUser tells the query-builder to eager-loads the nodes that are connected to
the "user" edge. The optional arguments used to configure the query builder of the edge.
type ActivationSelect ¶
type ActivationSelect struct { *ActivationQuery // contains filtered or unexported fields }
ActivationSelect is the builder for select fields of Activation entities.
func (*ActivationSelect) Bool ¶
func (as *ActivationSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*ActivationSelect) BoolX ¶
func (as *ActivationSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ActivationSelect) Bools ¶
func (as *ActivationSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*ActivationSelect) BoolsX ¶
func (as *ActivationSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ActivationSelect) Float64 ¶
func (as *ActivationSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*ActivationSelect) Float64X ¶
func (as *ActivationSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ActivationSelect) Float64s ¶
func (as *ActivationSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*ActivationSelect) Float64sX ¶
func (as *ActivationSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ActivationSelect) Int ¶
func (as *ActivationSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*ActivationSelect) IntX ¶
func (as *ActivationSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ActivationSelect) Ints ¶
func (as *ActivationSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*ActivationSelect) IntsX ¶
func (as *ActivationSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ActivationSelect) Scan ¶
func (as *ActivationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*ActivationSelect) ScanX ¶
func (as *ActivationSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ActivationSelect) String ¶
func (as *ActivationSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*ActivationSelect) StringX ¶
func (as *ActivationSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ActivationUpdate ¶
type ActivationUpdate struct {
// contains filtered or unexported fields
}
ActivationUpdate is the builder for updating Activation entities.
func (*ActivationUpdate) AddActor ¶
func (au *ActivationUpdate) AddActor(u ...*User) *ActivationUpdate
AddActor adds the actor edges to User.
func (*ActivationUpdate) AddActorIDs ¶
func (au *ActivationUpdate) AddActorIDs(ids ...int) *ActivationUpdate
AddActorIDs adds the actor edge to User by ids.
func (*ActivationUpdate) AddUser ¶
func (au *ActivationUpdate) AddUser(u ...*User) *ActivationUpdate
AddUser adds the user edges to User.
func (*ActivationUpdate) AddUserIDs ¶
func (au *ActivationUpdate) AddUserIDs(ids ...int) *ActivationUpdate
AddUserIDs adds the user edge to User by ids.
func (*ActivationUpdate) ClearActor ¶
func (au *ActivationUpdate) ClearActor() *ActivationUpdate
ClearActor clears all "actor" edges to type User.
func (*ActivationUpdate) ClearComments ¶
func (au *ActivationUpdate) ClearComments() *ActivationUpdate
ClearComments clears the value of comments.
func (*ActivationUpdate) ClearInternalComments ¶
func (au *ActivationUpdate) ClearInternalComments() *ActivationUpdate
ClearInternalComments clears the value of internal_comments.
func (*ActivationUpdate) ClearUser ¶
func (au *ActivationUpdate) ClearUser() *ActivationUpdate
ClearUser clears all "user" edges to type User.
func (*ActivationUpdate) Exec ¶
func (au *ActivationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ActivationUpdate) ExecX ¶
func (au *ActivationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActivationUpdate) Mutation ¶
func (au *ActivationUpdate) Mutation() *ActivationMutation
Mutation returns the ActivationMutation object of the builder.
func (*ActivationUpdate) RemoveActor ¶
func (au *ActivationUpdate) RemoveActor(u ...*User) *ActivationUpdate
RemoveActor removes actor edges to User.
func (*ActivationUpdate) RemoveActorIDs ¶
func (au *ActivationUpdate) RemoveActorIDs(ids ...int) *ActivationUpdate
RemoveActorIDs removes the actor edge to User by ids.
func (*ActivationUpdate) RemoveUser ¶
func (au *ActivationUpdate) RemoveUser(u ...*User) *ActivationUpdate
RemoveUser removes user edges to User.
func (*ActivationUpdate) RemoveUserIDs ¶
func (au *ActivationUpdate) RemoveUserIDs(ids ...int) *ActivationUpdate
RemoveUserIDs removes the user edge to User by ids.
func (*ActivationUpdate) Save ¶
func (au *ActivationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ActivationUpdate) SaveX ¶
func (au *ActivationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ActivationUpdate) SetComments ¶
func (au *ActivationUpdate) SetComments(s string) *ActivationUpdate
SetComments sets the comments field.
func (*ActivationUpdate) SetInternalComments ¶
func (au *ActivationUpdate) SetInternalComments(s string) *ActivationUpdate
SetInternalComments sets the internal_comments field.
func (*ActivationUpdate) SetNillableComments ¶
func (au *ActivationUpdate) SetNillableComments(s *string) *ActivationUpdate
SetNillableComments sets the comments field if the given value is not nil.
func (*ActivationUpdate) SetNillableInternalComments ¶
func (au *ActivationUpdate) SetNillableInternalComments(s *string) *ActivationUpdate
SetNillableInternalComments sets the internal_comments field if the given value is not nil.
func (*ActivationUpdate) SetUpdatedAt ¶
func (au *ActivationUpdate) SetUpdatedAt(t time.Time) *ActivationUpdate
SetUpdatedAt sets the updated_at field.
func (*ActivationUpdate) Where ¶
func (au *ActivationUpdate) Where(ps ...predicate.Activation) *ActivationUpdate
Where adds a new predicate for the builder.
type ActivationUpdateOne ¶
type ActivationUpdateOne struct {
// contains filtered or unexported fields
}
ActivationUpdateOne is the builder for updating a single Activation entity.
func (*ActivationUpdateOne) AddActor ¶
func (auo *ActivationUpdateOne) AddActor(u ...*User) *ActivationUpdateOne
AddActor adds the actor edges to User.
func (*ActivationUpdateOne) AddActorIDs ¶
func (auo *ActivationUpdateOne) AddActorIDs(ids ...int) *ActivationUpdateOne
AddActorIDs adds the actor edge to User by ids.
func (*ActivationUpdateOne) AddUser ¶
func (auo *ActivationUpdateOne) AddUser(u ...*User) *ActivationUpdateOne
AddUser adds the user edges to User.
func (*ActivationUpdateOne) AddUserIDs ¶
func (auo *ActivationUpdateOne) AddUserIDs(ids ...int) *ActivationUpdateOne
AddUserIDs adds the user edge to User by ids.
func (*ActivationUpdateOne) ClearActor ¶
func (auo *ActivationUpdateOne) ClearActor() *ActivationUpdateOne
ClearActor clears all "actor" edges to type User.
func (*ActivationUpdateOne) ClearComments ¶
func (auo *ActivationUpdateOne) ClearComments() *ActivationUpdateOne
ClearComments clears the value of comments.
func (*ActivationUpdateOne) ClearInternalComments ¶
func (auo *ActivationUpdateOne) ClearInternalComments() *ActivationUpdateOne
ClearInternalComments clears the value of internal_comments.
func (*ActivationUpdateOne) ClearUser ¶
func (auo *ActivationUpdateOne) ClearUser() *ActivationUpdateOne
ClearUser clears all "user" edges to type User.
func (*ActivationUpdateOne) Exec ¶
func (auo *ActivationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ActivationUpdateOne) ExecX ¶
func (auo *ActivationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActivationUpdateOne) Mutation ¶
func (auo *ActivationUpdateOne) Mutation() *ActivationMutation
Mutation returns the ActivationMutation object of the builder.
func (*ActivationUpdateOne) RemoveActor ¶
func (auo *ActivationUpdateOne) RemoveActor(u ...*User) *ActivationUpdateOne
RemoveActor removes actor edges to User.
func (*ActivationUpdateOne) RemoveActorIDs ¶
func (auo *ActivationUpdateOne) RemoveActorIDs(ids ...int) *ActivationUpdateOne
RemoveActorIDs removes the actor edge to User by ids.
func (*ActivationUpdateOne) RemoveUser ¶
func (auo *ActivationUpdateOne) RemoveUser(u ...*User) *ActivationUpdateOne
RemoveUser removes user edges to User.
func (*ActivationUpdateOne) RemoveUserIDs ¶
func (auo *ActivationUpdateOne) RemoveUserIDs(ids ...int) *ActivationUpdateOne
RemoveUserIDs removes the user edge to User by ids.
func (*ActivationUpdateOne) Save ¶
func (auo *ActivationUpdateOne) Save(ctx context.Context) (*Activation, error)
Save executes the query and returns the updated entity.
func (*ActivationUpdateOne) SaveX ¶
func (auo *ActivationUpdateOne) SaveX(ctx context.Context) *Activation
SaveX is like Save, but panics if an error occurs.
func (*ActivationUpdateOne) SetComments ¶
func (auo *ActivationUpdateOne) SetComments(s string) *ActivationUpdateOne
SetComments sets the comments field.
func (*ActivationUpdateOne) SetInternalComments ¶
func (auo *ActivationUpdateOne) SetInternalComments(s string) *ActivationUpdateOne
SetInternalComments sets the internal_comments field.
func (*ActivationUpdateOne) SetNillableComments ¶
func (auo *ActivationUpdateOne) SetNillableComments(s *string) *ActivationUpdateOne
SetNillableComments sets the comments field if the given value is not nil.
func (*ActivationUpdateOne) SetNillableInternalComments ¶
func (auo *ActivationUpdateOne) SetNillableInternalComments(s *string) *ActivationUpdateOne
SetNillableInternalComments sets the internal_comments field if the given value is not nil.
func (*ActivationUpdateOne) SetUpdatedAt ¶
func (auo *ActivationUpdateOne) SetUpdatedAt(t time.Time) *ActivationUpdateOne
SetUpdatedAt sets the updated_at field.
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 AuthSession ¶
type AuthSession struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
AuthSession is the model entity for the AuthSession schema.
func (*AuthSession) String ¶
func (as *AuthSession) String() string
String implements the fmt.Stringer.
func (*AuthSession) ToEdge ¶
func (as *AuthSession) ToEdge(order *AuthSessionOrder) *AuthSessionEdge
ToEdge converts AuthSession into AuthSessionEdge.
func (*AuthSession) Unwrap ¶
func (as *AuthSession) Unwrap() *AuthSession
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 (*AuthSession) Update ¶
func (as *AuthSession) Update() *AuthSessionUpdateOne
Update returns a builder for updating this AuthSession. Note that, you need to call AuthSession.Unwrap() before calling this method, if this AuthSession was returned from a transaction, and the transaction was committed or rolled back.
type AuthSessionClient ¶
type AuthSessionClient struct {
// contains filtered or unexported fields
}
AuthSessionClient is a client for the AuthSession schema.
func NewAuthSessionClient ¶
func NewAuthSessionClient(c config) *AuthSessionClient
NewAuthSessionClient returns a client for the AuthSession from the given config.
func (*AuthSessionClient) Create ¶
func (c *AuthSessionClient) Create() *AuthSessionCreate
Create returns a create builder for AuthSession.
func (*AuthSessionClient) CreateBulk ¶
func (c *AuthSessionClient) CreateBulk(builders ...*AuthSessionCreate) *AuthSessionCreateBulk
CreateBulk returns a builder for creating a bulk of AuthSession entities.
func (*AuthSessionClient) Delete ¶
func (c *AuthSessionClient) Delete() *AuthSessionDelete
Delete returns a delete builder for AuthSession.
func (*AuthSessionClient) DeleteOne ¶
func (c *AuthSessionClient) DeleteOne(as *AuthSession) *AuthSessionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*AuthSessionClient) DeleteOneID ¶
func (c *AuthSessionClient) DeleteOneID(id int) *AuthSessionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*AuthSessionClient) Get ¶
func (c *AuthSessionClient) Get(ctx context.Context, id int) (*AuthSession, error)
Get returns a AuthSession entity by its id.
func (*AuthSessionClient) GetX ¶
func (c *AuthSessionClient) GetX(ctx context.Context, id int) *AuthSession
GetX is like Get, but panics if an error occurs.
func (*AuthSessionClient) Hooks ¶
func (c *AuthSessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AuthSessionClient) Query ¶
func (c *AuthSessionClient) Query() *AuthSessionQuery
Query returns a query builder for AuthSession.
func (*AuthSessionClient) Update ¶
func (c *AuthSessionClient) Update() *AuthSessionUpdate
Update returns an update builder for AuthSession.
func (*AuthSessionClient) UpdateOne ¶
func (c *AuthSessionClient) UpdateOne(as *AuthSession) *AuthSessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AuthSessionClient) UpdateOneID ¶
func (c *AuthSessionClient) UpdateOneID(id int) *AuthSessionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AuthSessionClient) Use ¶
func (c *AuthSessionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authsession.Hooks(f(g(h())))`.
type AuthSessionConnection ¶
type AuthSessionConnection struct { Edges []*AuthSessionEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
AuthSessionConnection is the connection containing edges to AuthSession.
type AuthSessionCreate ¶
type AuthSessionCreate struct {
// contains filtered or unexported fields
}
AuthSessionCreate is the builder for creating a AuthSession entity.
func (*AuthSessionCreate) Mutation ¶
func (asc *AuthSessionCreate) Mutation() *AuthSessionMutation
Mutation returns the AuthSessionMutation object of the builder.
func (*AuthSessionCreate) Save ¶
func (asc *AuthSessionCreate) Save(ctx context.Context) (*AuthSession, error)
Save creates the AuthSession in the database.
func (*AuthSessionCreate) SaveX ¶
func (asc *AuthSessionCreate) SaveX(ctx context.Context) *AuthSession
SaveX calls Save and panics if Save returns an error.
type AuthSessionCreateBulk ¶
type AuthSessionCreateBulk struct {
// contains filtered or unexported fields
}
AuthSessionCreateBulk is the builder for creating a bulk of AuthSession entities.
func (*AuthSessionCreateBulk) Save ¶
func (ascb *AuthSessionCreateBulk) Save(ctx context.Context) ([]*AuthSession, error)
Save creates the AuthSession entities in the database.
func (*AuthSessionCreateBulk) SaveX ¶
func (ascb *AuthSessionCreateBulk) SaveX(ctx context.Context) []*AuthSession
SaveX calls Save and panics if Save returns an error.
type AuthSessionDelete ¶
type AuthSessionDelete struct {
// contains filtered or unexported fields
}
AuthSessionDelete is the builder for deleting a AuthSession entity.
func (*AuthSessionDelete) Exec ¶
func (asd *AuthSessionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AuthSessionDelete) ExecX ¶
func (asd *AuthSessionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AuthSessionDelete) Where ¶
func (asd *AuthSessionDelete) Where(ps ...predicate.AuthSession) *AuthSessionDelete
Where adds a new predicate to the delete builder.
type AuthSessionDeleteOne ¶
type AuthSessionDeleteOne struct {
// contains filtered or unexported fields
}
AuthSessionDeleteOne is the builder for deleting a single AuthSession entity.
func (*AuthSessionDeleteOne) Exec ¶
func (asdo *AuthSessionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AuthSessionDeleteOne) ExecX ¶
func (asdo *AuthSessionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AuthSessionEdge ¶
type AuthSessionEdge struct { Node *AuthSession `json:"node"` Cursor Cursor `json:"cursor"` }
AuthSessionEdge is the edge representation of AuthSession.
type AuthSessionGroupBy ¶
type AuthSessionGroupBy struct {
// contains filtered or unexported fields
}
AuthSessionGroupBy is the builder for group-by AuthSession entities.
func (*AuthSessionGroupBy) Aggregate ¶
func (asgb *AuthSessionGroupBy) Aggregate(fns ...AggregateFunc) *AuthSessionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AuthSessionGroupBy) Bool ¶
func (asgb *AuthSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*AuthSessionGroupBy) BoolX ¶
func (asgb *AuthSessionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AuthSessionGroupBy) Bools ¶
func (asgb *AuthSessionGroupBy) 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 (*AuthSessionGroupBy) BoolsX ¶
func (asgb *AuthSessionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AuthSessionGroupBy) Float64 ¶
func (asgb *AuthSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*AuthSessionGroupBy) Float64X ¶
func (asgb *AuthSessionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AuthSessionGroupBy) Float64s ¶
func (asgb *AuthSessionGroupBy) 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 (*AuthSessionGroupBy) Float64sX ¶
func (asgb *AuthSessionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AuthSessionGroupBy) Int ¶
func (asgb *AuthSessionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*AuthSessionGroupBy) IntX ¶
func (asgb *AuthSessionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AuthSessionGroupBy) Ints ¶
func (asgb *AuthSessionGroupBy) 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 (*AuthSessionGroupBy) IntsX ¶
func (asgb *AuthSessionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AuthSessionGroupBy) Scan ¶
func (asgb *AuthSessionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*AuthSessionGroupBy) ScanX ¶
func (asgb *AuthSessionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AuthSessionGroupBy) String ¶
func (asgb *AuthSessionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*AuthSessionGroupBy) StringX ¶
func (asgb *AuthSessionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AuthSessionMutation ¶
type AuthSessionMutation struct {
// contains filtered or unexported fields
}
AuthSessionMutation represents an operation that mutate the AuthSessions nodes in the graph.
func (*AuthSessionMutation) AddField ¶
func (m *AuthSessionMutation) 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 (*AuthSessionMutation) AddedEdges ¶
func (m *AuthSessionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AuthSessionMutation) AddedField ¶
func (m *AuthSessionMutation) 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 (*AuthSessionMutation) AddedFields ¶
func (m *AuthSessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*AuthSessionMutation) AddedIDs ¶
func (m *AuthSessionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*AuthSessionMutation) ClearEdge ¶
func (m *AuthSessionMutation) 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 (*AuthSessionMutation) ClearField ¶
func (m *AuthSessionMutation) 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 (*AuthSessionMutation) ClearedEdges ¶
func (m *AuthSessionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AuthSessionMutation) ClearedFields ¶
func (m *AuthSessionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AuthSessionMutation) Client ¶
func (m AuthSessionMutation) 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 (*AuthSessionMutation) EdgeCleared ¶
func (m *AuthSessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*AuthSessionMutation) Field ¶
func (m *AuthSessionMutation) 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 (*AuthSessionMutation) FieldCleared ¶
func (m *AuthSessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*AuthSessionMutation) Fields ¶
func (m *AuthSessionMutation) 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 (*AuthSessionMutation) ID ¶
func (m *AuthSessionMutation) 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 (*AuthSessionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*AuthSessionMutation) Op ¶
func (m *AuthSessionMutation) Op() Op
Op returns the operation name.
func (*AuthSessionMutation) RemovedEdges ¶
func (m *AuthSessionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AuthSessionMutation) RemovedIDs ¶
func (m *AuthSessionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*AuthSessionMutation) ResetEdge ¶
func (m *AuthSessionMutation) 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 (*AuthSessionMutation) ResetField ¶
func (m *AuthSessionMutation) 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 (*AuthSessionMutation) SetField ¶
func (m *AuthSessionMutation) 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 (AuthSessionMutation) Tx ¶
func (m AuthSessionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AuthSessionMutation) Type ¶
func (m *AuthSessionMutation) Type() string
Type returns the node type of this mutation (AuthSession).
type AuthSessionOrder ¶
type AuthSessionOrder struct { Direction OrderDirection `json:"direction"` Field *AuthSessionOrderField `json:"field"` }
AuthSessionOrder defines the ordering of AuthSession.
type AuthSessionOrderField ¶
type AuthSessionOrderField struct {
// contains filtered or unexported fields
}
AuthSessionOrderField defines the ordering field of AuthSession.
type AuthSessionPaginateOption ¶
type AuthSessionPaginateOption func(*authSessionPager) error
AuthSessionPaginateOption enables pagination customization.
func WithAuthSessionFilter ¶
func WithAuthSessionFilter(filter func(*AuthSessionQuery) (*AuthSessionQuery, error)) AuthSessionPaginateOption
WithAuthSessionFilter configures pagination filter.
func WithAuthSessionOrder ¶
func WithAuthSessionOrder(order *AuthSessionOrder) AuthSessionPaginateOption
WithAuthSessionOrder configures pagination ordering.
type AuthSessionQuery ¶
type AuthSessionQuery struct {
// contains filtered or unexported fields
}
AuthSessionQuery is the builder for querying AuthSession entities.
func (*AuthSessionQuery) All ¶
func (asq *AuthSessionQuery) All(ctx context.Context) ([]*AuthSession, error)
All executes the query and returns a list of AuthSessions.
func (*AuthSessionQuery) AllX ¶
func (asq *AuthSessionQuery) AllX(ctx context.Context) []*AuthSession
AllX is like All, but panics if an error occurs.
func (*AuthSessionQuery) Clone ¶
func (asq *AuthSessionQuery) Clone() *AuthSessionQuery
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 (*AuthSessionQuery) CollectFields ¶
func (as *AuthSessionQuery) CollectFields(ctx context.Context, satisfies ...string) *AuthSessionQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*AuthSessionQuery) Count ¶
func (asq *AuthSessionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AuthSessionQuery) CountX ¶
func (asq *AuthSessionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AuthSessionQuery) Exist ¶
func (asq *AuthSessionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AuthSessionQuery) ExistX ¶
func (asq *AuthSessionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AuthSessionQuery) First ¶
func (asq *AuthSessionQuery) First(ctx context.Context) (*AuthSession, error)
First returns the first AuthSession entity in the query. Returns *NotFoundError when no authsession was found.
func (*AuthSessionQuery) FirstID ¶
func (asq *AuthSessionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AuthSession id in the query. Returns *NotFoundError when no id was found.
func (*AuthSessionQuery) FirstIDX ¶
func (asq *AuthSessionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AuthSessionQuery) FirstX ¶
func (asq *AuthSessionQuery) FirstX(ctx context.Context) *AuthSession
FirstX is like First, but panics if an error occurs.
func (*AuthSessionQuery) GroupBy ¶
func (asq *AuthSessionQuery) GroupBy(field string, fields ...string) *AuthSessionGroupBy
GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
func (*AuthSessionQuery) IDs ¶
func (asq *AuthSessionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of AuthSession ids.
func (*AuthSessionQuery) IDsX ¶
func (asq *AuthSessionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AuthSessionQuery) Limit ¶
func (asq *AuthSessionQuery) Limit(limit int) *AuthSessionQuery
Limit adds a limit step to the query.
func (*AuthSessionQuery) Offset ¶
func (asq *AuthSessionQuery) Offset(offset int) *AuthSessionQuery
Offset adds an offset step to the query.
func (*AuthSessionQuery) Only ¶
func (asq *AuthSessionQuery) Only(ctx context.Context) (*AuthSession, error)
Only returns the only AuthSession entity in the query, returns an error if not exactly one entity was returned.
func (*AuthSessionQuery) OnlyID ¶
func (asq *AuthSessionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only AuthSession id in the query, returns an error if not exactly one id was returned.
func (*AuthSessionQuery) OnlyIDX ¶
func (asq *AuthSessionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AuthSessionQuery) OnlyX ¶
func (asq *AuthSessionQuery) OnlyX(ctx context.Context) *AuthSession
OnlyX is like Only, but panics if an error occurs.
func (*AuthSessionQuery) Order ¶
func (asq *AuthSessionQuery) Order(o ...OrderFunc) *AuthSessionQuery
Order adds an order step to the query.
func (*AuthSessionQuery) Paginate ¶
func (as *AuthSessionQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...AuthSessionPaginateOption, ) (*AuthSessionConnection, error)
Paginate executes the query and returns a relay based cursor connection to AuthSession.
func (*AuthSessionQuery) Select ¶
func (asq *AuthSessionQuery) Select(field string, fields ...string) *AuthSessionSelect
Select one or more fields from the given query.
func (*AuthSessionQuery) Where ¶
func (asq *AuthSessionQuery) Where(ps ...predicate.AuthSession) *AuthSessionQuery
Where adds a new predicate for the builder.
type AuthSessionSelect ¶
type AuthSessionSelect struct { *AuthSessionQuery // contains filtered or unexported fields }
AuthSessionSelect is the builder for select fields of AuthSession entities.
func (*AuthSessionSelect) Bool ¶
func (ass *AuthSessionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*AuthSessionSelect) BoolX ¶
func (ass *AuthSessionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AuthSessionSelect) Bools ¶
func (ass *AuthSessionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*AuthSessionSelect) BoolsX ¶
func (ass *AuthSessionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AuthSessionSelect) Float64 ¶
func (ass *AuthSessionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*AuthSessionSelect) Float64X ¶
func (ass *AuthSessionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AuthSessionSelect) Float64s ¶
func (ass *AuthSessionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*AuthSessionSelect) Float64sX ¶
func (ass *AuthSessionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AuthSessionSelect) Int ¶
func (ass *AuthSessionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*AuthSessionSelect) IntX ¶
func (ass *AuthSessionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AuthSessionSelect) Ints ¶
func (ass *AuthSessionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*AuthSessionSelect) IntsX ¶
func (ass *AuthSessionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AuthSessionSelect) Scan ¶
func (ass *AuthSessionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*AuthSessionSelect) ScanX ¶
func (ass *AuthSessionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AuthSessionSelect) String ¶
func (ass *AuthSessionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*AuthSessionSelect) StringX ¶
func (ass *AuthSessionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AuthSessionUpdate ¶
type AuthSessionUpdate struct {
// contains filtered or unexported fields
}
AuthSessionUpdate is the builder for updating AuthSession entities.
func (*AuthSessionUpdate) Exec ¶
func (asu *AuthSessionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthSessionUpdate) ExecX ¶
func (asu *AuthSessionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthSessionUpdate) Mutation ¶
func (asu *AuthSessionUpdate) Mutation() *AuthSessionMutation
Mutation returns the AuthSessionMutation object of the builder.
func (*AuthSessionUpdate) Save ¶
func (asu *AuthSessionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AuthSessionUpdate) SaveX ¶
func (asu *AuthSessionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AuthSessionUpdate) Where ¶
func (asu *AuthSessionUpdate) Where(ps ...predicate.AuthSession) *AuthSessionUpdate
Where adds a new predicate for the builder.
type AuthSessionUpdateOne ¶
type AuthSessionUpdateOne struct {
// contains filtered or unexported fields
}
AuthSessionUpdateOne is the builder for updating a single AuthSession entity.
func (*AuthSessionUpdateOne) Exec ¶
func (asuo *AuthSessionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AuthSessionUpdateOne) ExecX ¶
func (asuo *AuthSessionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthSessionUpdateOne) Mutation ¶
func (asuo *AuthSessionUpdateOne) Mutation() *AuthSessionMutation
Mutation returns the AuthSessionMutation object of the builder.
func (*AuthSessionUpdateOne) Save ¶
func (asuo *AuthSessionUpdateOne) Save(ctx context.Context) (*AuthSession, error)
Save executes the query and returns the updated entity.
func (*AuthSessionUpdateOne) SaveX ¶
func (asuo *AuthSessionUpdateOne) SaveX(ctx context.Context) *AuthSession
SaveX is like Save, but panics if an error occurs.
type AuthSessions ¶
type AuthSessions []*AuthSession
AuthSessions is a parsable slice of AuthSession.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Activation is the client for interacting with the Activation builders. Activation *ActivationClient // AuthSession is the client for interacting with the AuthSession builders. AuthSession *AuthSessionClient // MapLayer is the client for interacting with the MapLayer builders. MapLayer *MapLayerClient // MapType is the client for interacting with the MapType builders. MapType *MapTypeClient // Metadata is the client for interacting with the Metadata builders. Metadata *MetadataClient // Player is the client for interacting with the Player builders. Player *PlayerClient // PlayerIdentifier is the client for interacting with the PlayerIdentifier builders. PlayerIdentifier *PlayerIdentifierClient // Server is the client for interacting with the Server builders. Server *ServerClient // ServerType is the client for interacting with the ServerType builders. ServerType *ServerTypeClient // Session is the client for interacting with the Session builders. Session *SessionClient // Token is the client for interacting with the Token builders. Token *TokenClient // 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 database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Activation. Query(). Count(ctx)
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(pet.Table))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Cursor ¶
Cursor of an edge type.
func (Cursor) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Cursor) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.
type Edge ¶
type Edge struct { Type string `json:"type,omitempty"` // edge type. Name string `json:"name,omitempty"` // edge name. IDs []int `json:"ids,omitempty"` // node ids (where this edge point to). }
Edges between two nodes.
type Field ¶
type Field struct { Type string `json:"type,omitempty"` // field type. Name string `json:"name,omitempty"` // field name (as in struct). Value string `json:"value,omitempty"` // stringified value. }
Field of a node.
type MapLayer ¶
type MapLayer struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // URLTemplate holds the value of the "url_template" field. URLTemplate string `json:"url_template,omitempty"` // IsPublic holds the value of the "is_public" field. IsPublic bool `json:"is_public,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MapLayerQuery when eager-loading is set. Edges MapLayerEdges `json:"edges"` // contains filtered or unexported fields }
MapLayer is the model entity for the MapLayer schema.
func (*MapLayer) QueryMapType ¶
func (ml *MapLayer) QueryMapType() *MapTypeQuery
QueryMapType queries the map_type edge of the MapLayer.
func (*MapLayer) QueryMetadata ¶
func (ml *MapLayer) QueryMetadata() *MetadataQuery
QueryMetadata queries the metadata edge of the MapLayer.
func (*MapLayer) ToEdge ¶
func (ml *MapLayer) ToEdge(order *MapLayerOrder) *MapLayerEdge
ToEdge converts MapLayer into MapLayerEdge.
func (*MapLayer) 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 (*MapLayer) Update ¶
func (ml *MapLayer) Update() *MapLayerUpdateOne
Update returns a builder for updating this MapLayer. Note that, you need to call MapLayer.Unwrap() before calling this method, if this MapLayer was returned from a transaction, and the transaction was committed or rolled back.
type MapLayerClient ¶
type MapLayerClient struct {
// contains filtered or unexported fields
}
MapLayerClient is a client for the MapLayer schema.
func NewMapLayerClient ¶
func NewMapLayerClient(c config) *MapLayerClient
NewMapLayerClient returns a client for the MapLayer from the given config.
func (*MapLayerClient) Create ¶
func (c *MapLayerClient) Create() *MapLayerCreate
Create returns a create builder for MapLayer.
func (*MapLayerClient) CreateBulk ¶
func (c *MapLayerClient) CreateBulk(builders ...*MapLayerCreate) *MapLayerCreateBulk
CreateBulk returns a builder for creating a bulk of MapLayer entities.
func (*MapLayerClient) Delete ¶
func (c *MapLayerClient) Delete() *MapLayerDelete
Delete returns a delete builder for MapLayer.
func (*MapLayerClient) DeleteOne ¶
func (c *MapLayerClient) DeleteOne(ml *MapLayer) *MapLayerDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MapLayerClient) DeleteOneID ¶
func (c *MapLayerClient) DeleteOneID(id int) *MapLayerDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MapLayerClient) GetX ¶
func (c *MapLayerClient) GetX(ctx context.Context, id int) *MapLayer
GetX is like Get, but panics if an error occurs.
func (*MapLayerClient) Hooks ¶
func (c *MapLayerClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MapLayerClient) Query ¶
func (c *MapLayerClient) Query() *MapLayerQuery
Query returns a query builder for MapLayer.
func (*MapLayerClient) QueryMapType ¶
func (c *MapLayerClient) QueryMapType(ml *MapLayer) *MapTypeQuery
QueryMapType queries the map_type edge of a MapLayer.
func (*MapLayerClient) QueryMetadata ¶
func (c *MapLayerClient) QueryMetadata(ml *MapLayer) *MetadataQuery
QueryMetadata queries the metadata edge of a MapLayer.
func (*MapLayerClient) Update ¶
func (c *MapLayerClient) Update() *MapLayerUpdate
Update returns an update builder for MapLayer.
func (*MapLayerClient) UpdateOne ¶
func (c *MapLayerClient) UpdateOne(ml *MapLayer) *MapLayerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MapLayerClient) UpdateOneID ¶
func (c *MapLayerClient) UpdateOneID(id int) *MapLayerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MapLayerClient) Use ¶
func (c *MapLayerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `maplayer.Hooks(f(g(h())))`.
type MapLayerConnection ¶
type MapLayerConnection struct { Edges []*MapLayerEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
MapLayerConnection is the connection containing edges to MapLayer.
type MapLayerCreate ¶
type MapLayerCreate struct {
// contains filtered or unexported fields
}
MapLayerCreate is the builder for creating a MapLayer entity.
func (*MapLayerCreate) Mutation ¶
func (mlc *MapLayerCreate) Mutation() *MapLayerMutation
Mutation returns the MapLayerMutation object of the builder.
func (*MapLayerCreate) Save ¶
func (mlc *MapLayerCreate) Save(ctx context.Context) (*MapLayer, error)
Save creates the MapLayer in the database.
func (*MapLayerCreate) SaveX ¶
func (mlc *MapLayerCreate) SaveX(ctx context.Context) *MapLayer
SaveX calls Save and panics if Save returns an error.
func (*MapLayerCreate) SetCreatedAt ¶
func (mlc *MapLayerCreate) SetCreatedAt(t time.Time) *MapLayerCreate
SetCreatedAt sets the created_at field.
func (*MapLayerCreate) SetIsPublic ¶
func (mlc *MapLayerCreate) SetIsPublic(b bool) *MapLayerCreate
SetIsPublic sets the is_public field.
func (*MapLayerCreate) SetMapType ¶
func (mlc *MapLayerCreate) SetMapType(m *MapType) *MapLayerCreate
SetMapType sets the map_type edge to MapType.
func (*MapLayerCreate) SetMapTypeID ¶
func (mlc *MapLayerCreate) SetMapTypeID(id int) *MapLayerCreate
SetMapTypeID sets the map_type edge to MapType by id.
func (*MapLayerCreate) SetMetadata ¶
func (mlc *MapLayerCreate) SetMetadata(m *Metadata) *MapLayerCreate
SetMetadata sets the metadata edge to Metadata.
func (*MapLayerCreate) SetMetadataID ¶
func (mlc *MapLayerCreate) SetMetadataID(id int) *MapLayerCreate
SetMetadataID sets the metadata edge to Metadata by id.
func (*MapLayerCreate) SetName ¶
func (mlc *MapLayerCreate) SetName(s string) *MapLayerCreate
SetName sets the name field.
func (*MapLayerCreate) SetNillableCreatedAt ¶
func (mlc *MapLayerCreate) SetNillableCreatedAt(t *time.Time) *MapLayerCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*MapLayerCreate) SetNillableMapTypeID ¶
func (mlc *MapLayerCreate) SetNillableMapTypeID(id *int) *MapLayerCreate
SetNillableMapTypeID sets the map_type edge to MapType by id if the given value is not nil.
func (*MapLayerCreate) SetNillableMetadataID ¶
func (mlc *MapLayerCreate) SetNillableMetadataID(id *int) *MapLayerCreate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*MapLayerCreate) SetNillableUpdatedAt ¶
func (mlc *MapLayerCreate) SetNillableUpdatedAt(t *time.Time) *MapLayerCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*MapLayerCreate) SetURLTemplate ¶
func (mlc *MapLayerCreate) SetURLTemplate(s string) *MapLayerCreate
SetURLTemplate sets the url_template field.
func (*MapLayerCreate) SetUpdatedAt ¶
func (mlc *MapLayerCreate) SetUpdatedAt(t time.Time) *MapLayerCreate
SetUpdatedAt sets the updated_at field.
type MapLayerCreateBulk ¶
type MapLayerCreateBulk struct {
// contains filtered or unexported fields
}
MapLayerCreateBulk is the builder for creating a bulk of MapLayer entities.
type MapLayerDelete ¶
type MapLayerDelete struct {
// contains filtered or unexported fields
}
MapLayerDelete is the builder for deleting a MapLayer entity.
func (*MapLayerDelete) Exec ¶
func (mld *MapLayerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MapLayerDelete) ExecX ¶
func (mld *MapLayerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MapLayerDelete) Where ¶
func (mld *MapLayerDelete) Where(ps ...predicate.MapLayer) *MapLayerDelete
Where adds a new predicate to the delete builder.
type MapLayerDeleteOne ¶
type MapLayerDeleteOne struct {
// contains filtered or unexported fields
}
MapLayerDeleteOne is the builder for deleting a single MapLayer entity.
func (*MapLayerDeleteOne) Exec ¶
func (mldo *MapLayerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MapLayerDeleteOne) ExecX ¶
func (mldo *MapLayerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MapLayerEdge ¶
MapLayerEdge is the edge representation of MapLayer.
type MapLayerEdges ¶
type MapLayerEdges struct { // Metadata holds the value of the metadata edge. Metadata *Metadata // MapType holds the value of the map_type edge. MapType *MapType // contains filtered or unexported fields }
MapLayerEdges holds the relations/edges for other nodes in the graph.
func (MapLayerEdges) MapTypeOrErr ¶
func (e MapLayerEdges) MapTypeOrErr() (*MapType, error)
MapTypeOrErr returns the MapType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MapLayerEdges) MetadataOrErr ¶
func (e MapLayerEdges) MetadataOrErr() (*Metadata, error)
MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MapLayerGroupBy ¶
type MapLayerGroupBy struct {
// contains filtered or unexported fields
}
MapLayerGroupBy is the builder for group-by MapLayer entities.
func (*MapLayerGroupBy) Aggregate ¶
func (mlgb *MapLayerGroupBy) Aggregate(fns ...AggregateFunc) *MapLayerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MapLayerGroupBy) Bool ¶
func (mlgb *MapLayerGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*MapLayerGroupBy) BoolX ¶
func (mlgb *MapLayerGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MapLayerGroupBy) Bools ¶
func (mlgb *MapLayerGroupBy) 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 (*MapLayerGroupBy) BoolsX ¶
func (mlgb *MapLayerGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MapLayerGroupBy) Float64 ¶
func (mlgb *MapLayerGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*MapLayerGroupBy) Float64X ¶
func (mlgb *MapLayerGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MapLayerGroupBy) Float64s ¶
func (mlgb *MapLayerGroupBy) 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 (*MapLayerGroupBy) Float64sX ¶
func (mlgb *MapLayerGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MapLayerGroupBy) Int ¶
func (mlgb *MapLayerGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*MapLayerGroupBy) IntX ¶
func (mlgb *MapLayerGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MapLayerGroupBy) Ints ¶
func (mlgb *MapLayerGroupBy) 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 (*MapLayerGroupBy) IntsX ¶
func (mlgb *MapLayerGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MapLayerGroupBy) Scan ¶
func (mlgb *MapLayerGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*MapLayerGroupBy) ScanX ¶
func (mlgb *MapLayerGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MapLayerGroupBy) String ¶
func (mlgb *MapLayerGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*MapLayerGroupBy) StringX ¶
func (mlgb *MapLayerGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MapLayerMutation ¶
type MapLayerMutation struct {
// contains filtered or unexported fields
}
MapLayerMutation represents an operation that mutate the MapLayers nodes in the graph.
func (*MapLayerMutation) AddField ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) AddedEdges ¶
func (m *MapLayerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MapLayerMutation) AddedField ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) AddedFields ¶
func (m *MapLayerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*MapLayerMutation) AddedIDs ¶
func (m *MapLayerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*MapLayerMutation) ClearEdge ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) ClearField ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) ClearMapType ¶
func (m *MapLayerMutation) ClearMapType()
ClearMapType clears the map_type edge to MapType.
func (*MapLayerMutation) ClearMetadata ¶
func (m *MapLayerMutation) ClearMetadata()
ClearMetadata clears the metadata edge to Metadata.
func (*MapLayerMutation) ClearedEdges ¶
func (m *MapLayerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MapLayerMutation) ClearedFields ¶
func (m *MapLayerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MapLayerMutation) Client ¶
func (m MapLayerMutation) 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 (*MapLayerMutation) CreatedAt ¶
func (m *MapLayerMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*MapLayerMutation) EdgeCleared ¶
func (m *MapLayerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*MapLayerMutation) Field ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) FieldCleared ¶
func (m *MapLayerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*MapLayerMutation) Fields ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) ID ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) IsPublic ¶
func (m *MapLayerMutation) IsPublic() (r bool, exists bool)
IsPublic returns the is_public value in the mutation.
func (*MapLayerMutation) MapTypeCleared ¶
func (m *MapLayerMutation) MapTypeCleared() bool
MapTypeCleared returns if the edge map_type was cleared.
func (*MapLayerMutation) MapTypeID ¶
func (m *MapLayerMutation) MapTypeID() (id int, exists bool)
MapTypeID returns the map_type id in the mutation.
func (*MapLayerMutation) MapTypeIDs ¶
func (m *MapLayerMutation) MapTypeIDs() (ids []int)
MapTypeIDs returns the map_type ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use MapTypeID instead. It exists only for internal usage by the builders.
func (*MapLayerMutation) MetadataCleared ¶
func (m *MapLayerMutation) MetadataCleared() bool
MetadataCleared returns if the edge metadata was cleared.
func (*MapLayerMutation) MetadataID ¶
func (m *MapLayerMutation) MetadataID() (id int, exists bool)
MetadataID returns the metadata id in the mutation.
func (*MapLayerMutation) MetadataIDs ¶
func (m *MapLayerMutation) MetadataIDs() (ids []int)
MetadataIDs returns the metadata ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use MetadataID instead. It exists only for internal usage by the builders.
func (*MapLayerMutation) Name ¶
func (m *MapLayerMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*MapLayerMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the MapLayer. If the MapLayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapLayerMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*MapLayerMutation) OldIsPublic ¶
func (m *MapLayerMutation) OldIsPublic(ctx context.Context) (v bool, err error)
OldIsPublic returns the old is_public value of the MapLayer. If the MapLayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapLayerMutation) OldName ¶
func (m *MapLayerMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the MapLayer. If the MapLayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapLayerMutation) OldURLTemplate ¶
func (m *MapLayerMutation) OldURLTemplate(ctx context.Context) (v string, err error)
OldURLTemplate returns the old url_template value of the MapLayer. If the MapLayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapLayerMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the MapLayer. If the MapLayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapLayerMutation) RemovedEdges ¶
func (m *MapLayerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MapLayerMutation) RemovedIDs ¶
func (m *MapLayerMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*MapLayerMutation) ResetCreatedAt ¶
func (m *MapLayerMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*MapLayerMutation) ResetEdge ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) ResetField ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) ResetIsPublic ¶
func (m *MapLayerMutation) ResetIsPublic()
ResetIsPublic reset all changes of the "is_public" field.
func (*MapLayerMutation) ResetMapType ¶
func (m *MapLayerMutation) ResetMapType()
ResetMapType reset all changes of the "map_type" edge.
func (*MapLayerMutation) ResetMetadata ¶
func (m *MapLayerMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" edge.
func (*MapLayerMutation) ResetName ¶
func (m *MapLayerMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*MapLayerMutation) ResetURLTemplate ¶
func (m *MapLayerMutation) ResetURLTemplate()
ResetURLTemplate reset all changes of the "url_template" field.
func (*MapLayerMutation) ResetUpdatedAt ¶
func (m *MapLayerMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*MapLayerMutation) SetCreatedAt ¶
func (m *MapLayerMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*MapLayerMutation) SetField ¶
func (m *MapLayerMutation) 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 (*MapLayerMutation) SetIsPublic ¶
func (m *MapLayerMutation) SetIsPublic(b bool)
SetIsPublic sets the is_public field.
func (*MapLayerMutation) SetMapTypeID ¶
func (m *MapLayerMutation) SetMapTypeID(id int)
SetMapTypeID sets the map_type edge to MapType by id.
func (*MapLayerMutation) SetMetadataID ¶
func (m *MapLayerMutation) SetMetadataID(id int)
SetMetadataID sets the metadata edge to Metadata by id.
func (*MapLayerMutation) SetName ¶
func (m *MapLayerMutation) SetName(s string)
SetName sets the name field.
func (*MapLayerMutation) SetURLTemplate ¶
func (m *MapLayerMutation) SetURLTemplate(s string)
SetURLTemplate sets the url_template field.
func (*MapLayerMutation) SetUpdatedAt ¶
func (m *MapLayerMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (MapLayerMutation) Tx ¶
func (m MapLayerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MapLayerMutation) Type ¶
func (m *MapLayerMutation) Type() string
Type returns the node type of this mutation (MapLayer).
func (*MapLayerMutation) URLTemplate ¶
func (m *MapLayerMutation) URLTemplate() (r string, exists bool)
URLTemplate returns the url_template value in the mutation.
type MapLayerOrder ¶
type MapLayerOrder struct { Direction OrderDirection `json:"direction"` Field *MapLayerOrderField `json:"field"` }
MapLayerOrder defines the ordering of MapLayer.
type MapLayerOrderField ¶
type MapLayerOrderField struct {
// contains filtered or unexported fields
}
MapLayerOrderField defines the ordering field of MapLayer.
func (MapLayerOrderField) MarshalGQL ¶
func (f MapLayerOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (MapLayerOrderField) String ¶
func (f MapLayerOrderField) String() string
String implement fmt.Stringer interface.
func (*MapLayerOrderField) UnmarshalGQL ¶
func (f *MapLayerOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type MapLayerPaginateOption ¶
type MapLayerPaginateOption func(*mapLayerPager) error
MapLayerPaginateOption enables pagination customization.
func WithMapLayerFilter ¶
func WithMapLayerFilter(filter func(*MapLayerQuery) (*MapLayerQuery, error)) MapLayerPaginateOption
WithMapLayerFilter configures pagination filter.
func WithMapLayerOrder ¶
func WithMapLayerOrder(order *MapLayerOrder) MapLayerPaginateOption
WithMapLayerOrder configures pagination ordering.
type MapLayerQuery ¶
type MapLayerQuery struct {
// contains filtered or unexported fields
}
MapLayerQuery is the builder for querying MapLayer entities.
func (*MapLayerQuery) All ¶
func (mlq *MapLayerQuery) All(ctx context.Context) ([]*MapLayer, error)
All executes the query and returns a list of MapLayers.
func (*MapLayerQuery) AllX ¶
func (mlq *MapLayerQuery) AllX(ctx context.Context) []*MapLayer
AllX is like All, but panics if an error occurs.
func (*MapLayerQuery) Clone ¶
func (mlq *MapLayerQuery) Clone() *MapLayerQuery
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 (*MapLayerQuery) CollectFields ¶
func (ml *MapLayerQuery) CollectFields(ctx context.Context, satisfies ...string) *MapLayerQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*MapLayerQuery) Count ¶
func (mlq *MapLayerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MapLayerQuery) CountX ¶
func (mlq *MapLayerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MapLayerQuery) Exist ¶
func (mlq *MapLayerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MapLayerQuery) ExistX ¶
func (mlq *MapLayerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MapLayerQuery) First ¶
func (mlq *MapLayerQuery) First(ctx context.Context) (*MapLayer, error)
First returns the first MapLayer entity in the query. Returns *NotFoundError when no maplayer was found.
func (*MapLayerQuery) FirstID ¶
func (mlq *MapLayerQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MapLayer id in the query. Returns *NotFoundError when no id was found.
func (*MapLayerQuery) FirstIDX ¶
func (mlq *MapLayerQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MapLayerQuery) FirstX ¶
func (mlq *MapLayerQuery) FirstX(ctx context.Context) *MapLayer
FirstX is like First, but panics if an error occurs.
func (*MapLayerQuery) GroupBy ¶
func (mlq *MapLayerQuery) GroupBy(field string, fields ...string) *MapLayerGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.MapLayer.Query(). GroupBy(maplayer.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MapLayerQuery) IDs ¶
func (mlq *MapLayerQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MapLayer ids.
func (*MapLayerQuery) IDsX ¶
func (mlq *MapLayerQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MapLayerQuery) Limit ¶
func (mlq *MapLayerQuery) Limit(limit int) *MapLayerQuery
Limit adds a limit step to the query.
func (*MapLayerQuery) Offset ¶
func (mlq *MapLayerQuery) Offset(offset int) *MapLayerQuery
Offset adds an offset step to the query.
func (*MapLayerQuery) Only ¶
func (mlq *MapLayerQuery) Only(ctx context.Context) (*MapLayer, error)
Only returns the only MapLayer entity in the query, returns an error if not exactly one entity was returned.
func (*MapLayerQuery) OnlyID ¶
func (mlq *MapLayerQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only MapLayer id in the query, returns an error if not exactly one id was returned.
func (*MapLayerQuery) OnlyIDX ¶
func (mlq *MapLayerQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MapLayerQuery) OnlyX ¶
func (mlq *MapLayerQuery) OnlyX(ctx context.Context) *MapLayer
OnlyX is like Only, but panics if an error occurs.
func (*MapLayerQuery) Order ¶
func (mlq *MapLayerQuery) Order(o ...OrderFunc) *MapLayerQuery
Order adds an order step to the query.
func (*MapLayerQuery) Paginate ¶
func (ml *MapLayerQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...MapLayerPaginateOption, ) (*MapLayerConnection, error)
Paginate executes the query and returns a relay based cursor connection to MapLayer.
func (*MapLayerQuery) QueryMapType ¶
func (mlq *MapLayerQuery) QueryMapType() *MapTypeQuery
QueryMapType chains the current query on the map_type edge.
func (*MapLayerQuery) QueryMetadata ¶
func (mlq *MapLayerQuery) QueryMetadata() *MetadataQuery
QueryMetadata chains the current query on the metadata edge.
func (*MapLayerQuery) Select ¶
func (mlq *MapLayerQuery) Select(field string, fields ...string) *MapLayerSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.MapLayer.Query(). Select(maplayer.FieldCreatedAt). Scan(ctx, &v)
func (*MapLayerQuery) Where ¶
func (mlq *MapLayerQuery) Where(ps ...predicate.MapLayer) *MapLayerQuery
Where adds a new predicate for the builder.
func (*MapLayerQuery) WithMapType ¶
func (mlq *MapLayerQuery) WithMapType(opts ...func(*MapTypeQuery)) *MapLayerQuery
WithMapType tells the query-builder to eager-loads the nodes that are connected to
the "map_type" edge. The optional arguments used to configure the query builder of the edge.
func (*MapLayerQuery) WithMetadata ¶
func (mlq *MapLayerQuery) WithMetadata(opts ...func(*MetadataQuery)) *MapLayerQuery
WithMetadata tells the query-builder to eager-loads the nodes that are connected to
the "metadata" edge. The optional arguments used to configure the query builder of the edge.
type MapLayerSelect ¶
type MapLayerSelect struct { *MapLayerQuery // contains filtered or unexported fields }
MapLayerSelect is the builder for select fields of MapLayer entities.
func (*MapLayerSelect) Bool ¶
func (mls *MapLayerSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*MapLayerSelect) BoolX ¶
func (mls *MapLayerSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MapLayerSelect) Bools ¶
func (mls *MapLayerSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*MapLayerSelect) BoolsX ¶
func (mls *MapLayerSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MapLayerSelect) Float64 ¶
func (mls *MapLayerSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*MapLayerSelect) Float64X ¶
func (mls *MapLayerSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MapLayerSelect) Float64s ¶
func (mls *MapLayerSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*MapLayerSelect) Float64sX ¶
func (mls *MapLayerSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MapLayerSelect) Int ¶
func (mls *MapLayerSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*MapLayerSelect) IntX ¶
func (mls *MapLayerSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MapLayerSelect) Ints ¶
func (mls *MapLayerSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*MapLayerSelect) IntsX ¶
func (mls *MapLayerSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MapLayerSelect) Scan ¶
func (mls *MapLayerSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*MapLayerSelect) ScanX ¶
func (mls *MapLayerSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MapLayerSelect) String ¶
func (mls *MapLayerSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*MapLayerSelect) StringX ¶
func (mls *MapLayerSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MapLayerUpdate ¶
type MapLayerUpdate struct {
// contains filtered or unexported fields
}
MapLayerUpdate is the builder for updating MapLayer entities.
func (*MapLayerUpdate) ClearMapType ¶
func (mlu *MapLayerUpdate) ClearMapType() *MapLayerUpdate
ClearMapType clears the "map_type" edge to type MapType.
func (*MapLayerUpdate) ClearMetadata ¶
func (mlu *MapLayerUpdate) ClearMetadata() *MapLayerUpdate
ClearMetadata clears the "metadata" edge to type Metadata.
func (*MapLayerUpdate) Exec ¶
func (mlu *MapLayerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MapLayerUpdate) ExecX ¶
func (mlu *MapLayerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MapLayerUpdate) Mutation ¶
func (mlu *MapLayerUpdate) Mutation() *MapLayerMutation
Mutation returns the MapLayerMutation object of the builder.
func (*MapLayerUpdate) Save ¶
func (mlu *MapLayerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MapLayerUpdate) SaveX ¶
func (mlu *MapLayerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MapLayerUpdate) SetIsPublic ¶
func (mlu *MapLayerUpdate) SetIsPublic(b bool) *MapLayerUpdate
SetIsPublic sets the is_public field.
func (*MapLayerUpdate) SetMapType ¶
func (mlu *MapLayerUpdate) SetMapType(m *MapType) *MapLayerUpdate
SetMapType sets the map_type edge to MapType.
func (*MapLayerUpdate) SetMapTypeID ¶
func (mlu *MapLayerUpdate) SetMapTypeID(id int) *MapLayerUpdate
SetMapTypeID sets the map_type edge to MapType by id.
func (*MapLayerUpdate) SetMetadata ¶
func (mlu *MapLayerUpdate) SetMetadata(m *Metadata) *MapLayerUpdate
SetMetadata sets the metadata edge to Metadata.
func (*MapLayerUpdate) SetMetadataID ¶
func (mlu *MapLayerUpdate) SetMetadataID(id int) *MapLayerUpdate
SetMetadataID sets the metadata edge to Metadata by id.
func (*MapLayerUpdate) SetName ¶
func (mlu *MapLayerUpdate) SetName(s string) *MapLayerUpdate
SetName sets the name field.
func (*MapLayerUpdate) SetNillableMapTypeID ¶
func (mlu *MapLayerUpdate) SetNillableMapTypeID(id *int) *MapLayerUpdate
SetNillableMapTypeID sets the map_type edge to MapType by id if the given value is not nil.
func (*MapLayerUpdate) SetNillableMetadataID ¶
func (mlu *MapLayerUpdate) SetNillableMetadataID(id *int) *MapLayerUpdate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*MapLayerUpdate) SetURLTemplate ¶
func (mlu *MapLayerUpdate) SetURLTemplate(s string) *MapLayerUpdate
SetURLTemplate sets the url_template field.
func (*MapLayerUpdate) SetUpdatedAt ¶
func (mlu *MapLayerUpdate) SetUpdatedAt(t time.Time) *MapLayerUpdate
SetUpdatedAt sets the updated_at field.
func (*MapLayerUpdate) Where ¶
func (mlu *MapLayerUpdate) Where(ps ...predicate.MapLayer) *MapLayerUpdate
Where adds a new predicate for the builder.
type MapLayerUpdateOne ¶
type MapLayerUpdateOne struct {
// contains filtered or unexported fields
}
MapLayerUpdateOne is the builder for updating a single MapLayer entity.
func (*MapLayerUpdateOne) ClearMapType ¶
func (mluo *MapLayerUpdateOne) ClearMapType() *MapLayerUpdateOne
ClearMapType clears the "map_type" edge to type MapType.
func (*MapLayerUpdateOne) ClearMetadata ¶
func (mluo *MapLayerUpdateOne) ClearMetadata() *MapLayerUpdateOne
ClearMetadata clears the "metadata" edge to type Metadata.
func (*MapLayerUpdateOne) Exec ¶
func (mluo *MapLayerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MapLayerUpdateOne) ExecX ¶
func (mluo *MapLayerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MapLayerUpdateOne) Mutation ¶
func (mluo *MapLayerUpdateOne) Mutation() *MapLayerMutation
Mutation returns the MapLayerMutation object of the builder.
func (*MapLayerUpdateOne) Save ¶
func (mluo *MapLayerUpdateOne) Save(ctx context.Context) (*MapLayer, error)
Save executes the query and returns the updated entity.
func (*MapLayerUpdateOne) SaveX ¶
func (mluo *MapLayerUpdateOne) SaveX(ctx context.Context) *MapLayer
SaveX is like Save, but panics if an error occurs.
func (*MapLayerUpdateOne) SetIsPublic ¶
func (mluo *MapLayerUpdateOne) SetIsPublic(b bool) *MapLayerUpdateOne
SetIsPublic sets the is_public field.
func (*MapLayerUpdateOne) SetMapType ¶
func (mluo *MapLayerUpdateOne) SetMapType(m *MapType) *MapLayerUpdateOne
SetMapType sets the map_type edge to MapType.
func (*MapLayerUpdateOne) SetMapTypeID ¶
func (mluo *MapLayerUpdateOne) SetMapTypeID(id int) *MapLayerUpdateOne
SetMapTypeID sets the map_type edge to MapType by id.
func (*MapLayerUpdateOne) SetMetadata ¶
func (mluo *MapLayerUpdateOne) SetMetadata(m *Metadata) *MapLayerUpdateOne
SetMetadata sets the metadata edge to Metadata.
func (*MapLayerUpdateOne) SetMetadataID ¶
func (mluo *MapLayerUpdateOne) SetMetadataID(id int) *MapLayerUpdateOne
SetMetadataID sets the metadata edge to Metadata by id.
func (*MapLayerUpdateOne) SetName ¶
func (mluo *MapLayerUpdateOne) SetName(s string) *MapLayerUpdateOne
SetName sets the name field.
func (*MapLayerUpdateOne) SetNillableMapTypeID ¶
func (mluo *MapLayerUpdateOne) SetNillableMapTypeID(id *int) *MapLayerUpdateOne
SetNillableMapTypeID sets the map_type edge to MapType by id if the given value is not nil.
func (*MapLayerUpdateOne) SetNillableMetadataID ¶
func (mluo *MapLayerUpdateOne) SetNillableMetadataID(id *int) *MapLayerUpdateOne
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*MapLayerUpdateOne) SetURLTemplate ¶
func (mluo *MapLayerUpdateOne) SetURLTemplate(s string) *MapLayerUpdateOne
SetURLTemplate sets the url_template field.
func (*MapLayerUpdateOne) SetUpdatedAt ¶
func (mluo *MapLayerUpdateOne) SetUpdatedAt(t time.Time) *MapLayerUpdateOne
SetUpdatedAt sets the updated_at field.
type MapType ¶
type MapType struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // MinZoom holds the value of the "min_zoom" field. MinZoom int `json:"min_zoom,omitempty"` // MaxZoom holds the value of the "max_zoom" field. MaxZoom int `json:"max_zoom,omitempty"` // MinX holds the value of the "min_x" field. MinX float64 `json:"min_x,omitempty"` // MinY holds the value of the "min_y" field. MinY float64 `json:"min_y,omitempty"` // MaxX holds the value of the "max_x" field. MaxX float64 `json:"max_x,omitempty"` // MaxY holds the value of the "max_y" field. MaxY float64 `json:"max_y,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MapTypeQuery when eager-loading is set. Edges MapTypeEdges `json:"edges"` // contains filtered or unexported fields }
MapType is the model entity for the MapType schema.
func (*MapType) QueryMapLayers ¶
func (mt *MapType) QueryMapLayers() *MapLayerQuery
QueryMapLayers queries the map_layers edge of the MapType.
func (*MapType) QueryMetadata ¶
func (mt *MapType) QueryMetadata() *MetadataQuery
QueryMetadata queries the metadata edge of the MapType.
func (*MapType) QueryServers ¶
func (mt *MapType) QueryServers() *ServerQuery
QueryServers queries the servers edge of the MapType.
func (*MapType) ToEdge ¶
func (mt *MapType) ToEdge(order *MapTypeOrder) *MapTypeEdge
ToEdge converts MapType into MapTypeEdge.
func (*MapType) 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 (*MapType) Update ¶
func (mt *MapType) Update() *MapTypeUpdateOne
Update returns a builder for updating this MapType. Note that, you need to call MapType.Unwrap() before calling this method, if this MapType was returned from a transaction, and the transaction was committed or rolled back.
type MapTypeClient ¶
type MapTypeClient struct {
// contains filtered or unexported fields
}
MapTypeClient is a client for the MapType schema.
func NewMapTypeClient ¶
func NewMapTypeClient(c config) *MapTypeClient
NewMapTypeClient returns a client for the MapType from the given config.
func (*MapTypeClient) Create ¶
func (c *MapTypeClient) Create() *MapTypeCreate
Create returns a create builder for MapType.
func (*MapTypeClient) CreateBulk ¶
func (c *MapTypeClient) CreateBulk(builders ...*MapTypeCreate) *MapTypeCreateBulk
CreateBulk returns a builder for creating a bulk of MapType entities.
func (*MapTypeClient) Delete ¶
func (c *MapTypeClient) Delete() *MapTypeDelete
Delete returns a delete builder for MapType.
func (*MapTypeClient) DeleteOne ¶
func (c *MapTypeClient) DeleteOne(mt *MapType) *MapTypeDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MapTypeClient) DeleteOneID ¶
func (c *MapTypeClient) DeleteOneID(id int) *MapTypeDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MapTypeClient) GetX ¶
func (c *MapTypeClient) GetX(ctx context.Context, id int) *MapType
GetX is like Get, but panics if an error occurs.
func (*MapTypeClient) Hooks ¶
func (c *MapTypeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MapTypeClient) Query ¶
func (c *MapTypeClient) Query() *MapTypeQuery
Query returns a query builder for MapType.
func (*MapTypeClient) QueryMapLayers ¶
func (c *MapTypeClient) QueryMapLayers(mt *MapType) *MapLayerQuery
QueryMapLayers queries the map_layers edge of a MapType.
func (*MapTypeClient) QueryMetadata ¶
func (c *MapTypeClient) QueryMetadata(mt *MapType) *MetadataQuery
QueryMetadata queries the metadata edge of a MapType.
func (*MapTypeClient) QueryServers ¶
func (c *MapTypeClient) QueryServers(mt *MapType) *ServerQuery
QueryServers queries the servers edge of a MapType.
func (*MapTypeClient) Update ¶
func (c *MapTypeClient) Update() *MapTypeUpdate
Update returns an update builder for MapType.
func (*MapTypeClient) UpdateOne ¶
func (c *MapTypeClient) UpdateOne(mt *MapType) *MapTypeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MapTypeClient) UpdateOneID ¶
func (c *MapTypeClient) UpdateOneID(id int) *MapTypeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MapTypeClient) Use ¶
func (c *MapTypeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `maptype.Hooks(f(g(h())))`.
type MapTypeConnection ¶
type MapTypeConnection struct { Edges []*MapTypeEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
MapTypeConnection is the connection containing edges to MapType.
type MapTypeCreate ¶
type MapTypeCreate struct {
// contains filtered or unexported fields
}
MapTypeCreate is the builder for creating a MapType entity.
func (*MapTypeCreate) AddMapLayerIDs ¶
func (mtc *MapTypeCreate) AddMapLayerIDs(ids ...int) *MapTypeCreate
AddMapLayerIDs adds the map_layers edge to MapLayer by ids.
func (*MapTypeCreate) AddMapLayers ¶
func (mtc *MapTypeCreate) AddMapLayers(m ...*MapLayer) *MapTypeCreate
AddMapLayers adds the map_layers edges to MapLayer.
func (*MapTypeCreate) AddServerIDs ¶
func (mtc *MapTypeCreate) AddServerIDs(ids ...int) *MapTypeCreate
AddServerIDs adds the servers edge to Server by ids.
func (*MapTypeCreate) AddServers ¶
func (mtc *MapTypeCreate) AddServers(s ...*Server) *MapTypeCreate
AddServers adds the servers edges to Server.
func (*MapTypeCreate) Mutation ¶
func (mtc *MapTypeCreate) Mutation() *MapTypeMutation
Mutation returns the MapTypeMutation object of the builder.
func (*MapTypeCreate) Save ¶
func (mtc *MapTypeCreate) Save(ctx context.Context) (*MapType, error)
Save creates the MapType in the database.
func (*MapTypeCreate) SaveX ¶
func (mtc *MapTypeCreate) SaveX(ctx context.Context) *MapType
SaveX calls Save and panics if Save returns an error.
func (*MapTypeCreate) SetCreatedAt ¶
func (mtc *MapTypeCreate) SetCreatedAt(t time.Time) *MapTypeCreate
SetCreatedAt sets the created_at field.
func (*MapTypeCreate) SetMaxX ¶
func (mtc *MapTypeCreate) SetMaxX(f float64) *MapTypeCreate
SetMaxX sets the max_x field.
func (*MapTypeCreate) SetMaxY ¶
func (mtc *MapTypeCreate) SetMaxY(f float64) *MapTypeCreate
SetMaxY sets the max_y field.
func (*MapTypeCreate) SetMaxZoom ¶
func (mtc *MapTypeCreate) SetMaxZoom(i int) *MapTypeCreate
SetMaxZoom sets the max_zoom field.
func (*MapTypeCreate) SetMetadata ¶
func (mtc *MapTypeCreate) SetMetadata(m *Metadata) *MapTypeCreate
SetMetadata sets the metadata edge to Metadata.
func (*MapTypeCreate) SetMetadataID ¶
func (mtc *MapTypeCreate) SetMetadataID(id int) *MapTypeCreate
SetMetadataID sets the metadata edge to Metadata by id.
func (*MapTypeCreate) SetMinX ¶
func (mtc *MapTypeCreate) SetMinX(f float64) *MapTypeCreate
SetMinX sets the min_x field.
func (*MapTypeCreate) SetMinY ¶
func (mtc *MapTypeCreate) SetMinY(f float64) *MapTypeCreate
SetMinY sets the min_y field.
func (*MapTypeCreate) SetMinZoom ¶
func (mtc *MapTypeCreate) SetMinZoom(i int) *MapTypeCreate
SetMinZoom sets the min_zoom field.
func (*MapTypeCreate) SetName ¶
func (mtc *MapTypeCreate) SetName(s string) *MapTypeCreate
SetName sets the name field.
func (*MapTypeCreate) SetNillableCreatedAt ¶
func (mtc *MapTypeCreate) SetNillableCreatedAt(t *time.Time) *MapTypeCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*MapTypeCreate) SetNillableMetadataID ¶
func (mtc *MapTypeCreate) SetNillableMetadataID(id *int) *MapTypeCreate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*MapTypeCreate) SetNillableUpdatedAt ¶
func (mtc *MapTypeCreate) SetNillableUpdatedAt(t *time.Time) *MapTypeCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*MapTypeCreate) SetUpdatedAt ¶
func (mtc *MapTypeCreate) SetUpdatedAt(t time.Time) *MapTypeCreate
SetUpdatedAt sets the updated_at field.
type MapTypeCreateBulk ¶
type MapTypeCreateBulk struct {
// contains filtered or unexported fields
}
MapTypeCreateBulk is the builder for creating a bulk of MapType entities.
type MapTypeDelete ¶
type MapTypeDelete struct {
// contains filtered or unexported fields
}
MapTypeDelete is the builder for deleting a MapType entity.
func (*MapTypeDelete) Exec ¶
func (mtd *MapTypeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MapTypeDelete) ExecX ¶
func (mtd *MapTypeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MapTypeDelete) Where ¶
func (mtd *MapTypeDelete) Where(ps ...predicate.MapType) *MapTypeDelete
Where adds a new predicate to the delete builder.
type MapTypeDeleteOne ¶
type MapTypeDeleteOne struct {
// contains filtered or unexported fields
}
MapTypeDeleteOne is the builder for deleting a single MapType entity.
func (*MapTypeDeleteOne) Exec ¶
func (mtdo *MapTypeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MapTypeDeleteOne) ExecX ¶
func (mtdo *MapTypeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MapTypeEdge ¶
MapTypeEdge is the edge representation of MapType.
type MapTypeEdges ¶
type MapTypeEdges struct { // Metadata holds the value of the metadata edge. Metadata *Metadata // MapLayers holds the value of the map_layers edge. MapLayers []*MapLayer // Servers holds the value of the servers edge. Servers []*Server // contains filtered or unexported fields }
MapTypeEdges holds the relations/edges for other nodes in the graph.
func (MapTypeEdges) MapLayersOrErr ¶
func (e MapTypeEdges) MapLayersOrErr() ([]*MapLayer, error)
MapLayersOrErr returns the MapLayers value or an error if the edge was not loaded in eager-loading.
func (MapTypeEdges) MetadataOrErr ¶
func (e MapTypeEdges) MetadataOrErr() (*Metadata, error)
MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MapTypeEdges) ServersOrErr ¶
func (e MapTypeEdges) ServersOrErr() ([]*Server, error)
ServersOrErr returns the Servers value or an error if the edge was not loaded in eager-loading.
type MapTypeGroupBy ¶
type MapTypeGroupBy struct {
// contains filtered or unexported fields
}
MapTypeGroupBy is the builder for group-by MapType entities.
func (*MapTypeGroupBy) Aggregate ¶
func (mtgb *MapTypeGroupBy) Aggregate(fns ...AggregateFunc) *MapTypeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MapTypeGroupBy) Bool ¶
func (mtgb *MapTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*MapTypeGroupBy) BoolX ¶
func (mtgb *MapTypeGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MapTypeGroupBy) Bools ¶
func (mtgb *MapTypeGroupBy) 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 (*MapTypeGroupBy) BoolsX ¶
func (mtgb *MapTypeGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MapTypeGroupBy) Float64 ¶
func (mtgb *MapTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*MapTypeGroupBy) Float64X ¶
func (mtgb *MapTypeGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MapTypeGroupBy) Float64s ¶
func (mtgb *MapTypeGroupBy) 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 (*MapTypeGroupBy) Float64sX ¶
func (mtgb *MapTypeGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MapTypeGroupBy) Int ¶
func (mtgb *MapTypeGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*MapTypeGroupBy) IntX ¶
func (mtgb *MapTypeGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MapTypeGroupBy) Ints ¶
func (mtgb *MapTypeGroupBy) 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 (*MapTypeGroupBy) IntsX ¶
func (mtgb *MapTypeGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MapTypeGroupBy) Scan ¶
func (mtgb *MapTypeGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*MapTypeGroupBy) ScanX ¶
func (mtgb *MapTypeGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MapTypeGroupBy) String ¶
func (mtgb *MapTypeGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*MapTypeGroupBy) StringX ¶
func (mtgb *MapTypeGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MapTypeMutation ¶
type MapTypeMutation struct {
// contains filtered or unexported fields
}
MapTypeMutation represents an operation that mutate the MapTypes nodes in the graph.
func (*MapTypeMutation) AddField ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) AddMapLayerIDs ¶
func (m *MapTypeMutation) AddMapLayerIDs(ids ...int)
AddMapLayerIDs adds the map_layers edge to MapLayer by ids.
func (*MapTypeMutation) AddMaxX ¶
func (m *MapTypeMutation) AddMaxX(f float64)
AddMaxX adds f to max_x.
func (*MapTypeMutation) AddMaxY ¶
func (m *MapTypeMutation) AddMaxY(f float64)
AddMaxY adds f to max_y.
func (*MapTypeMutation) AddMaxZoom ¶
func (m *MapTypeMutation) AddMaxZoom(i int)
AddMaxZoom adds i to max_zoom.
func (*MapTypeMutation) AddMinX ¶
func (m *MapTypeMutation) AddMinX(f float64)
AddMinX adds f to min_x.
func (*MapTypeMutation) AddMinY ¶
func (m *MapTypeMutation) AddMinY(f float64)
AddMinY adds f to min_y.
func (*MapTypeMutation) AddMinZoom ¶
func (m *MapTypeMutation) AddMinZoom(i int)
AddMinZoom adds i to min_zoom.
func (*MapTypeMutation) AddServerIDs ¶
func (m *MapTypeMutation) AddServerIDs(ids ...int)
AddServerIDs adds the servers edge to Server by ids.
func (*MapTypeMutation) AddedEdges ¶
func (m *MapTypeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MapTypeMutation) AddedField ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) AddedFields ¶
func (m *MapTypeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*MapTypeMutation) AddedIDs ¶
func (m *MapTypeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*MapTypeMutation) AddedMaxX ¶
func (m *MapTypeMutation) AddedMaxX() (r float64, exists bool)
AddedMaxX returns the value that was added to the max_x field in this mutation.
func (*MapTypeMutation) AddedMaxY ¶
func (m *MapTypeMutation) AddedMaxY() (r float64, exists bool)
AddedMaxY returns the value that was added to the max_y field in this mutation.
func (*MapTypeMutation) AddedMaxZoom ¶
func (m *MapTypeMutation) AddedMaxZoom() (r int, exists bool)
AddedMaxZoom returns the value that was added to the max_zoom field in this mutation.
func (*MapTypeMutation) AddedMinX ¶
func (m *MapTypeMutation) AddedMinX() (r float64, exists bool)
AddedMinX returns the value that was added to the min_x field in this mutation.
func (*MapTypeMutation) AddedMinY ¶
func (m *MapTypeMutation) AddedMinY() (r float64, exists bool)
AddedMinY returns the value that was added to the min_y field in this mutation.
func (*MapTypeMutation) AddedMinZoom ¶
func (m *MapTypeMutation) AddedMinZoom() (r int, exists bool)
AddedMinZoom returns the value that was added to the min_zoom field in this mutation.
func (*MapTypeMutation) ClearEdge ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) ClearField ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) ClearMapLayers ¶
func (m *MapTypeMutation) ClearMapLayers()
ClearMapLayers clears the map_layers edge to MapLayer.
func (*MapTypeMutation) ClearMetadata ¶
func (m *MapTypeMutation) ClearMetadata()
ClearMetadata clears the metadata edge to Metadata.
func (*MapTypeMutation) ClearServers ¶
func (m *MapTypeMutation) ClearServers()
ClearServers clears the servers edge to Server.
func (*MapTypeMutation) ClearedEdges ¶
func (m *MapTypeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MapTypeMutation) ClearedFields ¶
func (m *MapTypeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MapTypeMutation) Client ¶
func (m MapTypeMutation) 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 (*MapTypeMutation) CreatedAt ¶
func (m *MapTypeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*MapTypeMutation) EdgeCleared ¶
func (m *MapTypeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*MapTypeMutation) Field ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) FieldCleared ¶
func (m *MapTypeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*MapTypeMutation) Fields ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) ID ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) MapLayersCleared ¶
func (m *MapTypeMutation) MapLayersCleared() bool
MapLayersCleared returns if the edge map_layers was cleared.
func (*MapTypeMutation) MapLayersIDs ¶
func (m *MapTypeMutation) MapLayersIDs() (ids []int)
MapLayersIDs returns the map_layers ids in the mutation.
func (*MapTypeMutation) MaxX ¶
func (m *MapTypeMutation) MaxX() (r float64, exists bool)
MaxX returns the max_x value in the mutation.
func (*MapTypeMutation) MaxY ¶
func (m *MapTypeMutation) MaxY() (r float64, exists bool)
MaxY returns the max_y value in the mutation.
func (*MapTypeMutation) MaxZoom ¶
func (m *MapTypeMutation) MaxZoom() (r int, exists bool)
MaxZoom returns the max_zoom value in the mutation.
func (*MapTypeMutation) MetadataCleared ¶
func (m *MapTypeMutation) MetadataCleared() bool
MetadataCleared returns if the edge metadata was cleared.
func (*MapTypeMutation) MetadataID ¶
func (m *MapTypeMutation) MetadataID() (id int, exists bool)
MetadataID returns the metadata id in the mutation.
func (*MapTypeMutation) MetadataIDs ¶
func (m *MapTypeMutation) MetadataIDs() (ids []int)
MetadataIDs returns the metadata ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use MetadataID instead. It exists only for internal usage by the builders.
func (*MapTypeMutation) MinX ¶
func (m *MapTypeMutation) MinX() (r float64, exists bool)
MinX returns the min_x value in the mutation.
func (*MapTypeMutation) MinY ¶
func (m *MapTypeMutation) MinY() (r float64, exists bool)
MinY returns the min_y value in the mutation.
func (*MapTypeMutation) MinZoom ¶
func (m *MapTypeMutation) MinZoom() (r int, exists bool)
MinZoom returns the min_zoom value in the mutation.
func (*MapTypeMutation) Name ¶
func (m *MapTypeMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*MapTypeMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the MapType. If the MapType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapTypeMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*MapTypeMutation) OldMaxX ¶
func (m *MapTypeMutation) OldMaxX(ctx context.Context) (v float64, err error)
OldMaxX returns the old max_x value of the MapType. If the MapType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapTypeMutation) OldMaxY ¶
func (m *MapTypeMutation) OldMaxY(ctx context.Context) (v float64, err error)
OldMaxY returns the old max_y value of the MapType. If the MapType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapTypeMutation) OldMaxZoom ¶
func (m *MapTypeMutation) OldMaxZoom(ctx context.Context) (v int, err error)
OldMaxZoom returns the old max_zoom value of the MapType. If the MapType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapTypeMutation) OldMinX ¶
func (m *MapTypeMutation) OldMinX(ctx context.Context) (v float64, err error)
OldMinX returns the old min_x value of the MapType. If the MapType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapTypeMutation) OldMinY ¶
func (m *MapTypeMutation) OldMinY(ctx context.Context) (v float64, err error)
OldMinY returns the old min_y value of the MapType. If the MapType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapTypeMutation) OldMinZoom ¶
func (m *MapTypeMutation) OldMinZoom(ctx context.Context) (v int, err error)
OldMinZoom returns the old min_zoom value of the MapType. If the MapType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapTypeMutation) OldName ¶
func (m *MapTypeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the MapType. If the MapType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapTypeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the MapType. If the MapType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MapTypeMutation) RemoveMapLayerIDs ¶
func (m *MapTypeMutation) RemoveMapLayerIDs(ids ...int)
RemoveMapLayerIDs removes the map_layers edge to MapLayer by ids.
func (*MapTypeMutation) RemoveServerIDs ¶
func (m *MapTypeMutation) RemoveServerIDs(ids ...int)
RemoveServerIDs removes the servers edge to Server by ids.
func (*MapTypeMutation) RemovedEdges ¶
func (m *MapTypeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MapTypeMutation) RemovedIDs ¶
func (m *MapTypeMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*MapTypeMutation) RemovedMapLayersIDs ¶
func (m *MapTypeMutation) RemovedMapLayersIDs() (ids []int)
RemovedMapLayers returns the removed ids of map_layers.
func (*MapTypeMutation) RemovedServersIDs ¶
func (m *MapTypeMutation) RemovedServersIDs() (ids []int)
RemovedServers returns the removed ids of servers.
func (*MapTypeMutation) ResetCreatedAt ¶
func (m *MapTypeMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*MapTypeMutation) ResetEdge ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) ResetField ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) ResetMapLayers ¶
func (m *MapTypeMutation) ResetMapLayers()
ResetMapLayers reset all changes of the "map_layers" edge.
func (*MapTypeMutation) ResetMaxX ¶
func (m *MapTypeMutation) ResetMaxX()
ResetMaxX reset all changes of the "max_x" field.
func (*MapTypeMutation) ResetMaxY ¶
func (m *MapTypeMutation) ResetMaxY()
ResetMaxY reset all changes of the "max_y" field.
func (*MapTypeMutation) ResetMaxZoom ¶
func (m *MapTypeMutation) ResetMaxZoom()
ResetMaxZoom reset all changes of the "max_zoom" field.
func (*MapTypeMutation) ResetMetadata ¶
func (m *MapTypeMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" edge.
func (*MapTypeMutation) ResetMinX ¶
func (m *MapTypeMutation) ResetMinX()
ResetMinX reset all changes of the "min_x" field.
func (*MapTypeMutation) ResetMinY ¶
func (m *MapTypeMutation) ResetMinY()
ResetMinY reset all changes of the "min_y" field.
func (*MapTypeMutation) ResetMinZoom ¶
func (m *MapTypeMutation) ResetMinZoom()
ResetMinZoom reset all changes of the "min_zoom" field.
func (*MapTypeMutation) ResetName ¶
func (m *MapTypeMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*MapTypeMutation) ResetServers ¶
func (m *MapTypeMutation) ResetServers()
ResetServers reset all changes of the "servers" edge.
func (*MapTypeMutation) ResetUpdatedAt ¶
func (m *MapTypeMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*MapTypeMutation) ServersCleared ¶
func (m *MapTypeMutation) ServersCleared() bool
ServersCleared returns if the edge servers was cleared.
func (*MapTypeMutation) ServersIDs ¶
func (m *MapTypeMutation) ServersIDs() (ids []int)
ServersIDs returns the servers ids in the mutation.
func (*MapTypeMutation) SetCreatedAt ¶
func (m *MapTypeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*MapTypeMutation) SetField ¶
func (m *MapTypeMutation) 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 (*MapTypeMutation) SetMaxX ¶
func (m *MapTypeMutation) SetMaxX(f float64)
SetMaxX sets the max_x field.
func (*MapTypeMutation) SetMaxY ¶
func (m *MapTypeMutation) SetMaxY(f float64)
SetMaxY sets the max_y field.
func (*MapTypeMutation) SetMaxZoom ¶
func (m *MapTypeMutation) SetMaxZoom(i int)
SetMaxZoom sets the max_zoom field.
func (*MapTypeMutation) SetMetadataID ¶
func (m *MapTypeMutation) SetMetadataID(id int)
SetMetadataID sets the metadata edge to Metadata by id.
func (*MapTypeMutation) SetMinX ¶
func (m *MapTypeMutation) SetMinX(f float64)
SetMinX sets the min_x field.
func (*MapTypeMutation) SetMinY ¶
func (m *MapTypeMutation) SetMinY(f float64)
SetMinY sets the min_y field.
func (*MapTypeMutation) SetMinZoom ¶
func (m *MapTypeMutation) SetMinZoom(i int)
SetMinZoom sets the min_zoom field.
func (*MapTypeMutation) SetName ¶
func (m *MapTypeMutation) SetName(s string)
SetName sets the name field.
func (*MapTypeMutation) SetUpdatedAt ¶
func (m *MapTypeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (MapTypeMutation) Tx ¶
func (m MapTypeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MapTypeMutation) Type ¶
func (m *MapTypeMutation) Type() string
Type returns the node type of this mutation (MapType).
type MapTypeOrder ¶
type MapTypeOrder struct { Direction OrderDirection `json:"direction"` Field *MapTypeOrderField `json:"field"` }
MapTypeOrder defines the ordering of MapType.
type MapTypeOrderField ¶
type MapTypeOrderField struct {
// contains filtered or unexported fields
}
MapTypeOrderField defines the ordering field of MapType.
func (MapTypeOrderField) MarshalGQL ¶
func (f MapTypeOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (MapTypeOrderField) String ¶
func (f MapTypeOrderField) String() string
String implement fmt.Stringer interface.
func (*MapTypeOrderField) UnmarshalGQL ¶
func (f *MapTypeOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type MapTypePaginateOption ¶
type MapTypePaginateOption func(*mapTypePager) error
MapTypePaginateOption enables pagination customization.
func WithMapTypeFilter ¶
func WithMapTypeFilter(filter func(*MapTypeQuery) (*MapTypeQuery, error)) MapTypePaginateOption
WithMapTypeFilter configures pagination filter.
func WithMapTypeOrder ¶
func WithMapTypeOrder(order *MapTypeOrder) MapTypePaginateOption
WithMapTypeOrder configures pagination ordering.
type MapTypeQuery ¶
type MapTypeQuery struct {
// contains filtered or unexported fields
}
MapTypeQuery is the builder for querying MapType entities.
func (*MapTypeQuery) All ¶
func (mtq *MapTypeQuery) All(ctx context.Context) ([]*MapType, error)
All executes the query and returns a list of MapTypes.
func (*MapTypeQuery) AllX ¶
func (mtq *MapTypeQuery) AllX(ctx context.Context) []*MapType
AllX is like All, but panics if an error occurs.
func (*MapTypeQuery) Clone ¶
func (mtq *MapTypeQuery) Clone() *MapTypeQuery
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 (*MapTypeQuery) CollectFields ¶
func (mt *MapTypeQuery) CollectFields(ctx context.Context, satisfies ...string) *MapTypeQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*MapTypeQuery) Count ¶
func (mtq *MapTypeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MapTypeQuery) CountX ¶
func (mtq *MapTypeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MapTypeQuery) Exist ¶
func (mtq *MapTypeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MapTypeQuery) ExistX ¶
func (mtq *MapTypeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MapTypeQuery) First ¶
func (mtq *MapTypeQuery) First(ctx context.Context) (*MapType, error)
First returns the first MapType entity in the query. Returns *NotFoundError when no maptype was found.
func (*MapTypeQuery) FirstID ¶
func (mtq *MapTypeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MapType id in the query. Returns *NotFoundError when no id was found.
func (*MapTypeQuery) FirstIDX ¶
func (mtq *MapTypeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MapTypeQuery) FirstX ¶
func (mtq *MapTypeQuery) FirstX(ctx context.Context) *MapType
FirstX is like First, but panics if an error occurs.
func (*MapTypeQuery) GroupBy ¶
func (mtq *MapTypeQuery) GroupBy(field string, fields ...string) *MapTypeGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.MapType.Query(). GroupBy(maptype.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MapTypeQuery) IDs ¶
func (mtq *MapTypeQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MapType ids.
func (*MapTypeQuery) IDsX ¶
func (mtq *MapTypeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MapTypeQuery) Limit ¶
func (mtq *MapTypeQuery) Limit(limit int) *MapTypeQuery
Limit adds a limit step to the query.
func (*MapTypeQuery) Offset ¶
func (mtq *MapTypeQuery) Offset(offset int) *MapTypeQuery
Offset adds an offset step to the query.
func (*MapTypeQuery) Only ¶
func (mtq *MapTypeQuery) Only(ctx context.Context) (*MapType, error)
Only returns the only MapType entity in the query, returns an error if not exactly one entity was returned.
func (*MapTypeQuery) OnlyID ¶
func (mtq *MapTypeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only MapType id in the query, returns an error if not exactly one id was returned.
func (*MapTypeQuery) OnlyIDX ¶
func (mtq *MapTypeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MapTypeQuery) OnlyX ¶
func (mtq *MapTypeQuery) OnlyX(ctx context.Context) *MapType
OnlyX is like Only, but panics if an error occurs.
func (*MapTypeQuery) Order ¶
func (mtq *MapTypeQuery) Order(o ...OrderFunc) *MapTypeQuery
Order adds an order step to the query.
func (*MapTypeQuery) Paginate ¶
func (mt *MapTypeQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...MapTypePaginateOption, ) (*MapTypeConnection, error)
Paginate executes the query and returns a relay based cursor connection to MapType.
func (*MapTypeQuery) QueryMapLayers ¶
func (mtq *MapTypeQuery) QueryMapLayers() *MapLayerQuery
QueryMapLayers chains the current query on the map_layers edge.
func (*MapTypeQuery) QueryMetadata ¶
func (mtq *MapTypeQuery) QueryMetadata() *MetadataQuery
QueryMetadata chains the current query on the metadata edge.
func (*MapTypeQuery) QueryServers ¶
func (mtq *MapTypeQuery) QueryServers() *ServerQuery
QueryServers chains the current query on the servers edge.
func (*MapTypeQuery) Select ¶
func (mtq *MapTypeQuery) Select(field string, fields ...string) *MapTypeSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.MapType.Query(). Select(maptype.FieldCreatedAt). Scan(ctx, &v)
func (*MapTypeQuery) Where ¶
func (mtq *MapTypeQuery) Where(ps ...predicate.MapType) *MapTypeQuery
Where adds a new predicate for the builder.
func (*MapTypeQuery) WithMapLayers ¶
func (mtq *MapTypeQuery) WithMapLayers(opts ...func(*MapLayerQuery)) *MapTypeQuery
WithMapLayers tells the query-builder to eager-loads the nodes that are connected to
the "map_layers" edge. The optional arguments used to configure the query builder of the edge.
func (*MapTypeQuery) WithMetadata ¶
func (mtq *MapTypeQuery) WithMetadata(opts ...func(*MetadataQuery)) *MapTypeQuery
WithMetadata tells the query-builder to eager-loads the nodes that are connected to
the "metadata" edge. The optional arguments used to configure the query builder of the edge.
func (*MapTypeQuery) WithServers ¶
func (mtq *MapTypeQuery) WithServers(opts ...func(*ServerQuery)) *MapTypeQuery
WithServers tells the query-builder to eager-loads the nodes that are connected to
the "servers" edge. The optional arguments used to configure the query builder of the edge.
type MapTypeSelect ¶
type MapTypeSelect struct { *MapTypeQuery // contains filtered or unexported fields }
MapTypeSelect is the builder for select fields of MapType entities.
func (*MapTypeSelect) Bool ¶
func (mts *MapTypeSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*MapTypeSelect) BoolX ¶
func (mts *MapTypeSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MapTypeSelect) Bools ¶
func (mts *MapTypeSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*MapTypeSelect) BoolsX ¶
func (mts *MapTypeSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MapTypeSelect) Float64 ¶
func (mts *MapTypeSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*MapTypeSelect) Float64X ¶
func (mts *MapTypeSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MapTypeSelect) Float64s ¶
func (mts *MapTypeSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*MapTypeSelect) Float64sX ¶
func (mts *MapTypeSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MapTypeSelect) Int ¶
func (mts *MapTypeSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*MapTypeSelect) IntX ¶
func (mts *MapTypeSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MapTypeSelect) Ints ¶
func (mts *MapTypeSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*MapTypeSelect) IntsX ¶
func (mts *MapTypeSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MapTypeSelect) Scan ¶
func (mts *MapTypeSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*MapTypeSelect) ScanX ¶
func (mts *MapTypeSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MapTypeSelect) String ¶
func (mts *MapTypeSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*MapTypeSelect) StringX ¶
func (mts *MapTypeSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MapTypeUpdate ¶
type MapTypeUpdate struct {
// contains filtered or unexported fields
}
MapTypeUpdate is the builder for updating MapType entities.
func (*MapTypeUpdate) AddMapLayerIDs ¶
func (mtu *MapTypeUpdate) AddMapLayerIDs(ids ...int) *MapTypeUpdate
AddMapLayerIDs adds the map_layers edge to MapLayer by ids.
func (*MapTypeUpdate) AddMapLayers ¶
func (mtu *MapTypeUpdate) AddMapLayers(m ...*MapLayer) *MapTypeUpdate
AddMapLayers adds the map_layers edges to MapLayer.
func (*MapTypeUpdate) AddMaxX ¶
func (mtu *MapTypeUpdate) AddMaxX(f float64) *MapTypeUpdate
AddMaxX adds f to max_x.
func (*MapTypeUpdate) AddMaxY ¶
func (mtu *MapTypeUpdate) AddMaxY(f float64) *MapTypeUpdate
AddMaxY adds f to max_y.
func (*MapTypeUpdate) AddMaxZoom ¶
func (mtu *MapTypeUpdate) AddMaxZoom(i int) *MapTypeUpdate
AddMaxZoom adds i to max_zoom.
func (*MapTypeUpdate) AddMinX ¶
func (mtu *MapTypeUpdate) AddMinX(f float64) *MapTypeUpdate
AddMinX adds f to min_x.
func (*MapTypeUpdate) AddMinY ¶
func (mtu *MapTypeUpdate) AddMinY(f float64) *MapTypeUpdate
AddMinY adds f to min_y.
func (*MapTypeUpdate) AddMinZoom ¶
func (mtu *MapTypeUpdate) AddMinZoom(i int) *MapTypeUpdate
AddMinZoom adds i to min_zoom.
func (*MapTypeUpdate) AddServerIDs ¶
func (mtu *MapTypeUpdate) AddServerIDs(ids ...int) *MapTypeUpdate
AddServerIDs adds the servers edge to Server by ids.
func (*MapTypeUpdate) AddServers ¶
func (mtu *MapTypeUpdate) AddServers(s ...*Server) *MapTypeUpdate
AddServers adds the servers edges to Server.
func (*MapTypeUpdate) ClearMapLayers ¶
func (mtu *MapTypeUpdate) ClearMapLayers() *MapTypeUpdate
ClearMapLayers clears all "map_layers" edges to type MapLayer.
func (*MapTypeUpdate) ClearMetadata ¶
func (mtu *MapTypeUpdate) ClearMetadata() *MapTypeUpdate
ClearMetadata clears the "metadata" edge to type Metadata.
func (*MapTypeUpdate) ClearServers ¶
func (mtu *MapTypeUpdate) ClearServers() *MapTypeUpdate
ClearServers clears all "servers" edges to type Server.
func (*MapTypeUpdate) Exec ¶
func (mtu *MapTypeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MapTypeUpdate) ExecX ¶
func (mtu *MapTypeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MapTypeUpdate) Mutation ¶
func (mtu *MapTypeUpdate) Mutation() *MapTypeMutation
Mutation returns the MapTypeMutation object of the builder.
func (*MapTypeUpdate) RemoveMapLayerIDs ¶
func (mtu *MapTypeUpdate) RemoveMapLayerIDs(ids ...int) *MapTypeUpdate
RemoveMapLayerIDs removes the map_layers edge to MapLayer by ids.
func (*MapTypeUpdate) RemoveMapLayers ¶
func (mtu *MapTypeUpdate) RemoveMapLayers(m ...*MapLayer) *MapTypeUpdate
RemoveMapLayers removes map_layers edges to MapLayer.
func (*MapTypeUpdate) RemoveServerIDs ¶
func (mtu *MapTypeUpdate) RemoveServerIDs(ids ...int) *MapTypeUpdate
RemoveServerIDs removes the servers edge to Server by ids.
func (*MapTypeUpdate) RemoveServers ¶
func (mtu *MapTypeUpdate) RemoveServers(s ...*Server) *MapTypeUpdate
RemoveServers removes servers edges to Server.
func (*MapTypeUpdate) Save ¶
func (mtu *MapTypeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MapTypeUpdate) SaveX ¶
func (mtu *MapTypeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MapTypeUpdate) SetMaxX ¶
func (mtu *MapTypeUpdate) SetMaxX(f float64) *MapTypeUpdate
SetMaxX sets the max_x field.
func (*MapTypeUpdate) SetMaxY ¶
func (mtu *MapTypeUpdate) SetMaxY(f float64) *MapTypeUpdate
SetMaxY sets the max_y field.
func (*MapTypeUpdate) SetMaxZoom ¶
func (mtu *MapTypeUpdate) SetMaxZoom(i int) *MapTypeUpdate
SetMaxZoom sets the max_zoom field.
func (*MapTypeUpdate) SetMetadata ¶
func (mtu *MapTypeUpdate) SetMetadata(m *Metadata) *MapTypeUpdate
SetMetadata sets the metadata edge to Metadata.
func (*MapTypeUpdate) SetMetadataID ¶
func (mtu *MapTypeUpdate) SetMetadataID(id int) *MapTypeUpdate
SetMetadataID sets the metadata edge to Metadata by id.
func (*MapTypeUpdate) SetMinX ¶
func (mtu *MapTypeUpdate) SetMinX(f float64) *MapTypeUpdate
SetMinX sets the min_x field.
func (*MapTypeUpdate) SetMinY ¶
func (mtu *MapTypeUpdate) SetMinY(f float64) *MapTypeUpdate
SetMinY sets the min_y field.
func (*MapTypeUpdate) SetMinZoom ¶
func (mtu *MapTypeUpdate) SetMinZoom(i int) *MapTypeUpdate
SetMinZoom sets the min_zoom field.
func (*MapTypeUpdate) SetName ¶
func (mtu *MapTypeUpdate) SetName(s string) *MapTypeUpdate
SetName sets the name field.
func (*MapTypeUpdate) SetNillableMetadataID ¶
func (mtu *MapTypeUpdate) SetNillableMetadataID(id *int) *MapTypeUpdate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*MapTypeUpdate) SetUpdatedAt ¶
func (mtu *MapTypeUpdate) SetUpdatedAt(t time.Time) *MapTypeUpdate
SetUpdatedAt sets the updated_at field.
func (*MapTypeUpdate) Where ¶
func (mtu *MapTypeUpdate) Where(ps ...predicate.MapType) *MapTypeUpdate
Where adds a new predicate for the builder.
type MapTypeUpdateOne ¶
type MapTypeUpdateOne struct {
// contains filtered or unexported fields
}
MapTypeUpdateOne is the builder for updating a single MapType entity.
func (*MapTypeUpdateOne) AddMapLayerIDs ¶
func (mtuo *MapTypeUpdateOne) AddMapLayerIDs(ids ...int) *MapTypeUpdateOne
AddMapLayerIDs adds the map_layers edge to MapLayer by ids.
func (*MapTypeUpdateOne) AddMapLayers ¶
func (mtuo *MapTypeUpdateOne) AddMapLayers(m ...*MapLayer) *MapTypeUpdateOne
AddMapLayers adds the map_layers edges to MapLayer.
func (*MapTypeUpdateOne) AddMaxX ¶
func (mtuo *MapTypeUpdateOne) AddMaxX(f float64) *MapTypeUpdateOne
AddMaxX adds f to max_x.
func (*MapTypeUpdateOne) AddMaxY ¶
func (mtuo *MapTypeUpdateOne) AddMaxY(f float64) *MapTypeUpdateOne
AddMaxY adds f to max_y.
func (*MapTypeUpdateOne) AddMaxZoom ¶
func (mtuo *MapTypeUpdateOne) AddMaxZoom(i int) *MapTypeUpdateOne
AddMaxZoom adds i to max_zoom.
func (*MapTypeUpdateOne) AddMinX ¶
func (mtuo *MapTypeUpdateOne) AddMinX(f float64) *MapTypeUpdateOne
AddMinX adds f to min_x.
func (*MapTypeUpdateOne) AddMinY ¶
func (mtuo *MapTypeUpdateOne) AddMinY(f float64) *MapTypeUpdateOne
AddMinY adds f to min_y.
func (*MapTypeUpdateOne) AddMinZoom ¶
func (mtuo *MapTypeUpdateOne) AddMinZoom(i int) *MapTypeUpdateOne
AddMinZoom adds i to min_zoom.
func (*MapTypeUpdateOne) AddServerIDs ¶
func (mtuo *MapTypeUpdateOne) AddServerIDs(ids ...int) *MapTypeUpdateOne
AddServerIDs adds the servers edge to Server by ids.
func (*MapTypeUpdateOne) AddServers ¶
func (mtuo *MapTypeUpdateOne) AddServers(s ...*Server) *MapTypeUpdateOne
AddServers adds the servers edges to Server.
func (*MapTypeUpdateOne) ClearMapLayers ¶
func (mtuo *MapTypeUpdateOne) ClearMapLayers() *MapTypeUpdateOne
ClearMapLayers clears all "map_layers" edges to type MapLayer.
func (*MapTypeUpdateOne) ClearMetadata ¶
func (mtuo *MapTypeUpdateOne) ClearMetadata() *MapTypeUpdateOne
ClearMetadata clears the "metadata" edge to type Metadata.
func (*MapTypeUpdateOne) ClearServers ¶
func (mtuo *MapTypeUpdateOne) ClearServers() *MapTypeUpdateOne
ClearServers clears all "servers" edges to type Server.
func (*MapTypeUpdateOne) Exec ¶
func (mtuo *MapTypeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MapTypeUpdateOne) ExecX ¶
func (mtuo *MapTypeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MapTypeUpdateOne) Mutation ¶
func (mtuo *MapTypeUpdateOne) Mutation() *MapTypeMutation
Mutation returns the MapTypeMutation object of the builder.
func (*MapTypeUpdateOne) RemoveMapLayerIDs ¶
func (mtuo *MapTypeUpdateOne) RemoveMapLayerIDs(ids ...int) *MapTypeUpdateOne
RemoveMapLayerIDs removes the map_layers edge to MapLayer by ids.
func (*MapTypeUpdateOne) RemoveMapLayers ¶
func (mtuo *MapTypeUpdateOne) RemoveMapLayers(m ...*MapLayer) *MapTypeUpdateOne
RemoveMapLayers removes map_layers edges to MapLayer.
func (*MapTypeUpdateOne) RemoveServerIDs ¶
func (mtuo *MapTypeUpdateOne) RemoveServerIDs(ids ...int) *MapTypeUpdateOne
RemoveServerIDs removes the servers edge to Server by ids.
func (*MapTypeUpdateOne) RemoveServers ¶
func (mtuo *MapTypeUpdateOne) RemoveServers(s ...*Server) *MapTypeUpdateOne
RemoveServers removes servers edges to Server.
func (*MapTypeUpdateOne) Save ¶
func (mtuo *MapTypeUpdateOne) Save(ctx context.Context) (*MapType, error)
Save executes the query and returns the updated entity.
func (*MapTypeUpdateOne) SaveX ¶
func (mtuo *MapTypeUpdateOne) SaveX(ctx context.Context) *MapType
SaveX is like Save, but panics if an error occurs.
func (*MapTypeUpdateOne) SetMaxX ¶
func (mtuo *MapTypeUpdateOne) SetMaxX(f float64) *MapTypeUpdateOne
SetMaxX sets the max_x field.
func (*MapTypeUpdateOne) SetMaxY ¶
func (mtuo *MapTypeUpdateOne) SetMaxY(f float64) *MapTypeUpdateOne
SetMaxY sets the max_y field.
func (*MapTypeUpdateOne) SetMaxZoom ¶
func (mtuo *MapTypeUpdateOne) SetMaxZoom(i int) *MapTypeUpdateOne
SetMaxZoom sets the max_zoom field.
func (*MapTypeUpdateOne) SetMetadata ¶
func (mtuo *MapTypeUpdateOne) SetMetadata(m *Metadata) *MapTypeUpdateOne
SetMetadata sets the metadata edge to Metadata.
func (*MapTypeUpdateOne) SetMetadataID ¶
func (mtuo *MapTypeUpdateOne) SetMetadataID(id int) *MapTypeUpdateOne
SetMetadataID sets the metadata edge to Metadata by id.
func (*MapTypeUpdateOne) SetMinX ¶
func (mtuo *MapTypeUpdateOne) SetMinX(f float64) *MapTypeUpdateOne
SetMinX sets the min_x field.
func (*MapTypeUpdateOne) SetMinY ¶
func (mtuo *MapTypeUpdateOne) SetMinY(f float64) *MapTypeUpdateOne
SetMinY sets the min_y field.
func (*MapTypeUpdateOne) SetMinZoom ¶
func (mtuo *MapTypeUpdateOne) SetMinZoom(i int) *MapTypeUpdateOne
SetMinZoom sets the min_zoom field.
func (*MapTypeUpdateOne) SetName ¶
func (mtuo *MapTypeUpdateOne) SetName(s string) *MapTypeUpdateOne
SetName sets the name field.
func (*MapTypeUpdateOne) SetNillableMetadataID ¶
func (mtuo *MapTypeUpdateOne) SetNillableMetadataID(id *int) *MapTypeUpdateOne
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*MapTypeUpdateOne) SetUpdatedAt ¶
func (mtuo *MapTypeUpdateOne) SetUpdatedAt(t time.Time) *MapTypeUpdateOne
SetUpdatedAt sets the updated_at field.
type Metadata ¶
type Metadata struct { // ID of the ent. ID int `json:"id,omitempty"` // Data holds the value of the "data" field. Data map[string]interface{} `json:"data,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MetadataQuery when eager-loading is set. Edges MetadataEdges `json:"edges"` // contains filtered or unexported fields }
Metadata is the model entity for the Metadata schema.
func (*Metadata) QueryMapType ¶
func (m *Metadata) QueryMapType() *MapTypeQuery
QueryMapType queries the map_type edge of the Metadata.
func (*Metadata) ToEdge ¶
func (m *Metadata) ToEdge(order *MetadataOrder) *MetadataEdge
ToEdge converts Metadata into MetadataEdge.
func (*Metadata) 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 (*Metadata) Update ¶
func (m *Metadata) Update() *MetadataUpdateOne
Update returns a builder for updating this Metadata. Note that, you need to call Metadata.Unwrap() before calling this method, if this Metadata was returned from a transaction, and the transaction was committed or rolled back.
type MetadataClient ¶
type MetadataClient struct {
// contains filtered or unexported fields
}
MetadataClient is a client for the Metadata schema.
func NewMetadataClient ¶
func NewMetadataClient(c config) *MetadataClient
NewMetadataClient returns a client for the Metadata from the given config.
func (*MetadataClient) Create ¶
func (c *MetadataClient) Create() *MetadataCreate
Create returns a create builder for Metadata.
func (*MetadataClient) CreateBulk ¶
func (c *MetadataClient) CreateBulk(builders ...*MetadataCreate) *MetadataCreateBulk
CreateBulk returns a builder for creating a bulk of Metadata entities.
func (*MetadataClient) Delete ¶
func (c *MetadataClient) Delete() *MetadataDelete
Delete returns a delete builder for Metadata.
func (*MetadataClient) DeleteOne ¶
func (c *MetadataClient) DeleteOne(m *Metadata) *MetadataDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MetadataClient) DeleteOneID ¶
func (c *MetadataClient) DeleteOneID(id int) *MetadataDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MetadataClient) GetX ¶
func (c *MetadataClient) GetX(ctx context.Context, id int) *Metadata
GetX is like Get, but panics if an error occurs.
func (*MetadataClient) Hooks ¶
func (c *MetadataClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MetadataClient) Query ¶
func (c *MetadataClient) Query() *MetadataQuery
Query returns a query builder for Metadata.
func (*MetadataClient) QueryMapType ¶
func (c *MetadataClient) QueryMapType(m *Metadata) *MapTypeQuery
QueryMapType queries the map_type edge of a Metadata.
func (*MetadataClient) QueryUser ¶
func (c *MetadataClient) QueryUser(m *Metadata) *UserQuery
QueryUser queries the user edge of a Metadata.
func (*MetadataClient) Update ¶
func (c *MetadataClient) Update() *MetadataUpdate
Update returns an update builder for Metadata.
func (*MetadataClient) UpdateOne ¶
func (c *MetadataClient) UpdateOne(m *Metadata) *MetadataUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MetadataClient) UpdateOneID ¶
func (c *MetadataClient) UpdateOneID(id int) *MetadataUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MetadataClient) Use ¶
func (c *MetadataClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `metadata.Hooks(f(g(h())))`.
type MetadataConnection ¶
type MetadataConnection struct { Edges []*MetadataEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
MetadataConnection is the connection containing edges to Metadata.
type MetadataCreate ¶
type MetadataCreate struct {
// contains filtered or unexported fields
}
MetadataCreate is the builder for creating a Metadata entity.
func (*MetadataCreate) Mutation ¶
func (mc *MetadataCreate) Mutation() *MetadataMutation
Mutation returns the MetadataMutation object of the builder.
func (*MetadataCreate) Save ¶
func (mc *MetadataCreate) Save(ctx context.Context) (*Metadata, error)
Save creates the Metadata in the database.
func (*MetadataCreate) SaveX ¶
func (mc *MetadataCreate) SaveX(ctx context.Context) *Metadata
SaveX calls Save and panics if Save returns an error.
func (*MetadataCreate) SetData ¶
func (mc *MetadataCreate) SetData(m map[string]interface{}) *MetadataCreate
SetData sets the data field.
func (*MetadataCreate) SetMapType ¶
func (mc *MetadataCreate) SetMapType(m *MapType) *MetadataCreate
SetMapType sets the map_type edge to MapType.
func (*MetadataCreate) SetMapTypeID ¶
func (mc *MetadataCreate) SetMapTypeID(id int) *MetadataCreate
SetMapTypeID sets the map_type edge to MapType by id.
func (*MetadataCreate) SetNillableMapTypeID ¶
func (mc *MetadataCreate) SetNillableMapTypeID(id *int) *MetadataCreate
SetNillableMapTypeID sets the map_type edge to MapType by id if the given value is not nil.
func (*MetadataCreate) SetNillableUserID ¶
func (mc *MetadataCreate) SetNillableUserID(id *int) *MetadataCreate
SetNillableUserID sets the user edge to User by id if the given value is not nil.
func (*MetadataCreate) SetUser ¶
func (mc *MetadataCreate) SetUser(u *User) *MetadataCreate
SetUser sets the user edge to User.
func (*MetadataCreate) SetUserID ¶
func (mc *MetadataCreate) SetUserID(id int) *MetadataCreate
SetUserID sets the user edge to User by id.
type MetadataCreateBulk ¶
type MetadataCreateBulk struct {
// contains filtered or unexported fields
}
MetadataCreateBulk is the builder for creating a bulk of Metadata entities.
type MetadataDelete ¶
type MetadataDelete struct {
// contains filtered or unexported fields
}
MetadataDelete is the builder for deleting a Metadata entity.
func (*MetadataDelete) Exec ¶
func (md *MetadataDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MetadataDelete) ExecX ¶
func (md *MetadataDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MetadataDelete) Where ¶
func (md *MetadataDelete) Where(ps ...predicate.Metadata) *MetadataDelete
Where adds a new predicate to the delete builder.
type MetadataDeleteOne ¶
type MetadataDeleteOne struct {
// contains filtered or unexported fields
}
MetadataDeleteOne is the builder for deleting a single Metadata entity.
func (*MetadataDeleteOne) Exec ¶
func (mdo *MetadataDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MetadataDeleteOne) ExecX ¶
func (mdo *MetadataDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MetadataEdge ¶
MetadataEdge is the edge representation of Metadata.
type MetadataEdges ¶
type MetadataEdges struct { // User holds the value of the user edge. User *User // MapType holds the value of the map_type edge. MapType *MapType // contains filtered or unexported fields }
MetadataEdges holds the relations/edges for other nodes in the graph.
func (MetadataEdges) MapTypeOrErr ¶
func (e MetadataEdges) MapTypeOrErr() (*MapType, error)
MapTypeOrErr returns the MapType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MetadataEdges) UserOrErr ¶
func (e MetadataEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MetadataGroupBy ¶
type MetadataGroupBy struct {
// contains filtered or unexported fields
}
MetadataGroupBy is the builder for group-by Metadata entities.
func (*MetadataGroupBy) Aggregate ¶
func (mgb *MetadataGroupBy) Aggregate(fns ...AggregateFunc) *MetadataGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MetadataGroupBy) Bool ¶
func (mgb *MetadataGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*MetadataGroupBy) BoolX ¶
func (mgb *MetadataGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MetadataGroupBy) Bools ¶
func (mgb *MetadataGroupBy) 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 (*MetadataGroupBy) BoolsX ¶
func (mgb *MetadataGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MetadataGroupBy) Float64 ¶
func (mgb *MetadataGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*MetadataGroupBy) Float64X ¶
func (mgb *MetadataGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MetadataGroupBy) Float64s ¶
func (mgb *MetadataGroupBy) 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 (*MetadataGroupBy) Float64sX ¶
func (mgb *MetadataGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MetadataGroupBy) Int ¶
func (mgb *MetadataGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*MetadataGroupBy) IntX ¶
func (mgb *MetadataGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MetadataGroupBy) Ints ¶
func (mgb *MetadataGroupBy) 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 (*MetadataGroupBy) IntsX ¶
func (mgb *MetadataGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MetadataGroupBy) Scan ¶
func (mgb *MetadataGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*MetadataGroupBy) ScanX ¶
func (mgb *MetadataGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MetadataGroupBy) String ¶
func (mgb *MetadataGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*MetadataGroupBy) StringX ¶
func (mgb *MetadataGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MetadataMutation ¶
type MetadataMutation struct {
// contains filtered or unexported fields
}
MetadataMutation represents an operation that mutate the MetadataSlice nodes in the graph.
func (*MetadataMutation) AddField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) AddedEdges ¶
func (m *MetadataMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MetadataMutation) AddedField ¶
func (m *MetadataMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was 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 (*MetadataMutation) AddedFields ¶
func (m *MetadataMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*MetadataMutation) AddedIDs ¶
func (m *MetadataMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*MetadataMutation) ClearEdge ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ClearField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ClearMapType ¶
func (m *MetadataMutation) ClearMapType()
ClearMapType clears the map_type edge to MapType.
func (*MetadataMutation) ClearUser ¶
func (m *MetadataMutation) ClearUser()
ClearUser clears the user edge to User.
func (*MetadataMutation) ClearedEdges ¶
func (m *MetadataMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MetadataMutation) ClearedFields ¶
func (m *MetadataMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MetadataMutation) Client ¶
func (m MetadataMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*MetadataMutation) Data ¶
func (m *MetadataMutation) Data() (r map[string]interface{}, exists bool)
Data returns the data value in the mutation.
func (*MetadataMutation) EdgeCleared ¶
func (m *MetadataMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*MetadataMutation) Field ¶
func (m *MetadataMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*MetadataMutation) FieldCleared ¶
func (m *MetadataMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*MetadataMutation) Fields ¶
func (m *MetadataMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*MetadataMutation) ID ¶
func (m *MetadataMutation) 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 (*MetadataMutation) MapTypeCleared ¶
func (m *MetadataMutation) MapTypeCleared() bool
MapTypeCleared returns if the edge map_type was cleared.
func (*MetadataMutation) MapTypeID ¶
func (m *MetadataMutation) MapTypeID() (id int, exists bool)
MapTypeID returns the map_type id in the mutation.
func (*MetadataMutation) MapTypeIDs ¶
func (m *MetadataMutation) MapTypeIDs() (ids []int)
MapTypeIDs returns the map_type ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use MapTypeID instead. It exists only for internal usage by the builders.
func (*MetadataMutation) OldData ¶
func (m *MetadataMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)
OldData returns the old data value of the Metadata. If the Metadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*MetadataMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*MetadataMutation) RemovedEdges ¶
func (m *MetadataMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MetadataMutation) RemovedIDs ¶
func (m *MetadataMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*MetadataMutation) ResetData ¶
func (m *MetadataMutation) ResetData()
ResetData reset all changes of the "data" field.
func (*MetadataMutation) ResetEdge ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ResetField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ResetMapType ¶
func (m *MetadataMutation) ResetMapType()
ResetMapType reset all changes of the "map_type" edge.
func (*MetadataMutation) ResetUser ¶
func (m *MetadataMutation) ResetUser()
ResetUser reset all changes of the "user" edge.
func (*MetadataMutation) SetData ¶
func (m *MetadataMutation) SetData(value map[string]interface{})
SetData sets the data field.
func (*MetadataMutation) SetField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) SetMapTypeID ¶
func (m *MetadataMutation) SetMapTypeID(id int)
SetMapTypeID sets the map_type edge to MapType by id.
func (*MetadataMutation) SetUserID ¶
func (m *MetadataMutation) SetUserID(id int)
SetUserID sets the user edge to User by id.
func (MetadataMutation) Tx ¶
func (m MetadataMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MetadataMutation) Type ¶
func (m *MetadataMutation) Type() string
Type returns the node type of this mutation (Metadata).
func (*MetadataMutation) UserCleared ¶
func (m *MetadataMutation) UserCleared() bool
UserCleared returns if the edge user was cleared.
func (*MetadataMutation) UserID ¶
func (m *MetadataMutation) UserID() (id int, exists bool)
UserID returns the user id in the mutation.
func (*MetadataMutation) UserIDs ¶
func (m *MetadataMutation) UserIDs() (ids []int)
UserIDs returns the user ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
type MetadataOrder ¶
type MetadataOrder struct { Direction OrderDirection `json:"direction"` Field *MetadataOrderField `json:"field"` }
MetadataOrder defines the ordering of Metadata.
type MetadataOrderField ¶
type MetadataOrderField struct {
// contains filtered or unexported fields
}
MetadataOrderField defines the ordering field of Metadata.
type MetadataPaginateOption ¶
type MetadataPaginateOption func(*metadataPager) error
MetadataPaginateOption enables pagination customization.
func WithMetadataFilter ¶
func WithMetadataFilter(filter func(*MetadataQuery) (*MetadataQuery, error)) MetadataPaginateOption
WithMetadataFilter configures pagination filter.
func WithMetadataOrder ¶
func WithMetadataOrder(order *MetadataOrder) MetadataPaginateOption
WithMetadataOrder configures pagination ordering.
type MetadataQuery ¶
type MetadataQuery struct {
// contains filtered or unexported fields
}
MetadataQuery is the builder for querying Metadata entities.
func (*MetadataQuery) All ¶
func (mq *MetadataQuery) All(ctx context.Context) ([]*Metadata, error)
All executes the query and returns a list of MetadataSlice.
func (*MetadataQuery) AllX ¶
func (mq *MetadataQuery) AllX(ctx context.Context) []*Metadata
AllX is like All, but panics if an error occurs.
func (*MetadataQuery) Clone ¶
func (mq *MetadataQuery) Clone() *MetadataQuery
Clone returns a duplicate of the 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 (*MetadataQuery) CollectFields ¶
func (m *MetadataQuery) CollectFields(ctx context.Context, satisfies ...string) *MetadataQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*MetadataQuery) Count ¶
func (mq *MetadataQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MetadataQuery) CountX ¶
func (mq *MetadataQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MetadataQuery) Exist ¶
func (mq *MetadataQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MetadataQuery) ExistX ¶
func (mq *MetadataQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MetadataQuery) First ¶
func (mq *MetadataQuery) First(ctx context.Context) (*Metadata, error)
First returns the first Metadata entity in the query. Returns *NotFoundError when no metadata was found.
func (*MetadataQuery) FirstID ¶
func (mq *MetadataQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Metadata id in the query. Returns *NotFoundError when no id was found.
func (*MetadataQuery) FirstIDX ¶
func (mq *MetadataQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MetadataQuery) FirstX ¶
func (mq *MetadataQuery) FirstX(ctx context.Context) *Metadata
FirstX is like First, but panics if an error occurs.
func (*MetadataQuery) GroupBy ¶
func (mq *MetadataQuery) GroupBy(field string, fields ...string) *MetadataGroupBy
GroupBy 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 { Data map[string]interface {} `json:"data,omitempty"` Count int `json:"count,omitempty"` } client.Metadata.Query(). GroupBy(metadata.FieldData). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MetadataQuery) IDs ¶
func (mq *MetadataQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Metadata ids.
func (*MetadataQuery) IDsX ¶
func (mq *MetadataQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MetadataQuery) Limit ¶
func (mq *MetadataQuery) Limit(limit int) *MetadataQuery
Limit adds a limit step to the query.
func (*MetadataQuery) Offset ¶
func (mq *MetadataQuery) Offset(offset int) *MetadataQuery
Offset adds an offset step to the query.
func (*MetadataQuery) Only ¶
func (mq *MetadataQuery) Only(ctx context.Context) (*Metadata, error)
Only returns the only Metadata entity in the query, returns an error if not exactly one entity was returned.
func (*MetadataQuery) OnlyID ¶
func (mq *MetadataQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Metadata id in the query, returns an error if not exactly one id was returned.
func (*MetadataQuery) OnlyIDX ¶
func (mq *MetadataQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MetadataQuery) OnlyX ¶
func (mq *MetadataQuery) OnlyX(ctx context.Context) *Metadata
OnlyX is like Only, but panics if an error occurs.
func (*MetadataQuery) Order ¶
func (mq *MetadataQuery) Order(o ...OrderFunc) *MetadataQuery
Order adds an order step to the query.
func (*MetadataQuery) Paginate ¶
func (m *MetadataQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...MetadataPaginateOption, ) (*MetadataConnection, error)
Paginate executes the query and returns a relay based cursor connection to Metadata.
func (*MetadataQuery) QueryMapType ¶
func (mq *MetadataQuery) QueryMapType() *MapTypeQuery
QueryMapType chains the current query on the map_type edge.
func (*MetadataQuery) QueryUser ¶
func (mq *MetadataQuery) QueryUser() *UserQuery
QueryUser chains the current query on the user edge.
func (*MetadataQuery) Select ¶
func (mq *MetadataQuery) Select(field string, fields ...string) *MetadataSelect
Select one or more fields from the given query.
Example:
var v []struct { Data map[string]interface {} `json:"data,omitempty"` } client.Metadata.Query(). Select(metadata.FieldData). Scan(ctx, &v)
func (*MetadataQuery) Where ¶
func (mq *MetadataQuery) Where(ps ...predicate.Metadata) *MetadataQuery
Where adds a new predicate for the builder.
func (*MetadataQuery) WithMapType ¶
func (mq *MetadataQuery) WithMapType(opts ...func(*MapTypeQuery)) *MetadataQuery
WithMapType tells the query-builder to eager-loads the nodes that are connected to
the "map_type" edge. The optional arguments used to configure the query builder of the edge.
func (*MetadataQuery) WithUser ¶
func (mq *MetadataQuery) WithUser(opts ...func(*UserQuery)) *MetadataQuery
WithUser tells the query-builder to eager-loads the nodes that are connected to
the "user" edge. The optional arguments used to configure the query builder of the edge.
type MetadataSelect ¶
type MetadataSelect struct { *MetadataQuery // contains filtered or unexported fields }
MetadataSelect is the builder for select fields of Metadata entities.
func (*MetadataSelect) Bool ¶
func (ms *MetadataSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*MetadataSelect) BoolX ¶
func (ms *MetadataSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MetadataSelect) Bools ¶
func (ms *MetadataSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*MetadataSelect) BoolsX ¶
func (ms *MetadataSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MetadataSelect) Float64 ¶
func (ms *MetadataSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*MetadataSelect) Float64X ¶
func (ms *MetadataSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MetadataSelect) Float64s ¶
func (ms *MetadataSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*MetadataSelect) Float64sX ¶
func (ms *MetadataSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MetadataSelect) Int ¶
func (ms *MetadataSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*MetadataSelect) IntX ¶
func (ms *MetadataSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MetadataSelect) Ints ¶
func (ms *MetadataSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*MetadataSelect) IntsX ¶
func (ms *MetadataSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MetadataSelect) Scan ¶
func (ms *MetadataSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*MetadataSelect) ScanX ¶
func (ms *MetadataSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MetadataSelect) String ¶
func (ms *MetadataSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*MetadataSelect) StringX ¶
func (ms *MetadataSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MetadataUpdate ¶
type MetadataUpdate struct {
// contains filtered or unexported fields
}
MetadataUpdate is the builder for updating Metadata entities.
func (*MetadataUpdate) ClearMapType ¶
func (mu *MetadataUpdate) ClearMapType() *MetadataUpdate
ClearMapType clears the "map_type" edge to type MapType.
func (*MetadataUpdate) ClearUser ¶
func (mu *MetadataUpdate) ClearUser() *MetadataUpdate
ClearUser clears the "user" edge to type User.
func (*MetadataUpdate) Exec ¶
func (mu *MetadataUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataUpdate) ExecX ¶
func (mu *MetadataUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataUpdate) Mutation ¶
func (mu *MetadataUpdate) Mutation() *MetadataMutation
Mutation returns the MetadataMutation object of the builder.
func (*MetadataUpdate) Save ¶
func (mu *MetadataUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MetadataUpdate) SaveX ¶
func (mu *MetadataUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MetadataUpdate) SetData ¶
func (mu *MetadataUpdate) SetData(m map[string]interface{}) *MetadataUpdate
SetData sets the data field.
func (*MetadataUpdate) SetMapType ¶
func (mu *MetadataUpdate) SetMapType(m *MapType) *MetadataUpdate
SetMapType sets the map_type edge to MapType.
func (*MetadataUpdate) SetMapTypeID ¶
func (mu *MetadataUpdate) SetMapTypeID(id int) *MetadataUpdate
SetMapTypeID sets the map_type edge to MapType by id.
func (*MetadataUpdate) SetNillableMapTypeID ¶
func (mu *MetadataUpdate) SetNillableMapTypeID(id *int) *MetadataUpdate
SetNillableMapTypeID sets the map_type edge to MapType by id if the given value is not nil.
func (*MetadataUpdate) SetNillableUserID ¶
func (mu *MetadataUpdate) SetNillableUserID(id *int) *MetadataUpdate
SetNillableUserID sets the user edge to User by id if the given value is not nil.
func (*MetadataUpdate) SetUser ¶
func (mu *MetadataUpdate) SetUser(u *User) *MetadataUpdate
SetUser sets the user edge to User.
func (*MetadataUpdate) SetUserID ¶
func (mu *MetadataUpdate) SetUserID(id int) *MetadataUpdate
SetUserID sets the user edge to User by id.
func (*MetadataUpdate) Where ¶
func (mu *MetadataUpdate) Where(ps ...predicate.Metadata) *MetadataUpdate
Where adds a new predicate for the builder.
type MetadataUpdateOne ¶
type MetadataUpdateOne struct {
// contains filtered or unexported fields
}
MetadataUpdateOne is the builder for updating a single Metadata entity.
func (*MetadataUpdateOne) ClearMapType ¶
func (muo *MetadataUpdateOne) ClearMapType() *MetadataUpdateOne
ClearMapType clears the "map_type" edge to type MapType.
func (*MetadataUpdateOne) ClearUser ¶
func (muo *MetadataUpdateOne) ClearUser() *MetadataUpdateOne
ClearUser clears the "user" edge to type User.
func (*MetadataUpdateOne) Exec ¶
func (muo *MetadataUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MetadataUpdateOne) ExecX ¶
func (muo *MetadataUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataUpdateOne) Mutation ¶
func (muo *MetadataUpdateOne) Mutation() *MetadataMutation
Mutation returns the MetadataMutation object of the builder.
func (*MetadataUpdateOne) Save ¶
func (muo *MetadataUpdateOne) Save(ctx context.Context) (*Metadata, error)
Save executes the query and returns the updated entity.
func (*MetadataUpdateOne) SaveX ¶
func (muo *MetadataUpdateOne) SaveX(ctx context.Context) *Metadata
SaveX is like Save, but panics if an error occurs.
func (*MetadataUpdateOne) SetData ¶
func (muo *MetadataUpdateOne) SetData(m map[string]interface{}) *MetadataUpdateOne
SetData sets the data field.
func (*MetadataUpdateOne) SetMapType ¶
func (muo *MetadataUpdateOne) SetMapType(m *MapType) *MetadataUpdateOne
SetMapType sets the map_type edge to MapType.
func (*MetadataUpdateOne) SetMapTypeID ¶
func (muo *MetadataUpdateOne) SetMapTypeID(id int) *MetadataUpdateOne
SetMapTypeID sets the map_type edge to MapType by id.
func (*MetadataUpdateOne) SetNillableMapTypeID ¶
func (muo *MetadataUpdateOne) SetNillableMapTypeID(id *int) *MetadataUpdateOne
SetNillableMapTypeID sets the map_type edge to MapType by id if the given value is not nil.
func (*MetadataUpdateOne) SetNillableUserID ¶
func (muo *MetadataUpdateOne) SetNillableUserID(id *int) *MetadataUpdateOne
SetNillableUserID sets the user edge to User by id if the given value is not nil.
func (*MetadataUpdateOne) SetUser ¶
func (muo *MetadataUpdateOne) SetUser(u *User) *MetadataUpdateOne
SetUser sets the user edge to User.
func (*MetadataUpdateOne) SetUserID ¶
func (muo *MetadataUpdateOne) SetUserID(id int) *MetadataUpdateOne
SetUserID sets the user edge to User by id.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflict in user's code.
type Node ¶
type Node struct { ID int `json:"id,omitempty"` // node id. Type string `json:"type,omitempty"` // node type. Fields []*Field `json:"fields,omitempty"` // node fields. Edges []*Edge `json:"edges,omitempty"` // node edges. }
Node in the graph.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
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 OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) MarshalGQL ¶
func (o OrderDirection) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (*OrderDirection) UnmarshalGQL ¶
func (o *OrderDirection) UnmarshalGQL(val interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type PageInfo ¶
type PageInfo struct { HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` StartCursor *Cursor `json:"startCursor"` EndCursor *Cursor `json:"endCursor"` }
PageInfo of a connection type.
type Player ¶
type Player struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // TotalMinutes holds the value of the "total_minutes" field. TotalMinutes int `json:"total_minutes,omitempty"` // SessionStartedAt holds the value of the "session_started_at" field. SessionStartedAt *time.Time `json:"session_started_at,omitempty"` // SessionEndedAt holds the value of the "session_ended_at" field. SessionEndedAt *time.Time `json:"session_ended_at,omitempty"` // LastSeenAt holds the value of the "last_seen_at" field. LastSeenAt *time.Time `json:"last_seen_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PlayerQuery when eager-loading is set. Edges PlayerEdges `json:"edges"` // contains filtered or unexported fields }
Player is the model entity for the Player schema.
func (*Player) Identifiers ¶
func (pl *Player) Identifiers(ctx context.Context) ([]*PlayerIdentifier, error)
func (*Player) QueryIdentifiers ¶
func (pl *Player) QueryIdentifiers() *PlayerIdentifierQuery
QueryIdentifiers queries the identifiers edge of the Player.
func (*Player) QueryMetadata ¶
func (pl *Player) QueryMetadata() *MetadataQuery
QueryMetadata queries the metadata edge of the Player.
func (*Player) QueryServers ¶
func (pl *Player) QueryServers() *ServerQuery
QueryServers queries the servers edge of the Player.
func (*Player) ToEdge ¶
func (pl *Player) ToEdge(order *PlayerOrder) *PlayerEdge
ToEdge converts Player into PlayerEdge.
func (*Player) 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 (*Player) Update ¶
func (pl *Player) Update() *PlayerUpdateOne
Update returns a builder for updating this Player. Note that, you need to call Player.Unwrap() before calling this method, if this Player was returned from a transaction, and the transaction was committed or rolled back.
type PlayerClient ¶
type PlayerClient struct {
// contains filtered or unexported fields
}
PlayerClient is a client for the Player schema.
func NewPlayerClient ¶
func NewPlayerClient(c config) *PlayerClient
NewPlayerClient returns a client for the Player from the given config.
func (*PlayerClient) Create ¶
func (c *PlayerClient) Create() *PlayerCreate
Create returns a create builder for Player.
func (*PlayerClient) CreateBulk ¶
func (c *PlayerClient) CreateBulk(builders ...*PlayerCreate) *PlayerCreateBulk
CreateBulk returns a builder for creating a bulk of Player entities.
func (*PlayerClient) Delete ¶
func (c *PlayerClient) Delete() *PlayerDelete
Delete returns a delete builder for Player.
func (*PlayerClient) DeleteOne ¶
func (c *PlayerClient) DeleteOne(pl *Player) *PlayerDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*PlayerClient) DeleteOneID ¶
func (c *PlayerClient) DeleteOneID(id int) *PlayerDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*PlayerClient) GetX ¶
func (c *PlayerClient) GetX(ctx context.Context, id int) *Player
GetX is like Get, but panics if an error occurs.
func (*PlayerClient) Query ¶
func (c *PlayerClient) Query() *PlayerQuery
Query returns a query builder for Player.
func (*PlayerClient) QueryIdentifiers ¶
func (c *PlayerClient) QueryIdentifiers(pl *Player) *PlayerIdentifierQuery
QueryIdentifiers queries the identifiers edge of a Player.
func (*PlayerClient) QueryMetadata ¶
func (c *PlayerClient) QueryMetadata(pl *Player) *MetadataQuery
QueryMetadata queries the metadata edge of a Player.
func (*PlayerClient) QueryServers ¶
func (c *PlayerClient) QueryServers(pl *Player) *ServerQuery
QueryServers queries the servers edge of a Player.
func (*PlayerClient) QueryUser ¶
func (c *PlayerClient) QueryUser(pl *Player) *UserQuery
QueryUser queries the user edge of a Player.
func (*PlayerClient) Update ¶
func (c *PlayerClient) Update() *PlayerUpdate
Update returns an update builder for Player.
func (*PlayerClient) UpdateOne ¶
func (c *PlayerClient) UpdateOne(pl *Player) *PlayerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PlayerClient) UpdateOneID ¶
func (c *PlayerClient) UpdateOneID(id int) *PlayerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PlayerClient) Use ¶
func (c *PlayerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `player.Hooks(f(g(h())))`.
type PlayerConnection ¶
type PlayerConnection struct { Edges []*PlayerEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
PlayerConnection is the connection containing edges to Player.
type PlayerCreate ¶
type PlayerCreate struct {
// contains filtered or unexported fields
}
PlayerCreate is the builder for creating a Player entity.
func (*PlayerCreate) AddIdentifierIDs ¶
func (pc *PlayerCreate) AddIdentifierIDs(ids ...int) *PlayerCreate
AddIdentifierIDs adds the identifiers edge to PlayerIdentifier by ids.
func (*PlayerCreate) AddIdentifiers ¶
func (pc *PlayerCreate) AddIdentifiers(p ...*PlayerIdentifier) *PlayerCreate
AddIdentifiers adds the identifiers edges to PlayerIdentifier.
func (*PlayerCreate) AddServerIDs ¶
func (pc *PlayerCreate) AddServerIDs(ids ...int) *PlayerCreate
AddServerIDs adds the servers edge to Server by ids.
func (*PlayerCreate) AddServers ¶
func (pc *PlayerCreate) AddServers(s ...*Server) *PlayerCreate
AddServers adds the servers edges to Server.
func (*PlayerCreate) Mutation ¶
func (pc *PlayerCreate) Mutation() *PlayerMutation
Mutation returns the PlayerMutation object of the builder.
func (*PlayerCreate) Save ¶
func (pc *PlayerCreate) Save(ctx context.Context) (*Player, error)
Save creates the Player in the database.
func (*PlayerCreate) SaveX ¶
func (pc *PlayerCreate) SaveX(ctx context.Context) *Player
SaveX calls Save and panics if Save returns an error.
func (*PlayerCreate) SetCreatedAt ¶
func (pc *PlayerCreate) SetCreatedAt(t time.Time) *PlayerCreate
SetCreatedAt sets the created_at field.
func (*PlayerCreate) SetLastSeenAt ¶
func (pc *PlayerCreate) SetLastSeenAt(t time.Time) *PlayerCreate
SetLastSeenAt sets the last_seen_at field.
func (*PlayerCreate) SetMetadata ¶
func (pc *PlayerCreate) SetMetadata(m *Metadata) *PlayerCreate
SetMetadata sets the metadata edge to Metadata.
func (*PlayerCreate) SetMetadataID ¶
func (pc *PlayerCreate) SetMetadataID(id int) *PlayerCreate
SetMetadataID sets the metadata edge to Metadata by id.
func (*PlayerCreate) SetName ¶
func (pc *PlayerCreate) SetName(s string) *PlayerCreate
SetName sets the name field.
func (*PlayerCreate) SetNillableCreatedAt ¶
func (pc *PlayerCreate) SetNillableCreatedAt(t *time.Time) *PlayerCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*PlayerCreate) SetNillableLastSeenAt ¶
func (pc *PlayerCreate) SetNillableLastSeenAt(t *time.Time) *PlayerCreate
SetNillableLastSeenAt sets the last_seen_at field if the given value is not nil.
func (*PlayerCreate) SetNillableMetadataID ¶
func (pc *PlayerCreate) SetNillableMetadataID(id *int) *PlayerCreate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*PlayerCreate) SetNillableSessionEndedAt ¶
func (pc *PlayerCreate) SetNillableSessionEndedAt(t *time.Time) *PlayerCreate
SetNillableSessionEndedAt sets the session_ended_at field if the given value is not nil.
func (*PlayerCreate) SetNillableSessionStartedAt ¶
func (pc *PlayerCreate) SetNillableSessionStartedAt(t *time.Time) *PlayerCreate
SetNillableSessionStartedAt sets the session_started_at field if the given value is not nil.
func (*PlayerCreate) SetNillableTotalMinutes ¶
func (pc *PlayerCreate) SetNillableTotalMinutes(i *int) *PlayerCreate
SetNillableTotalMinutes sets the total_minutes field if the given value is not nil.
func (*PlayerCreate) SetNillableUpdatedAt ¶
func (pc *PlayerCreate) SetNillableUpdatedAt(t *time.Time) *PlayerCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*PlayerCreate) SetNillableUserID ¶
func (pc *PlayerCreate) SetNillableUserID(id *int) *PlayerCreate
SetNillableUserID sets the user edge to User by id if the given value is not nil.
func (*PlayerCreate) SetSessionEndedAt ¶
func (pc *PlayerCreate) SetSessionEndedAt(t time.Time) *PlayerCreate
SetSessionEndedAt sets the session_ended_at field.
func (*PlayerCreate) SetSessionStartedAt ¶
func (pc *PlayerCreate) SetSessionStartedAt(t time.Time) *PlayerCreate
SetSessionStartedAt sets the session_started_at field.
func (*PlayerCreate) SetTotalMinutes ¶
func (pc *PlayerCreate) SetTotalMinutes(i int) *PlayerCreate
SetTotalMinutes sets the total_minutes field.
func (*PlayerCreate) SetUpdatedAt ¶
func (pc *PlayerCreate) SetUpdatedAt(t time.Time) *PlayerCreate
SetUpdatedAt sets the updated_at field.
func (*PlayerCreate) SetUser ¶
func (pc *PlayerCreate) SetUser(u *User) *PlayerCreate
SetUser sets the user edge to User.
func (*PlayerCreate) SetUserID ¶
func (pc *PlayerCreate) SetUserID(id int) *PlayerCreate
SetUserID sets the user edge to User by id.
type PlayerCreateBulk ¶
type PlayerCreateBulk struct {
// contains filtered or unexported fields
}
PlayerCreateBulk is the builder for creating a bulk of Player entities.
type PlayerDelete ¶
type PlayerDelete struct {
// contains filtered or unexported fields
}
PlayerDelete is the builder for deleting a Player entity.
func (*PlayerDelete) Exec ¶
func (pd *PlayerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PlayerDelete) ExecX ¶
func (pd *PlayerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PlayerDelete) Where ¶
func (pd *PlayerDelete) Where(ps ...predicate.Player) *PlayerDelete
Where adds a new predicate to the delete builder.
type PlayerDeleteOne ¶
type PlayerDeleteOne struct {
// contains filtered or unexported fields
}
PlayerDeleteOne is the builder for deleting a single Player entity.
func (*PlayerDeleteOne) Exec ¶
func (pdo *PlayerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PlayerDeleteOne) ExecX ¶
func (pdo *PlayerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PlayerEdge ¶
PlayerEdge is the edge representation of Player.
type PlayerEdges ¶
type PlayerEdges struct { // Metadata holds the value of the metadata edge. Metadata *Metadata // Servers holds the value of the servers edge. Servers []*Server // User holds the value of the user edge. User *User // Identifiers holds the value of the identifiers edge. Identifiers []*PlayerIdentifier // contains filtered or unexported fields }
PlayerEdges holds the relations/edges for other nodes in the graph.
func (PlayerEdges) IdentifiersOrErr ¶
func (e PlayerEdges) IdentifiersOrErr() ([]*PlayerIdentifier, error)
IdentifiersOrErr returns the Identifiers value or an error if the edge was not loaded in eager-loading.
func (PlayerEdges) MetadataOrErr ¶
func (e PlayerEdges) MetadataOrErr() (*Metadata, error)
MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PlayerEdges) ServersOrErr ¶
func (e PlayerEdges) ServersOrErr() ([]*Server, error)
ServersOrErr returns the Servers value or an error if the edge was not loaded in eager-loading.
func (PlayerEdges) UserOrErr ¶
func (e PlayerEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PlayerGroupBy ¶
type PlayerGroupBy struct {
// contains filtered or unexported fields
}
PlayerGroupBy is the builder for group-by Player entities.
func (*PlayerGroupBy) Aggregate ¶
func (pgb *PlayerGroupBy) Aggregate(fns ...AggregateFunc) *PlayerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PlayerGroupBy) Bool ¶
func (pgb *PlayerGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*PlayerGroupBy) BoolX ¶
func (pgb *PlayerGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*PlayerGroupBy) Bools ¶
func (pgb *PlayerGroupBy) 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 (*PlayerGroupBy) BoolsX ¶
func (pgb *PlayerGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PlayerGroupBy) Float64 ¶
func (pgb *PlayerGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*PlayerGroupBy) Float64X ¶
func (pgb *PlayerGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*PlayerGroupBy) Float64s ¶
func (pgb *PlayerGroupBy) 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 (*PlayerGroupBy) Float64sX ¶
func (pgb *PlayerGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PlayerGroupBy) Int ¶
func (pgb *PlayerGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*PlayerGroupBy) IntX ¶
func (pgb *PlayerGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*PlayerGroupBy) Ints ¶
func (pgb *PlayerGroupBy) 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 (*PlayerGroupBy) IntsX ¶
func (pgb *PlayerGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PlayerGroupBy) Scan ¶
func (pgb *PlayerGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*PlayerGroupBy) ScanX ¶
func (pgb *PlayerGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*PlayerGroupBy) String ¶
func (pgb *PlayerGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*PlayerGroupBy) StringX ¶
func (pgb *PlayerGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type PlayerIdentifier ¶
type PlayerIdentifier struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // Identifier holds the value of the "identifier" field. Identifier string `json:"identifier,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PlayerIdentifierQuery when eager-loading is set. Edges PlayerIdentifierEdges `json:"edges"` // contains filtered or unexported fields }
PlayerIdentifier is the model entity for the PlayerIdentifier schema.
func (*PlayerIdentifier) Metadata ¶
func (pi *PlayerIdentifier) Metadata(ctx context.Context) (*Metadata, error)
func (*PlayerIdentifier) Node ¶
func (pi *PlayerIdentifier) Node(ctx context.Context) (node *Node, err error)
func (*PlayerIdentifier) Player ¶
func (pi *PlayerIdentifier) Player(ctx context.Context) (*Player, error)
func (*PlayerIdentifier) QueryMetadata ¶
func (pi *PlayerIdentifier) QueryMetadata() *MetadataQuery
QueryMetadata queries the metadata edge of the PlayerIdentifier.
func (*PlayerIdentifier) QueryPlayer ¶
func (pi *PlayerIdentifier) QueryPlayer() *PlayerQuery
QueryPlayer queries the player edge of the PlayerIdentifier.
func (*PlayerIdentifier) String ¶
func (pi *PlayerIdentifier) String() string
String implements the fmt.Stringer.
func (*PlayerIdentifier) ToEdge ¶
func (pi *PlayerIdentifier) ToEdge(order *PlayerIdentifierOrder) *PlayerIdentifierEdge
ToEdge converts PlayerIdentifier into PlayerIdentifierEdge.
func (*PlayerIdentifier) Unwrap ¶
func (pi *PlayerIdentifier) Unwrap() *PlayerIdentifier
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 (*PlayerIdentifier) Update ¶
func (pi *PlayerIdentifier) Update() *PlayerIdentifierUpdateOne
Update returns a builder for updating this PlayerIdentifier. Note that, you need to call PlayerIdentifier.Unwrap() before calling this method, if this PlayerIdentifier was returned from a transaction, and the transaction was committed or rolled back.
type PlayerIdentifierClient ¶
type PlayerIdentifierClient struct {
// contains filtered or unexported fields
}
PlayerIdentifierClient is a client for the PlayerIdentifier schema.
func NewPlayerIdentifierClient ¶
func NewPlayerIdentifierClient(c config) *PlayerIdentifierClient
NewPlayerIdentifierClient returns a client for the PlayerIdentifier from the given config.
func (*PlayerIdentifierClient) Create ¶
func (c *PlayerIdentifierClient) Create() *PlayerIdentifierCreate
Create returns a create builder for PlayerIdentifier.
func (*PlayerIdentifierClient) CreateBulk ¶
func (c *PlayerIdentifierClient) CreateBulk(builders ...*PlayerIdentifierCreate) *PlayerIdentifierCreateBulk
CreateBulk returns a builder for creating a bulk of PlayerIdentifier entities.
func (*PlayerIdentifierClient) Delete ¶
func (c *PlayerIdentifierClient) Delete() *PlayerIdentifierDelete
Delete returns a delete builder for PlayerIdentifier.
func (*PlayerIdentifierClient) DeleteOne ¶
func (c *PlayerIdentifierClient) DeleteOne(pi *PlayerIdentifier) *PlayerIdentifierDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*PlayerIdentifierClient) DeleteOneID ¶
func (c *PlayerIdentifierClient) DeleteOneID(id int) *PlayerIdentifierDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*PlayerIdentifierClient) Get ¶
func (c *PlayerIdentifierClient) Get(ctx context.Context, id int) (*PlayerIdentifier, error)
Get returns a PlayerIdentifier entity by its id.
func (*PlayerIdentifierClient) GetX ¶
func (c *PlayerIdentifierClient) GetX(ctx context.Context, id int) *PlayerIdentifier
GetX is like Get, but panics if an error occurs.
func (*PlayerIdentifierClient) Hooks ¶
func (c *PlayerIdentifierClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PlayerIdentifierClient) Query ¶
func (c *PlayerIdentifierClient) Query() *PlayerIdentifierQuery
Query returns a query builder for PlayerIdentifier.
func (*PlayerIdentifierClient) QueryMetadata ¶
func (c *PlayerIdentifierClient) QueryMetadata(pi *PlayerIdentifier) *MetadataQuery
QueryMetadata queries the metadata edge of a PlayerIdentifier.
func (*PlayerIdentifierClient) QueryPlayer ¶
func (c *PlayerIdentifierClient) QueryPlayer(pi *PlayerIdentifier) *PlayerQuery
QueryPlayer queries the player edge of a PlayerIdentifier.
func (*PlayerIdentifierClient) Update ¶
func (c *PlayerIdentifierClient) Update() *PlayerIdentifierUpdate
Update returns an update builder for PlayerIdentifier.
func (*PlayerIdentifierClient) UpdateOne ¶
func (c *PlayerIdentifierClient) UpdateOne(pi *PlayerIdentifier) *PlayerIdentifierUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PlayerIdentifierClient) UpdateOneID ¶
func (c *PlayerIdentifierClient) UpdateOneID(id int) *PlayerIdentifierUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PlayerIdentifierClient) Use ¶
func (c *PlayerIdentifierClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `playeridentifier.Hooks(f(g(h())))`.
type PlayerIdentifierConnection ¶
type PlayerIdentifierConnection struct { Edges []*PlayerIdentifierEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
PlayerIdentifierConnection is the connection containing edges to PlayerIdentifier.
type PlayerIdentifierCreate ¶
type PlayerIdentifierCreate struct {
// contains filtered or unexported fields
}
PlayerIdentifierCreate is the builder for creating a PlayerIdentifier entity.
func (*PlayerIdentifierCreate) Mutation ¶
func (pic *PlayerIdentifierCreate) Mutation() *PlayerIdentifierMutation
Mutation returns the PlayerIdentifierMutation object of the builder.
func (*PlayerIdentifierCreate) Save ¶
func (pic *PlayerIdentifierCreate) Save(ctx context.Context) (*PlayerIdentifier, error)
Save creates the PlayerIdentifier in the database.
func (*PlayerIdentifierCreate) SaveX ¶
func (pic *PlayerIdentifierCreate) SaveX(ctx context.Context) *PlayerIdentifier
SaveX calls Save and panics if Save returns an error.
func (*PlayerIdentifierCreate) SetCreatedAt ¶
func (pic *PlayerIdentifierCreate) SetCreatedAt(t time.Time) *PlayerIdentifierCreate
SetCreatedAt sets the created_at field.
func (*PlayerIdentifierCreate) SetIdentifier ¶
func (pic *PlayerIdentifierCreate) SetIdentifier(s string) *PlayerIdentifierCreate
SetIdentifier sets the identifier field.
func (*PlayerIdentifierCreate) SetMetadata ¶
func (pic *PlayerIdentifierCreate) SetMetadata(m *Metadata) *PlayerIdentifierCreate
SetMetadata sets the metadata edge to Metadata.
func (*PlayerIdentifierCreate) SetMetadataID ¶
func (pic *PlayerIdentifierCreate) SetMetadataID(id int) *PlayerIdentifierCreate
SetMetadataID sets the metadata edge to Metadata by id.
func (*PlayerIdentifierCreate) SetNillableCreatedAt ¶
func (pic *PlayerIdentifierCreate) SetNillableCreatedAt(t *time.Time) *PlayerIdentifierCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*PlayerIdentifierCreate) SetNillableMetadataID ¶
func (pic *PlayerIdentifierCreate) SetNillableMetadataID(id *int) *PlayerIdentifierCreate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*PlayerIdentifierCreate) SetNillablePlayerID ¶
func (pic *PlayerIdentifierCreate) SetNillablePlayerID(id *int) *PlayerIdentifierCreate
SetNillablePlayerID sets the player edge to Player by id if the given value is not nil.
func (*PlayerIdentifierCreate) SetNillableUpdatedAt ¶
func (pic *PlayerIdentifierCreate) SetNillableUpdatedAt(t *time.Time) *PlayerIdentifierCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*PlayerIdentifierCreate) SetPlayer ¶
func (pic *PlayerIdentifierCreate) SetPlayer(p *Player) *PlayerIdentifierCreate
SetPlayer sets the player edge to Player.
func (*PlayerIdentifierCreate) SetPlayerID ¶
func (pic *PlayerIdentifierCreate) SetPlayerID(id int) *PlayerIdentifierCreate
SetPlayerID sets the player edge to Player by id.
func (*PlayerIdentifierCreate) SetType ¶
func (pic *PlayerIdentifierCreate) SetType(s string) *PlayerIdentifierCreate
SetType sets the type field.
func (*PlayerIdentifierCreate) SetUpdatedAt ¶
func (pic *PlayerIdentifierCreate) SetUpdatedAt(t time.Time) *PlayerIdentifierCreate
SetUpdatedAt sets the updated_at field.
type PlayerIdentifierCreateBulk ¶
type PlayerIdentifierCreateBulk struct {
// contains filtered or unexported fields
}
PlayerIdentifierCreateBulk is the builder for creating a bulk of PlayerIdentifier entities.
func (*PlayerIdentifierCreateBulk) Save ¶
func (picb *PlayerIdentifierCreateBulk) Save(ctx context.Context) ([]*PlayerIdentifier, error)
Save creates the PlayerIdentifier entities in the database.
func (*PlayerIdentifierCreateBulk) SaveX ¶
func (picb *PlayerIdentifierCreateBulk) SaveX(ctx context.Context) []*PlayerIdentifier
SaveX calls Save and panics if Save returns an error.
type PlayerIdentifierDelete ¶
type PlayerIdentifierDelete struct {
// contains filtered or unexported fields
}
PlayerIdentifierDelete is the builder for deleting a PlayerIdentifier entity.
func (*PlayerIdentifierDelete) Exec ¶
func (pid *PlayerIdentifierDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PlayerIdentifierDelete) ExecX ¶
func (pid *PlayerIdentifierDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PlayerIdentifierDelete) Where ¶
func (pid *PlayerIdentifierDelete) Where(ps ...predicate.PlayerIdentifier) *PlayerIdentifierDelete
Where adds a new predicate to the delete builder.
type PlayerIdentifierDeleteOne ¶
type PlayerIdentifierDeleteOne struct {
// contains filtered or unexported fields
}
PlayerIdentifierDeleteOne is the builder for deleting a single PlayerIdentifier entity.
func (*PlayerIdentifierDeleteOne) Exec ¶
func (pido *PlayerIdentifierDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PlayerIdentifierDeleteOne) ExecX ¶
func (pido *PlayerIdentifierDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PlayerIdentifierEdge ¶
type PlayerIdentifierEdge struct { Node *PlayerIdentifier `json:"node"` Cursor Cursor `json:"cursor"` }
PlayerIdentifierEdge is the edge representation of PlayerIdentifier.
type PlayerIdentifierEdges ¶
type PlayerIdentifierEdges struct { // Metadata holds the value of the metadata edge. Metadata *Metadata // Player holds the value of the player edge. Player *Player // contains filtered or unexported fields }
PlayerIdentifierEdges holds the relations/edges for other nodes in the graph.
func (PlayerIdentifierEdges) MetadataOrErr ¶
func (e PlayerIdentifierEdges) MetadataOrErr() (*Metadata, error)
MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PlayerIdentifierEdges) PlayerOrErr ¶
func (e PlayerIdentifierEdges) PlayerOrErr() (*Player, error)
PlayerOrErr returns the Player value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PlayerIdentifierGroupBy ¶
type PlayerIdentifierGroupBy struct {
// contains filtered or unexported fields
}
PlayerIdentifierGroupBy is the builder for group-by PlayerIdentifier entities.
func (*PlayerIdentifierGroupBy) Aggregate ¶
func (pigb *PlayerIdentifierGroupBy) Aggregate(fns ...AggregateFunc) *PlayerIdentifierGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PlayerIdentifierGroupBy) Bool ¶
func (pigb *PlayerIdentifierGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*PlayerIdentifierGroupBy) BoolX ¶
func (pigb *PlayerIdentifierGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*PlayerIdentifierGroupBy) Bools ¶
func (pigb *PlayerIdentifierGroupBy) 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 (*PlayerIdentifierGroupBy) BoolsX ¶
func (pigb *PlayerIdentifierGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PlayerIdentifierGroupBy) Float64 ¶
func (pigb *PlayerIdentifierGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*PlayerIdentifierGroupBy) Float64X ¶
func (pigb *PlayerIdentifierGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*PlayerIdentifierGroupBy) Float64s ¶
func (pigb *PlayerIdentifierGroupBy) 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 (*PlayerIdentifierGroupBy) Float64sX ¶
func (pigb *PlayerIdentifierGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PlayerIdentifierGroupBy) Int ¶
func (pigb *PlayerIdentifierGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*PlayerIdentifierGroupBy) IntX ¶
func (pigb *PlayerIdentifierGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*PlayerIdentifierGroupBy) Ints ¶
func (pigb *PlayerIdentifierGroupBy) 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 (*PlayerIdentifierGroupBy) IntsX ¶
func (pigb *PlayerIdentifierGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PlayerIdentifierGroupBy) Scan ¶
func (pigb *PlayerIdentifierGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*PlayerIdentifierGroupBy) ScanX ¶
func (pigb *PlayerIdentifierGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*PlayerIdentifierGroupBy) String ¶
func (pigb *PlayerIdentifierGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*PlayerIdentifierGroupBy) StringX ¶
func (pigb *PlayerIdentifierGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type PlayerIdentifierMutation ¶
type PlayerIdentifierMutation struct {
// contains filtered or unexported fields
}
PlayerIdentifierMutation represents an operation that mutate the PlayerIdentifiers nodes in the graph.
func (*PlayerIdentifierMutation) AddField ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) AddedEdges ¶
func (m *PlayerIdentifierMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PlayerIdentifierMutation) AddedField ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) AddedFields ¶
func (m *PlayerIdentifierMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*PlayerIdentifierMutation) AddedIDs ¶
func (m *PlayerIdentifierMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*PlayerIdentifierMutation) ClearEdge ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) ClearField ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) ClearMetadata ¶
func (m *PlayerIdentifierMutation) ClearMetadata()
ClearMetadata clears the metadata edge to Metadata.
func (*PlayerIdentifierMutation) ClearPlayer ¶
func (m *PlayerIdentifierMutation) ClearPlayer()
ClearPlayer clears the player edge to Player.
func (*PlayerIdentifierMutation) ClearedEdges ¶
func (m *PlayerIdentifierMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PlayerIdentifierMutation) ClearedFields ¶
func (m *PlayerIdentifierMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PlayerIdentifierMutation) Client ¶
func (m PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) CreatedAt ¶
func (m *PlayerIdentifierMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*PlayerIdentifierMutation) EdgeCleared ¶
func (m *PlayerIdentifierMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*PlayerIdentifierMutation) Field ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) FieldCleared ¶
func (m *PlayerIdentifierMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*PlayerIdentifierMutation) Fields ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) GetType ¶
func (m *PlayerIdentifierMutation) GetType() (r string, exists bool)
GetType returns the type value in the mutation.
func (*PlayerIdentifierMutation) ID ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) Identifier ¶
func (m *PlayerIdentifierMutation) Identifier() (r string, exists bool)
Identifier returns the identifier value in the mutation.
func (*PlayerIdentifierMutation) MetadataCleared ¶
func (m *PlayerIdentifierMutation) MetadataCleared() bool
MetadataCleared returns if the edge metadata was cleared.
func (*PlayerIdentifierMutation) MetadataID ¶
func (m *PlayerIdentifierMutation) MetadataID() (id int, exists bool)
MetadataID returns the metadata id in the mutation.
func (*PlayerIdentifierMutation) MetadataIDs ¶
func (m *PlayerIdentifierMutation) MetadataIDs() (ids []int)
MetadataIDs returns the metadata ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use MetadataID instead. It exists only for internal usage by the builders.
func (*PlayerIdentifierMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the PlayerIdentifier. If the PlayerIdentifier object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerIdentifierMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*PlayerIdentifierMutation) OldIdentifier ¶
func (m *PlayerIdentifierMutation) OldIdentifier(ctx context.Context) (v string, err error)
OldIdentifier returns the old identifier value of the PlayerIdentifier. If the PlayerIdentifier object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerIdentifierMutation) OldType ¶
func (m *PlayerIdentifierMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old type value of the PlayerIdentifier. If the PlayerIdentifier object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerIdentifierMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the PlayerIdentifier. If the PlayerIdentifier object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerIdentifierMutation) Op ¶
func (m *PlayerIdentifierMutation) Op() Op
Op returns the operation name.
func (*PlayerIdentifierMutation) PlayerCleared ¶
func (m *PlayerIdentifierMutation) PlayerCleared() bool
PlayerCleared returns if the edge player was cleared.
func (*PlayerIdentifierMutation) PlayerID ¶
func (m *PlayerIdentifierMutation) PlayerID() (id int, exists bool)
PlayerID returns the player id in the mutation.
func (*PlayerIdentifierMutation) PlayerIDs ¶
func (m *PlayerIdentifierMutation) PlayerIDs() (ids []int)
PlayerIDs returns the player ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use PlayerID instead. It exists only for internal usage by the builders.
func (*PlayerIdentifierMutation) RemovedEdges ¶
func (m *PlayerIdentifierMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PlayerIdentifierMutation) RemovedIDs ¶
func (m *PlayerIdentifierMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*PlayerIdentifierMutation) ResetCreatedAt ¶
func (m *PlayerIdentifierMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*PlayerIdentifierMutation) ResetEdge ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) ResetField ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) ResetIdentifier ¶
func (m *PlayerIdentifierMutation) ResetIdentifier()
ResetIdentifier reset all changes of the "identifier" field.
func (*PlayerIdentifierMutation) ResetMetadata ¶
func (m *PlayerIdentifierMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" edge.
func (*PlayerIdentifierMutation) ResetPlayer ¶
func (m *PlayerIdentifierMutation) ResetPlayer()
ResetPlayer reset all changes of the "player" edge.
func (*PlayerIdentifierMutation) ResetType ¶
func (m *PlayerIdentifierMutation) ResetType()
ResetType reset all changes of the "type" field.
func (*PlayerIdentifierMutation) ResetUpdatedAt ¶
func (m *PlayerIdentifierMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*PlayerIdentifierMutation) SetCreatedAt ¶
func (m *PlayerIdentifierMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*PlayerIdentifierMutation) SetField ¶
func (m *PlayerIdentifierMutation) 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 (*PlayerIdentifierMutation) SetIdentifier ¶
func (m *PlayerIdentifierMutation) SetIdentifier(s string)
SetIdentifier sets the identifier field.
func (*PlayerIdentifierMutation) SetMetadataID ¶
func (m *PlayerIdentifierMutation) SetMetadataID(id int)
SetMetadataID sets the metadata edge to Metadata by id.
func (*PlayerIdentifierMutation) SetPlayerID ¶
func (m *PlayerIdentifierMutation) SetPlayerID(id int)
SetPlayerID sets the player edge to Player by id.
func (*PlayerIdentifierMutation) SetType ¶
func (m *PlayerIdentifierMutation) SetType(s string)
SetType sets the type field.
func (*PlayerIdentifierMutation) SetUpdatedAt ¶
func (m *PlayerIdentifierMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (PlayerIdentifierMutation) Tx ¶
func (m PlayerIdentifierMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PlayerIdentifierMutation) Type ¶
func (m *PlayerIdentifierMutation) Type() string
Type returns the node type of this mutation (PlayerIdentifier).
type PlayerIdentifierOrder ¶
type PlayerIdentifierOrder struct { Direction OrderDirection `json:"direction"` Field *PlayerIdentifierOrderField `json:"field"` }
PlayerIdentifierOrder defines the ordering of PlayerIdentifier.
type PlayerIdentifierOrderField ¶
type PlayerIdentifierOrderField struct {
// contains filtered or unexported fields
}
PlayerIdentifierOrderField defines the ordering field of PlayerIdentifier.
func (PlayerIdentifierOrderField) MarshalGQL ¶
func (f PlayerIdentifierOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (PlayerIdentifierOrderField) String ¶
func (f PlayerIdentifierOrderField) String() string
String implement fmt.Stringer interface.
func (*PlayerIdentifierOrderField) UnmarshalGQL ¶
func (f *PlayerIdentifierOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type PlayerIdentifierPaginateOption ¶
type PlayerIdentifierPaginateOption func(*playerIdentifierPager) error
PlayerIdentifierPaginateOption enables pagination customization.
func WithPlayerIdentifierFilter ¶
func WithPlayerIdentifierFilter(filter func(*PlayerIdentifierQuery) (*PlayerIdentifierQuery, error)) PlayerIdentifierPaginateOption
WithPlayerIdentifierFilter configures pagination filter.
func WithPlayerIdentifierOrder ¶
func WithPlayerIdentifierOrder(order *PlayerIdentifierOrder) PlayerIdentifierPaginateOption
WithPlayerIdentifierOrder configures pagination ordering.
type PlayerIdentifierQuery ¶
type PlayerIdentifierQuery struct {
// contains filtered or unexported fields
}
PlayerIdentifierQuery is the builder for querying PlayerIdentifier entities.
func (*PlayerIdentifierQuery) All ¶
func (piq *PlayerIdentifierQuery) All(ctx context.Context) ([]*PlayerIdentifier, error)
All executes the query and returns a list of PlayerIdentifiers.
func (*PlayerIdentifierQuery) AllX ¶
func (piq *PlayerIdentifierQuery) AllX(ctx context.Context) []*PlayerIdentifier
AllX is like All, but panics if an error occurs.
func (*PlayerIdentifierQuery) Clone ¶
func (piq *PlayerIdentifierQuery) Clone() *PlayerIdentifierQuery
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 (*PlayerIdentifierQuery) CollectFields ¶
func (pi *PlayerIdentifierQuery) CollectFields(ctx context.Context, satisfies ...string) *PlayerIdentifierQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*PlayerIdentifierQuery) Count ¶
func (piq *PlayerIdentifierQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PlayerIdentifierQuery) CountX ¶
func (piq *PlayerIdentifierQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PlayerIdentifierQuery) Exist ¶
func (piq *PlayerIdentifierQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PlayerIdentifierQuery) ExistX ¶
func (piq *PlayerIdentifierQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PlayerIdentifierQuery) First ¶
func (piq *PlayerIdentifierQuery) First(ctx context.Context) (*PlayerIdentifier, error)
First returns the first PlayerIdentifier entity in the query. Returns *NotFoundError when no playeridentifier was found.
func (*PlayerIdentifierQuery) FirstID ¶
func (piq *PlayerIdentifierQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PlayerIdentifier id in the query. Returns *NotFoundError when no id was found.
func (*PlayerIdentifierQuery) FirstIDX ¶
func (piq *PlayerIdentifierQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PlayerIdentifierQuery) FirstX ¶
func (piq *PlayerIdentifierQuery) FirstX(ctx context.Context) *PlayerIdentifier
FirstX is like First, but panics if an error occurs.
func (*PlayerIdentifierQuery) GroupBy ¶
func (piq *PlayerIdentifierQuery) GroupBy(field string, fields ...string) *PlayerIdentifierGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.PlayerIdentifier.Query(). GroupBy(playeridentifier.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PlayerIdentifierQuery) IDs ¶
func (piq *PlayerIdentifierQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of PlayerIdentifier ids.
func (*PlayerIdentifierQuery) IDsX ¶
func (piq *PlayerIdentifierQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PlayerIdentifierQuery) Limit ¶
func (piq *PlayerIdentifierQuery) Limit(limit int) *PlayerIdentifierQuery
Limit adds a limit step to the query.
func (*PlayerIdentifierQuery) Offset ¶
func (piq *PlayerIdentifierQuery) Offset(offset int) *PlayerIdentifierQuery
Offset adds an offset step to the query.
func (*PlayerIdentifierQuery) Only ¶
func (piq *PlayerIdentifierQuery) Only(ctx context.Context) (*PlayerIdentifier, error)
Only returns the only PlayerIdentifier entity in the query, returns an error if not exactly one entity was returned.
func (*PlayerIdentifierQuery) OnlyID ¶
func (piq *PlayerIdentifierQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only PlayerIdentifier id in the query, returns an error if not exactly one id was returned.
func (*PlayerIdentifierQuery) OnlyIDX ¶
func (piq *PlayerIdentifierQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PlayerIdentifierQuery) OnlyX ¶
func (piq *PlayerIdentifierQuery) OnlyX(ctx context.Context) *PlayerIdentifier
OnlyX is like Only, but panics if an error occurs.
func (*PlayerIdentifierQuery) Order ¶
func (piq *PlayerIdentifierQuery) Order(o ...OrderFunc) *PlayerIdentifierQuery
Order adds an order step to the query.
func (*PlayerIdentifierQuery) Paginate ¶
func (pi *PlayerIdentifierQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...PlayerIdentifierPaginateOption, ) (*PlayerIdentifierConnection, error)
Paginate executes the query and returns a relay based cursor connection to PlayerIdentifier.
func (*PlayerIdentifierQuery) QueryMetadata ¶
func (piq *PlayerIdentifierQuery) QueryMetadata() *MetadataQuery
QueryMetadata chains the current query on the metadata edge.
func (*PlayerIdentifierQuery) QueryPlayer ¶
func (piq *PlayerIdentifierQuery) QueryPlayer() *PlayerQuery
QueryPlayer chains the current query on the player edge.
func (*PlayerIdentifierQuery) Select ¶
func (piq *PlayerIdentifierQuery) Select(field string, fields ...string) *PlayerIdentifierSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.PlayerIdentifier.Query(). Select(playeridentifier.FieldCreatedAt). Scan(ctx, &v)
func (*PlayerIdentifierQuery) Where ¶
func (piq *PlayerIdentifierQuery) Where(ps ...predicate.PlayerIdentifier) *PlayerIdentifierQuery
Where adds a new predicate for the builder.
func (*PlayerIdentifierQuery) WithMetadata ¶
func (piq *PlayerIdentifierQuery) WithMetadata(opts ...func(*MetadataQuery)) *PlayerIdentifierQuery
WithMetadata tells the query-builder to eager-loads the nodes that are connected to
the "metadata" edge. The optional arguments used to configure the query builder of the edge.
func (*PlayerIdentifierQuery) WithPlayer ¶
func (piq *PlayerIdentifierQuery) WithPlayer(opts ...func(*PlayerQuery)) *PlayerIdentifierQuery
WithPlayer tells the query-builder to eager-loads the nodes that are connected to
the "player" edge. The optional arguments used to configure the query builder of the edge.
type PlayerIdentifierSelect ¶
type PlayerIdentifierSelect struct { *PlayerIdentifierQuery // contains filtered or unexported fields }
PlayerIdentifierSelect is the builder for select fields of PlayerIdentifier entities.
func (*PlayerIdentifierSelect) Bool ¶
func (pis *PlayerIdentifierSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*PlayerIdentifierSelect) BoolX ¶
func (pis *PlayerIdentifierSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*PlayerIdentifierSelect) Bools ¶
func (pis *PlayerIdentifierSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*PlayerIdentifierSelect) BoolsX ¶
func (pis *PlayerIdentifierSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PlayerIdentifierSelect) Float64 ¶
func (pis *PlayerIdentifierSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*PlayerIdentifierSelect) Float64X ¶
func (pis *PlayerIdentifierSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*PlayerIdentifierSelect) Float64s ¶
func (pis *PlayerIdentifierSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*PlayerIdentifierSelect) Float64sX ¶
func (pis *PlayerIdentifierSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PlayerIdentifierSelect) Int ¶
func (pis *PlayerIdentifierSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*PlayerIdentifierSelect) IntX ¶
func (pis *PlayerIdentifierSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*PlayerIdentifierSelect) Ints ¶
func (pis *PlayerIdentifierSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*PlayerIdentifierSelect) IntsX ¶
func (pis *PlayerIdentifierSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PlayerIdentifierSelect) Scan ¶
func (pis *PlayerIdentifierSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*PlayerIdentifierSelect) ScanX ¶
func (pis *PlayerIdentifierSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*PlayerIdentifierSelect) String ¶
func (pis *PlayerIdentifierSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*PlayerIdentifierSelect) StringX ¶
func (pis *PlayerIdentifierSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type PlayerIdentifierUpdate ¶
type PlayerIdentifierUpdate struct {
// contains filtered or unexported fields
}
PlayerIdentifierUpdate is the builder for updating PlayerIdentifier entities.
func (*PlayerIdentifierUpdate) ClearMetadata ¶
func (piu *PlayerIdentifierUpdate) ClearMetadata() *PlayerIdentifierUpdate
ClearMetadata clears the "metadata" edge to type Metadata.
func (*PlayerIdentifierUpdate) ClearPlayer ¶
func (piu *PlayerIdentifierUpdate) ClearPlayer() *PlayerIdentifierUpdate
ClearPlayer clears the "player" edge to type Player.
func (*PlayerIdentifierUpdate) Exec ¶
func (piu *PlayerIdentifierUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PlayerIdentifierUpdate) ExecX ¶
func (piu *PlayerIdentifierUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlayerIdentifierUpdate) Mutation ¶
func (piu *PlayerIdentifierUpdate) Mutation() *PlayerIdentifierMutation
Mutation returns the PlayerIdentifierMutation object of the builder.
func (*PlayerIdentifierUpdate) Save ¶
func (piu *PlayerIdentifierUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PlayerIdentifierUpdate) SaveX ¶
func (piu *PlayerIdentifierUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PlayerIdentifierUpdate) SetIdentifier ¶
func (piu *PlayerIdentifierUpdate) SetIdentifier(s string) *PlayerIdentifierUpdate
SetIdentifier sets the identifier field.
func (*PlayerIdentifierUpdate) SetMetadata ¶
func (piu *PlayerIdentifierUpdate) SetMetadata(m *Metadata) *PlayerIdentifierUpdate
SetMetadata sets the metadata edge to Metadata.
func (*PlayerIdentifierUpdate) SetMetadataID ¶
func (piu *PlayerIdentifierUpdate) SetMetadataID(id int) *PlayerIdentifierUpdate
SetMetadataID sets the metadata edge to Metadata by id.
func (*PlayerIdentifierUpdate) SetNillableMetadataID ¶
func (piu *PlayerIdentifierUpdate) SetNillableMetadataID(id *int) *PlayerIdentifierUpdate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*PlayerIdentifierUpdate) SetNillablePlayerID ¶
func (piu *PlayerIdentifierUpdate) SetNillablePlayerID(id *int) *PlayerIdentifierUpdate
SetNillablePlayerID sets the player edge to Player by id if the given value is not nil.
func (*PlayerIdentifierUpdate) SetPlayer ¶
func (piu *PlayerIdentifierUpdate) SetPlayer(p *Player) *PlayerIdentifierUpdate
SetPlayer sets the player edge to Player.
func (*PlayerIdentifierUpdate) SetPlayerID ¶
func (piu *PlayerIdentifierUpdate) SetPlayerID(id int) *PlayerIdentifierUpdate
SetPlayerID sets the player edge to Player by id.
func (*PlayerIdentifierUpdate) SetType ¶
func (piu *PlayerIdentifierUpdate) SetType(s string) *PlayerIdentifierUpdate
SetType sets the type field.
func (*PlayerIdentifierUpdate) SetUpdatedAt ¶
func (piu *PlayerIdentifierUpdate) SetUpdatedAt(t time.Time) *PlayerIdentifierUpdate
SetUpdatedAt sets the updated_at field.
func (*PlayerIdentifierUpdate) Where ¶
func (piu *PlayerIdentifierUpdate) Where(ps ...predicate.PlayerIdentifier) *PlayerIdentifierUpdate
Where adds a new predicate for the builder.
type PlayerIdentifierUpdateOne ¶
type PlayerIdentifierUpdateOne struct {
// contains filtered or unexported fields
}
PlayerIdentifierUpdateOne is the builder for updating a single PlayerIdentifier entity.
func (*PlayerIdentifierUpdateOne) ClearMetadata ¶
func (piuo *PlayerIdentifierUpdateOne) ClearMetadata() *PlayerIdentifierUpdateOne
ClearMetadata clears the "metadata" edge to type Metadata.
func (*PlayerIdentifierUpdateOne) ClearPlayer ¶
func (piuo *PlayerIdentifierUpdateOne) ClearPlayer() *PlayerIdentifierUpdateOne
ClearPlayer clears the "player" edge to type Player.
func (*PlayerIdentifierUpdateOne) Exec ¶
func (piuo *PlayerIdentifierUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PlayerIdentifierUpdateOne) ExecX ¶
func (piuo *PlayerIdentifierUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlayerIdentifierUpdateOne) Mutation ¶
func (piuo *PlayerIdentifierUpdateOne) Mutation() *PlayerIdentifierMutation
Mutation returns the PlayerIdentifierMutation object of the builder.
func (*PlayerIdentifierUpdateOne) Save ¶
func (piuo *PlayerIdentifierUpdateOne) Save(ctx context.Context) (*PlayerIdentifier, error)
Save executes the query and returns the updated entity.
func (*PlayerIdentifierUpdateOne) SaveX ¶
func (piuo *PlayerIdentifierUpdateOne) SaveX(ctx context.Context) *PlayerIdentifier
SaveX is like Save, but panics if an error occurs.
func (*PlayerIdentifierUpdateOne) SetIdentifier ¶
func (piuo *PlayerIdentifierUpdateOne) SetIdentifier(s string) *PlayerIdentifierUpdateOne
SetIdentifier sets the identifier field.
func (*PlayerIdentifierUpdateOne) SetMetadata ¶
func (piuo *PlayerIdentifierUpdateOne) SetMetadata(m *Metadata) *PlayerIdentifierUpdateOne
SetMetadata sets the metadata edge to Metadata.
func (*PlayerIdentifierUpdateOne) SetMetadataID ¶
func (piuo *PlayerIdentifierUpdateOne) SetMetadataID(id int) *PlayerIdentifierUpdateOne
SetMetadataID sets the metadata edge to Metadata by id.
func (*PlayerIdentifierUpdateOne) SetNillableMetadataID ¶
func (piuo *PlayerIdentifierUpdateOne) SetNillableMetadataID(id *int) *PlayerIdentifierUpdateOne
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*PlayerIdentifierUpdateOne) SetNillablePlayerID ¶
func (piuo *PlayerIdentifierUpdateOne) SetNillablePlayerID(id *int) *PlayerIdentifierUpdateOne
SetNillablePlayerID sets the player edge to Player by id if the given value is not nil.
func (*PlayerIdentifierUpdateOne) SetPlayer ¶
func (piuo *PlayerIdentifierUpdateOne) SetPlayer(p *Player) *PlayerIdentifierUpdateOne
SetPlayer sets the player edge to Player.
func (*PlayerIdentifierUpdateOne) SetPlayerID ¶
func (piuo *PlayerIdentifierUpdateOne) SetPlayerID(id int) *PlayerIdentifierUpdateOne
SetPlayerID sets the player edge to Player by id.
func (*PlayerIdentifierUpdateOne) SetType ¶
func (piuo *PlayerIdentifierUpdateOne) SetType(s string) *PlayerIdentifierUpdateOne
SetType sets the type field.
func (*PlayerIdentifierUpdateOne) SetUpdatedAt ¶
func (piuo *PlayerIdentifierUpdateOne) SetUpdatedAt(t time.Time) *PlayerIdentifierUpdateOne
SetUpdatedAt sets the updated_at field.
type PlayerIdentifiers ¶
type PlayerIdentifiers []*PlayerIdentifier
PlayerIdentifiers is a parsable slice of PlayerIdentifier.
type PlayerMutation ¶
type PlayerMutation struct {
// contains filtered or unexported fields
}
PlayerMutation represents an operation that mutate the Players nodes in the graph.
func (*PlayerMutation) AddField ¶
func (m *PlayerMutation) 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 (*PlayerMutation) AddIdentifierIDs ¶
func (m *PlayerMutation) AddIdentifierIDs(ids ...int)
AddIdentifierIDs adds the identifiers edge to PlayerIdentifier by ids.
func (*PlayerMutation) AddServerIDs ¶
func (m *PlayerMutation) AddServerIDs(ids ...int)
AddServerIDs adds the servers edge to Server by ids.
func (*PlayerMutation) AddTotalMinutes ¶
func (m *PlayerMutation) AddTotalMinutes(i int)
AddTotalMinutes adds i to total_minutes.
func (*PlayerMutation) AddedEdges ¶
func (m *PlayerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PlayerMutation) AddedField ¶
func (m *PlayerMutation) 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 (*PlayerMutation) AddedFields ¶
func (m *PlayerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*PlayerMutation) AddedIDs ¶
func (m *PlayerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*PlayerMutation) AddedTotalMinutes ¶
func (m *PlayerMutation) AddedTotalMinutes() (r int, exists bool)
AddedTotalMinutes returns the value that was added to the total_minutes field in this mutation.
func (*PlayerMutation) ClearEdge ¶
func (m *PlayerMutation) 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 (*PlayerMutation) ClearField ¶
func (m *PlayerMutation) 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 (*PlayerMutation) ClearIdentifiers ¶
func (m *PlayerMutation) ClearIdentifiers()
ClearIdentifiers clears the identifiers edge to PlayerIdentifier.
func (*PlayerMutation) ClearLastSeenAt ¶
func (m *PlayerMutation) ClearLastSeenAt()
ClearLastSeenAt clears the value of last_seen_at.
func (*PlayerMutation) ClearMetadata ¶
func (m *PlayerMutation) ClearMetadata()
ClearMetadata clears the metadata edge to Metadata.
func (*PlayerMutation) ClearServers ¶
func (m *PlayerMutation) ClearServers()
ClearServers clears the servers edge to Server.
func (*PlayerMutation) ClearSessionEndedAt ¶
func (m *PlayerMutation) ClearSessionEndedAt()
ClearSessionEndedAt clears the value of session_ended_at.
func (*PlayerMutation) ClearSessionStartedAt ¶
func (m *PlayerMutation) ClearSessionStartedAt()
ClearSessionStartedAt clears the value of session_started_at.
func (*PlayerMutation) ClearUser ¶
func (m *PlayerMutation) ClearUser()
ClearUser clears the user edge to User.
func (*PlayerMutation) ClearedEdges ¶
func (m *PlayerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PlayerMutation) ClearedFields ¶
func (m *PlayerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PlayerMutation) Client ¶
func (m PlayerMutation) 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 (*PlayerMutation) CreatedAt ¶
func (m *PlayerMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*PlayerMutation) EdgeCleared ¶
func (m *PlayerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*PlayerMutation) Field ¶
func (m *PlayerMutation) 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 (*PlayerMutation) FieldCleared ¶
func (m *PlayerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*PlayerMutation) Fields ¶
func (m *PlayerMutation) 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 (*PlayerMutation) ID ¶
func (m *PlayerMutation) 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 (*PlayerMutation) IdentifiersCleared ¶
func (m *PlayerMutation) IdentifiersCleared() bool
IdentifiersCleared returns if the edge identifiers was cleared.
func (*PlayerMutation) IdentifiersIDs ¶
func (m *PlayerMutation) IdentifiersIDs() (ids []int)
IdentifiersIDs returns the identifiers ids in the mutation.
func (*PlayerMutation) LastSeenAt ¶
func (m *PlayerMutation) LastSeenAt() (r time.Time, exists bool)
LastSeenAt returns the last_seen_at value in the mutation.
func (*PlayerMutation) LastSeenAtCleared ¶
func (m *PlayerMutation) LastSeenAtCleared() bool
LastSeenAtCleared returns if the field last_seen_at was cleared in this mutation.
func (*PlayerMutation) MetadataCleared ¶
func (m *PlayerMutation) MetadataCleared() bool
MetadataCleared returns if the edge metadata was cleared.
func (*PlayerMutation) MetadataID ¶
func (m *PlayerMutation) MetadataID() (id int, exists bool)
MetadataID returns the metadata id in the mutation.
func (*PlayerMutation) MetadataIDs ¶
func (m *PlayerMutation) MetadataIDs() (ids []int)
MetadataIDs returns the metadata ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use MetadataID instead. It exists only for internal usage by the builders.
func (*PlayerMutation) Name ¶
func (m *PlayerMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*PlayerMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the Player. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*PlayerMutation) OldLastSeenAt ¶
OldLastSeenAt returns the old last_seen_at value of the Player. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerMutation) OldName ¶
func (m *PlayerMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the Player. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerMutation) OldSessionEndedAt ¶
OldSessionEndedAt returns the old session_ended_at value of the Player. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerMutation) OldSessionStartedAt ¶
OldSessionStartedAt returns the old session_started_at value of the Player. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerMutation) OldTotalMinutes ¶
func (m *PlayerMutation) OldTotalMinutes(ctx context.Context) (v int, err error)
OldTotalMinutes returns the old total_minutes value of the Player. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the Player. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PlayerMutation) RemoveIdentifierIDs ¶
func (m *PlayerMutation) RemoveIdentifierIDs(ids ...int)
RemoveIdentifierIDs removes the identifiers edge to PlayerIdentifier by ids.
func (*PlayerMutation) RemoveServerIDs ¶
func (m *PlayerMutation) RemoveServerIDs(ids ...int)
RemoveServerIDs removes the servers edge to Server by ids.
func (*PlayerMutation) RemovedEdges ¶
func (m *PlayerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PlayerMutation) RemovedIDs ¶
func (m *PlayerMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*PlayerMutation) RemovedIdentifiersIDs ¶
func (m *PlayerMutation) RemovedIdentifiersIDs() (ids []int)
RemovedIdentifiers returns the removed ids of identifiers.
func (*PlayerMutation) RemovedServersIDs ¶
func (m *PlayerMutation) RemovedServersIDs() (ids []int)
RemovedServers returns the removed ids of servers.
func (*PlayerMutation) ResetCreatedAt ¶
func (m *PlayerMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*PlayerMutation) ResetEdge ¶
func (m *PlayerMutation) 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 (*PlayerMutation) ResetField ¶
func (m *PlayerMutation) 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 (*PlayerMutation) ResetIdentifiers ¶
func (m *PlayerMutation) ResetIdentifiers()
ResetIdentifiers reset all changes of the "identifiers" edge.
func (*PlayerMutation) ResetLastSeenAt ¶
func (m *PlayerMutation) ResetLastSeenAt()
ResetLastSeenAt reset all changes of the "last_seen_at" field.
func (*PlayerMutation) ResetMetadata ¶
func (m *PlayerMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" edge.
func (*PlayerMutation) ResetName ¶
func (m *PlayerMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*PlayerMutation) ResetServers ¶
func (m *PlayerMutation) ResetServers()
ResetServers reset all changes of the "servers" edge.
func (*PlayerMutation) ResetSessionEndedAt ¶
func (m *PlayerMutation) ResetSessionEndedAt()
ResetSessionEndedAt reset all changes of the "session_ended_at" field.
func (*PlayerMutation) ResetSessionStartedAt ¶
func (m *PlayerMutation) ResetSessionStartedAt()
ResetSessionStartedAt reset all changes of the "session_started_at" field.
func (*PlayerMutation) ResetTotalMinutes ¶
func (m *PlayerMutation) ResetTotalMinutes()
ResetTotalMinutes reset all changes of the "total_minutes" field.
func (*PlayerMutation) ResetUpdatedAt ¶
func (m *PlayerMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*PlayerMutation) ResetUser ¶
func (m *PlayerMutation) ResetUser()
ResetUser reset all changes of the "user" edge.
func (*PlayerMutation) ServersCleared ¶
func (m *PlayerMutation) ServersCleared() bool
ServersCleared returns if the edge servers was cleared.
func (*PlayerMutation) ServersIDs ¶
func (m *PlayerMutation) ServersIDs() (ids []int)
ServersIDs returns the servers ids in the mutation.
func (*PlayerMutation) SessionEndedAt ¶
func (m *PlayerMutation) SessionEndedAt() (r time.Time, exists bool)
SessionEndedAt returns the session_ended_at value in the mutation.
func (*PlayerMutation) SessionEndedAtCleared ¶
func (m *PlayerMutation) SessionEndedAtCleared() bool
SessionEndedAtCleared returns if the field session_ended_at was cleared in this mutation.
func (*PlayerMutation) SessionStartedAt ¶
func (m *PlayerMutation) SessionStartedAt() (r time.Time, exists bool)
SessionStartedAt returns the session_started_at value in the mutation.
func (*PlayerMutation) SessionStartedAtCleared ¶
func (m *PlayerMutation) SessionStartedAtCleared() bool
SessionStartedAtCleared returns if the field session_started_at was cleared in this mutation.
func (*PlayerMutation) SetCreatedAt ¶
func (m *PlayerMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*PlayerMutation) SetField ¶
func (m *PlayerMutation) 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 (*PlayerMutation) SetLastSeenAt ¶
func (m *PlayerMutation) SetLastSeenAt(t time.Time)
SetLastSeenAt sets the last_seen_at field.
func (*PlayerMutation) SetMetadataID ¶
func (m *PlayerMutation) SetMetadataID(id int)
SetMetadataID sets the metadata edge to Metadata by id.
func (*PlayerMutation) SetName ¶
func (m *PlayerMutation) SetName(s string)
SetName sets the name field.
func (*PlayerMutation) SetSessionEndedAt ¶
func (m *PlayerMutation) SetSessionEndedAt(t time.Time)
SetSessionEndedAt sets the session_ended_at field.
func (*PlayerMutation) SetSessionStartedAt ¶
func (m *PlayerMutation) SetSessionStartedAt(t time.Time)
SetSessionStartedAt sets the session_started_at field.
func (*PlayerMutation) SetTotalMinutes ¶
func (m *PlayerMutation) SetTotalMinutes(i int)
SetTotalMinutes sets the total_minutes field.
func (*PlayerMutation) SetUpdatedAt ¶
func (m *PlayerMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*PlayerMutation) SetUserID ¶
func (m *PlayerMutation) SetUserID(id int)
SetUserID sets the user edge to User by id.
func (*PlayerMutation) TotalMinutes ¶
func (m *PlayerMutation) TotalMinutes() (r int, exists bool)
TotalMinutes returns the total_minutes value in the mutation.
func (PlayerMutation) Tx ¶
func (m PlayerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PlayerMutation) Type ¶
func (m *PlayerMutation) Type() string
Type returns the node type of this mutation (Player).
func (*PlayerMutation) UpdatedAt ¶
func (m *PlayerMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*PlayerMutation) UserCleared ¶
func (m *PlayerMutation) UserCleared() bool
UserCleared returns if the edge user was cleared.
func (*PlayerMutation) UserID ¶
func (m *PlayerMutation) UserID() (id int, exists bool)
UserID returns the user id in the mutation.
func (*PlayerMutation) UserIDs ¶
func (m *PlayerMutation) UserIDs() (ids []int)
UserIDs returns the user ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
type PlayerOrder ¶
type PlayerOrder struct { Direction OrderDirection `json:"direction"` Field *PlayerOrderField `json:"field"` }
PlayerOrder defines the ordering of Player.
type PlayerOrderField ¶
type PlayerOrderField struct {
// contains filtered or unexported fields
}
PlayerOrderField defines the ordering field of Player.
func (PlayerOrderField) MarshalGQL ¶
func (f PlayerOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (PlayerOrderField) String ¶
func (f PlayerOrderField) String() string
String implement fmt.Stringer interface.
func (*PlayerOrderField) UnmarshalGQL ¶
func (f *PlayerOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type PlayerPaginateOption ¶
type PlayerPaginateOption func(*playerPager) error
PlayerPaginateOption enables pagination customization.
func WithPlayerFilter ¶
func WithPlayerFilter(filter func(*PlayerQuery) (*PlayerQuery, error)) PlayerPaginateOption
WithPlayerFilter configures pagination filter.
func WithPlayerOrder ¶
func WithPlayerOrder(order *PlayerOrder) PlayerPaginateOption
WithPlayerOrder configures pagination ordering.
type PlayerQuery ¶
type PlayerQuery struct {
// contains filtered or unexported fields
}
PlayerQuery is the builder for querying Player entities.
func (*PlayerQuery) All ¶
func (pq *PlayerQuery) All(ctx context.Context) ([]*Player, error)
All executes the query and returns a list of Players.
func (*PlayerQuery) AllX ¶
func (pq *PlayerQuery) AllX(ctx context.Context) []*Player
AllX is like All, but panics if an error occurs.
func (*PlayerQuery) Clone ¶
func (pq *PlayerQuery) Clone() *PlayerQuery
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 (*PlayerQuery) CollectFields ¶
func (pl *PlayerQuery) CollectFields(ctx context.Context, satisfies ...string) *PlayerQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*PlayerQuery) Count ¶
func (pq *PlayerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PlayerQuery) CountX ¶
func (pq *PlayerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PlayerQuery) Exist ¶
func (pq *PlayerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PlayerQuery) ExistX ¶
func (pq *PlayerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PlayerQuery) First ¶
func (pq *PlayerQuery) First(ctx context.Context) (*Player, error)
First returns the first Player entity in the query. Returns *NotFoundError when no player was found.
func (*PlayerQuery) FirstID ¶
func (pq *PlayerQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Player id in the query. Returns *NotFoundError when no id was found.
func (*PlayerQuery) FirstIDX ¶
func (pq *PlayerQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PlayerQuery) FirstX ¶
func (pq *PlayerQuery) FirstX(ctx context.Context) *Player
FirstX is like First, but panics if an error occurs.
func (*PlayerQuery) GroupBy ¶
func (pq *PlayerQuery) GroupBy(field string, fields ...string) *PlayerGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Player.Query(). GroupBy(player.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PlayerQuery) IDs ¶
func (pq *PlayerQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Player ids.
func (*PlayerQuery) IDsX ¶
func (pq *PlayerQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PlayerQuery) Limit ¶
func (pq *PlayerQuery) Limit(limit int) *PlayerQuery
Limit adds a limit step to the query.
func (*PlayerQuery) Offset ¶
func (pq *PlayerQuery) Offset(offset int) *PlayerQuery
Offset adds an offset step to the query.
func (*PlayerQuery) Only ¶
func (pq *PlayerQuery) Only(ctx context.Context) (*Player, error)
Only returns the only Player entity in the query, returns an error if not exactly one entity was returned.
func (*PlayerQuery) OnlyID ¶
func (pq *PlayerQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Player id in the query, returns an error if not exactly one id was returned.
func (*PlayerQuery) OnlyIDX ¶
func (pq *PlayerQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PlayerQuery) OnlyX ¶
func (pq *PlayerQuery) OnlyX(ctx context.Context) *Player
OnlyX is like Only, but panics if an error occurs.
func (*PlayerQuery) Order ¶
func (pq *PlayerQuery) Order(o ...OrderFunc) *PlayerQuery
Order adds an order step to the query.
func (*PlayerQuery) Paginate ¶
func (pl *PlayerQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...PlayerPaginateOption, ) (*PlayerConnection, error)
Paginate executes the query and returns a relay based cursor connection to Player.
func (*PlayerQuery) QueryIdentifiers ¶
func (pq *PlayerQuery) QueryIdentifiers() *PlayerIdentifierQuery
QueryIdentifiers chains the current query on the identifiers edge.
func (*PlayerQuery) QueryMetadata ¶
func (pq *PlayerQuery) QueryMetadata() *MetadataQuery
QueryMetadata chains the current query on the metadata edge.
func (*PlayerQuery) QueryServers ¶
func (pq *PlayerQuery) QueryServers() *ServerQuery
QueryServers chains the current query on the servers edge.
func (*PlayerQuery) QueryUser ¶
func (pq *PlayerQuery) QueryUser() *UserQuery
QueryUser chains the current query on the user edge.
func (*PlayerQuery) Select ¶
func (pq *PlayerQuery) Select(field string, fields ...string) *PlayerSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Player.Query(). Select(player.FieldCreatedAt). Scan(ctx, &v)
func (*PlayerQuery) Where ¶
func (pq *PlayerQuery) Where(ps ...predicate.Player) *PlayerQuery
Where adds a new predicate for the builder.
func (*PlayerQuery) WithIdentifiers ¶
func (pq *PlayerQuery) WithIdentifiers(opts ...func(*PlayerIdentifierQuery)) *PlayerQuery
WithIdentifiers tells the query-builder to eager-loads the nodes that are connected to
the "identifiers" edge. The optional arguments used to configure the query builder of the edge.
func (*PlayerQuery) WithMetadata ¶
func (pq *PlayerQuery) WithMetadata(opts ...func(*MetadataQuery)) *PlayerQuery
WithMetadata tells the query-builder to eager-loads the nodes that are connected to
the "metadata" edge. The optional arguments used to configure the query builder of the edge.
func (*PlayerQuery) WithServers ¶
func (pq *PlayerQuery) WithServers(opts ...func(*ServerQuery)) *PlayerQuery
WithServers tells the query-builder to eager-loads the nodes that are connected to
the "servers" edge. The optional arguments used to configure the query builder of the edge.
func (*PlayerQuery) WithUser ¶
func (pq *PlayerQuery) WithUser(opts ...func(*UserQuery)) *PlayerQuery
WithUser tells the query-builder to eager-loads the nodes that are connected to
the "user" edge. The optional arguments used to configure the query builder of the edge.
type PlayerSelect ¶
type PlayerSelect struct { *PlayerQuery // contains filtered or unexported fields }
PlayerSelect is the builder for select fields of Player entities.
func (*PlayerSelect) Bool ¶
func (ps *PlayerSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*PlayerSelect) BoolX ¶
func (ps *PlayerSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*PlayerSelect) Bools ¶
func (ps *PlayerSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*PlayerSelect) BoolsX ¶
func (ps *PlayerSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PlayerSelect) Float64 ¶
func (ps *PlayerSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*PlayerSelect) Float64X ¶
func (ps *PlayerSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*PlayerSelect) Float64s ¶
func (ps *PlayerSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*PlayerSelect) Float64sX ¶
func (ps *PlayerSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PlayerSelect) Int ¶
func (ps *PlayerSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*PlayerSelect) IntX ¶
func (ps *PlayerSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*PlayerSelect) Ints ¶
func (ps *PlayerSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*PlayerSelect) IntsX ¶
func (ps *PlayerSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PlayerSelect) Scan ¶
func (ps *PlayerSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*PlayerSelect) ScanX ¶
func (ps *PlayerSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*PlayerSelect) String ¶
func (ps *PlayerSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*PlayerSelect) StringX ¶
func (ps *PlayerSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type PlayerUpdate ¶
type PlayerUpdate struct {
// contains filtered or unexported fields
}
PlayerUpdate is the builder for updating Player entities.
func (*PlayerUpdate) AddIdentifierIDs ¶
func (pu *PlayerUpdate) AddIdentifierIDs(ids ...int) *PlayerUpdate
AddIdentifierIDs adds the identifiers edge to PlayerIdentifier by ids.
func (*PlayerUpdate) AddIdentifiers ¶
func (pu *PlayerUpdate) AddIdentifiers(p ...*PlayerIdentifier) *PlayerUpdate
AddIdentifiers adds the identifiers edges to PlayerIdentifier.
func (*PlayerUpdate) AddServerIDs ¶
func (pu *PlayerUpdate) AddServerIDs(ids ...int) *PlayerUpdate
AddServerIDs adds the servers edge to Server by ids.
func (*PlayerUpdate) AddServers ¶
func (pu *PlayerUpdate) AddServers(s ...*Server) *PlayerUpdate
AddServers adds the servers edges to Server.
func (*PlayerUpdate) AddTotalMinutes ¶
func (pu *PlayerUpdate) AddTotalMinutes(i int) *PlayerUpdate
AddTotalMinutes adds i to total_minutes.
func (*PlayerUpdate) ClearIdentifiers ¶
func (pu *PlayerUpdate) ClearIdentifiers() *PlayerUpdate
ClearIdentifiers clears all "identifiers" edges to type PlayerIdentifier.
func (*PlayerUpdate) ClearLastSeenAt ¶
func (pu *PlayerUpdate) ClearLastSeenAt() *PlayerUpdate
ClearLastSeenAt clears the value of last_seen_at.
func (*PlayerUpdate) ClearMetadata ¶
func (pu *PlayerUpdate) ClearMetadata() *PlayerUpdate
ClearMetadata clears the "metadata" edge to type Metadata.
func (*PlayerUpdate) ClearServers ¶
func (pu *PlayerUpdate) ClearServers() *PlayerUpdate
ClearServers clears all "servers" edges to type Server.
func (*PlayerUpdate) ClearSessionEndedAt ¶
func (pu *PlayerUpdate) ClearSessionEndedAt() *PlayerUpdate
ClearSessionEndedAt clears the value of session_ended_at.
func (*PlayerUpdate) ClearSessionStartedAt ¶
func (pu *PlayerUpdate) ClearSessionStartedAt() *PlayerUpdate
ClearSessionStartedAt clears the value of session_started_at.
func (*PlayerUpdate) ClearUser ¶
func (pu *PlayerUpdate) ClearUser() *PlayerUpdate
ClearUser clears the "user" edge to type User.
func (*PlayerUpdate) Exec ¶
func (pu *PlayerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PlayerUpdate) ExecX ¶
func (pu *PlayerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlayerUpdate) Mutation ¶
func (pu *PlayerUpdate) Mutation() *PlayerMutation
Mutation returns the PlayerMutation object of the builder.
func (*PlayerUpdate) RemoveIdentifierIDs ¶
func (pu *PlayerUpdate) RemoveIdentifierIDs(ids ...int) *PlayerUpdate
RemoveIdentifierIDs removes the identifiers edge to PlayerIdentifier by ids.
func (*PlayerUpdate) RemoveIdentifiers ¶
func (pu *PlayerUpdate) RemoveIdentifiers(p ...*PlayerIdentifier) *PlayerUpdate
RemoveIdentifiers removes identifiers edges to PlayerIdentifier.
func (*PlayerUpdate) RemoveServerIDs ¶
func (pu *PlayerUpdate) RemoveServerIDs(ids ...int) *PlayerUpdate
RemoveServerIDs removes the servers edge to Server by ids.
func (*PlayerUpdate) RemoveServers ¶
func (pu *PlayerUpdate) RemoveServers(s ...*Server) *PlayerUpdate
RemoveServers removes servers edges to Server.
func (*PlayerUpdate) Save ¶
func (pu *PlayerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PlayerUpdate) SaveX ¶
func (pu *PlayerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PlayerUpdate) SetLastSeenAt ¶
func (pu *PlayerUpdate) SetLastSeenAt(t time.Time) *PlayerUpdate
SetLastSeenAt sets the last_seen_at field.
func (*PlayerUpdate) SetMetadata ¶
func (pu *PlayerUpdate) SetMetadata(m *Metadata) *PlayerUpdate
SetMetadata sets the metadata edge to Metadata.
func (*PlayerUpdate) SetMetadataID ¶
func (pu *PlayerUpdate) SetMetadataID(id int) *PlayerUpdate
SetMetadataID sets the metadata edge to Metadata by id.
func (*PlayerUpdate) SetName ¶
func (pu *PlayerUpdate) SetName(s string) *PlayerUpdate
SetName sets the name field.
func (*PlayerUpdate) SetNillableLastSeenAt ¶
func (pu *PlayerUpdate) SetNillableLastSeenAt(t *time.Time) *PlayerUpdate
SetNillableLastSeenAt sets the last_seen_at field if the given value is not nil.
func (*PlayerUpdate) SetNillableMetadataID ¶
func (pu *PlayerUpdate) SetNillableMetadataID(id *int) *PlayerUpdate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*PlayerUpdate) SetNillableSessionEndedAt ¶
func (pu *PlayerUpdate) SetNillableSessionEndedAt(t *time.Time) *PlayerUpdate
SetNillableSessionEndedAt sets the session_ended_at field if the given value is not nil.
func (*PlayerUpdate) SetNillableSessionStartedAt ¶
func (pu *PlayerUpdate) SetNillableSessionStartedAt(t *time.Time) *PlayerUpdate
SetNillableSessionStartedAt sets the session_started_at field if the given value is not nil.
func (*PlayerUpdate) SetNillableTotalMinutes ¶
func (pu *PlayerUpdate) SetNillableTotalMinutes(i *int) *PlayerUpdate
SetNillableTotalMinutes sets the total_minutes field if the given value is not nil.
func (*PlayerUpdate) SetNillableUserID ¶
func (pu *PlayerUpdate) SetNillableUserID(id *int) *PlayerUpdate
SetNillableUserID sets the user edge to User by id if the given value is not nil.
func (*PlayerUpdate) SetSessionEndedAt ¶
func (pu *PlayerUpdate) SetSessionEndedAt(t time.Time) *PlayerUpdate
SetSessionEndedAt sets the session_ended_at field.
func (*PlayerUpdate) SetSessionStartedAt ¶
func (pu *PlayerUpdate) SetSessionStartedAt(t time.Time) *PlayerUpdate
SetSessionStartedAt sets the session_started_at field.
func (*PlayerUpdate) SetTotalMinutes ¶
func (pu *PlayerUpdate) SetTotalMinutes(i int) *PlayerUpdate
SetTotalMinutes sets the total_minutes field.
func (*PlayerUpdate) SetUpdatedAt ¶
func (pu *PlayerUpdate) SetUpdatedAt(t time.Time) *PlayerUpdate
SetUpdatedAt sets the updated_at field.
func (*PlayerUpdate) SetUser ¶
func (pu *PlayerUpdate) SetUser(u *User) *PlayerUpdate
SetUser sets the user edge to User.
func (*PlayerUpdate) SetUserID ¶
func (pu *PlayerUpdate) SetUserID(id int) *PlayerUpdate
SetUserID sets the user edge to User by id.
func (*PlayerUpdate) Where ¶
func (pu *PlayerUpdate) Where(ps ...predicate.Player) *PlayerUpdate
Where adds a new predicate for the builder.
type PlayerUpdateOne ¶
type PlayerUpdateOne struct {
// contains filtered or unexported fields
}
PlayerUpdateOne is the builder for updating a single Player entity.
func (*PlayerUpdateOne) AddIdentifierIDs ¶
func (puo *PlayerUpdateOne) AddIdentifierIDs(ids ...int) *PlayerUpdateOne
AddIdentifierIDs adds the identifiers edge to PlayerIdentifier by ids.
func (*PlayerUpdateOne) AddIdentifiers ¶
func (puo *PlayerUpdateOne) AddIdentifiers(p ...*PlayerIdentifier) *PlayerUpdateOne
AddIdentifiers adds the identifiers edges to PlayerIdentifier.
func (*PlayerUpdateOne) AddServerIDs ¶
func (puo *PlayerUpdateOne) AddServerIDs(ids ...int) *PlayerUpdateOne
AddServerIDs adds the servers edge to Server by ids.
func (*PlayerUpdateOne) AddServers ¶
func (puo *PlayerUpdateOne) AddServers(s ...*Server) *PlayerUpdateOne
AddServers adds the servers edges to Server.
func (*PlayerUpdateOne) AddTotalMinutes ¶
func (puo *PlayerUpdateOne) AddTotalMinutes(i int) *PlayerUpdateOne
AddTotalMinutes adds i to total_minutes.
func (*PlayerUpdateOne) ClearIdentifiers ¶
func (puo *PlayerUpdateOne) ClearIdentifiers() *PlayerUpdateOne
ClearIdentifiers clears all "identifiers" edges to type PlayerIdentifier.
func (*PlayerUpdateOne) ClearLastSeenAt ¶
func (puo *PlayerUpdateOne) ClearLastSeenAt() *PlayerUpdateOne
ClearLastSeenAt clears the value of last_seen_at.
func (*PlayerUpdateOne) ClearMetadata ¶
func (puo *PlayerUpdateOne) ClearMetadata() *PlayerUpdateOne
ClearMetadata clears the "metadata" edge to type Metadata.
func (*PlayerUpdateOne) ClearServers ¶
func (puo *PlayerUpdateOne) ClearServers() *PlayerUpdateOne
ClearServers clears all "servers" edges to type Server.
func (*PlayerUpdateOne) ClearSessionEndedAt ¶
func (puo *PlayerUpdateOne) ClearSessionEndedAt() *PlayerUpdateOne
ClearSessionEndedAt clears the value of session_ended_at.
func (*PlayerUpdateOne) ClearSessionStartedAt ¶
func (puo *PlayerUpdateOne) ClearSessionStartedAt() *PlayerUpdateOne
ClearSessionStartedAt clears the value of session_started_at.
func (*PlayerUpdateOne) ClearUser ¶
func (puo *PlayerUpdateOne) ClearUser() *PlayerUpdateOne
ClearUser clears the "user" edge to type User.
func (*PlayerUpdateOne) Exec ¶
func (puo *PlayerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PlayerUpdateOne) ExecX ¶
func (puo *PlayerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlayerUpdateOne) Mutation ¶
func (puo *PlayerUpdateOne) Mutation() *PlayerMutation
Mutation returns the PlayerMutation object of the builder.
func (*PlayerUpdateOne) RemoveIdentifierIDs ¶
func (puo *PlayerUpdateOne) RemoveIdentifierIDs(ids ...int) *PlayerUpdateOne
RemoveIdentifierIDs removes the identifiers edge to PlayerIdentifier by ids.
func (*PlayerUpdateOne) RemoveIdentifiers ¶
func (puo *PlayerUpdateOne) RemoveIdentifiers(p ...*PlayerIdentifier) *PlayerUpdateOne
RemoveIdentifiers removes identifiers edges to PlayerIdentifier.
func (*PlayerUpdateOne) RemoveServerIDs ¶
func (puo *PlayerUpdateOne) RemoveServerIDs(ids ...int) *PlayerUpdateOne
RemoveServerIDs removes the servers edge to Server by ids.
func (*PlayerUpdateOne) RemoveServers ¶
func (puo *PlayerUpdateOne) RemoveServers(s ...*Server) *PlayerUpdateOne
RemoveServers removes servers edges to Server.
func (*PlayerUpdateOne) Save ¶
func (puo *PlayerUpdateOne) Save(ctx context.Context) (*Player, error)
Save executes the query and returns the updated entity.
func (*PlayerUpdateOne) SaveX ¶
func (puo *PlayerUpdateOne) SaveX(ctx context.Context) *Player
SaveX is like Save, but panics if an error occurs.
func (*PlayerUpdateOne) SetLastSeenAt ¶
func (puo *PlayerUpdateOne) SetLastSeenAt(t time.Time) *PlayerUpdateOne
SetLastSeenAt sets the last_seen_at field.
func (*PlayerUpdateOne) SetMetadata ¶
func (puo *PlayerUpdateOne) SetMetadata(m *Metadata) *PlayerUpdateOne
SetMetadata sets the metadata edge to Metadata.
func (*PlayerUpdateOne) SetMetadataID ¶
func (puo *PlayerUpdateOne) SetMetadataID(id int) *PlayerUpdateOne
SetMetadataID sets the metadata edge to Metadata by id.
func (*PlayerUpdateOne) SetName ¶
func (puo *PlayerUpdateOne) SetName(s string) *PlayerUpdateOne
SetName sets the name field.
func (*PlayerUpdateOne) SetNillableLastSeenAt ¶
func (puo *PlayerUpdateOne) SetNillableLastSeenAt(t *time.Time) *PlayerUpdateOne
SetNillableLastSeenAt sets the last_seen_at field if the given value is not nil.
func (*PlayerUpdateOne) SetNillableMetadataID ¶
func (puo *PlayerUpdateOne) SetNillableMetadataID(id *int) *PlayerUpdateOne
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*PlayerUpdateOne) SetNillableSessionEndedAt ¶
func (puo *PlayerUpdateOne) SetNillableSessionEndedAt(t *time.Time) *PlayerUpdateOne
SetNillableSessionEndedAt sets the session_ended_at field if the given value is not nil.
func (*PlayerUpdateOne) SetNillableSessionStartedAt ¶
func (puo *PlayerUpdateOne) SetNillableSessionStartedAt(t *time.Time) *PlayerUpdateOne
SetNillableSessionStartedAt sets the session_started_at field if the given value is not nil.
func (*PlayerUpdateOne) SetNillableTotalMinutes ¶
func (puo *PlayerUpdateOne) SetNillableTotalMinutes(i *int) *PlayerUpdateOne
SetNillableTotalMinutes sets the total_minutes field if the given value is not nil.
func (*PlayerUpdateOne) SetNillableUserID ¶
func (puo *PlayerUpdateOne) SetNillableUserID(id *int) *PlayerUpdateOne
SetNillableUserID sets the user edge to User by id if the given value is not nil.
func (*PlayerUpdateOne) SetSessionEndedAt ¶
func (puo *PlayerUpdateOne) SetSessionEndedAt(t time.Time) *PlayerUpdateOne
SetSessionEndedAt sets the session_ended_at field.
func (*PlayerUpdateOne) SetSessionStartedAt ¶
func (puo *PlayerUpdateOne) SetSessionStartedAt(t time.Time) *PlayerUpdateOne
SetSessionStartedAt sets the session_started_at field.
func (*PlayerUpdateOne) SetTotalMinutes ¶
func (puo *PlayerUpdateOne) SetTotalMinutes(i int) *PlayerUpdateOne
SetTotalMinutes sets the total_minutes field.
func (*PlayerUpdateOne) SetUpdatedAt ¶
func (puo *PlayerUpdateOne) SetUpdatedAt(t time.Time) *PlayerUpdateOne
SetUpdatedAt sets the updated_at field.
func (*PlayerUpdateOne) SetUser ¶
func (puo *PlayerUpdateOne) SetUser(u *User) *PlayerUpdateOne
SetUser sets the user edge to User.
func (*PlayerUpdateOne) SetUserID ¶
func (puo *PlayerUpdateOne) SetUserID(id int) *PlayerUpdateOne
SetUserID sets the user edge to User by id.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollbacker method.
type Server ¶
type Server struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // APIUsername holds the value of the "api_username" field. APIUsername *string `json:"api_username,omitempty"` // APISecret holds the value of the "api_secret" field. APISecret *string `json:"api_secret,omitempty"` // APIAddress holds the value of the "api_address" field. APIAddress *string `json:"api_address,omitempty"` // APIPort holds the value of the "api_port" field. APIPort *string `json:"api_port,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ServerQuery when eager-loading is set. Edges ServerEdges `json:"edges"` // contains filtered or unexported fields }
Server is the model entity for the Server schema.
func (*Server) QueryMapType ¶
func (s *Server) QueryMapType() *MapTypeQuery
QueryMapType queries the map_type edge of the Server.
func (*Server) QueryMetadata ¶
func (s *Server) QueryMetadata() *MetadataQuery
QueryMetadata queries the metadata edge of the Server.
func (*Server) QueryPlayers ¶
func (s *Server) QueryPlayers() *PlayerQuery
QueryPlayers queries the players edge of the Server.
func (*Server) QueryServerType ¶
func (s *Server) QueryServerType() *ServerTypeQuery
QueryServerType queries the server_type edge of the Server.
func (*Server) ServerType ¶
func (s *Server) ServerType(ctx context.Context) (*ServerType, error)
func (*Server) ToEdge ¶
func (s *Server) ToEdge(order *ServerOrder) *ServerEdge
ToEdge converts Server into ServerEdge.
func (*Server) 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 (*Server) Update ¶
func (s *Server) Update() *ServerUpdateOne
Update returns a builder for updating this Server. Note that, you need to call Server.Unwrap() before calling this method, if this Server was returned from a transaction, and the transaction was committed or rolled back.
type ServerClient ¶
type ServerClient struct {
// contains filtered or unexported fields
}
ServerClient is a client for the Server schema.
func NewServerClient ¶
func NewServerClient(c config) *ServerClient
NewServerClient returns a client for the Server from the given config.
func (*ServerClient) Create ¶
func (c *ServerClient) Create() *ServerCreate
Create returns a create builder for Server.
func (*ServerClient) CreateBulk ¶
func (c *ServerClient) CreateBulk(builders ...*ServerCreate) *ServerCreateBulk
CreateBulk returns a builder for creating a bulk of Server entities.
func (*ServerClient) Delete ¶
func (c *ServerClient) Delete() *ServerDelete
Delete returns a delete builder for Server.
func (*ServerClient) DeleteOne ¶
func (c *ServerClient) DeleteOne(s *Server) *ServerDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ServerClient) DeleteOneID ¶
func (c *ServerClient) DeleteOneID(id int) *ServerDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ServerClient) GetX ¶
func (c *ServerClient) GetX(ctx context.Context, id int) *Server
GetX is like Get, but panics if an error occurs.
func (*ServerClient) Query ¶
func (c *ServerClient) Query() *ServerQuery
Query returns a query builder for Server.
func (*ServerClient) QueryMapType ¶
func (c *ServerClient) QueryMapType(s *Server) *MapTypeQuery
QueryMapType queries the map_type edge of a Server.
func (*ServerClient) QueryMetadata ¶
func (c *ServerClient) QueryMetadata(s *Server) *MetadataQuery
QueryMetadata queries the metadata edge of a Server.
func (*ServerClient) QueryPlayers ¶
func (c *ServerClient) QueryPlayers(s *Server) *PlayerQuery
QueryPlayers queries the players edge of a Server.
func (*ServerClient) QueryServerType ¶
func (c *ServerClient) QueryServerType(s *Server) *ServerTypeQuery
QueryServerType queries the server_type edge of a Server.
func (*ServerClient) Update ¶
func (c *ServerClient) Update() *ServerUpdate
Update returns an update builder for Server.
func (*ServerClient) UpdateOne ¶
func (c *ServerClient) UpdateOne(s *Server) *ServerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ServerClient) UpdateOneID ¶
func (c *ServerClient) UpdateOneID(id int) *ServerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ServerClient) Use ¶
func (c *ServerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `server.Hooks(f(g(h())))`.
type ServerConnection ¶
type ServerConnection struct { Edges []*ServerEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
ServerConnection is the connection containing edges to Server.
type ServerCreate ¶
type ServerCreate struct {
// contains filtered or unexported fields
}
ServerCreate is the builder for creating a Server entity.
func (*ServerCreate) AddPlayerIDs ¶
func (sc *ServerCreate) AddPlayerIDs(ids ...int) *ServerCreate
AddPlayerIDs adds the players edge to Player by ids.
func (*ServerCreate) AddPlayers ¶
func (sc *ServerCreate) AddPlayers(p ...*Player) *ServerCreate
AddPlayers adds the players edges to Player.
func (*ServerCreate) Mutation ¶
func (sc *ServerCreate) Mutation() *ServerMutation
Mutation returns the ServerMutation object of the builder.
func (*ServerCreate) Save ¶
func (sc *ServerCreate) Save(ctx context.Context) (*Server, error)
Save creates the Server in the database.
func (*ServerCreate) SaveX ¶
func (sc *ServerCreate) SaveX(ctx context.Context) *Server
SaveX calls Save and panics if Save returns an error.
func (*ServerCreate) SetAPIAddress ¶
func (sc *ServerCreate) SetAPIAddress(s string) *ServerCreate
SetAPIAddress sets the api_address field.
func (*ServerCreate) SetAPIPort ¶
func (sc *ServerCreate) SetAPIPort(s string) *ServerCreate
SetAPIPort sets the api_port field.
func (*ServerCreate) SetAPISecret ¶
func (sc *ServerCreate) SetAPISecret(s string) *ServerCreate
SetAPISecret sets the api_secret field.
func (*ServerCreate) SetAPIUsername ¶
func (sc *ServerCreate) SetAPIUsername(s string) *ServerCreate
SetAPIUsername sets the api_username field.
func (*ServerCreate) SetCreatedAt ¶
func (sc *ServerCreate) SetCreatedAt(t time.Time) *ServerCreate
SetCreatedAt sets the created_at field.
func (*ServerCreate) SetMapType ¶
func (sc *ServerCreate) SetMapType(m *MapType) *ServerCreate
SetMapType sets the map_type edge to MapType.
func (*ServerCreate) SetMapTypeID ¶
func (sc *ServerCreate) SetMapTypeID(id int) *ServerCreate
SetMapTypeID sets the map_type edge to MapType by id.
func (*ServerCreate) SetMetadata ¶
func (sc *ServerCreate) SetMetadata(m *Metadata) *ServerCreate
SetMetadata sets the metadata edge to Metadata.
func (*ServerCreate) SetMetadataID ¶
func (sc *ServerCreate) SetMetadataID(id int) *ServerCreate
SetMetadataID sets the metadata edge to Metadata by id.
func (*ServerCreate) SetName ¶
func (sc *ServerCreate) SetName(s string) *ServerCreate
SetName sets the name field.
func (*ServerCreate) SetNillableAPIAddress ¶
func (sc *ServerCreate) SetNillableAPIAddress(s *string) *ServerCreate
SetNillableAPIAddress sets the api_address field if the given value is not nil.
func (*ServerCreate) SetNillableAPIPort ¶
func (sc *ServerCreate) SetNillableAPIPort(s *string) *ServerCreate
SetNillableAPIPort sets the api_port field if the given value is not nil.
func (*ServerCreate) SetNillableAPISecret ¶
func (sc *ServerCreate) SetNillableAPISecret(s *string) *ServerCreate
SetNillableAPISecret sets the api_secret field if the given value is not nil.
func (*ServerCreate) SetNillableAPIUsername ¶
func (sc *ServerCreate) SetNillableAPIUsername(s *string) *ServerCreate
SetNillableAPIUsername sets the api_username field if the given value is not nil.
func (*ServerCreate) SetNillableCreatedAt ¶
func (sc *ServerCreate) SetNillableCreatedAt(t *time.Time) *ServerCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*ServerCreate) SetNillableMapTypeID ¶
func (sc *ServerCreate) SetNillableMapTypeID(id *int) *ServerCreate
SetNillableMapTypeID sets the map_type edge to MapType by id if the given value is not nil.
func (*ServerCreate) SetNillableMetadataID ¶
func (sc *ServerCreate) SetNillableMetadataID(id *int) *ServerCreate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*ServerCreate) SetNillableServerTypeID ¶
func (sc *ServerCreate) SetNillableServerTypeID(id *int) *ServerCreate
SetNillableServerTypeID sets the server_type edge to ServerType by id if the given value is not nil.
func (*ServerCreate) SetNillableUpdatedAt ¶
func (sc *ServerCreate) SetNillableUpdatedAt(t *time.Time) *ServerCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*ServerCreate) SetServerType ¶
func (sc *ServerCreate) SetServerType(s *ServerType) *ServerCreate
SetServerType sets the server_type edge to ServerType.
func (*ServerCreate) SetServerTypeID ¶
func (sc *ServerCreate) SetServerTypeID(id int) *ServerCreate
SetServerTypeID sets the server_type edge to ServerType by id.
func (*ServerCreate) SetUpdatedAt ¶
func (sc *ServerCreate) SetUpdatedAt(t time.Time) *ServerCreate
SetUpdatedAt sets the updated_at field.
type ServerCreateBulk ¶
type ServerCreateBulk struct {
// contains filtered or unexported fields
}
ServerCreateBulk is the builder for creating a bulk of Server entities.
type ServerDelete ¶
type ServerDelete struct {
// contains filtered or unexported fields
}
ServerDelete is the builder for deleting a Server entity.
func (*ServerDelete) Exec ¶
func (sd *ServerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ServerDelete) ExecX ¶
func (sd *ServerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ServerDelete) Where ¶
func (sd *ServerDelete) Where(ps ...predicate.Server) *ServerDelete
Where adds a new predicate to the delete builder.
type ServerDeleteOne ¶
type ServerDeleteOne struct {
// contains filtered or unexported fields
}
ServerDeleteOne is the builder for deleting a single Server entity.
func (*ServerDeleteOne) Exec ¶
func (sdo *ServerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ServerDeleteOne) ExecX ¶
func (sdo *ServerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ServerEdge ¶
ServerEdge is the edge representation of Server.
type ServerEdges ¶
type ServerEdges struct { // Metadata holds the value of the metadata edge. Metadata *Metadata // ServerType holds the value of the server_type edge. ServerType *ServerType // MapType holds the value of the map_type edge. MapType *MapType // Players holds the value of the players edge. Players []*Player // contains filtered or unexported fields }
ServerEdges holds the relations/edges for other nodes in the graph.
func (ServerEdges) MapTypeOrErr ¶
func (e ServerEdges) MapTypeOrErr() (*MapType, error)
MapTypeOrErr returns the MapType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ServerEdges) MetadataOrErr ¶
func (e ServerEdges) MetadataOrErr() (*Metadata, error)
MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ServerEdges) PlayersOrErr ¶
func (e ServerEdges) PlayersOrErr() ([]*Player, error)
PlayersOrErr returns the Players value or an error if the edge was not loaded in eager-loading.
func (ServerEdges) ServerTypeOrErr ¶
func (e ServerEdges) ServerTypeOrErr() (*ServerType, error)
ServerTypeOrErr returns the ServerType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ServerGroupBy ¶
type ServerGroupBy struct {
// contains filtered or unexported fields
}
ServerGroupBy is the builder for group-by Server entities.
func (*ServerGroupBy) Aggregate ¶
func (sgb *ServerGroupBy) Aggregate(fns ...AggregateFunc) *ServerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ServerGroupBy) Bool ¶
func (sgb *ServerGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*ServerGroupBy) BoolX ¶
func (sgb *ServerGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ServerGroupBy) Bools ¶
func (sgb *ServerGroupBy) 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 (*ServerGroupBy) BoolsX ¶
func (sgb *ServerGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ServerGroupBy) Float64 ¶
func (sgb *ServerGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*ServerGroupBy) Float64X ¶
func (sgb *ServerGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ServerGroupBy) Float64s ¶
func (sgb *ServerGroupBy) 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 (*ServerGroupBy) Float64sX ¶
func (sgb *ServerGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ServerGroupBy) Int ¶
func (sgb *ServerGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*ServerGroupBy) IntX ¶
func (sgb *ServerGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ServerGroupBy) Ints ¶
func (sgb *ServerGroupBy) 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 (*ServerGroupBy) IntsX ¶
func (sgb *ServerGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ServerGroupBy) Scan ¶
func (sgb *ServerGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*ServerGroupBy) ScanX ¶
func (sgb *ServerGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ServerGroupBy) String ¶
func (sgb *ServerGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*ServerGroupBy) StringX ¶
func (sgb *ServerGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ServerMutation ¶
type ServerMutation struct {
// contains filtered or unexported fields
}
ServerMutation represents an operation that mutate the Servers nodes in the graph.
func (*ServerMutation) APIAddress ¶
func (m *ServerMutation) APIAddress() (r string, exists bool)
APIAddress returns the api_address value in the mutation.
func (*ServerMutation) APIAddressCleared ¶
func (m *ServerMutation) APIAddressCleared() bool
APIAddressCleared returns if the field api_address was cleared in this mutation.
func (*ServerMutation) APIPort ¶
func (m *ServerMutation) APIPort() (r string, exists bool)
APIPort returns the api_port value in the mutation.
func (*ServerMutation) APIPortCleared ¶
func (m *ServerMutation) APIPortCleared() bool
APIPortCleared returns if the field api_port was cleared in this mutation.
func (*ServerMutation) APISecret ¶
func (m *ServerMutation) APISecret() (r string, exists bool)
APISecret returns the api_secret value in the mutation.
func (*ServerMutation) APISecretCleared ¶
func (m *ServerMutation) APISecretCleared() bool
APISecretCleared returns if the field api_secret was cleared in this mutation.
func (*ServerMutation) APIUsername ¶
func (m *ServerMutation) APIUsername() (r string, exists bool)
APIUsername returns the api_username value in the mutation.
func (*ServerMutation) APIUsernameCleared ¶
func (m *ServerMutation) APIUsernameCleared() bool
APIUsernameCleared returns if the field api_username was cleared in this mutation.
func (*ServerMutation) AddField ¶
func (m *ServerMutation) 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 (*ServerMutation) AddPlayerIDs ¶
func (m *ServerMutation) AddPlayerIDs(ids ...int)
AddPlayerIDs adds the players edge to Player by ids.
func (*ServerMutation) AddedEdges ¶
func (m *ServerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ServerMutation) AddedField ¶
func (m *ServerMutation) 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 (*ServerMutation) AddedFields ¶
func (m *ServerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*ServerMutation) AddedIDs ¶
func (m *ServerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*ServerMutation) ClearAPIAddress ¶
func (m *ServerMutation) ClearAPIAddress()
ClearAPIAddress clears the value of api_address.
func (*ServerMutation) ClearAPIPort ¶
func (m *ServerMutation) ClearAPIPort()
ClearAPIPort clears the value of api_port.
func (*ServerMutation) ClearAPISecret ¶
func (m *ServerMutation) ClearAPISecret()
ClearAPISecret clears the value of api_secret.
func (*ServerMutation) ClearAPIUsername ¶
func (m *ServerMutation) ClearAPIUsername()
ClearAPIUsername clears the value of api_username.
func (*ServerMutation) ClearEdge ¶
func (m *ServerMutation) 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 (*ServerMutation) ClearField ¶
func (m *ServerMutation) 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 (*ServerMutation) ClearMapType ¶
func (m *ServerMutation) ClearMapType()
ClearMapType clears the map_type edge to MapType.
func (*ServerMutation) ClearMetadata ¶
func (m *ServerMutation) ClearMetadata()
ClearMetadata clears the metadata edge to Metadata.
func (*ServerMutation) ClearPlayers ¶
func (m *ServerMutation) ClearPlayers()
ClearPlayers clears the players edge to Player.
func (*ServerMutation) ClearServerType ¶
func (m *ServerMutation) ClearServerType()
ClearServerType clears the server_type edge to ServerType.
func (*ServerMutation) ClearedEdges ¶
func (m *ServerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ServerMutation) ClearedFields ¶
func (m *ServerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ServerMutation) Client ¶
func (m ServerMutation) 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 (*ServerMutation) CreatedAt ¶
func (m *ServerMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*ServerMutation) EdgeCleared ¶
func (m *ServerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*ServerMutation) Field ¶
func (m *ServerMutation) 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 (*ServerMutation) FieldCleared ¶
func (m *ServerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*ServerMutation) Fields ¶
func (m *ServerMutation) 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 (*ServerMutation) ID ¶
func (m *ServerMutation) 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 (*ServerMutation) MapTypeCleared ¶
func (m *ServerMutation) MapTypeCleared() bool
MapTypeCleared returns if the edge map_type was cleared.
func (*ServerMutation) MapTypeID ¶
func (m *ServerMutation) MapTypeID() (id int, exists bool)
MapTypeID returns the map_type id in the mutation.
func (*ServerMutation) MapTypeIDs ¶
func (m *ServerMutation) MapTypeIDs() (ids []int)
MapTypeIDs returns the map_type ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use MapTypeID instead. It exists only for internal usage by the builders.
func (*ServerMutation) MetadataCleared ¶
func (m *ServerMutation) MetadataCleared() bool
MetadataCleared returns if the edge metadata was cleared.
func (*ServerMutation) MetadataID ¶
func (m *ServerMutation) MetadataID() (id int, exists bool)
MetadataID returns the metadata id in the mutation.
func (*ServerMutation) MetadataIDs ¶
func (m *ServerMutation) MetadataIDs() (ids []int)
MetadataIDs returns the metadata ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use MetadataID instead. It exists only for internal usage by the builders.
func (*ServerMutation) Name ¶
func (m *ServerMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*ServerMutation) OldAPIAddress ¶
func (m *ServerMutation) OldAPIAddress(ctx context.Context) (v *string, err error)
OldAPIAddress returns the old api_address value of the Server. If the Server object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerMutation) OldAPIPort ¶
func (m *ServerMutation) OldAPIPort(ctx context.Context) (v *string, err error)
OldAPIPort returns the old api_port value of the Server. If the Server object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerMutation) OldAPISecret ¶
func (m *ServerMutation) OldAPISecret(ctx context.Context) (v *string, err error)
OldAPISecret returns the old api_secret value of the Server. If the Server object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerMutation) OldAPIUsername ¶
func (m *ServerMutation) OldAPIUsername(ctx context.Context) (v *string, err error)
OldAPIUsername returns the old api_username value of the Server. If the Server object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the Server. If the Server object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*ServerMutation) OldName ¶
func (m *ServerMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the Server. If the Server object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the Server. If the Server object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerMutation) PlayersCleared ¶
func (m *ServerMutation) PlayersCleared() bool
PlayersCleared returns if the edge players was cleared.
func (*ServerMutation) PlayersIDs ¶
func (m *ServerMutation) PlayersIDs() (ids []int)
PlayersIDs returns the players ids in the mutation.
func (*ServerMutation) RemovePlayerIDs ¶
func (m *ServerMutation) RemovePlayerIDs(ids ...int)
RemovePlayerIDs removes the players edge to Player by ids.
func (*ServerMutation) RemovedEdges ¶
func (m *ServerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ServerMutation) RemovedIDs ¶
func (m *ServerMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*ServerMutation) RemovedPlayersIDs ¶
func (m *ServerMutation) RemovedPlayersIDs() (ids []int)
RemovedPlayers returns the removed ids of players.
func (*ServerMutation) ResetAPIAddress ¶
func (m *ServerMutation) ResetAPIAddress()
ResetAPIAddress reset all changes of the "api_address" field.
func (*ServerMutation) ResetAPIPort ¶
func (m *ServerMutation) ResetAPIPort()
ResetAPIPort reset all changes of the "api_port" field.
func (*ServerMutation) ResetAPISecret ¶
func (m *ServerMutation) ResetAPISecret()
ResetAPISecret reset all changes of the "api_secret" field.
func (*ServerMutation) ResetAPIUsername ¶
func (m *ServerMutation) ResetAPIUsername()
ResetAPIUsername reset all changes of the "api_username" field.
func (*ServerMutation) ResetCreatedAt ¶
func (m *ServerMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*ServerMutation) ResetEdge ¶
func (m *ServerMutation) 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 (*ServerMutation) ResetField ¶
func (m *ServerMutation) 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 (*ServerMutation) ResetMapType ¶
func (m *ServerMutation) ResetMapType()
ResetMapType reset all changes of the "map_type" edge.
func (*ServerMutation) ResetMetadata ¶
func (m *ServerMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" edge.
func (*ServerMutation) ResetName ¶
func (m *ServerMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*ServerMutation) ResetPlayers ¶
func (m *ServerMutation) ResetPlayers()
ResetPlayers reset all changes of the "players" edge.
func (*ServerMutation) ResetServerType ¶
func (m *ServerMutation) ResetServerType()
ResetServerType reset all changes of the "server_type" edge.
func (*ServerMutation) ResetUpdatedAt ¶
func (m *ServerMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*ServerMutation) ServerTypeCleared ¶
func (m *ServerMutation) ServerTypeCleared() bool
ServerTypeCleared returns if the edge server_type was cleared.
func (*ServerMutation) ServerTypeID ¶
func (m *ServerMutation) ServerTypeID() (id int, exists bool)
ServerTypeID returns the server_type id in the mutation.
func (*ServerMutation) ServerTypeIDs ¶
func (m *ServerMutation) ServerTypeIDs() (ids []int)
ServerTypeIDs returns the server_type ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use ServerTypeID instead. It exists only for internal usage by the builders.
func (*ServerMutation) SetAPIAddress ¶
func (m *ServerMutation) SetAPIAddress(s string)
SetAPIAddress sets the api_address field.
func (*ServerMutation) SetAPIPort ¶
func (m *ServerMutation) SetAPIPort(s string)
SetAPIPort sets the api_port field.
func (*ServerMutation) SetAPISecret ¶
func (m *ServerMutation) SetAPISecret(s string)
SetAPISecret sets the api_secret field.
func (*ServerMutation) SetAPIUsername ¶
func (m *ServerMutation) SetAPIUsername(s string)
SetAPIUsername sets the api_username field.
func (*ServerMutation) SetCreatedAt ¶
func (m *ServerMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*ServerMutation) SetField ¶
func (m *ServerMutation) 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 (*ServerMutation) SetMapTypeID ¶
func (m *ServerMutation) SetMapTypeID(id int)
SetMapTypeID sets the map_type edge to MapType by id.
func (*ServerMutation) SetMetadataID ¶
func (m *ServerMutation) SetMetadataID(id int)
SetMetadataID sets the metadata edge to Metadata by id.
func (*ServerMutation) SetName ¶
func (m *ServerMutation) SetName(s string)
SetName sets the name field.
func (*ServerMutation) SetServerTypeID ¶
func (m *ServerMutation) SetServerTypeID(id int)
SetServerTypeID sets the server_type edge to ServerType by id.
func (*ServerMutation) SetUpdatedAt ¶
func (m *ServerMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (ServerMutation) Tx ¶
func (m ServerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ServerMutation) Type ¶
func (m *ServerMutation) Type() string
Type returns the node type of this mutation (Server).
type ServerOrder ¶
type ServerOrder struct { Direction OrderDirection `json:"direction"` Field *ServerOrderField `json:"field"` }
ServerOrder defines the ordering of Server.
type ServerOrderField ¶
type ServerOrderField struct {
// contains filtered or unexported fields
}
ServerOrderField defines the ordering field of Server.
func (ServerOrderField) MarshalGQL ¶
func (f ServerOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (ServerOrderField) String ¶
func (f ServerOrderField) String() string
String implement fmt.Stringer interface.
func (*ServerOrderField) UnmarshalGQL ¶
func (f *ServerOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type ServerPaginateOption ¶
type ServerPaginateOption func(*serverPager) error
ServerPaginateOption enables pagination customization.
func WithServerFilter ¶
func WithServerFilter(filter func(*ServerQuery) (*ServerQuery, error)) ServerPaginateOption
WithServerFilter configures pagination filter.
func WithServerOrder ¶
func WithServerOrder(order *ServerOrder) ServerPaginateOption
WithServerOrder configures pagination ordering.
type ServerQuery ¶
type ServerQuery struct {
// contains filtered or unexported fields
}
ServerQuery is the builder for querying Server entities.
func (*ServerQuery) All ¶
func (sq *ServerQuery) All(ctx context.Context) ([]*Server, error)
All executes the query and returns a list of Servers.
func (*ServerQuery) AllX ¶
func (sq *ServerQuery) AllX(ctx context.Context) []*Server
AllX is like All, but panics if an error occurs.
func (*ServerQuery) Clone ¶
func (sq *ServerQuery) Clone() *ServerQuery
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 (*ServerQuery) CollectFields ¶
func (s *ServerQuery) CollectFields(ctx context.Context, satisfies ...string) *ServerQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*ServerQuery) Count ¶
func (sq *ServerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ServerQuery) CountX ¶
func (sq *ServerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ServerQuery) Exist ¶
func (sq *ServerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ServerQuery) ExistX ¶
func (sq *ServerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ServerQuery) First ¶
func (sq *ServerQuery) First(ctx context.Context) (*Server, error)
First returns the first Server entity in the query. Returns *NotFoundError when no server was found.
func (*ServerQuery) FirstID ¶
func (sq *ServerQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Server id in the query. Returns *NotFoundError when no id was found.
func (*ServerQuery) FirstIDX ¶
func (sq *ServerQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ServerQuery) FirstX ¶
func (sq *ServerQuery) FirstX(ctx context.Context) *Server
FirstX is like First, but panics if an error occurs.
func (*ServerQuery) GroupBy ¶
func (sq *ServerQuery) GroupBy(field string, fields ...string) *ServerGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Server.Query(). GroupBy(server.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ServerQuery) IDs ¶
func (sq *ServerQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Server ids.
func (*ServerQuery) IDsX ¶
func (sq *ServerQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ServerQuery) Limit ¶
func (sq *ServerQuery) Limit(limit int) *ServerQuery
Limit adds a limit step to the query.
func (*ServerQuery) Offset ¶
func (sq *ServerQuery) Offset(offset int) *ServerQuery
Offset adds an offset step to the query.
func (*ServerQuery) Only ¶
func (sq *ServerQuery) Only(ctx context.Context) (*Server, error)
Only returns the only Server entity in the query, returns an error if not exactly one entity was returned.
func (*ServerQuery) OnlyID ¶
func (sq *ServerQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Server id in the query, returns an error if not exactly one id was returned.
func (*ServerQuery) OnlyIDX ¶
func (sq *ServerQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ServerQuery) OnlyX ¶
func (sq *ServerQuery) OnlyX(ctx context.Context) *Server
OnlyX is like Only, but panics if an error occurs.
func (*ServerQuery) Order ¶
func (sq *ServerQuery) Order(o ...OrderFunc) *ServerQuery
Order adds an order step to the query.
func (*ServerQuery) Paginate ¶
func (s *ServerQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...ServerPaginateOption, ) (*ServerConnection, error)
Paginate executes the query and returns a relay based cursor connection to Server.
func (*ServerQuery) QueryMapType ¶
func (sq *ServerQuery) QueryMapType() *MapTypeQuery
QueryMapType chains the current query on the map_type edge.
func (*ServerQuery) QueryMetadata ¶
func (sq *ServerQuery) QueryMetadata() *MetadataQuery
QueryMetadata chains the current query on the metadata edge.
func (*ServerQuery) QueryPlayers ¶
func (sq *ServerQuery) QueryPlayers() *PlayerQuery
QueryPlayers chains the current query on the players edge.
func (*ServerQuery) QueryServerType ¶
func (sq *ServerQuery) QueryServerType() *ServerTypeQuery
QueryServerType chains the current query on the server_type edge.
func (*ServerQuery) Select ¶
func (sq *ServerQuery) Select(field string, fields ...string) *ServerSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Server.Query(). Select(server.FieldCreatedAt). Scan(ctx, &v)
func (*ServerQuery) Where ¶
func (sq *ServerQuery) Where(ps ...predicate.Server) *ServerQuery
Where adds a new predicate for the builder.
func (*ServerQuery) WithMapType ¶
func (sq *ServerQuery) WithMapType(opts ...func(*MapTypeQuery)) *ServerQuery
WithMapType tells the query-builder to eager-loads the nodes that are connected to
the "map_type" edge. The optional arguments used to configure the query builder of the edge.
func (*ServerQuery) WithMetadata ¶
func (sq *ServerQuery) WithMetadata(opts ...func(*MetadataQuery)) *ServerQuery
WithMetadata tells the query-builder to eager-loads the nodes that are connected to
the "metadata" edge. The optional arguments used to configure the query builder of the edge.
func (*ServerQuery) WithPlayers ¶
func (sq *ServerQuery) WithPlayers(opts ...func(*PlayerQuery)) *ServerQuery
WithPlayers tells the query-builder to eager-loads the nodes that are connected to
the "players" edge. The optional arguments used to configure the query builder of the edge.
func (*ServerQuery) WithServerType ¶
func (sq *ServerQuery) WithServerType(opts ...func(*ServerTypeQuery)) *ServerQuery
WithServerType tells the query-builder to eager-loads the nodes that are connected to
the "server_type" edge. The optional arguments used to configure the query builder of the edge.
type ServerSelect ¶
type ServerSelect struct { *ServerQuery // contains filtered or unexported fields }
ServerSelect is the builder for select fields of Server entities.
func (*ServerSelect) Bool ¶
func (ss *ServerSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*ServerSelect) BoolX ¶
func (ss *ServerSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ServerSelect) Bools ¶
func (ss *ServerSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*ServerSelect) BoolsX ¶
func (ss *ServerSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ServerSelect) Float64 ¶
func (ss *ServerSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*ServerSelect) Float64X ¶
func (ss *ServerSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ServerSelect) Float64s ¶
func (ss *ServerSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*ServerSelect) Float64sX ¶
func (ss *ServerSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ServerSelect) Int ¶
func (ss *ServerSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*ServerSelect) IntX ¶
func (ss *ServerSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ServerSelect) Ints ¶
func (ss *ServerSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*ServerSelect) IntsX ¶
func (ss *ServerSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ServerSelect) Scan ¶
func (ss *ServerSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*ServerSelect) ScanX ¶
func (ss *ServerSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ServerSelect) String ¶
func (ss *ServerSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*ServerSelect) StringX ¶
func (ss *ServerSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ServerType ¶
type ServerType struct { // ID of the ent. ID int `json:"id,omitempty"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ServerTypeQuery when eager-loading is set. Edges ServerTypeEdges `json:"edges"` // contains filtered or unexported fields }
ServerType is the model entity for the ServerType schema.
func (*ServerType) QueryServers ¶
func (st *ServerType) QueryServers() *ServerQuery
QueryServers queries the servers edge of the ServerType.
func (*ServerType) String ¶
func (st *ServerType) String() string
String implements the fmt.Stringer.
func (*ServerType) ToEdge ¶
func (st *ServerType) ToEdge(order *ServerTypeOrder) *ServerTypeEdge
ToEdge converts ServerType into ServerTypeEdge.
func (*ServerType) Unwrap ¶
func (st *ServerType) Unwrap() *ServerType
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 (*ServerType) Update ¶
func (st *ServerType) Update() *ServerTypeUpdateOne
Update returns a builder for updating this ServerType. Note that, you need to call ServerType.Unwrap() before calling this method, if this ServerType was returned from a transaction, and the transaction was committed or rolled back.
type ServerTypeClient ¶
type ServerTypeClient struct {
// contains filtered or unexported fields
}
ServerTypeClient is a client for the ServerType schema.
func NewServerTypeClient ¶
func NewServerTypeClient(c config) *ServerTypeClient
NewServerTypeClient returns a client for the ServerType from the given config.
func (*ServerTypeClient) Create ¶
func (c *ServerTypeClient) Create() *ServerTypeCreate
Create returns a create builder for ServerType.
func (*ServerTypeClient) CreateBulk ¶
func (c *ServerTypeClient) CreateBulk(builders ...*ServerTypeCreate) *ServerTypeCreateBulk
CreateBulk returns a builder for creating a bulk of ServerType entities.
func (*ServerTypeClient) Delete ¶
func (c *ServerTypeClient) Delete() *ServerTypeDelete
Delete returns a delete builder for ServerType.
func (*ServerTypeClient) DeleteOne ¶
func (c *ServerTypeClient) DeleteOne(st *ServerType) *ServerTypeDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ServerTypeClient) DeleteOneID ¶
func (c *ServerTypeClient) DeleteOneID(id int) *ServerTypeDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ServerTypeClient) Get ¶
func (c *ServerTypeClient) Get(ctx context.Context, id int) (*ServerType, error)
Get returns a ServerType entity by its id.
func (*ServerTypeClient) GetX ¶
func (c *ServerTypeClient) GetX(ctx context.Context, id int) *ServerType
GetX is like Get, but panics if an error occurs.
func (*ServerTypeClient) Hooks ¶
func (c *ServerTypeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ServerTypeClient) Query ¶
func (c *ServerTypeClient) Query() *ServerTypeQuery
Query returns a query builder for ServerType.
func (*ServerTypeClient) QueryServers ¶
func (c *ServerTypeClient) QueryServers(st *ServerType) *ServerQuery
QueryServers queries the servers edge of a ServerType.
func (*ServerTypeClient) Update ¶
func (c *ServerTypeClient) Update() *ServerTypeUpdate
Update returns an update builder for ServerType.
func (*ServerTypeClient) UpdateOne ¶
func (c *ServerTypeClient) UpdateOne(st *ServerType) *ServerTypeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ServerTypeClient) UpdateOneID ¶
func (c *ServerTypeClient) UpdateOneID(id int) *ServerTypeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ServerTypeClient) Use ¶
func (c *ServerTypeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `servertype.Hooks(f(g(h())))`.
type ServerTypeConnection ¶
type ServerTypeConnection struct { Edges []*ServerTypeEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
ServerTypeConnection is the connection containing edges to ServerType.
type ServerTypeCreate ¶
type ServerTypeCreate struct {
// contains filtered or unexported fields
}
ServerTypeCreate is the builder for creating a ServerType entity.
func (*ServerTypeCreate) AddServerIDs ¶
func (stc *ServerTypeCreate) AddServerIDs(ids ...int) *ServerTypeCreate
AddServerIDs adds the servers edge to Server by ids.
func (*ServerTypeCreate) AddServers ¶
func (stc *ServerTypeCreate) AddServers(s ...*Server) *ServerTypeCreate
AddServers adds the servers edges to Server.
func (*ServerTypeCreate) Mutation ¶
func (stc *ServerTypeCreate) Mutation() *ServerTypeMutation
Mutation returns the ServerTypeMutation object of the builder.
func (*ServerTypeCreate) Save ¶
func (stc *ServerTypeCreate) Save(ctx context.Context) (*ServerType, error)
Save creates the ServerType in the database.
func (*ServerTypeCreate) SaveX ¶
func (stc *ServerTypeCreate) SaveX(ctx context.Context) *ServerType
SaveX calls Save and panics if Save returns an error.
func (*ServerTypeCreate) SetDescription ¶
func (stc *ServerTypeCreate) SetDescription(s string) *ServerTypeCreate
SetDescription sets the description field.
func (*ServerTypeCreate) SetKey ¶
func (stc *ServerTypeCreate) SetKey(s string) *ServerTypeCreate
SetKey sets the key field.
func (*ServerTypeCreate) SetName ¶
func (stc *ServerTypeCreate) SetName(s string) *ServerTypeCreate
SetName sets the name field.
func (*ServerTypeCreate) SetNillableDescription ¶
func (stc *ServerTypeCreate) SetNillableDescription(s *string) *ServerTypeCreate
SetNillableDescription sets the description field if the given value is not nil.
type ServerTypeCreateBulk ¶
type ServerTypeCreateBulk struct {
// contains filtered or unexported fields
}
ServerTypeCreateBulk is the builder for creating a bulk of ServerType entities.
func (*ServerTypeCreateBulk) Save ¶
func (stcb *ServerTypeCreateBulk) Save(ctx context.Context) ([]*ServerType, error)
Save creates the ServerType entities in the database.
func (*ServerTypeCreateBulk) SaveX ¶
func (stcb *ServerTypeCreateBulk) SaveX(ctx context.Context) []*ServerType
SaveX calls Save and panics if Save returns an error.
type ServerTypeDelete ¶
type ServerTypeDelete struct {
// contains filtered or unexported fields
}
ServerTypeDelete is the builder for deleting a ServerType entity.
func (*ServerTypeDelete) Exec ¶
func (std *ServerTypeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ServerTypeDelete) ExecX ¶
func (std *ServerTypeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ServerTypeDelete) Where ¶
func (std *ServerTypeDelete) Where(ps ...predicate.ServerType) *ServerTypeDelete
Where adds a new predicate to the delete builder.
type ServerTypeDeleteOne ¶
type ServerTypeDeleteOne struct {
// contains filtered or unexported fields
}
ServerTypeDeleteOne is the builder for deleting a single ServerType entity.
func (*ServerTypeDeleteOne) Exec ¶
func (stdo *ServerTypeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ServerTypeDeleteOne) ExecX ¶
func (stdo *ServerTypeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ServerTypeEdge ¶
type ServerTypeEdge struct { Node *ServerType `json:"node"` Cursor Cursor `json:"cursor"` }
ServerTypeEdge is the edge representation of ServerType.
type ServerTypeEdges ¶
type ServerTypeEdges struct { // Servers holds the value of the servers edge. Servers []*Server // contains filtered or unexported fields }
ServerTypeEdges holds the relations/edges for other nodes in the graph.
func (ServerTypeEdges) ServersOrErr ¶
func (e ServerTypeEdges) ServersOrErr() ([]*Server, error)
ServersOrErr returns the Servers value or an error if the edge was not loaded in eager-loading.
type ServerTypeGroupBy ¶
type ServerTypeGroupBy struct {
// contains filtered or unexported fields
}
ServerTypeGroupBy is the builder for group-by ServerType entities.
func (*ServerTypeGroupBy) Aggregate ¶
func (stgb *ServerTypeGroupBy) Aggregate(fns ...AggregateFunc) *ServerTypeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ServerTypeGroupBy) Bool ¶
func (stgb *ServerTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*ServerTypeGroupBy) BoolX ¶
func (stgb *ServerTypeGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ServerTypeGroupBy) Bools ¶
func (stgb *ServerTypeGroupBy) 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 (*ServerTypeGroupBy) BoolsX ¶
func (stgb *ServerTypeGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ServerTypeGroupBy) Float64 ¶
func (stgb *ServerTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*ServerTypeGroupBy) Float64X ¶
func (stgb *ServerTypeGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ServerTypeGroupBy) Float64s ¶
func (stgb *ServerTypeGroupBy) 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 (*ServerTypeGroupBy) Float64sX ¶
func (stgb *ServerTypeGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ServerTypeGroupBy) Int ¶
func (stgb *ServerTypeGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*ServerTypeGroupBy) IntX ¶
func (stgb *ServerTypeGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ServerTypeGroupBy) Ints ¶
func (stgb *ServerTypeGroupBy) 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 (*ServerTypeGroupBy) IntsX ¶
func (stgb *ServerTypeGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ServerTypeGroupBy) Scan ¶
func (stgb *ServerTypeGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*ServerTypeGroupBy) ScanX ¶
func (stgb *ServerTypeGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ServerTypeGroupBy) String ¶
func (stgb *ServerTypeGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*ServerTypeGroupBy) StringX ¶
func (stgb *ServerTypeGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ServerTypeMutation ¶
type ServerTypeMutation struct {
// contains filtered or unexported fields
}
ServerTypeMutation represents an operation that mutate the ServerTypes nodes in the graph.
func (*ServerTypeMutation) AddField ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) AddServerIDs ¶
func (m *ServerTypeMutation) AddServerIDs(ids ...int)
AddServerIDs adds the servers edge to Server by ids.
func (*ServerTypeMutation) AddedEdges ¶
func (m *ServerTypeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ServerTypeMutation) AddedField ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) AddedFields ¶
func (m *ServerTypeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*ServerTypeMutation) AddedIDs ¶
func (m *ServerTypeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*ServerTypeMutation) ClearDescription ¶
func (m *ServerTypeMutation) ClearDescription()
ClearDescription clears the value of description.
func (*ServerTypeMutation) ClearEdge ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) ClearField ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) ClearServers ¶
func (m *ServerTypeMutation) ClearServers()
ClearServers clears the servers edge to Server.
func (*ServerTypeMutation) ClearedEdges ¶
func (m *ServerTypeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ServerTypeMutation) ClearedFields ¶
func (m *ServerTypeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ServerTypeMutation) Client ¶
func (m ServerTypeMutation) 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 (*ServerTypeMutation) Description ¶
func (m *ServerTypeMutation) Description() (r string, exists bool)
Description returns the description value in the mutation.
func (*ServerTypeMutation) DescriptionCleared ¶
func (m *ServerTypeMutation) DescriptionCleared() bool
DescriptionCleared returns if the field description was cleared in this mutation.
func (*ServerTypeMutation) EdgeCleared ¶
func (m *ServerTypeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*ServerTypeMutation) Field ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) FieldCleared ¶
func (m *ServerTypeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*ServerTypeMutation) Fields ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) ID ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) Key ¶
func (m *ServerTypeMutation) Key() (r string, exists bool)
Key returns the key value in the mutation.
func (*ServerTypeMutation) Name ¶
func (m *ServerTypeMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*ServerTypeMutation) OldDescription ¶
func (m *ServerTypeMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old description value of the ServerType. If the ServerType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerTypeMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*ServerTypeMutation) OldKey ¶
func (m *ServerTypeMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old key value of the ServerType. If the ServerType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerTypeMutation) OldName ¶
func (m *ServerTypeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the ServerType. If the ServerType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*ServerTypeMutation) RemoveServerIDs ¶
func (m *ServerTypeMutation) RemoveServerIDs(ids ...int)
RemoveServerIDs removes the servers edge to Server by ids.
func (*ServerTypeMutation) RemovedEdges ¶
func (m *ServerTypeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ServerTypeMutation) RemovedIDs ¶
func (m *ServerTypeMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*ServerTypeMutation) RemovedServersIDs ¶
func (m *ServerTypeMutation) RemovedServersIDs() (ids []int)
RemovedServers returns the removed ids of servers.
func (*ServerTypeMutation) ResetDescription ¶
func (m *ServerTypeMutation) ResetDescription()
ResetDescription reset all changes of the "description" field.
func (*ServerTypeMutation) ResetEdge ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) ResetField ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) ResetKey ¶
func (m *ServerTypeMutation) ResetKey()
ResetKey reset all changes of the "key" field.
func (*ServerTypeMutation) ResetName ¶
func (m *ServerTypeMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*ServerTypeMutation) ResetServers ¶
func (m *ServerTypeMutation) ResetServers()
ResetServers reset all changes of the "servers" edge.
func (*ServerTypeMutation) ServersCleared ¶
func (m *ServerTypeMutation) ServersCleared() bool
ServersCleared returns if the edge servers was cleared.
func (*ServerTypeMutation) ServersIDs ¶
func (m *ServerTypeMutation) ServersIDs() (ids []int)
ServersIDs returns the servers ids in the mutation.
func (*ServerTypeMutation) SetDescription ¶
func (m *ServerTypeMutation) SetDescription(s string)
SetDescription sets the description field.
func (*ServerTypeMutation) SetField ¶
func (m *ServerTypeMutation) 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 (*ServerTypeMutation) SetKey ¶
func (m *ServerTypeMutation) SetKey(s string)
SetKey sets the key field.
func (*ServerTypeMutation) SetName ¶
func (m *ServerTypeMutation) SetName(s string)
SetName sets the name field.
func (ServerTypeMutation) Tx ¶
func (m ServerTypeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ServerTypeMutation) Type ¶
func (m *ServerTypeMutation) Type() string
Type returns the node type of this mutation (ServerType).
type ServerTypeOrder ¶
type ServerTypeOrder struct { Direction OrderDirection `json:"direction"` Field *ServerTypeOrderField `json:"field"` }
ServerTypeOrder defines the ordering of ServerType.
type ServerTypeOrderField ¶
type ServerTypeOrderField struct {
// contains filtered or unexported fields
}
ServerTypeOrderField defines the ordering field of ServerType.
type ServerTypePaginateOption ¶
type ServerTypePaginateOption func(*serverTypePager) error
ServerTypePaginateOption enables pagination customization.
func WithServerTypeFilter ¶
func WithServerTypeFilter(filter func(*ServerTypeQuery) (*ServerTypeQuery, error)) ServerTypePaginateOption
WithServerTypeFilter configures pagination filter.
func WithServerTypeOrder ¶
func WithServerTypeOrder(order *ServerTypeOrder) ServerTypePaginateOption
WithServerTypeOrder configures pagination ordering.
type ServerTypeQuery ¶
type ServerTypeQuery struct {
// contains filtered or unexported fields
}
ServerTypeQuery is the builder for querying ServerType entities.
func (*ServerTypeQuery) All ¶
func (stq *ServerTypeQuery) All(ctx context.Context) ([]*ServerType, error)
All executes the query and returns a list of ServerTypes.
func (*ServerTypeQuery) AllX ¶
func (stq *ServerTypeQuery) AllX(ctx context.Context) []*ServerType
AllX is like All, but panics if an error occurs.
func (*ServerTypeQuery) Clone ¶
func (stq *ServerTypeQuery) Clone() *ServerTypeQuery
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 (*ServerTypeQuery) CollectFields ¶
func (st *ServerTypeQuery) CollectFields(ctx context.Context, satisfies ...string) *ServerTypeQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*ServerTypeQuery) Count ¶
func (stq *ServerTypeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ServerTypeQuery) CountX ¶
func (stq *ServerTypeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ServerTypeQuery) Exist ¶
func (stq *ServerTypeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ServerTypeQuery) ExistX ¶
func (stq *ServerTypeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ServerTypeQuery) First ¶
func (stq *ServerTypeQuery) First(ctx context.Context) (*ServerType, error)
First returns the first ServerType entity in the query. Returns *NotFoundError when no servertype was found.
func (*ServerTypeQuery) FirstID ¶
func (stq *ServerTypeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ServerType id in the query. Returns *NotFoundError when no id was found.
func (*ServerTypeQuery) FirstIDX ¶
func (stq *ServerTypeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ServerTypeQuery) FirstX ¶
func (stq *ServerTypeQuery) FirstX(ctx context.Context) *ServerType
FirstX is like First, but panics if an error occurs.
func (*ServerTypeQuery) GroupBy ¶
func (stq *ServerTypeQuery) GroupBy(field string, fields ...string) *ServerTypeGroupBy
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 { Key string `json:"key,omitempty"` Count int `json:"count,omitempty"` } client.ServerType.Query(). GroupBy(servertype.FieldKey). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ServerTypeQuery) IDs ¶
func (stq *ServerTypeQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of ServerType ids.
func (*ServerTypeQuery) IDsX ¶
func (stq *ServerTypeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ServerTypeQuery) Limit ¶
func (stq *ServerTypeQuery) Limit(limit int) *ServerTypeQuery
Limit adds a limit step to the query.
func (*ServerTypeQuery) Offset ¶
func (stq *ServerTypeQuery) Offset(offset int) *ServerTypeQuery
Offset adds an offset step to the query.
func (*ServerTypeQuery) Only ¶
func (stq *ServerTypeQuery) Only(ctx context.Context) (*ServerType, error)
Only returns the only ServerType entity in the query, returns an error if not exactly one entity was returned.
func (*ServerTypeQuery) OnlyID ¶
func (stq *ServerTypeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only ServerType id in the query, returns an error if not exactly one id was returned.
func (*ServerTypeQuery) OnlyIDX ¶
func (stq *ServerTypeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ServerTypeQuery) OnlyX ¶
func (stq *ServerTypeQuery) OnlyX(ctx context.Context) *ServerType
OnlyX is like Only, but panics if an error occurs.
func (*ServerTypeQuery) Order ¶
func (stq *ServerTypeQuery) Order(o ...OrderFunc) *ServerTypeQuery
Order adds an order step to the query.
func (*ServerTypeQuery) Paginate ¶
func (st *ServerTypeQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...ServerTypePaginateOption, ) (*ServerTypeConnection, error)
Paginate executes the query and returns a relay based cursor connection to ServerType.
func (*ServerTypeQuery) QueryServers ¶
func (stq *ServerTypeQuery) QueryServers() *ServerQuery
QueryServers chains the current query on the servers edge.
func (*ServerTypeQuery) Select ¶
func (stq *ServerTypeQuery) Select(field string, fields ...string) *ServerTypeSelect
Select one or more fields from the given query.
Example:
var v []struct { Key string `json:"key,omitempty"` } client.ServerType.Query(). Select(servertype.FieldKey). Scan(ctx, &v)
func (*ServerTypeQuery) Where ¶
func (stq *ServerTypeQuery) Where(ps ...predicate.ServerType) *ServerTypeQuery
Where adds a new predicate for the builder.
func (*ServerTypeQuery) WithServers ¶
func (stq *ServerTypeQuery) WithServers(opts ...func(*ServerQuery)) *ServerTypeQuery
WithServers tells the query-builder to eager-loads the nodes that are connected to
the "servers" edge. The optional arguments used to configure the query builder of the edge.
type ServerTypeSelect ¶
type ServerTypeSelect struct { *ServerTypeQuery // contains filtered or unexported fields }
ServerTypeSelect is the builder for select fields of ServerType entities.
func (*ServerTypeSelect) Bool ¶
func (sts *ServerTypeSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*ServerTypeSelect) BoolX ¶
func (sts *ServerTypeSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ServerTypeSelect) Bools ¶
func (sts *ServerTypeSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*ServerTypeSelect) BoolsX ¶
func (sts *ServerTypeSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ServerTypeSelect) Float64 ¶
func (sts *ServerTypeSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*ServerTypeSelect) Float64X ¶
func (sts *ServerTypeSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ServerTypeSelect) Float64s ¶
func (sts *ServerTypeSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*ServerTypeSelect) Float64sX ¶
func (sts *ServerTypeSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ServerTypeSelect) Int ¶
func (sts *ServerTypeSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*ServerTypeSelect) IntX ¶
func (sts *ServerTypeSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ServerTypeSelect) Ints ¶
func (sts *ServerTypeSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*ServerTypeSelect) IntsX ¶
func (sts *ServerTypeSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ServerTypeSelect) Scan ¶
func (sts *ServerTypeSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*ServerTypeSelect) ScanX ¶
func (sts *ServerTypeSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ServerTypeSelect) String ¶
func (sts *ServerTypeSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*ServerTypeSelect) StringX ¶
func (sts *ServerTypeSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ServerTypeUpdate ¶
type ServerTypeUpdate struct {
// contains filtered or unexported fields
}
ServerTypeUpdate is the builder for updating ServerType entities.
func (*ServerTypeUpdate) AddServerIDs ¶
func (stu *ServerTypeUpdate) AddServerIDs(ids ...int) *ServerTypeUpdate
AddServerIDs adds the servers edge to Server by ids.
func (*ServerTypeUpdate) AddServers ¶
func (stu *ServerTypeUpdate) AddServers(s ...*Server) *ServerTypeUpdate
AddServers adds the servers edges to Server.
func (*ServerTypeUpdate) ClearDescription ¶
func (stu *ServerTypeUpdate) ClearDescription() *ServerTypeUpdate
ClearDescription clears the value of description.
func (*ServerTypeUpdate) ClearServers ¶
func (stu *ServerTypeUpdate) ClearServers() *ServerTypeUpdate
ClearServers clears all "servers" edges to type Server.
func (*ServerTypeUpdate) Exec ¶
func (stu *ServerTypeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ServerTypeUpdate) ExecX ¶
func (stu *ServerTypeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServerTypeUpdate) Mutation ¶
func (stu *ServerTypeUpdate) Mutation() *ServerTypeMutation
Mutation returns the ServerTypeMutation object of the builder.
func (*ServerTypeUpdate) RemoveServerIDs ¶
func (stu *ServerTypeUpdate) RemoveServerIDs(ids ...int) *ServerTypeUpdate
RemoveServerIDs removes the servers edge to Server by ids.
func (*ServerTypeUpdate) RemoveServers ¶
func (stu *ServerTypeUpdate) RemoveServers(s ...*Server) *ServerTypeUpdate
RemoveServers removes servers edges to Server.
func (*ServerTypeUpdate) Save ¶
func (stu *ServerTypeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ServerTypeUpdate) SaveX ¶
func (stu *ServerTypeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ServerTypeUpdate) SetDescription ¶
func (stu *ServerTypeUpdate) SetDescription(s string) *ServerTypeUpdate
SetDescription sets the description field.
func (*ServerTypeUpdate) SetName ¶
func (stu *ServerTypeUpdate) SetName(s string) *ServerTypeUpdate
SetName sets the name field.
func (*ServerTypeUpdate) SetNillableDescription ¶
func (stu *ServerTypeUpdate) SetNillableDescription(s *string) *ServerTypeUpdate
SetNillableDescription sets the description field if the given value is not nil.
func (*ServerTypeUpdate) Where ¶
func (stu *ServerTypeUpdate) Where(ps ...predicate.ServerType) *ServerTypeUpdate
Where adds a new predicate for the builder.
type ServerTypeUpdateOne ¶
type ServerTypeUpdateOne struct {
// contains filtered or unexported fields
}
ServerTypeUpdateOne is the builder for updating a single ServerType entity.
func (*ServerTypeUpdateOne) AddServerIDs ¶
func (stuo *ServerTypeUpdateOne) AddServerIDs(ids ...int) *ServerTypeUpdateOne
AddServerIDs adds the servers edge to Server by ids.
func (*ServerTypeUpdateOne) AddServers ¶
func (stuo *ServerTypeUpdateOne) AddServers(s ...*Server) *ServerTypeUpdateOne
AddServers adds the servers edges to Server.
func (*ServerTypeUpdateOne) ClearDescription ¶
func (stuo *ServerTypeUpdateOne) ClearDescription() *ServerTypeUpdateOne
ClearDescription clears the value of description.
func (*ServerTypeUpdateOne) ClearServers ¶
func (stuo *ServerTypeUpdateOne) ClearServers() *ServerTypeUpdateOne
ClearServers clears all "servers" edges to type Server.
func (*ServerTypeUpdateOne) Exec ¶
func (stuo *ServerTypeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ServerTypeUpdateOne) ExecX ¶
func (stuo *ServerTypeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServerTypeUpdateOne) Mutation ¶
func (stuo *ServerTypeUpdateOne) Mutation() *ServerTypeMutation
Mutation returns the ServerTypeMutation object of the builder.
func (*ServerTypeUpdateOne) RemoveServerIDs ¶
func (stuo *ServerTypeUpdateOne) RemoveServerIDs(ids ...int) *ServerTypeUpdateOne
RemoveServerIDs removes the servers edge to Server by ids.
func (*ServerTypeUpdateOne) RemoveServers ¶
func (stuo *ServerTypeUpdateOne) RemoveServers(s ...*Server) *ServerTypeUpdateOne
RemoveServers removes servers edges to Server.
func (*ServerTypeUpdateOne) Save ¶
func (stuo *ServerTypeUpdateOne) Save(ctx context.Context) (*ServerType, error)
Save executes the query and returns the updated entity.
func (*ServerTypeUpdateOne) SaveX ¶
func (stuo *ServerTypeUpdateOne) SaveX(ctx context.Context) *ServerType
SaveX is like Save, but panics if an error occurs.
func (*ServerTypeUpdateOne) SetDescription ¶
func (stuo *ServerTypeUpdateOne) SetDescription(s string) *ServerTypeUpdateOne
SetDescription sets the description field.
func (*ServerTypeUpdateOne) SetName ¶
func (stuo *ServerTypeUpdateOne) SetName(s string) *ServerTypeUpdateOne
SetName sets the name field.
func (*ServerTypeUpdateOne) SetNillableDescription ¶
func (stuo *ServerTypeUpdateOne) SetNillableDescription(s *string) *ServerTypeUpdateOne
SetNillableDescription sets the description field if the given value is not nil.
type ServerUpdate ¶
type ServerUpdate struct {
// contains filtered or unexported fields
}
ServerUpdate is the builder for updating Server entities.
func (*ServerUpdate) AddPlayerIDs ¶
func (su *ServerUpdate) AddPlayerIDs(ids ...int) *ServerUpdate
AddPlayerIDs adds the players edge to Player by ids.
func (*ServerUpdate) AddPlayers ¶
func (su *ServerUpdate) AddPlayers(p ...*Player) *ServerUpdate
AddPlayers adds the players edges to Player.
func (*ServerUpdate) ClearAPIAddress ¶
func (su *ServerUpdate) ClearAPIAddress() *ServerUpdate
ClearAPIAddress clears the value of api_address.
func (*ServerUpdate) ClearAPIPort ¶
func (su *ServerUpdate) ClearAPIPort() *ServerUpdate
ClearAPIPort clears the value of api_port.
func (*ServerUpdate) ClearAPISecret ¶
func (su *ServerUpdate) ClearAPISecret() *ServerUpdate
ClearAPISecret clears the value of api_secret.
func (*ServerUpdate) ClearAPIUsername ¶
func (su *ServerUpdate) ClearAPIUsername() *ServerUpdate
ClearAPIUsername clears the value of api_username.
func (*ServerUpdate) ClearMapType ¶
func (su *ServerUpdate) ClearMapType() *ServerUpdate
ClearMapType clears the "map_type" edge to type MapType.
func (*ServerUpdate) ClearMetadata ¶
func (su *ServerUpdate) ClearMetadata() *ServerUpdate
ClearMetadata clears the "metadata" edge to type Metadata.
func (*ServerUpdate) ClearPlayers ¶
func (su *ServerUpdate) ClearPlayers() *ServerUpdate
ClearPlayers clears all "players" edges to type Player.
func (*ServerUpdate) ClearServerType ¶
func (su *ServerUpdate) ClearServerType() *ServerUpdate
ClearServerType clears the "server_type" edge to type ServerType.
func (*ServerUpdate) Exec ¶
func (su *ServerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ServerUpdate) ExecX ¶
func (su *ServerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServerUpdate) Mutation ¶
func (su *ServerUpdate) Mutation() *ServerMutation
Mutation returns the ServerMutation object of the builder.
func (*ServerUpdate) RemovePlayerIDs ¶
func (su *ServerUpdate) RemovePlayerIDs(ids ...int) *ServerUpdate
RemovePlayerIDs removes the players edge to Player by ids.
func (*ServerUpdate) RemovePlayers ¶
func (su *ServerUpdate) RemovePlayers(p ...*Player) *ServerUpdate
RemovePlayers removes players edges to Player.
func (*ServerUpdate) Save ¶
func (su *ServerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ServerUpdate) SaveX ¶
func (su *ServerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ServerUpdate) SetAPIAddress ¶
func (su *ServerUpdate) SetAPIAddress(s string) *ServerUpdate
SetAPIAddress sets the api_address field.
func (*ServerUpdate) SetAPIPort ¶
func (su *ServerUpdate) SetAPIPort(s string) *ServerUpdate
SetAPIPort sets the api_port field.
func (*ServerUpdate) SetAPISecret ¶
func (su *ServerUpdate) SetAPISecret(s string) *ServerUpdate
SetAPISecret sets the api_secret field.
func (*ServerUpdate) SetAPIUsername ¶
func (su *ServerUpdate) SetAPIUsername(s string) *ServerUpdate
SetAPIUsername sets the api_username field.
func (*ServerUpdate) SetMapType ¶
func (su *ServerUpdate) SetMapType(m *MapType) *ServerUpdate
SetMapType sets the map_type edge to MapType.
func (*ServerUpdate) SetMapTypeID ¶
func (su *ServerUpdate) SetMapTypeID(id int) *ServerUpdate
SetMapTypeID sets the map_type edge to MapType by id.
func (*ServerUpdate) SetMetadata ¶
func (su *ServerUpdate) SetMetadata(m *Metadata) *ServerUpdate
SetMetadata sets the metadata edge to Metadata.
func (*ServerUpdate) SetMetadataID ¶
func (su *ServerUpdate) SetMetadataID(id int) *ServerUpdate
SetMetadataID sets the metadata edge to Metadata by id.
func (*ServerUpdate) SetName ¶
func (su *ServerUpdate) SetName(s string) *ServerUpdate
SetName sets the name field.
func (*ServerUpdate) SetNillableAPIAddress ¶
func (su *ServerUpdate) SetNillableAPIAddress(s *string) *ServerUpdate
SetNillableAPIAddress sets the api_address field if the given value is not nil.
func (*ServerUpdate) SetNillableAPIPort ¶
func (su *ServerUpdate) SetNillableAPIPort(s *string) *ServerUpdate
SetNillableAPIPort sets the api_port field if the given value is not nil.
func (*ServerUpdate) SetNillableAPISecret ¶
func (su *ServerUpdate) SetNillableAPISecret(s *string) *ServerUpdate
SetNillableAPISecret sets the api_secret field if the given value is not nil.
func (*ServerUpdate) SetNillableAPIUsername ¶
func (su *ServerUpdate) SetNillableAPIUsername(s *string) *ServerUpdate
SetNillableAPIUsername sets the api_username field if the given value is not nil.
func (*ServerUpdate) SetNillableMapTypeID ¶
func (su *ServerUpdate) SetNillableMapTypeID(id *int) *ServerUpdate
SetNillableMapTypeID sets the map_type edge to MapType by id if the given value is not nil.
func (*ServerUpdate) SetNillableMetadataID ¶
func (su *ServerUpdate) SetNillableMetadataID(id *int) *ServerUpdate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*ServerUpdate) SetNillableServerTypeID ¶
func (su *ServerUpdate) SetNillableServerTypeID(id *int) *ServerUpdate
SetNillableServerTypeID sets the server_type edge to ServerType by id if the given value is not nil.
func (*ServerUpdate) SetServerType ¶
func (su *ServerUpdate) SetServerType(s *ServerType) *ServerUpdate
SetServerType sets the server_type edge to ServerType.
func (*ServerUpdate) SetServerTypeID ¶
func (su *ServerUpdate) SetServerTypeID(id int) *ServerUpdate
SetServerTypeID sets the server_type edge to ServerType by id.
func (*ServerUpdate) SetUpdatedAt ¶
func (su *ServerUpdate) SetUpdatedAt(t time.Time) *ServerUpdate
SetUpdatedAt sets the updated_at field.
func (*ServerUpdate) Where ¶
func (su *ServerUpdate) Where(ps ...predicate.Server) *ServerUpdate
Where adds a new predicate for the builder.
type ServerUpdateOne ¶
type ServerUpdateOne struct {
// contains filtered or unexported fields
}
ServerUpdateOne is the builder for updating a single Server entity.
func (*ServerUpdateOne) AddPlayerIDs ¶
func (suo *ServerUpdateOne) AddPlayerIDs(ids ...int) *ServerUpdateOne
AddPlayerIDs adds the players edge to Player by ids.
func (*ServerUpdateOne) AddPlayers ¶
func (suo *ServerUpdateOne) AddPlayers(p ...*Player) *ServerUpdateOne
AddPlayers adds the players edges to Player.
func (*ServerUpdateOne) ClearAPIAddress ¶
func (suo *ServerUpdateOne) ClearAPIAddress() *ServerUpdateOne
ClearAPIAddress clears the value of api_address.
func (*ServerUpdateOne) ClearAPIPort ¶
func (suo *ServerUpdateOne) ClearAPIPort() *ServerUpdateOne
ClearAPIPort clears the value of api_port.
func (*ServerUpdateOne) ClearAPISecret ¶
func (suo *ServerUpdateOne) ClearAPISecret() *ServerUpdateOne
ClearAPISecret clears the value of api_secret.
func (*ServerUpdateOne) ClearAPIUsername ¶
func (suo *ServerUpdateOne) ClearAPIUsername() *ServerUpdateOne
ClearAPIUsername clears the value of api_username.
func (*ServerUpdateOne) ClearMapType ¶
func (suo *ServerUpdateOne) ClearMapType() *ServerUpdateOne
ClearMapType clears the "map_type" edge to type MapType.
func (*ServerUpdateOne) ClearMetadata ¶
func (suo *ServerUpdateOne) ClearMetadata() *ServerUpdateOne
ClearMetadata clears the "metadata" edge to type Metadata.
func (*ServerUpdateOne) ClearPlayers ¶
func (suo *ServerUpdateOne) ClearPlayers() *ServerUpdateOne
ClearPlayers clears all "players" edges to type Player.
func (*ServerUpdateOne) ClearServerType ¶
func (suo *ServerUpdateOne) ClearServerType() *ServerUpdateOne
ClearServerType clears the "server_type" edge to type ServerType.
func (*ServerUpdateOne) Exec ¶
func (suo *ServerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ServerUpdateOne) ExecX ¶
func (suo *ServerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServerUpdateOne) Mutation ¶
func (suo *ServerUpdateOne) Mutation() *ServerMutation
Mutation returns the ServerMutation object of the builder.
func (*ServerUpdateOne) RemovePlayerIDs ¶
func (suo *ServerUpdateOne) RemovePlayerIDs(ids ...int) *ServerUpdateOne
RemovePlayerIDs removes the players edge to Player by ids.
func (*ServerUpdateOne) RemovePlayers ¶
func (suo *ServerUpdateOne) RemovePlayers(p ...*Player) *ServerUpdateOne
RemovePlayers removes players edges to Player.
func (*ServerUpdateOne) Save ¶
func (suo *ServerUpdateOne) Save(ctx context.Context) (*Server, error)
Save executes the query and returns the updated entity.
func (*ServerUpdateOne) SaveX ¶
func (suo *ServerUpdateOne) SaveX(ctx context.Context) *Server
SaveX is like Save, but panics if an error occurs.
func (*ServerUpdateOne) SetAPIAddress ¶
func (suo *ServerUpdateOne) SetAPIAddress(s string) *ServerUpdateOne
SetAPIAddress sets the api_address field.
func (*ServerUpdateOne) SetAPIPort ¶
func (suo *ServerUpdateOne) SetAPIPort(s string) *ServerUpdateOne
SetAPIPort sets the api_port field.
func (*ServerUpdateOne) SetAPISecret ¶
func (suo *ServerUpdateOne) SetAPISecret(s string) *ServerUpdateOne
SetAPISecret sets the api_secret field.
func (*ServerUpdateOne) SetAPIUsername ¶
func (suo *ServerUpdateOne) SetAPIUsername(s string) *ServerUpdateOne
SetAPIUsername sets the api_username field.
func (*ServerUpdateOne) SetMapType ¶
func (suo *ServerUpdateOne) SetMapType(m *MapType) *ServerUpdateOne
SetMapType sets the map_type edge to MapType.
func (*ServerUpdateOne) SetMapTypeID ¶
func (suo *ServerUpdateOne) SetMapTypeID(id int) *ServerUpdateOne
SetMapTypeID sets the map_type edge to MapType by id.
func (*ServerUpdateOne) SetMetadata ¶
func (suo *ServerUpdateOne) SetMetadata(m *Metadata) *ServerUpdateOne
SetMetadata sets the metadata edge to Metadata.
func (*ServerUpdateOne) SetMetadataID ¶
func (suo *ServerUpdateOne) SetMetadataID(id int) *ServerUpdateOne
SetMetadataID sets the metadata edge to Metadata by id.
func (*ServerUpdateOne) SetName ¶
func (suo *ServerUpdateOne) SetName(s string) *ServerUpdateOne
SetName sets the name field.
func (*ServerUpdateOne) SetNillableAPIAddress ¶
func (suo *ServerUpdateOne) SetNillableAPIAddress(s *string) *ServerUpdateOne
SetNillableAPIAddress sets the api_address field if the given value is not nil.
func (*ServerUpdateOne) SetNillableAPIPort ¶
func (suo *ServerUpdateOne) SetNillableAPIPort(s *string) *ServerUpdateOne
SetNillableAPIPort sets the api_port field if the given value is not nil.
func (*ServerUpdateOne) SetNillableAPISecret ¶
func (suo *ServerUpdateOne) SetNillableAPISecret(s *string) *ServerUpdateOne
SetNillableAPISecret sets the api_secret field if the given value is not nil.
func (*ServerUpdateOne) SetNillableAPIUsername ¶
func (suo *ServerUpdateOne) SetNillableAPIUsername(s *string) *ServerUpdateOne
SetNillableAPIUsername sets the api_username field if the given value is not nil.
func (*ServerUpdateOne) SetNillableMapTypeID ¶
func (suo *ServerUpdateOne) SetNillableMapTypeID(id *int) *ServerUpdateOne
SetNillableMapTypeID sets the map_type edge to MapType by id if the given value is not nil.
func (*ServerUpdateOne) SetNillableMetadataID ¶
func (suo *ServerUpdateOne) SetNillableMetadataID(id *int) *ServerUpdateOne
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*ServerUpdateOne) SetNillableServerTypeID ¶
func (suo *ServerUpdateOne) SetNillableServerTypeID(id *int) *ServerUpdateOne
SetNillableServerTypeID sets the server_type edge to ServerType by id if the given value is not nil.
func (*ServerUpdateOne) SetServerType ¶
func (suo *ServerUpdateOne) SetServerType(s *ServerType) *ServerUpdateOne
SetServerType sets the server_type edge to ServerType.
func (*ServerUpdateOne) SetServerTypeID ¶
func (suo *ServerUpdateOne) SetServerTypeID(id int) *ServerUpdateOne
SetServerTypeID sets the server_type edge to ServerType by id.
func (*ServerUpdateOne) SetUpdatedAt ¶
func (suo *ServerUpdateOne) SetUpdatedAt(t time.Time) *ServerUpdateOne
SetUpdatedAt sets the updated_at field.
type Session ¶
type Session struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // IPAddress holds the value of the "ip_address" field. IPAddress string `json:"ip_address,omitempty"` // BrowserName holds the value of the "browser_name" field. BrowserName string `json:"browser_name,omitempty"` // BrowserVersion holds the value of the "browser_version" field. BrowserVersion string `json:"browser_version,omitempty"` // DeviceOs holds the value of the "device_os" field. DeviceOs string `json:"device_os,omitempty"` // DeviceType holds the value of the "device_type" field. DeviceType string `json:"device_type,omitempty"` // TerminatedAt holds the value of the "terminated_at" field. TerminatedAt *time.Time `json:"terminated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SessionQuery when eager-loading is set. Edges SessionEdges `json:"edges"` // contains filtered or unexported fields }
Session is the model entity for the Session schema.
func (*Session) QueryToken ¶
func (s *Session) QueryToken() *TokenQuery
QueryToken queries the token edge of the Session.
func (*Session) ToEdge ¶
func (s *Session) ToEdge(order *SessionOrder) *SessionEdge
ToEdge converts Session into SessionEdge.
func (*Session) 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 (*Session) Update ¶
func (s *Session) Update() *SessionUpdateOne
Update returns a builder for updating this Session. Note that, you need to call Session.Unwrap() before calling this method, if this Session was returned from a transaction, and the transaction was committed or rolled back.
type SessionClient ¶
type SessionClient struct {
// contains filtered or unexported fields
}
SessionClient is a client for the Session schema.
func NewSessionClient ¶
func NewSessionClient(c config) *SessionClient
NewSessionClient returns a client for the Session from the given config.
func (*SessionClient) Create ¶
func (c *SessionClient) Create() *SessionCreate
Create returns a create builder for Session.
func (*SessionClient) CreateBulk ¶
func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
CreateBulk returns a builder for creating a bulk of Session entities.
func (*SessionClient) Delete ¶
func (c *SessionClient) Delete() *SessionDelete
Delete returns a delete builder for Session.
func (*SessionClient) DeleteOne ¶
func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SessionClient) DeleteOneID ¶
func (c *SessionClient) DeleteOneID(id int) *SessionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SessionClient) GetX ¶
func (c *SessionClient) GetX(ctx context.Context, id int) *Session
GetX is like Get, but panics if an error occurs.
func (*SessionClient) Hooks ¶
func (c *SessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SessionClient) Query ¶
func (c *SessionClient) Query() *SessionQuery
Query returns a query builder for Session.
func (*SessionClient) QueryToken ¶
func (c *SessionClient) QueryToken(s *Session) *TokenQuery
QueryToken queries the token edge of a Session.
func (*SessionClient) QueryUser ¶
func (c *SessionClient) QueryUser(s *Session) *UserQuery
QueryUser queries the user edge of a Session.
func (*SessionClient) Update ¶
func (c *SessionClient) Update() *SessionUpdate
Update returns an update builder for Session.
func (*SessionClient) UpdateOne ¶
func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SessionClient) UpdateOneID ¶
func (c *SessionClient) UpdateOneID(id int) *SessionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SessionClient) Use ¶
func (c *SessionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `session.Hooks(f(g(h())))`.
type SessionConnection ¶
type SessionConnection struct { Edges []*SessionEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
SessionConnection is the connection containing edges to Session.
type SessionCreate ¶
type SessionCreate struct {
// contains filtered or unexported fields
}
SessionCreate is the builder for creating a Session entity.
func (*SessionCreate) Mutation ¶
func (sc *SessionCreate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionCreate) Save ¶
func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
Save creates the Session in the database.
func (*SessionCreate) SaveX ¶
func (sc *SessionCreate) SaveX(ctx context.Context) *Session
SaveX calls Save and panics if Save returns an error.
func (*SessionCreate) SetBrowserName ¶
func (sc *SessionCreate) SetBrowserName(s string) *SessionCreate
SetBrowserName sets the browser_name field.
func (*SessionCreate) SetBrowserVersion ¶
func (sc *SessionCreate) SetBrowserVersion(s string) *SessionCreate
SetBrowserVersion sets the browser_version field.
func (*SessionCreate) SetCreateTime ¶
func (sc *SessionCreate) SetCreateTime(t time.Time) *SessionCreate
SetCreateTime sets the create_time field.
func (*SessionCreate) SetDeviceOs ¶
func (sc *SessionCreate) SetDeviceOs(s string) *SessionCreate
SetDeviceOs sets the device_os field.
func (*SessionCreate) SetDeviceType ¶
func (sc *SessionCreate) SetDeviceType(s string) *SessionCreate
SetDeviceType sets the device_type field.
func (*SessionCreate) SetIPAddress ¶
func (sc *SessionCreate) SetIPAddress(s string) *SessionCreate
SetIPAddress sets the ip_address field.
func (*SessionCreate) SetNillableCreateTime ¶
func (sc *SessionCreate) SetNillableCreateTime(t *time.Time) *SessionCreate
SetNillableCreateTime sets the create_time field if the given value is not nil.
func (*SessionCreate) SetNillableTerminatedAt ¶
func (sc *SessionCreate) SetNillableTerminatedAt(t *time.Time) *SessionCreate
SetNillableTerminatedAt sets the terminated_at field if the given value is not nil.
func (*SessionCreate) SetNillableTokenID ¶
func (sc *SessionCreate) SetNillableTokenID(id *int) *SessionCreate
SetNillableTokenID sets the token edge to Token by id if the given value is not nil.
func (*SessionCreate) SetNillableUpdateTime ¶
func (sc *SessionCreate) SetNillableUpdateTime(t *time.Time) *SessionCreate
SetNillableUpdateTime sets the update_time field if the given value is not nil.
func (*SessionCreate) SetNillableUserID ¶
func (sc *SessionCreate) SetNillableUserID(id *int) *SessionCreate
SetNillableUserID sets the user edge to User by id if the given value is not nil.
func (*SessionCreate) SetTerminatedAt ¶
func (sc *SessionCreate) SetTerminatedAt(t time.Time) *SessionCreate
SetTerminatedAt sets the terminated_at field.
func (*SessionCreate) SetToken ¶
func (sc *SessionCreate) SetToken(t *Token) *SessionCreate
SetToken sets the token edge to Token.
func (*SessionCreate) SetTokenID ¶
func (sc *SessionCreate) SetTokenID(id int) *SessionCreate
SetTokenID sets the token edge to Token by id.
func (*SessionCreate) SetUpdateTime ¶
func (sc *SessionCreate) SetUpdateTime(t time.Time) *SessionCreate
SetUpdateTime sets the update_time field.
func (*SessionCreate) SetUser ¶
func (sc *SessionCreate) SetUser(u *User) *SessionCreate
SetUser sets the user edge to User.
func (*SessionCreate) SetUserID ¶
func (sc *SessionCreate) SetUserID(id int) *SessionCreate
SetUserID sets the user edge to User by id.
type SessionCreateBulk ¶
type SessionCreateBulk struct {
// contains filtered or unexported fields
}
SessionCreateBulk is the builder for creating a bulk of Session entities.
type SessionDelete ¶
type SessionDelete struct {
// contains filtered or unexported fields
}
SessionDelete is the builder for deleting a Session entity.
func (*SessionDelete) Exec ¶
func (sd *SessionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SessionDelete) ExecX ¶
func (sd *SessionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SessionDelete) Where ¶
func (sd *SessionDelete) Where(ps ...predicate.Session) *SessionDelete
Where adds a new predicate to the delete builder.
type SessionDeleteOne ¶
type SessionDeleteOne struct {
// contains filtered or unexported fields
}
SessionDeleteOne is the builder for deleting a single Session entity.
func (*SessionDeleteOne) Exec ¶
func (sdo *SessionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SessionDeleteOne) ExecX ¶
func (sdo *SessionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SessionEdge ¶
SessionEdge is the edge representation of Session.
type SessionEdges ¶
type SessionEdges struct { // Token holds the value of the token edge. Token *Token // User holds the value of the user edge. User *User // contains filtered or unexported fields }
SessionEdges holds the relations/edges for other nodes in the graph.
func (SessionEdges) TokenOrErr ¶
func (e SessionEdges) TokenOrErr() (*Token, error)
TokenOrErr returns the Token value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SessionEdges) UserOrErr ¶
func (e SessionEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SessionGroupBy ¶
type SessionGroupBy struct {
// contains filtered or unexported fields
}
SessionGroupBy is the builder for group-by Session entities.
func (*SessionGroupBy) Aggregate ¶
func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SessionGroupBy) Bool ¶
func (sgb *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) BoolX ¶
func (sgb *SessionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SessionGroupBy) Bools ¶
func (sgb *SessionGroupBy) 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 (*SessionGroupBy) BoolsX ¶
func (sgb *SessionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SessionGroupBy) Float64 ¶
func (sgb *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) Float64X ¶
func (sgb *SessionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SessionGroupBy) Float64s ¶
func (sgb *SessionGroupBy) 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 (*SessionGroupBy) Float64sX ¶
func (sgb *SessionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SessionGroupBy) Int ¶
func (sgb *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) IntX ¶
func (sgb *SessionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SessionGroupBy) Ints ¶
func (sgb *SessionGroupBy) 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 (*SessionGroupBy) IntsX ¶
func (sgb *SessionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SessionGroupBy) Scan ¶
func (sgb *SessionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*SessionGroupBy) ScanX ¶
func (sgb *SessionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SessionGroupBy) String ¶
func (sgb *SessionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) StringX ¶
func (sgb *SessionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SessionMutation ¶
type SessionMutation struct {
// contains filtered or unexported fields
}
SessionMutation represents an operation that mutate the Sessions nodes in the graph.
func (*SessionMutation) AddField ¶
func (m *SessionMutation) 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 (*SessionMutation) AddedEdges ¶
func (m *SessionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SessionMutation) AddedField ¶
func (m *SessionMutation) 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 (*SessionMutation) AddedFields ¶
func (m *SessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*SessionMutation) AddedIDs ¶
func (m *SessionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*SessionMutation) BrowserName ¶
func (m *SessionMutation) BrowserName() (r string, exists bool)
BrowserName returns the browser_name value in the mutation.
func (*SessionMutation) BrowserVersion ¶
func (m *SessionMutation) BrowserVersion() (r string, exists bool)
BrowserVersion returns the browser_version value in the mutation.
func (*SessionMutation) ClearEdge ¶
func (m *SessionMutation) 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 (*SessionMutation) ClearField ¶
func (m *SessionMutation) 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 (*SessionMutation) ClearTerminatedAt ¶
func (m *SessionMutation) ClearTerminatedAt()
ClearTerminatedAt clears the value of terminated_at.
func (*SessionMutation) ClearToken ¶
func (m *SessionMutation) ClearToken()
ClearToken clears the token edge to Token.
func (*SessionMutation) ClearUser ¶
func (m *SessionMutation) ClearUser()
ClearUser clears the user edge to User.
func (*SessionMutation) ClearedEdges ¶
func (m *SessionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SessionMutation) ClearedFields ¶
func (m *SessionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SessionMutation) Client ¶
func (m SessionMutation) 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 (*SessionMutation) CreateTime ¶
func (m *SessionMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the create_time value in the mutation.
func (*SessionMutation) DeviceOs ¶
func (m *SessionMutation) DeviceOs() (r string, exists bool)
DeviceOs returns the device_os value in the mutation.
func (*SessionMutation) DeviceType ¶
func (m *SessionMutation) DeviceType() (r string, exists bool)
DeviceType returns the device_type value in the mutation.
func (*SessionMutation) EdgeCleared ¶
func (m *SessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*SessionMutation) Field ¶
func (m *SessionMutation) 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 (*SessionMutation) FieldCleared ¶
func (m *SessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*SessionMutation) Fields ¶
func (m *SessionMutation) 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 (*SessionMutation) ID ¶
func (m *SessionMutation) 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 (*SessionMutation) IPAddress ¶
func (m *SessionMutation) IPAddress() (r string, exists bool)
IPAddress returns the ip_address value in the mutation.
func (*SessionMutation) OldBrowserName ¶
func (m *SessionMutation) OldBrowserName(ctx context.Context) (v string, err error)
OldBrowserName returns the old browser_name value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldBrowserVersion ¶
func (m *SessionMutation) OldBrowserVersion(ctx context.Context) (v string, err error)
OldBrowserVersion returns the old browser_version value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldCreateTime ¶
OldCreateTime returns the old create_time value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldDeviceOs ¶
func (m *SessionMutation) OldDeviceOs(ctx context.Context) (v string, err error)
OldDeviceOs returns the old device_os value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldDeviceType ¶
func (m *SessionMutation) OldDeviceType(ctx context.Context) (v string, err error)
OldDeviceType returns the old device_type value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*SessionMutation) OldIPAddress ¶
func (m *SessionMutation) OldIPAddress(ctx context.Context) (v string, err error)
OldIPAddress returns the old ip_address value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldTerminatedAt ¶
OldTerminatedAt returns the old terminated_at value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldUpdateTime ¶
OldUpdateTime returns the old update_time value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) RemovedEdges ¶
func (m *SessionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SessionMutation) RemovedIDs ¶
func (m *SessionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*SessionMutation) ResetBrowserName ¶
func (m *SessionMutation) ResetBrowserName()
ResetBrowserName reset all changes of the "browser_name" field.
func (*SessionMutation) ResetBrowserVersion ¶
func (m *SessionMutation) ResetBrowserVersion()
ResetBrowserVersion reset all changes of the "browser_version" field.
func (*SessionMutation) ResetCreateTime ¶
func (m *SessionMutation) ResetCreateTime()
ResetCreateTime reset all changes of the "create_time" field.
func (*SessionMutation) ResetDeviceOs ¶
func (m *SessionMutation) ResetDeviceOs()
ResetDeviceOs reset all changes of the "device_os" field.
func (*SessionMutation) ResetDeviceType ¶
func (m *SessionMutation) ResetDeviceType()
ResetDeviceType reset all changes of the "device_type" field.
func (*SessionMutation) ResetEdge ¶
func (m *SessionMutation) 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 (*SessionMutation) ResetField ¶
func (m *SessionMutation) 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 (*SessionMutation) ResetIPAddress ¶
func (m *SessionMutation) ResetIPAddress()
ResetIPAddress reset all changes of the "ip_address" field.
func (*SessionMutation) ResetTerminatedAt ¶
func (m *SessionMutation) ResetTerminatedAt()
ResetTerminatedAt reset all changes of the "terminated_at" field.
func (*SessionMutation) ResetToken ¶
func (m *SessionMutation) ResetToken()
ResetToken reset all changes of the "token" edge.
func (*SessionMutation) ResetUpdateTime ¶
func (m *SessionMutation) ResetUpdateTime()
ResetUpdateTime reset all changes of the "update_time" field.
func (*SessionMutation) ResetUser ¶
func (m *SessionMutation) ResetUser()
ResetUser reset all changes of the "user" edge.
func (*SessionMutation) SetBrowserName ¶
func (m *SessionMutation) SetBrowserName(s string)
SetBrowserName sets the browser_name field.
func (*SessionMutation) SetBrowserVersion ¶
func (m *SessionMutation) SetBrowserVersion(s string)
SetBrowserVersion sets the browser_version field.
func (*SessionMutation) SetCreateTime ¶
func (m *SessionMutation) SetCreateTime(t time.Time)
SetCreateTime sets the create_time field.
func (*SessionMutation) SetDeviceOs ¶
func (m *SessionMutation) SetDeviceOs(s string)
SetDeviceOs sets the device_os field.
func (*SessionMutation) SetDeviceType ¶
func (m *SessionMutation) SetDeviceType(s string)
SetDeviceType sets the device_type field.
func (*SessionMutation) SetField ¶
func (m *SessionMutation) 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 (*SessionMutation) SetIPAddress ¶
func (m *SessionMutation) SetIPAddress(s string)
SetIPAddress sets the ip_address field.
func (*SessionMutation) SetTerminatedAt ¶
func (m *SessionMutation) SetTerminatedAt(t time.Time)
SetTerminatedAt sets the terminated_at field.
func (*SessionMutation) SetTokenID ¶
func (m *SessionMutation) SetTokenID(id int)
SetTokenID sets the token edge to Token by id.
func (*SessionMutation) SetUpdateTime ¶
func (m *SessionMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the update_time field.
func (*SessionMutation) SetUserID ¶
func (m *SessionMutation) SetUserID(id int)
SetUserID sets the user edge to User by id.
func (*SessionMutation) TerminatedAt ¶
func (m *SessionMutation) TerminatedAt() (r time.Time, exists bool)
TerminatedAt returns the terminated_at value in the mutation.
func (*SessionMutation) TerminatedAtCleared ¶
func (m *SessionMutation) TerminatedAtCleared() bool
TerminatedAtCleared returns if the field terminated_at was cleared in this mutation.
func (*SessionMutation) TokenCleared ¶
func (m *SessionMutation) TokenCleared() bool
TokenCleared returns if the edge token was cleared.
func (*SessionMutation) TokenID ¶
func (m *SessionMutation) TokenID() (id int, exists bool)
TokenID returns the token id in the mutation.
func (*SessionMutation) TokenIDs ¶
func (m *SessionMutation) TokenIDs() (ids []int)
TokenIDs returns the token ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use TokenID instead. It exists only for internal usage by the builders.
func (SessionMutation) Tx ¶
func (m SessionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SessionMutation) Type ¶
func (m *SessionMutation) Type() string
Type returns the node type of this mutation (Session).
func (*SessionMutation) UpdateTime ¶
func (m *SessionMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the update_time value in the mutation.
func (*SessionMutation) UserCleared ¶
func (m *SessionMutation) UserCleared() bool
UserCleared returns if the edge user was cleared.
func (*SessionMutation) UserID ¶
func (m *SessionMutation) UserID() (id int, exists bool)
UserID returns the user id in the mutation.
func (*SessionMutation) UserIDs ¶
func (m *SessionMutation) UserIDs() (ids []int)
UserIDs returns the user ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
type SessionOrder ¶
type SessionOrder struct { Direction OrderDirection `json:"direction"` Field *SessionOrderField `json:"field"` }
SessionOrder defines the ordering of Session.
type SessionOrderField ¶
type SessionOrderField struct {
// contains filtered or unexported fields
}
SessionOrderField defines the ordering field of Session.
type SessionPaginateOption ¶
type SessionPaginateOption func(*sessionPager) error
SessionPaginateOption enables pagination customization.
func WithSessionFilter ¶
func WithSessionFilter(filter func(*SessionQuery) (*SessionQuery, error)) SessionPaginateOption
WithSessionFilter configures pagination filter.
func WithSessionOrder ¶
func WithSessionOrder(order *SessionOrder) SessionPaginateOption
WithSessionOrder configures pagination ordering.
type SessionQuery ¶
type SessionQuery struct {
// contains filtered or unexported fields
}
SessionQuery is the builder for querying Session entities.
func (*SessionQuery) All ¶
func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
All executes the query and returns a list of Sessions.
func (*SessionQuery) AllX ¶
func (sq *SessionQuery) AllX(ctx context.Context) []*Session
AllX is like All, but panics if an error occurs.
func (*SessionQuery) Clone ¶
func (sq *SessionQuery) Clone() *SessionQuery
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 (*SessionQuery) CollectFields ¶
func (s *SessionQuery) CollectFields(ctx context.Context, satisfies ...string) *SessionQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*SessionQuery) Count ¶
func (sq *SessionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SessionQuery) CountX ¶
func (sq *SessionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SessionQuery) Exist ¶
func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SessionQuery) ExistX ¶
func (sq *SessionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SessionQuery) First ¶
func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
First returns the first Session entity in the query. Returns *NotFoundError when no session was found.
func (*SessionQuery) FirstID ¶
func (sq *SessionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Session id in the query. Returns *NotFoundError when no id was found.
func (*SessionQuery) FirstIDX ¶
func (sq *SessionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SessionQuery) FirstX ¶
func (sq *SessionQuery) FirstX(ctx context.Context) *Session
FirstX is like First, but panics if an error occurs.
func (*SessionQuery) GroupBy ¶
func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Session.Query(). GroupBy(session.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SessionQuery) IDs ¶
func (sq *SessionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Session ids.
func (*SessionQuery) IDsX ¶
func (sq *SessionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SessionQuery) Limit ¶
func (sq *SessionQuery) Limit(limit int) *SessionQuery
Limit adds a limit step to the query.
func (*SessionQuery) Offset ¶
func (sq *SessionQuery) Offset(offset int) *SessionQuery
Offset adds an offset step to the query.
func (*SessionQuery) Only ¶
func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
Only returns the only Session entity in the query, returns an error if not exactly one entity was returned.
func (*SessionQuery) OnlyID ¶
func (sq *SessionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Session id in the query, returns an error if not exactly one id was returned.
func (*SessionQuery) OnlyIDX ¶
func (sq *SessionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SessionQuery) OnlyX ¶
func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
OnlyX is like Only, but panics if an error occurs.
func (*SessionQuery) Order ¶
func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
Order adds an order step to the query.
func (*SessionQuery) Paginate ¶
func (s *SessionQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...SessionPaginateOption, ) (*SessionConnection, error)
Paginate executes the query and returns a relay based cursor connection to Session.
func (*SessionQuery) QueryToken ¶
func (sq *SessionQuery) QueryToken() *TokenQuery
QueryToken chains the current query on the token edge.
func (*SessionQuery) QueryUser ¶
func (sq *SessionQuery) QueryUser() *UserQuery
QueryUser chains the current query on the user edge.
func (*SessionQuery) Select ¶
func (sq *SessionQuery) Select(field string, fields ...string) *SessionSelect
Select one or more fields from the given query.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Session.Query(). Select(session.FieldCreateTime). Scan(ctx, &v)
func (*SessionQuery) Where ¶
func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
Where adds a new predicate for the builder.
func (*SessionQuery) WithToken ¶
func (sq *SessionQuery) WithToken(opts ...func(*TokenQuery)) *SessionQuery
WithToken tells the query-builder to eager-loads the nodes that are connected to
the "token" edge. The optional arguments used to configure the query builder of the edge.
func (*SessionQuery) WithUser ¶
func (sq *SessionQuery) WithUser(opts ...func(*UserQuery)) *SessionQuery
WithUser tells the query-builder to eager-loads the nodes that are connected to
the "user" edge. The optional arguments used to configure the query builder of the edge.
type SessionSelect ¶
type SessionSelect struct { *SessionQuery // contains filtered or unexported fields }
SessionSelect is the builder for select fields of Session entities.
func (*SessionSelect) Bool ¶
func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*SessionSelect) BoolX ¶
func (ss *SessionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SessionSelect) Bools ¶
func (ss *SessionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*SessionSelect) BoolsX ¶
func (ss *SessionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SessionSelect) Float64 ¶
func (ss *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64X ¶
func (ss *SessionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SessionSelect) Float64s ¶
func (ss *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64sX ¶
func (ss *SessionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SessionSelect) Int ¶
func (ss *SessionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*SessionSelect) IntX ¶
func (ss *SessionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SessionSelect) Ints ¶
func (ss *SessionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*SessionSelect) IntsX ¶
func (ss *SessionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SessionSelect) Scan ¶
func (ss *SessionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*SessionSelect) ScanX ¶
func (ss *SessionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SessionSelect) String ¶
func (ss *SessionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*SessionSelect) StringX ¶
func (ss *SessionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SessionUpdate ¶
type SessionUpdate struct {
// contains filtered or unexported fields
}
SessionUpdate is the builder for updating Session entities.
func (*SessionUpdate) ClearTerminatedAt ¶
func (su *SessionUpdate) ClearTerminatedAt() *SessionUpdate
ClearTerminatedAt clears the value of terminated_at.
func (*SessionUpdate) ClearToken ¶
func (su *SessionUpdate) ClearToken() *SessionUpdate
ClearToken clears the "token" edge to type Token.
func (*SessionUpdate) ClearUser ¶
func (su *SessionUpdate) ClearUser() *SessionUpdate
ClearUser clears the "user" edge to type User.
func (*SessionUpdate) Exec ¶
func (su *SessionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionUpdate) ExecX ¶
func (su *SessionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdate) Mutation ¶
func (su *SessionUpdate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdate) Save ¶
func (su *SessionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SessionUpdate) SaveX ¶
func (su *SessionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdate) SetBrowserName ¶
func (su *SessionUpdate) SetBrowserName(s string) *SessionUpdate
SetBrowserName sets the browser_name field.
func (*SessionUpdate) SetBrowserVersion ¶
func (su *SessionUpdate) SetBrowserVersion(s string) *SessionUpdate
SetBrowserVersion sets the browser_version field.
func (*SessionUpdate) SetDeviceOs ¶
func (su *SessionUpdate) SetDeviceOs(s string) *SessionUpdate
SetDeviceOs sets the device_os field.
func (*SessionUpdate) SetDeviceType ¶
func (su *SessionUpdate) SetDeviceType(s string) *SessionUpdate
SetDeviceType sets the device_type field.
func (*SessionUpdate) SetIPAddress ¶
func (su *SessionUpdate) SetIPAddress(s string) *SessionUpdate
SetIPAddress sets the ip_address field.
func (*SessionUpdate) SetNillableTerminatedAt ¶
func (su *SessionUpdate) SetNillableTerminatedAt(t *time.Time) *SessionUpdate
SetNillableTerminatedAt sets the terminated_at field if the given value is not nil.
func (*SessionUpdate) SetNillableTokenID ¶
func (su *SessionUpdate) SetNillableTokenID(id *int) *SessionUpdate
SetNillableTokenID sets the token edge to Token by id if the given value is not nil.
func (*SessionUpdate) SetNillableUserID ¶
func (su *SessionUpdate) SetNillableUserID(id *int) *SessionUpdate
SetNillableUserID sets the user edge to User by id if the given value is not nil.
func (*SessionUpdate) SetTerminatedAt ¶
func (su *SessionUpdate) SetTerminatedAt(t time.Time) *SessionUpdate
SetTerminatedAt sets the terminated_at field.
func (*SessionUpdate) SetToken ¶
func (su *SessionUpdate) SetToken(t *Token) *SessionUpdate
SetToken sets the token edge to Token.
func (*SessionUpdate) SetTokenID ¶
func (su *SessionUpdate) SetTokenID(id int) *SessionUpdate
SetTokenID sets the token edge to Token by id.
func (*SessionUpdate) SetUser ¶
func (su *SessionUpdate) SetUser(u *User) *SessionUpdate
SetUser sets the user edge to User.
func (*SessionUpdate) SetUserID ¶
func (su *SessionUpdate) SetUserID(id int) *SessionUpdate
SetUserID sets the user edge to User by id.
func (*SessionUpdate) Where ¶
func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
Where adds a new predicate for the builder.
type SessionUpdateOne ¶
type SessionUpdateOne struct {
// contains filtered or unexported fields
}
SessionUpdateOne is the builder for updating a single Session entity.
func (*SessionUpdateOne) ClearTerminatedAt ¶
func (suo *SessionUpdateOne) ClearTerminatedAt() *SessionUpdateOne
ClearTerminatedAt clears the value of terminated_at.
func (*SessionUpdateOne) ClearToken ¶
func (suo *SessionUpdateOne) ClearToken() *SessionUpdateOne
ClearToken clears the "token" edge to type Token.
func (*SessionUpdateOne) ClearUser ¶
func (suo *SessionUpdateOne) ClearUser() *SessionUpdateOne
ClearUser clears the "user" edge to type User.
func (*SessionUpdateOne) Exec ¶
func (suo *SessionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SessionUpdateOne) ExecX ¶
func (suo *SessionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdateOne) Mutation ¶
func (suo *SessionUpdateOne) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdateOne) Save ¶
func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
Save executes the query and returns the updated entity.
func (*SessionUpdateOne) SaveX ¶
func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdateOne) SetBrowserName ¶
func (suo *SessionUpdateOne) SetBrowserName(s string) *SessionUpdateOne
SetBrowserName sets the browser_name field.
func (*SessionUpdateOne) SetBrowserVersion ¶
func (suo *SessionUpdateOne) SetBrowserVersion(s string) *SessionUpdateOne
SetBrowserVersion sets the browser_version field.
func (*SessionUpdateOne) SetDeviceOs ¶
func (suo *SessionUpdateOne) SetDeviceOs(s string) *SessionUpdateOne
SetDeviceOs sets the device_os field.
func (*SessionUpdateOne) SetDeviceType ¶
func (suo *SessionUpdateOne) SetDeviceType(s string) *SessionUpdateOne
SetDeviceType sets the device_type field.
func (*SessionUpdateOne) SetIPAddress ¶
func (suo *SessionUpdateOne) SetIPAddress(s string) *SessionUpdateOne
SetIPAddress sets the ip_address field.
func (*SessionUpdateOne) SetNillableTerminatedAt ¶
func (suo *SessionUpdateOne) SetNillableTerminatedAt(t *time.Time) *SessionUpdateOne
SetNillableTerminatedAt sets the terminated_at field if the given value is not nil.
func (*SessionUpdateOne) SetNillableTokenID ¶
func (suo *SessionUpdateOne) SetNillableTokenID(id *int) *SessionUpdateOne
SetNillableTokenID sets the token edge to Token by id if the given value is not nil.
func (*SessionUpdateOne) SetNillableUserID ¶
func (suo *SessionUpdateOne) SetNillableUserID(id *int) *SessionUpdateOne
SetNillableUserID sets the user edge to User by id if the given value is not nil.
func (*SessionUpdateOne) SetTerminatedAt ¶
func (suo *SessionUpdateOne) SetTerminatedAt(t time.Time) *SessionUpdateOne
SetTerminatedAt sets the terminated_at field.
func (*SessionUpdateOne) SetToken ¶
func (suo *SessionUpdateOne) SetToken(t *Token) *SessionUpdateOne
SetToken sets the token edge to Token.
func (*SessionUpdateOne) SetTokenID ¶
func (suo *SessionUpdateOne) SetTokenID(id int) *SessionUpdateOne
SetTokenID sets the token edge to Token by id.
func (*SessionUpdateOne) SetUser ¶
func (suo *SessionUpdateOne) SetUser(u *User) *SessionUpdateOne
SetUser sets the user edge to User.
func (*SessionUpdateOne) SetUserID ¶
func (suo *SessionUpdateOne) SetUserID(id int) *SessionUpdateOne
SetUserID sets the user edge to User by id.
type Token ¶
type Token struct { // ID of the ent. ID int `json:"id,omitempty"` // ExpiredAt holds the value of the "expired_at" field. ExpiredAt time.Time `json:"expired_at,omitempty"` // BlockedAt holds the value of the "blocked_at" field. BlockedAt *time.Time `json:"blocked_at,omitempty"` // Claims holds the value of the "claims" field. Claims string `json:"claims,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TokenQuery when eager-loading is set. Edges TokenEdges `json:"edges"` // contains filtered or unexported fields }
Token is the model entity for the Token schema.
func (*Token) QuerySession ¶
func (t *Token) QuerySession() *SessionQuery
QuerySession queries the session edge of the Token.
func (*Token) ToEdge ¶
func (t *Token) ToEdge(order *TokenOrder) *TokenEdge
ToEdge converts Token into TokenEdge.
func (*Token) 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 (*Token) Update ¶
func (t *Token) Update() *TokenUpdateOne
Update returns a builder for updating this Token. Note that, you need to call Token.Unwrap() before calling this method, if this Token was returned from a transaction, and the transaction was committed or rolled back.
type TokenClient ¶
type TokenClient struct {
// contains filtered or unexported fields
}
TokenClient is a client for the Token schema.
func NewTokenClient ¶
func NewTokenClient(c config) *TokenClient
NewTokenClient returns a client for the Token from the given config.
func (*TokenClient) Create ¶
func (c *TokenClient) Create() *TokenCreate
Create returns a create builder for Token.
func (*TokenClient) CreateBulk ¶
func (c *TokenClient) CreateBulk(builders ...*TokenCreate) *TokenCreateBulk
CreateBulk returns a builder for creating a bulk of Token entities.
func (*TokenClient) Delete ¶
func (c *TokenClient) Delete() *TokenDelete
Delete returns a delete builder for Token.
func (*TokenClient) DeleteOne ¶
func (c *TokenClient) DeleteOne(t *Token) *TokenDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*TokenClient) DeleteOneID ¶
func (c *TokenClient) DeleteOneID(id int) *TokenDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*TokenClient) GetX ¶
func (c *TokenClient) GetX(ctx context.Context, id int) *Token
GetX is like Get, but panics if an error occurs.
func (*TokenClient) Query ¶
func (c *TokenClient) Query() *TokenQuery
Query returns a query builder for Token.
func (*TokenClient) QuerySession ¶
func (c *TokenClient) QuerySession(t *Token) *SessionQuery
QuerySession queries the session edge of a Token.
func (*TokenClient) Update ¶
func (c *TokenClient) Update() *TokenUpdate
Update returns an update builder for Token.
func (*TokenClient) UpdateOne ¶
func (c *TokenClient) UpdateOne(t *Token) *TokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TokenClient) UpdateOneID ¶
func (c *TokenClient) UpdateOneID(id int) *TokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TokenClient) Use ¶
func (c *TokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `token.Hooks(f(g(h())))`.
type TokenConnection ¶
type TokenConnection struct { Edges []*TokenEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
TokenConnection is the connection containing edges to Token.
type TokenCreate ¶
type TokenCreate struct {
// contains filtered or unexported fields
}
TokenCreate is the builder for creating a Token entity.
func (*TokenCreate) Mutation ¶
func (tc *TokenCreate) Mutation() *TokenMutation
Mutation returns the TokenMutation object of the builder.
func (*TokenCreate) Save ¶
func (tc *TokenCreate) Save(ctx context.Context) (*Token, error)
Save creates the Token in the database.
func (*TokenCreate) SaveX ¶
func (tc *TokenCreate) SaveX(ctx context.Context) *Token
SaveX calls Save and panics if Save returns an error.
func (*TokenCreate) SetBlockedAt ¶
func (tc *TokenCreate) SetBlockedAt(t time.Time) *TokenCreate
SetBlockedAt sets the blocked_at field.
func (*TokenCreate) SetClaims ¶
func (tc *TokenCreate) SetClaims(s string) *TokenCreate
SetClaims sets the claims field.
func (*TokenCreate) SetExpiredAt ¶
func (tc *TokenCreate) SetExpiredAt(t time.Time) *TokenCreate
SetExpiredAt sets the expired_at field.
func (*TokenCreate) SetNillableBlockedAt ¶
func (tc *TokenCreate) SetNillableBlockedAt(t *time.Time) *TokenCreate
SetNillableBlockedAt sets the blocked_at field if the given value is not nil.
func (*TokenCreate) SetNillableSessionID ¶
func (tc *TokenCreate) SetNillableSessionID(id *int) *TokenCreate
SetNillableSessionID sets the session edge to Session by id if the given value is not nil.
func (*TokenCreate) SetSession ¶
func (tc *TokenCreate) SetSession(s *Session) *TokenCreate
SetSession sets the session edge to Session.
func (*TokenCreate) SetSessionID ¶
func (tc *TokenCreate) SetSessionID(id int) *TokenCreate
SetSessionID sets the session edge to Session by id.
type TokenCreateBulk ¶
type TokenCreateBulk struct {
// contains filtered or unexported fields
}
TokenCreateBulk is the builder for creating a bulk of Token entities.
type TokenDelete ¶
type TokenDelete struct {
// contains filtered or unexported fields
}
TokenDelete is the builder for deleting a Token entity.
func (*TokenDelete) Exec ¶
func (td *TokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TokenDelete) ExecX ¶
func (td *TokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TokenDelete) Where ¶
func (td *TokenDelete) Where(ps ...predicate.Token) *TokenDelete
Where adds a new predicate to the delete builder.
type TokenDeleteOne ¶
type TokenDeleteOne struct {
// contains filtered or unexported fields
}
TokenDeleteOne is the builder for deleting a single Token entity.
func (*TokenDeleteOne) Exec ¶
func (tdo *TokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TokenDeleteOne) ExecX ¶
func (tdo *TokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TokenEdges ¶
type TokenEdges struct { // Session holds the value of the session edge. Session *Session // contains filtered or unexported fields }
TokenEdges holds the relations/edges for other nodes in the graph.
func (TokenEdges) SessionOrErr ¶
func (e TokenEdges) SessionOrErr() (*Session, error)
SessionOrErr returns the Session value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TokenGroupBy ¶
type TokenGroupBy struct {
// contains filtered or unexported fields
}
TokenGroupBy is the builder for group-by Token entities.
func (*TokenGroupBy) Aggregate ¶
func (tgb *TokenGroupBy) Aggregate(fns ...AggregateFunc) *TokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TokenGroupBy) Bool ¶
func (tgb *TokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*TokenGroupBy) BoolX ¶
func (tgb *TokenGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TokenGroupBy) Bools ¶
func (tgb *TokenGroupBy) 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 (*TokenGroupBy) BoolsX ¶
func (tgb *TokenGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TokenGroupBy) Float64 ¶
func (tgb *TokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*TokenGroupBy) Float64X ¶
func (tgb *TokenGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TokenGroupBy) Float64s ¶
func (tgb *TokenGroupBy) 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 (*TokenGroupBy) Float64sX ¶
func (tgb *TokenGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TokenGroupBy) Int ¶
func (tgb *TokenGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*TokenGroupBy) IntX ¶
func (tgb *TokenGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TokenGroupBy) Ints ¶
func (tgb *TokenGroupBy) 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 (*TokenGroupBy) IntsX ¶
func (tgb *TokenGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TokenGroupBy) Scan ¶
func (tgb *TokenGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*TokenGroupBy) ScanX ¶
func (tgb *TokenGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TokenGroupBy) String ¶
func (tgb *TokenGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*TokenGroupBy) StringX ¶
func (tgb *TokenGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TokenMutation ¶
type TokenMutation struct {
// contains filtered or unexported fields
}
TokenMutation represents an operation that mutate the Tokens nodes in the graph.
func (*TokenMutation) AddField ¶
func (m *TokenMutation) 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 (*TokenMutation) AddedEdges ¶
func (m *TokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TokenMutation) AddedField ¶
func (m *TokenMutation) 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 (*TokenMutation) AddedFields ¶
func (m *TokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*TokenMutation) AddedIDs ¶
func (m *TokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*TokenMutation) BlockedAt ¶
func (m *TokenMutation) BlockedAt() (r time.Time, exists bool)
BlockedAt returns the blocked_at value in the mutation.
func (*TokenMutation) BlockedAtCleared ¶
func (m *TokenMutation) BlockedAtCleared() bool
BlockedAtCleared returns if the field blocked_at was cleared in this mutation.
func (*TokenMutation) Claims ¶
func (m *TokenMutation) Claims() (r string, exists bool)
Claims returns the claims value in the mutation.
func (*TokenMutation) ClearBlockedAt ¶
func (m *TokenMutation) ClearBlockedAt()
ClearBlockedAt clears the value of blocked_at.
func (*TokenMutation) ClearEdge ¶
func (m *TokenMutation) 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 (*TokenMutation) ClearField ¶
func (m *TokenMutation) 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 (*TokenMutation) ClearSession ¶
func (m *TokenMutation) ClearSession()
ClearSession clears the session edge to Session.
func (*TokenMutation) ClearedEdges ¶
func (m *TokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TokenMutation) ClearedFields ¶
func (m *TokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TokenMutation) Client ¶
func (m TokenMutation) 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 (*TokenMutation) EdgeCleared ¶
func (m *TokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*TokenMutation) ExpiredAt ¶
func (m *TokenMutation) ExpiredAt() (r time.Time, exists bool)
ExpiredAt returns the expired_at value in the mutation.
func (*TokenMutation) Field ¶
func (m *TokenMutation) 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 (*TokenMutation) FieldCleared ¶
func (m *TokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*TokenMutation) Fields ¶
func (m *TokenMutation) 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 (*TokenMutation) ID ¶
func (m *TokenMutation) 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 (*TokenMutation) OldBlockedAt ¶
OldBlockedAt returns the old blocked_at value of the Token. If the Token object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*TokenMutation) OldClaims ¶
func (m *TokenMutation) OldClaims(ctx context.Context) (v string, err error)
OldClaims returns the old claims value of the Token. If the Token object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*TokenMutation) OldExpiredAt ¶
OldExpiredAt returns the old expired_at value of the Token. If the Token object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*TokenMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*TokenMutation) RemovedEdges ¶
func (m *TokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TokenMutation) RemovedIDs ¶
func (m *TokenMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*TokenMutation) ResetBlockedAt ¶
func (m *TokenMutation) ResetBlockedAt()
ResetBlockedAt reset all changes of the "blocked_at" field.
func (*TokenMutation) ResetClaims ¶
func (m *TokenMutation) ResetClaims()
ResetClaims reset all changes of the "claims" field.
func (*TokenMutation) ResetEdge ¶
func (m *TokenMutation) 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 (*TokenMutation) ResetExpiredAt ¶
func (m *TokenMutation) ResetExpiredAt()
ResetExpiredAt reset all changes of the "expired_at" field.
func (*TokenMutation) ResetField ¶
func (m *TokenMutation) 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 (*TokenMutation) ResetSession ¶
func (m *TokenMutation) ResetSession()
ResetSession reset all changes of the "session" edge.
func (*TokenMutation) SessionCleared ¶
func (m *TokenMutation) SessionCleared() bool
SessionCleared returns if the edge session was cleared.
func (*TokenMutation) SessionID ¶
func (m *TokenMutation) SessionID() (id int, exists bool)
SessionID returns the session id in the mutation.
func (*TokenMutation) SessionIDs ¶
func (m *TokenMutation) SessionIDs() (ids []int)
SessionIDs returns the session ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use SessionID instead. It exists only for internal usage by the builders.
func (*TokenMutation) SetBlockedAt ¶
func (m *TokenMutation) SetBlockedAt(t time.Time)
SetBlockedAt sets the blocked_at field.
func (*TokenMutation) SetClaims ¶
func (m *TokenMutation) SetClaims(s string)
SetClaims sets the claims field.
func (*TokenMutation) SetExpiredAt ¶
func (m *TokenMutation) SetExpiredAt(t time.Time)
SetExpiredAt sets the expired_at field.
func (*TokenMutation) SetField ¶
func (m *TokenMutation) 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 (*TokenMutation) SetSessionID ¶
func (m *TokenMutation) SetSessionID(id int)
SetSessionID sets the session edge to Session by id.
func (TokenMutation) Tx ¶
func (m TokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TokenMutation) Type ¶
func (m *TokenMutation) Type() string
Type returns the node type of this mutation (Token).
type TokenOrder ¶
type TokenOrder struct { Direction OrderDirection `json:"direction"` Field *TokenOrderField `json:"field"` }
TokenOrder defines the ordering of Token.
type TokenOrderField ¶
type TokenOrderField struct {
// contains filtered or unexported fields
}
TokenOrderField defines the ordering field of Token.
type TokenPaginateOption ¶
type TokenPaginateOption func(*tokenPager) error
TokenPaginateOption enables pagination customization.
func WithTokenFilter ¶
func WithTokenFilter(filter func(*TokenQuery) (*TokenQuery, error)) TokenPaginateOption
WithTokenFilter configures pagination filter.
func WithTokenOrder ¶
func WithTokenOrder(order *TokenOrder) TokenPaginateOption
WithTokenOrder configures pagination ordering.
type TokenQuery ¶
type TokenQuery struct {
// contains filtered or unexported fields
}
TokenQuery is the builder for querying Token entities.
func (*TokenQuery) All ¶
func (tq *TokenQuery) All(ctx context.Context) ([]*Token, error)
All executes the query and returns a list of Tokens.
func (*TokenQuery) AllX ¶
func (tq *TokenQuery) AllX(ctx context.Context) []*Token
AllX is like All, but panics if an error occurs.
func (*TokenQuery) Clone ¶
func (tq *TokenQuery) Clone() *TokenQuery
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 (*TokenQuery) CollectFields ¶
func (t *TokenQuery) CollectFields(ctx context.Context, satisfies ...string) *TokenQuery
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*TokenQuery) Count ¶
func (tq *TokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TokenQuery) CountX ¶
func (tq *TokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TokenQuery) Exist ¶
func (tq *TokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TokenQuery) ExistX ¶
func (tq *TokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TokenQuery) First ¶
func (tq *TokenQuery) First(ctx context.Context) (*Token, error)
First returns the first Token entity in the query. Returns *NotFoundError when no token was found.
func (*TokenQuery) FirstID ¶
func (tq *TokenQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Token id in the query. Returns *NotFoundError when no id was found.
func (*TokenQuery) FirstIDX ¶
func (tq *TokenQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TokenQuery) FirstX ¶
func (tq *TokenQuery) FirstX(ctx context.Context) *Token
FirstX is like First, but panics if an error occurs.
func (*TokenQuery) GroupBy ¶
func (tq *TokenQuery) GroupBy(field string, fields ...string) *TokenGroupBy
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 { ExpiredAt time.Time `json:"expired_at,omitempty"` Count int `json:"count,omitempty"` } client.Token.Query(). GroupBy(token.FieldExpiredAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TokenQuery) IDs ¶
func (tq *TokenQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Token ids.
func (*TokenQuery) IDsX ¶
func (tq *TokenQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TokenQuery) Limit ¶
func (tq *TokenQuery) Limit(limit int) *TokenQuery
Limit adds a limit step to the query.
func (*TokenQuery) Offset ¶
func (tq *TokenQuery) Offset(offset int) *TokenQuery
Offset adds an offset step to the query.
func (*TokenQuery) Only ¶
func (tq *TokenQuery) Only(ctx context.Context) (*Token, error)
Only returns the only Token entity in the query, returns an error if not exactly one entity was returned.
func (*TokenQuery) OnlyID ¶
func (tq *TokenQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Token id in the query, returns an error if not exactly one id was returned.
func (*TokenQuery) OnlyIDX ¶
func (tq *TokenQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TokenQuery) OnlyX ¶
func (tq *TokenQuery) OnlyX(ctx context.Context) *Token
OnlyX is like Only, but panics if an error occurs.
func (*TokenQuery) Order ¶
func (tq *TokenQuery) Order(o ...OrderFunc) *TokenQuery
Order adds an order step to the query.
func (*TokenQuery) Paginate ¶
func (t *TokenQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...TokenPaginateOption, ) (*TokenConnection, error)
Paginate executes the query and returns a relay based cursor connection to Token.
func (*TokenQuery) QuerySession ¶
func (tq *TokenQuery) QuerySession() *SessionQuery
QuerySession chains the current query on the session edge.
func (*TokenQuery) Select ¶
func (tq *TokenQuery) Select(field string, fields ...string) *TokenSelect
Select one or more fields from the given query.
Example:
var v []struct { ExpiredAt time.Time `json:"expired_at,omitempty"` } client.Token.Query(). Select(token.FieldExpiredAt). Scan(ctx, &v)
func (*TokenQuery) Where ¶
func (tq *TokenQuery) Where(ps ...predicate.Token) *TokenQuery
Where adds a new predicate for the builder.
func (*TokenQuery) WithSession ¶
func (tq *TokenQuery) WithSession(opts ...func(*SessionQuery)) *TokenQuery
WithSession tells the query-builder to eager-loads the nodes that are connected to
the "session" edge. The optional arguments used to configure the query builder of the edge.
type TokenSelect ¶
type TokenSelect struct { *TokenQuery // contains filtered or unexported fields }
TokenSelect is the builder for select fields of Token entities.
func (*TokenSelect) Bool ¶
func (ts *TokenSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*TokenSelect) BoolX ¶
func (ts *TokenSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TokenSelect) Bools ¶
func (ts *TokenSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*TokenSelect) BoolsX ¶
func (ts *TokenSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TokenSelect) Float64 ¶
func (ts *TokenSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*TokenSelect) Float64X ¶
func (ts *TokenSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TokenSelect) Float64s ¶
func (ts *TokenSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*TokenSelect) Float64sX ¶
func (ts *TokenSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TokenSelect) Int ¶
func (ts *TokenSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*TokenSelect) IntX ¶
func (ts *TokenSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TokenSelect) Ints ¶
func (ts *TokenSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*TokenSelect) IntsX ¶
func (ts *TokenSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TokenSelect) Scan ¶
func (ts *TokenSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*TokenSelect) ScanX ¶
func (ts *TokenSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TokenSelect) String ¶
func (ts *TokenSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*TokenSelect) StringX ¶
func (ts *TokenSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TokenUpdate ¶
type TokenUpdate struct {
// contains filtered or unexported fields
}
TokenUpdate is the builder for updating Token entities.
func (*TokenUpdate) ClearBlockedAt ¶
func (tu *TokenUpdate) ClearBlockedAt() *TokenUpdate
ClearBlockedAt clears the value of blocked_at.
func (*TokenUpdate) ClearSession ¶
func (tu *TokenUpdate) ClearSession() *TokenUpdate
ClearSession clears the "session" edge to type Session.
func (*TokenUpdate) Exec ¶
func (tu *TokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TokenUpdate) ExecX ¶
func (tu *TokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenUpdate) Mutation ¶
func (tu *TokenUpdate) Mutation() *TokenMutation
Mutation returns the TokenMutation object of the builder.
func (*TokenUpdate) Save ¶
func (tu *TokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TokenUpdate) SaveX ¶
func (tu *TokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TokenUpdate) SetBlockedAt ¶
func (tu *TokenUpdate) SetBlockedAt(t time.Time) *TokenUpdate
SetBlockedAt sets the blocked_at field.
func (*TokenUpdate) SetClaims ¶
func (tu *TokenUpdate) SetClaims(s string) *TokenUpdate
SetClaims sets the claims field.
func (*TokenUpdate) SetExpiredAt ¶
func (tu *TokenUpdate) SetExpiredAt(t time.Time) *TokenUpdate
SetExpiredAt sets the expired_at field.
func (*TokenUpdate) SetNillableBlockedAt ¶
func (tu *TokenUpdate) SetNillableBlockedAt(t *time.Time) *TokenUpdate
SetNillableBlockedAt sets the blocked_at field if the given value is not nil.
func (*TokenUpdate) SetNillableSessionID ¶
func (tu *TokenUpdate) SetNillableSessionID(id *int) *TokenUpdate
SetNillableSessionID sets the session edge to Session by id if the given value is not nil.
func (*TokenUpdate) SetSession ¶
func (tu *TokenUpdate) SetSession(s *Session) *TokenUpdate
SetSession sets the session edge to Session.
func (*TokenUpdate) SetSessionID ¶
func (tu *TokenUpdate) SetSessionID(id int) *TokenUpdate
SetSessionID sets the session edge to Session by id.
func (*TokenUpdate) Where ¶
func (tu *TokenUpdate) Where(ps ...predicate.Token) *TokenUpdate
Where adds a new predicate for the builder.
type TokenUpdateOne ¶
type TokenUpdateOne struct {
// contains filtered or unexported fields
}
TokenUpdateOne is the builder for updating a single Token entity.
func (*TokenUpdateOne) ClearBlockedAt ¶
func (tuo *TokenUpdateOne) ClearBlockedAt() *TokenUpdateOne
ClearBlockedAt clears the value of blocked_at.
func (*TokenUpdateOne) ClearSession ¶
func (tuo *TokenUpdateOne) ClearSession() *TokenUpdateOne
ClearSession clears the "session" edge to type Session.
func (*TokenUpdateOne) Exec ¶
func (tuo *TokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TokenUpdateOne) ExecX ¶
func (tuo *TokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenUpdateOne) Mutation ¶
func (tuo *TokenUpdateOne) Mutation() *TokenMutation
Mutation returns the TokenMutation object of the builder.
func (*TokenUpdateOne) Save ¶
func (tuo *TokenUpdateOne) Save(ctx context.Context) (*Token, error)
Save executes the query and returns the updated entity.
func (*TokenUpdateOne) SaveX ¶
func (tuo *TokenUpdateOne) SaveX(ctx context.Context) *Token
SaveX is like Save, but panics if an error occurs.
func (*TokenUpdateOne) SetBlockedAt ¶
func (tuo *TokenUpdateOne) SetBlockedAt(t time.Time) *TokenUpdateOne
SetBlockedAt sets the blocked_at field.
func (*TokenUpdateOne) SetClaims ¶
func (tuo *TokenUpdateOne) SetClaims(s string) *TokenUpdateOne
SetClaims sets the claims field.
func (*TokenUpdateOne) SetExpiredAt ¶
func (tuo *TokenUpdateOne) SetExpiredAt(t time.Time) *TokenUpdateOne
SetExpiredAt sets the expired_at field.
func (*TokenUpdateOne) SetNillableBlockedAt ¶
func (tuo *TokenUpdateOne) SetNillableBlockedAt(t *time.Time) *TokenUpdateOne
SetNillableBlockedAt sets the blocked_at field if the given value is not nil.
func (*TokenUpdateOne) SetNillableSessionID ¶
func (tuo *TokenUpdateOne) SetNillableSessionID(id *int) *TokenUpdateOne
SetNillableSessionID sets the session edge to Session by id if the given value is not nil.
func (*TokenUpdateOne) SetSession ¶
func (tuo *TokenUpdateOne) SetSession(s *Session) *TokenUpdateOne
SetSession sets the session edge to Session.
func (*TokenUpdateOne) SetSessionID ¶
func (tuo *TokenUpdateOne) SetSessionID(id int) *TokenUpdateOne
SetSessionID sets the session edge to Session by id.
type Tx ¶
type Tx struct { // Activation is the client for interacting with the Activation builders. Activation *ActivationClient // AuthSession is the client for interacting with the AuthSession builders. AuthSession *AuthSessionClient // MapLayer is the client for interacting with the MapLayer builders. MapLayer *MapLayerClient // MapType is the client for interacting with the MapType builders. MapType *MapTypeClient // Metadata is the client for interacting with the Metadata builders. Metadata *MetadataClient // Player is the client for interacting with the Player builders. Player *PlayerClient // PlayerIdentifier is the client for interacting with the PlayerIdentifier builders. PlayerIdentifier *PlayerIdentifierClient // Server is the client for interacting with the Server builders. Server *ServerClient // ServerType is the client for interacting with the ServerType builders. ServerType *ServerTypeClient // Session is the client for interacting with the Session builders. Session *SessionClient // Token is the client for interacting with the Token builders. Token *TokenClient // 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 ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // 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"` // Password holds the value of the "password" field. Password *string `json:"-"` // IsSystem holds the value of the "is_system" field. IsSystem bool `json:"is_system,omitempty"` // DisabledAt holds the value of the "disabled_at" field. DisabledAt *time.Time `json:"disabled_at,omitempty"` // DisabledReason holds the value of the "disabled_reason" field. DisabledReason *string `json:"disabled_reason,omitempty"` // ActivatedAt holds the value of the "activated_at" field. ActivatedAt *time.Time `json:"activated_at,omitempty"` // ActivationComment holds the value of the "activation_comment" field. ActivationComment *string `json:"activation_comment,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) Activation ¶
func (u *User) Activation(ctx context.Context) (*Activation, error)
func (*User) Activations ¶
func (u *User) Activations(ctx context.Context) ([]*Activation, error)
func (*User) QueryActivation ¶
func (u *User) QueryActivation() *ActivationQuery
QueryActivation queries the activation edge of the User.
func (*User) QueryActivations ¶
func (u *User) QueryActivations() *ActivationQuery
QueryActivations queries the activations edge of the User.
func (*User) QueryMetadata ¶
func (u *User) QueryMetadata() *MetadataQuery
QueryMetadata queries the metadata edge of the User.
func (*User) QueryPlayers ¶
func (u *User) QueryPlayers() *PlayerQuery
QueryPlayers queries the players edge of the User.
func (*User) QuerySessions ¶
func (u *User) QuerySessions() *SessionQuery
QuerySessions queries the sessions 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) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a 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
Query returns a query builder for User.
func (*UserClient) QueryActivation ¶
func (c *UserClient) QueryActivation(u *User) *ActivationQuery
QueryActivation queries the activation edge of a User.
func (*UserClient) QueryActivations ¶
func (c *UserClient) QueryActivations(u *User) *ActivationQuery
QueryActivations queries the activations edge of a User.
func (*UserClient) QueryMetadata ¶
func (c *UserClient) QueryMetadata(u *User) *MetadataQuery
QueryMetadata queries the metadata edge of a User.
func (*UserClient) QueryPlayers ¶
func (c *UserClient) QueryPlayers(u *User) *PlayerQuery
QueryPlayers queries the players edge of a User.
func (*UserClient) QuerySessions ¶
func (c *UserClient) QuerySessions(u *User) *SessionQuery
QuerySessions queries the sessions 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 UserConnection ¶
type UserConnection struct { Edges []*UserEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
UserConnection is the connection containing edges to User.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddActivationIDs ¶
func (uc *UserCreate) AddActivationIDs(ids ...int) *UserCreate
AddActivationIDs adds the activations edge to Activation by ids.
func (*UserCreate) AddActivations ¶
func (uc *UserCreate) AddActivations(a ...*Activation) *UserCreate
AddActivations adds the activations edges to Activation.
func (*UserCreate) AddPlayerIDs ¶
func (uc *UserCreate) AddPlayerIDs(ids ...int) *UserCreate
AddPlayerIDs adds the players edge to Player by ids.
func (*UserCreate) AddPlayers ¶
func (uc *UserCreate) AddPlayers(p ...*Player) *UserCreate
AddPlayers adds the players edges to Player.
func (*UserCreate) AddSessionIDs ¶
func (uc *UserCreate) AddSessionIDs(ids ...int) *UserCreate
AddSessionIDs adds the sessions edge to Session by ids.
func (*UserCreate) AddSessions ¶
func (uc *UserCreate) AddSessions(s ...*Session) *UserCreate
AddSessions adds the sessions edges to Session.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetActivatedAt ¶
func (uc *UserCreate) SetActivatedAt(t time.Time) *UserCreate
SetActivatedAt sets the activated_at field.
func (*UserCreate) SetActivation ¶
func (uc *UserCreate) SetActivation(a *Activation) *UserCreate
SetActivation sets the activation edge to Activation.
func (*UserCreate) SetActivationComment ¶
func (uc *UserCreate) SetActivationComment(s string) *UserCreate
SetActivationComment sets the activation_comment field.
func (*UserCreate) SetActivationID ¶
func (uc *UserCreate) SetActivationID(id int) *UserCreate
SetActivationID sets the activation edge to Activation by id.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the created_at field.
func (*UserCreate) SetDisabledAt ¶
func (uc *UserCreate) SetDisabledAt(t time.Time) *UserCreate
SetDisabledAt sets the disabled_at field.
func (*UserCreate) SetDisabledReason ¶
func (uc *UserCreate) SetDisabledReason(s string) *UserCreate
SetDisabledReason sets the disabled_reason field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the email field.
func (*UserCreate) SetIsSystem ¶
func (uc *UserCreate) SetIsSystem(b bool) *UserCreate
SetIsSystem sets the is_system field.
func (*UserCreate) SetMetadata ¶
func (uc *UserCreate) SetMetadata(m *Metadata) *UserCreate
SetMetadata sets the metadata edge to Metadata.
func (*UserCreate) SetMetadataID ¶
func (uc *UserCreate) SetMetadataID(id int) *UserCreate
SetMetadataID sets the metadata edge to Metadata by id.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the name field.
func (*UserCreate) SetNillableActivatedAt ¶
func (uc *UserCreate) SetNillableActivatedAt(t *time.Time) *UserCreate
SetNillableActivatedAt sets the activated_at field if the given value is not nil.
func (*UserCreate) SetNillableActivationComment ¶
func (uc *UserCreate) SetNillableActivationComment(s *string) *UserCreate
SetNillableActivationComment sets the activation_comment field if the given value is not nil.
func (*UserCreate) SetNillableActivationID ¶
func (uc *UserCreate) SetNillableActivationID(id *int) *UserCreate
SetNillableActivationID sets the activation edge to Activation by id if the given value is not nil.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*UserCreate) SetNillableDisabledAt ¶
func (uc *UserCreate) SetNillableDisabledAt(t *time.Time) *UserCreate
SetNillableDisabledAt sets the disabled_at field if the given value is not nil.
func (*UserCreate) SetNillableDisabledReason ¶
func (uc *UserCreate) SetNillableDisabledReason(s *string) *UserCreate
SetNillableDisabledReason sets the disabled_reason field if the given value is not nil.
func (*UserCreate) SetNillableIsSystem ¶
func (uc *UserCreate) SetNillableIsSystem(b *bool) *UserCreate
SetNillableIsSystem sets the is_system field if the given value is not nil.
func (*UserCreate) SetNillableMetadataID ¶
func (uc *UserCreate) SetNillableMetadataID(id *int) *UserCreate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*UserCreate) SetNillablePassword ¶
func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
SetNillablePassword sets the password field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the password field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the updated_at field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating a bulk of User entities.
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 { // Metadata holds the value of the metadata edge. Metadata *Metadata // Sessions holds the value of the sessions edge. Sessions []*Session // Activation holds the value of the activation edge. Activation *Activation // Activations holds the value of the activations edge. Activations []*Activation // Players holds the value of the players edge. Players []*Player // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) ActivationOrErr ¶
func (e UserEdges) ActivationOrErr() (*Activation, error)
ActivationOrErr returns the Activation value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) ActivationsOrErr ¶
func (e UserEdges) ActivationsOrErr() ([]*Activation, error)
ActivationsOrErr returns the Activations value or an error if the edge was not loaded in eager-loading.
func (UserEdges) MetadataOrErr ¶
MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) PlayersOrErr ¶
PlayersOrErr returns the Players value or an error if the edge was not loaded in eager-loading.
func (UserEdges) SessionsOrErr ¶
SessionsOrErr returns the Sessions 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) Bool ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) BoolX ¶
func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
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) Float64 ¶
func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) Float64X ¶
func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, 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) Int ¶
func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) IntX ¶
func (ugb *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, 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.
func (*UserGroupBy) String ¶
func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) StringX ¶
func (ugb *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, 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) ActivatedAt ¶
func (m *UserMutation) ActivatedAt() (r time.Time, exists bool)
ActivatedAt returns the activated_at value in the mutation.
func (*UserMutation) ActivatedAtCleared ¶
func (m *UserMutation) ActivatedAtCleared() bool
ActivatedAtCleared returns if the field activated_at was cleared in this mutation.
func (*UserMutation) ActivationCleared ¶
func (m *UserMutation) ActivationCleared() bool
ActivationCleared returns if the edge activation was cleared.
func (*UserMutation) ActivationComment ¶
func (m *UserMutation) ActivationComment() (r string, exists bool)
ActivationComment returns the activation_comment value in the mutation.
func (*UserMutation) ActivationCommentCleared ¶
func (m *UserMutation) ActivationCommentCleared() bool
ActivationCommentCleared returns if the field activation_comment was cleared in this mutation.
func (*UserMutation) ActivationID ¶
func (m *UserMutation) ActivationID() (id int, exists bool)
ActivationID returns the activation id in the mutation.
func (*UserMutation) ActivationIDs ¶
func (m *UserMutation) ActivationIDs() (ids []int)
ActivationIDs returns the activation ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use ActivationID instead. It exists only for internal usage by the builders.
func (*UserMutation) ActivationsCleared ¶
func (m *UserMutation) ActivationsCleared() bool
ActivationsCleared returns if the edge activations was cleared.
func (*UserMutation) ActivationsIDs ¶
func (m *UserMutation) ActivationsIDs() (ids []int)
ActivationsIDs returns the activations ids in the mutation.
func (*UserMutation) AddActivationIDs ¶
func (m *UserMutation) AddActivationIDs(ids ...int)
AddActivationIDs adds the activations edge to Activation by ids.
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) AddPlayerIDs ¶
func (m *UserMutation) AddPlayerIDs(ids ...int)
AddPlayerIDs adds the players edge to Player by ids.
func (*UserMutation) AddSessionIDs ¶
func (m *UserMutation) AddSessionIDs(ids ...int)
AddSessionIDs adds the sessions edge to Session by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was 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) 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) ClearActivatedAt ¶
func (m *UserMutation) ClearActivatedAt()
ClearActivatedAt clears the value of activated_at.
func (*UserMutation) ClearActivation ¶
func (m *UserMutation) ClearActivation()
ClearActivation clears the activation edge to Activation.
func (*UserMutation) ClearActivationComment ¶
func (m *UserMutation) ClearActivationComment()
ClearActivationComment clears the value of activation_comment.
func (*UserMutation) ClearActivations ¶
func (m *UserMutation) ClearActivations()
ClearActivations clears the activations edge to Activation.
func (*UserMutation) ClearDisabledAt ¶
func (m *UserMutation) ClearDisabledAt()
ClearDisabledAt clears the value of disabled_at.
func (*UserMutation) ClearDisabledReason ¶
func (m *UserMutation) ClearDisabledReason()
ClearDisabledReason clears the value of disabled_reason.
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) ClearMetadata ¶
func (m *UserMutation) ClearMetadata()
ClearMetadata clears the metadata edge to Metadata.
func (*UserMutation) ClearPassword ¶
func (m *UserMutation) ClearPassword()
ClearPassword clears the value of password.
func (*UserMutation) ClearPlayers ¶
func (m *UserMutation) ClearPlayers()
ClearPlayers clears the players edge to Player.
func (*UserMutation) ClearSessions ¶
func (m *UserMutation) ClearSessions()
ClearSessions clears the sessions edge to Session.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*UserMutation) DisabledAt ¶
func (m *UserMutation) DisabledAt() (r time.Time, exists bool)
DisabledAt returns the disabled_at value in the mutation.
func (*UserMutation) DisabledAtCleared ¶
func (m *UserMutation) DisabledAtCleared() bool
DisabledAtCleared returns if the field disabled_at was cleared in this mutation.
func (*UserMutation) DisabledReason ¶
func (m *UserMutation) DisabledReason() (r string, exists bool)
DisabledReason returns the disabled_reason value in the mutation.
func (*UserMutation) DisabledReasonCleared ¶
func (m *UserMutation) DisabledReasonCleared() bool
DisabledReasonCleared returns if the field disabled_reason was cleared in this 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) 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) IsSystem ¶
func (m *UserMutation) IsSystem() (r bool, exists bool)
IsSystem returns the is_system value in the mutation.
func (*UserMutation) MetadataCleared ¶
func (m *UserMutation) MetadataCleared() bool
MetadataCleared returns if the edge metadata was cleared.
func (*UserMutation) MetadataID ¶
func (m *UserMutation) MetadataID() (id int, exists bool)
MetadataID returns the metadata id in the mutation.
func (*UserMutation) MetadataIDs ¶
func (m *UserMutation) MetadataIDs() (ids []int)
MetadataIDs returns the metadata ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use MetadataID instead. It exists only for internal usage by the builders.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*UserMutation) OldActivatedAt ¶
OldActivatedAt returns the old activated_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldActivationComment ¶
func (m *UserMutation) OldActivationComment(ctx context.Context) (v *string, err error)
OldActivationComment returns the old activation_comment value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldDisabledAt ¶
OldDisabledAt returns the old disabled_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldDisabledReason ¶
func (m *UserMutation) OldDisabledReason(ctx context.Context) (v *string, err error)
OldDisabledReason returns the old disabled_reason value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old email value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*UserMutation) OldIsSystem ¶
func (m *UserMutation) OldIsSystem(ctx context.Context) (v bool, err error)
OldIsSystem returns the old is_system value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v *string, err error)
OldPassword returns the old password value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the password value in the mutation.
func (*UserMutation) PasswordCleared ¶
func (m *UserMutation) PasswordCleared() bool
PasswordCleared returns if the field password was cleared in this mutation.
func (*UserMutation) PlayersCleared ¶
func (m *UserMutation) PlayersCleared() bool
PlayersCleared returns if the edge players was cleared.
func (*UserMutation) PlayersIDs ¶
func (m *UserMutation) PlayersIDs() (ids []int)
PlayersIDs returns the players ids in the mutation.
func (*UserMutation) RemoveActivationIDs ¶
func (m *UserMutation) RemoveActivationIDs(ids ...int)
RemoveActivationIDs removes the activations edge to Activation by ids.
func (*UserMutation) RemovePlayerIDs ¶
func (m *UserMutation) RemovePlayerIDs(ids ...int)
RemovePlayerIDs removes the players edge to Player by ids.
func (*UserMutation) RemoveSessionIDs ¶
func (m *UserMutation) RemoveSessionIDs(ids ...int)
RemoveSessionIDs removes the sessions edge to Session by ids.
func (*UserMutation) RemovedActivationsIDs ¶
func (m *UserMutation) RemovedActivationsIDs() (ids []int)
RemovedActivations returns the removed ids of activations.
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) RemovedPlayersIDs ¶
func (m *UserMutation) RemovedPlayersIDs() (ids []int)
RemovedPlayers returns the removed ids of players.
func (*UserMutation) RemovedSessionsIDs ¶
func (m *UserMutation) RemovedSessionsIDs() (ids []int)
RemovedSessions returns the removed ids of sessions.
func (*UserMutation) ResetActivatedAt ¶
func (m *UserMutation) ResetActivatedAt()
ResetActivatedAt reset all changes of the "activated_at" field.
func (*UserMutation) ResetActivation ¶
func (m *UserMutation) ResetActivation()
ResetActivation reset all changes of the "activation" edge.
func (*UserMutation) ResetActivationComment ¶
func (m *UserMutation) ResetActivationComment()
ResetActivationComment reset all changes of the "activation_comment" field.
func (*UserMutation) ResetActivations ¶
func (m *UserMutation) ResetActivations()
ResetActivations reset all changes of the "activations" edge.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*UserMutation) ResetDisabledAt ¶
func (m *UserMutation) ResetDisabledAt()
ResetDisabledAt reset all changes of the "disabled_at" field.
func (*UserMutation) ResetDisabledReason ¶
func (m *UserMutation) ResetDisabledReason()
ResetDisabledReason reset all changes of the "disabled_reason" 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) ResetIsSystem ¶
func (m *UserMutation) ResetIsSystem()
ResetIsSystem reset all changes of the "is_system" field.
func (*UserMutation) ResetMetadata ¶
func (m *UserMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" edge.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword reset all changes of the "password" field.
func (*UserMutation) ResetPlayers ¶
func (m *UserMutation) ResetPlayers()
ResetPlayers reset all changes of the "players" edge.
func (*UserMutation) ResetSessions ¶
func (m *UserMutation) ResetSessions()
ResetSessions reset all changes of the "sessions" edge.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*UserMutation) SessionsCleared ¶
func (m *UserMutation) SessionsCleared() bool
SessionsCleared returns if the edge sessions was cleared.
func (*UserMutation) SessionsIDs ¶
func (m *UserMutation) SessionsIDs() (ids []int)
SessionsIDs returns the sessions ids in the mutation.
func (*UserMutation) SetActivatedAt ¶
func (m *UserMutation) SetActivatedAt(t time.Time)
SetActivatedAt sets the activated_at field.
func (*UserMutation) SetActivationComment ¶
func (m *UserMutation) SetActivationComment(s string)
SetActivationComment sets the activation_comment field.
func (*UserMutation) SetActivationID ¶
func (m *UserMutation) SetActivationID(id int)
SetActivationID sets the activation edge to Activation by id.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*UserMutation) SetDisabledAt ¶
func (m *UserMutation) SetDisabledAt(t time.Time)
SetDisabledAt sets the disabled_at field.
func (*UserMutation) SetDisabledReason ¶
func (m *UserMutation) SetDisabledReason(s string)
SetDisabledReason sets the disabled_reason 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) SetIsSystem ¶
func (m *UserMutation) SetIsSystem(b bool)
SetIsSystem sets the is_system field.
func (*UserMutation) SetMetadataID ¶
func (m *UserMutation) SetMetadataID(id int)
SetMetadataID sets the metadata edge to Metadata by id.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the name field.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the password field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
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).
type UserOrder ¶
type UserOrder struct { Direction OrderDirection `json:"direction"` Field *UserOrderField `json:"field"` }
UserOrder defines the ordering of User.
type UserOrderField ¶
type UserOrderField struct {
// contains filtered or unexported fields
}
UserOrderField defines the ordering field of User.
func (UserOrderField) MarshalGQL ¶
func (f UserOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (UserOrderField) String ¶
func (f UserOrderField) String() string
String implement fmt.Stringer interface.
func (*UserOrderField) UnmarshalGQL ¶
func (f *UserOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type UserPaginateOption ¶
type UserPaginateOption func(*userPager) error
UserPaginateOption enables pagination customization.
func WithUserFilter ¶
func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption
WithUserFilter configures pagination filter.
func WithUserOrder ¶
func WithUserOrder(order *UserOrder) UserPaginateOption
WithUserOrder configures pagination ordering.
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) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns 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) Paginate ¶
func (u *UserQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...UserPaginateOption, ) (*UserConnection, error)
Paginate executes the query and returns a relay based cursor connection to User.
func (*UserQuery) QueryActivation ¶
func (uq *UserQuery) QueryActivation() *ActivationQuery
QueryActivation chains the current query on the activation edge.
func (*UserQuery) QueryActivations ¶
func (uq *UserQuery) QueryActivations() *ActivationQuery
QueryActivations chains the current query on the activations edge.
func (*UserQuery) QueryMetadata ¶
func (uq *UserQuery) QueryMetadata() *MetadataQuery
QueryMetadata chains the current query on the metadata edge.
func (*UserQuery) QueryPlayers ¶
func (uq *UserQuery) QueryPlayers() *PlayerQuery
QueryPlayers chains the current query on the players edge.
func (*UserQuery) QuerySessions ¶
func (uq *UserQuery) QuerySessions() *SessionQuery
QuerySessions chains the current query on the sessions 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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.User.Query(). Select(user.FieldCreatedAt). Scan(ctx, &v)
func (*UserQuery) WithActivation ¶
func (uq *UserQuery) WithActivation(opts ...func(*ActivationQuery)) *UserQuery
WithActivation tells the query-builder to eager-loads the nodes that are connected to
the "activation" edge. The optional arguments used to configure the query builder of the edge.
func (*UserQuery) WithActivations ¶
func (uq *UserQuery) WithActivations(opts ...func(*ActivationQuery)) *UserQuery
WithActivations tells the query-builder to eager-loads the nodes that are connected to
the "activations" edge. The optional arguments used to configure the query builder of the edge.
func (*UserQuery) WithMetadata ¶
func (uq *UserQuery) WithMetadata(opts ...func(*MetadataQuery)) *UserQuery
WithMetadata tells the query-builder to eager-loads the nodes that are connected to
the "metadata" edge. The optional arguments used to configure the query builder of the edge.
func (*UserQuery) WithPlayers ¶
func (uq *UserQuery) WithPlayers(opts ...func(*PlayerQuery)) *UserQuery
WithPlayers tells the query-builder to eager-loads the nodes that are connected to
the "players" edge. The optional arguments used to configure the query builder of the edge.
func (*UserQuery) WithSessions ¶
func (uq *UserQuery) WithSessions(opts ...func(*SessionQuery)) *UserQuery
WithSessions tells the query-builder to eager-loads the nodes that are connected to
the "sessions" edge. The optional arguments used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for select fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*UserSelect) BoolX ¶
func (us *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
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) Float64 ¶
func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶
func (us *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, 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) Int ¶
func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*UserSelect) IntX ¶
func (us *UserSelect) IntX(ctx context.Context) int
IntX is like Int, 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.
func (*UserSelect) String ¶
func (us *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*UserSelect) StringX ¶
func (us *UserSelect) StringX(ctx context.Context) string
StringX is like String, 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) AddActivationIDs ¶
func (uu *UserUpdate) AddActivationIDs(ids ...int) *UserUpdate
AddActivationIDs adds the activations edge to Activation by ids.
func (*UserUpdate) AddActivations ¶
func (uu *UserUpdate) AddActivations(a ...*Activation) *UserUpdate
AddActivations adds the activations edges to Activation.
func (*UserUpdate) AddPlayerIDs ¶
func (uu *UserUpdate) AddPlayerIDs(ids ...int) *UserUpdate
AddPlayerIDs adds the players edge to Player by ids.
func (*UserUpdate) AddPlayers ¶
func (uu *UserUpdate) AddPlayers(p ...*Player) *UserUpdate
AddPlayers adds the players edges to Player.
func (*UserUpdate) AddSessionIDs ¶
func (uu *UserUpdate) AddSessionIDs(ids ...int) *UserUpdate
AddSessionIDs adds the sessions edge to Session by ids.
func (*UserUpdate) AddSessions ¶
func (uu *UserUpdate) AddSessions(s ...*Session) *UserUpdate
AddSessions adds the sessions edges to Session.
func (*UserUpdate) ClearActivatedAt ¶
func (uu *UserUpdate) ClearActivatedAt() *UserUpdate
ClearActivatedAt clears the value of activated_at.
func (*UserUpdate) ClearActivation ¶
func (uu *UserUpdate) ClearActivation() *UserUpdate
ClearActivation clears the "activation" edge to type Activation.
func (*UserUpdate) ClearActivationComment ¶
func (uu *UserUpdate) ClearActivationComment() *UserUpdate
ClearActivationComment clears the value of activation_comment.
func (*UserUpdate) ClearActivations ¶
func (uu *UserUpdate) ClearActivations() *UserUpdate
ClearActivations clears all "activations" edges to type Activation.
func (*UserUpdate) ClearDisabledAt ¶
func (uu *UserUpdate) ClearDisabledAt() *UserUpdate
ClearDisabledAt clears the value of disabled_at.
func (*UserUpdate) ClearDisabledReason ¶
func (uu *UserUpdate) ClearDisabledReason() *UserUpdate
ClearDisabledReason clears the value of disabled_reason.
func (*UserUpdate) ClearMetadata ¶
func (uu *UserUpdate) ClearMetadata() *UserUpdate
ClearMetadata clears the "metadata" edge to type Metadata.
func (*UserUpdate) ClearPassword ¶
func (uu *UserUpdate) ClearPassword() *UserUpdate
ClearPassword clears the value of password.
func (*UserUpdate) ClearPlayers ¶
func (uu *UserUpdate) ClearPlayers() *UserUpdate
ClearPlayers clears all "players" edges to type Player.
func (*UserUpdate) ClearSessions ¶
func (uu *UserUpdate) ClearSessions() *UserUpdate
ClearSessions clears all "sessions" edges to type Session.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveActivationIDs ¶
func (uu *UserUpdate) RemoveActivationIDs(ids ...int) *UserUpdate
RemoveActivationIDs removes the activations edge to Activation by ids.
func (*UserUpdate) RemoveActivations ¶
func (uu *UserUpdate) RemoveActivations(a ...*Activation) *UserUpdate
RemoveActivations removes activations edges to Activation.
func (*UserUpdate) RemovePlayerIDs ¶
func (uu *UserUpdate) RemovePlayerIDs(ids ...int) *UserUpdate
RemovePlayerIDs removes the players edge to Player by ids.
func (*UserUpdate) RemovePlayers ¶
func (uu *UserUpdate) RemovePlayers(p ...*Player) *UserUpdate
RemovePlayers removes players edges to Player.
func (*UserUpdate) RemoveSessionIDs ¶
func (uu *UserUpdate) RemoveSessionIDs(ids ...int) *UserUpdate
RemoveSessionIDs removes the sessions edge to Session by ids.
func (*UserUpdate) RemoveSessions ¶
func (uu *UserUpdate) RemoveSessions(s ...*Session) *UserUpdate
RemoveSessions removes sessions edges to Session.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetActivatedAt ¶
func (uu *UserUpdate) SetActivatedAt(t time.Time) *UserUpdate
SetActivatedAt sets the activated_at field.
func (*UserUpdate) SetActivation ¶
func (uu *UserUpdate) SetActivation(a *Activation) *UserUpdate
SetActivation sets the activation edge to Activation.
func (*UserUpdate) SetActivationComment ¶
func (uu *UserUpdate) SetActivationComment(s string) *UserUpdate
SetActivationComment sets the activation_comment field.
func (*UserUpdate) SetActivationID ¶
func (uu *UserUpdate) SetActivationID(id int) *UserUpdate
SetActivationID sets the activation edge to Activation by id.
func (*UserUpdate) SetDisabledAt ¶
func (uu *UserUpdate) SetDisabledAt(t time.Time) *UserUpdate
SetDisabledAt sets the disabled_at field.
func (*UserUpdate) SetDisabledReason ¶
func (uu *UserUpdate) SetDisabledReason(s string) *UserUpdate
SetDisabledReason sets the disabled_reason field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the email field.
func (*UserUpdate) SetIsSystem ¶
func (uu *UserUpdate) SetIsSystem(b bool) *UserUpdate
SetIsSystem sets the is_system field.
func (*UserUpdate) SetMetadata ¶
func (uu *UserUpdate) SetMetadata(m *Metadata) *UserUpdate
SetMetadata sets the metadata edge to Metadata.
func (*UserUpdate) SetMetadataID ¶
func (uu *UserUpdate) SetMetadataID(id int) *UserUpdate
SetMetadataID sets the metadata edge to Metadata by id.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the name field.
func (*UserUpdate) SetNillableActivatedAt ¶
func (uu *UserUpdate) SetNillableActivatedAt(t *time.Time) *UserUpdate
SetNillableActivatedAt sets the activated_at field if the given value is not nil.
func (*UserUpdate) SetNillableActivationComment ¶
func (uu *UserUpdate) SetNillableActivationComment(s *string) *UserUpdate
SetNillableActivationComment sets the activation_comment field if the given value is not nil.
func (*UserUpdate) SetNillableActivationID ¶
func (uu *UserUpdate) SetNillableActivationID(id *int) *UserUpdate
SetNillableActivationID sets the activation edge to Activation by id if the given value is not nil.
func (*UserUpdate) SetNillableDisabledAt ¶
func (uu *UserUpdate) SetNillableDisabledAt(t *time.Time) *UserUpdate
SetNillableDisabledAt sets the disabled_at field if the given value is not nil.
func (*UserUpdate) SetNillableDisabledReason ¶
func (uu *UserUpdate) SetNillableDisabledReason(s *string) *UserUpdate
SetNillableDisabledReason sets the disabled_reason field if the given value is not nil.
func (*UserUpdate) SetNillableIsSystem ¶
func (uu *UserUpdate) SetNillableIsSystem(b *bool) *UserUpdate
SetNillableIsSystem sets the is_system field if the given value is not nil.
func (*UserUpdate) SetNillableMetadataID ¶
func (uu *UserUpdate) SetNillableMetadataID(id *int) *UserUpdate
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the password field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the password field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the updated_at field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where 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) AddActivationIDs ¶
func (uuo *UserUpdateOne) AddActivationIDs(ids ...int) *UserUpdateOne
AddActivationIDs adds the activations edge to Activation by ids.
func (*UserUpdateOne) AddActivations ¶
func (uuo *UserUpdateOne) AddActivations(a ...*Activation) *UserUpdateOne
AddActivations adds the activations edges to Activation.
func (*UserUpdateOne) AddPlayerIDs ¶
func (uuo *UserUpdateOne) AddPlayerIDs(ids ...int) *UserUpdateOne
AddPlayerIDs adds the players edge to Player by ids.
func (*UserUpdateOne) AddPlayers ¶
func (uuo *UserUpdateOne) AddPlayers(p ...*Player) *UserUpdateOne
AddPlayers adds the players edges to Player.
func (*UserUpdateOne) AddSessionIDs ¶
func (uuo *UserUpdateOne) AddSessionIDs(ids ...int) *UserUpdateOne
AddSessionIDs adds the sessions edge to Session by ids.
func (*UserUpdateOne) AddSessions ¶
func (uuo *UserUpdateOne) AddSessions(s ...*Session) *UserUpdateOne
AddSessions adds the sessions edges to Session.
func (*UserUpdateOne) ClearActivatedAt ¶
func (uuo *UserUpdateOne) ClearActivatedAt() *UserUpdateOne
ClearActivatedAt clears the value of activated_at.
func (*UserUpdateOne) ClearActivation ¶
func (uuo *UserUpdateOne) ClearActivation() *UserUpdateOne
ClearActivation clears the "activation" edge to type Activation.
func (*UserUpdateOne) ClearActivationComment ¶
func (uuo *UserUpdateOne) ClearActivationComment() *UserUpdateOne
ClearActivationComment clears the value of activation_comment.
func (*UserUpdateOne) ClearActivations ¶
func (uuo *UserUpdateOne) ClearActivations() *UserUpdateOne
ClearActivations clears all "activations" edges to type Activation.
func (*UserUpdateOne) ClearDisabledAt ¶
func (uuo *UserUpdateOne) ClearDisabledAt() *UserUpdateOne
ClearDisabledAt clears the value of disabled_at.
func (*UserUpdateOne) ClearDisabledReason ¶
func (uuo *UserUpdateOne) ClearDisabledReason() *UserUpdateOne
ClearDisabledReason clears the value of disabled_reason.
func (*UserUpdateOne) ClearMetadata ¶
func (uuo *UserUpdateOne) ClearMetadata() *UserUpdateOne
ClearMetadata clears the "metadata" edge to type Metadata.
func (*UserUpdateOne) ClearPassword ¶
func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
ClearPassword clears the value of password.
func (*UserUpdateOne) ClearPlayers ¶
func (uuo *UserUpdateOne) ClearPlayers() *UserUpdateOne
ClearPlayers clears all "players" edges to type Player.
func (*UserUpdateOne) ClearSessions ¶
func (uuo *UserUpdateOne) ClearSessions() *UserUpdateOne
ClearSessions clears all "sessions" edges to type Session.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveActivationIDs ¶
func (uuo *UserUpdateOne) RemoveActivationIDs(ids ...int) *UserUpdateOne
RemoveActivationIDs removes the activations edge to Activation by ids.
func (*UserUpdateOne) RemoveActivations ¶
func (uuo *UserUpdateOne) RemoveActivations(a ...*Activation) *UserUpdateOne
RemoveActivations removes activations edges to Activation.
func (*UserUpdateOne) RemovePlayerIDs ¶
func (uuo *UserUpdateOne) RemovePlayerIDs(ids ...int) *UserUpdateOne
RemovePlayerIDs removes the players edge to Player by ids.
func (*UserUpdateOne) RemovePlayers ¶
func (uuo *UserUpdateOne) RemovePlayers(p ...*Player) *UserUpdateOne
RemovePlayers removes players edges to Player.
func (*UserUpdateOne) RemoveSessionIDs ¶
func (uuo *UserUpdateOne) RemoveSessionIDs(ids ...int) *UserUpdateOne
RemoveSessionIDs removes the sessions edge to Session by ids.
func (*UserUpdateOne) RemoveSessions ¶
func (uuo *UserUpdateOne) RemoveSessions(s ...*Session) *UserUpdateOne
RemoveSessions removes sessions edges to Session.
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) SetActivatedAt ¶
func (uuo *UserUpdateOne) SetActivatedAt(t time.Time) *UserUpdateOne
SetActivatedAt sets the activated_at field.
func (*UserUpdateOne) SetActivation ¶
func (uuo *UserUpdateOne) SetActivation(a *Activation) *UserUpdateOne
SetActivation sets the activation edge to Activation.
func (*UserUpdateOne) SetActivationComment ¶
func (uuo *UserUpdateOne) SetActivationComment(s string) *UserUpdateOne
SetActivationComment sets the activation_comment field.
func (*UserUpdateOne) SetActivationID ¶
func (uuo *UserUpdateOne) SetActivationID(id int) *UserUpdateOne
SetActivationID sets the activation edge to Activation by id.
func (*UserUpdateOne) SetDisabledAt ¶
func (uuo *UserUpdateOne) SetDisabledAt(t time.Time) *UserUpdateOne
SetDisabledAt sets the disabled_at field.
func (*UserUpdateOne) SetDisabledReason ¶
func (uuo *UserUpdateOne) SetDisabledReason(s string) *UserUpdateOne
SetDisabledReason sets the disabled_reason field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the email field.
func (*UserUpdateOne) SetIsSystem ¶
func (uuo *UserUpdateOne) SetIsSystem(b bool) *UserUpdateOne
SetIsSystem sets the is_system field.
func (*UserUpdateOne) SetMetadata ¶
func (uuo *UserUpdateOne) SetMetadata(m *Metadata) *UserUpdateOne
SetMetadata sets the metadata edge to Metadata.
func (*UserUpdateOne) SetMetadataID ¶
func (uuo *UserUpdateOne) SetMetadataID(id int) *UserUpdateOne
SetMetadataID sets the metadata edge to Metadata by id.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the name field.
func (*UserUpdateOne) SetNillableActivatedAt ¶
func (uuo *UserUpdateOne) SetNillableActivatedAt(t *time.Time) *UserUpdateOne
SetNillableActivatedAt sets the activated_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableActivationComment ¶
func (uuo *UserUpdateOne) SetNillableActivationComment(s *string) *UserUpdateOne
SetNillableActivationComment sets the activation_comment field if the given value is not nil.
func (*UserUpdateOne) SetNillableActivationID ¶
func (uuo *UserUpdateOne) SetNillableActivationID(id *int) *UserUpdateOne
SetNillableActivationID sets the activation edge to Activation by id if the given value is not nil.
func (*UserUpdateOne) SetNillableDisabledAt ¶
func (uuo *UserUpdateOne) SetNillableDisabledAt(t *time.Time) *UserUpdateOne
SetNillableDisabledAt sets the disabled_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableDisabledReason ¶
func (uuo *UserUpdateOne) SetNillableDisabledReason(s *string) *UserUpdateOne
SetNillableDisabledReason sets the disabled_reason field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsSystem ¶
func (uuo *UserUpdateOne) SetNillableIsSystem(b *bool) *UserUpdateOne
SetNillableIsSystem sets the is_system field if the given value is not nil.
func (*UserUpdateOne) SetNillableMetadataID ¶
func (uuo *UserUpdateOne) SetNillableMetadataID(id *int) *UserUpdateOne
SetNillableMetadataID sets the metadata edge to Metadata by id if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the password field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the password field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the updated_at field.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- activation.go
- activation_create.go
- activation_delete.go
- activation_query.go
- activation_update.go
- authsession.go
- authsession_create.go
- authsession_delete.go
- authsession_query.go
- authsession_update.go
- client.go
- collection.go
- config.go
- context.go
- edge.go
- ent.go
- maplayer.go
- maplayer_create.go
- maplayer_delete.go
- maplayer_query.go
- maplayer_update.go
- maptype.go
- maptype_create.go
- maptype_delete.go
- maptype_query.go
- maptype_update.go
- metadata.go
- metadata_create.go
- metadata_delete.go
- metadata_query.go
- metadata_update.go
- mutation.go
- node.go
- pagination.go
- player.go
- player_create.go
- player_delete.go
- player_query.go
- player_update.go
- playeridentifier.go
- playeridentifier_create.go
- playeridentifier_delete.go
- playeridentifier_query.go
- playeridentifier_update.go
- runtime.go
- server.go
- server_create.go
- server_delete.go
- server_query.go
- server_update.go
- servertype.go
- servertype_create.go
- servertype_delete.go
- servertype_query.go
- servertype_update.go
- session.go
- session_create.go
- session_delete.go
- session_query.go
- session_update.go
- token.go
- token_create.go
- token_delete.go
- token_query.go
- token_update.go
- transaction.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go