Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type App
- type AppClient
- func (c *AppClient) Create() *AppCreate
- func (c *AppClient) CreateBulk(builders ...*AppCreate) *AppCreateBulk
- func (c *AppClient) Delete() *AppDelete
- func (c *AppClient) DeleteOne(a *App) *AppDeleteOne
- func (c *AppClient) DeleteOneID(id int) *AppDeleteOne
- func (c *AppClient) Get(ctx context.Context, id int) (*App, error)
- func (c *AppClient) GetX(ctx context.Context, id int) *App
- func (c *AppClient) Hooks() []Hook
- func (c *AppClient) Query() *AppQuery
- func (c *AppClient) QueryUser(a *App) *UserQuery
- func (c *AppClient) Update() *AppUpdate
- func (c *AppClient) UpdateOne(a *App) *AppUpdateOne
- func (c *AppClient) UpdateOneID(id int) *AppUpdateOne
- func (c *AppClient) Use(hooks ...Hook)
- type AppCreate
- func (ac *AppCreate) Exec(ctx context.Context) error
- func (ac *AppCreate) ExecX(ctx context.Context)
- func (ac *AppCreate) Mutation() *AppMutation
- func (ac *AppCreate) Save(ctx context.Context) (*App, error)
- func (ac *AppCreate) SaveX(ctx context.Context) *App
- func (ac *AppCreate) SetName(s string) *AppCreate
- func (ac *AppCreate) SetSecretKey(u uuid.UUID) *AppCreate
- func (ac *AppCreate) SetUUID(u uuid.UUID) *AppCreate
- func (ac *AppCreate) SetUser(u *User) *AppCreate
- func (ac *AppCreate) SetUserID(id int) *AppCreate
- type AppCreateBulk
- type AppDelete
- type AppDeleteOne
- type AppEdges
- type AppGroupBy
- func (agb *AppGroupBy) Aggregate(fns ...AggregateFunc) *AppGroupBy
- func (agb *AppGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (agb *AppGroupBy) BoolX(ctx context.Context) bool
- func (agb *AppGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (agb *AppGroupBy) BoolsX(ctx context.Context) []bool
- func (agb *AppGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (agb *AppGroupBy) Float64X(ctx context.Context) float64
- func (agb *AppGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (agb *AppGroupBy) Float64sX(ctx context.Context) []float64
- func (agb *AppGroupBy) Int(ctx context.Context) (_ int, err error)
- func (agb *AppGroupBy) IntX(ctx context.Context) int
- func (agb *AppGroupBy) Ints(ctx context.Context) ([]int, error)
- func (agb *AppGroupBy) IntsX(ctx context.Context) []int
- func (agb *AppGroupBy) Scan(ctx context.Context, v interface{}) error
- func (agb *AppGroupBy) ScanX(ctx context.Context, v interface{})
- func (agb *AppGroupBy) String(ctx context.Context) (_ string, err error)
- func (agb *AppGroupBy) StringX(ctx context.Context) string
- func (agb *AppGroupBy) Strings(ctx context.Context) ([]string, error)
- func (agb *AppGroupBy) StringsX(ctx context.Context) []string
- type AppMutation
- func (m *AppMutation) AddField(name string, value ent.Value) error
- func (m *AppMutation) AddedEdges() []string
- func (m *AppMutation) AddedField(name string) (ent.Value, bool)
- func (m *AppMutation) AddedFields() []string
- func (m *AppMutation) AddedIDs(name string) []ent.Value
- func (m *AppMutation) ClearEdge(name string) error
- func (m *AppMutation) ClearField(name string) error
- func (m *AppMutation) ClearUser()
- func (m *AppMutation) ClearedEdges() []string
- func (m *AppMutation) ClearedFields() []string
- func (m AppMutation) Client() *Client
- func (m *AppMutation) EdgeCleared(name string) bool
- func (m *AppMutation) Field(name string) (ent.Value, bool)
- func (m *AppMutation) FieldCleared(name string) bool
- func (m *AppMutation) Fields() []string
- func (m *AppMutation) ID() (id int, exists bool)
- func (m *AppMutation) Name() (r string, exists bool)
- func (m *AppMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AppMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldSecretKey(ctx context.Context) (v uuid.UUID, err error)
- func (m *AppMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *AppMutation) Op() Op
- func (m *AppMutation) RemovedEdges() []string
- func (m *AppMutation) RemovedIDs(name string) []ent.Value
- func (m *AppMutation) ResetEdge(name string) error
- func (m *AppMutation) ResetField(name string) error
- func (m *AppMutation) ResetName()
- func (m *AppMutation) ResetSecretKey()
- func (m *AppMutation) ResetUUID()
- func (m *AppMutation) ResetUser()
- func (m *AppMutation) SecretKey() (r uuid.UUID, exists bool)
- func (m *AppMutation) SetField(name string, value ent.Value) error
- func (m *AppMutation) SetName(s string)
- func (m *AppMutation) SetSecretKey(u uuid.UUID)
- func (m *AppMutation) SetUUID(u uuid.UUID)
- func (m *AppMutation) SetUserID(id int)
- func (m AppMutation) Tx() (*Tx, error)
- func (m *AppMutation) Type() string
- func (m *AppMutation) UUID() (r uuid.UUID, exists bool)
- func (m *AppMutation) UserCleared() bool
- func (m *AppMutation) UserID() (id int, exists bool)
- func (m *AppMutation) UserIDs() (ids []int)
- func (m *AppMutation) Where(ps ...predicate.App)
- type AppQuery
- func (aq *AppQuery) All(ctx context.Context) ([]*App, error)
- func (aq *AppQuery) AllX(ctx context.Context) []*App
- func (aq *AppQuery) Clone() *AppQuery
- func (aq *AppQuery) Count(ctx context.Context) (int, error)
- func (aq *AppQuery) CountX(ctx context.Context) int
- func (aq *AppQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AppQuery) ExistX(ctx context.Context) bool
- func (aq *AppQuery) First(ctx context.Context) (*App, error)
- func (aq *AppQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AppQuery) FirstIDX(ctx context.Context) int
- func (aq *AppQuery) FirstX(ctx context.Context) *App
- func (aq *AppQuery) GroupBy(field string, fields ...string) *AppGroupBy
- func (aq *AppQuery) IDs(ctx context.Context) ([]int, error)
- func (aq *AppQuery) IDsX(ctx context.Context) []int
- func (aq *AppQuery) Limit(limit int) *AppQuery
- func (aq *AppQuery) Offset(offset int) *AppQuery
- func (aq *AppQuery) Only(ctx context.Context) (*App, error)
- func (aq *AppQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AppQuery) OnlyIDX(ctx context.Context) int
- func (aq *AppQuery) OnlyX(ctx context.Context) *App
- func (aq *AppQuery) Order(o ...OrderFunc) *AppQuery
- func (aq *AppQuery) QueryUser() *UserQuery
- func (aq *AppQuery) Select(fields ...string) *AppSelect
- func (aq *AppQuery) Unique(unique bool) *AppQuery
- func (aq *AppQuery) Where(ps ...predicate.App) *AppQuery
- func (aq *AppQuery) WithUser(opts ...func(*UserQuery)) *AppQuery
- type AppSelect
- func (as *AppSelect) Bool(ctx context.Context) (_ bool, err error)
- func (as *AppSelect) BoolX(ctx context.Context) bool
- func (as *AppSelect) Bools(ctx context.Context) ([]bool, error)
- func (as *AppSelect) BoolsX(ctx context.Context) []bool
- func (as *AppSelect) Float64(ctx context.Context) (_ float64, err error)
- func (as *AppSelect) Float64X(ctx context.Context) float64
- func (as *AppSelect) Float64s(ctx context.Context) ([]float64, error)
- func (as *AppSelect) Float64sX(ctx context.Context) []float64
- func (as *AppSelect) Int(ctx context.Context) (_ int, err error)
- func (as *AppSelect) IntX(ctx context.Context) int
- func (as *AppSelect) Ints(ctx context.Context) ([]int, error)
- func (as *AppSelect) IntsX(ctx context.Context) []int
- func (as *AppSelect) Scan(ctx context.Context, v interface{}) error
- func (as *AppSelect) ScanX(ctx context.Context, v interface{})
- func (as *AppSelect) String(ctx context.Context) (_ string, err error)
- func (as *AppSelect) StringX(ctx context.Context) string
- func (as *AppSelect) Strings(ctx context.Context) ([]string, error)
- func (as *AppSelect) StringsX(ctx context.Context) []string
- type AppUpdate
- func (au *AppUpdate) ClearUser() *AppUpdate
- func (au *AppUpdate) Exec(ctx context.Context) error
- func (au *AppUpdate) ExecX(ctx context.Context)
- func (au *AppUpdate) Mutation() *AppMutation
- func (au *AppUpdate) Save(ctx context.Context) (int, error)
- func (au *AppUpdate) SaveX(ctx context.Context) int
- func (au *AppUpdate) SetName(s string) *AppUpdate
- func (au *AppUpdate) SetSecretKey(u uuid.UUID) *AppUpdate
- func (au *AppUpdate) SetUser(u *User) *AppUpdate
- func (au *AppUpdate) SetUserID(id int) *AppUpdate
- func (au *AppUpdate) Where(ps ...predicate.App) *AppUpdate
- type AppUpdateOne
- func (auo *AppUpdateOne) ClearUser() *AppUpdateOne
- func (auo *AppUpdateOne) Exec(ctx context.Context) error
- func (auo *AppUpdateOne) ExecX(ctx context.Context)
- func (auo *AppUpdateOne) Mutation() *AppMutation
- func (auo *AppUpdateOne) Save(ctx context.Context) (*App, error)
- func (auo *AppUpdateOne) SaveX(ctx context.Context) *App
- func (auo *AppUpdateOne) Select(field string, fields ...string) *AppUpdateOne
- func (auo *AppUpdateOne) SetName(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetSecretKey(u uuid.UUID) *AppUpdateOne
- func (auo *AppUpdateOne) SetUser(u *User) *AppUpdateOne
- func (auo *AppUpdateOne) SetUserID(id int) *AppUpdateOne
- type Apps
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Home
- type HomeClient
- func (c *HomeClient) Create() *HomeCreate
- func (c *HomeClient) CreateBulk(builders ...*HomeCreate) *HomeCreateBulk
- func (c *HomeClient) Delete() *HomeDelete
- func (c *HomeClient) DeleteOne(h *Home) *HomeDeleteOne
- func (c *HomeClient) DeleteOneID(id int) *HomeDeleteOne
- func (c *HomeClient) Get(ctx context.Context, id int) (*Home, error)
- func (c *HomeClient) GetX(ctx context.Context, id int) *Home
- func (c *HomeClient) Hooks() []Hook
- func (c *HomeClient) Query() *HomeQuery
- func (c *HomeClient) QueryRooms(h *Home) *RoomQuery
- func (c *HomeClient) Update() *HomeUpdate
- func (c *HomeClient) UpdateOne(h *Home) *HomeUpdateOne
- func (c *HomeClient) UpdateOneID(id int) *HomeUpdateOne
- func (c *HomeClient) Use(hooks ...Hook)
- type HomeConnection
- type HomeConnectionClient
- func (c *HomeConnectionClient) Create() *HomeConnectionCreate
- func (c *HomeConnectionClient) CreateBulk(builders ...*HomeConnectionCreate) *HomeConnectionCreateBulk
- func (c *HomeConnectionClient) Delete() *HomeConnectionDelete
- func (c *HomeConnectionClient) DeleteOne(hc *HomeConnection) *HomeConnectionDeleteOne
- func (c *HomeConnectionClient) DeleteOneID(id int) *HomeConnectionDeleteOne
- func (c *HomeConnectionClient) Get(ctx context.Context, id int) (*HomeConnection, error)
- func (c *HomeConnectionClient) GetX(ctx context.Context, id int) *HomeConnection
- func (c *HomeConnectionClient) Hooks() []Hook
- func (c *HomeConnectionClient) Query() *HomeConnectionQuery
- func (c *HomeConnectionClient) QueryHome(hc *HomeConnection) *HomeQuery
- func (c *HomeConnectionClient) QueryUser(hc *HomeConnection) *UserQuery
- func (c *HomeConnectionClient) Update() *HomeConnectionUpdate
- func (c *HomeConnectionClient) UpdateOne(hc *HomeConnection) *HomeConnectionUpdateOne
- func (c *HomeConnectionClient) UpdateOneID(id int) *HomeConnectionUpdateOne
- func (c *HomeConnectionClient) Use(hooks ...Hook)
- type HomeConnectionCreate
- func (hcc *HomeConnectionCreate) Exec(ctx context.Context) error
- func (hcc *HomeConnectionCreate) ExecX(ctx context.Context)
- func (hcc *HomeConnectionCreate) Mutation() *HomeConnectionMutation
- func (hcc *HomeConnectionCreate) Save(ctx context.Context) (*HomeConnection, error)
- func (hcc *HomeConnectionCreate) SaveX(ctx context.Context) *HomeConnection
- func (hcc *HomeConnectionCreate) SetEndTime(s string) *HomeConnectionCreate
- func (hcc *HomeConnectionCreate) SetHome(h *Home) *HomeConnectionCreate
- func (hcc *HomeConnectionCreate) SetHomeID(id int) *HomeConnectionCreate
- func (hcc *HomeConnectionCreate) SetNillableEndTime(s *string) *HomeConnectionCreate
- func (hcc *HomeConnectionCreate) SetNillableStartTime(s *string) *HomeConnectionCreate
- func (hcc *HomeConnectionCreate) SetStartTime(s string) *HomeConnectionCreate
- func (hcc *HomeConnectionCreate) SetUser(u *User) *HomeConnectionCreate
- func (hcc *HomeConnectionCreate) SetUserID(id int) *HomeConnectionCreate
- type HomeConnectionCreateBulk
- func (hccb *HomeConnectionCreateBulk) Exec(ctx context.Context) error
- func (hccb *HomeConnectionCreateBulk) ExecX(ctx context.Context)
- func (hccb *HomeConnectionCreateBulk) Save(ctx context.Context) ([]*HomeConnection, error)
- func (hccb *HomeConnectionCreateBulk) SaveX(ctx context.Context) []*HomeConnection
- type HomeConnectionDelete
- type HomeConnectionDeleteOne
- type HomeConnectionEdges
- type HomeConnectionGroupBy
- func (hcgb *HomeConnectionGroupBy) Aggregate(fns ...AggregateFunc) *HomeConnectionGroupBy
- func (hcgb *HomeConnectionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (hcgb *HomeConnectionGroupBy) BoolX(ctx context.Context) bool
- func (hcgb *HomeConnectionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (hcgb *HomeConnectionGroupBy) BoolsX(ctx context.Context) []bool
- func (hcgb *HomeConnectionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (hcgb *HomeConnectionGroupBy) Float64X(ctx context.Context) float64
- func (hcgb *HomeConnectionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (hcgb *HomeConnectionGroupBy) Float64sX(ctx context.Context) []float64
- func (hcgb *HomeConnectionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (hcgb *HomeConnectionGroupBy) IntX(ctx context.Context) int
- func (hcgb *HomeConnectionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (hcgb *HomeConnectionGroupBy) IntsX(ctx context.Context) []int
- func (hcgb *HomeConnectionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (hcgb *HomeConnectionGroupBy) ScanX(ctx context.Context, v interface{})
- func (hcgb *HomeConnectionGroupBy) String(ctx context.Context) (_ string, err error)
- func (hcgb *HomeConnectionGroupBy) StringX(ctx context.Context) string
- func (hcgb *HomeConnectionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (hcgb *HomeConnectionGroupBy) StringsX(ctx context.Context) []string
- type HomeConnectionMutation
- func (m *HomeConnectionMutation) AddField(name string, value ent.Value) error
- func (m *HomeConnectionMutation) AddedEdges() []string
- func (m *HomeConnectionMutation) AddedField(name string) (ent.Value, bool)
- func (m *HomeConnectionMutation) AddedFields() []string
- func (m *HomeConnectionMutation) AddedIDs(name string) []ent.Value
- func (m *HomeConnectionMutation) ClearEdge(name string) error
- func (m *HomeConnectionMutation) ClearField(name string) error
- func (m *HomeConnectionMutation) ClearHome()
- func (m *HomeConnectionMutation) ClearUser()
- func (m *HomeConnectionMutation) ClearedEdges() []string
- func (m *HomeConnectionMutation) ClearedFields() []string
- func (m HomeConnectionMutation) Client() *Client
- func (m *HomeConnectionMutation) EdgeCleared(name string) bool
- func (m *HomeConnectionMutation) EndTime() (r string, exists bool)
- func (m *HomeConnectionMutation) Field(name string) (ent.Value, bool)
- func (m *HomeConnectionMutation) FieldCleared(name string) bool
- func (m *HomeConnectionMutation) Fields() []string
- func (m *HomeConnectionMutation) HomeCleared() bool
- func (m *HomeConnectionMutation) HomeID() (id int, exists bool)
- func (m *HomeConnectionMutation) HomeIDs() (ids []int)
- func (m *HomeConnectionMutation) ID() (id int, exists bool)
- func (m *HomeConnectionMutation) OldEndTime(ctx context.Context) (v string, err error)
- func (m *HomeConnectionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HomeConnectionMutation) OldStartTime(ctx context.Context) (v string, err error)
- func (m *HomeConnectionMutation) Op() Op
- func (m *HomeConnectionMutation) RemovedEdges() []string
- func (m *HomeConnectionMutation) RemovedIDs(name string) []ent.Value
- func (m *HomeConnectionMutation) ResetEdge(name string) error
- func (m *HomeConnectionMutation) ResetEndTime()
- func (m *HomeConnectionMutation) ResetField(name string) error
- func (m *HomeConnectionMutation) ResetHome()
- func (m *HomeConnectionMutation) ResetStartTime()
- func (m *HomeConnectionMutation) ResetUser()
- func (m *HomeConnectionMutation) SetEndTime(s string)
- func (m *HomeConnectionMutation) SetField(name string, value ent.Value) error
- func (m *HomeConnectionMutation) SetHomeID(id int)
- func (m *HomeConnectionMutation) SetStartTime(s string)
- func (m *HomeConnectionMutation) SetUserID(id int)
- func (m *HomeConnectionMutation) StartTime() (r string, exists bool)
- func (m HomeConnectionMutation) Tx() (*Tx, error)
- func (m *HomeConnectionMutation) Type() string
- func (m *HomeConnectionMutation) UserCleared() bool
- func (m *HomeConnectionMutation) UserID() (id int, exists bool)
- func (m *HomeConnectionMutation) UserIDs() (ids []int)
- func (m *HomeConnectionMutation) Where(ps ...predicate.HomeConnection)
- type HomeConnectionQuery
- func (hcq *HomeConnectionQuery) All(ctx context.Context) ([]*HomeConnection, error)
- func (hcq *HomeConnectionQuery) AllX(ctx context.Context) []*HomeConnection
- func (hcq *HomeConnectionQuery) Clone() *HomeConnectionQuery
- func (hcq *HomeConnectionQuery) Count(ctx context.Context) (int, error)
- func (hcq *HomeConnectionQuery) CountX(ctx context.Context) int
- func (hcq *HomeConnectionQuery) Exist(ctx context.Context) (bool, error)
- func (hcq *HomeConnectionQuery) ExistX(ctx context.Context) bool
- func (hcq *HomeConnectionQuery) First(ctx context.Context) (*HomeConnection, error)
- func (hcq *HomeConnectionQuery) FirstID(ctx context.Context) (id int, err error)
- func (hcq *HomeConnectionQuery) FirstIDX(ctx context.Context) int
- func (hcq *HomeConnectionQuery) FirstX(ctx context.Context) *HomeConnection
- func (hcq *HomeConnectionQuery) GroupBy(field string, fields ...string) *HomeConnectionGroupBy
- func (hcq *HomeConnectionQuery) IDs(ctx context.Context) ([]int, error)
- func (hcq *HomeConnectionQuery) IDsX(ctx context.Context) []int
- func (hcq *HomeConnectionQuery) Limit(limit int) *HomeConnectionQuery
- func (hcq *HomeConnectionQuery) Offset(offset int) *HomeConnectionQuery
- func (hcq *HomeConnectionQuery) Only(ctx context.Context) (*HomeConnection, error)
- func (hcq *HomeConnectionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (hcq *HomeConnectionQuery) OnlyIDX(ctx context.Context) int
- func (hcq *HomeConnectionQuery) OnlyX(ctx context.Context) *HomeConnection
- func (hcq *HomeConnectionQuery) Order(o ...OrderFunc) *HomeConnectionQuery
- func (hcq *HomeConnectionQuery) QueryHome() *HomeQuery
- func (hcq *HomeConnectionQuery) QueryUser() *UserQuery
- func (hcq *HomeConnectionQuery) Select(fields ...string) *HomeConnectionSelect
- func (hcq *HomeConnectionQuery) Unique(unique bool) *HomeConnectionQuery
- func (hcq *HomeConnectionQuery) Where(ps ...predicate.HomeConnection) *HomeConnectionQuery
- func (hcq *HomeConnectionQuery) WithHome(opts ...func(*HomeQuery)) *HomeConnectionQuery
- func (hcq *HomeConnectionQuery) WithUser(opts ...func(*UserQuery)) *HomeConnectionQuery
- type HomeConnectionSelect
- func (hcs *HomeConnectionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (hcs *HomeConnectionSelect) BoolX(ctx context.Context) bool
- func (hcs *HomeConnectionSelect) Bools(ctx context.Context) ([]bool, error)
- func (hcs *HomeConnectionSelect) BoolsX(ctx context.Context) []bool
- func (hcs *HomeConnectionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (hcs *HomeConnectionSelect) Float64X(ctx context.Context) float64
- func (hcs *HomeConnectionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (hcs *HomeConnectionSelect) Float64sX(ctx context.Context) []float64
- func (hcs *HomeConnectionSelect) Int(ctx context.Context) (_ int, err error)
- func (hcs *HomeConnectionSelect) IntX(ctx context.Context) int
- func (hcs *HomeConnectionSelect) Ints(ctx context.Context) ([]int, error)
- func (hcs *HomeConnectionSelect) IntsX(ctx context.Context) []int
- func (hcs *HomeConnectionSelect) Scan(ctx context.Context, v interface{}) error
- func (hcs *HomeConnectionSelect) ScanX(ctx context.Context, v interface{})
- func (hcs *HomeConnectionSelect) String(ctx context.Context) (_ string, err error)
- func (hcs *HomeConnectionSelect) StringX(ctx context.Context) string
- func (hcs *HomeConnectionSelect) Strings(ctx context.Context) ([]string, error)
- func (hcs *HomeConnectionSelect) StringsX(ctx context.Context) []string
- type HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) ClearHome() *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) ClearUser() *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) Exec(ctx context.Context) error
- func (hcu *HomeConnectionUpdate) ExecX(ctx context.Context)
- func (hcu *HomeConnectionUpdate) Mutation() *HomeConnectionMutation
- func (hcu *HomeConnectionUpdate) Save(ctx context.Context) (int, error)
- func (hcu *HomeConnectionUpdate) SaveX(ctx context.Context) int
- func (hcu *HomeConnectionUpdate) SetEndTime(s string) *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) SetHome(h *Home) *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) SetHomeID(id int) *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) SetNillableEndTime(s *string) *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) SetNillableStartTime(s *string) *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) SetStartTime(s string) *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) SetUser(u *User) *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) SetUserID(id int) *HomeConnectionUpdate
- func (hcu *HomeConnectionUpdate) Where(ps ...predicate.HomeConnection) *HomeConnectionUpdate
- type HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) ClearHome() *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) ClearUser() *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) Exec(ctx context.Context) error
- func (hcuo *HomeConnectionUpdateOne) ExecX(ctx context.Context)
- func (hcuo *HomeConnectionUpdateOne) Mutation() *HomeConnectionMutation
- func (hcuo *HomeConnectionUpdateOne) Save(ctx context.Context) (*HomeConnection, error)
- func (hcuo *HomeConnectionUpdateOne) SaveX(ctx context.Context) *HomeConnection
- func (hcuo *HomeConnectionUpdateOne) Select(field string, fields ...string) *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) SetEndTime(s string) *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) SetHome(h *Home) *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) SetHomeID(id int) *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) SetNillableEndTime(s *string) *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) SetNillableStartTime(s *string) *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) SetStartTime(s string) *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) SetUser(u *User) *HomeConnectionUpdateOne
- func (hcuo *HomeConnectionUpdateOne) SetUserID(id int) *HomeConnectionUpdateOne
- type HomeConnections
- type HomeCreate
- func (hc *HomeCreate) AddRoomIDs(ids ...int) *HomeCreate
- func (hc *HomeCreate) AddRooms(r ...*Room) *HomeCreate
- func (hc *HomeCreate) Exec(ctx context.Context) error
- func (hc *HomeCreate) ExecX(ctx context.Context)
- func (hc *HomeCreate) Mutation() *HomeMutation
- func (hc *HomeCreate) Save(ctx context.Context) (*Home, error)
- func (hc *HomeCreate) SaveX(ctx context.Context) *Home
- func (hc *HomeCreate) SetName(s string) *HomeCreate
- func (hc *HomeCreate) SetUUID(u uuid.UUID) *HomeCreate
- type HomeCreateBulk
- type HomeDelete
- type HomeDeleteOne
- type HomeEdges
- type HomeGroupBy
- func (hgb *HomeGroupBy) Aggregate(fns ...AggregateFunc) *HomeGroupBy
- func (hgb *HomeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (hgb *HomeGroupBy) BoolX(ctx context.Context) bool
- func (hgb *HomeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (hgb *HomeGroupBy) BoolsX(ctx context.Context) []bool
- func (hgb *HomeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (hgb *HomeGroupBy) Float64X(ctx context.Context) float64
- func (hgb *HomeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (hgb *HomeGroupBy) Float64sX(ctx context.Context) []float64
- func (hgb *HomeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (hgb *HomeGroupBy) IntX(ctx context.Context) int
- func (hgb *HomeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (hgb *HomeGroupBy) IntsX(ctx context.Context) []int
- func (hgb *HomeGroupBy) Scan(ctx context.Context, v interface{}) error
- func (hgb *HomeGroupBy) ScanX(ctx context.Context, v interface{})
- func (hgb *HomeGroupBy) String(ctx context.Context) (_ string, err error)
- func (hgb *HomeGroupBy) StringX(ctx context.Context) string
- func (hgb *HomeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (hgb *HomeGroupBy) StringsX(ctx context.Context) []string
- type HomeMutation
- func (m *HomeMutation) AddField(name string, value ent.Value) error
- func (m *HomeMutation) AddRoomIDs(ids ...int)
- func (m *HomeMutation) AddedEdges() []string
- func (m *HomeMutation) AddedField(name string) (ent.Value, bool)
- func (m *HomeMutation) AddedFields() []string
- func (m *HomeMutation) AddedIDs(name string) []ent.Value
- func (m *HomeMutation) ClearEdge(name string) error
- func (m *HomeMutation) ClearField(name string) error
- func (m *HomeMutation) ClearRooms()
- func (m *HomeMutation) ClearedEdges() []string
- func (m *HomeMutation) ClearedFields() []string
- func (m HomeMutation) Client() *Client
- func (m *HomeMutation) EdgeCleared(name string) bool
- func (m *HomeMutation) Field(name string) (ent.Value, bool)
- func (m *HomeMutation) FieldCleared(name string) bool
- func (m *HomeMutation) Fields() []string
- func (m *HomeMutation) ID() (id int, exists bool)
- func (m *HomeMutation) Name() (r string, exists bool)
- func (m *HomeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HomeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *HomeMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *HomeMutation) Op() Op
- func (m *HomeMutation) RemoveRoomIDs(ids ...int)
- func (m *HomeMutation) RemovedEdges() []string
- func (m *HomeMutation) RemovedIDs(name string) []ent.Value
- func (m *HomeMutation) RemovedRoomsIDs() (ids []int)
- func (m *HomeMutation) ResetEdge(name string) error
- func (m *HomeMutation) ResetField(name string) error
- func (m *HomeMutation) ResetName()
- func (m *HomeMutation) ResetRooms()
- func (m *HomeMutation) ResetUUID()
- func (m *HomeMutation) RoomsCleared() bool
- func (m *HomeMutation) RoomsIDs() (ids []int)
- func (m *HomeMutation) SetField(name string, value ent.Value) error
- func (m *HomeMutation) SetName(s string)
- func (m *HomeMutation) SetUUID(u uuid.UUID)
- func (m HomeMutation) Tx() (*Tx, error)
- func (m *HomeMutation) Type() string
- func (m *HomeMutation) UUID() (r uuid.UUID, exists bool)
- func (m *HomeMutation) Where(ps ...predicate.Home)
- type HomeQuery
- func (hq *HomeQuery) All(ctx context.Context) ([]*Home, error)
- func (hq *HomeQuery) AllX(ctx context.Context) []*Home
- func (hq *HomeQuery) Clone() *HomeQuery
- func (hq *HomeQuery) Count(ctx context.Context) (int, error)
- func (hq *HomeQuery) CountX(ctx context.Context) int
- func (hq *HomeQuery) Exist(ctx context.Context) (bool, error)
- func (hq *HomeQuery) ExistX(ctx context.Context) bool
- func (hq *HomeQuery) First(ctx context.Context) (*Home, error)
- func (hq *HomeQuery) FirstID(ctx context.Context) (id int, err error)
- func (hq *HomeQuery) FirstIDX(ctx context.Context) int
- func (hq *HomeQuery) FirstX(ctx context.Context) *Home
- func (hq *HomeQuery) GroupBy(field string, fields ...string) *HomeGroupBy
- func (hq *HomeQuery) IDs(ctx context.Context) ([]int, error)
- func (hq *HomeQuery) IDsX(ctx context.Context) []int
- func (hq *HomeQuery) Limit(limit int) *HomeQuery
- func (hq *HomeQuery) Offset(offset int) *HomeQuery
- func (hq *HomeQuery) Only(ctx context.Context) (*Home, error)
- func (hq *HomeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (hq *HomeQuery) OnlyIDX(ctx context.Context) int
- func (hq *HomeQuery) OnlyX(ctx context.Context) *Home
- func (hq *HomeQuery) Order(o ...OrderFunc) *HomeQuery
- func (hq *HomeQuery) QueryRooms() *RoomQuery
- func (hq *HomeQuery) Select(fields ...string) *HomeSelect
- func (hq *HomeQuery) Unique(unique bool) *HomeQuery
- func (hq *HomeQuery) Where(ps ...predicate.Home) *HomeQuery
- func (hq *HomeQuery) WithRooms(opts ...func(*RoomQuery)) *HomeQuery
- type HomeSelect
- func (hs *HomeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (hs *HomeSelect) BoolX(ctx context.Context) bool
- func (hs *HomeSelect) Bools(ctx context.Context) ([]bool, error)
- func (hs *HomeSelect) BoolsX(ctx context.Context) []bool
- func (hs *HomeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (hs *HomeSelect) Float64X(ctx context.Context) float64
- func (hs *HomeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (hs *HomeSelect) Float64sX(ctx context.Context) []float64
- func (hs *HomeSelect) Int(ctx context.Context) (_ int, err error)
- func (hs *HomeSelect) IntX(ctx context.Context) int
- func (hs *HomeSelect) Ints(ctx context.Context) ([]int, error)
- func (hs *HomeSelect) IntsX(ctx context.Context) []int
- func (hs *HomeSelect) Scan(ctx context.Context, v interface{}) error
- func (hs *HomeSelect) ScanX(ctx context.Context, v interface{})
- func (hs *HomeSelect) String(ctx context.Context) (_ string, err error)
- func (hs *HomeSelect) StringX(ctx context.Context) string
- func (hs *HomeSelect) Strings(ctx context.Context) ([]string, error)
- func (hs *HomeSelect) StringsX(ctx context.Context) []string
- type HomeUpdate
- func (hu *HomeUpdate) AddRoomIDs(ids ...int) *HomeUpdate
- func (hu *HomeUpdate) AddRooms(r ...*Room) *HomeUpdate
- func (hu *HomeUpdate) ClearRooms() *HomeUpdate
- func (hu *HomeUpdate) Exec(ctx context.Context) error
- func (hu *HomeUpdate) ExecX(ctx context.Context)
- func (hu *HomeUpdate) Mutation() *HomeMutation
- func (hu *HomeUpdate) RemoveRoomIDs(ids ...int) *HomeUpdate
- func (hu *HomeUpdate) RemoveRooms(r ...*Room) *HomeUpdate
- func (hu *HomeUpdate) Save(ctx context.Context) (int, error)
- func (hu *HomeUpdate) SaveX(ctx context.Context) int
- func (hu *HomeUpdate) SetName(s string) *HomeUpdate
- func (hu *HomeUpdate) Where(ps ...predicate.Home) *HomeUpdate
- type HomeUpdateOne
- func (huo *HomeUpdateOne) AddRoomIDs(ids ...int) *HomeUpdateOne
- func (huo *HomeUpdateOne) AddRooms(r ...*Room) *HomeUpdateOne
- func (huo *HomeUpdateOne) ClearRooms() *HomeUpdateOne
- func (huo *HomeUpdateOne) Exec(ctx context.Context) error
- func (huo *HomeUpdateOne) ExecX(ctx context.Context)
- func (huo *HomeUpdateOne) Mutation() *HomeMutation
- func (huo *HomeUpdateOne) RemoveRoomIDs(ids ...int) *HomeUpdateOne
- func (huo *HomeUpdateOne) RemoveRooms(r ...*Room) *HomeUpdateOne
- func (huo *HomeUpdateOne) Save(ctx context.Context) (*Home, error)
- func (huo *HomeUpdateOne) SaveX(ctx context.Context) *Home
- func (huo *HomeUpdateOne) Select(field string, fields ...string) *HomeUpdateOne
- func (huo *HomeUpdateOne) SetName(s string) *HomeUpdateOne
- type Homes
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Room
- type RoomClient
- func (c *RoomClient) Create() *RoomCreate
- func (c *RoomClient) CreateBulk(builders ...*RoomCreate) *RoomCreateBulk
- func (c *RoomClient) Delete() *RoomDelete
- func (c *RoomClient) DeleteOne(r *Room) *RoomDeleteOne
- func (c *RoomClient) DeleteOneID(id int) *RoomDeleteOne
- func (c *RoomClient) Get(ctx context.Context, id int) (*Room, error)
- func (c *RoomClient) GetX(ctx context.Context, id int) *Room
- func (c *RoomClient) Hooks() []Hook
- func (c *RoomClient) Query() *RoomQuery
- func (c *RoomClient) QueryHome(r *Room) *HomeQuery
- func (c *RoomClient) QueryThings(r *Room) *ThingQuery
- func (c *RoomClient) Update() *RoomUpdate
- func (c *RoomClient) UpdateOne(r *Room) *RoomUpdateOne
- func (c *RoomClient) UpdateOneID(id int) *RoomUpdateOne
- func (c *RoomClient) Use(hooks ...Hook)
- type RoomConnection
- type RoomConnectionClient
- func (c *RoomConnectionClient) Create() *RoomConnectionCreate
- func (c *RoomConnectionClient) CreateBulk(builders ...*RoomConnectionCreate) *RoomConnectionCreateBulk
- func (c *RoomConnectionClient) Delete() *RoomConnectionDelete
- func (c *RoomConnectionClient) DeleteOne(rc *RoomConnection) *RoomConnectionDeleteOne
- func (c *RoomConnectionClient) DeleteOneID(id int) *RoomConnectionDeleteOne
- func (c *RoomConnectionClient) Get(ctx context.Context, id int) (*RoomConnection, error)
- func (c *RoomConnectionClient) GetX(ctx context.Context, id int) *RoomConnection
- func (c *RoomConnectionClient) Hooks() []Hook
- func (c *RoomConnectionClient) Query() *RoomConnectionQuery
- func (c *RoomConnectionClient) QueryRoom(rc *RoomConnection) *RoomQuery
- func (c *RoomConnectionClient) QueryUser(rc *RoomConnection) *UserQuery
- func (c *RoomConnectionClient) Update() *RoomConnectionUpdate
- func (c *RoomConnectionClient) UpdateOne(rc *RoomConnection) *RoomConnectionUpdateOne
- func (c *RoomConnectionClient) UpdateOneID(id int) *RoomConnectionUpdateOne
- func (c *RoomConnectionClient) Use(hooks ...Hook)
- type RoomConnectionCreate
- func (rcc *RoomConnectionCreate) Exec(ctx context.Context) error
- func (rcc *RoomConnectionCreate) ExecX(ctx context.Context)
- func (rcc *RoomConnectionCreate) Mutation() *RoomConnectionMutation
- func (rcc *RoomConnectionCreate) Save(ctx context.Context) (*RoomConnection, error)
- func (rcc *RoomConnectionCreate) SaveX(ctx context.Context) *RoomConnection
- func (rcc *RoomConnectionCreate) SetEndTime(s string) *RoomConnectionCreate
- func (rcc *RoomConnectionCreate) SetNillableEndTime(s *string) *RoomConnectionCreate
- func (rcc *RoomConnectionCreate) SetNillableStartTime(s *string) *RoomConnectionCreate
- func (rcc *RoomConnectionCreate) SetRoom(r *Room) *RoomConnectionCreate
- func (rcc *RoomConnectionCreate) SetRoomID(id int) *RoomConnectionCreate
- func (rcc *RoomConnectionCreate) SetStartTime(s string) *RoomConnectionCreate
- func (rcc *RoomConnectionCreate) SetUser(u *User) *RoomConnectionCreate
- func (rcc *RoomConnectionCreate) SetUserID(id int) *RoomConnectionCreate
- type RoomConnectionCreateBulk
- func (rccb *RoomConnectionCreateBulk) Exec(ctx context.Context) error
- func (rccb *RoomConnectionCreateBulk) ExecX(ctx context.Context)
- func (rccb *RoomConnectionCreateBulk) Save(ctx context.Context) ([]*RoomConnection, error)
- func (rccb *RoomConnectionCreateBulk) SaveX(ctx context.Context) []*RoomConnection
- type RoomConnectionDelete
- type RoomConnectionDeleteOne
- type RoomConnectionEdges
- type RoomConnectionGroupBy
- func (rcgb *RoomConnectionGroupBy) Aggregate(fns ...AggregateFunc) *RoomConnectionGroupBy
- func (rcgb *RoomConnectionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (rcgb *RoomConnectionGroupBy) BoolX(ctx context.Context) bool
- func (rcgb *RoomConnectionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (rcgb *RoomConnectionGroupBy) BoolsX(ctx context.Context) []bool
- func (rcgb *RoomConnectionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (rcgb *RoomConnectionGroupBy) Float64X(ctx context.Context) float64
- func (rcgb *RoomConnectionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (rcgb *RoomConnectionGroupBy) Float64sX(ctx context.Context) []float64
- func (rcgb *RoomConnectionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (rcgb *RoomConnectionGroupBy) IntX(ctx context.Context) int
- func (rcgb *RoomConnectionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (rcgb *RoomConnectionGroupBy) IntsX(ctx context.Context) []int
- func (rcgb *RoomConnectionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (rcgb *RoomConnectionGroupBy) ScanX(ctx context.Context, v interface{})
- func (rcgb *RoomConnectionGroupBy) String(ctx context.Context) (_ string, err error)
- func (rcgb *RoomConnectionGroupBy) StringX(ctx context.Context) string
- func (rcgb *RoomConnectionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (rcgb *RoomConnectionGroupBy) StringsX(ctx context.Context) []string
- type RoomConnectionMutation
- func (m *RoomConnectionMutation) AddField(name string, value ent.Value) error
- func (m *RoomConnectionMutation) AddedEdges() []string
- func (m *RoomConnectionMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoomConnectionMutation) AddedFields() []string
- func (m *RoomConnectionMutation) AddedIDs(name string) []ent.Value
- func (m *RoomConnectionMutation) ClearEdge(name string) error
- func (m *RoomConnectionMutation) ClearField(name string) error
- func (m *RoomConnectionMutation) ClearRoom()
- func (m *RoomConnectionMutation) ClearUser()
- func (m *RoomConnectionMutation) ClearedEdges() []string
- func (m *RoomConnectionMutation) ClearedFields() []string
- func (m RoomConnectionMutation) Client() *Client
- func (m *RoomConnectionMutation) EdgeCleared(name string) bool
- func (m *RoomConnectionMutation) EndTime() (r string, exists bool)
- func (m *RoomConnectionMutation) Field(name string) (ent.Value, bool)
- func (m *RoomConnectionMutation) FieldCleared(name string) bool
- func (m *RoomConnectionMutation) Fields() []string
- func (m *RoomConnectionMutation) ID() (id int, exists bool)
- func (m *RoomConnectionMutation) OldEndTime(ctx context.Context) (v string, err error)
- func (m *RoomConnectionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoomConnectionMutation) OldStartTime(ctx context.Context) (v string, err error)
- func (m *RoomConnectionMutation) Op() Op
- func (m *RoomConnectionMutation) RemovedEdges() []string
- func (m *RoomConnectionMutation) RemovedIDs(name string) []ent.Value
- func (m *RoomConnectionMutation) ResetEdge(name string) error
- func (m *RoomConnectionMutation) ResetEndTime()
- func (m *RoomConnectionMutation) ResetField(name string) error
- func (m *RoomConnectionMutation) ResetRoom()
- func (m *RoomConnectionMutation) ResetStartTime()
- func (m *RoomConnectionMutation) ResetUser()
- func (m *RoomConnectionMutation) RoomCleared() bool
- func (m *RoomConnectionMutation) RoomID() (id int, exists bool)
- func (m *RoomConnectionMutation) RoomIDs() (ids []int)
- func (m *RoomConnectionMutation) SetEndTime(s string)
- func (m *RoomConnectionMutation) SetField(name string, value ent.Value) error
- func (m *RoomConnectionMutation) SetRoomID(id int)
- func (m *RoomConnectionMutation) SetStartTime(s string)
- func (m *RoomConnectionMutation) SetUserID(id int)
- func (m *RoomConnectionMutation) StartTime() (r string, exists bool)
- func (m RoomConnectionMutation) Tx() (*Tx, error)
- func (m *RoomConnectionMutation) Type() string
- func (m *RoomConnectionMutation) UserCleared() bool
- func (m *RoomConnectionMutation) UserID() (id int, exists bool)
- func (m *RoomConnectionMutation) UserIDs() (ids []int)
- func (m *RoomConnectionMutation) Where(ps ...predicate.RoomConnection)
- type RoomConnectionQuery
- func (rcq *RoomConnectionQuery) All(ctx context.Context) ([]*RoomConnection, error)
- func (rcq *RoomConnectionQuery) AllX(ctx context.Context) []*RoomConnection
- func (rcq *RoomConnectionQuery) Clone() *RoomConnectionQuery
- func (rcq *RoomConnectionQuery) Count(ctx context.Context) (int, error)
- func (rcq *RoomConnectionQuery) CountX(ctx context.Context) int
- func (rcq *RoomConnectionQuery) Exist(ctx context.Context) (bool, error)
- func (rcq *RoomConnectionQuery) ExistX(ctx context.Context) bool
- func (rcq *RoomConnectionQuery) First(ctx context.Context) (*RoomConnection, error)
- func (rcq *RoomConnectionQuery) FirstID(ctx context.Context) (id int, err error)
- func (rcq *RoomConnectionQuery) FirstIDX(ctx context.Context) int
- func (rcq *RoomConnectionQuery) FirstX(ctx context.Context) *RoomConnection
- func (rcq *RoomConnectionQuery) GroupBy(field string, fields ...string) *RoomConnectionGroupBy
- func (rcq *RoomConnectionQuery) IDs(ctx context.Context) ([]int, error)
- func (rcq *RoomConnectionQuery) IDsX(ctx context.Context) []int
- func (rcq *RoomConnectionQuery) Limit(limit int) *RoomConnectionQuery
- func (rcq *RoomConnectionQuery) Offset(offset int) *RoomConnectionQuery
- func (rcq *RoomConnectionQuery) Only(ctx context.Context) (*RoomConnection, error)
- func (rcq *RoomConnectionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rcq *RoomConnectionQuery) OnlyIDX(ctx context.Context) int
- func (rcq *RoomConnectionQuery) OnlyX(ctx context.Context) *RoomConnection
- func (rcq *RoomConnectionQuery) Order(o ...OrderFunc) *RoomConnectionQuery
- func (rcq *RoomConnectionQuery) QueryRoom() *RoomQuery
- func (rcq *RoomConnectionQuery) QueryUser() *UserQuery
- func (rcq *RoomConnectionQuery) Select(fields ...string) *RoomConnectionSelect
- func (rcq *RoomConnectionQuery) Unique(unique bool) *RoomConnectionQuery
- func (rcq *RoomConnectionQuery) Where(ps ...predicate.RoomConnection) *RoomConnectionQuery
- func (rcq *RoomConnectionQuery) WithRoom(opts ...func(*RoomQuery)) *RoomConnectionQuery
- func (rcq *RoomConnectionQuery) WithUser(opts ...func(*UserQuery)) *RoomConnectionQuery
- type RoomConnectionSelect
- func (rcs *RoomConnectionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (rcs *RoomConnectionSelect) BoolX(ctx context.Context) bool
- func (rcs *RoomConnectionSelect) Bools(ctx context.Context) ([]bool, error)
- func (rcs *RoomConnectionSelect) BoolsX(ctx context.Context) []bool
- func (rcs *RoomConnectionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (rcs *RoomConnectionSelect) Float64X(ctx context.Context) float64
- func (rcs *RoomConnectionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (rcs *RoomConnectionSelect) Float64sX(ctx context.Context) []float64
- func (rcs *RoomConnectionSelect) Int(ctx context.Context) (_ int, err error)
- func (rcs *RoomConnectionSelect) IntX(ctx context.Context) int
- func (rcs *RoomConnectionSelect) Ints(ctx context.Context) ([]int, error)
- func (rcs *RoomConnectionSelect) IntsX(ctx context.Context) []int
- func (rcs *RoomConnectionSelect) Scan(ctx context.Context, v interface{}) error
- func (rcs *RoomConnectionSelect) ScanX(ctx context.Context, v interface{})
- func (rcs *RoomConnectionSelect) String(ctx context.Context) (_ string, err error)
- func (rcs *RoomConnectionSelect) StringX(ctx context.Context) string
- func (rcs *RoomConnectionSelect) Strings(ctx context.Context) ([]string, error)
- func (rcs *RoomConnectionSelect) StringsX(ctx context.Context) []string
- type RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) ClearRoom() *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) ClearUser() *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) Exec(ctx context.Context) error
- func (rcu *RoomConnectionUpdate) ExecX(ctx context.Context)
- func (rcu *RoomConnectionUpdate) Mutation() *RoomConnectionMutation
- func (rcu *RoomConnectionUpdate) Save(ctx context.Context) (int, error)
- func (rcu *RoomConnectionUpdate) SaveX(ctx context.Context) int
- func (rcu *RoomConnectionUpdate) SetEndTime(s string) *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) SetNillableEndTime(s *string) *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) SetNillableStartTime(s *string) *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) SetRoom(r *Room) *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) SetRoomID(id int) *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) SetStartTime(s string) *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) SetUser(u *User) *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) SetUserID(id int) *RoomConnectionUpdate
- func (rcu *RoomConnectionUpdate) Where(ps ...predicate.RoomConnection) *RoomConnectionUpdate
- type RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) ClearRoom() *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) ClearUser() *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) Exec(ctx context.Context) error
- func (rcuo *RoomConnectionUpdateOne) ExecX(ctx context.Context)
- func (rcuo *RoomConnectionUpdateOne) Mutation() *RoomConnectionMutation
- func (rcuo *RoomConnectionUpdateOne) Save(ctx context.Context) (*RoomConnection, error)
- func (rcuo *RoomConnectionUpdateOne) SaveX(ctx context.Context) *RoomConnection
- func (rcuo *RoomConnectionUpdateOne) Select(field string, fields ...string) *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) SetEndTime(s string) *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) SetNillableEndTime(s *string) *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) SetNillableStartTime(s *string) *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) SetRoom(r *Room) *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) SetRoomID(id int) *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) SetStartTime(s string) *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) SetUser(u *User) *RoomConnectionUpdateOne
- func (rcuo *RoomConnectionUpdateOne) SetUserID(id int) *RoomConnectionUpdateOne
- type RoomConnections
- type RoomCreate
- func (rc *RoomCreate) AddThingIDs(ids ...int) *RoomCreate
- func (rc *RoomCreate) AddThings(t ...*Thing) *RoomCreate
- func (rc *RoomCreate) Exec(ctx context.Context) error
- func (rc *RoomCreate) ExecX(ctx context.Context)
- func (rc *RoomCreate) Mutation() *RoomMutation
- func (rc *RoomCreate) Save(ctx context.Context) (*Room, error)
- func (rc *RoomCreate) SaveX(ctx context.Context) *Room
- func (rc *RoomCreate) SetHome(h *Home) *RoomCreate
- func (rc *RoomCreate) SetHomeID(id int) *RoomCreate
- func (rc *RoomCreate) SetName(s string) *RoomCreate
- func (rc *RoomCreate) SetUUID(u uuid.UUID) *RoomCreate
- type RoomCreateBulk
- type RoomDelete
- type RoomDeleteOne
- type RoomEdges
- type RoomGroupBy
- func (rgb *RoomGroupBy) Aggregate(fns ...AggregateFunc) *RoomGroupBy
- func (rgb *RoomGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (rgb *RoomGroupBy) BoolX(ctx context.Context) bool
- func (rgb *RoomGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (rgb *RoomGroupBy) BoolsX(ctx context.Context) []bool
- func (rgb *RoomGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (rgb *RoomGroupBy) Float64X(ctx context.Context) float64
- func (rgb *RoomGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (rgb *RoomGroupBy) Float64sX(ctx context.Context) []float64
- func (rgb *RoomGroupBy) Int(ctx context.Context) (_ int, err error)
- func (rgb *RoomGroupBy) IntX(ctx context.Context) int
- func (rgb *RoomGroupBy) Ints(ctx context.Context) ([]int, error)
- func (rgb *RoomGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RoomGroupBy) Scan(ctx context.Context, v interface{}) error
- func (rgb *RoomGroupBy) ScanX(ctx context.Context, v interface{})
- func (rgb *RoomGroupBy) String(ctx context.Context) (_ string, err error)
- func (rgb *RoomGroupBy) StringX(ctx context.Context) string
- func (rgb *RoomGroupBy) Strings(ctx context.Context) ([]string, error)
- func (rgb *RoomGroupBy) StringsX(ctx context.Context) []string
- type RoomMutation
- func (m *RoomMutation) AddField(name string, value ent.Value) error
- func (m *RoomMutation) AddThingIDs(ids ...int)
- func (m *RoomMutation) AddedEdges() []string
- func (m *RoomMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoomMutation) AddedFields() []string
- func (m *RoomMutation) AddedIDs(name string) []ent.Value
- func (m *RoomMutation) ClearEdge(name string) error
- func (m *RoomMutation) ClearField(name string) error
- func (m *RoomMutation) ClearHome()
- func (m *RoomMutation) ClearThings()
- func (m *RoomMutation) ClearedEdges() []string
- func (m *RoomMutation) ClearedFields() []string
- func (m RoomMutation) Client() *Client
- func (m *RoomMutation) EdgeCleared(name string) bool
- func (m *RoomMutation) Field(name string) (ent.Value, bool)
- func (m *RoomMutation) FieldCleared(name string) bool
- func (m *RoomMutation) Fields() []string
- func (m *RoomMutation) HomeCleared() bool
- func (m *RoomMutation) HomeID() (id int, exists bool)
- func (m *RoomMutation) HomeIDs() (ids []int)
- func (m *RoomMutation) ID() (id int, exists bool)
- func (m *RoomMutation) Name() (r string, exists bool)
- func (m *RoomMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoomMutation) OldName(ctx context.Context) (v string, err error)
- func (m *RoomMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *RoomMutation) Op() Op
- func (m *RoomMutation) RemoveThingIDs(ids ...int)
- func (m *RoomMutation) RemovedEdges() []string
- func (m *RoomMutation) RemovedIDs(name string) []ent.Value
- func (m *RoomMutation) RemovedThingsIDs() (ids []int)
- func (m *RoomMutation) ResetEdge(name string) error
- func (m *RoomMutation) ResetField(name string) error
- func (m *RoomMutation) ResetHome()
- func (m *RoomMutation) ResetName()
- func (m *RoomMutation) ResetThings()
- func (m *RoomMutation) ResetUUID()
- func (m *RoomMutation) SetField(name string, value ent.Value) error
- func (m *RoomMutation) SetHomeID(id int)
- func (m *RoomMutation) SetName(s string)
- func (m *RoomMutation) SetUUID(u uuid.UUID)
- func (m *RoomMutation) ThingsCleared() bool
- func (m *RoomMutation) ThingsIDs() (ids []int)
- func (m RoomMutation) Tx() (*Tx, error)
- func (m *RoomMutation) Type() string
- func (m *RoomMutation) UUID() (r uuid.UUID, exists bool)
- func (m *RoomMutation) Where(ps ...predicate.Room)
- type RoomQuery
- func (rq *RoomQuery) All(ctx context.Context) ([]*Room, error)
- func (rq *RoomQuery) AllX(ctx context.Context) []*Room
- func (rq *RoomQuery) Clone() *RoomQuery
- func (rq *RoomQuery) Count(ctx context.Context) (int, error)
- func (rq *RoomQuery) CountX(ctx context.Context) int
- func (rq *RoomQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RoomQuery) ExistX(ctx context.Context) bool
- func (rq *RoomQuery) First(ctx context.Context) (*Room, error)
- func (rq *RoomQuery) FirstID(ctx context.Context) (id int, err error)
- func (rq *RoomQuery) FirstIDX(ctx context.Context) int
- func (rq *RoomQuery) FirstX(ctx context.Context) *Room
- func (rq *RoomQuery) GroupBy(field string, fields ...string) *RoomGroupBy
- func (rq *RoomQuery) IDs(ctx context.Context) ([]int, error)
- func (rq *RoomQuery) IDsX(ctx context.Context) []int
- func (rq *RoomQuery) Limit(limit int) *RoomQuery
- func (rq *RoomQuery) Offset(offset int) *RoomQuery
- func (rq *RoomQuery) Only(ctx context.Context) (*Room, error)
- func (rq *RoomQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rq *RoomQuery) OnlyIDX(ctx context.Context) int
- func (rq *RoomQuery) OnlyX(ctx context.Context) *Room
- func (rq *RoomQuery) Order(o ...OrderFunc) *RoomQuery
- func (rq *RoomQuery) QueryHome() *HomeQuery
- func (rq *RoomQuery) QueryThings() *ThingQuery
- func (rq *RoomQuery) Select(fields ...string) *RoomSelect
- func (rq *RoomQuery) Unique(unique bool) *RoomQuery
- func (rq *RoomQuery) Where(ps ...predicate.Room) *RoomQuery
- func (rq *RoomQuery) WithHome(opts ...func(*HomeQuery)) *RoomQuery
- func (rq *RoomQuery) WithThings(opts ...func(*ThingQuery)) *RoomQuery
- type RoomSelect
- func (rs *RoomSelect) Bool(ctx context.Context) (_ bool, err error)
- func (rs *RoomSelect) BoolX(ctx context.Context) bool
- func (rs *RoomSelect) Bools(ctx context.Context) ([]bool, error)
- func (rs *RoomSelect) BoolsX(ctx context.Context) []bool
- func (rs *RoomSelect) Float64(ctx context.Context) (_ float64, err error)
- func (rs *RoomSelect) Float64X(ctx context.Context) float64
- func (rs *RoomSelect) Float64s(ctx context.Context) ([]float64, error)
- func (rs *RoomSelect) Float64sX(ctx context.Context) []float64
- func (rs *RoomSelect) Int(ctx context.Context) (_ int, err error)
- func (rs *RoomSelect) IntX(ctx context.Context) int
- func (rs *RoomSelect) Ints(ctx context.Context) ([]int, error)
- func (rs *RoomSelect) IntsX(ctx context.Context) []int
- func (rs *RoomSelect) Scan(ctx context.Context, v interface{}) error
- func (rs *RoomSelect) ScanX(ctx context.Context, v interface{})
- func (rs *RoomSelect) String(ctx context.Context) (_ string, err error)
- func (rs *RoomSelect) StringX(ctx context.Context) string
- func (rs *RoomSelect) Strings(ctx context.Context) ([]string, error)
- func (rs *RoomSelect) StringsX(ctx context.Context) []string
- type RoomUpdate
- func (ru *RoomUpdate) AddThingIDs(ids ...int) *RoomUpdate
- func (ru *RoomUpdate) AddThings(t ...*Thing) *RoomUpdate
- func (ru *RoomUpdate) ClearHome() *RoomUpdate
- func (ru *RoomUpdate) ClearThings() *RoomUpdate
- func (ru *RoomUpdate) Exec(ctx context.Context) error
- func (ru *RoomUpdate) ExecX(ctx context.Context)
- func (ru *RoomUpdate) Mutation() *RoomMutation
- func (ru *RoomUpdate) RemoveThingIDs(ids ...int) *RoomUpdate
- func (ru *RoomUpdate) RemoveThings(t ...*Thing) *RoomUpdate
- func (ru *RoomUpdate) Save(ctx context.Context) (int, error)
- func (ru *RoomUpdate) SaveX(ctx context.Context) int
- func (ru *RoomUpdate) SetHome(h *Home) *RoomUpdate
- func (ru *RoomUpdate) SetHomeID(id int) *RoomUpdate
- func (ru *RoomUpdate) SetName(s string) *RoomUpdate
- func (ru *RoomUpdate) Where(ps ...predicate.Room) *RoomUpdate
- type RoomUpdateOne
- func (ruo *RoomUpdateOne) AddThingIDs(ids ...int) *RoomUpdateOne
- func (ruo *RoomUpdateOne) AddThings(t ...*Thing) *RoomUpdateOne
- func (ruo *RoomUpdateOne) ClearHome() *RoomUpdateOne
- func (ruo *RoomUpdateOne) ClearThings() *RoomUpdateOne
- func (ruo *RoomUpdateOne) Exec(ctx context.Context) error
- func (ruo *RoomUpdateOne) ExecX(ctx context.Context)
- func (ruo *RoomUpdateOne) Mutation() *RoomMutation
- func (ruo *RoomUpdateOne) RemoveThingIDs(ids ...int) *RoomUpdateOne
- func (ruo *RoomUpdateOne) RemoveThings(t ...*Thing) *RoomUpdateOne
- func (ruo *RoomUpdateOne) Save(ctx context.Context) (*Room, error)
- func (ruo *RoomUpdateOne) SaveX(ctx context.Context) *Room
- func (ruo *RoomUpdateOne) Select(field string, fields ...string) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetHome(h *Home) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetHomeID(id int) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetName(s string) *RoomUpdateOne
- type Rooms
- type Thing
- type ThingClient
- func (c *ThingClient) Create() *ThingCreate
- func (c *ThingClient) CreateBulk(builders ...*ThingCreate) *ThingCreateBulk
- func (c *ThingClient) Delete() *ThingDelete
- func (c *ThingClient) DeleteOne(t *Thing) *ThingDeleteOne
- func (c *ThingClient) DeleteOneID(id int) *ThingDeleteOne
- func (c *ThingClient) Get(ctx context.Context, id int) (*Thing, error)
- func (c *ThingClient) GetX(ctx context.Context, id int) *Thing
- func (c *ThingClient) Hooks() []Hook
- func (c *ThingClient) Query() *ThingQuery
- func (c *ThingClient) QueryRoom(t *Thing) *RoomQuery
- func (c *ThingClient) Update() *ThingUpdate
- func (c *ThingClient) UpdateOne(t *Thing) *ThingUpdateOne
- func (c *ThingClient) UpdateOneID(id int) *ThingUpdateOne
- func (c *ThingClient) Use(hooks ...Hook)
- type ThingConnection
- type ThingConnectionClient
- func (c *ThingConnectionClient) Create() *ThingConnectionCreate
- func (c *ThingConnectionClient) CreateBulk(builders ...*ThingConnectionCreate) *ThingConnectionCreateBulk
- func (c *ThingConnectionClient) Delete() *ThingConnectionDelete
- func (c *ThingConnectionClient) DeleteOne(tc *ThingConnection) *ThingConnectionDeleteOne
- func (c *ThingConnectionClient) DeleteOneID(id int) *ThingConnectionDeleteOne
- func (c *ThingConnectionClient) Get(ctx context.Context, id int) (*ThingConnection, error)
- func (c *ThingConnectionClient) GetX(ctx context.Context, id int) *ThingConnection
- func (c *ThingConnectionClient) Hooks() []Hook
- func (c *ThingConnectionClient) Query() *ThingConnectionQuery
- func (c *ThingConnectionClient) QueryThing(tc *ThingConnection) *ThingQuery
- func (c *ThingConnectionClient) QueryUser(tc *ThingConnection) *UserQuery
- func (c *ThingConnectionClient) Update() *ThingConnectionUpdate
- func (c *ThingConnectionClient) UpdateOne(tc *ThingConnection) *ThingConnectionUpdateOne
- func (c *ThingConnectionClient) UpdateOneID(id int) *ThingConnectionUpdateOne
- func (c *ThingConnectionClient) Use(hooks ...Hook)
- type ThingConnectionCreate
- func (tcc *ThingConnectionCreate) Exec(ctx context.Context) error
- func (tcc *ThingConnectionCreate) ExecX(ctx context.Context)
- func (tcc *ThingConnectionCreate) Mutation() *ThingConnectionMutation
- func (tcc *ThingConnectionCreate) Save(ctx context.Context) (*ThingConnection, error)
- func (tcc *ThingConnectionCreate) SaveX(ctx context.Context) *ThingConnection
- func (tcc *ThingConnectionCreate) SetEndTime(s string) *ThingConnectionCreate
- func (tcc *ThingConnectionCreate) SetNillableEndTime(s *string) *ThingConnectionCreate
- func (tcc *ThingConnectionCreate) SetNillableStartTime(s *string) *ThingConnectionCreate
- func (tcc *ThingConnectionCreate) SetStartTime(s string) *ThingConnectionCreate
- func (tcc *ThingConnectionCreate) SetThing(t *Thing) *ThingConnectionCreate
- func (tcc *ThingConnectionCreate) SetThingID(id int) *ThingConnectionCreate
- func (tcc *ThingConnectionCreate) SetUser(u *User) *ThingConnectionCreate
- func (tcc *ThingConnectionCreate) SetUserID(id int) *ThingConnectionCreate
- type ThingConnectionCreateBulk
- func (tccb *ThingConnectionCreateBulk) Exec(ctx context.Context) error
- func (tccb *ThingConnectionCreateBulk) ExecX(ctx context.Context)
- func (tccb *ThingConnectionCreateBulk) Save(ctx context.Context) ([]*ThingConnection, error)
- func (tccb *ThingConnectionCreateBulk) SaveX(ctx context.Context) []*ThingConnection
- type ThingConnectionDelete
- type ThingConnectionDeleteOne
- type ThingConnectionEdges
- type ThingConnectionGroupBy
- func (tcgb *ThingConnectionGroupBy) Aggregate(fns ...AggregateFunc) *ThingConnectionGroupBy
- func (tcgb *ThingConnectionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (tcgb *ThingConnectionGroupBy) BoolX(ctx context.Context) bool
- func (tcgb *ThingConnectionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (tcgb *ThingConnectionGroupBy) BoolsX(ctx context.Context) []bool
- func (tcgb *ThingConnectionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (tcgb *ThingConnectionGroupBy) Float64X(ctx context.Context) float64
- func (tcgb *ThingConnectionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (tcgb *ThingConnectionGroupBy) Float64sX(ctx context.Context) []float64
- func (tcgb *ThingConnectionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (tcgb *ThingConnectionGroupBy) IntX(ctx context.Context) int
- func (tcgb *ThingConnectionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (tcgb *ThingConnectionGroupBy) IntsX(ctx context.Context) []int
- func (tcgb *ThingConnectionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (tcgb *ThingConnectionGroupBy) ScanX(ctx context.Context, v interface{})
- func (tcgb *ThingConnectionGroupBy) String(ctx context.Context) (_ string, err error)
- func (tcgb *ThingConnectionGroupBy) StringX(ctx context.Context) string
- func (tcgb *ThingConnectionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (tcgb *ThingConnectionGroupBy) StringsX(ctx context.Context) []string
- type ThingConnectionMutation
- func (m *ThingConnectionMutation) AddField(name string, value ent.Value) error
- func (m *ThingConnectionMutation) AddedEdges() []string
- func (m *ThingConnectionMutation) AddedField(name string) (ent.Value, bool)
- func (m *ThingConnectionMutation) AddedFields() []string
- func (m *ThingConnectionMutation) AddedIDs(name string) []ent.Value
- func (m *ThingConnectionMutation) ClearEdge(name string) error
- func (m *ThingConnectionMutation) ClearField(name string) error
- func (m *ThingConnectionMutation) ClearThing()
- func (m *ThingConnectionMutation) ClearUser()
- func (m *ThingConnectionMutation) ClearedEdges() []string
- func (m *ThingConnectionMutation) ClearedFields() []string
- func (m ThingConnectionMutation) Client() *Client
- func (m *ThingConnectionMutation) EdgeCleared(name string) bool
- func (m *ThingConnectionMutation) EndTime() (r string, exists bool)
- func (m *ThingConnectionMutation) Field(name string) (ent.Value, bool)
- func (m *ThingConnectionMutation) FieldCleared(name string) bool
- func (m *ThingConnectionMutation) Fields() []string
- func (m *ThingConnectionMutation) ID() (id int, exists bool)
- func (m *ThingConnectionMutation) OldEndTime(ctx context.Context) (v string, err error)
- func (m *ThingConnectionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ThingConnectionMutation) OldStartTime(ctx context.Context) (v string, err error)
- func (m *ThingConnectionMutation) Op() Op
- func (m *ThingConnectionMutation) RemovedEdges() []string
- func (m *ThingConnectionMutation) RemovedIDs(name string) []ent.Value
- func (m *ThingConnectionMutation) ResetEdge(name string) error
- func (m *ThingConnectionMutation) ResetEndTime()
- func (m *ThingConnectionMutation) ResetField(name string) error
- func (m *ThingConnectionMutation) ResetStartTime()
- func (m *ThingConnectionMutation) ResetThing()
- func (m *ThingConnectionMutation) ResetUser()
- func (m *ThingConnectionMutation) SetEndTime(s string)
- func (m *ThingConnectionMutation) SetField(name string, value ent.Value) error
- func (m *ThingConnectionMutation) SetStartTime(s string)
- func (m *ThingConnectionMutation) SetThingID(id int)
- func (m *ThingConnectionMutation) SetUserID(id int)
- func (m *ThingConnectionMutation) StartTime() (r string, exists bool)
- func (m *ThingConnectionMutation) ThingCleared() bool
- func (m *ThingConnectionMutation) ThingID() (id int, exists bool)
- func (m *ThingConnectionMutation) ThingIDs() (ids []int)
- func (m ThingConnectionMutation) Tx() (*Tx, error)
- func (m *ThingConnectionMutation) Type() string
- func (m *ThingConnectionMutation) UserCleared() bool
- func (m *ThingConnectionMutation) UserID() (id int, exists bool)
- func (m *ThingConnectionMutation) UserIDs() (ids []int)
- func (m *ThingConnectionMutation) Where(ps ...predicate.ThingConnection)
- type ThingConnectionQuery
- func (tcq *ThingConnectionQuery) All(ctx context.Context) ([]*ThingConnection, error)
- func (tcq *ThingConnectionQuery) AllX(ctx context.Context) []*ThingConnection
- func (tcq *ThingConnectionQuery) Clone() *ThingConnectionQuery
- func (tcq *ThingConnectionQuery) Count(ctx context.Context) (int, error)
- func (tcq *ThingConnectionQuery) CountX(ctx context.Context) int
- func (tcq *ThingConnectionQuery) Exist(ctx context.Context) (bool, error)
- func (tcq *ThingConnectionQuery) ExistX(ctx context.Context) bool
- func (tcq *ThingConnectionQuery) First(ctx context.Context) (*ThingConnection, error)
- func (tcq *ThingConnectionQuery) FirstID(ctx context.Context) (id int, err error)
- func (tcq *ThingConnectionQuery) FirstIDX(ctx context.Context) int
- func (tcq *ThingConnectionQuery) FirstX(ctx context.Context) *ThingConnection
- func (tcq *ThingConnectionQuery) GroupBy(field string, fields ...string) *ThingConnectionGroupBy
- func (tcq *ThingConnectionQuery) IDs(ctx context.Context) ([]int, error)
- func (tcq *ThingConnectionQuery) IDsX(ctx context.Context) []int
- func (tcq *ThingConnectionQuery) Limit(limit int) *ThingConnectionQuery
- func (tcq *ThingConnectionQuery) Offset(offset int) *ThingConnectionQuery
- func (tcq *ThingConnectionQuery) Only(ctx context.Context) (*ThingConnection, error)
- func (tcq *ThingConnectionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tcq *ThingConnectionQuery) OnlyIDX(ctx context.Context) int
- func (tcq *ThingConnectionQuery) OnlyX(ctx context.Context) *ThingConnection
- func (tcq *ThingConnectionQuery) Order(o ...OrderFunc) *ThingConnectionQuery
- func (tcq *ThingConnectionQuery) QueryThing() *ThingQuery
- func (tcq *ThingConnectionQuery) QueryUser() *UserQuery
- func (tcq *ThingConnectionQuery) Select(fields ...string) *ThingConnectionSelect
- func (tcq *ThingConnectionQuery) Unique(unique bool) *ThingConnectionQuery
- func (tcq *ThingConnectionQuery) Where(ps ...predicate.ThingConnection) *ThingConnectionQuery
- func (tcq *ThingConnectionQuery) WithThing(opts ...func(*ThingQuery)) *ThingConnectionQuery
- func (tcq *ThingConnectionQuery) WithUser(opts ...func(*UserQuery)) *ThingConnectionQuery
- type ThingConnectionSelect
- func (tcs *ThingConnectionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (tcs *ThingConnectionSelect) BoolX(ctx context.Context) bool
- func (tcs *ThingConnectionSelect) Bools(ctx context.Context) ([]bool, error)
- func (tcs *ThingConnectionSelect) BoolsX(ctx context.Context) []bool
- func (tcs *ThingConnectionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (tcs *ThingConnectionSelect) Float64X(ctx context.Context) float64
- func (tcs *ThingConnectionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (tcs *ThingConnectionSelect) Float64sX(ctx context.Context) []float64
- func (tcs *ThingConnectionSelect) Int(ctx context.Context) (_ int, err error)
- func (tcs *ThingConnectionSelect) IntX(ctx context.Context) int
- func (tcs *ThingConnectionSelect) Ints(ctx context.Context) ([]int, error)
- func (tcs *ThingConnectionSelect) IntsX(ctx context.Context) []int
- func (tcs *ThingConnectionSelect) Scan(ctx context.Context, v interface{}) error
- func (tcs *ThingConnectionSelect) ScanX(ctx context.Context, v interface{})
- func (tcs *ThingConnectionSelect) String(ctx context.Context) (_ string, err error)
- func (tcs *ThingConnectionSelect) StringX(ctx context.Context) string
- func (tcs *ThingConnectionSelect) Strings(ctx context.Context) ([]string, error)
- func (tcs *ThingConnectionSelect) StringsX(ctx context.Context) []string
- type ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) ClearThing() *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) ClearUser() *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) Exec(ctx context.Context) error
- func (tcu *ThingConnectionUpdate) ExecX(ctx context.Context)
- func (tcu *ThingConnectionUpdate) Mutation() *ThingConnectionMutation
- func (tcu *ThingConnectionUpdate) Save(ctx context.Context) (int, error)
- func (tcu *ThingConnectionUpdate) SaveX(ctx context.Context) int
- func (tcu *ThingConnectionUpdate) SetEndTime(s string) *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) SetNillableEndTime(s *string) *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) SetNillableStartTime(s *string) *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) SetStartTime(s string) *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) SetThing(t *Thing) *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) SetThingID(id int) *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) SetUser(u *User) *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) SetUserID(id int) *ThingConnectionUpdate
- func (tcu *ThingConnectionUpdate) Where(ps ...predicate.ThingConnection) *ThingConnectionUpdate
- type ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) ClearThing() *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) ClearUser() *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) Exec(ctx context.Context) error
- func (tcuo *ThingConnectionUpdateOne) ExecX(ctx context.Context)
- func (tcuo *ThingConnectionUpdateOne) Mutation() *ThingConnectionMutation
- func (tcuo *ThingConnectionUpdateOne) Save(ctx context.Context) (*ThingConnection, error)
- func (tcuo *ThingConnectionUpdateOne) SaveX(ctx context.Context) *ThingConnection
- func (tcuo *ThingConnectionUpdateOne) Select(field string, fields ...string) *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) SetEndTime(s string) *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) SetNillableEndTime(s *string) *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) SetNillableStartTime(s *string) *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) SetStartTime(s string) *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) SetThing(t *Thing) *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) SetThingID(id int) *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) SetUser(u *User) *ThingConnectionUpdateOne
- func (tcuo *ThingConnectionUpdateOne) SetUserID(id int) *ThingConnectionUpdateOne
- type ThingConnections
- type ThingCreate
- func (tc *ThingCreate) Exec(ctx context.Context) error
- func (tc *ThingCreate) ExecX(ctx context.Context)
- func (tc *ThingCreate) Mutation() *ThingMutation
- func (tc *ThingCreate) Save(ctx context.Context) (*Thing, error)
- func (tc *ThingCreate) SaveX(ctx context.Context) *Thing
- func (tc *ThingCreate) SetName(s string) *ThingCreate
- func (tc *ThingCreate) SetRoom(r *Room) *ThingCreate
- func (tc *ThingCreate) SetRoomID(id int) *ThingCreate
- func (tc *ThingCreate) SetSecretKey(u uuid.UUID) *ThingCreate
- func (tc *ThingCreate) SetUUID(u uuid.UUID) *ThingCreate
- type ThingCreateBulk
- type ThingDelete
- type ThingDeleteOne
- type ThingEdges
- type ThingGroupBy
- func (tgb *ThingGroupBy) Aggregate(fns ...AggregateFunc) *ThingGroupBy
- func (tgb *ThingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (tgb *ThingGroupBy) BoolX(ctx context.Context) bool
- func (tgb *ThingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (tgb *ThingGroupBy) BoolsX(ctx context.Context) []bool
- func (tgb *ThingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (tgb *ThingGroupBy) Float64X(ctx context.Context) float64
- func (tgb *ThingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (tgb *ThingGroupBy) Float64sX(ctx context.Context) []float64
- func (tgb *ThingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (tgb *ThingGroupBy) IntX(ctx context.Context) int
- func (tgb *ThingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (tgb *ThingGroupBy) IntsX(ctx context.Context) []int
- func (tgb *ThingGroupBy) Scan(ctx context.Context, v interface{}) error
- func (tgb *ThingGroupBy) ScanX(ctx context.Context, v interface{})
- func (tgb *ThingGroupBy) String(ctx context.Context) (_ string, err error)
- func (tgb *ThingGroupBy) StringX(ctx context.Context) string
- func (tgb *ThingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (tgb *ThingGroupBy) StringsX(ctx context.Context) []string
- type ThingMutation
- func (m *ThingMutation) AddField(name string, value ent.Value) error
- func (m *ThingMutation) AddedEdges() []string
- func (m *ThingMutation) AddedField(name string) (ent.Value, bool)
- func (m *ThingMutation) AddedFields() []string
- func (m *ThingMutation) AddedIDs(name string) []ent.Value
- func (m *ThingMutation) ClearEdge(name string) error
- func (m *ThingMutation) ClearField(name string) error
- func (m *ThingMutation) ClearRoom()
- func (m *ThingMutation) ClearedEdges() []string
- func (m *ThingMutation) ClearedFields() []string
- func (m ThingMutation) Client() *Client
- func (m *ThingMutation) EdgeCleared(name string) bool
- func (m *ThingMutation) Field(name string) (ent.Value, bool)
- func (m *ThingMutation) FieldCleared(name string) bool
- func (m *ThingMutation) Fields() []string
- func (m *ThingMutation) ID() (id int, exists bool)
- func (m *ThingMutation) Name() (r string, exists bool)
- func (m *ThingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ThingMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ThingMutation) OldSecretKey(ctx context.Context) (v uuid.UUID, err error)
- func (m *ThingMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ThingMutation) Op() Op
- func (m *ThingMutation) RemovedEdges() []string
- func (m *ThingMutation) RemovedIDs(name string) []ent.Value
- func (m *ThingMutation) ResetEdge(name string) error
- func (m *ThingMutation) ResetField(name string) error
- func (m *ThingMutation) ResetName()
- func (m *ThingMutation) ResetRoom()
- func (m *ThingMutation) ResetSecretKey()
- func (m *ThingMutation) ResetUUID()
- func (m *ThingMutation) RoomCleared() bool
- func (m *ThingMutation) RoomID() (id int, exists bool)
- func (m *ThingMutation) RoomIDs() (ids []int)
- func (m *ThingMutation) SecretKey() (r uuid.UUID, exists bool)
- func (m *ThingMutation) SetField(name string, value ent.Value) error
- func (m *ThingMutation) SetName(s string)
- func (m *ThingMutation) SetRoomID(id int)
- func (m *ThingMutation) SetSecretKey(u uuid.UUID)
- func (m *ThingMutation) SetUUID(u uuid.UUID)
- func (m ThingMutation) Tx() (*Tx, error)
- func (m *ThingMutation) Type() string
- func (m *ThingMutation) UUID() (r uuid.UUID, exists bool)
- func (m *ThingMutation) Where(ps ...predicate.Thing)
- type ThingQuery
- func (tq *ThingQuery) All(ctx context.Context) ([]*Thing, error)
- func (tq *ThingQuery) AllX(ctx context.Context) []*Thing
- func (tq *ThingQuery) Clone() *ThingQuery
- func (tq *ThingQuery) Count(ctx context.Context) (int, error)
- func (tq *ThingQuery) CountX(ctx context.Context) int
- func (tq *ThingQuery) Exist(ctx context.Context) (bool, error)
- func (tq *ThingQuery) ExistX(ctx context.Context) bool
- func (tq *ThingQuery) First(ctx context.Context) (*Thing, error)
- func (tq *ThingQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *ThingQuery) FirstIDX(ctx context.Context) int
- func (tq *ThingQuery) FirstX(ctx context.Context) *Thing
- func (tq *ThingQuery) GroupBy(field string, fields ...string) *ThingGroupBy
- func (tq *ThingQuery) IDs(ctx context.Context) ([]int, error)
- func (tq *ThingQuery) IDsX(ctx context.Context) []int
- func (tq *ThingQuery) Limit(limit int) *ThingQuery
- func (tq *ThingQuery) Offset(offset int) *ThingQuery
- func (tq *ThingQuery) Only(ctx context.Context) (*Thing, error)
- func (tq *ThingQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *ThingQuery) OnlyIDX(ctx context.Context) int
- func (tq *ThingQuery) OnlyX(ctx context.Context) *Thing
- func (tq *ThingQuery) Order(o ...OrderFunc) *ThingQuery
- func (tq *ThingQuery) QueryRoom() *RoomQuery
- func (tq *ThingQuery) Select(fields ...string) *ThingSelect
- func (tq *ThingQuery) Unique(unique bool) *ThingQuery
- func (tq *ThingQuery) Where(ps ...predicate.Thing) *ThingQuery
- func (tq *ThingQuery) WithRoom(opts ...func(*RoomQuery)) *ThingQuery
- type ThingSelect
- func (ts *ThingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ts *ThingSelect) BoolX(ctx context.Context) bool
- func (ts *ThingSelect) Bools(ctx context.Context) ([]bool, error)
- func (ts *ThingSelect) BoolsX(ctx context.Context) []bool
- func (ts *ThingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ts *ThingSelect) Float64X(ctx context.Context) float64
- func (ts *ThingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ts *ThingSelect) Float64sX(ctx context.Context) []float64
- func (ts *ThingSelect) Int(ctx context.Context) (_ int, err error)
- func (ts *ThingSelect) IntX(ctx context.Context) int
- func (ts *ThingSelect) Ints(ctx context.Context) ([]int, error)
- func (ts *ThingSelect) IntsX(ctx context.Context) []int
- func (ts *ThingSelect) Scan(ctx context.Context, v interface{}) error
- func (ts *ThingSelect) ScanX(ctx context.Context, v interface{})
- func (ts *ThingSelect) String(ctx context.Context) (_ string, err error)
- func (ts *ThingSelect) StringX(ctx context.Context) string
- func (ts *ThingSelect) Strings(ctx context.Context) ([]string, error)
- func (ts *ThingSelect) StringsX(ctx context.Context) []string
- type ThingUpdate
- func (tu *ThingUpdate) ClearRoom() *ThingUpdate
- func (tu *ThingUpdate) Exec(ctx context.Context) error
- func (tu *ThingUpdate) ExecX(ctx context.Context)
- func (tu *ThingUpdate) Mutation() *ThingMutation
- func (tu *ThingUpdate) Save(ctx context.Context) (int, error)
- func (tu *ThingUpdate) SaveX(ctx context.Context) int
- func (tu *ThingUpdate) SetName(s string) *ThingUpdate
- func (tu *ThingUpdate) SetRoom(r *Room) *ThingUpdate
- func (tu *ThingUpdate) SetRoomID(id int) *ThingUpdate
- func (tu *ThingUpdate) SetSecretKey(u uuid.UUID) *ThingUpdate
- func (tu *ThingUpdate) Where(ps ...predicate.Thing) *ThingUpdate
- type ThingUpdateOne
- func (tuo *ThingUpdateOne) ClearRoom() *ThingUpdateOne
- func (tuo *ThingUpdateOne) Exec(ctx context.Context) error
- func (tuo *ThingUpdateOne) ExecX(ctx context.Context)
- func (tuo *ThingUpdateOne) Mutation() *ThingMutation
- func (tuo *ThingUpdateOne) Save(ctx context.Context) (*Thing, error)
- func (tuo *ThingUpdateOne) SaveX(ctx context.Context) *Thing
- func (tuo *ThingUpdateOne) Select(field string, fields ...string) *ThingUpdateOne
- func (tuo *ThingUpdateOne) SetName(s string) *ThingUpdateOne
- func (tuo *ThingUpdateOne) SetRoom(r *Room) *ThingUpdateOne
- func (tuo *ThingUpdateOne) SetRoomID(id int) *ThingUpdateOne
- func (tuo *ThingUpdateOne) SetSecretKey(u uuid.UUID) *ThingUpdateOne
- type Things
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryApps(u *User) *AppQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddAppIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddApps(a ...*App) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAccessKey(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetSecretKey(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetSuperUser(b bool) *UserCreate
- func (uc *UserCreate) SetUUID(u uuid.UUID) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- 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) AccessKey() (r uuid.UUID, exists bool)
- func (m *UserMutation) AddAppIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- 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) AppsCleared() bool
- func (m *UserMutation) AppsIDs() (ids []int)
- func (m *UserMutation) ClearApps()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldAccessKey(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, 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) OldSecretKey(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserMutation) OldSuperUser(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemoveAppIDs(ids ...int)
- func (m *UserMutation) RemovedAppsIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetAccessKey()
- func (m *UserMutation) ResetApps()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetSecretKey()
- func (m *UserMutation) ResetSuperUser()
- func (m *UserMutation) ResetUUID()
- func (m *UserMutation) SecretKey() (r uuid.UUID, exists bool)
- func (m *UserMutation) SetAccessKey(u uuid.UUID)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetSecretKey(u uuid.UUID)
- func (m *UserMutation) SetSuperUser(b bool)
- func (m *UserMutation) SetUUID(u uuid.UUID)
- func (m *UserMutation) SuperUser() (r bool, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UUID() (r uuid.UUID, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- type UserQuery
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryApps() *AppQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithApps(opts ...func(*AppQuery)) *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) AddAppIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddApps(a ...*App) *UserUpdate
- func (uu *UserUpdate) ClearApps() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveAppIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveApps(a ...*App) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAccessKey(u uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetSecretKey(u uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetSuperUser(b bool) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAppIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddApps(a ...*App) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearApps() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveAppIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveApps(a ...*App) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAccessKey(u uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSecretKey(u uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSuperUser(b bool) *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. TypeApp = "App" TypeHome = "Home" TypeHomeConnection = "HomeConnection" TypeRoom = "Room" TypeRoomConnection = "RoomConnection" TypeThing = "Thing" TypeThingConnection = "ThingConnection" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type App ¶
type App struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // SecretKey holds the value of the "secret_key" field. SecretKey uuid.UUID `json:"secret_key,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AppQuery when eager-loading is set. Edges AppEdges `json:"edges"` // contains filtered or unexported fields }
App is the model entity for the App schema.
func (*App) Unwrap ¶
Unwrap unwraps the App entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*App) Update ¶
func (a *App) Update() *AppUpdateOne
Update returns a builder for updating this App. Note that you need to call App.Unwrap() before calling this method if this App was returned from a transaction, and the transaction was committed or rolled back.
type AppClient ¶
type AppClient struct {
// contains filtered or unexported fields
}
AppClient is a client for the App schema.
func NewAppClient ¶
func NewAppClient(c config) *AppClient
NewAppClient returns a client for the App from the given config.
func (*AppClient) CreateBulk ¶
func (c *AppClient) CreateBulk(builders ...*AppCreate) *AppCreateBulk
CreateBulk returns a builder for creating a bulk of App entities.
func (*AppClient) DeleteOne ¶
func (c *AppClient) DeleteOne(a *App) *AppDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*AppClient) DeleteOneID ¶
func (c *AppClient) DeleteOneID(id int) *AppDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*AppClient) UpdateOne ¶
func (c *AppClient) UpdateOne(a *App) *AppUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AppClient) UpdateOneID ¶
func (c *AppClient) UpdateOneID(id int) *AppUpdateOne
UpdateOneID returns an update builder for the given id.
type AppCreate ¶
type AppCreate struct {
// contains filtered or unexported fields
}
AppCreate is the builder for creating a App entity.
func (*AppCreate) Mutation ¶
func (ac *AppCreate) Mutation() *AppMutation
Mutation returns the AppMutation object of the builder.
func (*AppCreate) SetSecretKey ¶
SetSecretKey sets the "secret_key" field.
type AppCreateBulk ¶
type AppCreateBulk struct {
// contains filtered or unexported fields
}
AppCreateBulk is the builder for creating many App entities in bulk.
func (*AppCreateBulk) Exec ¶
func (acb *AppCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AppCreateBulk) ExecX ¶
func (acb *AppCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AppDelete ¶
type AppDelete struct {
// contains filtered or unexported fields
}
AppDelete is the builder for deleting a App entity.
func (*AppDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type AppDeleteOne ¶
type AppDeleteOne struct {
// contains filtered or unexported fields
}
AppDeleteOne is the builder for deleting a single App entity.
func (*AppDeleteOne) Exec ¶
func (ado *AppDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AppDeleteOne) ExecX ¶
func (ado *AppDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AppEdges ¶
type AppEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
AppEdges holds the relations/edges for other nodes in the graph.
type AppGroupBy ¶
type AppGroupBy struct {
// contains filtered or unexported fields
}
AppGroupBy is the group-by builder for App entities.
func (*AppGroupBy) Aggregate ¶
func (agb *AppGroupBy) Aggregate(fns ...AggregateFunc) *AppGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AppGroupBy) Bool ¶
func (agb *AppGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AppGroupBy) BoolX ¶
func (agb *AppGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AppGroupBy) Bools ¶
func (agb *AppGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*AppGroupBy) BoolsX ¶
func (agb *AppGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AppGroupBy) Float64 ¶
func (agb *AppGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AppGroupBy) Float64X ¶
func (agb *AppGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AppGroupBy) Float64s ¶
func (agb *AppGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*AppGroupBy) Float64sX ¶
func (agb *AppGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AppGroupBy) Int ¶
func (agb *AppGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AppGroupBy) IntX ¶
func (agb *AppGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AppGroupBy) Ints ¶
func (agb *AppGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*AppGroupBy) IntsX ¶
func (agb *AppGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AppGroupBy) Scan ¶
func (agb *AppGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*AppGroupBy) ScanX ¶
func (agb *AppGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AppGroupBy) String ¶
func (agb *AppGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AppGroupBy) StringX ¶
func (agb *AppGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AppMutation ¶
type AppMutation struct {
// contains filtered or unexported fields
}
AppMutation represents an operation that mutates the App nodes in the graph.
func (*AppMutation) AddField ¶
func (m *AppMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AppMutation) AddedEdges ¶
func (m *AppMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AppMutation) AddedField ¶
func (m *AppMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AppMutation) AddedFields ¶
func (m *AppMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AppMutation) AddedIDs ¶
func (m *AppMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AppMutation) ClearEdge ¶
func (m *AppMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*AppMutation) ClearField ¶
func (m *AppMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*AppMutation) ClearUser ¶
func (m *AppMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*AppMutation) ClearedEdges ¶
func (m *AppMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AppMutation) ClearedFields ¶
func (m *AppMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AppMutation) Client ¶
func (m AppMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*AppMutation) EdgeCleared ¶
func (m *AppMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AppMutation) Field ¶
func (m *AppMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AppMutation) FieldCleared ¶
func (m *AppMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AppMutation) Fields ¶
func (m *AppMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*AppMutation) ID ¶
func (m *AppMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AppMutation) Name ¶
func (m *AppMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AppMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*AppMutation) OldName ¶
func (m *AppMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AppMutation) OldSecretKey ¶
OldSecretKey returns the old "secret_key" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AppMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AppMutation) RemovedEdges ¶
func (m *AppMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AppMutation) RemovedIDs ¶
func (m *AppMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*AppMutation) ResetEdge ¶
func (m *AppMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*AppMutation) ResetField ¶
func (m *AppMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*AppMutation) ResetName ¶
func (m *AppMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AppMutation) ResetSecretKey ¶
func (m *AppMutation) ResetSecretKey()
ResetSecretKey resets all changes to the "secret_key" field.
func (*AppMutation) ResetUUID ¶
func (m *AppMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*AppMutation) ResetUser ¶
func (m *AppMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*AppMutation) SecretKey ¶
func (m *AppMutation) SecretKey() (r uuid.UUID, exists bool)
SecretKey returns the value of the "secret_key" field in the mutation.
func (*AppMutation) SetField ¶
func (m *AppMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AppMutation) SetName ¶
func (m *AppMutation) SetName(s string)
SetName sets the "name" field.
func (*AppMutation) SetSecretKey ¶
func (m *AppMutation) SetSecretKey(u uuid.UUID)
SetSecretKey sets the "secret_key" field.
func (*AppMutation) SetUUID ¶
func (m *AppMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (*AppMutation) SetUserID ¶
func (m *AppMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (AppMutation) Tx ¶
func (m AppMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AppMutation) Type ¶
func (m *AppMutation) Type() string
Type returns the node type of this mutation (App).
func (*AppMutation) UUID ¶
func (m *AppMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*AppMutation) UserCleared ¶
func (m *AppMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*AppMutation) UserID ¶
func (m *AppMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*AppMutation) UserIDs ¶
func (m *AppMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*AppMutation) Where ¶
func (m *AppMutation) Where(ps ...predicate.App)
Where appends a list predicates to the AppMutation builder.
type AppQuery ¶
type AppQuery struct {
// contains filtered or unexported fields
}
AppQuery is the builder for querying App entities.
func (*AppQuery) Clone ¶
Clone returns a duplicate of the AppQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AppQuery) First ¶
First returns the first App entity from the query. Returns a *NotFoundError when no App was found.
func (*AppQuery) FirstID ¶
FirstID returns the first App ID from the query. Returns a *NotFoundError when no App ID was found.
func (*AppQuery) GroupBy ¶
func (aq *AppQuery) GroupBy(field string, fields ...string) *AppGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` Count int `json:"count,omitempty"` } client.App.Query(). GroupBy(app.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AppQuery) Only ¶
Only returns a single App entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one App entity is not found. Returns a *NotFoundError when no App entities are found.
func (*AppQuery) OnlyID ¶
OnlyID is like Only, but returns the only App ID in the query. Returns a *NotSingularError when exactly one App ID is not found. Returns a *NotFoundError when no entities are found.
func (*AppQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` } client.App.Query(). Select(app.FieldUUID). Scan(ctx, &v)
func (*AppQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
type AppSelect ¶
type AppSelect struct { *AppQuery // contains filtered or unexported fields }
AppSelect is the builder for selecting fields of App entities.
func (*AppSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AppSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AppSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AppSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AppSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AppSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AppSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AppUpdate ¶
type AppUpdate struct {
// contains filtered or unexported fields
}
AppUpdate is the builder for updating App entities.
func (*AppUpdate) Mutation ¶
func (au *AppUpdate) Mutation() *AppMutation
Mutation returns the AppMutation object of the builder.
func (*AppUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*AppUpdate) SetSecretKey ¶
SetSecretKey sets the "secret_key" field.
type AppUpdateOne ¶
type AppUpdateOne struct {
// contains filtered or unexported fields
}
AppUpdateOne is the builder for updating a single App entity.
func (*AppUpdateOne) ClearUser ¶
func (auo *AppUpdateOne) ClearUser() *AppUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*AppUpdateOne) Exec ¶
func (auo *AppUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AppUpdateOne) ExecX ¶
func (auo *AppUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppUpdateOne) Mutation ¶
func (auo *AppUpdateOne) Mutation() *AppMutation
Mutation returns the AppMutation object of the builder.
func (*AppUpdateOne) Save ¶
func (auo *AppUpdateOne) Save(ctx context.Context) (*App, error)
Save executes the query and returns the updated App entity.
func (*AppUpdateOne) SaveX ¶
func (auo *AppUpdateOne) SaveX(ctx context.Context) *App
SaveX is like Save, but panics if an error occurs.
func (*AppUpdateOne) Select ¶
func (auo *AppUpdateOne) Select(field string, fields ...string) *AppUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AppUpdateOne) SetName ¶
func (auo *AppUpdateOne) SetName(s string) *AppUpdateOne
SetName sets the "name" field.
func (*AppUpdateOne) SetSecretKey ¶
func (auo *AppUpdateOne) SetSecretKey(u uuid.UUID) *AppUpdateOne
SetSecretKey sets the "secret_key" field.
func (*AppUpdateOne) SetUser ¶
func (auo *AppUpdateOne) SetUser(u *User) *AppUpdateOne
SetUser sets the "user" edge to the User entity.
func (*AppUpdateOne) SetUserID ¶
func (auo *AppUpdateOne) SetUserID(id int) *AppUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // App is the client for interacting with the App builders. App *AppClient // Home is the client for interacting with the Home builders. Home *HomeClient // HomeConnection is the client for interacting with the HomeConnection builders. HomeConnection *HomeConnectionClient // Room is the client for interacting with the Room builders. Room *RoomClient // RoomConnection is the client for interacting with the RoomConnection builders. RoomConnection *RoomConnectionClient // Thing is the client for interacting with the Thing builders. Thing *ThingClient // ThingConnection is the client for interacting with the ThingConnection builders. ThingConnection *ThingConnectionClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). App. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(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 Home ¶
type Home struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the HomeQuery when eager-loading is set. Edges HomeEdges `json:"edges"` // contains filtered or unexported fields }
Home is the model entity for the Home schema.
func (*Home) QueryRooms ¶
QueryRooms queries the "rooms" edge of the Home entity.
func (*Home) Unwrap ¶
Unwrap unwraps the Home entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Home) Update ¶
func (h *Home) Update() *HomeUpdateOne
Update returns a builder for updating this Home. Note that you need to call Home.Unwrap() before calling this method if this Home was returned from a transaction, and the transaction was committed or rolled back.
type HomeClient ¶
type HomeClient struct {
// contains filtered or unexported fields
}
HomeClient is a client for the Home schema.
func NewHomeClient ¶
func NewHomeClient(c config) *HomeClient
NewHomeClient returns a client for the Home from the given config.
func (*HomeClient) Create ¶
func (c *HomeClient) Create() *HomeCreate
Create returns a create builder for Home.
func (*HomeClient) CreateBulk ¶
func (c *HomeClient) CreateBulk(builders ...*HomeCreate) *HomeCreateBulk
CreateBulk returns a builder for creating a bulk of Home entities.
func (*HomeClient) Delete ¶
func (c *HomeClient) Delete() *HomeDelete
Delete returns a delete builder for Home.
func (*HomeClient) DeleteOne ¶
func (c *HomeClient) DeleteOne(h *Home) *HomeDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*HomeClient) DeleteOneID ¶
func (c *HomeClient) DeleteOneID(id int) *HomeDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*HomeClient) GetX ¶
func (c *HomeClient) GetX(ctx context.Context, id int) *Home
GetX is like Get, but panics if an error occurs.
func (*HomeClient) Query ¶
func (c *HomeClient) Query() *HomeQuery
Query returns a query builder for Home.
func (*HomeClient) QueryRooms ¶
func (c *HomeClient) QueryRooms(h *Home) *RoomQuery
QueryRooms queries the rooms edge of a Home.
func (*HomeClient) Update ¶
func (c *HomeClient) Update() *HomeUpdate
Update returns an update builder for Home.
func (*HomeClient) UpdateOne ¶
func (c *HomeClient) UpdateOne(h *Home) *HomeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HomeClient) UpdateOneID ¶
func (c *HomeClient) UpdateOneID(id int) *HomeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HomeClient) Use ¶
func (c *HomeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `home.Hooks(f(g(h())))`.
type HomeConnection ¶
type HomeConnection struct { // ID of the ent. ID int `json:"id,omitempty"` // StartTime holds the value of the "start_time" field. StartTime string `json:"start_time,omitempty"` // EndTime holds the value of the "end_time" field. EndTime string `json:"end_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the HomeConnectionQuery when eager-loading is set. Edges HomeConnectionEdges `json:"edges"` // contains filtered or unexported fields }
HomeConnection is the model entity for the HomeConnection schema.
func (*HomeConnection) QueryHome ¶
func (hc *HomeConnection) QueryHome() *HomeQuery
QueryHome queries the "home" edge of the HomeConnection entity.
func (*HomeConnection) QueryUser ¶
func (hc *HomeConnection) QueryUser() *UserQuery
QueryUser queries the "user" edge of the HomeConnection entity.
func (*HomeConnection) String ¶
func (hc *HomeConnection) String() string
String implements the fmt.Stringer.
func (*HomeConnection) Unwrap ¶
func (hc *HomeConnection) Unwrap() *HomeConnection
Unwrap unwraps the HomeConnection entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*HomeConnection) Update ¶
func (hc *HomeConnection) Update() *HomeConnectionUpdateOne
Update returns a builder for updating this HomeConnection. Note that you need to call HomeConnection.Unwrap() before calling this method if this HomeConnection was returned from a transaction, and the transaction was committed or rolled back.
type HomeConnectionClient ¶
type HomeConnectionClient struct {
// contains filtered or unexported fields
}
HomeConnectionClient is a client for the HomeConnection schema.
func NewHomeConnectionClient ¶
func NewHomeConnectionClient(c config) *HomeConnectionClient
NewHomeConnectionClient returns a client for the HomeConnection from the given config.
func (*HomeConnectionClient) Create ¶
func (c *HomeConnectionClient) Create() *HomeConnectionCreate
Create returns a create builder for HomeConnection.
func (*HomeConnectionClient) CreateBulk ¶
func (c *HomeConnectionClient) CreateBulk(builders ...*HomeConnectionCreate) *HomeConnectionCreateBulk
CreateBulk returns a builder for creating a bulk of HomeConnection entities.
func (*HomeConnectionClient) Delete ¶
func (c *HomeConnectionClient) Delete() *HomeConnectionDelete
Delete returns a delete builder for HomeConnection.
func (*HomeConnectionClient) DeleteOne ¶
func (c *HomeConnectionClient) DeleteOne(hc *HomeConnection) *HomeConnectionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*HomeConnectionClient) DeleteOneID ¶
func (c *HomeConnectionClient) DeleteOneID(id int) *HomeConnectionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*HomeConnectionClient) Get ¶
func (c *HomeConnectionClient) Get(ctx context.Context, id int) (*HomeConnection, error)
Get returns a HomeConnection entity by its id.
func (*HomeConnectionClient) GetX ¶
func (c *HomeConnectionClient) GetX(ctx context.Context, id int) *HomeConnection
GetX is like Get, but panics if an error occurs.
func (*HomeConnectionClient) Hooks ¶
func (c *HomeConnectionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*HomeConnectionClient) Query ¶
func (c *HomeConnectionClient) Query() *HomeConnectionQuery
Query returns a query builder for HomeConnection.
func (*HomeConnectionClient) QueryHome ¶
func (c *HomeConnectionClient) QueryHome(hc *HomeConnection) *HomeQuery
QueryHome queries the home edge of a HomeConnection.
func (*HomeConnectionClient) QueryUser ¶
func (c *HomeConnectionClient) QueryUser(hc *HomeConnection) *UserQuery
QueryUser queries the user edge of a HomeConnection.
func (*HomeConnectionClient) Update ¶
func (c *HomeConnectionClient) Update() *HomeConnectionUpdate
Update returns an update builder for HomeConnection.
func (*HomeConnectionClient) UpdateOne ¶
func (c *HomeConnectionClient) UpdateOne(hc *HomeConnection) *HomeConnectionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HomeConnectionClient) UpdateOneID ¶
func (c *HomeConnectionClient) UpdateOneID(id int) *HomeConnectionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HomeConnectionClient) Use ¶
func (c *HomeConnectionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `homeconnection.Hooks(f(g(h())))`.
type HomeConnectionCreate ¶
type HomeConnectionCreate struct {
// contains filtered or unexported fields
}
HomeConnectionCreate is the builder for creating a HomeConnection entity.
func (*HomeConnectionCreate) Exec ¶
func (hcc *HomeConnectionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HomeConnectionCreate) ExecX ¶
func (hcc *HomeConnectionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HomeConnectionCreate) Mutation ¶
func (hcc *HomeConnectionCreate) Mutation() *HomeConnectionMutation
Mutation returns the HomeConnectionMutation object of the builder.
func (*HomeConnectionCreate) Save ¶
func (hcc *HomeConnectionCreate) Save(ctx context.Context) (*HomeConnection, error)
Save creates the HomeConnection in the database.
func (*HomeConnectionCreate) SaveX ¶
func (hcc *HomeConnectionCreate) SaveX(ctx context.Context) *HomeConnection
SaveX calls Save and panics if Save returns an error.
func (*HomeConnectionCreate) SetEndTime ¶
func (hcc *HomeConnectionCreate) SetEndTime(s string) *HomeConnectionCreate
SetEndTime sets the "end_time" field.
func (*HomeConnectionCreate) SetHome ¶
func (hcc *HomeConnectionCreate) SetHome(h *Home) *HomeConnectionCreate
SetHome sets the "home" edge to the Home entity.
func (*HomeConnectionCreate) SetHomeID ¶
func (hcc *HomeConnectionCreate) SetHomeID(id int) *HomeConnectionCreate
SetHomeID sets the "home" edge to the Home entity by ID.
func (*HomeConnectionCreate) SetNillableEndTime ¶
func (hcc *HomeConnectionCreate) SetNillableEndTime(s *string) *HomeConnectionCreate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*HomeConnectionCreate) SetNillableStartTime ¶
func (hcc *HomeConnectionCreate) SetNillableStartTime(s *string) *HomeConnectionCreate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*HomeConnectionCreate) SetStartTime ¶
func (hcc *HomeConnectionCreate) SetStartTime(s string) *HomeConnectionCreate
SetStartTime sets the "start_time" field.
func (*HomeConnectionCreate) SetUser ¶
func (hcc *HomeConnectionCreate) SetUser(u *User) *HomeConnectionCreate
SetUser sets the "user" edge to the User entity.
func (*HomeConnectionCreate) SetUserID ¶
func (hcc *HomeConnectionCreate) SetUserID(id int) *HomeConnectionCreate
SetUserID sets the "user" edge to the User entity by ID.
type HomeConnectionCreateBulk ¶
type HomeConnectionCreateBulk struct {
// contains filtered or unexported fields
}
HomeConnectionCreateBulk is the builder for creating many HomeConnection entities in bulk.
func (*HomeConnectionCreateBulk) Exec ¶
func (hccb *HomeConnectionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HomeConnectionCreateBulk) ExecX ¶
func (hccb *HomeConnectionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HomeConnectionCreateBulk) Save ¶
func (hccb *HomeConnectionCreateBulk) Save(ctx context.Context) ([]*HomeConnection, error)
Save creates the HomeConnection entities in the database.
func (*HomeConnectionCreateBulk) SaveX ¶
func (hccb *HomeConnectionCreateBulk) SaveX(ctx context.Context) []*HomeConnection
SaveX is like Save, but panics if an error occurs.
type HomeConnectionDelete ¶
type HomeConnectionDelete struct {
// contains filtered or unexported fields
}
HomeConnectionDelete is the builder for deleting a HomeConnection entity.
func (*HomeConnectionDelete) Exec ¶
func (hcd *HomeConnectionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HomeConnectionDelete) ExecX ¶
func (hcd *HomeConnectionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HomeConnectionDelete) Where ¶
func (hcd *HomeConnectionDelete) Where(ps ...predicate.HomeConnection) *HomeConnectionDelete
Where appends a list predicates to the HomeConnectionDelete builder.
type HomeConnectionDeleteOne ¶
type HomeConnectionDeleteOne struct {
// contains filtered or unexported fields
}
HomeConnectionDeleteOne is the builder for deleting a single HomeConnection entity.
func (*HomeConnectionDeleteOne) Exec ¶
func (hcdo *HomeConnectionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HomeConnectionDeleteOne) ExecX ¶
func (hcdo *HomeConnectionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type HomeConnectionEdges ¶
type HomeConnectionEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Home holds the value of the home edge. Home *Home `json:"home,omitempty"` // contains filtered or unexported fields }
HomeConnectionEdges holds the relations/edges for other nodes in the graph.
func (HomeConnectionEdges) HomeOrErr ¶
func (e HomeConnectionEdges) HomeOrErr() (*Home, error)
HomeOrErr returns the Home value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (HomeConnectionEdges) UserOrErr ¶
func (e HomeConnectionEdges) 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 HomeConnectionGroupBy ¶
type HomeConnectionGroupBy struct {
// contains filtered or unexported fields
}
HomeConnectionGroupBy is the group-by builder for HomeConnection entities.
func (*HomeConnectionGroupBy) Aggregate ¶
func (hcgb *HomeConnectionGroupBy) Aggregate(fns ...AggregateFunc) *HomeConnectionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HomeConnectionGroupBy) Bool ¶
func (hcgb *HomeConnectionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*HomeConnectionGroupBy) BoolX ¶
func (hcgb *HomeConnectionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*HomeConnectionGroupBy) Bools ¶
func (hcgb *HomeConnectionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*HomeConnectionGroupBy) BoolsX ¶
func (hcgb *HomeConnectionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*HomeConnectionGroupBy) Float64 ¶
func (hcgb *HomeConnectionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*HomeConnectionGroupBy) Float64X ¶
func (hcgb *HomeConnectionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*HomeConnectionGroupBy) Float64s ¶
func (hcgb *HomeConnectionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*HomeConnectionGroupBy) Float64sX ¶
func (hcgb *HomeConnectionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*HomeConnectionGroupBy) Int ¶
func (hcgb *HomeConnectionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*HomeConnectionGroupBy) IntX ¶
func (hcgb *HomeConnectionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*HomeConnectionGroupBy) Ints ¶
func (hcgb *HomeConnectionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*HomeConnectionGroupBy) IntsX ¶
func (hcgb *HomeConnectionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*HomeConnectionGroupBy) Scan ¶
func (hcgb *HomeConnectionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*HomeConnectionGroupBy) ScanX ¶
func (hcgb *HomeConnectionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*HomeConnectionGroupBy) String ¶
func (hcgb *HomeConnectionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*HomeConnectionGroupBy) StringX ¶
func (hcgb *HomeConnectionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type HomeConnectionMutation ¶
type HomeConnectionMutation struct {
// contains filtered or unexported fields
}
HomeConnectionMutation represents an operation that mutates the HomeConnection nodes in the graph.
func (*HomeConnectionMutation) AddField ¶
func (m *HomeConnectionMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*HomeConnectionMutation) AddedEdges ¶
func (m *HomeConnectionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HomeConnectionMutation) AddedField ¶
func (m *HomeConnectionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*HomeConnectionMutation) AddedFields ¶
func (m *HomeConnectionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HomeConnectionMutation) AddedIDs ¶
func (m *HomeConnectionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HomeConnectionMutation) ClearEdge ¶
func (m *HomeConnectionMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*HomeConnectionMutation) ClearField ¶
func (m *HomeConnectionMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*HomeConnectionMutation) ClearHome ¶
func (m *HomeConnectionMutation) ClearHome()
ClearHome clears the "home" edge to the Home entity.
func (*HomeConnectionMutation) ClearUser ¶
func (m *HomeConnectionMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*HomeConnectionMutation) ClearedEdges ¶
func (m *HomeConnectionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HomeConnectionMutation) ClearedFields ¶
func (m *HomeConnectionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HomeConnectionMutation) Client ¶
func (m HomeConnectionMutation) 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 (*HomeConnectionMutation) EdgeCleared ¶
func (m *HomeConnectionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HomeConnectionMutation) EndTime ¶
func (m *HomeConnectionMutation) EndTime() (r string, exists bool)
EndTime returns the value of the "end_time" field in the mutation.
func (*HomeConnectionMutation) Field ¶
func (m *HomeConnectionMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*HomeConnectionMutation) FieldCleared ¶
func (m *HomeConnectionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HomeConnectionMutation) Fields ¶
func (m *HomeConnectionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*HomeConnectionMutation) HomeCleared ¶
func (m *HomeConnectionMutation) HomeCleared() bool
HomeCleared reports if the "home" edge to the Home entity was cleared.
func (*HomeConnectionMutation) HomeID ¶
func (m *HomeConnectionMutation) HomeID() (id int, exists bool)
HomeID returns the "home" edge ID in the mutation.
func (*HomeConnectionMutation) HomeIDs ¶
func (m *HomeConnectionMutation) HomeIDs() (ids []int)
HomeIDs returns the "home" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HomeID instead. It exists only for internal usage by the builders.
func (*HomeConnectionMutation) ID ¶
func (m *HomeConnectionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*HomeConnectionMutation) OldEndTime ¶
func (m *HomeConnectionMutation) OldEndTime(ctx context.Context) (v string, err error)
OldEndTime returns the old "end_time" field's value of the HomeConnection entity. If the HomeConnection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HomeConnectionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*HomeConnectionMutation) OldStartTime ¶
func (m *HomeConnectionMutation) OldStartTime(ctx context.Context) (v string, err error)
OldStartTime returns the old "start_time" field's value of the HomeConnection entity. If the HomeConnection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HomeConnectionMutation) Op ¶
func (m *HomeConnectionMutation) Op() Op
Op returns the operation name.
func (*HomeConnectionMutation) RemovedEdges ¶
func (m *HomeConnectionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HomeConnectionMutation) RemovedIDs ¶
func (m *HomeConnectionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*HomeConnectionMutation) ResetEdge ¶
func (m *HomeConnectionMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*HomeConnectionMutation) ResetEndTime ¶
func (m *HomeConnectionMutation) ResetEndTime()
ResetEndTime resets all changes to the "end_time" field.
func (*HomeConnectionMutation) ResetField ¶
func (m *HomeConnectionMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*HomeConnectionMutation) ResetHome ¶
func (m *HomeConnectionMutation) ResetHome()
ResetHome resets all changes to the "home" edge.
func (*HomeConnectionMutation) ResetStartTime ¶
func (m *HomeConnectionMutation) ResetStartTime()
ResetStartTime resets all changes to the "start_time" field.
func (*HomeConnectionMutation) ResetUser ¶
func (m *HomeConnectionMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*HomeConnectionMutation) SetEndTime ¶
func (m *HomeConnectionMutation) SetEndTime(s string)
SetEndTime sets the "end_time" field.
func (*HomeConnectionMutation) SetField ¶
func (m *HomeConnectionMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*HomeConnectionMutation) SetHomeID ¶
func (m *HomeConnectionMutation) SetHomeID(id int)
SetHomeID sets the "home" edge to the Home entity by id.
func (*HomeConnectionMutation) SetStartTime ¶
func (m *HomeConnectionMutation) SetStartTime(s string)
SetStartTime sets the "start_time" field.
func (*HomeConnectionMutation) SetUserID ¶
func (m *HomeConnectionMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*HomeConnectionMutation) StartTime ¶
func (m *HomeConnectionMutation) StartTime() (r string, exists bool)
StartTime returns the value of the "start_time" field in the mutation.
func (HomeConnectionMutation) Tx ¶
func (m HomeConnectionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HomeConnectionMutation) Type ¶
func (m *HomeConnectionMutation) Type() string
Type returns the node type of this mutation (HomeConnection).
func (*HomeConnectionMutation) UserCleared ¶
func (m *HomeConnectionMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*HomeConnectionMutation) UserID ¶
func (m *HomeConnectionMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*HomeConnectionMutation) UserIDs ¶
func (m *HomeConnectionMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*HomeConnectionMutation) Where ¶
func (m *HomeConnectionMutation) Where(ps ...predicate.HomeConnection)
Where appends a list predicates to the HomeConnectionMutation builder.
type HomeConnectionQuery ¶
type HomeConnectionQuery struct {
// contains filtered or unexported fields
}
HomeConnectionQuery is the builder for querying HomeConnection entities.
func (*HomeConnectionQuery) All ¶
func (hcq *HomeConnectionQuery) All(ctx context.Context) ([]*HomeConnection, error)
All executes the query and returns a list of HomeConnections.
func (*HomeConnectionQuery) AllX ¶
func (hcq *HomeConnectionQuery) AllX(ctx context.Context) []*HomeConnection
AllX is like All, but panics if an error occurs.
func (*HomeConnectionQuery) Clone ¶
func (hcq *HomeConnectionQuery) Clone() *HomeConnectionQuery
Clone returns a duplicate of the HomeConnectionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HomeConnectionQuery) Count ¶
func (hcq *HomeConnectionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*HomeConnectionQuery) CountX ¶
func (hcq *HomeConnectionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*HomeConnectionQuery) Exist ¶
func (hcq *HomeConnectionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*HomeConnectionQuery) ExistX ¶
func (hcq *HomeConnectionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*HomeConnectionQuery) First ¶
func (hcq *HomeConnectionQuery) First(ctx context.Context) (*HomeConnection, error)
First returns the first HomeConnection entity from the query. Returns a *NotFoundError when no HomeConnection was found.
func (*HomeConnectionQuery) FirstID ¶
func (hcq *HomeConnectionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HomeConnection ID from the query. Returns a *NotFoundError when no HomeConnection ID was found.
func (*HomeConnectionQuery) FirstIDX ¶
func (hcq *HomeConnectionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*HomeConnectionQuery) FirstX ¶
func (hcq *HomeConnectionQuery) FirstX(ctx context.Context) *HomeConnection
FirstX is like First, but panics if an error occurs.
func (*HomeConnectionQuery) GroupBy ¶
func (hcq *HomeConnectionQuery) GroupBy(field string, fields ...string) *HomeConnectionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { StartTime string `json:"start_time,omitempty"` Count int `json:"count,omitempty"` } client.HomeConnection.Query(). GroupBy(homeconnection.FieldStartTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*HomeConnectionQuery) IDs ¶
func (hcq *HomeConnectionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of HomeConnection IDs.
func (*HomeConnectionQuery) IDsX ¶
func (hcq *HomeConnectionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*HomeConnectionQuery) Limit ¶
func (hcq *HomeConnectionQuery) Limit(limit int) *HomeConnectionQuery
Limit adds a limit step to the query.
func (*HomeConnectionQuery) Offset ¶
func (hcq *HomeConnectionQuery) Offset(offset int) *HomeConnectionQuery
Offset adds an offset step to the query.
func (*HomeConnectionQuery) Only ¶
func (hcq *HomeConnectionQuery) Only(ctx context.Context) (*HomeConnection, error)
Only returns a single HomeConnection entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one HomeConnection entity is not found. Returns a *NotFoundError when no HomeConnection entities are found.
func (*HomeConnectionQuery) OnlyID ¶
func (hcq *HomeConnectionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HomeConnection ID in the query. Returns a *NotSingularError when exactly one HomeConnection ID is not found. Returns a *NotFoundError when no entities are found.
func (*HomeConnectionQuery) OnlyIDX ¶
func (hcq *HomeConnectionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*HomeConnectionQuery) OnlyX ¶
func (hcq *HomeConnectionQuery) OnlyX(ctx context.Context) *HomeConnection
OnlyX is like Only, but panics if an error occurs.
func (*HomeConnectionQuery) Order ¶
func (hcq *HomeConnectionQuery) Order(o ...OrderFunc) *HomeConnectionQuery
Order adds an order step to the query.
func (*HomeConnectionQuery) QueryHome ¶
func (hcq *HomeConnectionQuery) QueryHome() *HomeQuery
QueryHome chains the current query on the "home" edge.
func (*HomeConnectionQuery) QueryUser ¶
func (hcq *HomeConnectionQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*HomeConnectionQuery) Select ¶
func (hcq *HomeConnectionQuery) Select(fields ...string) *HomeConnectionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { StartTime string `json:"start_time,omitempty"` } client.HomeConnection.Query(). Select(homeconnection.FieldStartTime). Scan(ctx, &v)
func (*HomeConnectionQuery) Unique ¶
func (hcq *HomeConnectionQuery) Unique(unique bool) *HomeConnectionQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*HomeConnectionQuery) Where ¶
func (hcq *HomeConnectionQuery) Where(ps ...predicate.HomeConnection) *HomeConnectionQuery
Where adds a new predicate for the HomeConnectionQuery builder.
func (*HomeConnectionQuery) WithHome ¶
func (hcq *HomeConnectionQuery) WithHome(opts ...func(*HomeQuery)) *HomeConnectionQuery
WithHome tells the query-builder to eager-load the nodes that are connected to the "home" edge. The optional arguments are used to configure the query builder of the edge.
func (*HomeConnectionQuery) WithUser ¶
func (hcq *HomeConnectionQuery) WithUser(opts ...func(*UserQuery)) *HomeConnectionQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type HomeConnectionSelect ¶
type HomeConnectionSelect struct { *HomeConnectionQuery // contains filtered or unexported fields }
HomeConnectionSelect is the builder for selecting fields of HomeConnection entities.
func (*HomeConnectionSelect) Bool ¶
func (hcs *HomeConnectionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HomeConnectionSelect) BoolX ¶
func (hcs *HomeConnectionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*HomeConnectionSelect) Bools ¶
func (hcs *HomeConnectionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HomeConnectionSelect) BoolsX ¶
func (hcs *HomeConnectionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*HomeConnectionSelect) Float64 ¶
func (hcs *HomeConnectionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HomeConnectionSelect) Float64X ¶
func (hcs *HomeConnectionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*HomeConnectionSelect) Float64s ¶
func (hcs *HomeConnectionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HomeConnectionSelect) Float64sX ¶
func (hcs *HomeConnectionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*HomeConnectionSelect) Int ¶
func (hcs *HomeConnectionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HomeConnectionSelect) IntX ¶
func (hcs *HomeConnectionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*HomeConnectionSelect) Ints ¶
func (hcs *HomeConnectionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HomeConnectionSelect) IntsX ¶
func (hcs *HomeConnectionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*HomeConnectionSelect) Scan ¶
func (hcs *HomeConnectionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*HomeConnectionSelect) ScanX ¶
func (hcs *HomeConnectionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*HomeConnectionSelect) String ¶
func (hcs *HomeConnectionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*HomeConnectionSelect) StringX ¶
func (hcs *HomeConnectionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type HomeConnectionUpdate ¶
type HomeConnectionUpdate struct {
// contains filtered or unexported fields
}
HomeConnectionUpdate is the builder for updating HomeConnection entities.
func (*HomeConnectionUpdate) ClearHome ¶
func (hcu *HomeConnectionUpdate) ClearHome() *HomeConnectionUpdate
ClearHome clears the "home" edge to the Home entity.
func (*HomeConnectionUpdate) ClearUser ¶
func (hcu *HomeConnectionUpdate) ClearUser() *HomeConnectionUpdate
ClearUser clears the "user" edge to the User entity.
func (*HomeConnectionUpdate) Exec ¶
func (hcu *HomeConnectionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HomeConnectionUpdate) ExecX ¶
func (hcu *HomeConnectionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HomeConnectionUpdate) Mutation ¶
func (hcu *HomeConnectionUpdate) Mutation() *HomeConnectionMutation
Mutation returns the HomeConnectionMutation object of the builder.
func (*HomeConnectionUpdate) Save ¶
func (hcu *HomeConnectionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HomeConnectionUpdate) SaveX ¶
func (hcu *HomeConnectionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HomeConnectionUpdate) SetEndTime ¶
func (hcu *HomeConnectionUpdate) SetEndTime(s string) *HomeConnectionUpdate
SetEndTime sets the "end_time" field.
func (*HomeConnectionUpdate) SetHome ¶
func (hcu *HomeConnectionUpdate) SetHome(h *Home) *HomeConnectionUpdate
SetHome sets the "home" edge to the Home entity.
func (*HomeConnectionUpdate) SetHomeID ¶
func (hcu *HomeConnectionUpdate) SetHomeID(id int) *HomeConnectionUpdate
SetHomeID sets the "home" edge to the Home entity by ID.
func (*HomeConnectionUpdate) SetNillableEndTime ¶
func (hcu *HomeConnectionUpdate) SetNillableEndTime(s *string) *HomeConnectionUpdate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*HomeConnectionUpdate) SetNillableStartTime ¶
func (hcu *HomeConnectionUpdate) SetNillableStartTime(s *string) *HomeConnectionUpdate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*HomeConnectionUpdate) SetStartTime ¶
func (hcu *HomeConnectionUpdate) SetStartTime(s string) *HomeConnectionUpdate
SetStartTime sets the "start_time" field.
func (*HomeConnectionUpdate) SetUser ¶
func (hcu *HomeConnectionUpdate) SetUser(u *User) *HomeConnectionUpdate
SetUser sets the "user" edge to the User entity.
func (*HomeConnectionUpdate) SetUserID ¶
func (hcu *HomeConnectionUpdate) SetUserID(id int) *HomeConnectionUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*HomeConnectionUpdate) Where ¶
func (hcu *HomeConnectionUpdate) Where(ps ...predicate.HomeConnection) *HomeConnectionUpdate
Where appends a list predicates to the HomeConnectionUpdate builder.
type HomeConnectionUpdateOne ¶
type HomeConnectionUpdateOne struct {
// contains filtered or unexported fields
}
HomeConnectionUpdateOne is the builder for updating a single HomeConnection entity.
func (*HomeConnectionUpdateOne) ClearHome ¶
func (hcuo *HomeConnectionUpdateOne) ClearHome() *HomeConnectionUpdateOne
ClearHome clears the "home" edge to the Home entity.
func (*HomeConnectionUpdateOne) ClearUser ¶
func (hcuo *HomeConnectionUpdateOne) ClearUser() *HomeConnectionUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*HomeConnectionUpdateOne) Exec ¶
func (hcuo *HomeConnectionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HomeConnectionUpdateOne) ExecX ¶
func (hcuo *HomeConnectionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HomeConnectionUpdateOne) Mutation ¶
func (hcuo *HomeConnectionUpdateOne) Mutation() *HomeConnectionMutation
Mutation returns the HomeConnectionMutation object of the builder.
func (*HomeConnectionUpdateOne) Save ¶
func (hcuo *HomeConnectionUpdateOne) Save(ctx context.Context) (*HomeConnection, error)
Save executes the query and returns the updated HomeConnection entity.
func (*HomeConnectionUpdateOne) SaveX ¶
func (hcuo *HomeConnectionUpdateOne) SaveX(ctx context.Context) *HomeConnection
SaveX is like Save, but panics if an error occurs.
func (*HomeConnectionUpdateOne) Select ¶
func (hcuo *HomeConnectionUpdateOne) Select(field string, fields ...string) *HomeConnectionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HomeConnectionUpdateOne) SetEndTime ¶
func (hcuo *HomeConnectionUpdateOne) SetEndTime(s string) *HomeConnectionUpdateOne
SetEndTime sets the "end_time" field.
func (*HomeConnectionUpdateOne) SetHome ¶
func (hcuo *HomeConnectionUpdateOne) SetHome(h *Home) *HomeConnectionUpdateOne
SetHome sets the "home" edge to the Home entity.
func (*HomeConnectionUpdateOne) SetHomeID ¶
func (hcuo *HomeConnectionUpdateOne) SetHomeID(id int) *HomeConnectionUpdateOne
SetHomeID sets the "home" edge to the Home entity by ID.
func (*HomeConnectionUpdateOne) SetNillableEndTime ¶
func (hcuo *HomeConnectionUpdateOne) SetNillableEndTime(s *string) *HomeConnectionUpdateOne
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*HomeConnectionUpdateOne) SetNillableStartTime ¶
func (hcuo *HomeConnectionUpdateOne) SetNillableStartTime(s *string) *HomeConnectionUpdateOne
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*HomeConnectionUpdateOne) SetStartTime ¶
func (hcuo *HomeConnectionUpdateOne) SetStartTime(s string) *HomeConnectionUpdateOne
SetStartTime sets the "start_time" field.
func (*HomeConnectionUpdateOne) SetUser ¶
func (hcuo *HomeConnectionUpdateOne) SetUser(u *User) *HomeConnectionUpdateOne
SetUser sets the "user" edge to the User entity.
func (*HomeConnectionUpdateOne) SetUserID ¶
func (hcuo *HomeConnectionUpdateOne) SetUserID(id int) *HomeConnectionUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type HomeConnections ¶
type HomeConnections []*HomeConnection
HomeConnections is a parsable slice of HomeConnection.
type HomeCreate ¶
type HomeCreate struct {
// contains filtered or unexported fields
}
HomeCreate is the builder for creating a Home entity.
func (*HomeCreate) AddRoomIDs ¶
func (hc *HomeCreate) AddRoomIDs(ids ...int) *HomeCreate
AddRoomIDs adds the "rooms" edge to the Room entity by IDs.
func (*HomeCreate) AddRooms ¶
func (hc *HomeCreate) AddRooms(r ...*Room) *HomeCreate
AddRooms adds the "rooms" edges to the Room entity.
func (*HomeCreate) Exec ¶
func (hc *HomeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HomeCreate) ExecX ¶
func (hc *HomeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HomeCreate) Mutation ¶
func (hc *HomeCreate) Mutation() *HomeMutation
Mutation returns the HomeMutation object of the builder.
func (*HomeCreate) Save ¶
func (hc *HomeCreate) Save(ctx context.Context) (*Home, error)
Save creates the Home in the database.
func (*HomeCreate) SaveX ¶
func (hc *HomeCreate) SaveX(ctx context.Context) *Home
SaveX calls Save and panics if Save returns an error.
func (*HomeCreate) SetName ¶
func (hc *HomeCreate) SetName(s string) *HomeCreate
SetName sets the "name" field.
func (*HomeCreate) SetUUID ¶
func (hc *HomeCreate) SetUUID(u uuid.UUID) *HomeCreate
SetUUID sets the "uuid" field.
type HomeCreateBulk ¶
type HomeCreateBulk struct {
// contains filtered or unexported fields
}
HomeCreateBulk is the builder for creating many Home entities in bulk.
func (*HomeCreateBulk) Exec ¶
func (hcb *HomeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HomeCreateBulk) ExecX ¶
func (hcb *HomeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type HomeDelete ¶
type HomeDelete struct {
// contains filtered or unexported fields
}
HomeDelete is the builder for deleting a Home entity.
func (*HomeDelete) Exec ¶
func (hd *HomeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HomeDelete) ExecX ¶
func (hd *HomeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HomeDelete) Where ¶
func (hd *HomeDelete) Where(ps ...predicate.Home) *HomeDelete
Where appends a list predicates to the HomeDelete builder.
type HomeDeleteOne ¶
type HomeDeleteOne struct {
// contains filtered or unexported fields
}
HomeDeleteOne is the builder for deleting a single Home entity.
func (*HomeDeleteOne) Exec ¶
func (hdo *HomeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HomeDeleteOne) ExecX ¶
func (hdo *HomeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type HomeEdges ¶
type HomeEdges struct { // Rooms holds the value of the rooms edge. Rooms []*Room `json:"rooms,omitempty"` // contains filtered or unexported fields }
HomeEdges holds the relations/edges for other nodes in the graph.
func (HomeEdges) RoomsOrErr ¶
RoomsOrErr returns the Rooms value or an error if the edge was not loaded in eager-loading.
type HomeGroupBy ¶
type HomeGroupBy struct {
// contains filtered or unexported fields
}
HomeGroupBy is the group-by builder for Home entities.
func (*HomeGroupBy) Aggregate ¶
func (hgb *HomeGroupBy) Aggregate(fns ...AggregateFunc) *HomeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HomeGroupBy) Bool ¶
func (hgb *HomeGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*HomeGroupBy) BoolX ¶
func (hgb *HomeGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*HomeGroupBy) Bools ¶
func (hgb *HomeGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*HomeGroupBy) BoolsX ¶
func (hgb *HomeGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*HomeGroupBy) Float64 ¶
func (hgb *HomeGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*HomeGroupBy) Float64X ¶
func (hgb *HomeGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*HomeGroupBy) Float64s ¶
func (hgb *HomeGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*HomeGroupBy) Float64sX ¶
func (hgb *HomeGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*HomeGroupBy) Int ¶
func (hgb *HomeGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*HomeGroupBy) IntX ¶
func (hgb *HomeGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*HomeGroupBy) Ints ¶
func (hgb *HomeGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*HomeGroupBy) IntsX ¶
func (hgb *HomeGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*HomeGroupBy) Scan ¶
func (hgb *HomeGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*HomeGroupBy) ScanX ¶
func (hgb *HomeGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*HomeGroupBy) String ¶
func (hgb *HomeGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*HomeGroupBy) StringX ¶
func (hgb *HomeGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type HomeMutation ¶
type HomeMutation struct {
// contains filtered or unexported fields
}
HomeMutation represents an operation that mutates the Home nodes in the graph.
func (*HomeMutation) AddField ¶
func (m *HomeMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*HomeMutation) AddRoomIDs ¶
func (m *HomeMutation) AddRoomIDs(ids ...int)
AddRoomIDs adds the "rooms" edge to the Room entity by ids.
func (*HomeMutation) AddedEdges ¶
func (m *HomeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HomeMutation) AddedField ¶
func (m *HomeMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*HomeMutation) AddedFields ¶
func (m *HomeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HomeMutation) AddedIDs ¶
func (m *HomeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HomeMutation) ClearEdge ¶
func (m *HomeMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*HomeMutation) ClearField ¶
func (m *HomeMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*HomeMutation) ClearRooms ¶
func (m *HomeMutation) ClearRooms()
ClearRooms clears the "rooms" edge to the Room entity.
func (*HomeMutation) ClearedEdges ¶
func (m *HomeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HomeMutation) ClearedFields ¶
func (m *HomeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HomeMutation) Client ¶
func (m HomeMutation) 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 (*HomeMutation) EdgeCleared ¶
func (m *HomeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HomeMutation) Field ¶
func (m *HomeMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*HomeMutation) FieldCleared ¶
func (m *HomeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HomeMutation) Fields ¶
func (m *HomeMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*HomeMutation) ID ¶
func (m *HomeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*HomeMutation) Name ¶
func (m *HomeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*HomeMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*HomeMutation) OldName ¶
func (m *HomeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Home entity. If the Home object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HomeMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the Home entity. If the Home object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HomeMutation) RemoveRoomIDs ¶
func (m *HomeMutation) RemoveRoomIDs(ids ...int)
RemoveRoomIDs removes the "rooms" edge to the Room entity by IDs.
func (*HomeMutation) RemovedEdges ¶
func (m *HomeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HomeMutation) RemovedIDs ¶
func (m *HomeMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*HomeMutation) RemovedRoomsIDs ¶
func (m *HomeMutation) RemovedRoomsIDs() (ids []int)
RemovedRooms returns the removed IDs of the "rooms" edge to the Room entity.
func (*HomeMutation) ResetEdge ¶
func (m *HomeMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*HomeMutation) ResetField ¶
func (m *HomeMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*HomeMutation) ResetName ¶
func (m *HomeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*HomeMutation) ResetRooms ¶
func (m *HomeMutation) ResetRooms()
ResetRooms resets all changes to the "rooms" edge.
func (*HomeMutation) ResetUUID ¶
func (m *HomeMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*HomeMutation) RoomsCleared ¶
func (m *HomeMutation) RoomsCleared() bool
RoomsCleared reports if the "rooms" edge to the Room entity was cleared.
func (*HomeMutation) RoomsIDs ¶
func (m *HomeMutation) RoomsIDs() (ids []int)
RoomsIDs returns the "rooms" edge IDs in the mutation.
func (*HomeMutation) SetField ¶
func (m *HomeMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*HomeMutation) SetName ¶
func (m *HomeMutation) SetName(s string)
SetName sets the "name" field.
func (*HomeMutation) SetUUID ¶
func (m *HomeMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (HomeMutation) Tx ¶
func (m HomeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HomeMutation) Type ¶
func (m *HomeMutation) Type() string
Type returns the node type of this mutation (Home).
func (*HomeMutation) UUID ¶
func (m *HomeMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*HomeMutation) Where ¶
func (m *HomeMutation) Where(ps ...predicate.Home)
Where appends a list predicates to the HomeMutation builder.
type HomeQuery ¶
type HomeQuery struct {
// contains filtered or unexported fields
}
HomeQuery is the builder for querying Home entities.
func (*HomeQuery) Clone ¶
Clone returns a duplicate of the HomeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HomeQuery) First ¶
First returns the first Home entity from the query. Returns a *NotFoundError when no Home was found.
func (*HomeQuery) FirstID ¶
FirstID returns the first Home ID from the query. Returns a *NotFoundError when no Home ID was found.
func (*HomeQuery) GroupBy ¶
func (hq *HomeQuery) GroupBy(field string, fields ...string) *HomeGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` Count int `json:"count,omitempty"` } client.Home.Query(). GroupBy(home.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*HomeQuery) Only ¶
Only returns a single Home entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Home entity is not found. Returns a *NotFoundError when no Home entities are found.
func (*HomeQuery) OnlyID ¶
OnlyID is like Only, but returns the only Home ID in the query. Returns a *NotSingularError when exactly one Home ID is not found. Returns a *NotFoundError when no entities are found.
func (*HomeQuery) QueryRooms ¶
QueryRooms chains the current query on the "rooms" edge.
func (*HomeQuery) Select ¶
func (hq *HomeQuery) Select(fields ...string) *HomeSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` } client.Home.Query(). Select(home.FieldUUID). Scan(ctx, &v)
func (*HomeQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
type HomeSelect ¶
type HomeSelect struct { *HomeQuery // contains filtered or unexported fields }
HomeSelect is the builder for selecting fields of Home entities.
func (*HomeSelect) Bool ¶
func (hs *HomeSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HomeSelect) BoolX ¶
func (hs *HomeSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*HomeSelect) Bools ¶
func (hs *HomeSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HomeSelect) BoolsX ¶
func (hs *HomeSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*HomeSelect) Float64 ¶
func (hs *HomeSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HomeSelect) Float64X ¶
func (hs *HomeSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*HomeSelect) Float64s ¶
func (hs *HomeSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HomeSelect) Float64sX ¶
func (hs *HomeSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*HomeSelect) Int ¶
func (hs *HomeSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HomeSelect) IntX ¶
func (hs *HomeSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*HomeSelect) Ints ¶
func (hs *HomeSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HomeSelect) IntsX ¶
func (hs *HomeSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*HomeSelect) Scan ¶
func (hs *HomeSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*HomeSelect) ScanX ¶
func (hs *HomeSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*HomeSelect) String ¶
func (hs *HomeSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*HomeSelect) StringX ¶
func (hs *HomeSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type HomeUpdate ¶
type HomeUpdate struct {
// contains filtered or unexported fields
}
HomeUpdate is the builder for updating Home entities.
func (*HomeUpdate) AddRoomIDs ¶
func (hu *HomeUpdate) AddRoomIDs(ids ...int) *HomeUpdate
AddRoomIDs adds the "rooms" edge to the Room entity by IDs.
func (*HomeUpdate) AddRooms ¶
func (hu *HomeUpdate) AddRooms(r ...*Room) *HomeUpdate
AddRooms adds the "rooms" edges to the Room entity.
func (*HomeUpdate) ClearRooms ¶
func (hu *HomeUpdate) ClearRooms() *HomeUpdate
ClearRooms clears all "rooms" edges to the Room entity.
func (*HomeUpdate) Exec ¶
func (hu *HomeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HomeUpdate) ExecX ¶
func (hu *HomeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HomeUpdate) Mutation ¶
func (hu *HomeUpdate) Mutation() *HomeMutation
Mutation returns the HomeMutation object of the builder.
func (*HomeUpdate) RemoveRoomIDs ¶
func (hu *HomeUpdate) RemoveRoomIDs(ids ...int) *HomeUpdate
RemoveRoomIDs removes the "rooms" edge to Room entities by IDs.
func (*HomeUpdate) RemoveRooms ¶
func (hu *HomeUpdate) RemoveRooms(r ...*Room) *HomeUpdate
RemoveRooms removes "rooms" edges to Room entities.
func (*HomeUpdate) Save ¶
func (hu *HomeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HomeUpdate) SaveX ¶
func (hu *HomeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HomeUpdate) SetName ¶
func (hu *HomeUpdate) SetName(s string) *HomeUpdate
SetName sets the "name" field.
func (*HomeUpdate) Where ¶
func (hu *HomeUpdate) Where(ps ...predicate.Home) *HomeUpdate
Where appends a list predicates to the HomeUpdate builder.
type HomeUpdateOne ¶
type HomeUpdateOne struct {
// contains filtered or unexported fields
}
HomeUpdateOne is the builder for updating a single Home entity.
func (*HomeUpdateOne) AddRoomIDs ¶
func (huo *HomeUpdateOne) AddRoomIDs(ids ...int) *HomeUpdateOne
AddRoomIDs adds the "rooms" edge to the Room entity by IDs.
func (*HomeUpdateOne) AddRooms ¶
func (huo *HomeUpdateOne) AddRooms(r ...*Room) *HomeUpdateOne
AddRooms adds the "rooms" edges to the Room entity.
func (*HomeUpdateOne) ClearRooms ¶
func (huo *HomeUpdateOne) ClearRooms() *HomeUpdateOne
ClearRooms clears all "rooms" edges to the Room entity.
func (*HomeUpdateOne) Exec ¶
func (huo *HomeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HomeUpdateOne) ExecX ¶
func (huo *HomeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HomeUpdateOne) Mutation ¶
func (huo *HomeUpdateOne) Mutation() *HomeMutation
Mutation returns the HomeMutation object of the builder.
func (*HomeUpdateOne) RemoveRoomIDs ¶
func (huo *HomeUpdateOne) RemoveRoomIDs(ids ...int) *HomeUpdateOne
RemoveRoomIDs removes the "rooms" edge to Room entities by IDs.
func (*HomeUpdateOne) RemoveRooms ¶
func (huo *HomeUpdateOne) RemoveRooms(r ...*Room) *HomeUpdateOne
RemoveRooms removes "rooms" edges to Room entities.
func (*HomeUpdateOne) Save ¶
func (huo *HomeUpdateOne) Save(ctx context.Context) (*Home, error)
Save executes the query and returns the updated Home entity.
func (*HomeUpdateOne) SaveX ¶
func (huo *HomeUpdateOne) SaveX(ctx context.Context) *Home
SaveX is like Save, but panics if an error occurs.
func (*HomeUpdateOne) Select ¶
func (huo *HomeUpdateOne) Select(field string, fields ...string) *HomeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HomeUpdateOne) SetName ¶
func (huo *HomeUpdateOne) SetName(s string) *HomeUpdateOne
SetName sets the "name" field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type 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 Room ¶
type Room struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RoomQuery when eager-loading is set. Edges RoomEdges `json:"edges"` // contains filtered or unexported fields }
Room is the model entity for the Room schema.
func (*Room) QueryThings ¶
func (r *Room) QueryThings() *ThingQuery
QueryThings queries the "things" edge of the Room entity.
func (*Room) Unwrap ¶
Unwrap unwraps the Room entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Room) Update ¶
func (r *Room) Update() *RoomUpdateOne
Update returns a builder for updating this Room. Note that you need to call Room.Unwrap() before calling this method if this Room was returned from a transaction, and the transaction was committed or rolled back.
type RoomClient ¶
type RoomClient struct {
// contains filtered or unexported fields
}
RoomClient is a client for the Room schema.
func NewRoomClient ¶
func NewRoomClient(c config) *RoomClient
NewRoomClient returns a client for the Room from the given config.
func (*RoomClient) Create ¶
func (c *RoomClient) Create() *RoomCreate
Create returns a create builder for Room.
func (*RoomClient) CreateBulk ¶
func (c *RoomClient) CreateBulk(builders ...*RoomCreate) *RoomCreateBulk
CreateBulk returns a builder for creating a bulk of Room entities.
func (*RoomClient) Delete ¶
func (c *RoomClient) Delete() *RoomDelete
Delete returns a delete builder for Room.
func (*RoomClient) DeleteOne ¶
func (c *RoomClient) DeleteOne(r *Room) *RoomDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*RoomClient) DeleteOneID ¶
func (c *RoomClient) DeleteOneID(id int) *RoomDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*RoomClient) GetX ¶
func (c *RoomClient) GetX(ctx context.Context, id int) *Room
GetX is like Get, but panics if an error occurs.
func (*RoomClient) Query ¶
func (c *RoomClient) Query() *RoomQuery
Query returns a query builder for Room.
func (*RoomClient) QueryHome ¶
func (c *RoomClient) QueryHome(r *Room) *HomeQuery
QueryHome queries the home edge of a Room.
func (*RoomClient) QueryThings ¶
func (c *RoomClient) QueryThings(r *Room) *ThingQuery
QueryThings queries the things edge of a Room.
func (*RoomClient) Update ¶
func (c *RoomClient) Update() *RoomUpdate
Update returns an update builder for Room.
func (*RoomClient) UpdateOne ¶
func (c *RoomClient) UpdateOne(r *Room) *RoomUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoomClient) UpdateOneID ¶
func (c *RoomClient) UpdateOneID(id int) *RoomUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RoomClient) Use ¶
func (c *RoomClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `room.Hooks(f(g(h())))`.
type RoomConnection ¶
type RoomConnection struct { // ID of the ent. ID int `json:"id,omitempty"` // StartTime holds the value of the "start_time" field. StartTime string `json:"start_time,omitempty"` // EndTime holds the value of the "end_time" field. EndTime string `json:"end_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RoomConnectionQuery when eager-loading is set. Edges RoomConnectionEdges `json:"edges"` // contains filtered or unexported fields }
RoomConnection is the model entity for the RoomConnection schema.
func (*RoomConnection) QueryRoom ¶
func (rc *RoomConnection) QueryRoom() *RoomQuery
QueryRoom queries the "room" edge of the RoomConnection entity.
func (*RoomConnection) QueryUser ¶
func (rc *RoomConnection) QueryUser() *UserQuery
QueryUser queries the "user" edge of the RoomConnection entity.
func (*RoomConnection) String ¶
func (rc *RoomConnection) String() string
String implements the fmt.Stringer.
func (*RoomConnection) Unwrap ¶
func (rc *RoomConnection) Unwrap() *RoomConnection
Unwrap unwraps the RoomConnection entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*RoomConnection) Update ¶
func (rc *RoomConnection) Update() *RoomConnectionUpdateOne
Update returns a builder for updating this RoomConnection. Note that you need to call RoomConnection.Unwrap() before calling this method if this RoomConnection was returned from a transaction, and the transaction was committed or rolled back.
type RoomConnectionClient ¶
type RoomConnectionClient struct {
// contains filtered or unexported fields
}
RoomConnectionClient is a client for the RoomConnection schema.
func NewRoomConnectionClient ¶
func NewRoomConnectionClient(c config) *RoomConnectionClient
NewRoomConnectionClient returns a client for the RoomConnection from the given config.
func (*RoomConnectionClient) Create ¶
func (c *RoomConnectionClient) Create() *RoomConnectionCreate
Create returns a create builder for RoomConnection.
func (*RoomConnectionClient) CreateBulk ¶
func (c *RoomConnectionClient) CreateBulk(builders ...*RoomConnectionCreate) *RoomConnectionCreateBulk
CreateBulk returns a builder for creating a bulk of RoomConnection entities.
func (*RoomConnectionClient) Delete ¶
func (c *RoomConnectionClient) Delete() *RoomConnectionDelete
Delete returns a delete builder for RoomConnection.
func (*RoomConnectionClient) DeleteOne ¶
func (c *RoomConnectionClient) DeleteOne(rc *RoomConnection) *RoomConnectionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*RoomConnectionClient) DeleteOneID ¶
func (c *RoomConnectionClient) DeleteOneID(id int) *RoomConnectionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*RoomConnectionClient) Get ¶
func (c *RoomConnectionClient) Get(ctx context.Context, id int) (*RoomConnection, error)
Get returns a RoomConnection entity by its id.
func (*RoomConnectionClient) GetX ¶
func (c *RoomConnectionClient) GetX(ctx context.Context, id int) *RoomConnection
GetX is like Get, but panics if an error occurs.
func (*RoomConnectionClient) Hooks ¶
func (c *RoomConnectionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RoomConnectionClient) Query ¶
func (c *RoomConnectionClient) Query() *RoomConnectionQuery
Query returns a query builder for RoomConnection.
func (*RoomConnectionClient) QueryRoom ¶
func (c *RoomConnectionClient) QueryRoom(rc *RoomConnection) *RoomQuery
QueryRoom queries the room edge of a RoomConnection.
func (*RoomConnectionClient) QueryUser ¶
func (c *RoomConnectionClient) QueryUser(rc *RoomConnection) *UserQuery
QueryUser queries the user edge of a RoomConnection.
func (*RoomConnectionClient) Update ¶
func (c *RoomConnectionClient) Update() *RoomConnectionUpdate
Update returns an update builder for RoomConnection.
func (*RoomConnectionClient) UpdateOne ¶
func (c *RoomConnectionClient) UpdateOne(rc *RoomConnection) *RoomConnectionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoomConnectionClient) UpdateOneID ¶
func (c *RoomConnectionClient) UpdateOneID(id int) *RoomConnectionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RoomConnectionClient) Use ¶
func (c *RoomConnectionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `roomconnection.Hooks(f(g(h())))`.
type RoomConnectionCreate ¶
type RoomConnectionCreate struct {
// contains filtered or unexported fields
}
RoomConnectionCreate is the builder for creating a RoomConnection entity.
func (*RoomConnectionCreate) Exec ¶
func (rcc *RoomConnectionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomConnectionCreate) ExecX ¶
func (rcc *RoomConnectionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomConnectionCreate) Mutation ¶
func (rcc *RoomConnectionCreate) Mutation() *RoomConnectionMutation
Mutation returns the RoomConnectionMutation object of the builder.
func (*RoomConnectionCreate) Save ¶
func (rcc *RoomConnectionCreate) Save(ctx context.Context) (*RoomConnection, error)
Save creates the RoomConnection in the database.
func (*RoomConnectionCreate) SaveX ¶
func (rcc *RoomConnectionCreate) SaveX(ctx context.Context) *RoomConnection
SaveX calls Save and panics if Save returns an error.
func (*RoomConnectionCreate) SetEndTime ¶
func (rcc *RoomConnectionCreate) SetEndTime(s string) *RoomConnectionCreate
SetEndTime sets the "end_time" field.
func (*RoomConnectionCreate) SetNillableEndTime ¶
func (rcc *RoomConnectionCreate) SetNillableEndTime(s *string) *RoomConnectionCreate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*RoomConnectionCreate) SetNillableStartTime ¶
func (rcc *RoomConnectionCreate) SetNillableStartTime(s *string) *RoomConnectionCreate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*RoomConnectionCreate) SetRoom ¶
func (rcc *RoomConnectionCreate) SetRoom(r *Room) *RoomConnectionCreate
SetRoom sets the "room" edge to the Room entity.
func (*RoomConnectionCreate) SetRoomID ¶
func (rcc *RoomConnectionCreate) SetRoomID(id int) *RoomConnectionCreate
SetRoomID sets the "room" edge to the Room entity by ID.
func (*RoomConnectionCreate) SetStartTime ¶
func (rcc *RoomConnectionCreate) SetStartTime(s string) *RoomConnectionCreate
SetStartTime sets the "start_time" field.
func (*RoomConnectionCreate) SetUser ¶
func (rcc *RoomConnectionCreate) SetUser(u *User) *RoomConnectionCreate
SetUser sets the "user" edge to the User entity.
func (*RoomConnectionCreate) SetUserID ¶
func (rcc *RoomConnectionCreate) SetUserID(id int) *RoomConnectionCreate
SetUserID sets the "user" edge to the User entity by ID.
type RoomConnectionCreateBulk ¶
type RoomConnectionCreateBulk struct {
// contains filtered or unexported fields
}
RoomConnectionCreateBulk is the builder for creating many RoomConnection entities in bulk.
func (*RoomConnectionCreateBulk) Exec ¶
func (rccb *RoomConnectionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomConnectionCreateBulk) ExecX ¶
func (rccb *RoomConnectionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomConnectionCreateBulk) Save ¶
func (rccb *RoomConnectionCreateBulk) Save(ctx context.Context) ([]*RoomConnection, error)
Save creates the RoomConnection entities in the database.
func (*RoomConnectionCreateBulk) SaveX ¶
func (rccb *RoomConnectionCreateBulk) SaveX(ctx context.Context) []*RoomConnection
SaveX is like Save, but panics if an error occurs.
type RoomConnectionDelete ¶
type RoomConnectionDelete struct {
// contains filtered or unexported fields
}
RoomConnectionDelete is the builder for deleting a RoomConnection entity.
func (*RoomConnectionDelete) Exec ¶
func (rcd *RoomConnectionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoomConnectionDelete) ExecX ¶
func (rcd *RoomConnectionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoomConnectionDelete) Where ¶
func (rcd *RoomConnectionDelete) Where(ps ...predicate.RoomConnection) *RoomConnectionDelete
Where appends a list predicates to the RoomConnectionDelete builder.
type RoomConnectionDeleteOne ¶
type RoomConnectionDeleteOne struct {
// contains filtered or unexported fields
}
RoomConnectionDeleteOne is the builder for deleting a single RoomConnection entity.
func (*RoomConnectionDeleteOne) Exec ¶
func (rcdo *RoomConnectionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoomConnectionDeleteOne) ExecX ¶
func (rcdo *RoomConnectionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoomConnectionEdges ¶
type RoomConnectionEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Room holds the value of the room edge. Room *Room `json:"room,omitempty"` // contains filtered or unexported fields }
RoomConnectionEdges holds the relations/edges for other nodes in the graph.
func (RoomConnectionEdges) RoomOrErr ¶
func (e RoomConnectionEdges) RoomOrErr() (*Room, error)
RoomOrErr returns the Room value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RoomConnectionEdges) UserOrErr ¶
func (e RoomConnectionEdges) 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 RoomConnectionGroupBy ¶
type RoomConnectionGroupBy struct {
// contains filtered or unexported fields
}
RoomConnectionGroupBy is the group-by builder for RoomConnection entities.
func (*RoomConnectionGroupBy) Aggregate ¶
func (rcgb *RoomConnectionGroupBy) Aggregate(fns ...AggregateFunc) *RoomConnectionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoomConnectionGroupBy) Bool ¶
func (rcgb *RoomConnectionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*RoomConnectionGroupBy) BoolX ¶
func (rcgb *RoomConnectionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*RoomConnectionGroupBy) Bools ¶
func (rcgb *RoomConnectionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*RoomConnectionGroupBy) BoolsX ¶
func (rcgb *RoomConnectionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*RoomConnectionGroupBy) Float64 ¶
func (rcgb *RoomConnectionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*RoomConnectionGroupBy) Float64X ¶
func (rcgb *RoomConnectionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*RoomConnectionGroupBy) Float64s ¶
func (rcgb *RoomConnectionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*RoomConnectionGroupBy) Float64sX ¶
func (rcgb *RoomConnectionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*RoomConnectionGroupBy) Int ¶
func (rcgb *RoomConnectionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*RoomConnectionGroupBy) IntX ¶
func (rcgb *RoomConnectionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*RoomConnectionGroupBy) Ints ¶
func (rcgb *RoomConnectionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*RoomConnectionGroupBy) IntsX ¶
func (rcgb *RoomConnectionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*RoomConnectionGroupBy) Scan ¶
func (rcgb *RoomConnectionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*RoomConnectionGroupBy) ScanX ¶
func (rcgb *RoomConnectionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*RoomConnectionGroupBy) String ¶
func (rcgb *RoomConnectionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*RoomConnectionGroupBy) StringX ¶
func (rcgb *RoomConnectionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type RoomConnectionMutation ¶
type RoomConnectionMutation struct {
// contains filtered or unexported fields
}
RoomConnectionMutation represents an operation that mutates the RoomConnection nodes in the graph.
func (*RoomConnectionMutation) AddField ¶
func (m *RoomConnectionMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RoomConnectionMutation) AddedEdges ¶
func (m *RoomConnectionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoomConnectionMutation) AddedField ¶
func (m *RoomConnectionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RoomConnectionMutation) AddedFields ¶
func (m *RoomConnectionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoomConnectionMutation) AddedIDs ¶
func (m *RoomConnectionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoomConnectionMutation) ClearEdge ¶
func (m *RoomConnectionMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*RoomConnectionMutation) ClearField ¶
func (m *RoomConnectionMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*RoomConnectionMutation) ClearRoom ¶
func (m *RoomConnectionMutation) ClearRoom()
ClearRoom clears the "room" edge to the Room entity.
func (*RoomConnectionMutation) ClearUser ¶
func (m *RoomConnectionMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*RoomConnectionMutation) ClearedEdges ¶
func (m *RoomConnectionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoomConnectionMutation) ClearedFields ¶
func (m *RoomConnectionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoomConnectionMutation) Client ¶
func (m RoomConnectionMutation) 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 (*RoomConnectionMutation) EdgeCleared ¶
func (m *RoomConnectionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoomConnectionMutation) EndTime ¶
func (m *RoomConnectionMutation) EndTime() (r string, exists bool)
EndTime returns the value of the "end_time" field in the mutation.
func (*RoomConnectionMutation) Field ¶
func (m *RoomConnectionMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RoomConnectionMutation) FieldCleared ¶
func (m *RoomConnectionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoomConnectionMutation) Fields ¶
func (m *RoomConnectionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*RoomConnectionMutation) ID ¶
func (m *RoomConnectionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RoomConnectionMutation) OldEndTime ¶
func (m *RoomConnectionMutation) OldEndTime(ctx context.Context) (v string, err error)
OldEndTime returns the old "end_time" field's value of the RoomConnection entity. If the RoomConnection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoomConnectionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*RoomConnectionMutation) OldStartTime ¶
func (m *RoomConnectionMutation) OldStartTime(ctx context.Context) (v string, err error)
OldStartTime returns the old "start_time" field's value of the RoomConnection entity. If the RoomConnection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoomConnectionMutation) Op ¶
func (m *RoomConnectionMutation) Op() Op
Op returns the operation name.
func (*RoomConnectionMutation) RemovedEdges ¶
func (m *RoomConnectionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoomConnectionMutation) RemovedIDs ¶
func (m *RoomConnectionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*RoomConnectionMutation) ResetEdge ¶
func (m *RoomConnectionMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*RoomConnectionMutation) ResetEndTime ¶
func (m *RoomConnectionMutation) ResetEndTime()
ResetEndTime resets all changes to the "end_time" field.
func (*RoomConnectionMutation) ResetField ¶
func (m *RoomConnectionMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*RoomConnectionMutation) ResetRoom ¶
func (m *RoomConnectionMutation) ResetRoom()
ResetRoom resets all changes to the "room" edge.
func (*RoomConnectionMutation) ResetStartTime ¶
func (m *RoomConnectionMutation) ResetStartTime()
ResetStartTime resets all changes to the "start_time" field.
func (*RoomConnectionMutation) ResetUser ¶
func (m *RoomConnectionMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*RoomConnectionMutation) RoomCleared ¶
func (m *RoomConnectionMutation) RoomCleared() bool
RoomCleared reports if the "room" edge to the Room entity was cleared.
func (*RoomConnectionMutation) RoomID ¶
func (m *RoomConnectionMutation) RoomID() (id int, exists bool)
RoomID returns the "room" edge ID in the mutation.
func (*RoomConnectionMutation) RoomIDs ¶
func (m *RoomConnectionMutation) RoomIDs() (ids []int)
RoomIDs returns the "room" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoomID instead. It exists only for internal usage by the builders.
func (*RoomConnectionMutation) SetEndTime ¶
func (m *RoomConnectionMutation) SetEndTime(s string)
SetEndTime sets the "end_time" field.
func (*RoomConnectionMutation) SetField ¶
func (m *RoomConnectionMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RoomConnectionMutation) SetRoomID ¶
func (m *RoomConnectionMutation) SetRoomID(id int)
SetRoomID sets the "room" edge to the Room entity by id.
func (*RoomConnectionMutation) SetStartTime ¶
func (m *RoomConnectionMutation) SetStartTime(s string)
SetStartTime sets the "start_time" field.
func (*RoomConnectionMutation) SetUserID ¶
func (m *RoomConnectionMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*RoomConnectionMutation) StartTime ¶
func (m *RoomConnectionMutation) StartTime() (r string, exists bool)
StartTime returns the value of the "start_time" field in the mutation.
func (RoomConnectionMutation) Tx ¶
func (m RoomConnectionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoomConnectionMutation) Type ¶
func (m *RoomConnectionMutation) Type() string
Type returns the node type of this mutation (RoomConnection).
func (*RoomConnectionMutation) UserCleared ¶
func (m *RoomConnectionMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*RoomConnectionMutation) UserID ¶
func (m *RoomConnectionMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*RoomConnectionMutation) UserIDs ¶
func (m *RoomConnectionMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*RoomConnectionMutation) Where ¶
func (m *RoomConnectionMutation) Where(ps ...predicate.RoomConnection)
Where appends a list predicates to the RoomConnectionMutation builder.
type RoomConnectionQuery ¶
type RoomConnectionQuery struct {
// contains filtered or unexported fields
}
RoomConnectionQuery is the builder for querying RoomConnection entities.
func (*RoomConnectionQuery) All ¶
func (rcq *RoomConnectionQuery) All(ctx context.Context) ([]*RoomConnection, error)
All executes the query and returns a list of RoomConnections.
func (*RoomConnectionQuery) AllX ¶
func (rcq *RoomConnectionQuery) AllX(ctx context.Context) []*RoomConnection
AllX is like All, but panics if an error occurs.
func (*RoomConnectionQuery) Clone ¶
func (rcq *RoomConnectionQuery) Clone() *RoomConnectionQuery
Clone returns a duplicate of the RoomConnectionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoomConnectionQuery) Count ¶
func (rcq *RoomConnectionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RoomConnectionQuery) CountX ¶
func (rcq *RoomConnectionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RoomConnectionQuery) Exist ¶
func (rcq *RoomConnectionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RoomConnectionQuery) ExistX ¶
func (rcq *RoomConnectionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RoomConnectionQuery) First ¶
func (rcq *RoomConnectionQuery) First(ctx context.Context) (*RoomConnection, error)
First returns the first RoomConnection entity from the query. Returns a *NotFoundError when no RoomConnection was found.
func (*RoomConnectionQuery) FirstID ¶
func (rcq *RoomConnectionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first RoomConnection ID from the query. Returns a *NotFoundError when no RoomConnection ID was found.
func (*RoomConnectionQuery) FirstIDX ¶
func (rcq *RoomConnectionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*RoomConnectionQuery) FirstX ¶
func (rcq *RoomConnectionQuery) FirstX(ctx context.Context) *RoomConnection
FirstX is like First, but panics if an error occurs.
func (*RoomConnectionQuery) GroupBy ¶
func (rcq *RoomConnectionQuery) GroupBy(field string, fields ...string) *RoomConnectionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { StartTime string `json:"start_time,omitempty"` Count int `json:"count,omitempty"` } client.RoomConnection.Query(). GroupBy(roomconnection.FieldStartTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RoomConnectionQuery) IDs ¶
func (rcq *RoomConnectionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of RoomConnection IDs.
func (*RoomConnectionQuery) IDsX ¶
func (rcq *RoomConnectionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*RoomConnectionQuery) Limit ¶
func (rcq *RoomConnectionQuery) Limit(limit int) *RoomConnectionQuery
Limit adds a limit step to the query.
func (*RoomConnectionQuery) Offset ¶
func (rcq *RoomConnectionQuery) Offset(offset int) *RoomConnectionQuery
Offset adds an offset step to the query.
func (*RoomConnectionQuery) Only ¶
func (rcq *RoomConnectionQuery) Only(ctx context.Context) (*RoomConnection, error)
Only returns a single RoomConnection entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one RoomConnection entity is not found. Returns a *NotFoundError when no RoomConnection entities are found.
func (*RoomConnectionQuery) OnlyID ¶
func (rcq *RoomConnectionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only RoomConnection ID in the query. Returns a *NotSingularError when exactly one RoomConnection ID is not found. Returns a *NotFoundError when no entities are found.
func (*RoomConnectionQuery) OnlyIDX ¶
func (rcq *RoomConnectionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RoomConnectionQuery) OnlyX ¶
func (rcq *RoomConnectionQuery) OnlyX(ctx context.Context) *RoomConnection
OnlyX is like Only, but panics if an error occurs.
func (*RoomConnectionQuery) Order ¶
func (rcq *RoomConnectionQuery) Order(o ...OrderFunc) *RoomConnectionQuery
Order adds an order step to the query.
func (*RoomConnectionQuery) QueryRoom ¶
func (rcq *RoomConnectionQuery) QueryRoom() *RoomQuery
QueryRoom chains the current query on the "room" edge.
func (*RoomConnectionQuery) QueryUser ¶
func (rcq *RoomConnectionQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*RoomConnectionQuery) Select ¶
func (rcq *RoomConnectionQuery) Select(fields ...string) *RoomConnectionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { StartTime string `json:"start_time,omitempty"` } client.RoomConnection.Query(). Select(roomconnection.FieldStartTime). Scan(ctx, &v)
func (*RoomConnectionQuery) Unique ¶
func (rcq *RoomConnectionQuery) Unique(unique bool) *RoomConnectionQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*RoomConnectionQuery) Where ¶
func (rcq *RoomConnectionQuery) Where(ps ...predicate.RoomConnection) *RoomConnectionQuery
Where adds a new predicate for the RoomConnectionQuery builder.
func (*RoomConnectionQuery) WithRoom ¶
func (rcq *RoomConnectionQuery) WithRoom(opts ...func(*RoomQuery)) *RoomConnectionQuery
WithRoom tells the query-builder to eager-load the nodes that are connected to the "room" edge. The optional arguments are used to configure the query builder of the edge.
func (*RoomConnectionQuery) WithUser ¶
func (rcq *RoomConnectionQuery) WithUser(opts ...func(*UserQuery)) *RoomConnectionQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type RoomConnectionSelect ¶
type RoomConnectionSelect struct { *RoomConnectionQuery // contains filtered or unexported fields }
RoomConnectionSelect is the builder for selecting fields of RoomConnection entities.
func (*RoomConnectionSelect) Bool ¶
func (rcs *RoomConnectionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoomConnectionSelect) BoolX ¶
func (rcs *RoomConnectionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*RoomConnectionSelect) Bools ¶
func (rcs *RoomConnectionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoomConnectionSelect) BoolsX ¶
func (rcs *RoomConnectionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*RoomConnectionSelect) Float64 ¶
func (rcs *RoomConnectionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoomConnectionSelect) Float64X ¶
func (rcs *RoomConnectionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*RoomConnectionSelect) Float64s ¶
func (rcs *RoomConnectionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoomConnectionSelect) Float64sX ¶
func (rcs *RoomConnectionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*RoomConnectionSelect) Int ¶
func (rcs *RoomConnectionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoomConnectionSelect) IntX ¶
func (rcs *RoomConnectionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*RoomConnectionSelect) Ints ¶
func (rcs *RoomConnectionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoomConnectionSelect) IntsX ¶
func (rcs *RoomConnectionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*RoomConnectionSelect) Scan ¶
func (rcs *RoomConnectionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*RoomConnectionSelect) ScanX ¶
func (rcs *RoomConnectionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*RoomConnectionSelect) String ¶
func (rcs *RoomConnectionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*RoomConnectionSelect) StringX ¶
func (rcs *RoomConnectionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type RoomConnectionUpdate ¶
type RoomConnectionUpdate struct {
// contains filtered or unexported fields
}
RoomConnectionUpdate is the builder for updating RoomConnection entities.
func (*RoomConnectionUpdate) ClearRoom ¶
func (rcu *RoomConnectionUpdate) ClearRoom() *RoomConnectionUpdate
ClearRoom clears the "room" edge to the Room entity.
func (*RoomConnectionUpdate) ClearUser ¶
func (rcu *RoomConnectionUpdate) ClearUser() *RoomConnectionUpdate
ClearUser clears the "user" edge to the User entity.
func (*RoomConnectionUpdate) Exec ¶
func (rcu *RoomConnectionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomConnectionUpdate) ExecX ¶
func (rcu *RoomConnectionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomConnectionUpdate) Mutation ¶
func (rcu *RoomConnectionUpdate) Mutation() *RoomConnectionMutation
Mutation returns the RoomConnectionMutation object of the builder.
func (*RoomConnectionUpdate) Save ¶
func (rcu *RoomConnectionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoomConnectionUpdate) SaveX ¶
func (rcu *RoomConnectionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoomConnectionUpdate) SetEndTime ¶
func (rcu *RoomConnectionUpdate) SetEndTime(s string) *RoomConnectionUpdate
SetEndTime sets the "end_time" field.
func (*RoomConnectionUpdate) SetNillableEndTime ¶
func (rcu *RoomConnectionUpdate) SetNillableEndTime(s *string) *RoomConnectionUpdate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*RoomConnectionUpdate) SetNillableStartTime ¶
func (rcu *RoomConnectionUpdate) SetNillableStartTime(s *string) *RoomConnectionUpdate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*RoomConnectionUpdate) SetRoom ¶
func (rcu *RoomConnectionUpdate) SetRoom(r *Room) *RoomConnectionUpdate
SetRoom sets the "room" edge to the Room entity.
func (*RoomConnectionUpdate) SetRoomID ¶
func (rcu *RoomConnectionUpdate) SetRoomID(id int) *RoomConnectionUpdate
SetRoomID sets the "room" edge to the Room entity by ID.
func (*RoomConnectionUpdate) SetStartTime ¶
func (rcu *RoomConnectionUpdate) SetStartTime(s string) *RoomConnectionUpdate
SetStartTime sets the "start_time" field.
func (*RoomConnectionUpdate) SetUser ¶
func (rcu *RoomConnectionUpdate) SetUser(u *User) *RoomConnectionUpdate
SetUser sets the "user" edge to the User entity.
func (*RoomConnectionUpdate) SetUserID ¶
func (rcu *RoomConnectionUpdate) SetUserID(id int) *RoomConnectionUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*RoomConnectionUpdate) Where ¶
func (rcu *RoomConnectionUpdate) Where(ps ...predicate.RoomConnection) *RoomConnectionUpdate
Where appends a list predicates to the RoomConnectionUpdate builder.
type RoomConnectionUpdateOne ¶
type RoomConnectionUpdateOne struct {
// contains filtered or unexported fields
}
RoomConnectionUpdateOne is the builder for updating a single RoomConnection entity.
func (*RoomConnectionUpdateOne) ClearRoom ¶
func (rcuo *RoomConnectionUpdateOne) ClearRoom() *RoomConnectionUpdateOne
ClearRoom clears the "room" edge to the Room entity.
func (*RoomConnectionUpdateOne) ClearUser ¶
func (rcuo *RoomConnectionUpdateOne) ClearUser() *RoomConnectionUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*RoomConnectionUpdateOne) Exec ¶
func (rcuo *RoomConnectionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoomConnectionUpdateOne) ExecX ¶
func (rcuo *RoomConnectionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomConnectionUpdateOne) Mutation ¶
func (rcuo *RoomConnectionUpdateOne) Mutation() *RoomConnectionMutation
Mutation returns the RoomConnectionMutation object of the builder.
func (*RoomConnectionUpdateOne) Save ¶
func (rcuo *RoomConnectionUpdateOne) Save(ctx context.Context) (*RoomConnection, error)
Save executes the query and returns the updated RoomConnection entity.
func (*RoomConnectionUpdateOne) SaveX ¶
func (rcuo *RoomConnectionUpdateOne) SaveX(ctx context.Context) *RoomConnection
SaveX is like Save, but panics if an error occurs.
func (*RoomConnectionUpdateOne) Select ¶
func (rcuo *RoomConnectionUpdateOne) Select(field string, fields ...string) *RoomConnectionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoomConnectionUpdateOne) SetEndTime ¶
func (rcuo *RoomConnectionUpdateOne) SetEndTime(s string) *RoomConnectionUpdateOne
SetEndTime sets the "end_time" field.
func (*RoomConnectionUpdateOne) SetNillableEndTime ¶
func (rcuo *RoomConnectionUpdateOne) SetNillableEndTime(s *string) *RoomConnectionUpdateOne
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*RoomConnectionUpdateOne) SetNillableStartTime ¶
func (rcuo *RoomConnectionUpdateOne) SetNillableStartTime(s *string) *RoomConnectionUpdateOne
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*RoomConnectionUpdateOne) SetRoom ¶
func (rcuo *RoomConnectionUpdateOne) SetRoom(r *Room) *RoomConnectionUpdateOne
SetRoom sets the "room" edge to the Room entity.
func (*RoomConnectionUpdateOne) SetRoomID ¶
func (rcuo *RoomConnectionUpdateOne) SetRoomID(id int) *RoomConnectionUpdateOne
SetRoomID sets the "room" edge to the Room entity by ID.
func (*RoomConnectionUpdateOne) SetStartTime ¶
func (rcuo *RoomConnectionUpdateOne) SetStartTime(s string) *RoomConnectionUpdateOne
SetStartTime sets the "start_time" field.
func (*RoomConnectionUpdateOne) SetUser ¶
func (rcuo *RoomConnectionUpdateOne) SetUser(u *User) *RoomConnectionUpdateOne
SetUser sets the "user" edge to the User entity.
func (*RoomConnectionUpdateOne) SetUserID ¶
func (rcuo *RoomConnectionUpdateOne) SetUserID(id int) *RoomConnectionUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type RoomConnections ¶
type RoomConnections []*RoomConnection
RoomConnections is a parsable slice of RoomConnection.
type RoomCreate ¶
type RoomCreate struct {
// contains filtered or unexported fields
}
RoomCreate is the builder for creating a Room entity.
func (*RoomCreate) AddThingIDs ¶
func (rc *RoomCreate) AddThingIDs(ids ...int) *RoomCreate
AddThingIDs adds the "things" edge to the Thing entity by IDs.
func (*RoomCreate) AddThings ¶
func (rc *RoomCreate) AddThings(t ...*Thing) *RoomCreate
AddThings adds the "things" edges to the Thing entity.
func (*RoomCreate) Exec ¶
func (rc *RoomCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomCreate) ExecX ¶
func (rc *RoomCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomCreate) Mutation ¶
func (rc *RoomCreate) Mutation() *RoomMutation
Mutation returns the RoomMutation object of the builder.
func (*RoomCreate) Save ¶
func (rc *RoomCreate) Save(ctx context.Context) (*Room, error)
Save creates the Room in the database.
func (*RoomCreate) SaveX ¶
func (rc *RoomCreate) SaveX(ctx context.Context) *Room
SaveX calls Save and panics if Save returns an error.
func (*RoomCreate) SetHome ¶
func (rc *RoomCreate) SetHome(h *Home) *RoomCreate
SetHome sets the "home" edge to the Home entity.
func (*RoomCreate) SetHomeID ¶
func (rc *RoomCreate) SetHomeID(id int) *RoomCreate
SetHomeID sets the "home" edge to the Home entity by ID.
func (*RoomCreate) SetName ¶
func (rc *RoomCreate) SetName(s string) *RoomCreate
SetName sets the "name" field.
func (*RoomCreate) SetUUID ¶
func (rc *RoomCreate) SetUUID(u uuid.UUID) *RoomCreate
SetUUID sets the "uuid" field.
type RoomCreateBulk ¶
type RoomCreateBulk struct {
// contains filtered or unexported fields
}
RoomCreateBulk is the builder for creating many Room entities in bulk.
func (*RoomCreateBulk) Exec ¶
func (rcb *RoomCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomCreateBulk) ExecX ¶
func (rcb *RoomCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoomDelete ¶
type RoomDelete struct {
// contains filtered or unexported fields
}
RoomDelete is the builder for deleting a Room entity.
func (*RoomDelete) Exec ¶
func (rd *RoomDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoomDelete) ExecX ¶
func (rd *RoomDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoomDelete) Where ¶
func (rd *RoomDelete) Where(ps ...predicate.Room) *RoomDelete
Where appends a list predicates to the RoomDelete builder.
type RoomDeleteOne ¶
type RoomDeleteOne struct {
// contains filtered or unexported fields
}
RoomDeleteOne is the builder for deleting a single Room entity.
func (*RoomDeleteOne) Exec ¶
func (rdo *RoomDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoomDeleteOne) ExecX ¶
func (rdo *RoomDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoomEdges ¶
type RoomEdges struct { // Home holds the value of the home edge. Home *Home `json:"home,omitempty"` // Things holds the value of the things edge. Things []*Thing `json:"things,omitempty"` // contains filtered or unexported fields }
RoomEdges holds the relations/edges for other nodes in the graph.
func (RoomEdges) HomeOrErr ¶
HomeOrErr returns the Home value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RoomEdges) ThingsOrErr ¶
ThingsOrErr returns the Things value or an error if the edge was not loaded in eager-loading.
type RoomGroupBy ¶
type RoomGroupBy struct {
// contains filtered or unexported fields
}
RoomGroupBy is the group-by builder for Room entities.
func (*RoomGroupBy) Aggregate ¶
func (rgb *RoomGroupBy) Aggregate(fns ...AggregateFunc) *RoomGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoomGroupBy) Bool ¶
func (rgb *RoomGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*RoomGroupBy) BoolX ¶
func (rgb *RoomGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*RoomGroupBy) Bools ¶
func (rgb *RoomGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*RoomGroupBy) BoolsX ¶
func (rgb *RoomGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*RoomGroupBy) Float64 ¶
func (rgb *RoomGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*RoomGroupBy) Float64X ¶
func (rgb *RoomGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*RoomGroupBy) Float64s ¶
func (rgb *RoomGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*RoomGroupBy) Float64sX ¶
func (rgb *RoomGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*RoomGroupBy) Int ¶
func (rgb *RoomGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*RoomGroupBy) IntX ¶
func (rgb *RoomGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*RoomGroupBy) Ints ¶
func (rgb *RoomGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*RoomGroupBy) IntsX ¶
func (rgb *RoomGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*RoomGroupBy) Scan ¶
func (rgb *RoomGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*RoomGroupBy) ScanX ¶
func (rgb *RoomGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*RoomGroupBy) String ¶
func (rgb *RoomGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*RoomGroupBy) StringX ¶
func (rgb *RoomGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type RoomMutation ¶
type RoomMutation struct {
// contains filtered or unexported fields
}
RoomMutation represents an operation that mutates the Room nodes in the graph.
func (*RoomMutation) AddField ¶
func (m *RoomMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RoomMutation) AddThingIDs ¶
func (m *RoomMutation) AddThingIDs(ids ...int)
AddThingIDs adds the "things" edge to the Thing entity by ids.
func (*RoomMutation) AddedEdges ¶
func (m *RoomMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoomMutation) AddedField ¶
func (m *RoomMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RoomMutation) AddedFields ¶
func (m *RoomMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoomMutation) AddedIDs ¶
func (m *RoomMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoomMutation) ClearEdge ¶
func (m *RoomMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*RoomMutation) ClearField ¶
func (m *RoomMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*RoomMutation) ClearHome ¶
func (m *RoomMutation) ClearHome()
ClearHome clears the "home" edge to the Home entity.
func (*RoomMutation) ClearThings ¶
func (m *RoomMutation) ClearThings()
ClearThings clears the "things" edge to the Thing entity.
func (*RoomMutation) ClearedEdges ¶
func (m *RoomMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoomMutation) ClearedFields ¶
func (m *RoomMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoomMutation) Client ¶
func (m RoomMutation) 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 (*RoomMutation) EdgeCleared ¶
func (m *RoomMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoomMutation) Field ¶
func (m *RoomMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RoomMutation) FieldCleared ¶
func (m *RoomMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoomMutation) Fields ¶
func (m *RoomMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*RoomMutation) HomeCleared ¶
func (m *RoomMutation) HomeCleared() bool
HomeCleared reports if the "home" edge to the Home entity was cleared.
func (*RoomMutation) HomeID ¶
func (m *RoomMutation) HomeID() (id int, exists bool)
HomeID returns the "home" edge ID in the mutation.
func (*RoomMutation) HomeIDs ¶
func (m *RoomMutation) HomeIDs() (ids []int)
HomeIDs returns the "home" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HomeID instead. It exists only for internal usage by the builders.
func (*RoomMutation) ID ¶
func (m *RoomMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RoomMutation) Name ¶
func (m *RoomMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*RoomMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*RoomMutation) OldName ¶
func (m *RoomMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Room entity. If the Room object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoomMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the Room entity. If the Room object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoomMutation) RemoveThingIDs ¶
func (m *RoomMutation) RemoveThingIDs(ids ...int)
RemoveThingIDs removes the "things" edge to the Thing entity by IDs.
func (*RoomMutation) RemovedEdges ¶
func (m *RoomMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoomMutation) RemovedIDs ¶
func (m *RoomMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*RoomMutation) RemovedThingsIDs ¶
func (m *RoomMutation) RemovedThingsIDs() (ids []int)
RemovedThings returns the removed IDs of the "things" edge to the Thing entity.
func (*RoomMutation) ResetEdge ¶
func (m *RoomMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*RoomMutation) ResetField ¶
func (m *RoomMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*RoomMutation) ResetHome ¶
func (m *RoomMutation) ResetHome()
ResetHome resets all changes to the "home" edge.
func (*RoomMutation) ResetName ¶
func (m *RoomMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*RoomMutation) ResetThings ¶
func (m *RoomMutation) ResetThings()
ResetThings resets all changes to the "things" edge.
func (*RoomMutation) ResetUUID ¶
func (m *RoomMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*RoomMutation) SetField ¶
func (m *RoomMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RoomMutation) SetHomeID ¶
func (m *RoomMutation) SetHomeID(id int)
SetHomeID sets the "home" edge to the Home entity by id.
func (*RoomMutation) SetName ¶
func (m *RoomMutation) SetName(s string)
SetName sets the "name" field.
func (*RoomMutation) SetUUID ¶
func (m *RoomMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (*RoomMutation) ThingsCleared ¶
func (m *RoomMutation) ThingsCleared() bool
ThingsCleared reports if the "things" edge to the Thing entity was cleared.
func (*RoomMutation) ThingsIDs ¶
func (m *RoomMutation) ThingsIDs() (ids []int)
ThingsIDs returns the "things" edge IDs in the mutation.
func (RoomMutation) Tx ¶
func (m RoomMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoomMutation) Type ¶
func (m *RoomMutation) Type() string
Type returns the node type of this mutation (Room).
func (*RoomMutation) UUID ¶
func (m *RoomMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*RoomMutation) Where ¶
func (m *RoomMutation) Where(ps ...predicate.Room)
Where appends a list predicates to the RoomMutation builder.
type RoomQuery ¶
type RoomQuery struct {
// contains filtered or unexported fields
}
RoomQuery is the builder for querying Room entities.
func (*RoomQuery) Clone ¶
Clone returns a duplicate of the RoomQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoomQuery) First ¶
First returns the first Room entity from the query. Returns a *NotFoundError when no Room was found.
func (*RoomQuery) FirstID ¶
FirstID returns the first Room ID from the query. Returns a *NotFoundError when no Room ID was found.
func (*RoomQuery) GroupBy ¶
func (rq *RoomQuery) GroupBy(field string, fields ...string) *RoomGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` Count int `json:"count,omitempty"` } client.Room.Query(). GroupBy(room.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RoomQuery) Only ¶
Only returns a single Room entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Room entity is not found. Returns a *NotFoundError when no Room entities are found.
func (*RoomQuery) OnlyID ¶
OnlyID is like Only, but returns the only Room ID in the query. Returns a *NotSingularError when exactly one Room ID is not found. Returns a *NotFoundError when no entities are found.
func (*RoomQuery) QueryThings ¶
func (rq *RoomQuery) QueryThings() *ThingQuery
QueryThings chains the current query on the "things" edge.
func (*RoomQuery) Select ¶
func (rq *RoomQuery) Select(fields ...string) *RoomSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` } client.Room.Query(). Select(room.FieldUUID). Scan(ctx, &v)
func (*RoomQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*RoomQuery) WithHome ¶
WithHome tells the query-builder to eager-load the nodes that are connected to the "home" edge. The optional arguments are used to configure the query builder of the edge.
func (*RoomQuery) WithThings ¶
func (rq *RoomQuery) WithThings(opts ...func(*ThingQuery)) *RoomQuery
WithThings tells the query-builder to eager-load the nodes that are connected to the "things" edge. The optional arguments are used to configure the query builder of the edge.
type RoomSelect ¶
type RoomSelect struct { *RoomQuery // contains filtered or unexported fields }
RoomSelect is the builder for selecting fields of Room entities.
func (*RoomSelect) Bool ¶
func (rs *RoomSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoomSelect) BoolX ¶
func (rs *RoomSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*RoomSelect) Bools ¶
func (rs *RoomSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoomSelect) BoolsX ¶
func (rs *RoomSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*RoomSelect) Float64 ¶
func (rs *RoomSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoomSelect) Float64X ¶
func (rs *RoomSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*RoomSelect) Float64s ¶
func (rs *RoomSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoomSelect) Float64sX ¶
func (rs *RoomSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*RoomSelect) Int ¶
func (rs *RoomSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoomSelect) IntX ¶
func (rs *RoomSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*RoomSelect) Ints ¶
func (rs *RoomSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoomSelect) IntsX ¶
func (rs *RoomSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*RoomSelect) Scan ¶
func (rs *RoomSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*RoomSelect) ScanX ¶
func (rs *RoomSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*RoomSelect) String ¶
func (rs *RoomSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*RoomSelect) StringX ¶
func (rs *RoomSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type RoomUpdate ¶
type RoomUpdate struct {
// contains filtered or unexported fields
}
RoomUpdate is the builder for updating Room entities.
func (*RoomUpdate) AddThingIDs ¶
func (ru *RoomUpdate) AddThingIDs(ids ...int) *RoomUpdate
AddThingIDs adds the "things" edge to the Thing entity by IDs.
func (*RoomUpdate) AddThings ¶
func (ru *RoomUpdate) AddThings(t ...*Thing) *RoomUpdate
AddThings adds the "things" edges to the Thing entity.
func (*RoomUpdate) ClearHome ¶
func (ru *RoomUpdate) ClearHome() *RoomUpdate
ClearHome clears the "home" edge to the Home entity.
func (*RoomUpdate) ClearThings ¶
func (ru *RoomUpdate) ClearThings() *RoomUpdate
ClearThings clears all "things" edges to the Thing entity.
func (*RoomUpdate) Exec ¶
func (ru *RoomUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomUpdate) ExecX ¶
func (ru *RoomUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomUpdate) Mutation ¶
func (ru *RoomUpdate) Mutation() *RoomMutation
Mutation returns the RoomMutation object of the builder.
func (*RoomUpdate) RemoveThingIDs ¶
func (ru *RoomUpdate) RemoveThingIDs(ids ...int) *RoomUpdate
RemoveThingIDs removes the "things" edge to Thing entities by IDs.
func (*RoomUpdate) RemoveThings ¶
func (ru *RoomUpdate) RemoveThings(t ...*Thing) *RoomUpdate
RemoveThings removes "things" edges to Thing entities.
func (*RoomUpdate) Save ¶
func (ru *RoomUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoomUpdate) SaveX ¶
func (ru *RoomUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoomUpdate) SetHome ¶
func (ru *RoomUpdate) SetHome(h *Home) *RoomUpdate
SetHome sets the "home" edge to the Home entity.
func (*RoomUpdate) SetHomeID ¶
func (ru *RoomUpdate) SetHomeID(id int) *RoomUpdate
SetHomeID sets the "home" edge to the Home entity by ID.
func (*RoomUpdate) SetName ¶
func (ru *RoomUpdate) SetName(s string) *RoomUpdate
SetName sets the "name" field.
func (*RoomUpdate) Where ¶
func (ru *RoomUpdate) Where(ps ...predicate.Room) *RoomUpdate
Where appends a list predicates to the RoomUpdate builder.
type RoomUpdateOne ¶
type RoomUpdateOne struct {
// contains filtered or unexported fields
}
RoomUpdateOne is the builder for updating a single Room entity.
func (*RoomUpdateOne) AddThingIDs ¶
func (ruo *RoomUpdateOne) AddThingIDs(ids ...int) *RoomUpdateOne
AddThingIDs adds the "things" edge to the Thing entity by IDs.
func (*RoomUpdateOne) AddThings ¶
func (ruo *RoomUpdateOne) AddThings(t ...*Thing) *RoomUpdateOne
AddThings adds the "things" edges to the Thing entity.
func (*RoomUpdateOne) ClearHome ¶
func (ruo *RoomUpdateOne) ClearHome() *RoomUpdateOne
ClearHome clears the "home" edge to the Home entity.
func (*RoomUpdateOne) ClearThings ¶
func (ruo *RoomUpdateOne) ClearThings() *RoomUpdateOne
ClearThings clears all "things" edges to the Thing entity.
func (*RoomUpdateOne) Exec ¶
func (ruo *RoomUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoomUpdateOne) ExecX ¶
func (ruo *RoomUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomUpdateOne) Mutation ¶
func (ruo *RoomUpdateOne) Mutation() *RoomMutation
Mutation returns the RoomMutation object of the builder.
func (*RoomUpdateOne) RemoveThingIDs ¶
func (ruo *RoomUpdateOne) RemoveThingIDs(ids ...int) *RoomUpdateOne
RemoveThingIDs removes the "things" edge to Thing entities by IDs.
func (*RoomUpdateOne) RemoveThings ¶
func (ruo *RoomUpdateOne) RemoveThings(t ...*Thing) *RoomUpdateOne
RemoveThings removes "things" edges to Thing entities.
func (*RoomUpdateOne) Save ¶
func (ruo *RoomUpdateOne) Save(ctx context.Context) (*Room, error)
Save executes the query and returns the updated Room entity.
func (*RoomUpdateOne) SaveX ¶
func (ruo *RoomUpdateOne) SaveX(ctx context.Context) *Room
SaveX is like Save, but panics if an error occurs.
func (*RoomUpdateOne) Select ¶
func (ruo *RoomUpdateOne) Select(field string, fields ...string) *RoomUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoomUpdateOne) SetHome ¶
func (ruo *RoomUpdateOne) SetHome(h *Home) *RoomUpdateOne
SetHome sets the "home" edge to the Home entity.
func (*RoomUpdateOne) SetHomeID ¶
func (ruo *RoomUpdateOne) SetHomeID(id int) *RoomUpdateOne
SetHomeID sets the "home" edge to the Home entity by ID.
func (*RoomUpdateOne) SetName ¶
func (ruo *RoomUpdateOne) SetName(s string) *RoomUpdateOne
SetName sets the "name" field.
type Thing ¶
type Thing struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // SecretKey holds the value of the "secret_key" field. SecretKey uuid.UUID `json:"secret_key,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ThingQuery when eager-loading is set. Edges ThingEdges `json:"edges"` // contains filtered or unexported fields }
Thing is the model entity for the Thing schema.
func (*Thing) Unwrap ¶
Unwrap unwraps the Thing entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Thing) Update ¶
func (t *Thing) Update() *ThingUpdateOne
Update returns a builder for updating this Thing. Note that you need to call Thing.Unwrap() before calling this method if this Thing was returned from a transaction, and the transaction was committed or rolled back.
type ThingClient ¶
type ThingClient struct {
// contains filtered or unexported fields
}
ThingClient is a client for the Thing schema.
func NewThingClient ¶
func NewThingClient(c config) *ThingClient
NewThingClient returns a client for the Thing from the given config.
func (*ThingClient) Create ¶
func (c *ThingClient) Create() *ThingCreate
Create returns a create builder for Thing.
func (*ThingClient) CreateBulk ¶
func (c *ThingClient) CreateBulk(builders ...*ThingCreate) *ThingCreateBulk
CreateBulk returns a builder for creating a bulk of Thing entities.
func (*ThingClient) Delete ¶
func (c *ThingClient) Delete() *ThingDelete
Delete returns a delete builder for Thing.
func (*ThingClient) DeleteOne ¶
func (c *ThingClient) DeleteOne(t *Thing) *ThingDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ThingClient) DeleteOneID ¶
func (c *ThingClient) DeleteOneID(id int) *ThingDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ThingClient) GetX ¶
func (c *ThingClient) GetX(ctx context.Context, id int) *Thing
GetX is like Get, but panics if an error occurs.
func (*ThingClient) Query ¶
func (c *ThingClient) Query() *ThingQuery
Query returns a query builder for Thing.
func (*ThingClient) QueryRoom ¶
func (c *ThingClient) QueryRoom(t *Thing) *RoomQuery
QueryRoom queries the room edge of a Thing.
func (*ThingClient) Update ¶
func (c *ThingClient) Update() *ThingUpdate
Update returns an update builder for Thing.
func (*ThingClient) UpdateOne ¶
func (c *ThingClient) UpdateOne(t *Thing) *ThingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ThingClient) UpdateOneID ¶
func (c *ThingClient) UpdateOneID(id int) *ThingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ThingClient) Use ¶
func (c *ThingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `thing.Hooks(f(g(h())))`.
type ThingConnection ¶
type ThingConnection struct { // ID of the ent. ID int `json:"id,omitempty"` // StartTime holds the value of the "start_time" field. StartTime string `json:"start_time,omitempty"` // EndTime holds the value of the "end_time" field. EndTime string `json:"end_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ThingConnectionQuery when eager-loading is set. Edges ThingConnectionEdges `json:"edges"` // contains filtered or unexported fields }
ThingConnection is the model entity for the ThingConnection schema.
func (*ThingConnection) QueryThing ¶
func (tc *ThingConnection) QueryThing() *ThingQuery
QueryThing queries the "thing" edge of the ThingConnection entity.
func (*ThingConnection) QueryUser ¶
func (tc *ThingConnection) QueryUser() *UserQuery
QueryUser queries the "user" edge of the ThingConnection entity.
func (*ThingConnection) String ¶
func (tc *ThingConnection) String() string
String implements the fmt.Stringer.
func (*ThingConnection) Unwrap ¶
func (tc *ThingConnection) Unwrap() *ThingConnection
Unwrap unwraps the ThingConnection entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*ThingConnection) Update ¶
func (tc *ThingConnection) Update() *ThingConnectionUpdateOne
Update returns a builder for updating this ThingConnection. Note that you need to call ThingConnection.Unwrap() before calling this method if this ThingConnection was returned from a transaction, and the transaction was committed or rolled back.
type ThingConnectionClient ¶
type ThingConnectionClient struct {
// contains filtered or unexported fields
}
ThingConnectionClient is a client for the ThingConnection schema.
func NewThingConnectionClient ¶
func NewThingConnectionClient(c config) *ThingConnectionClient
NewThingConnectionClient returns a client for the ThingConnection from the given config.
func (*ThingConnectionClient) Create ¶
func (c *ThingConnectionClient) Create() *ThingConnectionCreate
Create returns a create builder for ThingConnection.
func (*ThingConnectionClient) CreateBulk ¶
func (c *ThingConnectionClient) CreateBulk(builders ...*ThingConnectionCreate) *ThingConnectionCreateBulk
CreateBulk returns a builder for creating a bulk of ThingConnection entities.
func (*ThingConnectionClient) Delete ¶
func (c *ThingConnectionClient) Delete() *ThingConnectionDelete
Delete returns a delete builder for ThingConnection.
func (*ThingConnectionClient) DeleteOne ¶
func (c *ThingConnectionClient) DeleteOne(tc *ThingConnection) *ThingConnectionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ThingConnectionClient) DeleteOneID ¶
func (c *ThingConnectionClient) DeleteOneID(id int) *ThingConnectionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ThingConnectionClient) Get ¶
func (c *ThingConnectionClient) Get(ctx context.Context, id int) (*ThingConnection, error)
Get returns a ThingConnection entity by its id.
func (*ThingConnectionClient) GetX ¶
func (c *ThingConnectionClient) GetX(ctx context.Context, id int) *ThingConnection
GetX is like Get, but panics if an error occurs.
func (*ThingConnectionClient) Hooks ¶
func (c *ThingConnectionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ThingConnectionClient) Query ¶
func (c *ThingConnectionClient) Query() *ThingConnectionQuery
Query returns a query builder for ThingConnection.
func (*ThingConnectionClient) QueryThing ¶
func (c *ThingConnectionClient) QueryThing(tc *ThingConnection) *ThingQuery
QueryThing queries the thing edge of a ThingConnection.
func (*ThingConnectionClient) QueryUser ¶
func (c *ThingConnectionClient) QueryUser(tc *ThingConnection) *UserQuery
QueryUser queries the user edge of a ThingConnection.
func (*ThingConnectionClient) Update ¶
func (c *ThingConnectionClient) Update() *ThingConnectionUpdate
Update returns an update builder for ThingConnection.
func (*ThingConnectionClient) UpdateOne ¶
func (c *ThingConnectionClient) UpdateOne(tc *ThingConnection) *ThingConnectionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ThingConnectionClient) UpdateOneID ¶
func (c *ThingConnectionClient) UpdateOneID(id int) *ThingConnectionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ThingConnectionClient) Use ¶
func (c *ThingConnectionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `thingconnection.Hooks(f(g(h())))`.
type ThingConnectionCreate ¶
type ThingConnectionCreate struct {
// contains filtered or unexported fields
}
ThingConnectionCreate is the builder for creating a ThingConnection entity.
func (*ThingConnectionCreate) Exec ¶
func (tcc *ThingConnectionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ThingConnectionCreate) ExecX ¶
func (tcc *ThingConnectionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThingConnectionCreate) Mutation ¶
func (tcc *ThingConnectionCreate) Mutation() *ThingConnectionMutation
Mutation returns the ThingConnectionMutation object of the builder.
func (*ThingConnectionCreate) Save ¶
func (tcc *ThingConnectionCreate) Save(ctx context.Context) (*ThingConnection, error)
Save creates the ThingConnection in the database.
func (*ThingConnectionCreate) SaveX ¶
func (tcc *ThingConnectionCreate) SaveX(ctx context.Context) *ThingConnection
SaveX calls Save and panics if Save returns an error.
func (*ThingConnectionCreate) SetEndTime ¶
func (tcc *ThingConnectionCreate) SetEndTime(s string) *ThingConnectionCreate
SetEndTime sets the "end_time" field.
func (*ThingConnectionCreate) SetNillableEndTime ¶
func (tcc *ThingConnectionCreate) SetNillableEndTime(s *string) *ThingConnectionCreate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*ThingConnectionCreate) SetNillableStartTime ¶
func (tcc *ThingConnectionCreate) SetNillableStartTime(s *string) *ThingConnectionCreate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*ThingConnectionCreate) SetStartTime ¶
func (tcc *ThingConnectionCreate) SetStartTime(s string) *ThingConnectionCreate
SetStartTime sets the "start_time" field.
func (*ThingConnectionCreate) SetThing ¶
func (tcc *ThingConnectionCreate) SetThing(t *Thing) *ThingConnectionCreate
SetThing sets the "thing" edge to the Thing entity.
func (*ThingConnectionCreate) SetThingID ¶
func (tcc *ThingConnectionCreate) SetThingID(id int) *ThingConnectionCreate
SetThingID sets the "thing" edge to the Thing entity by ID.
func (*ThingConnectionCreate) SetUser ¶
func (tcc *ThingConnectionCreate) SetUser(u *User) *ThingConnectionCreate
SetUser sets the "user" edge to the User entity.
func (*ThingConnectionCreate) SetUserID ¶
func (tcc *ThingConnectionCreate) SetUserID(id int) *ThingConnectionCreate
SetUserID sets the "user" edge to the User entity by ID.
type ThingConnectionCreateBulk ¶
type ThingConnectionCreateBulk struct {
// contains filtered or unexported fields
}
ThingConnectionCreateBulk is the builder for creating many ThingConnection entities in bulk.
func (*ThingConnectionCreateBulk) Exec ¶
func (tccb *ThingConnectionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ThingConnectionCreateBulk) ExecX ¶
func (tccb *ThingConnectionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThingConnectionCreateBulk) Save ¶
func (tccb *ThingConnectionCreateBulk) Save(ctx context.Context) ([]*ThingConnection, error)
Save creates the ThingConnection entities in the database.
func (*ThingConnectionCreateBulk) SaveX ¶
func (tccb *ThingConnectionCreateBulk) SaveX(ctx context.Context) []*ThingConnection
SaveX is like Save, but panics if an error occurs.
type ThingConnectionDelete ¶
type ThingConnectionDelete struct {
// contains filtered or unexported fields
}
ThingConnectionDelete is the builder for deleting a ThingConnection entity.
func (*ThingConnectionDelete) Exec ¶
func (tcd *ThingConnectionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ThingConnectionDelete) ExecX ¶
func (tcd *ThingConnectionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ThingConnectionDelete) Where ¶
func (tcd *ThingConnectionDelete) Where(ps ...predicate.ThingConnection) *ThingConnectionDelete
Where appends a list predicates to the ThingConnectionDelete builder.
type ThingConnectionDeleteOne ¶
type ThingConnectionDeleteOne struct {
// contains filtered or unexported fields
}
ThingConnectionDeleteOne is the builder for deleting a single ThingConnection entity.
func (*ThingConnectionDeleteOne) Exec ¶
func (tcdo *ThingConnectionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ThingConnectionDeleteOne) ExecX ¶
func (tcdo *ThingConnectionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ThingConnectionEdges ¶
type ThingConnectionEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Thing holds the value of the thing edge. Thing *Thing `json:"thing,omitempty"` // contains filtered or unexported fields }
ThingConnectionEdges holds the relations/edges for other nodes in the graph.
func (ThingConnectionEdges) ThingOrErr ¶
func (e ThingConnectionEdges) ThingOrErr() (*Thing, error)
ThingOrErr returns the Thing value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ThingConnectionEdges) UserOrErr ¶
func (e ThingConnectionEdges) 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 ThingConnectionGroupBy ¶
type ThingConnectionGroupBy struct {
// contains filtered or unexported fields
}
ThingConnectionGroupBy is the group-by builder for ThingConnection entities.
func (*ThingConnectionGroupBy) Aggregate ¶
func (tcgb *ThingConnectionGroupBy) Aggregate(fns ...AggregateFunc) *ThingConnectionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ThingConnectionGroupBy) Bool ¶
func (tcgb *ThingConnectionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ThingConnectionGroupBy) BoolX ¶
func (tcgb *ThingConnectionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ThingConnectionGroupBy) Bools ¶
func (tcgb *ThingConnectionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*ThingConnectionGroupBy) BoolsX ¶
func (tcgb *ThingConnectionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ThingConnectionGroupBy) Float64 ¶
func (tcgb *ThingConnectionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ThingConnectionGroupBy) Float64X ¶
func (tcgb *ThingConnectionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ThingConnectionGroupBy) Float64s ¶
func (tcgb *ThingConnectionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*ThingConnectionGroupBy) Float64sX ¶
func (tcgb *ThingConnectionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ThingConnectionGroupBy) Int ¶
func (tcgb *ThingConnectionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ThingConnectionGroupBy) IntX ¶
func (tcgb *ThingConnectionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ThingConnectionGroupBy) Ints ¶
func (tcgb *ThingConnectionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*ThingConnectionGroupBy) IntsX ¶
func (tcgb *ThingConnectionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ThingConnectionGroupBy) Scan ¶
func (tcgb *ThingConnectionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ThingConnectionGroupBy) ScanX ¶
func (tcgb *ThingConnectionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ThingConnectionGroupBy) String ¶
func (tcgb *ThingConnectionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ThingConnectionGroupBy) StringX ¶
func (tcgb *ThingConnectionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ThingConnectionMutation ¶
type ThingConnectionMutation struct {
// contains filtered or unexported fields
}
ThingConnectionMutation represents an operation that mutates the ThingConnection nodes in the graph.
func (*ThingConnectionMutation) AddField ¶
func (m *ThingConnectionMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ThingConnectionMutation) AddedEdges ¶
func (m *ThingConnectionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ThingConnectionMutation) AddedField ¶
func (m *ThingConnectionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ThingConnectionMutation) AddedFields ¶
func (m *ThingConnectionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ThingConnectionMutation) AddedIDs ¶
func (m *ThingConnectionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ThingConnectionMutation) ClearEdge ¶
func (m *ThingConnectionMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*ThingConnectionMutation) ClearField ¶
func (m *ThingConnectionMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*ThingConnectionMutation) ClearThing ¶
func (m *ThingConnectionMutation) ClearThing()
ClearThing clears the "thing" edge to the Thing entity.
func (*ThingConnectionMutation) ClearUser ¶
func (m *ThingConnectionMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*ThingConnectionMutation) ClearedEdges ¶
func (m *ThingConnectionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ThingConnectionMutation) ClearedFields ¶
func (m *ThingConnectionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ThingConnectionMutation) Client ¶
func (m ThingConnectionMutation) 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 (*ThingConnectionMutation) EdgeCleared ¶
func (m *ThingConnectionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ThingConnectionMutation) EndTime ¶
func (m *ThingConnectionMutation) EndTime() (r string, exists bool)
EndTime returns the value of the "end_time" field in the mutation.
func (*ThingConnectionMutation) Field ¶
func (m *ThingConnectionMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ThingConnectionMutation) FieldCleared ¶
func (m *ThingConnectionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ThingConnectionMutation) Fields ¶
func (m *ThingConnectionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*ThingConnectionMutation) ID ¶
func (m *ThingConnectionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ThingConnectionMutation) OldEndTime ¶
func (m *ThingConnectionMutation) OldEndTime(ctx context.Context) (v string, err error)
OldEndTime returns the old "end_time" field's value of the ThingConnection entity. If the ThingConnection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ThingConnectionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ThingConnectionMutation) OldStartTime ¶
func (m *ThingConnectionMutation) OldStartTime(ctx context.Context) (v string, err error)
OldStartTime returns the old "start_time" field's value of the ThingConnection entity. If the ThingConnection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ThingConnectionMutation) Op ¶
func (m *ThingConnectionMutation) Op() Op
Op returns the operation name.
func (*ThingConnectionMutation) RemovedEdges ¶
func (m *ThingConnectionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ThingConnectionMutation) RemovedIDs ¶
func (m *ThingConnectionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*ThingConnectionMutation) ResetEdge ¶
func (m *ThingConnectionMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*ThingConnectionMutation) ResetEndTime ¶
func (m *ThingConnectionMutation) ResetEndTime()
ResetEndTime resets all changes to the "end_time" field.
func (*ThingConnectionMutation) ResetField ¶
func (m *ThingConnectionMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*ThingConnectionMutation) ResetStartTime ¶
func (m *ThingConnectionMutation) ResetStartTime()
ResetStartTime resets all changes to the "start_time" field.
func (*ThingConnectionMutation) ResetThing ¶
func (m *ThingConnectionMutation) ResetThing()
ResetThing resets all changes to the "thing" edge.
func (*ThingConnectionMutation) ResetUser ¶
func (m *ThingConnectionMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*ThingConnectionMutation) SetEndTime ¶
func (m *ThingConnectionMutation) SetEndTime(s string)
SetEndTime sets the "end_time" field.
func (*ThingConnectionMutation) SetField ¶
func (m *ThingConnectionMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ThingConnectionMutation) SetStartTime ¶
func (m *ThingConnectionMutation) SetStartTime(s string)
SetStartTime sets the "start_time" field.
func (*ThingConnectionMutation) SetThingID ¶
func (m *ThingConnectionMutation) SetThingID(id int)
SetThingID sets the "thing" edge to the Thing entity by id.
func (*ThingConnectionMutation) SetUserID ¶
func (m *ThingConnectionMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*ThingConnectionMutation) StartTime ¶
func (m *ThingConnectionMutation) StartTime() (r string, exists bool)
StartTime returns the value of the "start_time" field in the mutation.
func (*ThingConnectionMutation) ThingCleared ¶
func (m *ThingConnectionMutation) ThingCleared() bool
ThingCleared reports if the "thing" edge to the Thing entity was cleared.
func (*ThingConnectionMutation) ThingID ¶
func (m *ThingConnectionMutation) ThingID() (id int, exists bool)
ThingID returns the "thing" edge ID in the mutation.
func (*ThingConnectionMutation) ThingIDs ¶
func (m *ThingConnectionMutation) ThingIDs() (ids []int)
ThingIDs returns the "thing" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ThingID instead. It exists only for internal usage by the builders.
func (ThingConnectionMutation) Tx ¶
func (m ThingConnectionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ThingConnectionMutation) Type ¶
func (m *ThingConnectionMutation) Type() string
Type returns the node type of this mutation (ThingConnection).
func (*ThingConnectionMutation) UserCleared ¶
func (m *ThingConnectionMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*ThingConnectionMutation) UserID ¶
func (m *ThingConnectionMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*ThingConnectionMutation) UserIDs ¶
func (m *ThingConnectionMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*ThingConnectionMutation) Where ¶
func (m *ThingConnectionMutation) Where(ps ...predicate.ThingConnection)
Where appends a list predicates to the ThingConnectionMutation builder.
type ThingConnectionQuery ¶
type ThingConnectionQuery struct {
// contains filtered or unexported fields
}
ThingConnectionQuery is the builder for querying ThingConnection entities.
func (*ThingConnectionQuery) All ¶
func (tcq *ThingConnectionQuery) All(ctx context.Context) ([]*ThingConnection, error)
All executes the query and returns a list of ThingConnections.
func (*ThingConnectionQuery) AllX ¶
func (tcq *ThingConnectionQuery) AllX(ctx context.Context) []*ThingConnection
AllX is like All, but panics if an error occurs.
func (*ThingConnectionQuery) Clone ¶
func (tcq *ThingConnectionQuery) Clone() *ThingConnectionQuery
Clone returns a duplicate of the ThingConnectionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ThingConnectionQuery) Count ¶
func (tcq *ThingConnectionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ThingConnectionQuery) CountX ¶
func (tcq *ThingConnectionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ThingConnectionQuery) Exist ¶
func (tcq *ThingConnectionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ThingConnectionQuery) ExistX ¶
func (tcq *ThingConnectionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ThingConnectionQuery) First ¶
func (tcq *ThingConnectionQuery) First(ctx context.Context) (*ThingConnection, error)
First returns the first ThingConnection entity from the query. Returns a *NotFoundError when no ThingConnection was found.
func (*ThingConnectionQuery) FirstID ¶
func (tcq *ThingConnectionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ThingConnection ID from the query. Returns a *NotFoundError when no ThingConnection ID was found.
func (*ThingConnectionQuery) FirstIDX ¶
func (tcq *ThingConnectionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ThingConnectionQuery) FirstX ¶
func (tcq *ThingConnectionQuery) FirstX(ctx context.Context) *ThingConnection
FirstX is like First, but panics if an error occurs.
func (*ThingConnectionQuery) GroupBy ¶
func (tcq *ThingConnectionQuery) GroupBy(field string, fields ...string) *ThingConnectionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { StartTime string `json:"start_time,omitempty"` Count int `json:"count,omitempty"` } client.ThingConnection.Query(). GroupBy(thingconnection.FieldStartTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ThingConnectionQuery) IDs ¶
func (tcq *ThingConnectionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of ThingConnection IDs.
func (*ThingConnectionQuery) IDsX ¶
func (tcq *ThingConnectionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ThingConnectionQuery) Limit ¶
func (tcq *ThingConnectionQuery) Limit(limit int) *ThingConnectionQuery
Limit adds a limit step to the query.
func (*ThingConnectionQuery) Offset ¶
func (tcq *ThingConnectionQuery) Offset(offset int) *ThingConnectionQuery
Offset adds an offset step to the query.
func (*ThingConnectionQuery) Only ¶
func (tcq *ThingConnectionQuery) Only(ctx context.Context) (*ThingConnection, error)
Only returns a single ThingConnection entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one ThingConnection entity is not found. Returns a *NotFoundError when no ThingConnection entities are found.
func (*ThingConnectionQuery) OnlyID ¶
func (tcq *ThingConnectionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ThingConnection ID in the query. Returns a *NotSingularError when exactly one ThingConnection ID is not found. Returns a *NotFoundError when no entities are found.
func (*ThingConnectionQuery) OnlyIDX ¶
func (tcq *ThingConnectionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ThingConnectionQuery) OnlyX ¶
func (tcq *ThingConnectionQuery) OnlyX(ctx context.Context) *ThingConnection
OnlyX is like Only, but panics if an error occurs.
func (*ThingConnectionQuery) Order ¶
func (tcq *ThingConnectionQuery) Order(o ...OrderFunc) *ThingConnectionQuery
Order adds an order step to the query.
func (*ThingConnectionQuery) QueryThing ¶
func (tcq *ThingConnectionQuery) QueryThing() *ThingQuery
QueryThing chains the current query on the "thing" edge.
func (*ThingConnectionQuery) QueryUser ¶
func (tcq *ThingConnectionQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*ThingConnectionQuery) Select ¶
func (tcq *ThingConnectionQuery) Select(fields ...string) *ThingConnectionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { StartTime string `json:"start_time,omitempty"` } client.ThingConnection.Query(). Select(thingconnection.FieldStartTime). Scan(ctx, &v)
func (*ThingConnectionQuery) Unique ¶
func (tcq *ThingConnectionQuery) Unique(unique bool) *ThingConnectionQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ThingConnectionQuery) Where ¶
func (tcq *ThingConnectionQuery) Where(ps ...predicate.ThingConnection) *ThingConnectionQuery
Where adds a new predicate for the ThingConnectionQuery builder.
func (*ThingConnectionQuery) WithThing ¶
func (tcq *ThingConnectionQuery) WithThing(opts ...func(*ThingQuery)) *ThingConnectionQuery
WithThing tells the query-builder to eager-load the nodes that are connected to the "thing" edge. The optional arguments are used to configure the query builder of the edge.
func (*ThingConnectionQuery) WithUser ¶
func (tcq *ThingConnectionQuery) WithUser(opts ...func(*UserQuery)) *ThingConnectionQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type ThingConnectionSelect ¶
type ThingConnectionSelect struct { *ThingConnectionQuery // contains filtered or unexported fields }
ThingConnectionSelect is the builder for selecting fields of ThingConnection entities.
func (*ThingConnectionSelect) Bool ¶
func (tcs *ThingConnectionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ThingConnectionSelect) BoolX ¶
func (tcs *ThingConnectionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ThingConnectionSelect) Bools ¶
func (tcs *ThingConnectionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ThingConnectionSelect) BoolsX ¶
func (tcs *ThingConnectionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ThingConnectionSelect) Float64 ¶
func (tcs *ThingConnectionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ThingConnectionSelect) Float64X ¶
func (tcs *ThingConnectionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ThingConnectionSelect) Float64s ¶
func (tcs *ThingConnectionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ThingConnectionSelect) Float64sX ¶
func (tcs *ThingConnectionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ThingConnectionSelect) Int ¶
func (tcs *ThingConnectionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ThingConnectionSelect) IntX ¶
func (tcs *ThingConnectionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ThingConnectionSelect) Ints ¶
func (tcs *ThingConnectionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ThingConnectionSelect) IntsX ¶
func (tcs *ThingConnectionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ThingConnectionSelect) Scan ¶
func (tcs *ThingConnectionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ThingConnectionSelect) ScanX ¶
func (tcs *ThingConnectionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ThingConnectionSelect) String ¶
func (tcs *ThingConnectionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ThingConnectionSelect) StringX ¶
func (tcs *ThingConnectionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ThingConnectionUpdate ¶
type ThingConnectionUpdate struct {
// contains filtered or unexported fields
}
ThingConnectionUpdate is the builder for updating ThingConnection entities.
func (*ThingConnectionUpdate) ClearThing ¶
func (tcu *ThingConnectionUpdate) ClearThing() *ThingConnectionUpdate
ClearThing clears the "thing" edge to the Thing entity.
func (*ThingConnectionUpdate) ClearUser ¶
func (tcu *ThingConnectionUpdate) ClearUser() *ThingConnectionUpdate
ClearUser clears the "user" edge to the User entity.
func (*ThingConnectionUpdate) Exec ¶
func (tcu *ThingConnectionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ThingConnectionUpdate) ExecX ¶
func (tcu *ThingConnectionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThingConnectionUpdate) Mutation ¶
func (tcu *ThingConnectionUpdate) Mutation() *ThingConnectionMutation
Mutation returns the ThingConnectionMutation object of the builder.
func (*ThingConnectionUpdate) Save ¶
func (tcu *ThingConnectionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ThingConnectionUpdate) SaveX ¶
func (tcu *ThingConnectionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ThingConnectionUpdate) SetEndTime ¶
func (tcu *ThingConnectionUpdate) SetEndTime(s string) *ThingConnectionUpdate
SetEndTime sets the "end_time" field.
func (*ThingConnectionUpdate) SetNillableEndTime ¶
func (tcu *ThingConnectionUpdate) SetNillableEndTime(s *string) *ThingConnectionUpdate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*ThingConnectionUpdate) SetNillableStartTime ¶
func (tcu *ThingConnectionUpdate) SetNillableStartTime(s *string) *ThingConnectionUpdate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*ThingConnectionUpdate) SetStartTime ¶
func (tcu *ThingConnectionUpdate) SetStartTime(s string) *ThingConnectionUpdate
SetStartTime sets the "start_time" field.
func (*ThingConnectionUpdate) SetThing ¶
func (tcu *ThingConnectionUpdate) SetThing(t *Thing) *ThingConnectionUpdate
SetThing sets the "thing" edge to the Thing entity.
func (*ThingConnectionUpdate) SetThingID ¶
func (tcu *ThingConnectionUpdate) SetThingID(id int) *ThingConnectionUpdate
SetThingID sets the "thing" edge to the Thing entity by ID.
func (*ThingConnectionUpdate) SetUser ¶
func (tcu *ThingConnectionUpdate) SetUser(u *User) *ThingConnectionUpdate
SetUser sets the "user" edge to the User entity.
func (*ThingConnectionUpdate) SetUserID ¶
func (tcu *ThingConnectionUpdate) SetUserID(id int) *ThingConnectionUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*ThingConnectionUpdate) Where ¶
func (tcu *ThingConnectionUpdate) Where(ps ...predicate.ThingConnection) *ThingConnectionUpdate
Where appends a list predicates to the ThingConnectionUpdate builder.
type ThingConnectionUpdateOne ¶
type ThingConnectionUpdateOne struct {
// contains filtered or unexported fields
}
ThingConnectionUpdateOne is the builder for updating a single ThingConnection entity.
func (*ThingConnectionUpdateOne) ClearThing ¶
func (tcuo *ThingConnectionUpdateOne) ClearThing() *ThingConnectionUpdateOne
ClearThing clears the "thing" edge to the Thing entity.
func (*ThingConnectionUpdateOne) ClearUser ¶
func (tcuo *ThingConnectionUpdateOne) ClearUser() *ThingConnectionUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*ThingConnectionUpdateOne) Exec ¶
func (tcuo *ThingConnectionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ThingConnectionUpdateOne) ExecX ¶
func (tcuo *ThingConnectionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThingConnectionUpdateOne) Mutation ¶
func (tcuo *ThingConnectionUpdateOne) Mutation() *ThingConnectionMutation
Mutation returns the ThingConnectionMutation object of the builder.
func (*ThingConnectionUpdateOne) Save ¶
func (tcuo *ThingConnectionUpdateOne) Save(ctx context.Context) (*ThingConnection, error)
Save executes the query and returns the updated ThingConnection entity.
func (*ThingConnectionUpdateOne) SaveX ¶
func (tcuo *ThingConnectionUpdateOne) SaveX(ctx context.Context) *ThingConnection
SaveX is like Save, but panics if an error occurs.
func (*ThingConnectionUpdateOne) Select ¶
func (tcuo *ThingConnectionUpdateOne) Select(field string, fields ...string) *ThingConnectionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ThingConnectionUpdateOne) SetEndTime ¶
func (tcuo *ThingConnectionUpdateOne) SetEndTime(s string) *ThingConnectionUpdateOne
SetEndTime sets the "end_time" field.
func (*ThingConnectionUpdateOne) SetNillableEndTime ¶
func (tcuo *ThingConnectionUpdateOne) SetNillableEndTime(s *string) *ThingConnectionUpdateOne
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*ThingConnectionUpdateOne) SetNillableStartTime ¶
func (tcuo *ThingConnectionUpdateOne) SetNillableStartTime(s *string) *ThingConnectionUpdateOne
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*ThingConnectionUpdateOne) SetStartTime ¶
func (tcuo *ThingConnectionUpdateOne) SetStartTime(s string) *ThingConnectionUpdateOne
SetStartTime sets the "start_time" field.
func (*ThingConnectionUpdateOne) SetThing ¶
func (tcuo *ThingConnectionUpdateOne) SetThing(t *Thing) *ThingConnectionUpdateOne
SetThing sets the "thing" edge to the Thing entity.
func (*ThingConnectionUpdateOne) SetThingID ¶
func (tcuo *ThingConnectionUpdateOne) SetThingID(id int) *ThingConnectionUpdateOne
SetThingID sets the "thing" edge to the Thing entity by ID.
func (*ThingConnectionUpdateOne) SetUser ¶
func (tcuo *ThingConnectionUpdateOne) SetUser(u *User) *ThingConnectionUpdateOne
SetUser sets the "user" edge to the User entity.
func (*ThingConnectionUpdateOne) SetUserID ¶
func (tcuo *ThingConnectionUpdateOne) SetUserID(id int) *ThingConnectionUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type ThingConnections ¶
type ThingConnections []*ThingConnection
ThingConnections is a parsable slice of ThingConnection.
type ThingCreate ¶
type ThingCreate struct {
// contains filtered or unexported fields
}
ThingCreate is the builder for creating a Thing entity.
func (*ThingCreate) Exec ¶
func (tc *ThingCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ThingCreate) ExecX ¶
func (tc *ThingCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThingCreate) Mutation ¶
func (tc *ThingCreate) Mutation() *ThingMutation
Mutation returns the ThingMutation object of the builder.
func (*ThingCreate) Save ¶
func (tc *ThingCreate) Save(ctx context.Context) (*Thing, error)
Save creates the Thing in the database.
func (*ThingCreate) SaveX ¶
func (tc *ThingCreate) SaveX(ctx context.Context) *Thing
SaveX calls Save and panics if Save returns an error.
func (*ThingCreate) SetName ¶
func (tc *ThingCreate) SetName(s string) *ThingCreate
SetName sets the "name" field.
func (*ThingCreate) SetRoom ¶
func (tc *ThingCreate) SetRoom(r *Room) *ThingCreate
SetRoom sets the "room" edge to the Room entity.
func (*ThingCreate) SetRoomID ¶
func (tc *ThingCreate) SetRoomID(id int) *ThingCreate
SetRoomID sets the "room" edge to the Room entity by ID.
func (*ThingCreate) SetSecretKey ¶
func (tc *ThingCreate) SetSecretKey(u uuid.UUID) *ThingCreate
SetSecretKey sets the "secret_key" field.
func (*ThingCreate) SetUUID ¶
func (tc *ThingCreate) SetUUID(u uuid.UUID) *ThingCreate
SetUUID sets the "uuid" field.
type ThingCreateBulk ¶
type ThingCreateBulk struct {
// contains filtered or unexported fields
}
ThingCreateBulk is the builder for creating many Thing entities in bulk.
func (*ThingCreateBulk) Exec ¶
func (tcb *ThingCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ThingCreateBulk) ExecX ¶
func (tcb *ThingCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ThingDelete ¶
type ThingDelete struct {
// contains filtered or unexported fields
}
ThingDelete is the builder for deleting a Thing entity.
func (*ThingDelete) Exec ¶
func (td *ThingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ThingDelete) ExecX ¶
func (td *ThingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ThingDelete) Where ¶
func (td *ThingDelete) Where(ps ...predicate.Thing) *ThingDelete
Where appends a list predicates to the ThingDelete builder.
type ThingDeleteOne ¶
type ThingDeleteOne struct {
// contains filtered or unexported fields
}
ThingDeleteOne is the builder for deleting a single Thing entity.
func (*ThingDeleteOne) Exec ¶
func (tdo *ThingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ThingDeleteOne) ExecX ¶
func (tdo *ThingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ThingEdges ¶
type ThingEdges struct { // Room holds the value of the room edge. Room *Room `json:"room,omitempty"` // contains filtered or unexported fields }
ThingEdges holds the relations/edges for other nodes in the graph.
func (ThingEdges) RoomOrErr ¶
func (e ThingEdges) RoomOrErr() (*Room, error)
RoomOrErr returns the Room value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ThingGroupBy ¶
type ThingGroupBy struct {
// contains filtered or unexported fields
}
ThingGroupBy is the group-by builder for Thing entities.
func (*ThingGroupBy) Aggregate ¶
func (tgb *ThingGroupBy) Aggregate(fns ...AggregateFunc) *ThingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ThingGroupBy) Bool ¶
func (tgb *ThingGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ThingGroupBy) BoolX ¶
func (tgb *ThingGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ThingGroupBy) Bools ¶
func (tgb *ThingGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*ThingGroupBy) BoolsX ¶
func (tgb *ThingGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ThingGroupBy) Float64 ¶
func (tgb *ThingGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ThingGroupBy) Float64X ¶
func (tgb *ThingGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ThingGroupBy) Float64s ¶
func (tgb *ThingGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*ThingGroupBy) Float64sX ¶
func (tgb *ThingGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ThingGroupBy) Int ¶
func (tgb *ThingGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ThingGroupBy) IntX ¶
func (tgb *ThingGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ThingGroupBy) Ints ¶
func (tgb *ThingGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*ThingGroupBy) IntsX ¶
func (tgb *ThingGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ThingGroupBy) Scan ¶
func (tgb *ThingGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ThingGroupBy) ScanX ¶
func (tgb *ThingGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ThingGroupBy) String ¶
func (tgb *ThingGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ThingGroupBy) StringX ¶
func (tgb *ThingGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ThingMutation ¶
type ThingMutation struct {
// contains filtered or unexported fields
}
ThingMutation represents an operation that mutates the Thing nodes in the graph.
func (*ThingMutation) AddField ¶
func (m *ThingMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ThingMutation) AddedEdges ¶
func (m *ThingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ThingMutation) AddedField ¶
func (m *ThingMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ThingMutation) AddedFields ¶
func (m *ThingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ThingMutation) AddedIDs ¶
func (m *ThingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ThingMutation) ClearEdge ¶
func (m *ThingMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*ThingMutation) ClearField ¶
func (m *ThingMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*ThingMutation) ClearRoom ¶
func (m *ThingMutation) ClearRoom()
ClearRoom clears the "room" edge to the Room entity.
func (*ThingMutation) ClearedEdges ¶
func (m *ThingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ThingMutation) ClearedFields ¶
func (m *ThingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ThingMutation) Client ¶
func (m ThingMutation) 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 (*ThingMutation) EdgeCleared ¶
func (m *ThingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ThingMutation) Field ¶
func (m *ThingMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ThingMutation) FieldCleared ¶
func (m *ThingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ThingMutation) Fields ¶
func (m *ThingMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*ThingMutation) ID ¶
func (m *ThingMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ThingMutation) Name ¶
func (m *ThingMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ThingMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ThingMutation) OldName ¶
func (m *ThingMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Thing entity. If the Thing object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ThingMutation) OldSecretKey ¶
OldSecretKey returns the old "secret_key" field's value of the Thing entity. If the Thing object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ThingMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the Thing entity. If the Thing object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ThingMutation) RemovedEdges ¶
func (m *ThingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ThingMutation) RemovedIDs ¶
func (m *ThingMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*ThingMutation) ResetEdge ¶
func (m *ThingMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*ThingMutation) ResetField ¶
func (m *ThingMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*ThingMutation) ResetName ¶
func (m *ThingMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ThingMutation) ResetRoom ¶
func (m *ThingMutation) ResetRoom()
ResetRoom resets all changes to the "room" edge.
func (*ThingMutation) ResetSecretKey ¶
func (m *ThingMutation) ResetSecretKey()
ResetSecretKey resets all changes to the "secret_key" field.
func (*ThingMutation) ResetUUID ¶
func (m *ThingMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*ThingMutation) RoomCleared ¶
func (m *ThingMutation) RoomCleared() bool
RoomCleared reports if the "room" edge to the Room entity was cleared.
func (*ThingMutation) RoomID ¶
func (m *ThingMutation) RoomID() (id int, exists bool)
RoomID returns the "room" edge ID in the mutation.
func (*ThingMutation) RoomIDs ¶
func (m *ThingMutation) RoomIDs() (ids []int)
RoomIDs returns the "room" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoomID instead. It exists only for internal usage by the builders.
func (*ThingMutation) SecretKey ¶
func (m *ThingMutation) SecretKey() (r uuid.UUID, exists bool)
SecretKey returns the value of the "secret_key" field in the mutation.
func (*ThingMutation) SetField ¶
func (m *ThingMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ThingMutation) SetName ¶
func (m *ThingMutation) SetName(s string)
SetName sets the "name" field.
func (*ThingMutation) SetRoomID ¶
func (m *ThingMutation) SetRoomID(id int)
SetRoomID sets the "room" edge to the Room entity by id.
func (*ThingMutation) SetSecretKey ¶
func (m *ThingMutation) SetSecretKey(u uuid.UUID)
SetSecretKey sets the "secret_key" field.
func (*ThingMutation) SetUUID ¶
func (m *ThingMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (ThingMutation) Tx ¶
func (m ThingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ThingMutation) Type ¶
func (m *ThingMutation) Type() string
Type returns the node type of this mutation (Thing).
func (*ThingMutation) UUID ¶
func (m *ThingMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*ThingMutation) Where ¶
func (m *ThingMutation) Where(ps ...predicate.Thing)
Where appends a list predicates to the ThingMutation builder.
type ThingQuery ¶
type ThingQuery struct {
// contains filtered or unexported fields
}
ThingQuery is the builder for querying Thing entities.
func (*ThingQuery) All ¶
func (tq *ThingQuery) All(ctx context.Context) ([]*Thing, error)
All executes the query and returns a list of Things.
func (*ThingQuery) AllX ¶
func (tq *ThingQuery) AllX(ctx context.Context) []*Thing
AllX is like All, but panics if an error occurs.
func (*ThingQuery) Clone ¶
func (tq *ThingQuery) Clone() *ThingQuery
Clone returns a duplicate of the ThingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ThingQuery) Count ¶
func (tq *ThingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ThingQuery) CountX ¶
func (tq *ThingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ThingQuery) Exist ¶
func (tq *ThingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ThingQuery) ExistX ¶
func (tq *ThingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ThingQuery) First ¶
func (tq *ThingQuery) First(ctx context.Context) (*Thing, error)
First returns the first Thing entity from the query. Returns a *NotFoundError when no Thing was found.
func (*ThingQuery) FirstID ¶
func (tq *ThingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Thing ID from the query. Returns a *NotFoundError when no Thing ID was found.
func (*ThingQuery) FirstIDX ¶
func (tq *ThingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ThingQuery) FirstX ¶
func (tq *ThingQuery) FirstX(ctx context.Context) *Thing
FirstX is like First, but panics if an error occurs.
func (*ThingQuery) GroupBy ¶
func (tq *ThingQuery) GroupBy(field string, fields ...string) *ThingGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` Count int `json:"count,omitempty"` } client.Thing.Query(). GroupBy(thing.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ThingQuery) IDs ¶
func (tq *ThingQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Thing IDs.
func (*ThingQuery) IDsX ¶
func (tq *ThingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ThingQuery) Limit ¶
func (tq *ThingQuery) Limit(limit int) *ThingQuery
Limit adds a limit step to the query.
func (*ThingQuery) Offset ¶
func (tq *ThingQuery) Offset(offset int) *ThingQuery
Offset adds an offset step to the query.
func (*ThingQuery) Only ¶
func (tq *ThingQuery) Only(ctx context.Context) (*Thing, error)
Only returns a single Thing entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Thing entity is not found. Returns a *NotFoundError when no Thing entities are found.
func (*ThingQuery) OnlyID ¶
func (tq *ThingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Thing ID in the query. Returns a *NotSingularError when exactly one Thing ID is not found. Returns a *NotFoundError when no entities are found.
func (*ThingQuery) OnlyIDX ¶
func (tq *ThingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ThingQuery) OnlyX ¶
func (tq *ThingQuery) OnlyX(ctx context.Context) *Thing
OnlyX is like Only, but panics if an error occurs.
func (*ThingQuery) Order ¶
func (tq *ThingQuery) Order(o ...OrderFunc) *ThingQuery
Order adds an order step to the query.
func (*ThingQuery) QueryRoom ¶
func (tq *ThingQuery) QueryRoom() *RoomQuery
QueryRoom chains the current query on the "room" edge.
func (*ThingQuery) Select ¶
func (tq *ThingQuery) Select(fields ...string) *ThingSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` } client.Thing.Query(). Select(thing.FieldUUID). Scan(ctx, &v)
func (*ThingQuery) Unique ¶
func (tq *ThingQuery) Unique(unique bool) *ThingQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ThingQuery) Where ¶
func (tq *ThingQuery) Where(ps ...predicate.Thing) *ThingQuery
Where adds a new predicate for the ThingQuery builder.
func (*ThingQuery) WithRoom ¶
func (tq *ThingQuery) WithRoom(opts ...func(*RoomQuery)) *ThingQuery
WithRoom tells the query-builder to eager-load the nodes that are connected to the "room" edge. The optional arguments are used to configure the query builder of the edge.
type ThingSelect ¶
type ThingSelect struct { *ThingQuery // contains filtered or unexported fields }
ThingSelect is the builder for selecting fields of Thing entities.
func (*ThingSelect) Bool ¶
func (ts *ThingSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ThingSelect) BoolX ¶
func (ts *ThingSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ThingSelect) Bools ¶
func (ts *ThingSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ThingSelect) BoolsX ¶
func (ts *ThingSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ThingSelect) Float64 ¶
func (ts *ThingSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ThingSelect) Float64X ¶
func (ts *ThingSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ThingSelect) Float64s ¶
func (ts *ThingSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ThingSelect) Float64sX ¶
func (ts *ThingSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ThingSelect) Int ¶
func (ts *ThingSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ThingSelect) IntX ¶
func (ts *ThingSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ThingSelect) Ints ¶
func (ts *ThingSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ThingSelect) IntsX ¶
func (ts *ThingSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ThingSelect) Scan ¶
func (ts *ThingSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ThingSelect) ScanX ¶
func (ts *ThingSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ThingSelect) String ¶
func (ts *ThingSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ThingSelect) StringX ¶
func (ts *ThingSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ThingUpdate ¶
type ThingUpdate struct {
// contains filtered or unexported fields
}
ThingUpdate is the builder for updating Thing entities.
func (*ThingUpdate) ClearRoom ¶
func (tu *ThingUpdate) ClearRoom() *ThingUpdate
ClearRoom clears the "room" edge to the Room entity.
func (*ThingUpdate) Exec ¶
func (tu *ThingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ThingUpdate) ExecX ¶
func (tu *ThingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThingUpdate) Mutation ¶
func (tu *ThingUpdate) Mutation() *ThingMutation
Mutation returns the ThingMutation object of the builder.
func (*ThingUpdate) Save ¶
func (tu *ThingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ThingUpdate) SaveX ¶
func (tu *ThingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ThingUpdate) SetName ¶
func (tu *ThingUpdate) SetName(s string) *ThingUpdate
SetName sets the "name" field.
func (*ThingUpdate) SetRoom ¶
func (tu *ThingUpdate) SetRoom(r *Room) *ThingUpdate
SetRoom sets the "room" edge to the Room entity.
func (*ThingUpdate) SetRoomID ¶
func (tu *ThingUpdate) SetRoomID(id int) *ThingUpdate
SetRoomID sets the "room" edge to the Room entity by ID.
func (*ThingUpdate) SetSecretKey ¶
func (tu *ThingUpdate) SetSecretKey(u uuid.UUID) *ThingUpdate
SetSecretKey sets the "secret_key" field.
func (*ThingUpdate) Where ¶
func (tu *ThingUpdate) Where(ps ...predicate.Thing) *ThingUpdate
Where appends a list predicates to the ThingUpdate builder.
type ThingUpdateOne ¶
type ThingUpdateOne struct {
// contains filtered or unexported fields
}
ThingUpdateOne is the builder for updating a single Thing entity.
func (*ThingUpdateOne) ClearRoom ¶
func (tuo *ThingUpdateOne) ClearRoom() *ThingUpdateOne
ClearRoom clears the "room" edge to the Room entity.
func (*ThingUpdateOne) Exec ¶
func (tuo *ThingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ThingUpdateOne) ExecX ¶
func (tuo *ThingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThingUpdateOne) Mutation ¶
func (tuo *ThingUpdateOne) Mutation() *ThingMutation
Mutation returns the ThingMutation object of the builder.
func (*ThingUpdateOne) Save ¶
func (tuo *ThingUpdateOne) Save(ctx context.Context) (*Thing, error)
Save executes the query and returns the updated Thing entity.
func (*ThingUpdateOne) SaveX ¶
func (tuo *ThingUpdateOne) SaveX(ctx context.Context) *Thing
SaveX is like Save, but panics if an error occurs.
func (*ThingUpdateOne) Select ¶
func (tuo *ThingUpdateOne) Select(field string, fields ...string) *ThingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ThingUpdateOne) SetName ¶
func (tuo *ThingUpdateOne) SetName(s string) *ThingUpdateOne
SetName sets the "name" field.
func (*ThingUpdateOne) SetRoom ¶
func (tuo *ThingUpdateOne) SetRoom(r *Room) *ThingUpdateOne
SetRoom sets the "room" edge to the Room entity.
func (*ThingUpdateOne) SetRoomID ¶
func (tuo *ThingUpdateOne) SetRoomID(id int) *ThingUpdateOne
SetRoomID sets the "room" edge to the Room entity by ID.
func (*ThingUpdateOne) SetSecretKey ¶
func (tuo *ThingUpdateOne) SetSecretKey(u uuid.UUID) *ThingUpdateOne
SetSecretKey sets the "secret_key" field.
type Tx ¶
type Tx struct { // App is the client for interacting with the App builders. App *AppClient // Home is the client for interacting with the Home builders. Home *HomeClient // HomeConnection is the client for interacting with the HomeConnection builders. HomeConnection *HomeConnectionClient // Room is the client for interacting with the Room builders. Room *RoomClient // RoomConnection is the client for interacting with the RoomConnection builders. RoomConnection *RoomConnectionClient // Thing is the client for interacting with the Thing builders. Thing *ThingClient // ThingConnection is the client for interacting with the ThingConnection builders. ThingConnection *ThingConnectionClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "uuid" field. UUID uuid.UUID `json:"uuid,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // AccessKey holds the value of the "access_key" field. AccessKey uuid.UUID `json:"access_key,omitempty"` // SecretKey holds the value of the "secret_key" field. SecretKey uuid.UUID `json:"secret_key,omitempty"` // SuperUser holds the value of the "super_user" field. SuperUser bool `json:"super_user,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) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a 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) QueryApps ¶
func (c *UserClient) QueryApps(u *User) *AppQuery
QueryApps queries the apps edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddAppIDs ¶
func (uc *UserCreate) AddAppIDs(ids ...int) *UserCreate
AddAppIDs adds the "apps" edge to the App entity by IDs.
func (*UserCreate) AddApps ¶
func (uc *UserCreate) AddApps(a ...*App) *UserCreate
AddApps adds the "apps" edges to the App entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAccessKey ¶
func (uc *UserCreate) SetAccessKey(u uuid.UUID) *UserCreate
SetAccessKey sets the "access_key" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetSecretKey ¶
func (uc *UserCreate) SetSecretKey(u uuid.UUID) *UserCreate
SetSecretKey sets the "secret_key" field.
func (*UserCreate) SetSuperUser ¶
func (uc *UserCreate) SetSuperUser(b bool) *UserCreate
SetSuperUser sets the "super_user" field.
func (*UserCreate) SetUUID ¶
func (uc *UserCreate) SetUUID(u uuid.UUID) *UserCreate
SetUUID sets the "uuid" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct { // Apps holds the value of the apps edge. Apps []*App `json:"apps,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 scans 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 a group-by query. It is only allowed when executing a group-by query 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 mutates the User nodes in the graph.
func (*UserMutation) AccessKey ¶
func (m *UserMutation) AccessKey() (r uuid.UUID, exists bool)
AccessKey returns the value of the "access_key" field in the mutation.
func (*UserMutation) AddAppIDs ¶
func (m *UserMutation) AddAppIDs(ids ...int)
AddAppIDs adds the "apps" edge to the App entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AppsCleared ¶
func (m *UserMutation) AppsCleared() bool
AppsCleared reports if the "apps" edge to the App entity was cleared.
func (*UserMutation) AppsIDs ¶
func (m *UserMutation) AppsIDs() (ids []int)
AppsIDs returns the "apps" edge IDs in the mutation.
func (*UserMutation) ClearApps ¶
func (m *UserMutation) ClearApps()
ClearApps clears the "apps" edge to the App entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) 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) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldAccessKey ¶
OldAccessKey returns the old "access_key" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldSecretKey ¶
OldSecretKey returns the old "secret_key" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldSuperUser ¶
func (m *UserMutation) OldSuperUser(ctx context.Context) (v bool, err error)
OldSuperUser returns the old "super_user" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemoveAppIDs ¶
func (m *UserMutation) RemoveAppIDs(ids ...int)
RemoveAppIDs removes the "apps" edge to the App entity by IDs.
func (*UserMutation) RemovedAppsIDs ¶
func (m *UserMutation) RemovedAppsIDs() (ids []int)
RemovedApps returns the removed IDs of the "apps" edge to the App entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) ResetAccessKey ¶
func (m *UserMutation) ResetAccessKey()
ResetAccessKey resets all changes to the "access_key" field.
func (*UserMutation) ResetApps ¶
func (m *UserMutation) ResetApps()
ResetApps resets all changes to the "apps" edge.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetSecretKey ¶
func (m *UserMutation) ResetSecretKey()
ResetSecretKey resets all changes to the "secret_key" field.
func (*UserMutation) ResetSuperUser ¶
func (m *UserMutation) ResetSuperUser()
ResetSuperUser resets all changes to the "super_user" field.
func (*UserMutation) ResetUUID ¶
func (m *UserMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*UserMutation) SecretKey ¶
func (m *UserMutation) SecretKey() (r uuid.UUID, exists bool)
SecretKey returns the value of the "secret_key" field in the mutation.
func (*UserMutation) SetAccessKey ¶
func (m *UserMutation) SetAccessKey(u uuid.UUID)
SetAccessKey sets the "access_key" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) 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) SetSecretKey ¶
func (m *UserMutation) SetSecretKey(u uuid.UUID)
SetSecretKey sets the "secret_key" field.
func (*UserMutation) SetSuperUser ¶
func (m *UserMutation) SetSuperUser(b bool)
SetSuperUser sets the "super_user" field.
func (*UserMutation) SetUUID ¶
func (m *UserMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (*UserMutation) SuperUser ¶
func (m *UserMutation) SuperUser() (r bool, exists bool)
SuperUser returns the value of the "super_user" field in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UUID ¶
func (m *UserMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one User entity is not found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when exactly one User ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UUID uuid.UUID `json:"uuid,omitempty"` } client.User.Query(). Select(user.FieldUUID). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a 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 a 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 a 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 a 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 a 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 a 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 scans 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 a 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) AddAppIDs ¶
func (uu *UserUpdate) AddAppIDs(ids ...int) *UserUpdate
AddAppIDs adds the "apps" edge to the App entity by IDs.
func (*UserUpdate) AddApps ¶
func (uu *UserUpdate) AddApps(a ...*App) *UserUpdate
AddApps adds the "apps" edges to the App entity.
func (*UserUpdate) ClearApps ¶
func (uu *UserUpdate) ClearApps() *UserUpdate
ClearApps clears all "apps" edges to the App entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveAppIDs ¶
func (uu *UserUpdate) RemoveAppIDs(ids ...int) *UserUpdate
RemoveAppIDs removes the "apps" edge to App entities by IDs.
func (*UserUpdate) RemoveApps ¶
func (uu *UserUpdate) RemoveApps(a ...*App) *UserUpdate
RemoveApps removes "apps" edges to App entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAccessKey ¶
func (uu *UserUpdate) SetAccessKey(u uuid.UUID) *UserUpdate
SetAccessKey sets the "access_key" field.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetSecretKey ¶
func (uu *UserUpdate) SetSecretKey(u uuid.UUID) *UserUpdate
SetSecretKey sets the "secret_key" field.
func (*UserUpdate) SetSuperUser ¶
func (uu *UserUpdate) SetSuperUser(b bool) *UserUpdate
SetSuperUser sets the "super_user" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddAppIDs ¶
func (uuo *UserUpdateOne) AddAppIDs(ids ...int) *UserUpdateOne
AddAppIDs adds the "apps" edge to the App entity by IDs.
func (*UserUpdateOne) AddApps ¶
func (uuo *UserUpdateOne) AddApps(a ...*App) *UserUpdateOne
AddApps adds the "apps" edges to the App entity.
func (*UserUpdateOne) ClearApps ¶
func (uuo *UserUpdateOne) ClearApps() *UserUpdateOne
ClearApps clears all "apps" edges to the App entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveAppIDs ¶
func (uuo *UserUpdateOne) RemoveAppIDs(ids ...int) *UserUpdateOne
RemoveAppIDs removes the "apps" edge to App entities by IDs.
func (*UserUpdateOne) RemoveApps ¶
func (uuo *UserUpdateOne) RemoveApps(a ...*App) *UserUpdateOne
RemoveApps removes "apps" edges to App entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAccessKey ¶
func (uuo *UserUpdateOne) SetAccessKey(u uuid.UUID) *UserUpdateOne
SetAccessKey sets the "access_key" field.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetSecretKey ¶
func (uuo *UserUpdateOne) SetSecretKey(u uuid.UUID) *UserUpdateOne
SetSecretKey sets the "secret_key" field.
func (*UserUpdateOne) SetSuperUser ¶
func (uuo *UserUpdateOne) SetSuperUser(b bool) *UserUpdateOne
SetSuperUser sets the "super_user" 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
¶
- app.go
- app_create.go
- app_delete.go
- app_query.go
- app_update.go
- client.go
- config.go
- context.go
- ent.go
- generate.go
- home.go
- home_create.go
- home_delete.go
- home_query.go
- home_update.go
- homeconnection.go
- homeconnection_create.go
- homeconnection_delete.go
- homeconnection_query.go
- homeconnection_update.go
- mutation.go
- room.go
- room_create.go
- room_delete.go
- room_query.go
- room_update.go
- roomconnection.go
- roomconnection_create.go
- roomconnection_delete.go
- roomconnection_query.go
- roomconnection_update.go
- runtime.go
- thing.go
- thing_create.go
- thing_delete.go
- thing_query.go
- thing_update.go
- thingconnection.go
- thingconnection_create.go
- thingconnection_delete.go
- thingconnection_query.go
- thingconnection_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go