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 Biographies
- type Biography
- type BiographyClient
- func (c *BiographyClient) Create() *BiographyCreate
- func (c *BiographyClient) CreateBulk(builders ...*BiographyCreate) *BiographyCreateBulk
- func (c *BiographyClient) Delete() *BiographyDelete
- func (c *BiographyClient) DeleteOne(b *Biography) *BiographyDeleteOne
- func (c *BiographyClient) DeleteOneID(id uint32) *BiographyDeleteOne
- func (c *BiographyClient) Get(ctx context.Context, id uint32) (*Biography, error)
- func (c *BiographyClient) GetX(ctx context.Context, id uint32) *Biography
- func (c *BiographyClient) Hooks() []Hook
- func (c *BiographyClient) Intercept(interceptors ...Interceptor)
- func (c *BiographyClient) Interceptors() []Interceptor
- func (c *BiographyClient) Query() *BiographyQuery
- func (c *BiographyClient) Update() *BiographyUpdate
- func (c *BiographyClient) UpdateOne(b *Biography) *BiographyUpdateOne
- func (c *BiographyClient) UpdateOneID(id uint32) *BiographyUpdateOne
- func (c *BiographyClient) Use(hooks ...Hook)
- type BiographyCreate
- func (bc *BiographyCreate) Exec(ctx context.Context) error
- func (bc *BiographyCreate) ExecX(ctx context.Context)
- func (bc *BiographyCreate) Mutation() *BiographyMutation
- func (bc *BiographyCreate) Save(ctx context.Context) (*Biography, error)
- func (bc *BiographyCreate) SaveX(ctx context.Context) *Biography
- func (bc *BiographyCreate) SetCreated(t time.Time) *BiographyCreate
- func (bc *BiographyCreate) SetID(u uint32) *BiographyCreate
- func (bc *BiographyCreate) SetIsPublic(b bool) *BiographyCreate
- func (bc *BiographyCreate) SetJoin(t time.Time) *BiographyCreate
- func (bc *BiographyCreate) SetLeave(t time.Time) *BiographyCreate
- func (bc *BiographyCreate) SetLocationID(u uint32) *BiographyCreate
- func (bc *BiographyCreate) SetModified(t time.Time) *BiographyCreate
- func (bc *BiographyCreate) SetNillableCreated(t *time.Time) *BiographyCreate
- func (bc *BiographyCreate) SetNillableIsPublic(b *bool) *BiographyCreate
- func (bc *BiographyCreate) SetNillableLeave(t *time.Time) *BiographyCreate
- func (bc *BiographyCreate) SetNillableModified(t *time.Time) *BiographyCreate
- func (bc *BiographyCreate) SetPosition(s string) *BiographyCreate
- func (bc *BiographyCreate) SetPositionJa(s string) *BiographyCreate
- func (bc *BiographyCreate) SetUserID(u uint32) *BiographyCreate
- type BiographyCreateBulk
- type BiographyDelete
- type BiographyDeleteOne
- type BiographyGroupBy
- func (bgb *BiographyGroupBy) Aggregate(fns ...AggregateFunc) *BiographyGroupBy
- func (s *BiographyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BiographyGroupBy) BoolX(ctx context.Context) bool
- func (s *BiographyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BiographyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BiographyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BiographyGroupBy) Float64X(ctx context.Context) float64
- func (s *BiographyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BiographyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BiographyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BiographyGroupBy) IntX(ctx context.Context) int
- func (s *BiographyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BiographyGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BiographyGroupBy) Scan(ctx context.Context, v any) error
- func (s *BiographyGroupBy) ScanX(ctx context.Context, v any)
- func (s *BiographyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BiographyGroupBy) StringX(ctx context.Context) string
- func (s *BiographyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BiographyGroupBy) StringsX(ctx context.Context) []string
- type BiographyMutation
- func (m *BiographyMutation) AddField(name string, value ent.Value) error
- func (m *BiographyMutation) AddLocationID(u int32)
- func (m *BiographyMutation) AddUserID(u int32)
- func (m *BiographyMutation) AddedEdges() []string
- func (m *BiographyMutation) AddedField(name string) (ent.Value, bool)
- func (m *BiographyMutation) AddedFields() []string
- func (m *BiographyMutation) AddedIDs(name string) []ent.Value
- func (m *BiographyMutation) AddedLocationID() (r int32, exists bool)
- func (m *BiographyMutation) AddedUserID() (r int32, exists bool)
- func (m *BiographyMutation) ClearEdge(name string) error
- func (m *BiographyMutation) ClearField(name string) error
- func (m *BiographyMutation) ClearLeave()
- func (m *BiographyMutation) ClearedEdges() []string
- func (m *BiographyMutation) ClearedFields() []string
- func (m BiographyMutation) Client() *Client
- func (m *BiographyMutation) Created() (r time.Time, exists bool)
- func (m *BiographyMutation) EdgeCleared(name string) bool
- func (m *BiographyMutation) Field(name string) (ent.Value, bool)
- func (m *BiographyMutation) FieldCleared(name string) bool
- func (m *BiographyMutation) Fields() []string
- func (m *BiographyMutation) ID() (id uint32, exists bool)
- func (m *BiographyMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *BiographyMutation) IsPublic() (r bool, exists bool)
- func (m *BiographyMutation) Join() (r time.Time, exists bool)
- func (m *BiographyMutation) Leave() (r time.Time, exists bool)
- func (m *BiographyMutation) LeaveCleared() bool
- func (m *BiographyMutation) LocationID() (r uint32, exists bool)
- func (m *BiographyMutation) Modified() (r time.Time, exists bool)
- func (m *BiographyMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *BiographyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BiographyMutation) OldIsPublic(ctx context.Context) (v bool, err error)
- func (m *BiographyMutation) OldJoin(ctx context.Context) (v time.Time, err error)
- func (m *BiographyMutation) OldLeave(ctx context.Context) (v time.Time, err error)
- func (m *BiographyMutation) OldLocationID(ctx context.Context) (v uint32, err error)
- func (m *BiographyMutation) OldModified(ctx context.Context) (v time.Time, err error)
- func (m *BiographyMutation) OldPosition(ctx context.Context) (v string, err error)
- func (m *BiographyMutation) OldPositionJa(ctx context.Context) (v string, err error)
- func (m *BiographyMutation) OldUserID(ctx context.Context) (v uint32, err error)
- func (m *BiographyMutation) Op() Op
- func (m *BiographyMutation) Position() (r string, exists bool)
- func (m *BiographyMutation) PositionJa() (r string, exists bool)
- func (m *BiographyMutation) RemovedEdges() []string
- func (m *BiographyMutation) RemovedIDs(name string) []ent.Value
- func (m *BiographyMutation) ResetCreated()
- func (m *BiographyMutation) ResetEdge(name string) error
- func (m *BiographyMutation) ResetField(name string) error
- func (m *BiographyMutation) ResetIsPublic()
- func (m *BiographyMutation) ResetJoin()
- func (m *BiographyMutation) ResetLeave()
- func (m *BiographyMutation) ResetLocationID()
- func (m *BiographyMutation) ResetModified()
- func (m *BiographyMutation) ResetPosition()
- func (m *BiographyMutation) ResetPositionJa()
- func (m *BiographyMutation) ResetUserID()
- func (m *BiographyMutation) SetCreated(t time.Time)
- func (m *BiographyMutation) SetField(name string, value ent.Value) error
- func (m *BiographyMutation) SetID(id uint32)
- func (m *BiographyMutation) SetIsPublic(b bool)
- func (m *BiographyMutation) SetJoin(t time.Time)
- func (m *BiographyMutation) SetLeave(t time.Time)
- func (m *BiographyMutation) SetLocationID(u uint32)
- func (m *BiographyMutation) SetModified(t time.Time)
- func (m *BiographyMutation) SetOp(op Op)
- func (m *BiographyMutation) SetPosition(s string)
- func (m *BiographyMutation) SetPositionJa(s string)
- func (m *BiographyMutation) SetUserID(u uint32)
- func (m BiographyMutation) Tx() (*Tx, error)
- func (m *BiographyMutation) Type() string
- func (m *BiographyMutation) UserID() (r uint32, exists bool)
- func (m *BiographyMutation) Where(ps ...predicate.Biography)
- func (m *BiographyMutation) WhereP(ps ...func(*sql.Selector))
- type BiographyQuery
- func (bq *BiographyQuery) Aggregate(fns ...AggregateFunc) *BiographySelect
- func (bq *BiographyQuery) All(ctx context.Context) ([]*Biography, error)
- func (bq *BiographyQuery) AllX(ctx context.Context) []*Biography
- func (bq *BiographyQuery) Clone() *BiographyQuery
- func (bq *BiographyQuery) Count(ctx context.Context) (int, error)
- func (bq *BiographyQuery) CountX(ctx context.Context) int
- func (bq *BiographyQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BiographyQuery) ExistX(ctx context.Context) bool
- func (bq *BiographyQuery) First(ctx context.Context) (*Biography, error)
- func (bq *BiographyQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (bq *BiographyQuery) FirstIDX(ctx context.Context) uint32
- func (bq *BiographyQuery) FirstX(ctx context.Context) *Biography
- func (bq *BiographyQuery) GroupBy(field string, fields ...string) *BiographyGroupBy
- func (bq *BiographyQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (bq *BiographyQuery) IDsX(ctx context.Context) []uint32
- func (bq *BiographyQuery) Limit(limit int) *BiographyQuery
- func (bq *BiographyQuery) Offset(offset int) *BiographyQuery
- func (bq *BiographyQuery) Only(ctx context.Context) (*Biography, error)
- func (bq *BiographyQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (bq *BiographyQuery) OnlyIDX(ctx context.Context) uint32
- func (bq *BiographyQuery) OnlyX(ctx context.Context) *Biography
- func (bq *BiographyQuery) Order(o ...OrderFunc) *BiographyQuery
- func (bq *BiographyQuery) Select(fields ...string) *BiographySelect
- func (bq *BiographyQuery) Unique(unique bool) *BiographyQuery
- func (bq *BiographyQuery) Where(ps ...predicate.Biography) *BiographyQuery
- type BiographySelect
- func (bs *BiographySelect) Aggregate(fns ...AggregateFunc) *BiographySelect
- func (s *BiographySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BiographySelect) BoolX(ctx context.Context) bool
- func (s *BiographySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BiographySelect) BoolsX(ctx context.Context) []bool
- func (s *BiographySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BiographySelect) Float64X(ctx context.Context) float64
- func (s *BiographySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BiographySelect) Float64sX(ctx context.Context) []float64
- func (s *BiographySelect) Int(ctx context.Context) (_ int, err error)
- func (s *BiographySelect) IntX(ctx context.Context) int
- func (s *BiographySelect) Ints(ctx context.Context) ([]int, error)
- func (s *BiographySelect) IntsX(ctx context.Context) []int
- func (bs *BiographySelect) Scan(ctx context.Context, v any) error
- func (s *BiographySelect) ScanX(ctx context.Context, v any)
- func (s *BiographySelect) String(ctx context.Context) (_ string, err error)
- func (s *BiographySelect) StringX(ctx context.Context) string
- func (s *BiographySelect) Strings(ctx context.Context) ([]string, error)
- func (s *BiographySelect) StringsX(ctx context.Context) []string
- type BiographyUpdate
- func (bu *BiographyUpdate) AddLocationID(u int32) *BiographyUpdate
- func (bu *BiographyUpdate) AddUserID(u int32) *BiographyUpdate
- func (bu *BiographyUpdate) ClearLeave() *BiographyUpdate
- func (bu *BiographyUpdate) Exec(ctx context.Context) error
- func (bu *BiographyUpdate) ExecX(ctx context.Context)
- func (bu *BiographyUpdate) Mutation() *BiographyMutation
- func (bu *BiographyUpdate) Save(ctx context.Context) (int, error)
- func (bu *BiographyUpdate) SaveX(ctx context.Context) int
- func (bu *BiographyUpdate) SetCreated(t time.Time) *BiographyUpdate
- func (bu *BiographyUpdate) SetIsPublic(b bool) *BiographyUpdate
- func (bu *BiographyUpdate) SetJoin(t time.Time) *BiographyUpdate
- func (bu *BiographyUpdate) SetLeave(t time.Time) *BiographyUpdate
- func (bu *BiographyUpdate) SetLocationID(u uint32) *BiographyUpdate
- func (bu *BiographyUpdate) SetModified(t time.Time) *BiographyUpdate
- func (bu *BiographyUpdate) SetNillableCreated(t *time.Time) *BiographyUpdate
- func (bu *BiographyUpdate) SetNillableIsPublic(b *bool) *BiographyUpdate
- func (bu *BiographyUpdate) SetNillableLeave(t *time.Time) *BiographyUpdate
- func (bu *BiographyUpdate) SetPosition(s string) *BiographyUpdate
- func (bu *BiographyUpdate) SetPositionJa(s string) *BiographyUpdate
- func (bu *BiographyUpdate) SetUserID(u uint32) *BiographyUpdate
- func (bu *BiographyUpdate) Where(ps ...predicate.Biography) *BiographyUpdate
- type BiographyUpdateOne
- func (buo *BiographyUpdateOne) AddLocationID(u int32) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) AddUserID(u int32) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) ClearLeave() *BiographyUpdateOne
- func (buo *BiographyUpdateOne) Exec(ctx context.Context) error
- func (buo *BiographyUpdateOne) ExecX(ctx context.Context)
- func (buo *BiographyUpdateOne) Mutation() *BiographyMutation
- func (buo *BiographyUpdateOne) Save(ctx context.Context) (*Biography, error)
- func (buo *BiographyUpdateOne) SaveX(ctx context.Context) *Biography
- func (buo *BiographyUpdateOne) Select(field string, fields ...string) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetCreated(t time.Time) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetIsPublic(b bool) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetJoin(t time.Time) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetLeave(t time.Time) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetLocationID(u uint32) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetModified(t time.Time) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetNillableCreated(t *time.Time) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetNillableIsPublic(b *bool) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetNillableLeave(t *time.Time) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetPosition(s string) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetPositionJa(s string) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) SetUserID(u uint32) *BiographyUpdateOne
- func (buo *BiographyUpdateOne) Where(ps ...predicate.Biography) *BiographyUpdateOne
- type Categories
- type Category
- type CategoryClient
- func (c *CategoryClient) Create() *CategoryCreate
- func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk
- func (c *CategoryClient) Delete() *CategoryDelete
- func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne
- func (c *CategoryClient) DeleteOneID(id uint32) *CategoryDeleteOne
- func (c *CategoryClient) Get(ctx context.Context, id uint32) (*Category, error)
- func (c *CategoryClient) GetX(ctx context.Context, id uint32) *Category
- func (c *CategoryClient) Hooks() []Hook
- func (c *CategoryClient) Intercept(interceptors ...Interceptor)
- func (c *CategoryClient) Interceptors() []Interceptor
- func (c *CategoryClient) Query() *CategoryQuery
- func (c *CategoryClient) Update() *CategoryUpdate
- func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne
- func (c *CategoryClient) UpdateOneID(id uint32) *CategoryUpdateOne
- func (c *CategoryClient) Use(hooks ...Hook)
- type CategoryCreate
- func (cc *CategoryCreate) Exec(ctx context.Context) error
- func (cc *CategoryCreate) ExecX(ctx context.Context)
- func (cc *CategoryCreate) Mutation() *CategoryMutation
- func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error)
- func (cc *CategoryCreate) SaveX(ctx context.Context) *Category
- func (cc *CategoryCreate) SetCreated(t time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetEmoji(s string) *CategoryCreate
- func (cc *CategoryCreate) SetID(u uint32) *CategoryCreate
- func (cc *CategoryCreate) SetModified(t time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetName(s string) *CategoryCreate
- func (cc *CategoryCreate) SetNameJa(s string) *CategoryCreate
- func (cc *CategoryCreate) SetNillableCreated(t *time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetNillableModified(t *time.Time) *CategoryCreate
- type CategoryCreateBulk
- type CategoryDelete
- type CategoryDeleteOne
- type CategoryGroupBy
- func (cgb *CategoryGroupBy) Aggregate(fns ...AggregateFunc) *CategoryGroupBy
- func (s *CategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategoryGroupBy) BoolX(ctx context.Context) bool
- func (s *CategoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CategoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CategoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategoryGroupBy) Float64X(ctx context.Context) float64
- func (s *CategoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CategoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CategoryGroupBy) IntX(ctx context.Context) int
- func (s *CategoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CategoryGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CategoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *CategoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *CategoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CategoryGroupBy) StringX(ctx context.Context) string
- func (s *CategoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CategoryGroupBy) StringsX(ctx context.Context) []string
- type CategoryMutation
- func (m *CategoryMutation) AddField(name string, value ent.Value) error
- func (m *CategoryMutation) AddedEdges() []string
- func (m *CategoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *CategoryMutation) AddedFields() []string
- func (m *CategoryMutation) AddedIDs(name string) []ent.Value
- func (m *CategoryMutation) ClearEdge(name string) error
- func (m *CategoryMutation) ClearField(name string) error
- func (m *CategoryMutation) ClearedEdges() []string
- func (m *CategoryMutation) ClearedFields() []string
- func (m CategoryMutation) Client() *Client
- func (m *CategoryMutation) Created() (r time.Time, exists bool)
- func (m *CategoryMutation) EdgeCleared(name string) bool
- func (m *CategoryMutation) Emoji() (r string, exists bool)
- func (m *CategoryMutation) Field(name string) (ent.Value, bool)
- func (m *CategoryMutation) FieldCleared(name string) bool
- func (m *CategoryMutation) Fields() []string
- func (m *CategoryMutation) ID() (id uint32, exists bool)
- func (m *CategoryMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *CategoryMutation) Modified() (r time.Time, exists bool)
- func (m *CategoryMutation) Name() (r string, exists bool)
- func (m *CategoryMutation) NameJa() (r string, exists bool)
- func (m *CategoryMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *CategoryMutation) OldEmoji(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CategoryMutation) OldModified(ctx context.Context) (v time.Time, err error)
- func (m *CategoryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) OldNameJa(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) Op() Op
- func (m *CategoryMutation) RemovedEdges() []string
- func (m *CategoryMutation) RemovedIDs(name string) []ent.Value
- func (m *CategoryMutation) ResetCreated()
- func (m *CategoryMutation) ResetEdge(name string) error
- func (m *CategoryMutation) ResetEmoji()
- func (m *CategoryMutation) ResetField(name string) error
- func (m *CategoryMutation) ResetModified()
- func (m *CategoryMutation) ResetName()
- func (m *CategoryMutation) ResetNameJa()
- func (m *CategoryMutation) SetCreated(t time.Time)
- func (m *CategoryMutation) SetEmoji(s string)
- func (m *CategoryMutation) SetField(name string, value ent.Value) error
- func (m *CategoryMutation) SetID(id uint32)
- func (m *CategoryMutation) SetModified(t time.Time)
- func (m *CategoryMutation) SetName(s string)
- func (m *CategoryMutation) SetNameJa(s string)
- func (m *CategoryMutation) SetOp(op Op)
- func (m CategoryMutation) Tx() (*Tx, error)
- func (m *CategoryMutation) Type() string
- func (m *CategoryMutation) Where(ps ...predicate.Category)
- func (m *CategoryMutation) WhereP(ps ...func(*sql.Selector))
- type CategoryQuery
- func (cq *CategoryQuery) Aggregate(fns ...AggregateFunc) *CategorySelect
- func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error)
- func (cq *CategoryQuery) AllX(ctx context.Context) []*Category
- func (cq *CategoryQuery) Clone() *CategoryQuery
- func (cq *CategoryQuery) Count(ctx context.Context) (int, error)
- func (cq *CategoryQuery) CountX(ctx context.Context) int
- func (cq *CategoryQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CategoryQuery) ExistX(ctx context.Context) bool
- func (cq *CategoryQuery) First(ctx context.Context) (*Category, error)
- func (cq *CategoryQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (cq *CategoryQuery) FirstIDX(ctx context.Context) uint32
- func (cq *CategoryQuery) FirstX(ctx context.Context) *Category
- func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy
- func (cq *CategoryQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (cq *CategoryQuery) IDsX(ctx context.Context) []uint32
- func (cq *CategoryQuery) Limit(limit int) *CategoryQuery
- func (cq *CategoryQuery) Offset(offset int) *CategoryQuery
- func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error)
- func (cq *CategoryQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (cq *CategoryQuery) OnlyIDX(ctx context.Context) uint32
- func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category
- func (cq *CategoryQuery) Order(o ...OrderFunc) *CategoryQuery
- func (cq *CategoryQuery) Select(fields ...string) *CategorySelect
- func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery
- func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery
- type CategorySelect
- func (cs *CategorySelect) Aggregate(fns ...AggregateFunc) *CategorySelect
- func (s *CategorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategorySelect) BoolX(ctx context.Context) bool
- func (s *CategorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CategorySelect) BoolsX(ctx context.Context) []bool
- func (s *CategorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategorySelect) Float64X(ctx context.Context) float64
- func (s *CategorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategorySelect) Float64sX(ctx context.Context) []float64
- func (s *CategorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *CategorySelect) IntX(ctx context.Context) int
- func (s *CategorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *CategorySelect) IntsX(ctx context.Context) []int
- func (cs *CategorySelect) Scan(ctx context.Context, v any) error
- func (s *CategorySelect) ScanX(ctx context.Context, v any)
- func (s *CategorySelect) String(ctx context.Context) (_ string, err error)
- func (s *CategorySelect) StringX(ctx context.Context) string
- func (s *CategorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *CategorySelect) StringsX(ctx context.Context) []string
- type CategoryUpdate
- func (cu *CategoryUpdate) Exec(ctx context.Context) error
- func (cu *CategoryUpdate) ExecX(ctx context.Context)
- func (cu *CategoryUpdate) Mutation() *CategoryMutation
- func (cu *CategoryUpdate) Save(ctx context.Context) (int, error)
- func (cu *CategoryUpdate) SaveX(ctx context.Context) int
- func (cu *CategoryUpdate) SetCreated(t time.Time) *CategoryUpdate
- func (cu *CategoryUpdate) SetEmoji(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetModified(t time.Time) *CategoryUpdate
- func (cu *CategoryUpdate) SetName(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetNameJa(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableCreated(t *time.Time) *CategoryUpdate
- func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate
- type CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error
- func (cuo *CategoryUpdateOne) ExecX(ctx context.Context)
- func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation
- func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error)
- func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category
- func (cuo *CategoryUpdateOne) Select(field string, fields ...string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetCreated(t time.Time) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetEmoji(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetModified(t time.Time) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetName(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNameJa(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableCreated(t *time.Time) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Where(ps ...predicate.Category) *CategoryUpdateOne
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Contact
- type ContactClient
- func (c *ContactClient) Create() *ContactCreate
- func (c *ContactClient) CreateBulk(builders ...*ContactCreate) *ContactCreateBulk
- func (c *ContactClient) Delete() *ContactDelete
- func (c *ContactClient) DeleteOne(co *Contact) *ContactDeleteOne
- func (c *ContactClient) DeleteOneID(id uint32) *ContactDeleteOne
- func (c *ContactClient) Get(ctx context.Context, id uint32) (*Contact, error)
- func (c *ContactClient) GetX(ctx context.Context, id uint32) *Contact
- func (c *ContactClient) Hooks() []Hook
- func (c *ContactClient) Intercept(interceptors ...Interceptor)
- func (c *ContactClient) Interceptors() []Interceptor
- func (c *ContactClient) Query() *ContactQuery
- func (c *ContactClient) Update() *ContactUpdate
- func (c *ContactClient) UpdateOne(co *Contact) *ContactUpdateOne
- func (c *ContactClient) UpdateOneID(id uint32) *ContactUpdateOne
- func (c *ContactClient) Use(hooks ...Hook)
- type ContactCreate
- func (cc *ContactCreate) Exec(ctx context.Context) error
- func (cc *ContactCreate) ExecX(ctx context.Context)
- func (cc *ContactCreate) Mutation() *ContactMutation
- func (cc *ContactCreate) Save(ctx context.Context) (*Contact, error)
- func (cc *ContactCreate) SaveX(ctx context.Context) *Contact
- func (cc *ContactCreate) SetBrowserName(s string) *ContactCreate
- func (cc *ContactCreate) SetCategory(s string) *ContactCreate
- func (cc *ContactCreate) SetCreated(t time.Time) *ContactCreate
- func (cc *ContactCreate) SetCustomTitle(s string) *ContactCreate
- func (cc *ContactCreate) SetCustomValue(s string) *ContactCreate
- func (cc *ContactCreate) SetDetail(s string) *ContactCreate
- func (cc *ContactCreate) SetDeviceName(s string) *ContactCreate
- func (cc *ContactCreate) SetID(u uint32) *ContactCreate
- func (cc *ContactCreate) SetIP(s string) *ContactCreate
- func (cc *ContactCreate) SetIsMobile(b bool) *ContactCreate
- func (cc *ContactCreate) SetLang(s string) *ContactCreate
- func (cc *ContactCreate) SetMail(s string) *ContactCreate
- func (cc *ContactCreate) SetModified(t time.Time) *ContactCreate
- func (cc *ContactCreate) SetName(s string) *ContactCreate
- func (cc *ContactCreate) SetNillableBrowserName(s *string) *ContactCreate
- func (cc *ContactCreate) SetNillableCategory(s *string) *ContactCreate
- func (cc *ContactCreate) SetNillableCreated(t *time.Time) *ContactCreate
- func (cc *ContactCreate) SetNillableCustomTitle(s *string) *ContactCreate
- func (cc *ContactCreate) SetNillableCustomValue(s *string) *ContactCreate
- func (cc *ContactCreate) SetNillableDeviceName(s *string) *ContactCreate
- func (cc *ContactCreate) SetNillableIsMobile(b *bool) *ContactCreate
- func (cc *ContactCreate) SetNillableModified(t *time.Time) *ContactCreate
- func (cc *ContactCreate) SetNillableOs(s *string) *ContactCreate
- func (cc *ContactCreate) SetNillableURL(s *string) *ContactCreate
- func (cc *ContactCreate) SetOs(s string) *ContactCreate
- func (cc *ContactCreate) SetTitle(s string) *ContactCreate
- func (cc *ContactCreate) SetToUserID(u uint32) *ContactCreate
- func (cc *ContactCreate) SetURL(s string) *ContactCreate
- type ContactCreateBulk
- type ContactDefault
- type ContactDefaultClient
- func (c *ContactDefaultClient) Create() *ContactDefaultCreate
- func (c *ContactDefaultClient) CreateBulk(builders ...*ContactDefaultCreate) *ContactDefaultCreateBulk
- func (c *ContactDefaultClient) Delete() *ContactDefaultDelete
- func (c *ContactDefaultClient) DeleteOne(cd *ContactDefault) *ContactDefaultDeleteOne
- func (c *ContactDefaultClient) DeleteOneID(id uint32) *ContactDefaultDeleteOne
- func (c *ContactDefaultClient) Get(ctx context.Context, id uint32) (*ContactDefault, error)
- func (c *ContactDefaultClient) GetX(ctx context.Context, id uint32) *ContactDefault
- func (c *ContactDefaultClient) Hooks() []Hook
- func (c *ContactDefaultClient) Intercept(interceptors ...Interceptor)
- func (c *ContactDefaultClient) Interceptors() []Interceptor
- func (c *ContactDefaultClient) Query() *ContactDefaultQuery
- func (c *ContactDefaultClient) Update() *ContactDefaultUpdate
- func (c *ContactDefaultClient) UpdateOne(cd *ContactDefault) *ContactDefaultUpdateOne
- func (c *ContactDefaultClient) UpdateOneID(id uint32) *ContactDefaultUpdateOne
- func (c *ContactDefaultClient) Use(hooks ...Hook)
- type ContactDefaultCreate
- func (cdc *ContactDefaultCreate) Exec(ctx context.Context) error
- func (cdc *ContactDefaultCreate) ExecX(ctx context.Context)
- func (cdc *ContactDefaultCreate) Mutation() *ContactDefaultMutation
- func (cdc *ContactDefaultCreate) Save(ctx context.Context) (*ContactDefault, error)
- func (cdc *ContactDefaultCreate) SaveX(ctx context.Context) *ContactDefault
- func (cdc *ContactDefaultCreate) SetCategory(s string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetCreated(t time.Time) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetCustomTitle(s string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetDescription(s string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetEmail(s string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetID(u uint32) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetModified(t time.Time) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetName(s string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetNillableCategory(s *string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetNillableCreated(t *time.Time) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetNillableCustomTitle(s *string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetNillableDescription(s *string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetNillableEmail(s *string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetNillableModified(t *time.Time) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetNillableName(s *string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetNillableURL(s *string) *ContactDefaultCreate
- func (cdc *ContactDefaultCreate) SetURL(s string) *ContactDefaultCreate
- type ContactDefaultCreateBulk
- func (cdcb *ContactDefaultCreateBulk) Exec(ctx context.Context) error
- func (cdcb *ContactDefaultCreateBulk) ExecX(ctx context.Context)
- func (cdcb *ContactDefaultCreateBulk) Save(ctx context.Context) ([]*ContactDefault, error)
- func (cdcb *ContactDefaultCreateBulk) SaveX(ctx context.Context) []*ContactDefault
- type ContactDefaultDelete
- type ContactDefaultDeleteOne
- type ContactDefaultGroupBy
- func (cdgb *ContactDefaultGroupBy) Aggregate(fns ...AggregateFunc) *ContactDefaultGroupBy
- func (s *ContactDefaultGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContactDefaultGroupBy) BoolX(ctx context.Context) bool
- func (s *ContactDefaultGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ContactDefaultGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ContactDefaultGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContactDefaultGroupBy) Float64X(ctx context.Context) float64
- func (s *ContactDefaultGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContactDefaultGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ContactDefaultGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ContactDefaultGroupBy) IntX(ctx context.Context) int
- func (s *ContactDefaultGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ContactDefaultGroupBy) IntsX(ctx context.Context) []int
- func (cdgb *ContactDefaultGroupBy) Scan(ctx context.Context, v any) error
- func (s *ContactDefaultGroupBy) ScanX(ctx context.Context, v any)
- func (s *ContactDefaultGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ContactDefaultGroupBy) StringX(ctx context.Context) string
- func (s *ContactDefaultGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ContactDefaultGroupBy) StringsX(ctx context.Context) []string
- type ContactDefaultMutation
- func (m *ContactDefaultMutation) AddField(name string, value ent.Value) error
- func (m *ContactDefaultMutation) AddedEdges() []string
- func (m *ContactDefaultMutation) AddedField(name string) (ent.Value, bool)
- func (m *ContactDefaultMutation) AddedFields() []string
- func (m *ContactDefaultMutation) AddedIDs(name string) []ent.Value
- func (m *ContactDefaultMutation) Category() (r string, exists bool)
- func (m *ContactDefaultMutation) CategoryCleared() bool
- func (m *ContactDefaultMutation) ClearCategory()
- func (m *ContactDefaultMutation) ClearCustomTitle()
- func (m *ContactDefaultMutation) ClearDescription()
- func (m *ContactDefaultMutation) ClearEdge(name string) error
- func (m *ContactDefaultMutation) ClearEmail()
- func (m *ContactDefaultMutation) ClearField(name string) error
- func (m *ContactDefaultMutation) ClearName()
- func (m *ContactDefaultMutation) ClearURL()
- func (m *ContactDefaultMutation) ClearedEdges() []string
- func (m *ContactDefaultMutation) ClearedFields() []string
- func (m ContactDefaultMutation) Client() *Client
- func (m *ContactDefaultMutation) Created() (r time.Time, exists bool)
- func (m *ContactDefaultMutation) CustomTitle() (r string, exists bool)
- func (m *ContactDefaultMutation) CustomTitleCleared() bool
- func (m *ContactDefaultMutation) Description() (r string, exists bool)
- func (m *ContactDefaultMutation) DescriptionCleared() bool
- func (m *ContactDefaultMutation) EdgeCleared(name string) bool
- func (m *ContactDefaultMutation) Email() (r string, exists bool)
- func (m *ContactDefaultMutation) EmailCleared() bool
- func (m *ContactDefaultMutation) Field(name string) (ent.Value, bool)
- func (m *ContactDefaultMutation) FieldCleared(name string) bool
- func (m *ContactDefaultMutation) Fields() []string
- func (m *ContactDefaultMutation) ID() (id uint32, exists bool)
- func (m *ContactDefaultMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *ContactDefaultMutation) Modified() (r time.Time, exists bool)
- func (m *ContactDefaultMutation) Name() (r string, exists bool)
- func (m *ContactDefaultMutation) NameCleared() bool
- func (m *ContactDefaultMutation) OldCategory(ctx context.Context) (v *string, err error)
- func (m *ContactDefaultMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *ContactDefaultMutation) OldCustomTitle(ctx context.Context) (v *string, err error)
- func (m *ContactDefaultMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *ContactDefaultMutation) OldEmail(ctx context.Context) (v *string, err error)
- func (m *ContactDefaultMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ContactDefaultMutation) OldModified(ctx context.Context) (v time.Time, err error)
- func (m *ContactDefaultMutation) OldName(ctx context.Context) (v *string, err error)
- func (m *ContactDefaultMutation) OldURL(ctx context.Context) (v *string, err error)
- func (m *ContactDefaultMutation) Op() Op
- func (m *ContactDefaultMutation) RemovedEdges() []string
- func (m *ContactDefaultMutation) RemovedIDs(name string) []ent.Value
- func (m *ContactDefaultMutation) ResetCategory()
- func (m *ContactDefaultMutation) ResetCreated()
- func (m *ContactDefaultMutation) ResetCustomTitle()
- func (m *ContactDefaultMutation) ResetDescription()
- func (m *ContactDefaultMutation) ResetEdge(name string) error
- func (m *ContactDefaultMutation) ResetEmail()
- func (m *ContactDefaultMutation) ResetField(name string) error
- func (m *ContactDefaultMutation) ResetModified()
- func (m *ContactDefaultMutation) ResetName()
- func (m *ContactDefaultMutation) ResetURL()
- func (m *ContactDefaultMutation) SetCategory(s string)
- func (m *ContactDefaultMutation) SetCreated(t time.Time)
- func (m *ContactDefaultMutation) SetCustomTitle(s string)
- func (m *ContactDefaultMutation) SetDescription(s string)
- func (m *ContactDefaultMutation) SetEmail(s string)
- func (m *ContactDefaultMutation) SetField(name string, value ent.Value) error
- func (m *ContactDefaultMutation) SetID(id uint32)
- func (m *ContactDefaultMutation) SetModified(t time.Time)
- func (m *ContactDefaultMutation) SetName(s string)
- func (m *ContactDefaultMutation) SetOp(op Op)
- func (m *ContactDefaultMutation) SetURL(s string)
- func (m ContactDefaultMutation) Tx() (*Tx, error)
- func (m *ContactDefaultMutation) Type() string
- func (m *ContactDefaultMutation) URL() (r string, exists bool)
- func (m *ContactDefaultMutation) URLCleared() bool
- func (m *ContactDefaultMutation) Where(ps ...predicate.ContactDefault)
- func (m *ContactDefaultMutation) WhereP(ps ...func(*sql.Selector))
- type ContactDefaultQuery
- func (cdq *ContactDefaultQuery) Aggregate(fns ...AggregateFunc) *ContactDefaultSelect
- func (cdq *ContactDefaultQuery) All(ctx context.Context) ([]*ContactDefault, error)
- func (cdq *ContactDefaultQuery) AllX(ctx context.Context) []*ContactDefault
- func (cdq *ContactDefaultQuery) Clone() *ContactDefaultQuery
- func (cdq *ContactDefaultQuery) Count(ctx context.Context) (int, error)
- func (cdq *ContactDefaultQuery) CountX(ctx context.Context) int
- func (cdq *ContactDefaultQuery) Exist(ctx context.Context) (bool, error)
- func (cdq *ContactDefaultQuery) ExistX(ctx context.Context) bool
- func (cdq *ContactDefaultQuery) First(ctx context.Context) (*ContactDefault, error)
- func (cdq *ContactDefaultQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (cdq *ContactDefaultQuery) FirstIDX(ctx context.Context) uint32
- func (cdq *ContactDefaultQuery) FirstX(ctx context.Context) *ContactDefault
- func (cdq *ContactDefaultQuery) GroupBy(field string, fields ...string) *ContactDefaultGroupBy
- func (cdq *ContactDefaultQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (cdq *ContactDefaultQuery) IDsX(ctx context.Context) []uint32
- func (cdq *ContactDefaultQuery) Limit(limit int) *ContactDefaultQuery
- func (cdq *ContactDefaultQuery) Offset(offset int) *ContactDefaultQuery
- func (cdq *ContactDefaultQuery) Only(ctx context.Context) (*ContactDefault, error)
- func (cdq *ContactDefaultQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (cdq *ContactDefaultQuery) OnlyIDX(ctx context.Context) uint32
- func (cdq *ContactDefaultQuery) OnlyX(ctx context.Context) *ContactDefault
- func (cdq *ContactDefaultQuery) Order(o ...OrderFunc) *ContactDefaultQuery
- func (cdq *ContactDefaultQuery) Select(fields ...string) *ContactDefaultSelect
- func (cdq *ContactDefaultQuery) Unique(unique bool) *ContactDefaultQuery
- func (cdq *ContactDefaultQuery) Where(ps ...predicate.ContactDefault) *ContactDefaultQuery
- type ContactDefaultSelect
- func (cds *ContactDefaultSelect) Aggregate(fns ...AggregateFunc) *ContactDefaultSelect
- func (s *ContactDefaultSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContactDefaultSelect) BoolX(ctx context.Context) bool
- func (s *ContactDefaultSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ContactDefaultSelect) BoolsX(ctx context.Context) []bool
- func (s *ContactDefaultSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContactDefaultSelect) Float64X(ctx context.Context) float64
- func (s *ContactDefaultSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContactDefaultSelect) Float64sX(ctx context.Context) []float64
- func (s *ContactDefaultSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ContactDefaultSelect) IntX(ctx context.Context) int
- func (s *ContactDefaultSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ContactDefaultSelect) IntsX(ctx context.Context) []int
- func (cds *ContactDefaultSelect) Scan(ctx context.Context, v any) error
- func (s *ContactDefaultSelect) ScanX(ctx context.Context, v any)
- func (s *ContactDefaultSelect) String(ctx context.Context) (_ string, err error)
- func (s *ContactDefaultSelect) StringX(ctx context.Context) string
- func (s *ContactDefaultSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ContactDefaultSelect) StringsX(ctx context.Context) []string
- type ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) ClearCategory() *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) ClearCustomTitle() *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) ClearDescription() *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) ClearEmail() *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) ClearName() *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) ClearURL() *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) Exec(ctx context.Context) error
- func (cdu *ContactDefaultUpdate) ExecX(ctx context.Context)
- func (cdu *ContactDefaultUpdate) Mutation() *ContactDefaultMutation
- func (cdu *ContactDefaultUpdate) Save(ctx context.Context) (int, error)
- func (cdu *ContactDefaultUpdate) SaveX(ctx context.Context) int
- func (cdu *ContactDefaultUpdate) SetCategory(s string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetCreated(t time.Time) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetCustomTitle(s string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetDescription(s string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetEmail(s string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetModified(t time.Time) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetName(s string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetNillableCategory(s *string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetNillableCreated(t *time.Time) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetNillableCustomTitle(s *string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetNillableDescription(s *string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetNillableEmail(s *string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetNillableName(s *string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetNillableURL(s *string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) SetURL(s string) *ContactDefaultUpdate
- func (cdu *ContactDefaultUpdate) Where(ps ...predicate.ContactDefault) *ContactDefaultUpdate
- type ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) ClearCategory() *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) ClearCustomTitle() *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) ClearDescription() *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) ClearEmail() *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) ClearName() *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) ClearURL() *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) Exec(ctx context.Context) error
- func (cduo *ContactDefaultUpdateOne) ExecX(ctx context.Context)
- func (cduo *ContactDefaultUpdateOne) Mutation() *ContactDefaultMutation
- func (cduo *ContactDefaultUpdateOne) Save(ctx context.Context) (*ContactDefault, error)
- func (cduo *ContactDefaultUpdateOne) SaveX(ctx context.Context) *ContactDefault
- func (cduo *ContactDefaultUpdateOne) Select(field string, fields ...string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetCategory(s string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetCreated(t time.Time) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetCustomTitle(s string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetDescription(s string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetEmail(s string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetModified(t time.Time) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetName(s string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetNillableCategory(s *string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetNillableCreated(t *time.Time) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetNillableCustomTitle(s *string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetNillableDescription(s *string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetNillableEmail(s *string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetNillableName(s *string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetNillableURL(s *string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) SetURL(s string) *ContactDefaultUpdateOne
- func (cduo *ContactDefaultUpdateOne) Where(ps ...predicate.ContactDefault) *ContactDefaultUpdateOne
- type ContactDefaults
- type ContactDelete
- type ContactDeleteOne
- type ContactGroupBy
- func (cgb *ContactGroupBy) Aggregate(fns ...AggregateFunc) *ContactGroupBy
- func (s *ContactGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContactGroupBy) BoolX(ctx context.Context) bool
- func (s *ContactGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ContactGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ContactGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContactGroupBy) Float64X(ctx context.Context) float64
- func (s *ContactGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContactGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ContactGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ContactGroupBy) IntX(ctx context.Context) int
- func (s *ContactGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ContactGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ContactGroupBy) Scan(ctx context.Context, v any) error
- func (s *ContactGroupBy) ScanX(ctx context.Context, v any)
- func (s *ContactGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ContactGroupBy) StringX(ctx context.Context) string
- func (s *ContactGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ContactGroupBy) StringsX(ctx context.Context) []string
- type ContactMutation
- func (m *ContactMutation) AddField(name string, value ent.Value) error
- func (m *ContactMutation) AddToUserID(u int32)
- func (m *ContactMutation) AddedEdges() []string
- func (m *ContactMutation) AddedField(name string) (ent.Value, bool)
- func (m *ContactMutation) AddedFields() []string
- func (m *ContactMutation) AddedIDs(name string) []ent.Value
- func (m *ContactMutation) AddedToUserID() (r int32, exists bool)
- func (m *ContactMutation) BrowserName() (r string, exists bool)
- func (m *ContactMutation) BrowserNameCleared() bool
- func (m *ContactMutation) Category() (r string, exists bool)
- func (m *ContactMutation) CategoryCleared() bool
- func (m *ContactMutation) ClearBrowserName()
- func (m *ContactMutation) ClearCategory()
- func (m *ContactMutation) ClearCustomTitle()
- func (m *ContactMutation) ClearCustomValue()
- func (m *ContactMutation) ClearDeviceName()
- func (m *ContactMutation) ClearEdge(name string) error
- func (m *ContactMutation) ClearField(name string) error
- func (m *ContactMutation) ClearIsMobile()
- func (m *ContactMutation) ClearOs()
- func (m *ContactMutation) ClearURL()
- func (m *ContactMutation) ClearedEdges() []string
- func (m *ContactMutation) ClearedFields() []string
- func (m ContactMutation) Client() *Client
- func (m *ContactMutation) Created() (r time.Time, exists bool)
- func (m *ContactMutation) CustomTitle() (r string, exists bool)
- func (m *ContactMutation) CustomTitleCleared() bool
- func (m *ContactMutation) CustomValue() (r string, exists bool)
- func (m *ContactMutation) CustomValueCleared() bool
- func (m *ContactMutation) Detail() (r string, exists bool)
- func (m *ContactMutation) DeviceName() (r string, exists bool)
- func (m *ContactMutation) DeviceNameCleared() bool
- func (m *ContactMutation) EdgeCleared(name string) bool
- func (m *ContactMutation) Field(name string) (ent.Value, bool)
- func (m *ContactMutation) FieldCleared(name string) bool
- func (m *ContactMutation) Fields() []string
- func (m *ContactMutation) ID() (id uint32, exists bool)
- func (m *ContactMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *ContactMutation) IP() (r string, exists bool)
- func (m *ContactMutation) IsMobile() (r bool, exists bool)
- func (m *ContactMutation) IsMobileCleared() bool
- func (m *ContactMutation) Lang() (r string, exists bool)
- func (m *ContactMutation) Mail() (r string, exists bool)
- func (m *ContactMutation) Modified() (r time.Time, exists bool)
- func (m *ContactMutation) Name() (r string, exists bool)
- func (m *ContactMutation) OldBrowserName(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldCategory(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *ContactMutation) OldCustomTitle(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldCustomValue(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldDetail(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldDeviceName(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ContactMutation) OldIP(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldIsMobile(ctx context.Context) (v bool, err error)
- func (m *ContactMutation) OldLang(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldMail(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldModified(ctx context.Context) (v time.Time, err error)
- func (m *ContactMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldOs(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldToUserID(ctx context.Context) (v uint32, err error)
- func (m *ContactMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *ContactMutation) Op() Op
- func (m *ContactMutation) Os() (r string, exists bool)
- func (m *ContactMutation) OsCleared() bool
- func (m *ContactMutation) RemovedEdges() []string
- func (m *ContactMutation) RemovedIDs(name string) []ent.Value
- func (m *ContactMutation) ResetBrowserName()
- func (m *ContactMutation) ResetCategory()
- func (m *ContactMutation) ResetCreated()
- func (m *ContactMutation) ResetCustomTitle()
- func (m *ContactMutation) ResetCustomValue()
- func (m *ContactMutation) ResetDetail()
- func (m *ContactMutation) ResetDeviceName()
- func (m *ContactMutation) ResetEdge(name string) error
- func (m *ContactMutation) ResetField(name string) error
- func (m *ContactMutation) ResetIP()
- func (m *ContactMutation) ResetIsMobile()
- func (m *ContactMutation) ResetLang()
- func (m *ContactMutation) ResetMail()
- func (m *ContactMutation) ResetModified()
- func (m *ContactMutation) ResetName()
- func (m *ContactMutation) ResetOs()
- func (m *ContactMutation) ResetTitle()
- func (m *ContactMutation) ResetToUserID()
- func (m *ContactMutation) ResetURL()
- func (m *ContactMutation) SetBrowserName(s string)
- func (m *ContactMutation) SetCategory(s string)
- func (m *ContactMutation) SetCreated(t time.Time)
- func (m *ContactMutation) SetCustomTitle(s string)
- func (m *ContactMutation) SetCustomValue(s string)
- func (m *ContactMutation) SetDetail(s string)
- func (m *ContactMutation) SetDeviceName(s string)
- func (m *ContactMutation) SetField(name string, value ent.Value) error
- func (m *ContactMutation) SetID(id uint32)
- func (m *ContactMutation) SetIP(s string)
- func (m *ContactMutation) SetIsMobile(b bool)
- func (m *ContactMutation) SetLang(s string)
- func (m *ContactMutation) SetMail(s string)
- func (m *ContactMutation) SetModified(t time.Time)
- func (m *ContactMutation) SetName(s string)
- func (m *ContactMutation) SetOp(op Op)
- func (m *ContactMutation) SetOs(s string)
- func (m *ContactMutation) SetTitle(s string)
- func (m *ContactMutation) SetToUserID(u uint32)
- func (m *ContactMutation) SetURL(s string)
- func (m *ContactMutation) Title() (r string, exists bool)
- func (m *ContactMutation) ToUserID() (r uint32, exists bool)
- func (m ContactMutation) Tx() (*Tx, error)
- func (m *ContactMutation) Type() string
- func (m *ContactMutation) URL() (r string, exists bool)
- func (m *ContactMutation) URLCleared() bool
- func (m *ContactMutation) Where(ps ...predicate.Contact)
- func (m *ContactMutation) WhereP(ps ...func(*sql.Selector))
- type ContactQuery
- func (cq *ContactQuery) Aggregate(fns ...AggregateFunc) *ContactSelect
- func (cq *ContactQuery) All(ctx context.Context) ([]*Contact, error)
- func (cq *ContactQuery) AllX(ctx context.Context) []*Contact
- func (cq *ContactQuery) Clone() *ContactQuery
- func (cq *ContactQuery) Count(ctx context.Context) (int, error)
- func (cq *ContactQuery) CountX(ctx context.Context) int
- func (cq *ContactQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ContactQuery) ExistX(ctx context.Context) bool
- func (cq *ContactQuery) First(ctx context.Context) (*Contact, error)
- func (cq *ContactQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (cq *ContactQuery) FirstIDX(ctx context.Context) uint32
- func (cq *ContactQuery) FirstX(ctx context.Context) *Contact
- func (cq *ContactQuery) GroupBy(field string, fields ...string) *ContactGroupBy
- func (cq *ContactQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (cq *ContactQuery) IDsX(ctx context.Context) []uint32
- func (cq *ContactQuery) Limit(limit int) *ContactQuery
- func (cq *ContactQuery) Offset(offset int) *ContactQuery
- func (cq *ContactQuery) Only(ctx context.Context) (*Contact, error)
- func (cq *ContactQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (cq *ContactQuery) OnlyIDX(ctx context.Context) uint32
- func (cq *ContactQuery) OnlyX(ctx context.Context) *Contact
- func (cq *ContactQuery) Order(o ...OrderFunc) *ContactQuery
- func (cq *ContactQuery) Select(fields ...string) *ContactSelect
- func (cq *ContactQuery) Unique(unique bool) *ContactQuery
- func (cq *ContactQuery) Where(ps ...predicate.Contact) *ContactQuery
- type ContactSelect
- func (cs *ContactSelect) Aggregate(fns ...AggregateFunc) *ContactSelect
- func (s *ContactSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContactSelect) BoolX(ctx context.Context) bool
- func (s *ContactSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ContactSelect) BoolsX(ctx context.Context) []bool
- func (s *ContactSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContactSelect) Float64X(ctx context.Context) float64
- func (s *ContactSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContactSelect) Float64sX(ctx context.Context) []float64
- func (s *ContactSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ContactSelect) IntX(ctx context.Context) int
- func (s *ContactSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ContactSelect) IntsX(ctx context.Context) []int
- func (cs *ContactSelect) Scan(ctx context.Context, v any) error
- func (s *ContactSelect) ScanX(ctx context.Context, v any)
- func (s *ContactSelect) String(ctx context.Context) (_ string, err error)
- func (s *ContactSelect) StringX(ctx context.Context) string
- func (s *ContactSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ContactSelect) StringsX(ctx context.Context) []string
- type ContactUpdate
- func (cu *ContactUpdate) AddToUserID(u int32) *ContactUpdate
- func (cu *ContactUpdate) ClearBrowserName() *ContactUpdate
- func (cu *ContactUpdate) ClearCategory() *ContactUpdate
- func (cu *ContactUpdate) ClearCustomTitle() *ContactUpdate
- func (cu *ContactUpdate) ClearCustomValue() *ContactUpdate
- func (cu *ContactUpdate) ClearDeviceName() *ContactUpdate
- func (cu *ContactUpdate) ClearIsMobile() *ContactUpdate
- func (cu *ContactUpdate) ClearOs() *ContactUpdate
- func (cu *ContactUpdate) ClearURL() *ContactUpdate
- func (cu *ContactUpdate) Exec(ctx context.Context) error
- func (cu *ContactUpdate) ExecX(ctx context.Context)
- func (cu *ContactUpdate) Mutation() *ContactMutation
- func (cu *ContactUpdate) Save(ctx context.Context) (int, error)
- func (cu *ContactUpdate) SaveX(ctx context.Context) int
- func (cu *ContactUpdate) SetBrowserName(s string) *ContactUpdate
- func (cu *ContactUpdate) SetCategory(s string) *ContactUpdate
- func (cu *ContactUpdate) SetCreated(t time.Time) *ContactUpdate
- func (cu *ContactUpdate) SetCustomTitle(s string) *ContactUpdate
- func (cu *ContactUpdate) SetCustomValue(s string) *ContactUpdate
- func (cu *ContactUpdate) SetDetail(s string) *ContactUpdate
- func (cu *ContactUpdate) SetDeviceName(s string) *ContactUpdate
- func (cu *ContactUpdate) SetIP(s string) *ContactUpdate
- func (cu *ContactUpdate) SetIsMobile(b bool) *ContactUpdate
- func (cu *ContactUpdate) SetLang(s string) *ContactUpdate
- func (cu *ContactUpdate) SetMail(s string) *ContactUpdate
- func (cu *ContactUpdate) SetModified(t time.Time) *ContactUpdate
- func (cu *ContactUpdate) SetName(s string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableBrowserName(s *string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableCategory(s *string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableCreated(t *time.Time) *ContactUpdate
- func (cu *ContactUpdate) SetNillableCustomTitle(s *string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableCustomValue(s *string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableDeviceName(s *string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableIsMobile(b *bool) *ContactUpdate
- func (cu *ContactUpdate) SetNillableOs(s *string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableURL(s *string) *ContactUpdate
- func (cu *ContactUpdate) SetOs(s string) *ContactUpdate
- func (cu *ContactUpdate) SetTitle(s string) *ContactUpdate
- func (cu *ContactUpdate) SetToUserID(u uint32) *ContactUpdate
- func (cu *ContactUpdate) SetURL(s string) *ContactUpdate
- func (cu *ContactUpdate) Where(ps ...predicate.Contact) *ContactUpdate
- type ContactUpdateOne
- func (cuo *ContactUpdateOne) AddToUserID(u int32) *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearBrowserName() *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearCategory() *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearCustomTitle() *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearCustomValue() *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearDeviceName() *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearIsMobile() *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearOs() *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearURL() *ContactUpdateOne
- func (cuo *ContactUpdateOne) Exec(ctx context.Context) error
- func (cuo *ContactUpdateOne) ExecX(ctx context.Context)
- func (cuo *ContactUpdateOne) Mutation() *ContactMutation
- func (cuo *ContactUpdateOne) Save(ctx context.Context) (*Contact, error)
- func (cuo *ContactUpdateOne) SaveX(ctx context.Context) *Contact
- func (cuo *ContactUpdateOne) Select(field string, fields ...string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetBrowserName(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetCategory(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetCreated(t time.Time) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetCustomTitle(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetCustomValue(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetDetail(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetDeviceName(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetIP(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetIsMobile(b bool) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetLang(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetMail(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetModified(t time.Time) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetName(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableBrowserName(s *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableCategory(s *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableCreated(t *time.Time) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableCustomTitle(s *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableCustomValue(s *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableDeviceName(s *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableIsMobile(b *bool) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableOs(s *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableURL(s *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetOs(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetTitle(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetToUserID(u uint32) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetURL(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) Where(ps ...predicate.Contact) *ContactUpdateOne
- type Contacts
- type Hook
- type InterceptFunc
- type Interceptor
- type Link
- type LinkClient
- func (c *LinkClient) Create() *LinkCreate
- func (c *LinkClient) CreateBulk(builders ...*LinkCreate) *LinkCreateBulk
- func (c *LinkClient) Delete() *LinkDelete
- func (c *LinkClient) DeleteOne(l *Link) *LinkDeleteOne
- func (c *LinkClient) DeleteOneID(id uint32) *LinkDeleteOne
- func (c *LinkClient) Get(ctx context.Context, id uint32) (*Link, error)
- func (c *LinkClient) GetX(ctx context.Context, id uint32) *Link
- func (c *LinkClient) Hooks() []Hook
- func (c *LinkClient) Intercept(interceptors ...Interceptor)
- func (c *LinkClient) Interceptors() []Interceptor
- func (c *LinkClient) Query() *LinkQuery
- func (c *LinkClient) Update() *LinkUpdate
- func (c *LinkClient) UpdateOne(l *Link) *LinkUpdateOne
- func (c *LinkClient) UpdateOneID(id uint32) *LinkUpdateOne
- func (c *LinkClient) Use(hooks ...Hook)
- type LinkCreate
- func (lc *LinkCreate) Exec(ctx context.Context) error
- func (lc *LinkCreate) ExecX(ctx context.Context)
- func (lc *LinkCreate) Mutation() *LinkMutation
- func (lc *LinkCreate) Save(ctx context.Context) (*Link, error)
- func (lc *LinkCreate) SaveX(ctx context.Context) *Link
- func (lc *LinkCreate) SetCategoryID(u uint32) *LinkCreate
- func (lc *LinkCreate) SetCreated(t time.Time) *LinkCreate
- func (lc *LinkCreate) SetFaviconURL(s string) *LinkCreate
- func (lc *LinkCreate) SetID(u uint32) *LinkCreate
- func (lc *LinkCreate) SetModified(t time.Time) *LinkCreate
- func (lc *LinkCreate) SetName(s string) *LinkCreate
- func (lc *LinkCreate) SetNameJa(s string) *LinkCreate
- func (lc *LinkCreate) SetNillableCreated(t *time.Time) *LinkCreate
- func (lc *LinkCreate) SetNillableFaviconURL(s *string) *LinkCreate
- func (lc *LinkCreate) SetNillableModified(t *time.Time) *LinkCreate
- func (lc *LinkCreate) SetSiteURL(s string) *LinkCreate
- func (lc *LinkCreate) SetUserID(u uint32) *LinkCreate
- type LinkCreateBulk
- type LinkDelete
- type LinkDeleteOne
- type LinkGroupBy
- func (lgb *LinkGroupBy) Aggregate(fns ...AggregateFunc) *LinkGroupBy
- func (s *LinkGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LinkGroupBy) BoolX(ctx context.Context) bool
- func (s *LinkGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LinkGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LinkGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LinkGroupBy) Float64X(ctx context.Context) float64
- func (s *LinkGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LinkGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LinkGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LinkGroupBy) IntX(ctx context.Context) int
- func (s *LinkGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LinkGroupBy) IntsX(ctx context.Context) []int
- func (lgb *LinkGroupBy) Scan(ctx context.Context, v any) error
- func (s *LinkGroupBy) ScanX(ctx context.Context, v any)
- func (s *LinkGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LinkGroupBy) StringX(ctx context.Context) string
- func (s *LinkGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LinkGroupBy) StringsX(ctx context.Context) []string
- type LinkMutation
- func (m *LinkMutation) AddCategoryID(u int32)
- func (m *LinkMutation) AddField(name string, value ent.Value) error
- func (m *LinkMutation) AddUserID(u int32)
- func (m *LinkMutation) AddedCategoryID() (r int32, exists bool)
- func (m *LinkMutation) AddedEdges() []string
- func (m *LinkMutation) AddedField(name string) (ent.Value, bool)
- func (m *LinkMutation) AddedFields() []string
- func (m *LinkMutation) AddedIDs(name string) []ent.Value
- func (m *LinkMutation) AddedUserID() (r int32, exists bool)
- func (m *LinkMutation) CategoryID() (r uint32, exists bool)
- func (m *LinkMutation) ClearEdge(name string) error
- func (m *LinkMutation) ClearFaviconURL()
- func (m *LinkMutation) ClearField(name string) error
- func (m *LinkMutation) ClearedEdges() []string
- func (m *LinkMutation) ClearedFields() []string
- func (m LinkMutation) Client() *Client
- func (m *LinkMutation) Created() (r time.Time, exists bool)
- func (m *LinkMutation) EdgeCleared(name string) bool
- func (m *LinkMutation) FaviconURL() (r string, exists bool)
- func (m *LinkMutation) FaviconURLCleared() bool
- func (m *LinkMutation) Field(name string) (ent.Value, bool)
- func (m *LinkMutation) FieldCleared(name string) bool
- func (m *LinkMutation) Fields() []string
- func (m *LinkMutation) ID() (id uint32, exists bool)
- func (m *LinkMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *LinkMutation) Modified() (r time.Time, exists bool)
- func (m *LinkMutation) Name() (r string, exists bool)
- func (m *LinkMutation) NameJa() (r string, exists bool)
- func (m *LinkMutation) OldCategoryID(ctx context.Context) (v uint32, err error)
- func (m *LinkMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *LinkMutation) OldFaviconURL(ctx context.Context) (v string, err error)
- func (m *LinkMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LinkMutation) OldModified(ctx context.Context) (v time.Time, err error)
- func (m *LinkMutation) OldName(ctx context.Context) (v string, err error)
- func (m *LinkMutation) OldNameJa(ctx context.Context) (v string, err error)
- func (m *LinkMutation) OldSiteURL(ctx context.Context) (v string, err error)
- func (m *LinkMutation) OldUserID(ctx context.Context) (v uint32, err error)
- func (m *LinkMutation) Op() Op
- func (m *LinkMutation) RemovedEdges() []string
- func (m *LinkMutation) RemovedIDs(name string) []ent.Value
- func (m *LinkMutation) ResetCategoryID()
- func (m *LinkMutation) ResetCreated()
- func (m *LinkMutation) ResetEdge(name string) error
- func (m *LinkMutation) ResetFaviconURL()
- func (m *LinkMutation) ResetField(name string) error
- func (m *LinkMutation) ResetModified()
- func (m *LinkMutation) ResetName()
- func (m *LinkMutation) ResetNameJa()
- func (m *LinkMutation) ResetSiteURL()
- func (m *LinkMutation) ResetUserID()
- func (m *LinkMutation) SetCategoryID(u uint32)
- func (m *LinkMutation) SetCreated(t time.Time)
- func (m *LinkMutation) SetFaviconURL(s string)
- func (m *LinkMutation) SetField(name string, value ent.Value) error
- func (m *LinkMutation) SetID(id uint32)
- func (m *LinkMutation) SetModified(t time.Time)
- func (m *LinkMutation) SetName(s string)
- func (m *LinkMutation) SetNameJa(s string)
- func (m *LinkMutation) SetOp(op Op)
- func (m *LinkMutation) SetSiteURL(s string)
- func (m *LinkMutation) SetUserID(u uint32)
- func (m *LinkMutation) SiteURL() (r string, exists bool)
- func (m LinkMutation) Tx() (*Tx, error)
- func (m *LinkMutation) Type() string
- func (m *LinkMutation) UserID() (r uint32, exists bool)
- func (m *LinkMutation) Where(ps ...predicate.Link)
- func (m *LinkMutation) WhereP(ps ...func(*sql.Selector))
- type LinkQuery
- func (lq *LinkQuery) Aggregate(fns ...AggregateFunc) *LinkSelect
- func (lq *LinkQuery) All(ctx context.Context) ([]*Link, error)
- func (lq *LinkQuery) AllX(ctx context.Context) []*Link
- func (lq *LinkQuery) Clone() *LinkQuery
- func (lq *LinkQuery) Count(ctx context.Context) (int, error)
- func (lq *LinkQuery) CountX(ctx context.Context) int
- func (lq *LinkQuery) Exist(ctx context.Context) (bool, error)
- func (lq *LinkQuery) ExistX(ctx context.Context) bool
- func (lq *LinkQuery) First(ctx context.Context) (*Link, error)
- func (lq *LinkQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (lq *LinkQuery) FirstIDX(ctx context.Context) uint32
- func (lq *LinkQuery) FirstX(ctx context.Context) *Link
- func (lq *LinkQuery) GroupBy(field string, fields ...string) *LinkGroupBy
- func (lq *LinkQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (lq *LinkQuery) IDsX(ctx context.Context) []uint32
- func (lq *LinkQuery) Limit(limit int) *LinkQuery
- func (lq *LinkQuery) Offset(offset int) *LinkQuery
- func (lq *LinkQuery) Only(ctx context.Context) (*Link, error)
- func (lq *LinkQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (lq *LinkQuery) OnlyIDX(ctx context.Context) uint32
- func (lq *LinkQuery) OnlyX(ctx context.Context) *Link
- func (lq *LinkQuery) Order(o ...OrderFunc) *LinkQuery
- func (lq *LinkQuery) Select(fields ...string) *LinkSelect
- func (lq *LinkQuery) Unique(unique bool) *LinkQuery
- func (lq *LinkQuery) Where(ps ...predicate.Link) *LinkQuery
- type LinkSelect
- func (ls *LinkSelect) Aggregate(fns ...AggregateFunc) *LinkSelect
- func (s *LinkSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LinkSelect) BoolX(ctx context.Context) bool
- func (s *LinkSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LinkSelect) BoolsX(ctx context.Context) []bool
- func (s *LinkSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LinkSelect) Float64X(ctx context.Context) float64
- func (s *LinkSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LinkSelect) Float64sX(ctx context.Context) []float64
- func (s *LinkSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LinkSelect) IntX(ctx context.Context) int
- func (s *LinkSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LinkSelect) IntsX(ctx context.Context) []int
- func (ls *LinkSelect) Scan(ctx context.Context, v any) error
- func (s *LinkSelect) ScanX(ctx context.Context, v any)
- func (s *LinkSelect) String(ctx context.Context) (_ string, err error)
- func (s *LinkSelect) StringX(ctx context.Context) string
- func (s *LinkSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LinkSelect) StringsX(ctx context.Context) []string
- type LinkUpdate
- func (lu *LinkUpdate) AddCategoryID(u int32) *LinkUpdate
- func (lu *LinkUpdate) AddUserID(u int32) *LinkUpdate
- func (lu *LinkUpdate) ClearFaviconURL() *LinkUpdate
- func (lu *LinkUpdate) Exec(ctx context.Context) error
- func (lu *LinkUpdate) ExecX(ctx context.Context)
- func (lu *LinkUpdate) Mutation() *LinkMutation
- func (lu *LinkUpdate) Save(ctx context.Context) (int, error)
- func (lu *LinkUpdate) SaveX(ctx context.Context) int
- func (lu *LinkUpdate) SetCategoryID(u uint32) *LinkUpdate
- func (lu *LinkUpdate) SetCreated(t time.Time) *LinkUpdate
- func (lu *LinkUpdate) SetFaviconURL(s string) *LinkUpdate
- func (lu *LinkUpdate) SetModified(t time.Time) *LinkUpdate
- func (lu *LinkUpdate) SetName(s string) *LinkUpdate
- func (lu *LinkUpdate) SetNameJa(s string) *LinkUpdate
- func (lu *LinkUpdate) SetNillableCreated(t *time.Time) *LinkUpdate
- func (lu *LinkUpdate) SetNillableFaviconURL(s *string) *LinkUpdate
- func (lu *LinkUpdate) SetSiteURL(s string) *LinkUpdate
- func (lu *LinkUpdate) SetUserID(u uint32) *LinkUpdate
- func (lu *LinkUpdate) Where(ps ...predicate.Link) *LinkUpdate
- type LinkUpdateOne
- func (luo *LinkUpdateOne) AddCategoryID(u int32) *LinkUpdateOne
- func (luo *LinkUpdateOne) AddUserID(u int32) *LinkUpdateOne
- func (luo *LinkUpdateOne) ClearFaviconURL() *LinkUpdateOne
- func (luo *LinkUpdateOne) Exec(ctx context.Context) error
- func (luo *LinkUpdateOne) ExecX(ctx context.Context)
- func (luo *LinkUpdateOne) Mutation() *LinkMutation
- func (luo *LinkUpdateOne) Save(ctx context.Context) (*Link, error)
- func (luo *LinkUpdateOne) SaveX(ctx context.Context) *Link
- func (luo *LinkUpdateOne) Select(field string, fields ...string) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetCategoryID(u uint32) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetCreated(t time.Time) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetFaviconURL(s string) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetModified(t time.Time) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetName(s string) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetNameJa(s string) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetNillableCreated(t *time.Time) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetNillableFaviconURL(s *string) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetSiteURL(s string) *LinkUpdateOne
- func (luo *LinkUpdateOne) SetUserID(u uint32) *LinkUpdateOne
- func (luo *LinkUpdateOne) Where(ps ...predicate.Link) *LinkUpdateOne
- type Links
- type Location
- type LocationClient
- func (c *LocationClient) Create() *LocationCreate
- func (c *LocationClient) CreateBulk(builders ...*LocationCreate) *LocationCreateBulk
- func (c *LocationClient) Delete() *LocationDelete
- func (c *LocationClient) DeleteOne(l *Location) *LocationDeleteOne
- func (c *LocationClient) DeleteOneID(id uint32) *LocationDeleteOne
- func (c *LocationClient) Get(ctx context.Context, id uint32) (*Location, error)
- func (c *LocationClient) GetX(ctx context.Context, id uint32) *Location
- func (c *LocationClient) Hooks() []Hook
- func (c *LocationClient) Intercept(interceptors ...Interceptor)
- func (c *LocationClient) Interceptors() []Interceptor
- func (c *LocationClient) Query() *LocationQuery
- func (c *LocationClient) Update() *LocationUpdate
- func (c *LocationClient) UpdateOne(l *Location) *LocationUpdateOne
- func (c *LocationClient) UpdateOneID(id uint32) *LocationUpdateOne
- func (c *LocationClient) Use(hooks ...Hook)
- type LocationCreate
- func (lc *LocationCreate) Exec(ctx context.Context) error
- func (lc *LocationCreate) ExecX(ctx context.Context)
- func (lc *LocationCreate) Mutation() *LocationMutation
- func (lc *LocationCreate) Save(ctx context.Context) (*Location, error)
- func (lc *LocationCreate) SaveX(ctx context.Context) *Location
- func (lc *LocationCreate) SetAddress(s string) *LocationCreate
- func (lc *LocationCreate) SetAddressJa(s string) *LocationCreate
- func (lc *LocationCreate) SetCreated(t time.Time) *LocationCreate
- func (lc *LocationCreate) SetID(u uint32) *LocationCreate
- func (lc *LocationCreate) SetModified(t time.Time) *LocationCreate
- func (lc *LocationCreate) SetName(s string) *LocationCreate
- func (lc *LocationCreate) SetNameJa(s string) *LocationCreate
- func (lc *LocationCreate) SetNillableCreated(t *time.Time) *LocationCreate
- func (lc *LocationCreate) SetNillableModified(t *time.Time) *LocationCreate
- func (lc *LocationCreate) SetType(l location.Type) *LocationCreate
- type LocationCreateBulk
- type LocationDelete
- type LocationDeleteOne
- type LocationGroupBy
- func (lgb *LocationGroupBy) Aggregate(fns ...AggregateFunc) *LocationGroupBy
- func (s *LocationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocationGroupBy) BoolX(ctx context.Context) bool
- func (s *LocationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LocationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LocationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocationGroupBy) Float64X(ctx context.Context) float64
- func (s *LocationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LocationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LocationGroupBy) IntX(ctx context.Context) int
- func (s *LocationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LocationGroupBy) IntsX(ctx context.Context) []int
- func (lgb *LocationGroupBy) Scan(ctx context.Context, v any) error
- func (s *LocationGroupBy) ScanX(ctx context.Context, v any)
- func (s *LocationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LocationGroupBy) StringX(ctx context.Context) string
- func (s *LocationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LocationGroupBy) StringsX(ctx context.Context) []string
- type LocationMutation
- func (m *LocationMutation) AddField(name string, value ent.Value) error
- func (m *LocationMutation) AddedEdges() []string
- func (m *LocationMutation) AddedField(name string) (ent.Value, bool)
- func (m *LocationMutation) AddedFields() []string
- func (m *LocationMutation) AddedIDs(name string) []ent.Value
- func (m *LocationMutation) Address() (r string, exists bool)
- func (m *LocationMutation) AddressJa() (r string, exists bool)
- func (m *LocationMutation) ClearEdge(name string) error
- func (m *LocationMutation) ClearField(name string) error
- func (m *LocationMutation) ClearedEdges() []string
- func (m *LocationMutation) ClearedFields() []string
- func (m LocationMutation) Client() *Client
- func (m *LocationMutation) Created() (r time.Time, exists bool)
- func (m *LocationMutation) EdgeCleared(name string) bool
- func (m *LocationMutation) Field(name string) (ent.Value, bool)
- func (m *LocationMutation) FieldCleared(name string) bool
- func (m *LocationMutation) Fields() []string
- func (m *LocationMutation) GetType() (r location.Type, exists bool)
- func (m *LocationMutation) ID() (id uint32, exists bool)
- func (m *LocationMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *LocationMutation) Modified() (r time.Time, exists bool)
- func (m *LocationMutation) Name() (r string, exists bool)
- func (m *LocationMutation) NameJa() (r string, exists bool)
- func (m *LocationMutation) OldAddress(ctx context.Context) (v string, err error)
- func (m *LocationMutation) OldAddressJa(ctx context.Context) (v string, err error)
- func (m *LocationMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *LocationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LocationMutation) OldModified(ctx context.Context) (v time.Time, err error)
- func (m *LocationMutation) OldName(ctx context.Context) (v string, err error)
- func (m *LocationMutation) OldNameJa(ctx context.Context) (v string, err error)
- func (m *LocationMutation) OldType(ctx context.Context) (v location.Type, err error)
- func (m *LocationMutation) Op() Op
- func (m *LocationMutation) RemovedEdges() []string
- func (m *LocationMutation) RemovedIDs(name string) []ent.Value
- func (m *LocationMutation) ResetAddress()
- func (m *LocationMutation) ResetAddressJa()
- func (m *LocationMutation) ResetCreated()
- func (m *LocationMutation) ResetEdge(name string) error
- func (m *LocationMutation) ResetField(name string) error
- func (m *LocationMutation) ResetModified()
- func (m *LocationMutation) ResetName()
- func (m *LocationMutation) ResetNameJa()
- func (m *LocationMutation) ResetType()
- func (m *LocationMutation) SetAddress(s string)
- func (m *LocationMutation) SetAddressJa(s string)
- func (m *LocationMutation) SetCreated(t time.Time)
- func (m *LocationMutation) SetField(name string, value ent.Value) error
- func (m *LocationMutation) SetID(id uint32)
- func (m *LocationMutation) SetModified(t time.Time)
- func (m *LocationMutation) SetName(s string)
- func (m *LocationMutation) SetNameJa(s string)
- func (m *LocationMutation) SetOp(op Op)
- func (m *LocationMutation) SetType(l location.Type)
- func (m LocationMutation) Tx() (*Tx, error)
- func (m *LocationMutation) Type() string
- func (m *LocationMutation) Where(ps ...predicate.Location)
- func (m *LocationMutation) WhereP(ps ...func(*sql.Selector))
- type LocationQuery
- func (lq *LocationQuery) Aggregate(fns ...AggregateFunc) *LocationSelect
- func (lq *LocationQuery) All(ctx context.Context) ([]*Location, error)
- func (lq *LocationQuery) AllX(ctx context.Context) []*Location
- func (lq *LocationQuery) Clone() *LocationQuery
- func (lq *LocationQuery) Count(ctx context.Context) (int, error)
- func (lq *LocationQuery) CountX(ctx context.Context) int
- func (lq *LocationQuery) Exist(ctx context.Context) (bool, error)
- func (lq *LocationQuery) ExistX(ctx context.Context) bool
- func (lq *LocationQuery) First(ctx context.Context) (*Location, error)
- func (lq *LocationQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (lq *LocationQuery) FirstIDX(ctx context.Context) uint32
- func (lq *LocationQuery) FirstX(ctx context.Context) *Location
- func (lq *LocationQuery) GroupBy(field string, fields ...string) *LocationGroupBy
- func (lq *LocationQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (lq *LocationQuery) IDsX(ctx context.Context) []uint32
- func (lq *LocationQuery) Limit(limit int) *LocationQuery
- func (lq *LocationQuery) Offset(offset int) *LocationQuery
- func (lq *LocationQuery) Only(ctx context.Context) (*Location, error)
- func (lq *LocationQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (lq *LocationQuery) OnlyIDX(ctx context.Context) uint32
- func (lq *LocationQuery) OnlyX(ctx context.Context) *Location
- func (lq *LocationQuery) Order(o ...OrderFunc) *LocationQuery
- func (lq *LocationQuery) Select(fields ...string) *LocationSelect
- func (lq *LocationQuery) Unique(unique bool) *LocationQuery
- func (lq *LocationQuery) Where(ps ...predicate.Location) *LocationQuery
- type LocationSelect
- func (ls *LocationSelect) Aggregate(fns ...AggregateFunc) *LocationSelect
- func (s *LocationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocationSelect) BoolX(ctx context.Context) bool
- func (s *LocationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LocationSelect) BoolsX(ctx context.Context) []bool
- func (s *LocationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocationSelect) Float64X(ctx context.Context) float64
- func (s *LocationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocationSelect) Float64sX(ctx context.Context) []float64
- func (s *LocationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LocationSelect) IntX(ctx context.Context) int
- func (s *LocationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LocationSelect) IntsX(ctx context.Context) []int
- func (ls *LocationSelect) Scan(ctx context.Context, v any) error
- func (s *LocationSelect) ScanX(ctx context.Context, v any)
- func (s *LocationSelect) String(ctx context.Context) (_ string, err error)
- func (s *LocationSelect) StringX(ctx context.Context) string
- func (s *LocationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LocationSelect) StringsX(ctx context.Context) []string
- type LocationUpdate
- func (lu *LocationUpdate) Exec(ctx context.Context) error
- func (lu *LocationUpdate) ExecX(ctx context.Context)
- func (lu *LocationUpdate) Mutation() *LocationMutation
- func (lu *LocationUpdate) Save(ctx context.Context) (int, error)
- func (lu *LocationUpdate) SaveX(ctx context.Context) int
- func (lu *LocationUpdate) SetAddress(s string) *LocationUpdate
- func (lu *LocationUpdate) SetAddressJa(s string) *LocationUpdate
- func (lu *LocationUpdate) SetCreated(t time.Time) *LocationUpdate
- func (lu *LocationUpdate) SetModified(t time.Time) *LocationUpdate
- func (lu *LocationUpdate) SetName(s string) *LocationUpdate
- func (lu *LocationUpdate) SetNameJa(s string) *LocationUpdate
- func (lu *LocationUpdate) SetNillableCreated(t *time.Time) *LocationUpdate
- func (lu *LocationUpdate) SetType(l location.Type) *LocationUpdate
- func (lu *LocationUpdate) Where(ps ...predicate.Location) *LocationUpdate
- type LocationUpdateOne
- func (luo *LocationUpdateOne) Exec(ctx context.Context) error
- func (luo *LocationUpdateOne) ExecX(ctx context.Context)
- func (luo *LocationUpdateOne) Mutation() *LocationMutation
- func (luo *LocationUpdateOne) Save(ctx context.Context) (*Location, error)
- func (luo *LocationUpdateOne) SaveX(ctx context.Context) *Location
- func (luo *LocationUpdateOne) Select(field string, fields ...string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetAddress(s string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetAddressJa(s string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetCreated(t time.Time) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetModified(t time.Time) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetName(s string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetNameJa(s string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetNillableCreated(t *time.Time) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetType(l location.Type) *LocationUpdateOne
- func (luo *LocationUpdateOne) Where(ps ...predicate.Location) *LocationUpdateOne
- type Locations
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Notice
- type NoticeClient
- func (c *NoticeClient) Create() *NoticeCreate
- func (c *NoticeClient) CreateBulk(builders ...*NoticeCreate) *NoticeCreateBulk
- func (c *NoticeClient) Delete() *NoticeDelete
- func (c *NoticeClient) DeleteOne(n *Notice) *NoticeDeleteOne
- func (c *NoticeClient) DeleteOneID(id uint32) *NoticeDeleteOne
- func (c *NoticeClient) Get(ctx context.Context, id uint32) (*Notice, error)
- func (c *NoticeClient) GetX(ctx context.Context, id uint32) *Notice
- func (c *NoticeClient) Hooks() []Hook
- func (c *NoticeClient) Intercept(interceptors ...Interceptor)
- func (c *NoticeClient) Interceptors() []Interceptor
- func (c *NoticeClient) Query() *NoticeQuery
- func (c *NoticeClient) Update() *NoticeUpdate
- func (c *NoticeClient) UpdateOne(n *Notice) *NoticeUpdateOne
- func (c *NoticeClient) UpdateOneID(id uint32) *NoticeUpdateOne
- func (c *NoticeClient) Use(hooks ...Hook)
- type NoticeCreate
- func (nc *NoticeCreate) Exec(ctx context.Context) error
- func (nc *NoticeCreate) ExecX(ctx context.Context)
- func (nc *NoticeCreate) Mutation() *NoticeMutation
- func (nc *NoticeCreate) Save(ctx context.Context) (*Notice, error)
- func (nc *NoticeCreate) SaveX(ctx context.Context) *Notice
- func (nc *NoticeCreate) SetCreated(t time.Time) *NoticeCreate
- func (nc *NoticeCreate) SetDiscordWebhook(s string) *NoticeCreate
- func (nc *NoticeCreate) SetID(u uint32) *NoticeCreate
- func (nc *NoticeCreate) SetMail(s string) *NoticeCreate
- func (nc *NoticeCreate) SetModified(t time.Time) *NoticeCreate
- func (nc *NoticeCreate) SetNillableCreated(t *time.Time) *NoticeCreate
- func (nc *NoticeCreate) SetNillableDiscordWebhook(s *string) *NoticeCreate
- func (nc *NoticeCreate) SetNillableMail(s *string) *NoticeCreate
- func (nc *NoticeCreate) SetNillableModified(t *time.Time) *NoticeCreate
- func (nc *NoticeCreate) SetNillableSlackWebhook(s *string) *NoticeCreate
- func (nc *NoticeCreate) SetSlackWebhook(s string) *NoticeCreate
- func (nc *NoticeCreate) SetUserID(u uint32) *NoticeCreate
- type NoticeCreateBulk
- type NoticeDelete
- type NoticeDeleteOne
- type NoticeGroupBy
- func (ngb *NoticeGroupBy) Aggregate(fns ...AggregateFunc) *NoticeGroupBy
- func (s *NoticeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NoticeGroupBy) BoolX(ctx context.Context) bool
- func (s *NoticeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NoticeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NoticeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NoticeGroupBy) Float64X(ctx context.Context) float64
- func (s *NoticeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NoticeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NoticeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NoticeGroupBy) IntX(ctx context.Context) int
- func (s *NoticeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NoticeGroupBy) IntsX(ctx context.Context) []int
- func (ngb *NoticeGroupBy) Scan(ctx context.Context, v any) error
- func (s *NoticeGroupBy) ScanX(ctx context.Context, v any)
- func (s *NoticeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NoticeGroupBy) StringX(ctx context.Context) string
- func (s *NoticeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NoticeGroupBy) StringsX(ctx context.Context) []string
- type NoticeMutation
- func (m *NoticeMutation) AddField(name string, value ent.Value) error
- func (m *NoticeMutation) AddUserID(u int32)
- func (m *NoticeMutation) AddedEdges() []string
- func (m *NoticeMutation) AddedField(name string) (ent.Value, bool)
- func (m *NoticeMutation) AddedFields() []string
- func (m *NoticeMutation) AddedIDs(name string) []ent.Value
- func (m *NoticeMutation) AddedUserID() (r int32, exists bool)
- func (m *NoticeMutation) ClearDiscordWebhook()
- func (m *NoticeMutation) ClearEdge(name string) error
- func (m *NoticeMutation) ClearField(name string) error
- func (m *NoticeMutation) ClearMail()
- func (m *NoticeMutation) ClearSlackWebhook()
- func (m *NoticeMutation) ClearedEdges() []string
- func (m *NoticeMutation) ClearedFields() []string
- func (m NoticeMutation) Client() *Client
- func (m *NoticeMutation) Created() (r time.Time, exists bool)
- func (m *NoticeMutation) DiscordWebhook() (r string, exists bool)
- func (m *NoticeMutation) DiscordWebhookCleared() bool
- func (m *NoticeMutation) EdgeCleared(name string) bool
- func (m *NoticeMutation) Field(name string) (ent.Value, bool)
- func (m *NoticeMutation) FieldCleared(name string) bool
- func (m *NoticeMutation) Fields() []string
- func (m *NoticeMutation) ID() (id uint32, exists bool)
- func (m *NoticeMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *NoticeMutation) Mail() (r string, exists bool)
- func (m *NoticeMutation) MailCleared() bool
- func (m *NoticeMutation) Modified() (r time.Time, exists bool)
- func (m *NoticeMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *NoticeMutation) OldDiscordWebhook(ctx context.Context) (v string, err error)
- func (m *NoticeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NoticeMutation) OldMail(ctx context.Context) (v string, err error)
- func (m *NoticeMutation) OldModified(ctx context.Context) (v time.Time, err error)
- func (m *NoticeMutation) OldSlackWebhook(ctx context.Context) (v string, err error)
- func (m *NoticeMutation) OldUserID(ctx context.Context) (v uint32, err error)
- func (m *NoticeMutation) Op() Op
- func (m *NoticeMutation) RemovedEdges() []string
- func (m *NoticeMutation) RemovedIDs(name string) []ent.Value
- func (m *NoticeMutation) ResetCreated()
- func (m *NoticeMutation) ResetDiscordWebhook()
- func (m *NoticeMutation) ResetEdge(name string) error
- func (m *NoticeMutation) ResetField(name string) error
- func (m *NoticeMutation) ResetMail()
- func (m *NoticeMutation) ResetModified()
- func (m *NoticeMutation) ResetSlackWebhook()
- func (m *NoticeMutation) ResetUserID()
- func (m *NoticeMutation) SetCreated(t time.Time)
- func (m *NoticeMutation) SetDiscordWebhook(s string)
- func (m *NoticeMutation) SetField(name string, value ent.Value) error
- func (m *NoticeMutation) SetID(id uint32)
- func (m *NoticeMutation) SetMail(s string)
- func (m *NoticeMutation) SetModified(t time.Time)
- func (m *NoticeMutation) SetOp(op Op)
- func (m *NoticeMutation) SetSlackWebhook(s string)
- func (m *NoticeMutation) SetUserID(u uint32)
- func (m *NoticeMutation) SlackWebhook() (r string, exists bool)
- func (m *NoticeMutation) SlackWebhookCleared() bool
- func (m NoticeMutation) Tx() (*Tx, error)
- func (m *NoticeMutation) Type() string
- func (m *NoticeMutation) UserID() (r uint32, exists bool)
- func (m *NoticeMutation) Where(ps ...predicate.Notice)
- func (m *NoticeMutation) WhereP(ps ...func(*sql.Selector))
- type NoticeQuery
- func (nq *NoticeQuery) Aggregate(fns ...AggregateFunc) *NoticeSelect
- func (nq *NoticeQuery) All(ctx context.Context) ([]*Notice, error)
- func (nq *NoticeQuery) AllX(ctx context.Context) []*Notice
- func (nq *NoticeQuery) Clone() *NoticeQuery
- func (nq *NoticeQuery) Count(ctx context.Context) (int, error)
- func (nq *NoticeQuery) CountX(ctx context.Context) int
- func (nq *NoticeQuery) Exist(ctx context.Context) (bool, error)
- func (nq *NoticeQuery) ExistX(ctx context.Context) bool
- func (nq *NoticeQuery) First(ctx context.Context) (*Notice, error)
- func (nq *NoticeQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (nq *NoticeQuery) FirstIDX(ctx context.Context) uint32
- func (nq *NoticeQuery) FirstX(ctx context.Context) *Notice
- func (nq *NoticeQuery) GroupBy(field string, fields ...string) *NoticeGroupBy
- func (nq *NoticeQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (nq *NoticeQuery) IDsX(ctx context.Context) []uint32
- func (nq *NoticeQuery) Limit(limit int) *NoticeQuery
- func (nq *NoticeQuery) Offset(offset int) *NoticeQuery
- func (nq *NoticeQuery) Only(ctx context.Context) (*Notice, error)
- func (nq *NoticeQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (nq *NoticeQuery) OnlyIDX(ctx context.Context) uint32
- func (nq *NoticeQuery) OnlyX(ctx context.Context) *Notice
- func (nq *NoticeQuery) Order(o ...OrderFunc) *NoticeQuery
- func (nq *NoticeQuery) Select(fields ...string) *NoticeSelect
- func (nq *NoticeQuery) Unique(unique bool) *NoticeQuery
- func (nq *NoticeQuery) Where(ps ...predicate.Notice) *NoticeQuery
- type NoticeSelect
- func (ns *NoticeSelect) Aggregate(fns ...AggregateFunc) *NoticeSelect
- func (s *NoticeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NoticeSelect) BoolX(ctx context.Context) bool
- func (s *NoticeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NoticeSelect) BoolsX(ctx context.Context) []bool
- func (s *NoticeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NoticeSelect) Float64X(ctx context.Context) float64
- func (s *NoticeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NoticeSelect) Float64sX(ctx context.Context) []float64
- func (s *NoticeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NoticeSelect) IntX(ctx context.Context) int
- func (s *NoticeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NoticeSelect) IntsX(ctx context.Context) []int
- func (ns *NoticeSelect) Scan(ctx context.Context, v any) error
- func (s *NoticeSelect) ScanX(ctx context.Context, v any)
- func (s *NoticeSelect) String(ctx context.Context) (_ string, err error)
- func (s *NoticeSelect) StringX(ctx context.Context) string
- func (s *NoticeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NoticeSelect) StringsX(ctx context.Context) []string
- type NoticeUpdate
- func (nu *NoticeUpdate) AddUserID(u int32) *NoticeUpdate
- func (nu *NoticeUpdate) ClearDiscordWebhook() *NoticeUpdate
- func (nu *NoticeUpdate) ClearMail() *NoticeUpdate
- func (nu *NoticeUpdate) ClearSlackWebhook() *NoticeUpdate
- func (nu *NoticeUpdate) Exec(ctx context.Context) error
- func (nu *NoticeUpdate) ExecX(ctx context.Context)
- func (nu *NoticeUpdate) Mutation() *NoticeMutation
- func (nu *NoticeUpdate) Save(ctx context.Context) (int, error)
- func (nu *NoticeUpdate) SaveX(ctx context.Context) int
- func (nu *NoticeUpdate) SetCreated(t time.Time) *NoticeUpdate
- func (nu *NoticeUpdate) SetDiscordWebhook(s string) *NoticeUpdate
- func (nu *NoticeUpdate) SetMail(s string) *NoticeUpdate
- func (nu *NoticeUpdate) SetModified(t time.Time) *NoticeUpdate
- func (nu *NoticeUpdate) SetNillableCreated(t *time.Time) *NoticeUpdate
- func (nu *NoticeUpdate) SetNillableDiscordWebhook(s *string) *NoticeUpdate
- func (nu *NoticeUpdate) SetNillableMail(s *string) *NoticeUpdate
- func (nu *NoticeUpdate) SetNillableSlackWebhook(s *string) *NoticeUpdate
- func (nu *NoticeUpdate) SetSlackWebhook(s string) *NoticeUpdate
- func (nu *NoticeUpdate) SetUserID(u uint32) *NoticeUpdate
- func (nu *NoticeUpdate) Where(ps ...predicate.Notice) *NoticeUpdate
- type NoticeUpdateOne
- func (nuo *NoticeUpdateOne) AddUserID(u int32) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) ClearDiscordWebhook() *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) ClearMail() *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) ClearSlackWebhook() *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) Exec(ctx context.Context) error
- func (nuo *NoticeUpdateOne) ExecX(ctx context.Context)
- func (nuo *NoticeUpdateOne) Mutation() *NoticeMutation
- func (nuo *NoticeUpdateOne) Save(ctx context.Context) (*Notice, error)
- func (nuo *NoticeUpdateOne) SaveX(ctx context.Context) *Notice
- func (nuo *NoticeUpdateOne) Select(field string, fields ...string) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetCreated(t time.Time) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetDiscordWebhook(s string) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetMail(s string) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetModified(t time.Time) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetNillableCreated(t *time.Time) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetNillableDiscordWebhook(s *string) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetNillableMail(s *string) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetNillableSlackWebhook(s *string) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetSlackWebhook(s string) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) SetUserID(u uint32) *NoticeUpdateOne
- func (nuo *NoticeUpdateOne) Where(ps ...predicate.Notice) *NoticeUpdateOne
- type Notices
- type Op
- type Option
- type OrderFunc
- type Policy
- type Product
- type ProductClient
- func (c *ProductClient) Create() *ProductCreate
- func (c *ProductClient) CreateBulk(builders ...*ProductCreate) *ProductCreateBulk
- func (c *ProductClient) Delete() *ProductDelete
- func (c *ProductClient) DeleteOne(pr *Product) *ProductDeleteOne
- func (c *ProductClient) DeleteOneID(id uint32) *ProductDeleteOne
- func (c *ProductClient) Get(ctx context.Context, id uint32) (*Product, error)
- func (c *ProductClient) GetX(ctx context.Context, id uint32) *Product
- func (c *ProductClient) Hooks() []Hook
- func (c *ProductClient) Intercept(interceptors ...Interceptor)
- func (c *ProductClient) Interceptors() []Interceptor
- func (c *ProductClient) Query() *ProductQuery
- func (c *ProductClient) Update() *ProductUpdate
- func (c *ProductClient) UpdateOne(pr *Product) *ProductUpdateOne
- func (c *ProductClient) UpdateOneID(id uint32) *ProductUpdateOne
- func (c *ProductClient) Use(hooks ...Hook)
- type ProductCreate
- func (pc *ProductCreate) Exec(ctx context.Context) error
- func (pc *ProductCreate) ExecX(ctx context.Context)
- func (pc *ProductCreate) Mutation() *ProductMutation
- func (pc *ProductCreate) Save(ctx context.Context) (*Product, error)
- func (pc *ProductCreate) SaveX(ctx context.Context) *Product
- func (pc *ProductCreate) SetCreated(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetDetail(s string) *ProductCreate
- func (pc *ProductCreate) SetDetailJa(s string) *ProductCreate
- func (pc *ProductCreate) SetDevTime(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetGithubURL(s string) *ProductCreate
- func (pc *ProductCreate) SetID(u uint32) *ProductCreate
- func (pc *ProductCreate) SetModified(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetName(s string) *ProductCreate
- func (pc *ProductCreate) SetNameJa(s string) *ProductCreate
- func (pc *ProductCreate) SetNillableCreated(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetNillableGithubURL(s *string) *ProductCreate
- func (pc *ProductCreate) SetNillableModified(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetNillableThumbnail(s *string) *ProductCreate
- func (pc *ProductCreate) SetSiteURL(s string) *ProductCreate
- func (pc *ProductCreate) SetThumbnail(s string) *ProductCreate
- func (pc *ProductCreate) SetUserID(u uint32) *ProductCreate
- type ProductCreateBulk
- type ProductDelete
- type ProductDeleteOne
- type ProductGroupBy
- func (pgb *ProductGroupBy) Aggregate(fns ...AggregateFunc) *ProductGroupBy
- func (s *ProductGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductGroupBy) IntX(ctx context.Context) int
- func (s *ProductGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProductGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductGroupBy) StringX(ctx context.Context) string
- func (s *ProductGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductGroupBy) StringsX(ctx context.Context) []string
- type ProductMutation
- func (m *ProductMutation) AddField(name string, value ent.Value) error
- func (m *ProductMutation) AddUserID(u int32)
- func (m *ProductMutation) AddedEdges() []string
- func (m *ProductMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductMutation) AddedFields() []string
- func (m *ProductMutation) AddedIDs(name string) []ent.Value
- func (m *ProductMutation) AddedUserID() (r int32, exists bool)
- func (m *ProductMutation) ClearEdge(name string) error
- func (m *ProductMutation) ClearField(name string) error
- func (m *ProductMutation) ClearGithubURL()
- func (m *ProductMutation) ClearThumbnail()
- func (m *ProductMutation) ClearedEdges() []string
- func (m *ProductMutation) ClearedFields() []string
- func (m ProductMutation) Client() *Client
- func (m *ProductMutation) Created() (r time.Time, exists bool)
- func (m *ProductMutation) Detail() (r string, exists bool)
- func (m *ProductMutation) DetailJa() (r string, exists bool)
- func (m *ProductMutation) DevTime() (r time.Time, exists bool)
- func (m *ProductMutation) EdgeCleared(name string) bool
- func (m *ProductMutation) Field(name string) (ent.Value, bool)
- func (m *ProductMutation) FieldCleared(name string) bool
- func (m *ProductMutation) Fields() []string
- func (m *ProductMutation) GithubURL() (r string, exists bool)
- func (m *ProductMutation) GithubURLCleared() bool
- func (m *ProductMutation) ID() (id uint32, exists bool)
- func (m *ProductMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *ProductMutation) Modified() (r time.Time, exists bool)
- func (m *ProductMutation) Name() (r string, exists bool)
- func (m *ProductMutation) NameJa() (r string, exists bool)
- func (m *ProductMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *ProductMutation) OldDetail(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldDetailJa(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldDevTime(ctx context.Context) (v time.Time, err error)
- func (m *ProductMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductMutation) OldGithubURL(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldModified(ctx context.Context) (v time.Time, err error)
- func (m *ProductMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldNameJa(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldSiteURL(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldThumbnail(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldUserID(ctx context.Context) (v uint32, err error)
- func (m *ProductMutation) Op() Op
- func (m *ProductMutation) RemovedEdges() []string
- func (m *ProductMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductMutation) ResetCreated()
- func (m *ProductMutation) ResetDetail()
- func (m *ProductMutation) ResetDetailJa()
- func (m *ProductMutation) ResetDevTime()
- func (m *ProductMutation) ResetEdge(name string) error
- func (m *ProductMutation) ResetField(name string) error
- func (m *ProductMutation) ResetGithubURL()
- func (m *ProductMutation) ResetModified()
- func (m *ProductMutation) ResetName()
- func (m *ProductMutation) ResetNameJa()
- func (m *ProductMutation) ResetSiteURL()
- func (m *ProductMutation) ResetThumbnail()
- func (m *ProductMutation) ResetUserID()
- func (m *ProductMutation) SetCreated(t time.Time)
- func (m *ProductMutation) SetDetail(s string)
- func (m *ProductMutation) SetDetailJa(s string)
- func (m *ProductMutation) SetDevTime(t time.Time)
- func (m *ProductMutation) SetField(name string, value ent.Value) error
- func (m *ProductMutation) SetGithubURL(s string)
- func (m *ProductMutation) SetID(id uint32)
- func (m *ProductMutation) SetModified(t time.Time)
- func (m *ProductMutation) SetName(s string)
- func (m *ProductMutation) SetNameJa(s string)
- func (m *ProductMutation) SetOp(op Op)
- func (m *ProductMutation) SetSiteURL(s string)
- func (m *ProductMutation) SetThumbnail(s string)
- func (m *ProductMutation) SetUserID(u uint32)
- func (m *ProductMutation) SiteURL() (r string, exists bool)
- func (m *ProductMutation) Thumbnail() (r string, exists bool)
- func (m *ProductMutation) ThumbnailCleared() bool
- func (m ProductMutation) Tx() (*Tx, error)
- func (m *ProductMutation) Type() string
- func (m *ProductMutation) UserID() (r uint32, exists bool)
- func (m *ProductMutation) Where(ps ...predicate.Product)
- func (m *ProductMutation) WhereP(ps ...func(*sql.Selector))
- type ProductQuery
- func (pq *ProductQuery) Aggregate(fns ...AggregateFunc) *ProductSelect
- func (pq *ProductQuery) All(ctx context.Context) ([]*Product, error)
- func (pq *ProductQuery) AllX(ctx context.Context) []*Product
- func (pq *ProductQuery) Clone() *ProductQuery
- func (pq *ProductQuery) Count(ctx context.Context) (int, error)
- func (pq *ProductQuery) CountX(ctx context.Context) int
- func (pq *ProductQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProductQuery) ExistX(ctx context.Context) bool
- func (pq *ProductQuery) First(ctx context.Context) (*Product, error)
- func (pq *ProductQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (pq *ProductQuery) FirstIDX(ctx context.Context) uint32
- func (pq *ProductQuery) FirstX(ctx context.Context) *Product
- func (pq *ProductQuery) GroupBy(field string, fields ...string) *ProductGroupBy
- func (pq *ProductQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (pq *ProductQuery) IDsX(ctx context.Context) []uint32
- func (pq *ProductQuery) Limit(limit int) *ProductQuery
- func (pq *ProductQuery) Offset(offset int) *ProductQuery
- func (pq *ProductQuery) Only(ctx context.Context) (*Product, error)
- func (pq *ProductQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (pq *ProductQuery) OnlyIDX(ctx context.Context) uint32
- func (pq *ProductQuery) OnlyX(ctx context.Context) *Product
- func (pq *ProductQuery) Order(o ...OrderFunc) *ProductQuery
- func (pq *ProductQuery) Select(fields ...string) *ProductSelect
- func (pq *ProductQuery) Unique(unique bool) *ProductQuery
- func (pq *ProductQuery) Where(ps ...predicate.Product) *ProductQuery
- type ProductSelect
- func (ps *ProductSelect) Aggregate(fns ...AggregateFunc) *ProductSelect
- func (s *ProductSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductSelect) BoolX(ctx context.Context) bool
- func (s *ProductSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductSelect) Float64X(ctx context.Context) float64
- func (s *ProductSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductSelect) IntX(ctx context.Context) int
- func (s *ProductSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductSelect) IntsX(ctx context.Context) []int
- func (ps *ProductSelect) Scan(ctx context.Context, v any) error
- func (s *ProductSelect) ScanX(ctx context.Context, v any)
- func (s *ProductSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductSelect) StringX(ctx context.Context) string
- func (s *ProductSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductSelect) StringsX(ctx context.Context) []string
- type ProductUpdate
- func (pu *ProductUpdate) AddUserID(u int32) *ProductUpdate
- func (pu *ProductUpdate) ClearGithubURL() *ProductUpdate
- func (pu *ProductUpdate) ClearThumbnail() *ProductUpdate
- func (pu *ProductUpdate) Exec(ctx context.Context) error
- func (pu *ProductUpdate) ExecX(ctx context.Context)
- func (pu *ProductUpdate) Mutation() *ProductMutation
- func (pu *ProductUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProductUpdate) SaveX(ctx context.Context) int
- func (pu *ProductUpdate) SetCreated(t time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetDetail(s string) *ProductUpdate
- func (pu *ProductUpdate) SetDetailJa(s string) *ProductUpdate
- func (pu *ProductUpdate) SetDevTime(t time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetGithubURL(s string) *ProductUpdate
- func (pu *ProductUpdate) SetModified(t time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetName(s string) *ProductUpdate
- func (pu *ProductUpdate) SetNameJa(s string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableCreated(t *time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetNillableGithubURL(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableThumbnail(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetSiteURL(s string) *ProductUpdate
- func (pu *ProductUpdate) SetThumbnail(s string) *ProductUpdate
- func (pu *ProductUpdate) SetUserID(u uint32) *ProductUpdate
- func (pu *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate
- type ProductUpdateOne
- func (puo *ProductUpdateOne) AddUserID(u int32) *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearGithubURL() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearThumbnail() *ProductUpdateOne
- func (puo *ProductUpdateOne) Exec(ctx context.Context) error
- func (puo *ProductUpdateOne) ExecX(ctx context.Context)
- func (puo *ProductUpdateOne) Mutation() *ProductMutation
- func (puo *ProductUpdateOne) Save(ctx context.Context) (*Product, error)
- func (puo *ProductUpdateOne) SaveX(ctx context.Context) *Product
- func (puo *ProductUpdateOne) Select(field string, fields ...string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetCreated(t time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetDetail(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetDetailJa(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetDevTime(t time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetGithubURL(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetModified(t time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetName(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNameJa(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableCreated(t *time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableGithubURL(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableThumbnail(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetSiteURL(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetThumbnail(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetUserID(u uint32) *ProductUpdateOne
- func (puo *ProductUpdateOne) Where(ps ...predicate.Product) *ProductUpdateOne
- type Products
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Session
- type SessionClient
- func (c *SessionClient) Create() *SessionCreate
- func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
- func (c *SessionClient) Delete() *SessionDelete
- func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
- func (c *SessionClient) DeleteOneID(id uuid.UUID) *SessionDeleteOne
- func (c *SessionClient) Get(ctx context.Context, id uuid.UUID) (*Session, error)
- func (c *SessionClient) GetX(ctx context.Context, id uuid.UUID) *Session
- func (c *SessionClient) Hooks() []Hook
- func (c *SessionClient) Intercept(interceptors ...Interceptor)
- func (c *SessionClient) Interceptors() []Interceptor
- func (c *SessionClient) Query() *SessionQuery
- func (c *SessionClient) Update() *SessionUpdate
- func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
- func (c *SessionClient) UpdateOneID(id uuid.UUID) *SessionUpdateOne
- func (c *SessionClient) Use(hooks ...Hook)
- type SessionCreate
- func (sc *SessionCreate) Exec(ctx context.Context) error
- func (sc *SessionCreate) ExecX(ctx context.Context)
- func (sc *SessionCreate) Mutation() *SessionMutation
- func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
- func (sc *SessionCreate) SaveX(ctx context.Context) *Session
- func (sc *SessionCreate) SetCreated(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetID(u uuid.UUID) *SessionCreate
- func (sc *SessionCreate) SetNillableCreated(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableID(u *uuid.UUID) *SessionCreate
- func (sc *SessionCreate) SetPeriod(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetUserID(u uint32) *SessionCreate
- type SessionCreateBulk
- type SessionDelete
- type SessionDeleteOne
- type SessionGroupBy
- func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
- func (s *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SessionGroupBy) BoolX(ctx context.Context) bool
- func (s *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SessionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SessionGroupBy) Float64X(ctx context.Context) float64
- func (s *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SessionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SessionGroupBy) IntX(ctx context.Context) int
- func (s *SessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SessionGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SessionGroupBy) Scan(ctx context.Context, v any) error
- func (s *SessionGroupBy) ScanX(ctx context.Context, v any)
- func (s *SessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SessionGroupBy) StringX(ctx context.Context) string
- func (s *SessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SessionGroupBy) StringsX(ctx context.Context) []string
- type SessionMutation
- func (m *SessionMutation) AddField(name string, value ent.Value) error
- func (m *SessionMutation) AddUserID(u int32)
- func (m *SessionMutation) AddedEdges() []string
- func (m *SessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *SessionMutation) AddedFields() []string
- func (m *SessionMutation) AddedIDs(name string) []ent.Value
- func (m *SessionMutation) AddedUserID() (r int32, exists bool)
- func (m *SessionMutation) ClearEdge(name string) error
- func (m *SessionMutation) ClearField(name string) error
- func (m *SessionMutation) ClearedEdges() []string
- func (m *SessionMutation) ClearedFields() []string
- func (m SessionMutation) Client() *Client
- func (m *SessionMutation) Created() (r time.Time, exists bool)
- func (m *SessionMutation) EdgeCleared(name string) bool
- func (m *SessionMutation) Field(name string) (ent.Value, bool)
- func (m *SessionMutation) FieldCleared(name string) bool
- func (m *SessionMutation) Fields() []string
- func (m *SessionMutation) ID() (id uuid.UUID, exists bool)
- func (m *SessionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SessionMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SessionMutation) OldPeriod(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) OldUserID(ctx context.Context) (v uint32, err error)
- func (m *SessionMutation) Op() Op
- func (m *SessionMutation) Period() (r time.Time, exists bool)
- func (m *SessionMutation) RemovedEdges() []string
- func (m *SessionMutation) RemovedIDs(name string) []ent.Value
- func (m *SessionMutation) ResetCreated()
- func (m *SessionMutation) ResetEdge(name string) error
- func (m *SessionMutation) ResetField(name string) error
- func (m *SessionMutation) ResetPeriod()
- func (m *SessionMutation) ResetUserID()
- func (m *SessionMutation) SetCreated(t time.Time)
- func (m *SessionMutation) SetField(name string, value ent.Value) error
- func (m *SessionMutation) SetID(id uuid.UUID)
- func (m *SessionMutation) SetOp(op Op)
- func (m *SessionMutation) SetPeriod(t time.Time)
- func (m *SessionMutation) SetUserID(u uint32)
- func (m SessionMutation) Tx() (*Tx, error)
- func (m *SessionMutation) Type() string
- func (m *SessionMutation) UserID() (r uint32, exists bool)
- func (m *SessionMutation) Where(ps ...predicate.Session)
- func (m *SessionMutation) WhereP(ps ...func(*sql.Selector))
- type SessionQuery
- func (sq *SessionQuery) Aggregate(fns ...AggregateFunc) *SessionSelect
- func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
- func (sq *SessionQuery) AllX(ctx context.Context) []*Session
- func (sq *SessionQuery) Clone() *SessionQuery
- func (sq *SessionQuery) Count(ctx context.Context) (int, error)
- func (sq *SessionQuery) CountX(ctx context.Context) int
- func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SessionQuery) ExistX(ctx context.Context) bool
- func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SessionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *SessionQuery) FirstX(ctx context.Context) *Session
- func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
- func (sq *SessionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sq *SessionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *SessionQuery) Limit(limit int) *SessionQuery
- func (sq *SessionQuery) Offset(offset int) *SessionQuery
- func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SessionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
- func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
- func (sq *SessionQuery) Select(fields ...string) *SessionSelect
- func (sq *SessionQuery) Unique(unique bool) *SessionQuery
- func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
- type SessionSelect
- func (ss *SessionSelect) Aggregate(fns ...AggregateFunc) *SessionSelect
- func (s *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SessionSelect) BoolX(ctx context.Context) bool
- func (s *SessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SessionSelect) BoolsX(ctx context.Context) []bool
- func (s *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SessionSelect) Float64X(ctx context.Context) float64
- func (s *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SessionSelect) Float64sX(ctx context.Context) []float64
- func (s *SessionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SessionSelect) IntX(ctx context.Context) int
- func (s *SessionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SessionSelect) IntsX(ctx context.Context) []int
- func (ss *SessionSelect) Scan(ctx context.Context, v any) error
- func (s *SessionSelect) ScanX(ctx context.Context, v any)
- func (s *SessionSelect) String(ctx context.Context) (_ string, err error)
- func (s *SessionSelect) StringX(ctx context.Context) string
- func (s *SessionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SessionSelect) StringsX(ctx context.Context) []string
- type SessionUpdate
- func (su *SessionUpdate) AddUserID(u int32) *SessionUpdate
- func (su *SessionUpdate) Exec(ctx context.Context) error
- func (su *SessionUpdate) ExecX(ctx context.Context)
- func (su *SessionUpdate) Mutation() *SessionMutation
- func (su *SessionUpdate) Save(ctx context.Context) (int, error)
- func (su *SessionUpdate) SaveX(ctx context.Context) int
- func (su *SessionUpdate) SetCreated(t time.Time) *SessionUpdate
- func (su *SessionUpdate) SetNillableCreated(t *time.Time) *SessionUpdate
- func (su *SessionUpdate) SetPeriod(t time.Time) *SessionUpdate
- func (su *SessionUpdate) SetUserID(u uint32) *SessionUpdate
- func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
- type SessionUpdateOne
- func (suo *SessionUpdateOne) AddUserID(u int32) *SessionUpdateOne
- func (suo *SessionUpdateOne) Exec(ctx context.Context) error
- func (suo *SessionUpdateOne) ExecX(ctx context.Context)
- func (suo *SessionUpdateOne) Mutation() *SessionMutation
- func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
- func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
- func (suo *SessionUpdateOne) Select(field string, fields ...string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetCreated(t time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableCreated(t *time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetPeriod(t time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetUserID(u uint32) *SessionUpdateOne
- func (suo *SessionUpdateOne) Where(ps ...predicate.Session) *SessionUpdateOne
- type Sessions
- type TraverseFunc
- type Traverser
- 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 uint32) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uint32) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uint32) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uint32) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type 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) SetAvatarURL(s string) *UserCreate
- func (uc *UserCreate) SetBirthDate(t time.Time) *UserCreate
- func (uc *UserCreate) SetCreated(t time.Time) *UserCreate
- func (uc *UserCreate) SetFamilyName(s string) *UserCreate
- func (uc *UserCreate) SetFamilyNameJa(s string) *UserCreate
- func (uc *UserCreate) SetGivenName(s string) *UserCreate
- func (uc *UserCreate) SetGivenNameJa(s string) *UserCreate
- func (uc *UserCreate) SetID(u uint32) *UserCreate
- func (uc *UserCreate) SetLocation(s string) *UserCreate
- func (uc *UserCreate) SetLocationJa(s string) *UserCreate
- func (uc *UserCreate) SetMail(s string) *UserCreate
- func (uc *UserCreate) SetModified(t time.Time) *UserCreate
- func (uc *UserCreate) SetNillableAvatarURL(s *string) *UserCreate
- func (uc *UserCreate) SetNillableCreated(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableModified(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableSelected(b *bool) *UserCreate
- func (uc *UserCreate) SetSSOToken(s string) *UserCreate
- func (uc *UserCreate) SetSelected(b bool) *UserCreate
- func (uc *UserCreate) SetUserID(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) 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) AvatarURL() (r string, exists bool)
- func (m *UserMutation) AvatarURLCleared() bool
- func (m *UserMutation) BirthDate() (r time.Time, exists bool)
- func (m *UserMutation) ClearAvatarURL()
- 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) Created() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) FamilyName() (r string, exists bool)
- func (m *UserMutation) FamilyNameJa() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) GivenName() (r string, exists bool)
- func (m *UserMutation) GivenNameJa() (r string, exists bool)
- func (m *UserMutation) ID() (id uint32, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *UserMutation) Location() (r string, exists bool)
- func (m *UserMutation) LocationJa() (r string, exists bool)
- func (m *UserMutation) Mail() (r string, exists bool)
- func (m *UserMutation) Modified() (r time.Time, exists bool)
- func (m *UserMutation) OldAvatarURL(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldBirthDate(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldFamilyName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldFamilyNameJa(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldGivenName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldGivenNameJa(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldLocation(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldLocationJa(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldMail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldModified(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldSSOToken(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldSelected(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetAvatarURL()
- func (m *UserMutation) ResetBirthDate()
- func (m *UserMutation) ResetCreated()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetFamilyName()
- func (m *UserMutation) ResetFamilyNameJa()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetGivenName()
- func (m *UserMutation) ResetGivenNameJa()
- func (m *UserMutation) ResetLocation()
- func (m *UserMutation) ResetLocationJa()
- func (m *UserMutation) ResetMail()
- func (m *UserMutation) ResetModified()
- func (m *UserMutation) ResetSSOToken()
- func (m *UserMutation) ResetSelected()
- func (m *UserMutation) ResetUserID()
- func (m *UserMutation) SSOToken() (r string, exists bool)
- func (m *UserMutation) Selected() (r bool, exists bool)
- func (m *UserMutation) SetAvatarURL(s string)
- func (m *UserMutation) SetBirthDate(t time.Time)
- func (m *UserMutation) SetCreated(t time.Time)
- func (m *UserMutation) SetFamilyName(s string)
- func (m *UserMutation) SetFamilyNameJa(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetGivenName(s string)
- func (m *UserMutation) SetGivenNameJa(s string)
- func (m *UserMutation) SetID(id uint32)
- func (m *UserMutation) SetLocation(s string)
- func (m *UserMutation) SetLocationJa(s string)
- func (m *UserMutation) SetMail(s string)
- func (m *UserMutation) SetModified(t time.Time)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetSSOToken(s string)
- func (m *UserMutation) SetSelected(b bool)
- func (m *UserMutation) SetUserID(s string)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UserID() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (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 uint32, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uint32
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uint32
- 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 uint32, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uint32
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) ClearAvatarURL() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAvatarURL(s string) *UserUpdate
- func (uu *UserUpdate) SetBirthDate(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetCreated(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetFamilyName(s string) *UserUpdate
- func (uu *UserUpdate) SetFamilyNameJa(s string) *UserUpdate
- func (uu *UserUpdate) SetGivenName(s string) *UserUpdate
- func (uu *UserUpdate) SetGivenNameJa(s string) *UserUpdate
- func (uu *UserUpdate) SetLocation(s string) *UserUpdate
- func (uu *UserUpdate) SetLocationJa(s string) *UserUpdate
- func (uu *UserUpdate) SetMail(s string) *UserUpdate
- func (uu *UserUpdate) SetModified(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableAvatarURL(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableCreated(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableSelected(b *bool) *UserUpdate
- func (uu *UserUpdate) SetSSOToken(s string) *UserUpdate
- func (uu *UserUpdate) SetSelected(b bool) *UserUpdate
- func (uu *UserUpdate) SetUserID(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) ClearAvatarURL() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- 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) SetAvatarURL(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBirthDate(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreated(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFamilyName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFamilyNameJa(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGivenName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGivenNameJa(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLocation(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLocationJa(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetModified(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAvatarURL(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreated(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableSelected(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSSOToken(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSelected(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUserID(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *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. TypeBiography = "Biography" TypeCategory = "Category" TypeContact = "Contact" TypeContactDefault = "ContactDefault" TypeLink = "Link" TypeLocation = "Location" TypeNotice = "Notice" TypeProduct = "Product" TypeSession = "Session" 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 Biography ¶
type Biography struct { // ID of the ent. ID uint32 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID uint32 `json:"user_id,omitempty"` // IsPublic holds the value of the "is_public" field. IsPublic bool `json:"is_public,omitempty"` // LocationID holds the value of the "location_id" field. LocationID uint32 `json:"location_id,omitempty"` // Position holds the value of the "position" field. Position string `json:"position,omitempty"` // PositionJa holds the value of the "position_ja" field. PositionJa string `json:"position_ja,omitempty"` // Join holds the value of the "join" field. Join time.Time `json:"join,omitempty"` // Leave holds the value of the "leave" field. Leave time.Time `json:"leave,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Modified holds the value of the "modified" field. Modified time.Time `json:"modified,omitempty"` // contains filtered or unexported fields }
Biography is the model entity for the Biography schema.
func (*Biography) Unwrap ¶
Unwrap unwraps the Biography 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 (*Biography) Update ¶
func (b *Biography) Update() *BiographyUpdateOne
Update returns a builder for updating this Biography. Note that you need to call Biography.Unwrap() before calling this method if this Biography was returned from a transaction, and the transaction was committed or rolled back.
type BiographyClient ¶
type BiographyClient struct {
// contains filtered or unexported fields
}
BiographyClient is a client for the Biography schema.
func NewBiographyClient ¶
func NewBiographyClient(c config) *BiographyClient
NewBiographyClient returns a client for the Biography from the given config.
func (*BiographyClient) Create ¶
func (c *BiographyClient) Create() *BiographyCreate
Create returns a builder for creating a Biography entity.
func (*BiographyClient) CreateBulk ¶
func (c *BiographyClient) CreateBulk(builders ...*BiographyCreate) *BiographyCreateBulk
CreateBulk returns a builder for creating a bulk of Biography entities.
func (*BiographyClient) Delete ¶
func (c *BiographyClient) Delete() *BiographyDelete
Delete returns a delete builder for Biography.
func (*BiographyClient) DeleteOne ¶
func (c *BiographyClient) DeleteOne(b *Biography) *BiographyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BiographyClient) DeleteOneID ¶
func (c *BiographyClient) DeleteOneID(id uint32) *BiographyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BiographyClient) GetX ¶
func (c *BiographyClient) GetX(ctx context.Context, id uint32) *Biography
GetX is like Get, but panics if an error occurs.
func (*BiographyClient) Hooks ¶
func (c *BiographyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*BiographyClient) Intercept ¶
func (c *BiographyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `biography.Intercept(f(g(h())))`.
func (*BiographyClient) Interceptors ¶
func (c *BiographyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BiographyClient) Query ¶
func (c *BiographyClient) Query() *BiographyQuery
Query returns a query builder for Biography.
func (*BiographyClient) Update ¶
func (c *BiographyClient) Update() *BiographyUpdate
Update returns an update builder for Biography.
func (*BiographyClient) UpdateOne ¶
func (c *BiographyClient) UpdateOne(b *Biography) *BiographyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BiographyClient) UpdateOneID ¶
func (c *BiographyClient) UpdateOneID(id uint32) *BiographyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BiographyClient) Use ¶
func (c *BiographyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `biography.Hooks(f(g(h())))`.
type BiographyCreate ¶
type BiographyCreate struct {
// contains filtered or unexported fields
}
BiographyCreate is the builder for creating a Biography entity.
func (*BiographyCreate) Exec ¶
func (bc *BiographyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BiographyCreate) ExecX ¶
func (bc *BiographyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BiographyCreate) Mutation ¶
func (bc *BiographyCreate) Mutation() *BiographyMutation
Mutation returns the BiographyMutation object of the builder.
func (*BiographyCreate) Save ¶
func (bc *BiographyCreate) Save(ctx context.Context) (*Biography, error)
Save creates the Biography in the database.
func (*BiographyCreate) SaveX ¶
func (bc *BiographyCreate) SaveX(ctx context.Context) *Biography
SaveX calls Save and panics if Save returns an error.
func (*BiographyCreate) SetCreated ¶
func (bc *BiographyCreate) SetCreated(t time.Time) *BiographyCreate
SetCreated sets the "created" field.
func (*BiographyCreate) SetID ¶
func (bc *BiographyCreate) SetID(u uint32) *BiographyCreate
SetID sets the "id" field.
func (*BiographyCreate) SetIsPublic ¶
func (bc *BiographyCreate) SetIsPublic(b bool) *BiographyCreate
SetIsPublic sets the "is_public" field.
func (*BiographyCreate) SetJoin ¶
func (bc *BiographyCreate) SetJoin(t time.Time) *BiographyCreate
SetJoin sets the "join" field.
func (*BiographyCreate) SetLeave ¶
func (bc *BiographyCreate) SetLeave(t time.Time) *BiographyCreate
SetLeave sets the "leave" field.
func (*BiographyCreate) SetLocationID ¶
func (bc *BiographyCreate) SetLocationID(u uint32) *BiographyCreate
SetLocationID sets the "location_id" field.
func (*BiographyCreate) SetModified ¶
func (bc *BiographyCreate) SetModified(t time.Time) *BiographyCreate
SetModified sets the "modified" field.
func (*BiographyCreate) SetNillableCreated ¶
func (bc *BiographyCreate) SetNillableCreated(t *time.Time) *BiographyCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*BiographyCreate) SetNillableIsPublic ¶
func (bc *BiographyCreate) SetNillableIsPublic(b *bool) *BiographyCreate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*BiographyCreate) SetNillableLeave ¶
func (bc *BiographyCreate) SetNillableLeave(t *time.Time) *BiographyCreate
SetNillableLeave sets the "leave" field if the given value is not nil.
func (*BiographyCreate) SetNillableModified ¶
func (bc *BiographyCreate) SetNillableModified(t *time.Time) *BiographyCreate
SetNillableModified sets the "modified" field if the given value is not nil.
func (*BiographyCreate) SetPosition ¶
func (bc *BiographyCreate) SetPosition(s string) *BiographyCreate
SetPosition sets the "position" field.
func (*BiographyCreate) SetPositionJa ¶
func (bc *BiographyCreate) SetPositionJa(s string) *BiographyCreate
SetPositionJa sets the "position_ja" field.
func (*BiographyCreate) SetUserID ¶
func (bc *BiographyCreate) SetUserID(u uint32) *BiographyCreate
SetUserID sets the "user_id" field.
type BiographyCreateBulk ¶
type BiographyCreateBulk struct {
// contains filtered or unexported fields
}
BiographyCreateBulk is the builder for creating many Biography entities in bulk.
func (*BiographyCreateBulk) Exec ¶
func (bcb *BiographyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BiographyCreateBulk) ExecX ¶
func (bcb *BiographyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BiographyDelete ¶
type BiographyDelete struct {
// contains filtered or unexported fields
}
BiographyDelete is the builder for deleting a Biography entity.
func (*BiographyDelete) Exec ¶
func (bd *BiographyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BiographyDelete) ExecX ¶
func (bd *BiographyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BiographyDelete) Where ¶
func (bd *BiographyDelete) Where(ps ...predicate.Biography) *BiographyDelete
Where appends a list predicates to the BiographyDelete builder.
type BiographyDeleteOne ¶
type BiographyDeleteOne struct {
// contains filtered or unexported fields
}
BiographyDeleteOne is the builder for deleting a single Biography entity.
func (*BiographyDeleteOne) Exec ¶
func (bdo *BiographyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BiographyDeleteOne) ExecX ¶
func (bdo *BiographyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BiographyDeleteOne) Where ¶
func (bdo *BiographyDeleteOne) Where(ps ...predicate.Biography) *BiographyDeleteOne
Where appends a list predicates to the BiographyDelete builder.
type BiographyGroupBy ¶
type BiographyGroupBy struct {
// contains filtered or unexported fields
}
BiographyGroupBy is the group-by builder for Biography entities.
func (*BiographyGroupBy) Aggregate ¶
func (bgb *BiographyGroupBy) Aggregate(fns ...AggregateFunc) *BiographyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BiographyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BiographyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BiographyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BiographyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BiographyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BiographyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BiographyGroupBy) Scan ¶
func (bgb *BiographyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BiographyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BiographyMutation ¶
type BiographyMutation struct {
// contains filtered or unexported fields
}
BiographyMutation represents an operation that mutates the Biography nodes in the graph.
func (*BiographyMutation) AddField ¶
func (m *BiographyMutation) 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 (*BiographyMutation) AddLocationID ¶
func (m *BiographyMutation) AddLocationID(u int32)
AddLocationID adds u to the "location_id" field.
func (*BiographyMutation) AddUserID ¶
func (m *BiographyMutation) AddUserID(u int32)
AddUserID adds u to the "user_id" field.
func (*BiographyMutation) AddedEdges ¶
func (m *BiographyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BiographyMutation) AddedField ¶
func (m *BiographyMutation) 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 (*BiographyMutation) AddedFields ¶
func (m *BiographyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BiographyMutation) AddedIDs ¶
func (m *BiographyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BiographyMutation) AddedLocationID ¶
func (m *BiographyMutation) AddedLocationID() (r int32, exists bool)
AddedLocationID returns the value that was added to the "location_id" field in this mutation.
func (*BiographyMutation) AddedUserID ¶
func (m *BiographyMutation) AddedUserID() (r int32, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*BiographyMutation) ClearEdge ¶
func (m *BiographyMutation) 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 (*BiographyMutation) ClearField ¶
func (m *BiographyMutation) 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 (*BiographyMutation) ClearLeave ¶
func (m *BiographyMutation) ClearLeave()
ClearLeave clears the value of the "leave" field.
func (*BiographyMutation) ClearedEdges ¶
func (m *BiographyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BiographyMutation) ClearedFields ¶
func (m *BiographyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BiographyMutation) Client ¶
func (m BiographyMutation) 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 (*BiographyMutation) Created ¶
func (m *BiographyMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*BiographyMutation) EdgeCleared ¶
func (m *BiographyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BiographyMutation) Field ¶
func (m *BiographyMutation) 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 (*BiographyMutation) FieldCleared ¶
func (m *BiographyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BiographyMutation) Fields ¶
func (m *BiographyMutation) 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 (*BiographyMutation) ID ¶
func (m *BiographyMutation) ID() (id uint32, 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 (*BiographyMutation) IDs ¶
func (m *BiographyMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*BiographyMutation) IsPublic ¶
func (m *BiographyMutation) IsPublic() (r bool, exists bool)
IsPublic returns the value of the "is_public" field in the mutation.
func (*BiographyMutation) Join ¶
func (m *BiographyMutation) Join() (r time.Time, exists bool)
Join returns the value of the "join" field in the mutation.
func (*BiographyMutation) Leave ¶
func (m *BiographyMutation) Leave() (r time.Time, exists bool)
Leave returns the value of the "leave" field in the mutation.
func (*BiographyMutation) LeaveCleared ¶
func (m *BiographyMutation) LeaveCleared() bool
LeaveCleared returns if the "leave" field was cleared in this mutation.
func (*BiographyMutation) LocationID ¶
func (m *BiographyMutation) LocationID() (r uint32, exists bool)
LocationID returns the value of the "location_id" field in the mutation.
func (*BiographyMutation) Modified ¶
func (m *BiographyMutation) Modified() (r time.Time, exists bool)
Modified returns the value of the "modified" field in the mutation.
func (*BiographyMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the Biography entity. If the Biography 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 (*BiographyMutation) 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 (*BiographyMutation) OldIsPublic ¶
func (m *BiographyMutation) OldIsPublic(ctx context.Context) (v bool, err error)
OldIsPublic returns the old "is_public" field's value of the Biography entity. If the Biography 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 (*BiographyMutation) OldJoin ¶
OldJoin returns the old "join" field's value of the Biography entity. If the Biography 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 (*BiographyMutation) OldLeave ¶
OldLeave returns the old "leave" field's value of the Biography entity. If the Biography 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 (*BiographyMutation) OldLocationID ¶
func (m *BiographyMutation) OldLocationID(ctx context.Context) (v uint32, err error)
OldLocationID returns the old "location_id" field's value of the Biography entity. If the Biography 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 (*BiographyMutation) OldModified ¶
OldModified returns the old "modified" field's value of the Biography entity. If the Biography 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 (*BiographyMutation) OldPosition ¶
func (m *BiographyMutation) OldPosition(ctx context.Context) (v string, err error)
OldPosition returns the old "position" field's value of the Biography entity. If the Biography 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 (*BiographyMutation) OldPositionJa ¶
func (m *BiographyMutation) OldPositionJa(ctx context.Context) (v string, err error)
OldPositionJa returns the old "position_ja" field's value of the Biography entity. If the Biography 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 (*BiographyMutation) OldUserID ¶
func (m *BiographyMutation) OldUserID(ctx context.Context) (v uint32, err error)
OldUserID returns the old "user_id" field's value of the Biography entity. If the Biography 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 (*BiographyMutation) Position ¶
func (m *BiographyMutation) Position() (r string, exists bool)
Position returns the value of the "position" field in the mutation.
func (*BiographyMutation) PositionJa ¶
func (m *BiographyMutation) PositionJa() (r string, exists bool)
PositionJa returns the value of the "position_ja" field in the mutation.
func (*BiographyMutation) RemovedEdges ¶
func (m *BiographyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BiographyMutation) RemovedIDs ¶
func (m *BiographyMutation) 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 (*BiographyMutation) ResetCreated ¶
func (m *BiographyMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*BiographyMutation) ResetEdge ¶
func (m *BiographyMutation) 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 (*BiographyMutation) ResetField ¶
func (m *BiographyMutation) 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 (*BiographyMutation) ResetIsPublic ¶
func (m *BiographyMutation) ResetIsPublic()
ResetIsPublic resets all changes to the "is_public" field.
func (*BiographyMutation) ResetJoin ¶
func (m *BiographyMutation) ResetJoin()
ResetJoin resets all changes to the "join" field.
func (*BiographyMutation) ResetLeave ¶
func (m *BiographyMutation) ResetLeave()
ResetLeave resets all changes to the "leave" field.
func (*BiographyMutation) ResetLocationID ¶
func (m *BiographyMutation) ResetLocationID()
ResetLocationID resets all changes to the "location_id" field.
func (*BiographyMutation) ResetModified ¶
func (m *BiographyMutation) ResetModified()
ResetModified resets all changes to the "modified" field.
func (*BiographyMutation) ResetPosition ¶
func (m *BiographyMutation) ResetPosition()
ResetPosition resets all changes to the "position" field.
func (*BiographyMutation) ResetPositionJa ¶
func (m *BiographyMutation) ResetPositionJa()
ResetPositionJa resets all changes to the "position_ja" field.
func (*BiographyMutation) ResetUserID ¶
func (m *BiographyMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*BiographyMutation) SetCreated ¶
func (m *BiographyMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*BiographyMutation) SetField ¶
func (m *BiographyMutation) 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 (*BiographyMutation) SetID ¶
func (m *BiographyMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Biography entities.
func (*BiographyMutation) SetIsPublic ¶
func (m *BiographyMutation) SetIsPublic(b bool)
SetIsPublic sets the "is_public" field.
func (*BiographyMutation) SetJoin ¶
func (m *BiographyMutation) SetJoin(t time.Time)
SetJoin sets the "join" field.
func (*BiographyMutation) SetLeave ¶
func (m *BiographyMutation) SetLeave(t time.Time)
SetLeave sets the "leave" field.
func (*BiographyMutation) SetLocationID ¶
func (m *BiographyMutation) SetLocationID(u uint32)
SetLocationID sets the "location_id" field.
func (*BiographyMutation) SetModified ¶
func (m *BiographyMutation) SetModified(t time.Time)
SetModified sets the "modified" field.
func (*BiographyMutation) SetOp ¶
func (m *BiographyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BiographyMutation) SetPosition ¶
func (m *BiographyMutation) SetPosition(s string)
SetPosition sets the "position" field.
func (*BiographyMutation) SetPositionJa ¶
func (m *BiographyMutation) SetPositionJa(s string)
SetPositionJa sets the "position_ja" field.
func (*BiographyMutation) SetUserID ¶
func (m *BiographyMutation) SetUserID(u uint32)
SetUserID sets the "user_id" field.
func (BiographyMutation) Tx ¶
func (m BiographyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BiographyMutation) Type ¶
func (m *BiographyMutation) Type() string
Type returns the node type of this mutation (Biography).
func (*BiographyMutation) UserID ¶
func (m *BiographyMutation) UserID() (r uint32, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*BiographyMutation) Where ¶
func (m *BiographyMutation) Where(ps ...predicate.Biography)
Where appends a list predicates to the BiographyMutation builder.
func (*BiographyMutation) WhereP ¶
func (m *BiographyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BiographyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BiographyQuery ¶
type BiographyQuery struct {
// contains filtered or unexported fields
}
BiographyQuery is the builder for querying Biography entities.
func (*BiographyQuery) Aggregate ¶
func (bq *BiographyQuery) Aggregate(fns ...AggregateFunc) *BiographySelect
Aggregate returns a BiographySelect configured with the given aggregations.
func (*BiographyQuery) All ¶
func (bq *BiographyQuery) All(ctx context.Context) ([]*Biography, error)
All executes the query and returns a list of Biographies.
func (*BiographyQuery) AllX ¶
func (bq *BiographyQuery) AllX(ctx context.Context) []*Biography
AllX is like All, but panics if an error occurs.
func (*BiographyQuery) Clone ¶
func (bq *BiographyQuery) Clone() *BiographyQuery
Clone returns a duplicate of the BiographyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BiographyQuery) Count ¶
func (bq *BiographyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BiographyQuery) CountX ¶
func (bq *BiographyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BiographyQuery) Exist ¶
func (bq *BiographyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BiographyQuery) ExistX ¶
func (bq *BiographyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BiographyQuery) First ¶
func (bq *BiographyQuery) First(ctx context.Context) (*Biography, error)
First returns the first Biography entity from the query. Returns a *NotFoundError when no Biography was found.
func (*BiographyQuery) FirstID ¶
func (bq *BiographyQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first Biography ID from the query. Returns a *NotFoundError when no Biography ID was found.
func (*BiographyQuery) FirstIDX ¶
func (bq *BiographyQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*BiographyQuery) FirstX ¶
func (bq *BiographyQuery) FirstX(ctx context.Context) *Biography
FirstX is like First, but panics if an error occurs.
func (*BiographyQuery) GroupBy ¶
func (bq *BiographyQuery) GroupBy(field string, fields ...string) *BiographyGroupBy
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 { UserID uint32 `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Biography.Query(). GroupBy(biography.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BiographyQuery) IDs ¶
func (bq *BiographyQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of Biography IDs.
func (*BiographyQuery) IDsX ¶
func (bq *BiographyQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*BiographyQuery) Limit ¶
func (bq *BiographyQuery) Limit(limit int) *BiographyQuery
Limit the number of records to be returned by this query.
func (*BiographyQuery) Offset ¶
func (bq *BiographyQuery) Offset(offset int) *BiographyQuery
Offset to start from.
func (*BiographyQuery) Only ¶
func (bq *BiographyQuery) Only(ctx context.Context) (*Biography, error)
Only returns a single Biography entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Biography entity is found. Returns a *NotFoundError when no Biography entities are found.
func (*BiographyQuery) OnlyID ¶
func (bq *BiographyQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only Biography ID in the query. Returns a *NotSingularError when more than one Biography ID is found. Returns a *NotFoundError when no entities are found.
func (*BiographyQuery) OnlyIDX ¶
func (bq *BiographyQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BiographyQuery) OnlyX ¶
func (bq *BiographyQuery) OnlyX(ctx context.Context) *Biography
OnlyX is like Only, but panics if an error occurs.
func (*BiographyQuery) Order ¶
func (bq *BiographyQuery) Order(o ...OrderFunc) *BiographyQuery
Order specifies how the records should be ordered.
func (*BiographyQuery) Select ¶
func (bq *BiographyQuery) Select(fields ...string) *BiographySelect
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 { UserID uint32 `json:"user_id,omitempty"` } client.Biography.Query(). Select(biography.FieldUserID). Scan(ctx, &v)
func (*BiographyQuery) Unique ¶
func (bq *BiographyQuery) Unique(unique bool) *BiographyQuery
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 (*BiographyQuery) Where ¶
func (bq *BiographyQuery) Where(ps ...predicate.Biography) *BiographyQuery
Where adds a new predicate for the BiographyQuery builder.
type BiographySelect ¶
type BiographySelect struct { *BiographyQuery // contains filtered or unexported fields }
BiographySelect is the builder for selecting fields of Biography entities.
func (*BiographySelect) Aggregate ¶
func (bs *BiographySelect) Aggregate(fns ...AggregateFunc) *BiographySelect
Aggregate adds the given aggregation functions to the selector query.
func (*BiographySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BiographySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BiographySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BiographySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BiographySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BiographySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BiographySelect) Scan ¶
func (bs *BiographySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BiographySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BiographyUpdate ¶
type BiographyUpdate struct {
// contains filtered or unexported fields
}
BiographyUpdate is the builder for updating Biography entities.
func (*BiographyUpdate) AddLocationID ¶
func (bu *BiographyUpdate) AddLocationID(u int32) *BiographyUpdate
AddLocationID adds u to the "location_id" field.
func (*BiographyUpdate) AddUserID ¶
func (bu *BiographyUpdate) AddUserID(u int32) *BiographyUpdate
AddUserID adds u to the "user_id" field.
func (*BiographyUpdate) ClearLeave ¶
func (bu *BiographyUpdate) ClearLeave() *BiographyUpdate
ClearLeave clears the value of the "leave" field.
func (*BiographyUpdate) Exec ¶
func (bu *BiographyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BiographyUpdate) ExecX ¶
func (bu *BiographyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BiographyUpdate) Mutation ¶
func (bu *BiographyUpdate) Mutation() *BiographyMutation
Mutation returns the BiographyMutation object of the builder.
func (*BiographyUpdate) Save ¶
func (bu *BiographyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BiographyUpdate) SaveX ¶
func (bu *BiographyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BiographyUpdate) SetCreated ¶
func (bu *BiographyUpdate) SetCreated(t time.Time) *BiographyUpdate
SetCreated sets the "created" field.
func (*BiographyUpdate) SetIsPublic ¶
func (bu *BiographyUpdate) SetIsPublic(b bool) *BiographyUpdate
SetIsPublic sets the "is_public" field.
func (*BiographyUpdate) SetJoin ¶
func (bu *BiographyUpdate) SetJoin(t time.Time) *BiographyUpdate
SetJoin sets the "join" field.
func (*BiographyUpdate) SetLeave ¶
func (bu *BiographyUpdate) SetLeave(t time.Time) *BiographyUpdate
SetLeave sets the "leave" field.
func (*BiographyUpdate) SetLocationID ¶
func (bu *BiographyUpdate) SetLocationID(u uint32) *BiographyUpdate
SetLocationID sets the "location_id" field.
func (*BiographyUpdate) SetModified ¶
func (bu *BiographyUpdate) SetModified(t time.Time) *BiographyUpdate
SetModified sets the "modified" field.
func (*BiographyUpdate) SetNillableCreated ¶
func (bu *BiographyUpdate) SetNillableCreated(t *time.Time) *BiographyUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*BiographyUpdate) SetNillableIsPublic ¶
func (bu *BiographyUpdate) SetNillableIsPublic(b *bool) *BiographyUpdate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*BiographyUpdate) SetNillableLeave ¶
func (bu *BiographyUpdate) SetNillableLeave(t *time.Time) *BiographyUpdate
SetNillableLeave sets the "leave" field if the given value is not nil.
func (*BiographyUpdate) SetPosition ¶
func (bu *BiographyUpdate) SetPosition(s string) *BiographyUpdate
SetPosition sets the "position" field.
func (*BiographyUpdate) SetPositionJa ¶
func (bu *BiographyUpdate) SetPositionJa(s string) *BiographyUpdate
SetPositionJa sets the "position_ja" field.
func (*BiographyUpdate) SetUserID ¶
func (bu *BiographyUpdate) SetUserID(u uint32) *BiographyUpdate
SetUserID sets the "user_id" field.
func (*BiographyUpdate) Where ¶
func (bu *BiographyUpdate) Where(ps ...predicate.Biography) *BiographyUpdate
Where appends a list predicates to the BiographyUpdate builder.
type BiographyUpdateOne ¶
type BiographyUpdateOne struct {
// contains filtered or unexported fields
}
BiographyUpdateOne is the builder for updating a single Biography entity.
func (*BiographyUpdateOne) AddLocationID ¶
func (buo *BiographyUpdateOne) AddLocationID(u int32) *BiographyUpdateOne
AddLocationID adds u to the "location_id" field.
func (*BiographyUpdateOne) AddUserID ¶
func (buo *BiographyUpdateOne) AddUserID(u int32) *BiographyUpdateOne
AddUserID adds u to the "user_id" field.
func (*BiographyUpdateOne) ClearLeave ¶
func (buo *BiographyUpdateOne) ClearLeave() *BiographyUpdateOne
ClearLeave clears the value of the "leave" field.
func (*BiographyUpdateOne) Exec ¶
func (buo *BiographyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BiographyUpdateOne) ExecX ¶
func (buo *BiographyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BiographyUpdateOne) Mutation ¶
func (buo *BiographyUpdateOne) Mutation() *BiographyMutation
Mutation returns the BiographyMutation object of the builder.
func (*BiographyUpdateOne) Save ¶
func (buo *BiographyUpdateOne) Save(ctx context.Context) (*Biography, error)
Save executes the query and returns the updated Biography entity.
func (*BiographyUpdateOne) SaveX ¶
func (buo *BiographyUpdateOne) SaveX(ctx context.Context) *Biography
SaveX is like Save, but panics if an error occurs.
func (*BiographyUpdateOne) Select ¶
func (buo *BiographyUpdateOne) Select(field string, fields ...string) *BiographyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BiographyUpdateOne) SetCreated ¶
func (buo *BiographyUpdateOne) SetCreated(t time.Time) *BiographyUpdateOne
SetCreated sets the "created" field.
func (*BiographyUpdateOne) SetIsPublic ¶
func (buo *BiographyUpdateOne) SetIsPublic(b bool) *BiographyUpdateOne
SetIsPublic sets the "is_public" field.
func (*BiographyUpdateOne) SetJoin ¶
func (buo *BiographyUpdateOne) SetJoin(t time.Time) *BiographyUpdateOne
SetJoin sets the "join" field.
func (*BiographyUpdateOne) SetLeave ¶
func (buo *BiographyUpdateOne) SetLeave(t time.Time) *BiographyUpdateOne
SetLeave sets the "leave" field.
func (*BiographyUpdateOne) SetLocationID ¶
func (buo *BiographyUpdateOne) SetLocationID(u uint32) *BiographyUpdateOne
SetLocationID sets the "location_id" field.
func (*BiographyUpdateOne) SetModified ¶
func (buo *BiographyUpdateOne) SetModified(t time.Time) *BiographyUpdateOne
SetModified sets the "modified" field.
func (*BiographyUpdateOne) SetNillableCreated ¶
func (buo *BiographyUpdateOne) SetNillableCreated(t *time.Time) *BiographyUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*BiographyUpdateOne) SetNillableIsPublic ¶
func (buo *BiographyUpdateOne) SetNillableIsPublic(b *bool) *BiographyUpdateOne
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*BiographyUpdateOne) SetNillableLeave ¶
func (buo *BiographyUpdateOne) SetNillableLeave(t *time.Time) *BiographyUpdateOne
SetNillableLeave sets the "leave" field if the given value is not nil.
func (*BiographyUpdateOne) SetPosition ¶
func (buo *BiographyUpdateOne) SetPosition(s string) *BiographyUpdateOne
SetPosition sets the "position" field.
func (*BiographyUpdateOne) SetPositionJa ¶
func (buo *BiographyUpdateOne) SetPositionJa(s string) *BiographyUpdateOne
SetPositionJa sets the "position_ja" field.
func (*BiographyUpdateOne) SetUserID ¶
func (buo *BiographyUpdateOne) SetUserID(u uint32) *BiographyUpdateOne
SetUserID sets the "user_id" field.
func (*BiographyUpdateOne) Where ¶
func (buo *BiographyUpdateOne) Where(ps ...predicate.Biography) *BiographyUpdateOne
Where appends a list predicates to the BiographyUpdate builder.
type Category ¶
type Category struct { // ID of the ent. ID uint32 `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // NameJa holds the value of the "name_ja" field. NameJa string `json:"name_ja,omitempty"` // Emoji holds the value of the "emoji" field. Emoji string `json:"emoji,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Modified holds the value of the "modified" field. Modified time.Time `json:"modified,omitempty"` // contains filtered or unexported fields }
Category is the model entity for the Category schema.
func (*Category) Unwrap ¶
Unwrap unwraps the Category 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 (*Category) Update ¶
func (c *Category) Update() *CategoryUpdateOne
Update returns a builder for updating this Category. Note that you need to call Category.Unwrap() before calling this method if this Category was returned from a transaction, and the transaction was committed or rolled back.
type CategoryClient ¶
type CategoryClient struct {
// contains filtered or unexported fields
}
CategoryClient is a client for the Category schema.
func NewCategoryClient ¶
func NewCategoryClient(c config) *CategoryClient
NewCategoryClient returns a client for the Category from the given config.
func (*CategoryClient) Create ¶
func (c *CategoryClient) Create() *CategoryCreate
Create returns a builder for creating a Category entity.
func (*CategoryClient) CreateBulk ¶
func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk
CreateBulk returns a builder for creating a bulk of Category entities.
func (*CategoryClient) Delete ¶
func (c *CategoryClient) Delete() *CategoryDelete
Delete returns a delete builder for Category.
func (*CategoryClient) DeleteOne ¶
func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CategoryClient) DeleteOneID ¶
func (c *CategoryClient) DeleteOneID(id uint32) *CategoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CategoryClient) GetX ¶
func (c *CategoryClient) GetX(ctx context.Context, id uint32) *Category
GetX is like Get, but panics if an error occurs.
func (*CategoryClient) Hooks ¶
func (c *CategoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CategoryClient) Intercept ¶
func (c *CategoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `category.Intercept(f(g(h())))`.
func (*CategoryClient) Interceptors ¶
func (c *CategoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CategoryClient) Query ¶
func (c *CategoryClient) Query() *CategoryQuery
Query returns a query builder for Category.
func (*CategoryClient) Update ¶
func (c *CategoryClient) Update() *CategoryUpdate
Update returns an update builder for Category.
func (*CategoryClient) UpdateOne ¶
func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CategoryClient) UpdateOneID ¶
func (c *CategoryClient) UpdateOneID(id uint32) *CategoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CategoryClient) Use ¶
func (c *CategoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `category.Hooks(f(g(h())))`.
type CategoryCreate ¶
type CategoryCreate struct {
// contains filtered or unexported fields
}
CategoryCreate is the builder for creating a Category entity.
func (*CategoryCreate) Exec ¶
func (cc *CategoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreate) ExecX ¶
func (cc *CategoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryCreate) Mutation ¶
func (cc *CategoryCreate) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryCreate) Save ¶
func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error)
Save creates the Category in the database.
func (*CategoryCreate) SaveX ¶
func (cc *CategoryCreate) SaveX(ctx context.Context) *Category
SaveX calls Save and panics if Save returns an error.
func (*CategoryCreate) SetCreated ¶
func (cc *CategoryCreate) SetCreated(t time.Time) *CategoryCreate
SetCreated sets the "created" field.
func (*CategoryCreate) SetEmoji ¶
func (cc *CategoryCreate) SetEmoji(s string) *CategoryCreate
SetEmoji sets the "emoji" field.
func (*CategoryCreate) SetID ¶
func (cc *CategoryCreate) SetID(u uint32) *CategoryCreate
SetID sets the "id" field.
func (*CategoryCreate) SetModified ¶
func (cc *CategoryCreate) SetModified(t time.Time) *CategoryCreate
SetModified sets the "modified" field.
func (*CategoryCreate) SetName ¶
func (cc *CategoryCreate) SetName(s string) *CategoryCreate
SetName sets the "name" field.
func (*CategoryCreate) SetNameJa ¶
func (cc *CategoryCreate) SetNameJa(s string) *CategoryCreate
SetNameJa sets the "name_ja" field.
func (*CategoryCreate) SetNillableCreated ¶
func (cc *CategoryCreate) SetNillableCreated(t *time.Time) *CategoryCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*CategoryCreate) SetNillableModified ¶
func (cc *CategoryCreate) SetNillableModified(t *time.Time) *CategoryCreate
SetNillableModified sets the "modified" field if the given value is not nil.
type CategoryCreateBulk ¶
type CategoryCreateBulk struct {
// contains filtered or unexported fields
}
CategoryCreateBulk is the builder for creating many Category entities in bulk.
func (*CategoryCreateBulk) Exec ¶
func (ccb *CategoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreateBulk) ExecX ¶
func (ccb *CategoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CategoryDelete ¶
type CategoryDelete struct {
// contains filtered or unexported fields
}
CategoryDelete is the builder for deleting a Category entity.
func (*CategoryDelete) Exec ¶
func (cd *CategoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CategoryDelete) ExecX ¶
func (cd *CategoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CategoryDelete) Where ¶
func (cd *CategoryDelete) Where(ps ...predicate.Category) *CategoryDelete
Where appends a list predicates to the CategoryDelete builder.
type CategoryDeleteOne ¶
type CategoryDeleteOne struct {
// contains filtered or unexported fields
}
CategoryDeleteOne is the builder for deleting a single Category entity.
func (*CategoryDeleteOne) Exec ¶
func (cdo *CategoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CategoryDeleteOne) ExecX ¶
func (cdo *CategoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryDeleteOne) Where ¶
func (cdo *CategoryDeleteOne) Where(ps ...predicate.Category) *CategoryDeleteOne
Where appends a list predicates to the CategoryDelete builder.
type CategoryGroupBy ¶
type CategoryGroupBy struct {
// contains filtered or unexported fields
}
CategoryGroupBy is the group-by builder for Category entities.
func (*CategoryGroupBy) Aggregate ¶
func (cgb *CategoryGroupBy) Aggregate(fns ...AggregateFunc) *CategoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CategoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Scan ¶
func (cgb *CategoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CategoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategoryMutation ¶
type CategoryMutation struct {
// contains filtered or unexported fields
}
CategoryMutation represents an operation that mutates the Category nodes in the graph.
func (*CategoryMutation) AddField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) AddedEdges ¶
func (m *CategoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CategoryMutation) AddedField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) AddedFields ¶
func (m *CategoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CategoryMutation) AddedIDs ¶
func (m *CategoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CategoryMutation) ClearEdge ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ClearField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ClearedEdges ¶
func (m *CategoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CategoryMutation) ClearedFields ¶
func (m *CategoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CategoryMutation) Client ¶
func (m CategoryMutation) 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 (*CategoryMutation) Created ¶
func (m *CategoryMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*CategoryMutation) EdgeCleared ¶
func (m *CategoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CategoryMutation) Emoji ¶
func (m *CategoryMutation) Emoji() (r string, exists bool)
Emoji returns the value of the "emoji" field in the mutation.
func (*CategoryMutation) Field ¶
func (m *CategoryMutation) 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 (*CategoryMutation) FieldCleared ¶
func (m *CategoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CategoryMutation) Fields ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ID ¶
func (m *CategoryMutation) ID() (id uint32, 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 (*CategoryMutation) IDs ¶
func (m *CategoryMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CategoryMutation) Modified ¶
func (m *CategoryMutation) Modified() (r time.Time, exists bool)
Modified returns the value of the "modified" field in the mutation.
func (*CategoryMutation) Name ¶
func (m *CategoryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CategoryMutation) NameJa ¶
func (m *CategoryMutation) NameJa() (r string, exists bool)
NameJa returns the value of the "name_ja" field in the mutation.
func (*CategoryMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the Category entity. If the Category 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 (*CategoryMutation) OldEmoji ¶
func (m *CategoryMutation) OldEmoji(ctx context.Context) (v string, err error)
OldEmoji returns the old "emoji" field's value of the Category entity. If the Category 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 (*CategoryMutation) 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 (*CategoryMutation) OldModified ¶
OldModified returns the old "modified" field's value of the Category entity. If the Category 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 (*CategoryMutation) OldName ¶
func (m *CategoryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Category entity. If the Category 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 (*CategoryMutation) OldNameJa ¶
func (m *CategoryMutation) OldNameJa(ctx context.Context) (v string, err error)
OldNameJa returns the old "name_ja" field's value of the Category entity. If the Category 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 (*CategoryMutation) RemovedEdges ¶
func (m *CategoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CategoryMutation) RemovedIDs ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ResetCreated ¶
func (m *CategoryMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*CategoryMutation) ResetEdge ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ResetEmoji ¶
func (m *CategoryMutation) ResetEmoji()
ResetEmoji resets all changes to the "emoji" field.
func (*CategoryMutation) ResetField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ResetModified ¶
func (m *CategoryMutation) ResetModified()
ResetModified resets all changes to the "modified" field.
func (*CategoryMutation) ResetName ¶
func (m *CategoryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CategoryMutation) ResetNameJa ¶
func (m *CategoryMutation) ResetNameJa()
ResetNameJa resets all changes to the "name_ja" field.
func (*CategoryMutation) SetCreated ¶
func (m *CategoryMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*CategoryMutation) SetEmoji ¶
func (m *CategoryMutation) SetEmoji(s string)
SetEmoji sets the "emoji" field.
func (*CategoryMutation) SetField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) SetID ¶
func (m *CategoryMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Category entities.
func (*CategoryMutation) SetModified ¶
func (m *CategoryMutation) SetModified(t time.Time)
SetModified sets the "modified" field.
func (*CategoryMutation) SetName ¶
func (m *CategoryMutation) SetName(s string)
SetName sets the "name" field.
func (*CategoryMutation) SetNameJa ¶
func (m *CategoryMutation) SetNameJa(s string)
SetNameJa sets the "name_ja" field.
func (*CategoryMutation) SetOp ¶
func (m *CategoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (CategoryMutation) Tx ¶
func (m CategoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CategoryMutation) Type ¶
func (m *CategoryMutation) Type() string
Type returns the node type of this mutation (Category).
func (*CategoryMutation) Where ¶
func (m *CategoryMutation) Where(ps ...predicate.Category)
Where appends a list predicates to the CategoryMutation builder.
func (*CategoryMutation) WhereP ¶
func (m *CategoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CategoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CategoryQuery ¶
type CategoryQuery struct {
// contains filtered or unexported fields
}
CategoryQuery is the builder for querying Category entities.
func (*CategoryQuery) Aggregate ¶
func (cq *CategoryQuery) Aggregate(fns ...AggregateFunc) *CategorySelect
Aggregate returns a CategorySelect configured with the given aggregations.
func (*CategoryQuery) All ¶
func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error)
All executes the query and returns a list of Categories.
func (*CategoryQuery) AllX ¶
func (cq *CategoryQuery) AllX(ctx context.Context) []*Category
AllX is like All, but panics if an error occurs.
func (*CategoryQuery) Clone ¶
func (cq *CategoryQuery) Clone() *CategoryQuery
Clone returns a duplicate of the CategoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CategoryQuery) Count ¶
func (cq *CategoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CategoryQuery) CountX ¶
func (cq *CategoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CategoryQuery) Exist ¶
func (cq *CategoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CategoryQuery) ExistX ¶
func (cq *CategoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CategoryQuery) First ¶
func (cq *CategoryQuery) First(ctx context.Context) (*Category, error)
First returns the first Category entity from the query. Returns a *NotFoundError when no Category was found.
func (*CategoryQuery) FirstID ¶
func (cq *CategoryQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first Category ID from the query. Returns a *NotFoundError when no Category ID was found.
func (*CategoryQuery) FirstIDX ¶
func (cq *CategoryQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*CategoryQuery) FirstX ¶
func (cq *CategoryQuery) FirstX(ctx context.Context) *Category
FirstX is like First, but panics if an error occurs.
func (*CategoryQuery) GroupBy ¶
func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Category.Query(). GroupBy(category.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CategoryQuery) IDs ¶
func (cq *CategoryQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of Category IDs.
func (*CategoryQuery) IDsX ¶
func (cq *CategoryQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*CategoryQuery) Limit ¶
func (cq *CategoryQuery) Limit(limit int) *CategoryQuery
Limit the number of records to be returned by this query.
func (*CategoryQuery) Offset ¶
func (cq *CategoryQuery) Offset(offset int) *CategoryQuery
Offset to start from.
func (*CategoryQuery) Only ¶
func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error)
Only returns a single Category entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Category entity is found. Returns a *NotFoundError when no Category entities are found.
func (*CategoryQuery) OnlyID ¶
func (cq *CategoryQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only Category ID in the query. Returns a *NotSingularError when more than one Category ID is found. Returns a *NotFoundError when no entities are found.
func (*CategoryQuery) OnlyIDX ¶
func (cq *CategoryQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CategoryQuery) OnlyX ¶
func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category
OnlyX is like Only, but panics if an error occurs.
func (*CategoryQuery) Order ¶
func (cq *CategoryQuery) Order(o ...OrderFunc) *CategoryQuery
Order specifies how the records should be ordered.
func (*CategoryQuery) Select ¶
func (cq *CategoryQuery) Select(fields ...string) *CategorySelect
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 { Name string `json:"name,omitempty"` } client.Category.Query(). Select(category.FieldName). Scan(ctx, &v)
func (*CategoryQuery) Unique ¶
func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery
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 (*CategoryQuery) Where ¶
func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery
Where adds a new predicate for the CategoryQuery builder.
type CategorySelect ¶
type CategorySelect struct { *CategoryQuery // contains filtered or unexported fields }
CategorySelect is the builder for selecting fields of Category entities.
func (*CategorySelect) Aggregate ¶
func (cs *CategorySelect) Aggregate(fns ...AggregateFunc) *CategorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*CategorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Scan ¶
func (cs *CategorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CategorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategoryUpdate ¶
type CategoryUpdate struct {
// contains filtered or unexported fields
}
CategoryUpdate is the builder for updating Category entities.
func (*CategoryUpdate) Exec ¶
func (cu *CategoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryUpdate) ExecX ¶
func (cu *CategoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpdate) Mutation ¶
func (cu *CategoryUpdate) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryUpdate) Save ¶
func (cu *CategoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CategoryUpdate) SaveX ¶
func (cu *CategoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CategoryUpdate) SetCreated ¶
func (cu *CategoryUpdate) SetCreated(t time.Time) *CategoryUpdate
SetCreated sets the "created" field.
func (*CategoryUpdate) SetEmoji ¶
func (cu *CategoryUpdate) SetEmoji(s string) *CategoryUpdate
SetEmoji sets the "emoji" field.
func (*CategoryUpdate) SetModified ¶
func (cu *CategoryUpdate) SetModified(t time.Time) *CategoryUpdate
SetModified sets the "modified" field.
func (*CategoryUpdate) SetName ¶
func (cu *CategoryUpdate) SetName(s string) *CategoryUpdate
SetName sets the "name" field.
func (*CategoryUpdate) SetNameJa ¶
func (cu *CategoryUpdate) SetNameJa(s string) *CategoryUpdate
SetNameJa sets the "name_ja" field.
func (*CategoryUpdate) SetNillableCreated ¶
func (cu *CategoryUpdate) SetNillableCreated(t *time.Time) *CategoryUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*CategoryUpdate) Where ¶
func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate
Where appends a list predicates to the CategoryUpdate builder.
type CategoryUpdateOne ¶
type CategoryUpdateOne struct {
// contains filtered or unexported fields
}
CategoryUpdateOne is the builder for updating a single Category entity.
func (*CategoryUpdateOne) Exec ¶
func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CategoryUpdateOne) ExecX ¶
func (cuo *CategoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpdateOne) Mutation ¶
func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryUpdateOne) Save ¶
func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error)
Save executes the query and returns the updated Category entity.
func (*CategoryUpdateOne) SaveX ¶
func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category
SaveX is like Save, but panics if an error occurs.
func (*CategoryUpdateOne) Select ¶
func (cuo *CategoryUpdateOne) Select(field string, fields ...string) *CategoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CategoryUpdateOne) SetCreated ¶
func (cuo *CategoryUpdateOne) SetCreated(t time.Time) *CategoryUpdateOne
SetCreated sets the "created" field.
func (*CategoryUpdateOne) SetEmoji ¶
func (cuo *CategoryUpdateOne) SetEmoji(s string) *CategoryUpdateOne
SetEmoji sets the "emoji" field.
func (*CategoryUpdateOne) SetModified ¶
func (cuo *CategoryUpdateOne) SetModified(t time.Time) *CategoryUpdateOne
SetModified sets the "modified" field.
func (*CategoryUpdateOne) SetName ¶
func (cuo *CategoryUpdateOne) SetName(s string) *CategoryUpdateOne
SetName sets the "name" field.
func (*CategoryUpdateOne) SetNameJa ¶
func (cuo *CategoryUpdateOne) SetNameJa(s string) *CategoryUpdateOne
SetNameJa sets the "name_ja" field.
func (*CategoryUpdateOne) SetNillableCreated ¶
func (cuo *CategoryUpdateOne) SetNillableCreated(t *time.Time) *CategoryUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*CategoryUpdateOne) Where ¶
func (cuo *CategoryUpdateOne) Where(ps ...predicate.Category) *CategoryUpdateOne
Where appends a list predicates to the CategoryUpdate builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Biography is the client for interacting with the Biography builders. Biography *BiographyClient // Category is the client for interacting with the Category builders. Category *CategoryClient // Contact is the client for interacting with the Contact builders. Contact *ContactClient // ContactDefault is the client for interacting with the ContactDefault builders. ContactDefault *ContactDefaultClient // Link is the client for interacting with the Link builders. Link *LinkClient // Location is the client for interacting with the Location builders. Location *LocationClient // Notice is the client for interacting with the Notice builders. Notice *NoticeClient // Product is the client for interacting with the Product builders. Product *ProductClient // Session is the client for interacting with the Session builders. Session *SessionClient // 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(). Biography. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Contact ¶
type Contact struct { // ID of the ent. ID uint32 `json:"id,omitempty"` // ToUserID holds the value of the "to_user_id" field. ToUserID uint32 `json:"to_user_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Detail holds the value of the "detail" field. Detail string `json:"detail,omitempty"` // Mail holds the value of the "mail" field. Mail string `json:"mail,omitempty"` // IP holds the value of the "ip" field. IP string `json:"ip,omitempty"` // Lang holds the value of the "lang" field. Lang string `json:"lang,omitempty"` // URL holds the value of the "url" field. URL string `json:"url,omitempty"` // Category holds the value of the "category" field. Category string `json:"category,omitempty"` // CustomTitle holds the value of the "custom_title" field. CustomTitle string `json:"custom_title,omitempty"` // CustomValue holds the value of the "custom_value" field. CustomValue string `json:"custom_value,omitempty"` // DeviceName holds the value of the "device_name" field. DeviceName string `json:"device_name,omitempty"` // Os holds the value of the "os" field. Os string `json:"os,omitempty"` // BrowserName holds the value of the "browser_name" field. BrowserName string `json:"browser_name,omitempty"` // IsMobile holds the value of the "is_mobile" field. IsMobile bool `json:"is_mobile,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Modified holds the value of the "modified" field. Modified time.Time `json:"modified,omitempty"` // contains filtered or unexported fields }
Contact is the model entity for the Contact schema.
func (*Contact) Unwrap ¶
Unwrap unwraps the Contact 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 (*Contact) Update ¶
func (c *Contact) Update() *ContactUpdateOne
Update returns a builder for updating this Contact. Note that you need to call Contact.Unwrap() before calling this method if this Contact was returned from a transaction, and the transaction was committed or rolled back.
type ContactClient ¶
type ContactClient struct {
// contains filtered or unexported fields
}
ContactClient is a client for the Contact schema.
func NewContactClient ¶
func NewContactClient(c config) *ContactClient
NewContactClient returns a client for the Contact from the given config.
func (*ContactClient) Create ¶
func (c *ContactClient) Create() *ContactCreate
Create returns a builder for creating a Contact entity.
func (*ContactClient) CreateBulk ¶
func (c *ContactClient) CreateBulk(builders ...*ContactCreate) *ContactCreateBulk
CreateBulk returns a builder for creating a bulk of Contact entities.
func (*ContactClient) Delete ¶
func (c *ContactClient) Delete() *ContactDelete
Delete returns a delete builder for Contact.
func (*ContactClient) DeleteOne ¶
func (c *ContactClient) DeleteOne(co *Contact) *ContactDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ContactClient) DeleteOneID ¶
func (c *ContactClient) DeleteOneID(id uint32) *ContactDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ContactClient) GetX ¶
func (c *ContactClient) GetX(ctx context.Context, id uint32) *Contact
GetX is like Get, but panics if an error occurs.
func (*ContactClient) Hooks ¶
func (c *ContactClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ContactClient) Intercept ¶
func (c *ContactClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `contact.Intercept(f(g(h())))`.
func (*ContactClient) Interceptors ¶
func (c *ContactClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ContactClient) Query ¶
func (c *ContactClient) Query() *ContactQuery
Query returns a query builder for Contact.
func (*ContactClient) Update ¶
func (c *ContactClient) Update() *ContactUpdate
Update returns an update builder for Contact.
func (*ContactClient) UpdateOne ¶
func (c *ContactClient) UpdateOne(co *Contact) *ContactUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ContactClient) UpdateOneID ¶
func (c *ContactClient) UpdateOneID(id uint32) *ContactUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ContactClient) Use ¶
func (c *ContactClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `contact.Hooks(f(g(h())))`.
type ContactCreate ¶
type ContactCreate struct {
// contains filtered or unexported fields
}
ContactCreate is the builder for creating a Contact entity.
func (*ContactCreate) Exec ¶
func (cc *ContactCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactCreate) ExecX ¶
func (cc *ContactCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactCreate) Mutation ¶
func (cc *ContactCreate) Mutation() *ContactMutation
Mutation returns the ContactMutation object of the builder.
func (*ContactCreate) Save ¶
func (cc *ContactCreate) Save(ctx context.Context) (*Contact, error)
Save creates the Contact in the database.
func (*ContactCreate) SaveX ¶
func (cc *ContactCreate) SaveX(ctx context.Context) *Contact
SaveX calls Save and panics if Save returns an error.
func (*ContactCreate) SetBrowserName ¶
func (cc *ContactCreate) SetBrowserName(s string) *ContactCreate
SetBrowserName sets the "browser_name" field.
func (*ContactCreate) SetCategory ¶
func (cc *ContactCreate) SetCategory(s string) *ContactCreate
SetCategory sets the "category" field.
func (*ContactCreate) SetCreated ¶
func (cc *ContactCreate) SetCreated(t time.Time) *ContactCreate
SetCreated sets the "created" field.
func (*ContactCreate) SetCustomTitle ¶
func (cc *ContactCreate) SetCustomTitle(s string) *ContactCreate
SetCustomTitle sets the "custom_title" field.
func (*ContactCreate) SetCustomValue ¶
func (cc *ContactCreate) SetCustomValue(s string) *ContactCreate
SetCustomValue sets the "custom_value" field.
func (*ContactCreate) SetDetail ¶
func (cc *ContactCreate) SetDetail(s string) *ContactCreate
SetDetail sets the "detail" field.
func (*ContactCreate) SetDeviceName ¶
func (cc *ContactCreate) SetDeviceName(s string) *ContactCreate
SetDeviceName sets the "device_name" field.
func (*ContactCreate) SetID ¶
func (cc *ContactCreate) SetID(u uint32) *ContactCreate
SetID sets the "id" field.
func (*ContactCreate) SetIP ¶
func (cc *ContactCreate) SetIP(s string) *ContactCreate
SetIP sets the "ip" field.
func (*ContactCreate) SetIsMobile ¶
func (cc *ContactCreate) SetIsMobile(b bool) *ContactCreate
SetIsMobile sets the "is_mobile" field.
func (*ContactCreate) SetLang ¶
func (cc *ContactCreate) SetLang(s string) *ContactCreate
SetLang sets the "lang" field.
func (*ContactCreate) SetMail ¶
func (cc *ContactCreate) SetMail(s string) *ContactCreate
SetMail sets the "mail" field.
func (*ContactCreate) SetModified ¶
func (cc *ContactCreate) SetModified(t time.Time) *ContactCreate
SetModified sets the "modified" field.
func (*ContactCreate) SetName ¶
func (cc *ContactCreate) SetName(s string) *ContactCreate
SetName sets the "name" field.
func (*ContactCreate) SetNillableBrowserName ¶
func (cc *ContactCreate) SetNillableBrowserName(s *string) *ContactCreate
SetNillableBrowserName sets the "browser_name" field if the given value is not nil.
func (*ContactCreate) SetNillableCategory ¶
func (cc *ContactCreate) SetNillableCategory(s *string) *ContactCreate
SetNillableCategory sets the "category" field if the given value is not nil.
func (*ContactCreate) SetNillableCreated ¶
func (cc *ContactCreate) SetNillableCreated(t *time.Time) *ContactCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*ContactCreate) SetNillableCustomTitle ¶
func (cc *ContactCreate) SetNillableCustomTitle(s *string) *ContactCreate
SetNillableCustomTitle sets the "custom_title" field if the given value is not nil.
func (*ContactCreate) SetNillableCustomValue ¶
func (cc *ContactCreate) SetNillableCustomValue(s *string) *ContactCreate
SetNillableCustomValue sets the "custom_value" field if the given value is not nil.
func (*ContactCreate) SetNillableDeviceName ¶
func (cc *ContactCreate) SetNillableDeviceName(s *string) *ContactCreate
SetNillableDeviceName sets the "device_name" field if the given value is not nil.
func (*ContactCreate) SetNillableIsMobile ¶
func (cc *ContactCreate) SetNillableIsMobile(b *bool) *ContactCreate
SetNillableIsMobile sets the "is_mobile" field if the given value is not nil.
func (*ContactCreate) SetNillableModified ¶
func (cc *ContactCreate) SetNillableModified(t *time.Time) *ContactCreate
SetNillableModified sets the "modified" field if the given value is not nil.
func (*ContactCreate) SetNillableOs ¶
func (cc *ContactCreate) SetNillableOs(s *string) *ContactCreate
SetNillableOs sets the "os" field if the given value is not nil.
func (*ContactCreate) SetNillableURL ¶
func (cc *ContactCreate) SetNillableURL(s *string) *ContactCreate
SetNillableURL sets the "url" field if the given value is not nil.
func (*ContactCreate) SetOs ¶
func (cc *ContactCreate) SetOs(s string) *ContactCreate
SetOs sets the "os" field.
func (*ContactCreate) SetTitle ¶
func (cc *ContactCreate) SetTitle(s string) *ContactCreate
SetTitle sets the "title" field.
func (*ContactCreate) SetToUserID ¶
func (cc *ContactCreate) SetToUserID(u uint32) *ContactCreate
SetToUserID sets the "to_user_id" field.
func (*ContactCreate) SetURL ¶
func (cc *ContactCreate) SetURL(s string) *ContactCreate
SetURL sets the "url" field.
type ContactCreateBulk ¶
type ContactCreateBulk struct {
// contains filtered or unexported fields
}
ContactCreateBulk is the builder for creating many Contact entities in bulk.
func (*ContactCreateBulk) Exec ¶
func (ccb *ContactCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactCreateBulk) ExecX ¶
func (ccb *ContactCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ContactDefault ¶
type ContactDefault struct { // ID of the ent. ID uint32 `json:"id,omitempty"` // Name holds the value of the "name" field. Name *string `json:"name,omitempty"` // Email holds the value of the "email" field. Email *string `json:"email,omitempty"` // URL holds the value of the "url" field. URL *string `json:"url,omitempty"` // Category holds the value of the "category" field. Category *string `json:"category,omitempty"` // CustomTitle holds the value of the "custom_title" field. CustomTitle *string `json:"custom_title,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Modified holds the value of the "modified" field. Modified time.Time `json:"modified,omitempty"` // contains filtered or unexported fields }
ContactDefault is the model entity for the ContactDefault schema.
func (*ContactDefault) String ¶
func (cd *ContactDefault) String() string
String implements the fmt.Stringer.
func (*ContactDefault) Unwrap ¶
func (cd *ContactDefault) Unwrap() *ContactDefault
Unwrap unwraps the ContactDefault 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 (*ContactDefault) Update ¶
func (cd *ContactDefault) Update() *ContactDefaultUpdateOne
Update returns a builder for updating this ContactDefault. Note that you need to call ContactDefault.Unwrap() before calling this method if this ContactDefault was returned from a transaction, and the transaction was committed or rolled back.
type ContactDefaultClient ¶
type ContactDefaultClient struct {
// contains filtered or unexported fields
}
ContactDefaultClient is a client for the ContactDefault schema.
func NewContactDefaultClient ¶
func NewContactDefaultClient(c config) *ContactDefaultClient
NewContactDefaultClient returns a client for the ContactDefault from the given config.
func (*ContactDefaultClient) Create ¶
func (c *ContactDefaultClient) Create() *ContactDefaultCreate
Create returns a builder for creating a ContactDefault entity.
func (*ContactDefaultClient) CreateBulk ¶
func (c *ContactDefaultClient) CreateBulk(builders ...*ContactDefaultCreate) *ContactDefaultCreateBulk
CreateBulk returns a builder for creating a bulk of ContactDefault entities.
func (*ContactDefaultClient) Delete ¶
func (c *ContactDefaultClient) Delete() *ContactDefaultDelete
Delete returns a delete builder for ContactDefault.
func (*ContactDefaultClient) DeleteOne ¶
func (c *ContactDefaultClient) DeleteOne(cd *ContactDefault) *ContactDefaultDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ContactDefaultClient) DeleteOneID ¶
func (c *ContactDefaultClient) DeleteOneID(id uint32) *ContactDefaultDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ContactDefaultClient) Get ¶
func (c *ContactDefaultClient) Get(ctx context.Context, id uint32) (*ContactDefault, error)
Get returns a ContactDefault entity by its id.
func (*ContactDefaultClient) GetX ¶
func (c *ContactDefaultClient) GetX(ctx context.Context, id uint32) *ContactDefault
GetX is like Get, but panics if an error occurs.
func (*ContactDefaultClient) Hooks ¶
func (c *ContactDefaultClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ContactDefaultClient) Intercept ¶
func (c *ContactDefaultClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `contactdefault.Intercept(f(g(h())))`.
func (*ContactDefaultClient) Interceptors ¶
func (c *ContactDefaultClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ContactDefaultClient) Query ¶
func (c *ContactDefaultClient) Query() *ContactDefaultQuery
Query returns a query builder for ContactDefault.
func (*ContactDefaultClient) Update ¶
func (c *ContactDefaultClient) Update() *ContactDefaultUpdate
Update returns an update builder for ContactDefault.
func (*ContactDefaultClient) UpdateOne ¶
func (c *ContactDefaultClient) UpdateOne(cd *ContactDefault) *ContactDefaultUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ContactDefaultClient) UpdateOneID ¶
func (c *ContactDefaultClient) UpdateOneID(id uint32) *ContactDefaultUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ContactDefaultClient) Use ¶
func (c *ContactDefaultClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `contactdefault.Hooks(f(g(h())))`.
type ContactDefaultCreate ¶
type ContactDefaultCreate struct {
// contains filtered or unexported fields
}
ContactDefaultCreate is the builder for creating a ContactDefault entity.
func (*ContactDefaultCreate) Exec ¶
func (cdc *ContactDefaultCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactDefaultCreate) ExecX ¶
func (cdc *ContactDefaultCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactDefaultCreate) Mutation ¶
func (cdc *ContactDefaultCreate) Mutation() *ContactDefaultMutation
Mutation returns the ContactDefaultMutation object of the builder.
func (*ContactDefaultCreate) Save ¶
func (cdc *ContactDefaultCreate) Save(ctx context.Context) (*ContactDefault, error)
Save creates the ContactDefault in the database.
func (*ContactDefaultCreate) SaveX ¶
func (cdc *ContactDefaultCreate) SaveX(ctx context.Context) *ContactDefault
SaveX calls Save and panics if Save returns an error.
func (*ContactDefaultCreate) SetCategory ¶
func (cdc *ContactDefaultCreate) SetCategory(s string) *ContactDefaultCreate
SetCategory sets the "category" field.
func (*ContactDefaultCreate) SetCreated ¶
func (cdc *ContactDefaultCreate) SetCreated(t time.Time) *ContactDefaultCreate
SetCreated sets the "created" field.
func (*ContactDefaultCreate) SetCustomTitle ¶
func (cdc *ContactDefaultCreate) SetCustomTitle(s string) *ContactDefaultCreate
SetCustomTitle sets the "custom_title" field.
func (*ContactDefaultCreate) SetDescription ¶
func (cdc *ContactDefaultCreate) SetDescription(s string) *ContactDefaultCreate
SetDescription sets the "description" field.
func (*ContactDefaultCreate) SetEmail ¶
func (cdc *ContactDefaultCreate) SetEmail(s string) *ContactDefaultCreate
SetEmail sets the "email" field.
func (*ContactDefaultCreate) SetID ¶
func (cdc *ContactDefaultCreate) SetID(u uint32) *ContactDefaultCreate
SetID sets the "id" field.
func (*ContactDefaultCreate) SetModified ¶
func (cdc *ContactDefaultCreate) SetModified(t time.Time) *ContactDefaultCreate
SetModified sets the "modified" field.
func (*ContactDefaultCreate) SetName ¶
func (cdc *ContactDefaultCreate) SetName(s string) *ContactDefaultCreate
SetName sets the "name" field.
func (*ContactDefaultCreate) SetNillableCategory ¶
func (cdc *ContactDefaultCreate) SetNillableCategory(s *string) *ContactDefaultCreate
SetNillableCategory sets the "category" field if the given value is not nil.
func (*ContactDefaultCreate) SetNillableCreated ¶
func (cdc *ContactDefaultCreate) SetNillableCreated(t *time.Time) *ContactDefaultCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*ContactDefaultCreate) SetNillableCustomTitle ¶
func (cdc *ContactDefaultCreate) SetNillableCustomTitle(s *string) *ContactDefaultCreate
SetNillableCustomTitle sets the "custom_title" field if the given value is not nil.
func (*ContactDefaultCreate) SetNillableDescription ¶
func (cdc *ContactDefaultCreate) SetNillableDescription(s *string) *ContactDefaultCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ContactDefaultCreate) SetNillableEmail ¶
func (cdc *ContactDefaultCreate) SetNillableEmail(s *string) *ContactDefaultCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*ContactDefaultCreate) SetNillableModified ¶
func (cdc *ContactDefaultCreate) SetNillableModified(t *time.Time) *ContactDefaultCreate
SetNillableModified sets the "modified" field if the given value is not nil.
func (*ContactDefaultCreate) SetNillableName ¶
func (cdc *ContactDefaultCreate) SetNillableName(s *string) *ContactDefaultCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*ContactDefaultCreate) SetNillableURL ¶
func (cdc *ContactDefaultCreate) SetNillableURL(s *string) *ContactDefaultCreate
SetNillableURL sets the "url" field if the given value is not nil.
func (*ContactDefaultCreate) SetURL ¶
func (cdc *ContactDefaultCreate) SetURL(s string) *ContactDefaultCreate
SetURL sets the "url" field.
type ContactDefaultCreateBulk ¶
type ContactDefaultCreateBulk struct {
// contains filtered or unexported fields
}
ContactDefaultCreateBulk is the builder for creating many ContactDefault entities in bulk.
func (*ContactDefaultCreateBulk) Exec ¶
func (cdcb *ContactDefaultCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactDefaultCreateBulk) ExecX ¶
func (cdcb *ContactDefaultCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactDefaultCreateBulk) Save ¶
func (cdcb *ContactDefaultCreateBulk) Save(ctx context.Context) ([]*ContactDefault, error)
Save creates the ContactDefault entities in the database.
func (*ContactDefaultCreateBulk) SaveX ¶
func (cdcb *ContactDefaultCreateBulk) SaveX(ctx context.Context) []*ContactDefault
SaveX is like Save, but panics if an error occurs.
type ContactDefaultDelete ¶
type ContactDefaultDelete struct {
// contains filtered or unexported fields
}
ContactDefaultDelete is the builder for deleting a ContactDefault entity.
func (*ContactDefaultDelete) Exec ¶
func (cdd *ContactDefaultDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ContactDefaultDelete) ExecX ¶
func (cdd *ContactDefaultDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ContactDefaultDelete) Where ¶
func (cdd *ContactDefaultDelete) Where(ps ...predicate.ContactDefault) *ContactDefaultDelete
Where appends a list predicates to the ContactDefaultDelete builder.
type ContactDefaultDeleteOne ¶
type ContactDefaultDeleteOne struct {
// contains filtered or unexported fields
}
ContactDefaultDeleteOne is the builder for deleting a single ContactDefault entity.
func (*ContactDefaultDeleteOne) Exec ¶
func (cddo *ContactDefaultDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ContactDefaultDeleteOne) ExecX ¶
func (cddo *ContactDefaultDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactDefaultDeleteOne) Where ¶
func (cddo *ContactDefaultDeleteOne) Where(ps ...predicate.ContactDefault) *ContactDefaultDeleteOne
Where appends a list predicates to the ContactDefaultDelete builder.
type ContactDefaultGroupBy ¶
type ContactDefaultGroupBy struct {
// contains filtered or unexported fields
}
ContactDefaultGroupBy is the group-by builder for ContactDefault entities.
func (*ContactDefaultGroupBy) Aggregate ¶
func (cdgb *ContactDefaultGroupBy) Aggregate(fns ...AggregateFunc) *ContactDefaultGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ContactDefaultGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContactDefaultGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContactDefaultGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContactDefaultGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContactDefaultGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ContactDefaultGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContactDefaultGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContactDefaultGroupBy) Scan ¶
func (cdgb *ContactDefaultGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContactDefaultGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContactDefaultMutation ¶
type ContactDefaultMutation struct {
// contains filtered or unexported fields
}
ContactDefaultMutation represents an operation that mutates the ContactDefault nodes in the graph.
func (*ContactDefaultMutation) AddField ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) AddedEdges ¶
func (m *ContactDefaultMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ContactDefaultMutation) AddedField ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) AddedFields ¶
func (m *ContactDefaultMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ContactDefaultMutation) AddedIDs ¶
func (m *ContactDefaultMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ContactDefaultMutation) Category ¶
func (m *ContactDefaultMutation) Category() (r string, exists bool)
Category returns the value of the "category" field in the mutation.
func (*ContactDefaultMutation) CategoryCleared ¶
func (m *ContactDefaultMutation) CategoryCleared() bool
CategoryCleared returns if the "category" field was cleared in this mutation.
func (*ContactDefaultMutation) ClearCategory ¶
func (m *ContactDefaultMutation) ClearCategory()
ClearCategory clears the value of the "category" field.
func (*ContactDefaultMutation) ClearCustomTitle ¶
func (m *ContactDefaultMutation) ClearCustomTitle()
ClearCustomTitle clears the value of the "custom_title" field.
func (*ContactDefaultMutation) ClearDescription ¶
func (m *ContactDefaultMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ContactDefaultMutation) ClearEdge ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) ClearEmail ¶
func (m *ContactDefaultMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*ContactDefaultMutation) ClearField ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) ClearName ¶
func (m *ContactDefaultMutation) ClearName()
ClearName clears the value of the "name" field.
func (*ContactDefaultMutation) ClearURL ¶
func (m *ContactDefaultMutation) ClearURL()
ClearURL clears the value of the "url" field.
func (*ContactDefaultMutation) ClearedEdges ¶
func (m *ContactDefaultMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ContactDefaultMutation) ClearedFields ¶
func (m *ContactDefaultMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ContactDefaultMutation) Client ¶
func (m ContactDefaultMutation) 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 (*ContactDefaultMutation) Created ¶
func (m *ContactDefaultMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*ContactDefaultMutation) CustomTitle ¶
func (m *ContactDefaultMutation) CustomTitle() (r string, exists bool)
CustomTitle returns the value of the "custom_title" field in the mutation.
func (*ContactDefaultMutation) CustomTitleCleared ¶
func (m *ContactDefaultMutation) CustomTitleCleared() bool
CustomTitleCleared returns if the "custom_title" field was cleared in this mutation.
func (*ContactDefaultMutation) Description ¶
func (m *ContactDefaultMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ContactDefaultMutation) DescriptionCleared ¶
func (m *ContactDefaultMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ContactDefaultMutation) EdgeCleared ¶
func (m *ContactDefaultMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ContactDefaultMutation) Email ¶
func (m *ContactDefaultMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*ContactDefaultMutation) EmailCleared ¶
func (m *ContactDefaultMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*ContactDefaultMutation) Field ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) FieldCleared ¶
func (m *ContactDefaultMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ContactDefaultMutation) Fields ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) ID ¶
func (m *ContactDefaultMutation) ID() (id uint32, 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 (*ContactDefaultMutation) IDs ¶
func (m *ContactDefaultMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ContactDefaultMutation) Modified ¶
func (m *ContactDefaultMutation) Modified() (r time.Time, exists bool)
Modified returns the value of the "modified" field in the mutation.
func (*ContactDefaultMutation) Name ¶
func (m *ContactDefaultMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ContactDefaultMutation) NameCleared ¶
func (m *ContactDefaultMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*ContactDefaultMutation) OldCategory ¶
func (m *ContactDefaultMutation) OldCategory(ctx context.Context) (v *string, err error)
OldCategory returns the old "category" field's value of the ContactDefault entity. If the ContactDefault 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 (*ContactDefaultMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the ContactDefault entity. If the ContactDefault 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 (*ContactDefaultMutation) OldCustomTitle ¶
func (m *ContactDefaultMutation) OldCustomTitle(ctx context.Context) (v *string, err error)
OldCustomTitle returns the old "custom_title" field's value of the ContactDefault entity. If the ContactDefault 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 (*ContactDefaultMutation) OldDescription ¶
func (m *ContactDefaultMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the ContactDefault entity. If the ContactDefault 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 (*ContactDefaultMutation) OldEmail ¶
func (m *ContactDefaultMutation) OldEmail(ctx context.Context) (v *string, err error)
OldEmail returns the old "email" field's value of the ContactDefault entity. If the ContactDefault 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 (*ContactDefaultMutation) 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 (*ContactDefaultMutation) OldModified ¶
OldModified returns the old "modified" field's value of the ContactDefault entity. If the ContactDefault 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 (*ContactDefaultMutation) OldName ¶
func (m *ContactDefaultMutation) OldName(ctx context.Context) (v *string, err error)
OldName returns the old "name" field's value of the ContactDefault entity. If the ContactDefault 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 (*ContactDefaultMutation) OldURL ¶
func (m *ContactDefaultMutation) OldURL(ctx context.Context) (v *string, err error)
OldURL returns the old "url" field's value of the ContactDefault entity. If the ContactDefault 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 (*ContactDefaultMutation) Op ¶
func (m *ContactDefaultMutation) Op() Op
Op returns the operation name.
func (*ContactDefaultMutation) RemovedEdges ¶
func (m *ContactDefaultMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ContactDefaultMutation) RemovedIDs ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) ResetCategory ¶
func (m *ContactDefaultMutation) ResetCategory()
ResetCategory resets all changes to the "category" field.
func (*ContactDefaultMutation) ResetCreated ¶
func (m *ContactDefaultMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*ContactDefaultMutation) ResetCustomTitle ¶
func (m *ContactDefaultMutation) ResetCustomTitle()
ResetCustomTitle resets all changes to the "custom_title" field.
func (*ContactDefaultMutation) ResetDescription ¶
func (m *ContactDefaultMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ContactDefaultMutation) ResetEdge ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) ResetEmail ¶
func (m *ContactDefaultMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*ContactDefaultMutation) ResetField ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) ResetModified ¶
func (m *ContactDefaultMutation) ResetModified()
ResetModified resets all changes to the "modified" field.
func (*ContactDefaultMutation) ResetName ¶
func (m *ContactDefaultMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ContactDefaultMutation) ResetURL ¶
func (m *ContactDefaultMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*ContactDefaultMutation) SetCategory ¶
func (m *ContactDefaultMutation) SetCategory(s string)
SetCategory sets the "category" field.
func (*ContactDefaultMutation) SetCreated ¶
func (m *ContactDefaultMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*ContactDefaultMutation) SetCustomTitle ¶
func (m *ContactDefaultMutation) SetCustomTitle(s string)
SetCustomTitle sets the "custom_title" field.
func (*ContactDefaultMutation) SetDescription ¶
func (m *ContactDefaultMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ContactDefaultMutation) SetEmail ¶
func (m *ContactDefaultMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*ContactDefaultMutation) SetField ¶
func (m *ContactDefaultMutation) 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 (*ContactDefaultMutation) SetID ¶
func (m *ContactDefaultMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ContactDefault entities.
func (*ContactDefaultMutation) SetModified ¶
func (m *ContactDefaultMutation) SetModified(t time.Time)
SetModified sets the "modified" field.
func (*ContactDefaultMutation) SetName ¶
func (m *ContactDefaultMutation) SetName(s string)
SetName sets the "name" field.
func (*ContactDefaultMutation) SetOp ¶
func (m *ContactDefaultMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ContactDefaultMutation) SetURL ¶
func (m *ContactDefaultMutation) SetURL(s string)
SetURL sets the "url" field.
func (ContactDefaultMutation) Tx ¶
func (m ContactDefaultMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ContactDefaultMutation) Type ¶
func (m *ContactDefaultMutation) Type() string
Type returns the node type of this mutation (ContactDefault).
func (*ContactDefaultMutation) URL ¶
func (m *ContactDefaultMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*ContactDefaultMutation) URLCleared ¶
func (m *ContactDefaultMutation) URLCleared() bool
URLCleared returns if the "url" field was cleared in this mutation.
func (*ContactDefaultMutation) Where ¶
func (m *ContactDefaultMutation) Where(ps ...predicate.ContactDefault)
Where appends a list predicates to the ContactDefaultMutation builder.
func (*ContactDefaultMutation) WhereP ¶
func (m *ContactDefaultMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ContactDefaultMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ContactDefaultQuery ¶
type ContactDefaultQuery struct {
// contains filtered or unexported fields
}
ContactDefaultQuery is the builder for querying ContactDefault entities.
func (*ContactDefaultQuery) Aggregate ¶
func (cdq *ContactDefaultQuery) Aggregate(fns ...AggregateFunc) *ContactDefaultSelect
Aggregate returns a ContactDefaultSelect configured with the given aggregations.
func (*ContactDefaultQuery) All ¶
func (cdq *ContactDefaultQuery) All(ctx context.Context) ([]*ContactDefault, error)
All executes the query and returns a list of ContactDefaults.
func (*ContactDefaultQuery) AllX ¶
func (cdq *ContactDefaultQuery) AllX(ctx context.Context) []*ContactDefault
AllX is like All, but panics if an error occurs.
func (*ContactDefaultQuery) Clone ¶
func (cdq *ContactDefaultQuery) Clone() *ContactDefaultQuery
Clone returns a duplicate of the ContactDefaultQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ContactDefaultQuery) Count ¶
func (cdq *ContactDefaultQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ContactDefaultQuery) CountX ¶
func (cdq *ContactDefaultQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ContactDefaultQuery) Exist ¶
func (cdq *ContactDefaultQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ContactDefaultQuery) ExistX ¶
func (cdq *ContactDefaultQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ContactDefaultQuery) First ¶
func (cdq *ContactDefaultQuery) First(ctx context.Context) (*ContactDefault, error)
First returns the first ContactDefault entity from the query. Returns a *NotFoundError when no ContactDefault was found.
func (*ContactDefaultQuery) FirstID ¶
func (cdq *ContactDefaultQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first ContactDefault ID from the query. Returns a *NotFoundError when no ContactDefault ID was found.
func (*ContactDefaultQuery) FirstIDX ¶
func (cdq *ContactDefaultQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ContactDefaultQuery) FirstX ¶
func (cdq *ContactDefaultQuery) FirstX(ctx context.Context) *ContactDefault
FirstX is like First, but panics if an error occurs.
func (*ContactDefaultQuery) GroupBy ¶
func (cdq *ContactDefaultQuery) GroupBy(field string, fields ...string) *ContactDefaultGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.ContactDefault.Query(). GroupBy(contactdefault.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ContactDefaultQuery) IDs ¶
func (cdq *ContactDefaultQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of ContactDefault IDs.
func (*ContactDefaultQuery) IDsX ¶
func (cdq *ContactDefaultQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*ContactDefaultQuery) Limit ¶
func (cdq *ContactDefaultQuery) Limit(limit int) *ContactDefaultQuery
Limit the number of records to be returned by this query.
func (*ContactDefaultQuery) Offset ¶
func (cdq *ContactDefaultQuery) Offset(offset int) *ContactDefaultQuery
Offset to start from.
func (*ContactDefaultQuery) Only ¶
func (cdq *ContactDefaultQuery) Only(ctx context.Context) (*ContactDefault, error)
Only returns a single ContactDefault entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ContactDefault entity is found. Returns a *NotFoundError when no ContactDefault entities are found.
func (*ContactDefaultQuery) OnlyID ¶
func (cdq *ContactDefaultQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only ContactDefault ID in the query. Returns a *NotSingularError when more than one ContactDefault ID is found. Returns a *NotFoundError when no entities are found.
func (*ContactDefaultQuery) OnlyIDX ¶
func (cdq *ContactDefaultQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ContactDefaultQuery) OnlyX ¶
func (cdq *ContactDefaultQuery) OnlyX(ctx context.Context) *ContactDefault
OnlyX is like Only, but panics if an error occurs.
func (*ContactDefaultQuery) Order ¶
func (cdq *ContactDefaultQuery) Order(o ...OrderFunc) *ContactDefaultQuery
Order specifies how the records should be ordered.
func (*ContactDefaultQuery) Select ¶
func (cdq *ContactDefaultQuery) Select(fields ...string) *ContactDefaultSelect
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 { Name string `json:"name,omitempty"` } client.ContactDefault.Query(). Select(contactdefault.FieldName). Scan(ctx, &v)
func (*ContactDefaultQuery) Unique ¶
func (cdq *ContactDefaultQuery) Unique(unique bool) *ContactDefaultQuery
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 (*ContactDefaultQuery) Where ¶
func (cdq *ContactDefaultQuery) Where(ps ...predicate.ContactDefault) *ContactDefaultQuery
Where adds a new predicate for the ContactDefaultQuery builder.
type ContactDefaultSelect ¶
type ContactDefaultSelect struct { *ContactDefaultQuery // contains filtered or unexported fields }
ContactDefaultSelect is the builder for selecting fields of ContactDefault entities.
func (*ContactDefaultSelect) Aggregate ¶
func (cds *ContactDefaultSelect) Aggregate(fns ...AggregateFunc) *ContactDefaultSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ContactDefaultSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContactDefaultSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContactDefaultSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContactDefaultSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContactDefaultSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContactDefaultSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContactDefaultSelect) Scan ¶
func (cds *ContactDefaultSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContactDefaultSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContactDefaultUpdate ¶
type ContactDefaultUpdate struct {
// contains filtered or unexported fields
}
ContactDefaultUpdate is the builder for updating ContactDefault entities.
func (*ContactDefaultUpdate) ClearCategory ¶
func (cdu *ContactDefaultUpdate) ClearCategory() *ContactDefaultUpdate
ClearCategory clears the value of the "category" field.
func (*ContactDefaultUpdate) ClearCustomTitle ¶
func (cdu *ContactDefaultUpdate) ClearCustomTitle() *ContactDefaultUpdate
ClearCustomTitle clears the value of the "custom_title" field.
func (*ContactDefaultUpdate) ClearDescription ¶
func (cdu *ContactDefaultUpdate) ClearDescription() *ContactDefaultUpdate
ClearDescription clears the value of the "description" field.
func (*ContactDefaultUpdate) ClearEmail ¶
func (cdu *ContactDefaultUpdate) ClearEmail() *ContactDefaultUpdate
ClearEmail clears the value of the "email" field.
func (*ContactDefaultUpdate) ClearName ¶
func (cdu *ContactDefaultUpdate) ClearName() *ContactDefaultUpdate
ClearName clears the value of the "name" field.
func (*ContactDefaultUpdate) ClearURL ¶
func (cdu *ContactDefaultUpdate) ClearURL() *ContactDefaultUpdate
ClearURL clears the value of the "url" field.
func (*ContactDefaultUpdate) Exec ¶
func (cdu *ContactDefaultUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactDefaultUpdate) ExecX ¶
func (cdu *ContactDefaultUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactDefaultUpdate) Mutation ¶
func (cdu *ContactDefaultUpdate) Mutation() *ContactDefaultMutation
Mutation returns the ContactDefaultMutation object of the builder.
func (*ContactDefaultUpdate) Save ¶
func (cdu *ContactDefaultUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ContactDefaultUpdate) SaveX ¶
func (cdu *ContactDefaultUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ContactDefaultUpdate) SetCategory ¶
func (cdu *ContactDefaultUpdate) SetCategory(s string) *ContactDefaultUpdate
SetCategory sets the "category" field.
func (*ContactDefaultUpdate) SetCreated ¶
func (cdu *ContactDefaultUpdate) SetCreated(t time.Time) *ContactDefaultUpdate
SetCreated sets the "created" field.
func (*ContactDefaultUpdate) SetCustomTitle ¶
func (cdu *ContactDefaultUpdate) SetCustomTitle(s string) *ContactDefaultUpdate
SetCustomTitle sets the "custom_title" field.
func (*ContactDefaultUpdate) SetDescription ¶
func (cdu *ContactDefaultUpdate) SetDescription(s string) *ContactDefaultUpdate
SetDescription sets the "description" field.
func (*ContactDefaultUpdate) SetEmail ¶
func (cdu *ContactDefaultUpdate) SetEmail(s string) *ContactDefaultUpdate
SetEmail sets the "email" field.
func (*ContactDefaultUpdate) SetModified ¶
func (cdu *ContactDefaultUpdate) SetModified(t time.Time) *ContactDefaultUpdate
SetModified sets the "modified" field.
func (*ContactDefaultUpdate) SetName ¶
func (cdu *ContactDefaultUpdate) SetName(s string) *ContactDefaultUpdate
SetName sets the "name" field.
func (*ContactDefaultUpdate) SetNillableCategory ¶
func (cdu *ContactDefaultUpdate) SetNillableCategory(s *string) *ContactDefaultUpdate
SetNillableCategory sets the "category" field if the given value is not nil.
func (*ContactDefaultUpdate) SetNillableCreated ¶
func (cdu *ContactDefaultUpdate) SetNillableCreated(t *time.Time) *ContactDefaultUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*ContactDefaultUpdate) SetNillableCustomTitle ¶
func (cdu *ContactDefaultUpdate) SetNillableCustomTitle(s *string) *ContactDefaultUpdate
SetNillableCustomTitle sets the "custom_title" field if the given value is not nil.
func (*ContactDefaultUpdate) SetNillableDescription ¶
func (cdu *ContactDefaultUpdate) SetNillableDescription(s *string) *ContactDefaultUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ContactDefaultUpdate) SetNillableEmail ¶
func (cdu *ContactDefaultUpdate) SetNillableEmail(s *string) *ContactDefaultUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*ContactDefaultUpdate) SetNillableName ¶
func (cdu *ContactDefaultUpdate) SetNillableName(s *string) *ContactDefaultUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ContactDefaultUpdate) SetNillableURL ¶
func (cdu *ContactDefaultUpdate) SetNillableURL(s *string) *ContactDefaultUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*ContactDefaultUpdate) SetURL ¶
func (cdu *ContactDefaultUpdate) SetURL(s string) *ContactDefaultUpdate
SetURL sets the "url" field.
func (*ContactDefaultUpdate) Where ¶
func (cdu *ContactDefaultUpdate) Where(ps ...predicate.ContactDefault) *ContactDefaultUpdate
Where appends a list predicates to the ContactDefaultUpdate builder.
type ContactDefaultUpdateOne ¶
type ContactDefaultUpdateOne struct {
// contains filtered or unexported fields
}
ContactDefaultUpdateOne is the builder for updating a single ContactDefault entity.
func (*ContactDefaultUpdateOne) ClearCategory ¶
func (cduo *ContactDefaultUpdateOne) ClearCategory() *ContactDefaultUpdateOne
ClearCategory clears the value of the "category" field.
func (*ContactDefaultUpdateOne) ClearCustomTitle ¶
func (cduo *ContactDefaultUpdateOne) ClearCustomTitle() *ContactDefaultUpdateOne
ClearCustomTitle clears the value of the "custom_title" field.
func (*ContactDefaultUpdateOne) ClearDescription ¶
func (cduo *ContactDefaultUpdateOne) ClearDescription() *ContactDefaultUpdateOne
ClearDescription clears the value of the "description" field.
func (*ContactDefaultUpdateOne) ClearEmail ¶
func (cduo *ContactDefaultUpdateOne) ClearEmail() *ContactDefaultUpdateOne
ClearEmail clears the value of the "email" field.
func (*ContactDefaultUpdateOne) ClearName ¶
func (cduo *ContactDefaultUpdateOne) ClearName() *ContactDefaultUpdateOne
ClearName clears the value of the "name" field.
func (*ContactDefaultUpdateOne) ClearURL ¶
func (cduo *ContactDefaultUpdateOne) ClearURL() *ContactDefaultUpdateOne
ClearURL clears the value of the "url" field.
func (*ContactDefaultUpdateOne) Exec ¶
func (cduo *ContactDefaultUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ContactDefaultUpdateOne) ExecX ¶
func (cduo *ContactDefaultUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactDefaultUpdateOne) Mutation ¶
func (cduo *ContactDefaultUpdateOne) Mutation() *ContactDefaultMutation
Mutation returns the ContactDefaultMutation object of the builder.
func (*ContactDefaultUpdateOne) Save ¶
func (cduo *ContactDefaultUpdateOne) Save(ctx context.Context) (*ContactDefault, error)
Save executes the query and returns the updated ContactDefault entity.
func (*ContactDefaultUpdateOne) SaveX ¶
func (cduo *ContactDefaultUpdateOne) SaveX(ctx context.Context) *ContactDefault
SaveX is like Save, but panics if an error occurs.
func (*ContactDefaultUpdateOne) Select ¶
func (cduo *ContactDefaultUpdateOne) Select(field string, fields ...string) *ContactDefaultUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ContactDefaultUpdateOne) SetCategory ¶
func (cduo *ContactDefaultUpdateOne) SetCategory(s string) *ContactDefaultUpdateOne
SetCategory sets the "category" field.
func (*ContactDefaultUpdateOne) SetCreated ¶
func (cduo *ContactDefaultUpdateOne) SetCreated(t time.Time) *ContactDefaultUpdateOne
SetCreated sets the "created" field.
func (*ContactDefaultUpdateOne) SetCustomTitle ¶
func (cduo *ContactDefaultUpdateOne) SetCustomTitle(s string) *ContactDefaultUpdateOne
SetCustomTitle sets the "custom_title" field.
func (*ContactDefaultUpdateOne) SetDescription ¶
func (cduo *ContactDefaultUpdateOne) SetDescription(s string) *ContactDefaultUpdateOne
SetDescription sets the "description" field.
func (*ContactDefaultUpdateOne) SetEmail ¶
func (cduo *ContactDefaultUpdateOne) SetEmail(s string) *ContactDefaultUpdateOne
SetEmail sets the "email" field.
func (*ContactDefaultUpdateOne) SetModified ¶
func (cduo *ContactDefaultUpdateOne) SetModified(t time.Time) *ContactDefaultUpdateOne
SetModified sets the "modified" field.
func (*ContactDefaultUpdateOne) SetName ¶
func (cduo *ContactDefaultUpdateOne) SetName(s string) *ContactDefaultUpdateOne
SetName sets the "name" field.
func (*ContactDefaultUpdateOne) SetNillableCategory ¶
func (cduo *ContactDefaultUpdateOne) SetNillableCategory(s *string) *ContactDefaultUpdateOne
SetNillableCategory sets the "category" field if the given value is not nil.
func (*ContactDefaultUpdateOne) SetNillableCreated ¶
func (cduo *ContactDefaultUpdateOne) SetNillableCreated(t *time.Time) *ContactDefaultUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*ContactDefaultUpdateOne) SetNillableCustomTitle ¶
func (cduo *ContactDefaultUpdateOne) SetNillableCustomTitle(s *string) *ContactDefaultUpdateOne
SetNillableCustomTitle sets the "custom_title" field if the given value is not nil.
func (*ContactDefaultUpdateOne) SetNillableDescription ¶
func (cduo *ContactDefaultUpdateOne) SetNillableDescription(s *string) *ContactDefaultUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ContactDefaultUpdateOne) SetNillableEmail ¶
func (cduo *ContactDefaultUpdateOne) SetNillableEmail(s *string) *ContactDefaultUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*ContactDefaultUpdateOne) SetNillableName ¶
func (cduo *ContactDefaultUpdateOne) SetNillableName(s *string) *ContactDefaultUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ContactDefaultUpdateOne) SetNillableURL ¶
func (cduo *ContactDefaultUpdateOne) SetNillableURL(s *string) *ContactDefaultUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*ContactDefaultUpdateOne) SetURL ¶
func (cduo *ContactDefaultUpdateOne) SetURL(s string) *ContactDefaultUpdateOne
SetURL sets the "url" field.
func (*ContactDefaultUpdateOne) Where ¶
func (cduo *ContactDefaultUpdateOne) Where(ps ...predicate.ContactDefault) *ContactDefaultUpdateOne
Where appends a list predicates to the ContactDefaultUpdate builder.
type ContactDefaults ¶
type ContactDefaults []*ContactDefault
ContactDefaults is a parsable slice of ContactDefault.
type ContactDelete ¶
type ContactDelete struct {
// contains filtered or unexported fields
}
ContactDelete is the builder for deleting a Contact entity.
func (*ContactDelete) Exec ¶
func (cd *ContactDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ContactDelete) ExecX ¶
func (cd *ContactDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ContactDelete) Where ¶
func (cd *ContactDelete) Where(ps ...predicate.Contact) *ContactDelete
Where appends a list predicates to the ContactDelete builder.
type ContactDeleteOne ¶
type ContactDeleteOne struct {
// contains filtered or unexported fields
}
ContactDeleteOne is the builder for deleting a single Contact entity.
func (*ContactDeleteOne) Exec ¶
func (cdo *ContactDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ContactDeleteOne) ExecX ¶
func (cdo *ContactDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactDeleteOne) Where ¶
func (cdo *ContactDeleteOne) Where(ps ...predicate.Contact) *ContactDeleteOne
Where appends a list predicates to the ContactDelete builder.
type ContactGroupBy ¶
type ContactGroupBy struct {
// contains filtered or unexported fields
}
ContactGroupBy is the group-by builder for Contact entities.
func (*ContactGroupBy) Aggregate ¶
func (cgb *ContactGroupBy) Aggregate(fns ...AggregateFunc) *ContactGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ContactGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Scan ¶
func (cgb *ContactGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContactGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContactMutation ¶
type ContactMutation struct {
// contains filtered or unexported fields
}
ContactMutation represents an operation that mutates the Contact nodes in the graph.
func (*ContactMutation) AddField ¶
func (m *ContactMutation) 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 (*ContactMutation) AddToUserID ¶
func (m *ContactMutation) AddToUserID(u int32)
AddToUserID adds u to the "to_user_id" field.
func (*ContactMutation) AddedEdges ¶
func (m *ContactMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ContactMutation) AddedField ¶
func (m *ContactMutation) 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 (*ContactMutation) AddedFields ¶
func (m *ContactMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ContactMutation) AddedIDs ¶
func (m *ContactMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ContactMutation) AddedToUserID ¶
func (m *ContactMutation) AddedToUserID() (r int32, exists bool)
AddedToUserID returns the value that was added to the "to_user_id" field in this mutation.
func (*ContactMutation) BrowserName ¶
func (m *ContactMutation) BrowserName() (r string, exists bool)
BrowserName returns the value of the "browser_name" field in the mutation.
func (*ContactMutation) BrowserNameCleared ¶
func (m *ContactMutation) BrowserNameCleared() bool
BrowserNameCleared returns if the "browser_name" field was cleared in this mutation.
func (*ContactMutation) Category ¶
func (m *ContactMutation) Category() (r string, exists bool)
Category returns the value of the "category" field in the mutation.
func (*ContactMutation) CategoryCleared ¶
func (m *ContactMutation) CategoryCleared() bool
CategoryCleared returns if the "category" field was cleared in this mutation.
func (*ContactMutation) ClearBrowserName ¶
func (m *ContactMutation) ClearBrowserName()
ClearBrowserName clears the value of the "browser_name" field.
func (*ContactMutation) ClearCategory ¶
func (m *ContactMutation) ClearCategory()
ClearCategory clears the value of the "category" field.
func (*ContactMutation) ClearCustomTitle ¶
func (m *ContactMutation) ClearCustomTitle()
ClearCustomTitle clears the value of the "custom_title" field.
func (*ContactMutation) ClearCustomValue ¶
func (m *ContactMutation) ClearCustomValue()
ClearCustomValue clears the value of the "custom_value" field.
func (*ContactMutation) ClearDeviceName ¶
func (m *ContactMutation) ClearDeviceName()
ClearDeviceName clears the value of the "device_name" field.
func (*ContactMutation) ClearEdge ¶
func (m *ContactMutation) 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 (*ContactMutation) ClearField ¶
func (m *ContactMutation) 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 (*ContactMutation) ClearIsMobile ¶
func (m *ContactMutation) ClearIsMobile()
ClearIsMobile clears the value of the "is_mobile" field.
func (*ContactMutation) ClearOs ¶
func (m *ContactMutation) ClearOs()
ClearOs clears the value of the "os" field.
func (*ContactMutation) ClearURL ¶
func (m *ContactMutation) ClearURL()
ClearURL clears the value of the "url" field.
func (*ContactMutation) ClearedEdges ¶
func (m *ContactMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ContactMutation) ClearedFields ¶
func (m *ContactMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ContactMutation) Client ¶
func (m ContactMutation) 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 (*ContactMutation) Created ¶
func (m *ContactMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*ContactMutation) CustomTitle ¶
func (m *ContactMutation) CustomTitle() (r string, exists bool)
CustomTitle returns the value of the "custom_title" field in the mutation.
func (*ContactMutation) CustomTitleCleared ¶
func (m *ContactMutation) CustomTitleCleared() bool
CustomTitleCleared returns if the "custom_title" field was cleared in this mutation.
func (*ContactMutation) CustomValue ¶
func (m *ContactMutation) CustomValue() (r string, exists bool)
CustomValue returns the value of the "custom_value" field in the mutation.
func (*ContactMutation) CustomValueCleared ¶
func (m *ContactMutation) CustomValueCleared() bool
CustomValueCleared returns if the "custom_value" field was cleared in this mutation.
func (*ContactMutation) Detail ¶
func (m *ContactMutation) Detail() (r string, exists bool)
Detail returns the value of the "detail" field in the mutation.
func (*ContactMutation) DeviceName ¶
func (m *ContactMutation) DeviceName() (r string, exists bool)
DeviceName returns the value of the "device_name" field in the mutation.
func (*ContactMutation) DeviceNameCleared ¶
func (m *ContactMutation) DeviceNameCleared() bool
DeviceNameCleared returns if the "device_name" field was cleared in this mutation.
func (*ContactMutation) EdgeCleared ¶
func (m *ContactMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ContactMutation) Field ¶
func (m *ContactMutation) 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 (*ContactMutation) FieldCleared ¶
func (m *ContactMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ContactMutation) Fields ¶
func (m *ContactMutation) 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 (*ContactMutation) ID ¶
func (m *ContactMutation) ID() (id uint32, 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 (*ContactMutation) IDs ¶
func (m *ContactMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ContactMutation) IP ¶
func (m *ContactMutation) IP() (r string, exists bool)
IP returns the value of the "ip" field in the mutation.
func (*ContactMutation) IsMobile ¶
func (m *ContactMutation) IsMobile() (r bool, exists bool)
IsMobile returns the value of the "is_mobile" field in the mutation.
func (*ContactMutation) IsMobileCleared ¶
func (m *ContactMutation) IsMobileCleared() bool
IsMobileCleared returns if the "is_mobile" field was cleared in this mutation.
func (*ContactMutation) Lang ¶
func (m *ContactMutation) Lang() (r string, exists bool)
Lang returns the value of the "lang" field in the mutation.
func (*ContactMutation) Mail ¶
func (m *ContactMutation) Mail() (r string, exists bool)
Mail returns the value of the "mail" field in the mutation.
func (*ContactMutation) Modified ¶
func (m *ContactMutation) Modified() (r time.Time, exists bool)
Modified returns the value of the "modified" field in the mutation.
func (*ContactMutation) Name ¶
func (m *ContactMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ContactMutation) OldBrowserName ¶
func (m *ContactMutation) OldBrowserName(ctx context.Context) (v string, err error)
OldBrowserName returns the old "browser_name" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldCategory ¶
func (m *ContactMutation) OldCategory(ctx context.Context) (v string, err error)
OldCategory returns the old "category" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldCustomTitle ¶
func (m *ContactMutation) OldCustomTitle(ctx context.Context) (v string, err error)
OldCustomTitle returns the old "custom_title" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldCustomValue ¶
func (m *ContactMutation) OldCustomValue(ctx context.Context) (v string, err error)
OldCustomValue returns the old "custom_value" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldDetail ¶
func (m *ContactMutation) OldDetail(ctx context.Context) (v string, err error)
OldDetail returns the old "detail" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldDeviceName ¶
func (m *ContactMutation) OldDeviceName(ctx context.Context) (v string, err error)
OldDeviceName returns the old "device_name" field's value of the Contact entity. If the Contact 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 (*ContactMutation) 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 (*ContactMutation) OldIP ¶
func (m *ContactMutation) OldIP(ctx context.Context) (v string, err error)
OldIP returns the old "ip" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldIsMobile ¶
func (m *ContactMutation) OldIsMobile(ctx context.Context) (v bool, err error)
OldIsMobile returns the old "is_mobile" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldLang ¶
func (m *ContactMutation) OldLang(ctx context.Context) (v string, err error)
OldLang returns the old "lang" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldMail ¶
func (m *ContactMutation) OldMail(ctx context.Context) (v string, err error)
OldMail returns the old "mail" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldModified ¶
OldModified returns the old "modified" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldName ¶
func (m *ContactMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldOs ¶
func (m *ContactMutation) OldOs(ctx context.Context) (v string, err error)
OldOs returns the old "os" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldTitle ¶
func (m *ContactMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldToUserID ¶
func (m *ContactMutation) OldToUserID(ctx context.Context) (v uint32, err error)
OldToUserID returns the old "to_user_id" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldURL ¶
func (m *ContactMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the Contact entity. If the Contact 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 (*ContactMutation) Os ¶
func (m *ContactMutation) Os() (r string, exists bool)
Os returns the value of the "os" field in the mutation.
func (*ContactMutation) OsCleared ¶
func (m *ContactMutation) OsCleared() bool
OsCleared returns if the "os" field was cleared in this mutation.
func (*ContactMutation) RemovedEdges ¶
func (m *ContactMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ContactMutation) RemovedIDs ¶
func (m *ContactMutation) 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 (*ContactMutation) ResetBrowserName ¶
func (m *ContactMutation) ResetBrowserName()
ResetBrowserName resets all changes to the "browser_name" field.
func (*ContactMutation) ResetCategory ¶
func (m *ContactMutation) ResetCategory()
ResetCategory resets all changes to the "category" field.
func (*ContactMutation) ResetCreated ¶
func (m *ContactMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*ContactMutation) ResetCustomTitle ¶
func (m *ContactMutation) ResetCustomTitle()
ResetCustomTitle resets all changes to the "custom_title" field.
func (*ContactMutation) ResetCustomValue ¶
func (m *ContactMutation) ResetCustomValue()
ResetCustomValue resets all changes to the "custom_value" field.
func (*ContactMutation) ResetDetail ¶
func (m *ContactMutation) ResetDetail()
ResetDetail resets all changes to the "detail" field.
func (*ContactMutation) ResetDeviceName ¶
func (m *ContactMutation) ResetDeviceName()
ResetDeviceName resets all changes to the "device_name" field.
func (*ContactMutation) ResetEdge ¶
func (m *ContactMutation) 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 (*ContactMutation) ResetField ¶
func (m *ContactMutation) 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 (*ContactMutation) ResetIP ¶
func (m *ContactMutation) ResetIP()
ResetIP resets all changes to the "ip" field.
func (*ContactMutation) ResetIsMobile ¶
func (m *ContactMutation) ResetIsMobile()
ResetIsMobile resets all changes to the "is_mobile" field.
func (*ContactMutation) ResetLang ¶
func (m *ContactMutation) ResetLang()
ResetLang resets all changes to the "lang" field.
func (*ContactMutation) ResetMail ¶
func (m *ContactMutation) ResetMail()
ResetMail resets all changes to the "mail" field.
func (*ContactMutation) ResetModified ¶
func (m *ContactMutation) ResetModified()
ResetModified resets all changes to the "modified" field.
func (*ContactMutation) ResetName ¶
func (m *ContactMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ContactMutation) ResetOs ¶
func (m *ContactMutation) ResetOs()
ResetOs resets all changes to the "os" field.
func (*ContactMutation) ResetTitle ¶
func (m *ContactMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*ContactMutation) ResetToUserID ¶
func (m *ContactMutation) ResetToUserID()
ResetToUserID resets all changes to the "to_user_id" field.
func (*ContactMutation) ResetURL ¶
func (m *ContactMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*ContactMutation) SetBrowserName ¶
func (m *ContactMutation) SetBrowserName(s string)
SetBrowserName sets the "browser_name" field.
func (*ContactMutation) SetCategory ¶
func (m *ContactMutation) SetCategory(s string)
SetCategory sets the "category" field.
func (*ContactMutation) SetCreated ¶
func (m *ContactMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*ContactMutation) SetCustomTitle ¶
func (m *ContactMutation) SetCustomTitle(s string)
SetCustomTitle sets the "custom_title" field.
func (*ContactMutation) SetCustomValue ¶
func (m *ContactMutation) SetCustomValue(s string)
SetCustomValue sets the "custom_value" field.
func (*ContactMutation) SetDetail ¶
func (m *ContactMutation) SetDetail(s string)
SetDetail sets the "detail" field.
func (*ContactMutation) SetDeviceName ¶
func (m *ContactMutation) SetDeviceName(s string)
SetDeviceName sets the "device_name" field.
func (*ContactMutation) SetField ¶
func (m *ContactMutation) 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 (*ContactMutation) SetID ¶
func (m *ContactMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Contact entities.
func (*ContactMutation) SetIP ¶
func (m *ContactMutation) SetIP(s string)
SetIP sets the "ip" field.
func (*ContactMutation) SetIsMobile ¶
func (m *ContactMutation) SetIsMobile(b bool)
SetIsMobile sets the "is_mobile" field.
func (*ContactMutation) SetLang ¶
func (m *ContactMutation) SetLang(s string)
SetLang sets the "lang" field.
func (*ContactMutation) SetMail ¶
func (m *ContactMutation) SetMail(s string)
SetMail sets the "mail" field.
func (*ContactMutation) SetModified ¶
func (m *ContactMutation) SetModified(t time.Time)
SetModified sets the "modified" field.
func (*ContactMutation) SetName ¶
func (m *ContactMutation) SetName(s string)
SetName sets the "name" field.
func (*ContactMutation) SetOp ¶
func (m *ContactMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ContactMutation) SetOs ¶
func (m *ContactMutation) SetOs(s string)
SetOs sets the "os" field.
func (*ContactMutation) SetTitle ¶
func (m *ContactMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*ContactMutation) SetToUserID ¶
func (m *ContactMutation) SetToUserID(u uint32)
SetToUserID sets the "to_user_id" field.
func (*ContactMutation) SetURL ¶
func (m *ContactMutation) SetURL(s string)
SetURL sets the "url" field.
func (*ContactMutation) Title ¶
func (m *ContactMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (*ContactMutation) ToUserID ¶
func (m *ContactMutation) ToUserID() (r uint32, exists bool)
ToUserID returns the value of the "to_user_id" field in the mutation.
func (ContactMutation) Tx ¶
func (m ContactMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ContactMutation) Type ¶
func (m *ContactMutation) Type() string
Type returns the node type of this mutation (Contact).
func (*ContactMutation) URL ¶
func (m *ContactMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*ContactMutation) URLCleared ¶
func (m *ContactMutation) URLCleared() bool
URLCleared returns if the "url" field was cleared in this mutation.
func (*ContactMutation) Where ¶
func (m *ContactMutation) Where(ps ...predicate.Contact)
Where appends a list predicates to the ContactMutation builder.
func (*ContactMutation) WhereP ¶
func (m *ContactMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ContactMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ContactQuery ¶
type ContactQuery struct {
// contains filtered or unexported fields
}
ContactQuery is the builder for querying Contact entities.
func (*ContactQuery) Aggregate ¶
func (cq *ContactQuery) Aggregate(fns ...AggregateFunc) *ContactSelect
Aggregate returns a ContactSelect configured with the given aggregations.
func (*ContactQuery) All ¶
func (cq *ContactQuery) All(ctx context.Context) ([]*Contact, error)
All executes the query and returns a list of Contacts.
func (*ContactQuery) AllX ¶
func (cq *ContactQuery) AllX(ctx context.Context) []*Contact
AllX is like All, but panics if an error occurs.
func (*ContactQuery) Clone ¶
func (cq *ContactQuery) Clone() *ContactQuery
Clone returns a duplicate of the ContactQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ContactQuery) Count ¶
func (cq *ContactQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ContactQuery) CountX ¶
func (cq *ContactQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ContactQuery) Exist ¶
func (cq *ContactQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ContactQuery) ExistX ¶
func (cq *ContactQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ContactQuery) First ¶
func (cq *ContactQuery) First(ctx context.Context) (*Contact, error)
First returns the first Contact entity from the query. Returns a *NotFoundError when no Contact was found.
func (*ContactQuery) FirstID ¶
func (cq *ContactQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first Contact ID from the query. Returns a *NotFoundError when no Contact ID was found.
func (*ContactQuery) FirstIDX ¶
func (cq *ContactQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ContactQuery) FirstX ¶
func (cq *ContactQuery) FirstX(ctx context.Context) *Contact
FirstX is like First, but panics if an error occurs.
func (*ContactQuery) GroupBy ¶
func (cq *ContactQuery) GroupBy(field string, fields ...string) *ContactGroupBy
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 { ToUserID uint32 `json:"to_user_id,omitempty"` Count int `json:"count,omitempty"` } client.Contact.Query(). GroupBy(contact.FieldToUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ContactQuery) IDs ¶
func (cq *ContactQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of Contact IDs.
func (*ContactQuery) IDsX ¶
func (cq *ContactQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*ContactQuery) Limit ¶
func (cq *ContactQuery) Limit(limit int) *ContactQuery
Limit the number of records to be returned by this query.
func (*ContactQuery) Offset ¶
func (cq *ContactQuery) Offset(offset int) *ContactQuery
Offset to start from.
func (*ContactQuery) Only ¶
func (cq *ContactQuery) Only(ctx context.Context) (*Contact, error)
Only returns a single Contact entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Contact entity is found. Returns a *NotFoundError when no Contact entities are found.
func (*ContactQuery) OnlyID ¶
func (cq *ContactQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only Contact ID in the query. Returns a *NotSingularError when more than one Contact ID is found. Returns a *NotFoundError when no entities are found.
func (*ContactQuery) OnlyIDX ¶
func (cq *ContactQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ContactQuery) OnlyX ¶
func (cq *ContactQuery) OnlyX(ctx context.Context) *Contact
OnlyX is like Only, but panics if an error occurs.
func (*ContactQuery) Order ¶
func (cq *ContactQuery) Order(o ...OrderFunc) *ContactQuery
Order specifies how the records should be ordered.
func (*ContactQuery) Select ¶
func (cq *ContactQuery) Select(fields ...string) *ContactSelect
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 { ToUserID uint32 `json:"to_user_id,omitempty"` } client.Contact.Query(). Select(contact.FieldToUserID). Scan(ctx, &v)
func (*ContactQuery) Unique ¶
func (cq *ContactQuery) Unique(unique bool) *ContactQuery
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 (*ContactQuery) Where ¶
func (cq *ContactQuery) Where(ps ...predicate.Contact) *ContactQuery
Where adds a new predicate for the ContactQuery builder.
type ContactSelect ¶
type ContactSelect struct { *ContactQuery // contains filtered or unexported fields }
ContactSelect is the builder for selecting fields of Contact entities.
func (*ContactSelect) Aggregate ¶
func (cs *ContactSelect) Aggregate(fns ...AggregateFunc) *ContactSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ContactSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Scan ¶
func (cs *ContactSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContactSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContactUpdate ¶
type ContactUpdate struct {
// contains filtered or unexported fields
}
ContactUpdate is the builder for updating Contact entities.
func (*ContactUpdate) AddToUserID ¶
func (cu *ContactUpdate) AddToUserID(u int32) *ContactUpdate
AddToUserID adds u to the "to_user_id" field.
func (*ContactUpdate) ClearBrowserName ¶
func (cu *ContactUpdate) ClearBrowserName() *ContactUpdate
ClearBrowserName clears the value of the "browser_name" field.
func (*ContactUpdate) ClearCategory ¶
func (cu *ContactUpdate) ClearCategory() *ContactUpdate
ClearCategory clears the value of the "category" field.
func (*ContactUpdate) ClearCustomTitle ¶
func (cu *ContactUpdate) ClearCustomTitle() *ContactUpdate
ClearCustomTitle clears the value of the "custom_title" field.
func (*ContactUpdate) ClearCustomValue ¶
func (cu *ContactUpdate) ClearCustomValue() *ContactUpdate
ClearCustomValue clears the value of the "custom_value" field.
func (*ContactUpdate) ClearDeviceName ¶
func (cu *ContactUpdate) ClearDeviceName() *ContactUpdate
ClearDeviceName clears the value of the "device_name" field.
func (*ContactUpdate) ClearIsMobile ¶
func (cu *ContactUpdate) ClearIsMobile() *ContactUpdate
ClearIsMobile clears the value of the "is_mobile" field.
func (*ContactUpdate) ClearOs ¶
func (cu *ContactUpdate) ClearOs() *ContactUpdate
ClearOs clears the value of the "os" field.
func (*ContactUpdate) ClearURL ¶
func (cu *ContactUpdate) ClearURL() *ContactUpdate
ClearURL clears the value of the "url" field.
func (*ContactUpdate) Exec ¶
func (cu *ContactUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactUpdate) ExecX ¶
func (cu *ContactUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpdate) Mutation ¶
func (cu *ContactUpdate) Mutation() *ContactMutation
Mutation returns the ContactMutation object of the builder.
func (*ContactUpdate) Save ¶
func (cu *ContactUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ContactUpdate) SaveX ¶
func (cu *ContactUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ContactUpdate) SetBrowserName ¶
func (cu *ContactUpdate) SetBrowserName(s string) *ContactUpdate
SetBrowserName sets the "browser_name" field.
func (*ContactUpdate) SetCategory ¶
func (cu *ContactUpdate) SetCategory(s string) *ContactUpdate
SetCategory sets the "category" field.
func (*ContactUpdate) SetCreated ¶
func (cu *ContactUpdate) SetCreated(t time.Time) *ContactUpdate
SetCreated sets the "created" field.
func (*ContactUpdate) SetCustomTitle ¶
func (cu *ContactUpdate) SetCustomTitle(s string) *ContactUpdate
SetCustomTitle sets the "custom_title" field.
func (*ContactUpdate) SetCustomValue ¶
func (cu *ContactUpdate) SetCustomValue(s string) *ContactUpdate
SetCustomValue sets the "custom_value" field.
func (*ContactUpdate) SetDetail ¶
func (cu *ContactUpdate) SetDetail(s string) *ContactUpdate
SetDetail sets the "detail" field.
func (*ContactUpdate) SetDeviceName ¶
func (cu *ContactUpdate) SetDeviceName(s string) *ContactUpdate
SetDeviceName sets the "device_name" field.
func (*ContactUpdate) SetIP ¶
func (cu *ContactUpdate) SetIP(s string) *ContactUpdate
SetIP sets the "ip" field.
func (*ContactUpdate) SetIsMobile ¶
func (cu *ContactUpdate) SetIsMobile(b bool) *ContactUpdate
SetIsMobile sets the "is_mobile" field.
func (*ContactUpdate) SetLang ¶
func (cu *ContactUpdate) SetLang(s string) *ContactUpdate
SetLang sets the "lang" field.
func (*ContactUpdate) SetMail ¶
func (cu *ContactUpdate) SetMail(s string) *ContactUpdate
SetMail sets the "mail" field.
func (*ContactUpdate) SetModified ¶
func (cu *ContactUpdate) SetModified(t time.Time) *ContactUpdate
SetModified sets the "modified" field.
func (*ContactUpdate) SetName ¶
func (cu *ContactUpdate) SetName(s string) *ContactUpdate
SetName sets the "name" field.
func (*ContactUpdate) SetNillableBrowserName ¶
func (cu *ContactUpdate) SetNillableBrowserName(s *string) *ContactUpdate
SetNillableBrowserName sets the "browser_name" field if the given value is not nil.
func (*ContactUpdate) SetNillableCategory ¶
func (cu *ContactUpdate) SetNillableCategory(s *string) *ContactUpdate
SetNillableCategory sets the "category" field if the given value is not nil.
func (*ContactUpdate) SetNillableCreated ¶
func (cu *ContactUpdate) SetNillableCreated(t *time.Time) *ContactUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*ContactUpdate) SetNillableCustomTitle ¶
func (cu *ContactUpdate) SetNillableCustomTitle(s *string) *ContactUpdate
SetNillableCustomTitle sets the "custom_title" field if the given value is not nil.
func (*ContactUpdate) SetNillableCustomValue ¶
func (cu *ContactUpdate) SetNillableCustomValue(s *string) *ContactUpdate
SetNillableCustomValue sets the "custom_value" field if the given value is not nil.
func (*ContactUpdate) SetNillableDeviceName ¶
func (cu *ContactUpdate) SetNillableDeviceName(s *string) *ContactUpdate
SetNillableDeviceName sets the "device_name" field if the given value is not nil.
func (*ContactUpdate) SetNillableIsMobile ¶
func (cu *ContactUpdate) SetNillableIsMobile(b *bool) *ContactUpdate
SetNillableIsMobile sets the "is_mobile" field if the given value is not nil.
func (*ContactUpdate) SetNillableOs ¶
func (cu *ContactUpdate) SetNillableOs(s *string) *ContactUpdate
SetNillableOs sets the "os" field if the given value is not nil.
func (*ContactUpdate) SetNillableURL ¶
func (cu *ContactUpdate) SetNillableURL(s *string) *ContactUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*ContactUpdate) SetOs ¶
func (cu *ContactUpdate) SetOs(s string) *ContactUpdate
SetOs sets the "os" field.
func (*ContactUpdate) SetTitle ¶
func (cu *ContactUpdate) SetTitle(s string) *ContactUpdate
SetTitle sets the "title" field.
func (*ContactUpdate) SetToUserID ¶
func (cu *ContactUpdate) SetToUserID(u uint32) *ContactUpdate
SetToUserID sets the "to_user_id" field.
func (*ContactUpdate) SetURL ¶
func (cu *ContactUpdate) SetURL(s string) *ContactUpdate
SetURL sets the "url" field.
func (*ContactUpdate) Where ¶
func (cu *ContactUpdate) Where(ps ...predicate.Contact) *ContactUpdate
Where appends a list predicates to the ContactUpdate builder.
type ContactUpdateOne ¶
type ContactUpdateOne struct {
// contains filtered or unexported fields
}
ContactUpdateOne is the builder for updating a single Contact entity.
func (*ContactUpdateOne) AddToUserID ¶
func (cuo *ContactUpdateOne) AddToUserID(u int32) *ContactUpdateOne
AddToUserID adds u to the "to_user_id" field.
func (*ContactUpdateOne) ClearBrowserName ¶
func (cuo *ContactUpdateOne) ClearBrowserName() *ContactUpdateOne
ClearBrowserName clears the value of the "browser_name" field.
func (*ContactUpdateOne) ClearCategory ¶
func (cuo *ContactUpdateOne) ClearCategory() *ContactUpdateOne
ClearCategory clears the value of the "category" field.
func (*ContactUpdateOne) ClearCustomTitle ¶
func (cuo *ContactUpdateOne) ClearCustomTitle() *ContactUpdateOne
ClearCustomTitle clears the value of the "custom_title" field.
func (*ContactUpdateOne) ClearCustomValue ¶
func (cuo *ContactUpdateOne) ClearCustomValue() *ContactUpdateOne
ClearCustomValue clears the value of the "custom_value" field.
func (*ContactUpdateOne) ClearDeviceName ¶
func (cuo *ContactUpdateOne) ClearDeviceName() *ContactUpdateOne
ClearDeviceName clears the value of the "device_name" field.
func (*ContactUpdateOne) ClearIsMobile ¶
func (cuo *ContactUpdateOne) ClearIsMobile() *ContactUpdateOne
ClearIsMobile clears the value of the "is_mobile" field.
func (*ContactUpdateOne) ClearOs ¶
func (cuo *ContactUpdateOne) ClearOs() *ContactUpdateOne
ClearOs clears the value of the "os" field.
func (*ContactUpdateOne) ClearURL ¶
func (cuo *ContactUpdateOne) ClearURL() *ContactUpdateOne
ClearURL clears the value of the "url" field.
func (*ContactUpdateOne) Exec ¶
func (cuo *ContactUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ContactUpdateOne) ExecX ¶
func (cuo *ContactUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpdateOne) Mutation ¶
func (cuo *ContactUpdateOne) Mutation() *ContactMutation
Mutation returns the ContactMutation object of the builder.
func (*ContactUpdateOne) Save ¶
func (cuo *ContactUpdateOne) Save(ctx context.Context) (*Contact, error)
Save executes the query and returns the updated Contact entity.
func (*ContactUpdateOne) SaveX ¶
func (cuo *ContactUpdateOne) SaveX(ctx context.Context) *Contact
SaveX is like Save, but panics if an error occurs.
func (*ContactUpdateOne) Select ¶
func (cuo *ContactUpdateOne) Select(field string, fields ...string) *ContactUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ContactUpdateOne) SetBrowserName ¶
func (cuo *ContactUpdateOne) SetBrowserName(s string) *ContactUpdateOne
SetBrowserName sets the "browser_name" field.
func (*ContactUpdateOne) SetCategory ¶
func (cuo *ContactUpdateOne) SetCategory(s string) *ContactUpdateOne
SetCategory sets the "category" field.
func (*ContactUpdateOne) SetCreated ¶
func (cuo *ContactUpdateOne) SetCreated(t time.Time) *ContactUpdateOne
SetCreated sets the "created" field.
func (*ContactUpdateOne) SetCustomTitle ¶
func (cuo *ContactUpdateOne) SetCustomTitle(s string) *ContactUpdateOne
SetCustomTitle sets the "custom_title" field.
func (*ContactUpdateOne) SetCustomValue ¶
func (cuo *ContactUpdateOne) SetCustomValue(s string) *ContactUpdateOne
SetCustomValue sets the "custom_value" field.
func (*ContactUpdateOne) SetDetail ¶
func (cuo *ContactUpdateOne) SetDetail(s string) *ContactUpdateOne
SetDetail sets the "detail" field.
func (*ContactUpdateOne) SetDeviceName ¶
func (cuo *ContactUpdateOne) SetDeviceName(s string) *ContactUpdateOne
SetDeviceName sets the "device_name" field.
func (*ContactUpdateOne) SetIP ¶
func (cuo *ContactUpdateOne) SetIP(s string) *ContactUpdateOne
SetIP sets the "ip" field.
func (*ContactUpdateOne) SetIsMobile ¶
func (cuo *ContactUpdateOne) SetIsMobile(b bool) *ContactUpdateOne
SetIsMobile sets the "is_mobile" field.
func (*ContactUpdateOne) SetLang ¶
func (cuo *ContactUpdateOne) SetLang(s string) *ContactUpdateOne
SetLang sets the "lang" field.
func (*ContactUpdateOne) SetMail ¶
func (cuo *ContactUpdateOne) SetMail(s string) *ContactUpdateOne
SetMail sets the "mail" field.
func (*ContactUpdateOne) SetModified ¶
func (cuo *ContactUpdateOne) SetModified(t time.Time) *ContactUpdateOne
SetModified sets the "modified" field.
func (*ContactUpdateOne) SetName ¶
func (cuo *ContactUpdateOne) SetName(s string) *ContactUpdateOne
SetName sets the "name" field.
func (*ContactUpdateOne) SetNillableBrowserName ¶
func (cuo *ContactUpdateOne) SetNillableBrowserName(s *string) *ContactUpdateOne
SetNillableBrowserName sets the "browser_name" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableCategory ¶
func (cuo *ContactUpdateOne) SetNillableCategory(s *string) *ContactUpdateOne
SetNillableCategory sets the "category" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableCreated ¶
func (cuo *ContactUpdateOne) SetNillableCreated(t *time.Time) *ContactUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableCustomTitle ¶
func (cuo *ContactUpdateOne) SetNillableCustomTitle(s *string) *ContactUpdateOne
SetNillableCustomTitle sets the "custom_title" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableCustomValue ¶
func (cuo *ContactUpdateOne) SetNillableCustomValue(s *string) *ContactUpdateOne
SetNillableCustomValue sets the "custom_value" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableDeviceName ¶
func (cuo *ContactUpdateOne) SetNillableDeviceName(s *string) *ContactUpdateOne
SetNillableDeviceName sets the "device_name" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableIsMobile ¶
func (cuo *ContactUpdateOne) SetNillableIsMobile(b *bool) *ContactUpdateOne
SetNillableIsMobile sets the "is_mobile" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableOs ¶
func (cuo *ContactUpdateOne) SetNillableOs(s *string) *ContactUpdateOne
SetNillableOs sets the "os" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableURL ¶
func (cuo *ContactUpdateOne) SetNillableURL(s *string) *ContactUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*ContactUpdateOne) SetOs ¶
func (cuo *ContactUpdateOne) SetOs(s string) *ContactUpdateOne
SetOs sets the "os" field.
func (*ContactUpdateOne) SetTitle ¶
func (cuo *ContactUpdateOne) SetTitle(s string) *ContactUpdateOne
SetTitle sets the "title" field.
func (*ContactUpdateOne) SetToUserID ¶
func (cuo *ContactUpdateOne) SetToUserID(u uint32) *ContactUpdateOne
SetToUserID sets the "to_user_id" field.
func (*ContactUpdateOne) SetURL ¶
func (cuo *ContactUpdateOne) SetURL(s string) *ContactUpdateOne
SetURL sets the "url" field.
func (*ContactUpdateOne) Where ¶
func (cuo *ContactUpdateOne) Where(ps ...predicate.Contact) *ContactUpdateOne
Where appends a list predicates to the ContactUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Link ¶
type Link struct { // ID of the ent. ID uint32 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID uint32 `json:"user_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // NameJa holds the value of the "name_ja" field. NameJa string `json:"name_ja,omitempty"` // SiteURL holds the value of the "site_url" field. SiteURL string `json:"site_url,omitempty"` // FaviconURL holds the value of the "favicon_url" field. FaviconURL string `json:"favicon_url,omitempty"` // CategoryID holds the value of the "category_id" field. CategoryID uint32 `json:"category_id,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Modified holds the value of the "modified" field. Modified time.Time `json:"modified,omitempty"` // contains filtered or unexported fields }
Link is the model entity for the Link schema.
func (*Link) Unwrap ¶
Unwrap unwraps the Link 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 (*Link) Update ¶
func (l *Link) Update() *LinkUpdateOne
Update returns a builder for updating this Link. Note that you need to call Link.Unwrap() before calling this method if this Link was returned from a transaction, and the transaction was committed or rolled back.
type LinkClient ¶
type LinkClient struct {
// contains filtered or unexported fields
}
LinkClient is a client for the Link schema.
func NewLinkClient ¶
func NewLinkClient(c config) *LinkClient
NewLinkClient returns a client for the Link from the given config.
func (*LinkClient) Create ¶
func (c *LinkClient) Create() *LinkCreate
Create returns a builder for creating a Link entity.
func (*LinkClient) CreateBulk ¶
func (c *LinkClient) CreateBulk(builders ...*LinkCreate) *LinkCreateBulk
CreateBulk returns a builder for creating a bulk of Link entities.
func (*LinkClient) Delete ¶
func (c *LinkClient) Delete() *LinkDelete
Delete returns a delete builder for Link.
func (*LinkClient) DeleteOne ¶
func (c *LinkClient) DeleteOne(l *Link) *LinkDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LinkClient) DeleteOneID ¶
func (c *LinkClient) DeleteOneID(id uint32) *LinkDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LinkClient) GetX ¶
func (c *LinkClient) GetX(ctx context.Context, id uint32) *Link
GetX is like Get, but panics if an error occurs.
func (*LinkClient) Intercept ¶
func (c *LinkClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `link.Intercept(f(g(h())))`.
func (*LinkClient) Interceptors ¶
func (c *LinkClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LinkClient) Query ¶
func (c *LinkClient) Query() *LinkQuery
Query returns a query builder for Link.
func (*LinkClient) Update ¶
func (c *LinkClient) Update() *LinkUpdate
Update returns an update builder for Link.
func (*LinkClient) UpdateOne ¶
func (c *LinkClient) UpdateOne(l *Link) *LinkUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LinkClient) UpdateOneID ¶
func (c *LinkClient) UpdateOneID(id uint32) *LinkUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LinkClient) Use ¶
func (c *LinkClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `link.Hooks(f(g(h())))`.
type LinkCreate ¶
type LinkCreate struct {
// contains filtered or unexported fields
}
LinkCreate is the builder for creating a Link entity.
func (*LinkCreate) Exec ¶
func (lc *LinkCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LinkCreate) ExecX ¶
func (lc *LinkCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LinkCreate) Mutation ¶
func (lc *LinkCreate) Mutation() *LinkMutation
Mutation returns the LinkMutation object of the builder.
func (*LinkCreate) Save ¶
func (lc *LinkCreate) Save(ctx context.Context) (*Link, error)
Save creates the Link in the database.
func (*LinkCreate) SaveX ¶
func (lc *LinkCreate) SaveX(ctx context.Context) *Link
SaveX calls Save and panics if Save returns an error.
func (*LinkCreate) SetCategoryID ¶
func (lc *LinkCreate) SetCategoryID(u uint32) *LinkCreate
SetCategoryID sets the "category_id" field.
func (*LinkCreate) SetCreated ¶
func (lc *LinkCreate) SetCreated(t time.Time) *LinkCreate
SetCreated sets the "created" field.
func (*LinkCreate) SetFaviconURL ¶
func (lc *LinkCreate) SetFaviconURL(s string) *LinkCreate
SetFaviconURL sets the "favicon_url" field.
func (*LinkCreate) SetID ¶
func (lc *LinkCreate) SetID(u uint32) *LinkCreate
SetID sets the "id" field.
func (*LinkCreate) SetModified ¶
func (lc *LinkCreate) SetModified(t time.Time) *LinkCreate
SetModified sets the "modified" field.
func (*LinkCreate) SetName ¶
func (lc *LinkCreate) SetName(s string) *LinkCreate
SetName sets the "name" field.
func (*LinkCreate) SetNameJa ¶
func (lc *LinkCreate) SetNameJa(s string) *LinkCreate
SetNameJa sets the "name_ja" field.
func (*LinkCreate) SetNillableCreated ¶
func (lc *LinkCreate) SetNillableCreated(t *time.Time) *LinkCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*LinkCreate) SetNillableFaviconURL ¶
func (lc *LinkCreate) SetNillableFaviconURL(s *string) *LinkCreate
SetNillableFaviconURL sets the "favicon_url" field if the given value is not nil.
func (*LinkCreate) SetNillableModified ¶
func (lc *LinkCreate) SetNillableModified(t *time.Time) *LinkCreate
SetNillableModified sets the "modified" field if the given value is not nil.
func (*LinkCreate) SetSiteURL ¶
func (lc *LinkCreate) SetSiteURL(s string) *LinkCreate
SetSiteURL sets the "site_url" field.
func (*LinkCreate) SetUserID ¶
func (lc *LinkCreate) SetUserID(u uint32) *LinkCreate
SetUserID sets the "user_id" field.
type LinkCreateBulk ¶
type LinkCreateBulk struct {
// contains filtered or unexported fields
}
LinkCreateBulk is the builder for creating many Link entities in bulk.
func (*LinkCreateBulk) Exec ¶
func (lcb *LinkCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LinkCreateBulk) ExecX ¶
func (lcb *LinkCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LinkDelete ¶
type LinkDelete struct {
// contains filtered or unexported fields
}
LinkDelete is the builder for deleting a Link entity.
func (*LinkDelete) Exec ¶
func (ld *LinkDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LinkDelete) ExecX ¶
func (ld *LinkDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LinkDelete) Where ¶
func (ld *LinkDelete) Where(ps ...predicate.Link) *LinkDelete
Where appends a list predicates to the LinkDelete builder.
type LinkDeleteOne ¶
type LinkDeleteOne struct {
// contains filtered or unexported fields
}
LinkDeleteOne is the builder for deleting a single Link entity.
func (*LinkDeleteOne) Exec ¶
func (ldo *LinkDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LinkDeleteOne) ExecX ¶
func (ldo *LinkDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LinkDeleteOne) Where ¶
func (ldo *LinkDeleteOne) Where(ps ...predicate.Link) *LinkDeleteOne
Where appends a list predicates to the LinkDelete builder.
type LinkGroupBy ¶
type LinkGroupBy struct {
// contains filtered or unexported fields
}
LinkGroupBy is the group-by builder for Link entities.
func (*LinkGroupBy) Aggregate ¶
func (lgb *LinkGroupBy) Aggregate(fns ...AggregateFunc) *LinkGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LinkGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LinkGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LinkGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LinkGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LinkGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LinkGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LinkGroupBy) Scan ¶
func (lgb *LinkGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LinkGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LinkMutation ¶
type LinkMutation struct {
// contains filtered or unexported fields
}
LinkMutation represents an operation that mutates the Link nodes in the graph.
func (*LinkMutation) AddCategoryID ¶
func (m *LinkMutation) AddCategoryID(u int32)
AddCategoryID adds u to the "category_id" field.
func (*LinkMutation) AddField ¶
func (m *LinkMutation) 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 (*LinkMutation) AddUserID ¶
func (m *LinkMutation) AddUserID(u int32)
AddUserID adds u to the "user_id" field.
func (*LinkMutation) AddedCategoryID ¶
func (m *LinkMutation) AddedCategoryID() (r int32, exists bool)
AddedCategoryID returns the value that was added to the "category_id" field in this mutation.
func (*LinkMutation) AddedEdges ¶
func (m *LinkMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LinkMutation) AddedField ¶
func (m *LinkMutation) 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 (*LinkMutation) AddedFields ¶
func (m *LinkMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LinkMutation) AddedIDs ¶
func (m *LinkMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LinkMutation) AddedUserID ¶
func (m *LinkMutation) AddedUserID() (r int32, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*LinkMutation) CategoryID ¶
func (m *LinkMutation) CategoryID() (r uint32, exists bool)
CategoryID returns the value of the "category_id" field in the mutation.
func (*LinkMutation) ClearEdge ¶
func (m *LinkMutation) 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 (*LinkMutation) ClearFaviconURL ¶
func (m *LinkMutation) ClearFaviconURL()
ClearFaviconURL clears the value of the "favicon_url" field.
func (*LinkMutation) ClearField ¶
func (m *LinkMutation) 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 (*LinkMutation) ClearedEdges ¶
func (m *LinkMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LinkMutation) ClearedFields ¶
func (m *LinkMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LinkMutation) Client ¶
func (m LinkMutation) 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 (*LinkMutation) Created ¶
func (m *LinkMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*LinkMutation) EdgeCleared ¶
func (m *LinkMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LinkMutation) FaviconURL ¶
func (m *LinkMutation) FaviconURL() (r string, exists bool)
FaviconURL returns the value of the "favicon_url" field in the mutation.
func (*LinkMutation) FaviconURLCleared ¶
func (m *LinkMutation) FaviconURLCleared() bool
FaviconURLCleared returns if the "favicon_url" field was cleared in this mutation.
func (*LinkMutation) Field ¶
func (m *LinkMutation) 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 (*LinkMutation) FieldCleared ¶
func (m *LinkMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LinkMutation) Fields ¶
func (m *LinkMutation) 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 (*LinkMutation) ID ¶
func (m *LinkMutation) ID() (id uint32, 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 (*LinkMutation) IDs ¶
func (m *LinkMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LinkMutation) Modified ¶
func (m *LinkMutation) Modified() (r time.Time, exists bool)
Modified returns the value of the "modified" field in the mutation.
func (*LinkMutation) Name ¶
func (m *LinkMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*LinkMutation) NameJa ¶
func (m *LinkMutation) NameJa() (r string, exists bool)
NameJa returns the value of the "name_ja" field in the mutation.
func (*LinkMutation) OldCategoryID ¶
func (m *LinkMutation) OldCategoryID(ctx context.Context) (v uint32, err error)
OldCategoryID returns the old "category_id" field's value of the Link entity. If the Link 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 (*LinkMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the Link entity. If the Link 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 (*LinkMutation) OldFaviconURL ¶
func (m *LinkMutation) OldFaviconURL(ctx context.Context) (v string, err error)
OldFaviconURL returns the old "favicon_url" field's value of the Link entity. If the Link 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 (*LinkMutation) 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 (*LinkMutation) OldModified ¶
OldModified returns the old "modified" field's value of the Link entity. If the Link 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 (*LinkMutation) OldName ¶
func (m *LinkMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Link entity. If the Link 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 (*LinkMutation) OldNameJa ¶
func (m *LinkMutation) OldNameJa(ctx context.Context) (v string, err error)
OldNameJa returns the old "name_ja" field's value of the Link entity. If the Link 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 (*LinkMutation) OldSiteURL ¶
func (m *LinkMutation) OldSiteURL(ctx context.Context) (v string, err error)
OldSiteURL returns the old "site_url" field's value of the Link entity. If the Link 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 (*LinkMutation) OldUserID ¶
func (m *LinkMutation) OldUserID(ctx context.Context) (v uint32, err error)
OldUserID returns the old "user_id" field's value of the Link entity. If the Link 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 (*LinkMutation) RemovedEdges ¶
func (m *LinkMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LinkMutation) RemovedIDs ¶
func (m *LinkMutation) 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 (*LinkMutation) ResetCategoryID ¶
func (m *LinkMutation) ResetCategoryID()
ResetCategoryID resets all changes to the "category_id" field.
func (*LinkMutation) ResetCreated ¶
func (m *LinkMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*LinkMutation) ResetEdge ¶
func (m *LinkMutation) 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 (*LinkMutation) ResetFaviconURL ¶
func (m *LinkMutation) ResetFaviconURL()
ResetFaviconURL resets all changes to the "favicon_url" field.
func (*LinkMutation) ResetField ¶
func (m *LinkMutation) 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 (*LinkMutation) ResetModified ¶
func (m *LinkMutation) ResetModified()
ResetModified resets all changes to the "modified" field.
func (*LinkMutation) ResetName ¶
func (m *LinkMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*LinkMutation) ResetNameJa ¶
func (m *LinkMutation) ResetNameJa()
ResetNameJa resets all changes to the "name_ja" field.
func (*LinkMutation) ResetSiteURL ¶
func (m *LinkMutation) ResetSiteURL()
ResetSiteURL resets all changes to the "site_url" field.
func (*LinkMutation) ResetUserID ¶
func (m *LinkMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*LinkMutation) SetCategoryID ¶
func (m *LinkMutation) SetCategoryID(u uint32)
SetCategoryID sets the "category_id" field.
func (*LinkMutation) SetCreated ¶
func (m *LinkMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*LinkMutation) SetFaviconURL ¶
func (m *LinkMutation) SetFaviconURL(s string)
SetFaviconURL sets the "favicon_url" field.
func (*LinkMutation) SetField ¶
func (m *LinkMutation) 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 (*LinkMutation) SetID ¶
func (m *LinkMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Link entities.
func (*LinkMutation) SetModified ¶
func (m *LinkMutation) SetModified(t time.Time)
SetModified sets the "modified" field.
func (*LinkMutation) SetName ¶
func (m *LinkMutation) SetName(s string)
SetName sets the "name" field.
func (*LinkMutation) SetNameJa ¶
func (m *LinkMutation) SetNameJa(s string)
SetNameJa sets the "name_ja" field.
func (*LinkMutation) SetOp ¶
func (m *LinkMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LinkMutation) SetSiteURL ¶
func (m *LinkMutation) SetSiteURL(s string)
SetSiteURL sets the "site_url" field.
func (*LinkMutation) SetUserID ¶
func (m *LinkMutation) SetUserID(u uint32)
SetUserID sets the "user_id" field.
func (*LinkMutation) SiteURL ¶
func (m *LinkMutation) SiteURL() (r string, exists bool)
SiteURL returns the value of the "site_url" field in the mutation.
func (LinkMutation) Tx ¶
func (m LinkMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LinkMutation) Type ¶
func (m *LinkMutation) Type() string
Type returns the node type of this mutation (Link).
func (*LinkMutation) UserID ¶
func (m *LinkMutation) UserID() (r uint32, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*LinkMutation) Where ¶
func (m *LinkMutation) Where(ps ...predicate.Link)
Where appends a list predicates to the LinkMutation builder.
func (*LinkMutation) WhereP ¶
func (m *LinkMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LinkMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LinkQuery ¶
type LinkQuery struct {
// contains filtered or unexported fields
}
LinkQuery is the builder for querying Link entities.
func (*LinkQuery) Aggregate ¶
func (lq *LinkQuery) Aggregate(fns ...AggregateFunc) *LinkSelect
Aggregate returns a LinkSelect configured with the given aggregations.
func (*LinkQuery) Clone ¶
Clone returns a duplicate of the LinkQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LinkQuery) First ¶
First returns the first Link entity from the query. Returns a *NotFoundError when no Link was found.
func (*LinkQuery) FirstID ¶
FirstID returns the first Link ID from the query. Returns a *NotFoundError when no Link ID was found.
func (*LinkQuery) GroupBy ¶
func (lq *LinkQuery) GroupBy(field string, fields ...string) *LinkGroupBy
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 { UserID uint32 `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Link.Query(). GroupBy(link.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LinkQuery) Only ¶
Only returns a single Link entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Link entity is found. Returns a *NotFoundError when no Link entities are found.
func (*LinkQuery) OnlyID ¶
OnlyID is like Only, but returns the only Link ID in the query. Returns a *NotSingularError when more than one Link ID is found. Returns a *NotFoundError when no entities are found.
func (*LinkQuery) Select ¶
func (lq *LinkQuery) Select(fields ...string) *LinkSelect
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 { UserID uint32 `json:"user_id,omitempty"` } client.Link.Query(). Select(link.FieldUserID). Scan(ctx, &v)
type LinkSelect ¶
type LinkSelect struct { *LinkQuery // contains filtered or unexported fields }
LinkSelect is the builder for selecting fields of Link entities.
func (*LinkSelect) Aggregate ¶
func (ls *LinkSelect) Aggregate(fns ...AggregateFunc) *LinkSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LinkSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LinkSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LinkSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LinkSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LinkSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LinkSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LinkSelect) Scan ¶
func (ls *LinkSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LinkSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LinkUpdate ¶
type LinkUpdate struct {
// contains filtered or unexported fields
}
LinkUpdate is the builder for updating Link entities.
func (*LinkUpdate) AddCategoryID ¶
func (lu *LinkUpdate) AddCategoryID(u int32) *LinkUpdate
AddCategoryID adds u to the "category_id" field.
func (*LinkUpdate) AddUserID ¶
func (lu *LinkUpdate) AddUserID(u int32) *LinkUpdate
AddUserID adds u to the "user_id" field.
func (*LinkUpdate) ClearFaviconURL ¶
func (lu *LinkUpdate) ClearFaviconURL() *LinkUpdate
ClearFaviconURL clears the value of the "favicon_url" field.
func (*LinkUpdate) Exec ¶
func (lu *LinkUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LinkUpdate) ExecX ¶
func (lu *LinkUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LinkUpdate) Mutation ¶
func (lu *LinkUpdate) Mutation() *LinkMutation
Mutation returns the LinkMutation object of the builder.
func (*LinkUpdate) Save ¶
func (lu *LinkUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LinkUpdate) SaveX ¶
func (lu *LinkUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LinkUpdate) SetCategoryID ¶
func (lu *LinkUpdate) SetCategoryID(u uint32) *LinkUpdate
SetCategoryID sets the "category_id" field.
func (*LinkUpdate) SetCreated ¶
func (lu *LinkUpdate) SetCreated(t time.Time) *LinkUpdate
SetCreated sets the "created" field.
func (*LinkUpdate) SetFaviconURL ¶
func (lu *LinkUpdate) SetFaviconURL(s string) *LinkUpdate
SetFaviconURL sets the "favicon_url" field.
func (*LinkUpdate) SetModified ¶
func (lu *LinkUpdate) SetModified(t time.Time) *LinkUpdate
SetModified sets the "modified" field.
func (*LinkUpdate) SetName ¶
func (lu *LinkUpdate) SetName(s string) *LinkUpdate
SetName sets the "name" field.
func (*LinkUpdate) SetNameJa ¶
func (lu *LinkUpdate) SetNameJa(s string) *LinkUpdate
SetNameJa sets the "name_ja" field.
func (*LinkUpdate) SetNillableCreated ¶
func (lu *LinkUpdate) SetNillableCreated(t *time.Time) *LinkUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*LinkUpdate) SetNillableFaviconURL ¶
func (lu *LinkUpdate) SetNillableFaviconURL(s *string) *LinkUpdate
SetNillableFaviconURL sets the "favicon_url" field if the given value is not nil.
func (*LinkUpdate) SetSiteURL ¶
func (lu *LinkUpdate) SetSiteURL(s string) *LinkUpdate
SetSiteURL sets the "site_url" field.
func (*LinkUpdate) SetUserID ¶
func (lu *LinkUpdate) SetUserID(u uint32) *LinkUpdate
SetUserID sets the "user_id" field.
func (*LinkUpdate) Where ¶
func (lu *LinkUpdate) Where(ps ...predicate.Link) *LinkUpdate
Where appends a list predicates to the LinkUpdate builder.
type LinkUpdateOne ¶
type LinkUpdateOne struct {
// contains filtered or unexported fields
}
LinkUpdateOne is the builder for updating a single Link entity.
func (*LinkUpdateOne) AddCategoryID ¶
func (luo *LinkUpdateOne) AddCategoryID(u int32) *LinkUpdateOne
AddCategoryID adds u to the "category_id" field.
func (*LinkUpdateOne) AddUserID ¶
func (luo *LinkUpdateOne) AddUserID(u int32) *LinkUpdateOne
AddUserID adds u to the "user_id" field.
func (*LinkUpdateOne) ClearFaviconURL ¶
func (luo *LinkUpdateOne) ClearFaviconURL() *LinkUpdateOne
ClearFaviconURL clears the value of the "favicon_url" field.
func (*LinkUpdateOne) Exec ¶
func (luo *LinkUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LinkUpdateOne) ExecX ¶
func (luo *LinkUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LinkUpdateOne) Mutation ¶
func (luo *LinkUpdateOne) Mutation() *LinkMutation
Mutation returns the LinkMutation object of the builder.
func (*LinkUpdateOne) Save ¶
func (luo *LinkUpdateOne) Save(ctx context.Context) (*Link, error)
Save executes the query and returns the updated Link entity.
func (*LinkUpdateOne) SaveX ¶
func (luo *LinkUpdateOne) SaveX(ctx context.Context) *Link
SaveX is like Save, but panics if an error occurs.
func (*LinkUpdateOne) Select ¶
func (luo *LinkUpdateOne) Select(field string, fields ...string) *LinkUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LinkUpdateOne) SetCategoryID ¶
func (luo *LinkUpdateOne) SetCategoryID(u uint32) *LinkUpdateOne
SetCategoryID sets the "category_id" field.
func (*LinkUpdateOne) SetCreated ¶
func (luo *LinkUpdateOne) SetCreated(t time.Time) *LinkUpdateOne
SetCreated sets the "created" field.
func (*LinkUpdateOne) SetFaviconURL ¶
func (luo *LinkUpdateOne) SetFaviconURL(s string) *LinkUpdateOne
SetFaviconURL sets the "favicon_url" field.
func (*LinkUpdateOne) SetModified ¶
func (luo *LinkUpdateOne) SetModified(t time.Time) *LinkUpdateOne
SetModified sets the "modified" field.
func (*LinkUpdateOne) SetName ¶
func (luo *LinkUpdateOne) SetName(s string) *LinkUpdateOne
SetName sets the "name" field.
func (*LinkUpdateOne) SetNameJa ¶
func (luo *LinkUpdateOne) SetNameJa(s string) *LinkUpdateOne
SetNameJa sets the "name_ja" field.
func (*LinkUpdateOne) SetNillableCreated ¶
func (luo *LinkUpdateOne) SetNillableCreated(t *time.Time) *LinkUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*LinkUpdateOne) SetNillableFaviconURL ¶
func (luo *LinkUpdateOne) SetNillableFaviconURL(s *string) *LinkUpdateOne
SetNillableFaviconURL sets the "favicon_url" field if the given value is not nil.
func (*LinkUpdateOne) SetSiteURL ¶
func (luo *LinkUpdateOne) SetSiteURL(s string) *LinkUpdateOne
SetSiteURL sets the "site_url" field.
func (*LinkUpdateOne) SetUserID ¶
func (luo *LinkUpdateOne) SetUserID(u uint32) *LinkUpdateOne
SetUserID sets the "user_id" field.
func (*LinkUpdateOne) Where ¶
func (luo *LinkUpdateOne) Where(ps ...predicate.Link) *LinkUpdateOne
Where appends a list predicates to the LinkUpdate builder.
type Location ¶
type Location struct { // ID of the ent. ID uint32 `json:"id,omitempty"` // Type holds the value of the "type" field. Type location.Type `json:"type,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // NameJa holds the value of the "name_ja" field. NameJa string `json:"name_ja,omitempty"` // Address holds the value of the "address" field. Address string `json:"address,omitempty"` // AddressJa holds the value of the "address_ja" field. AddressJa string `json:"address_ja,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Modified holds the value of the "modified" field. Modified time.Time `json:"modified,omitempty"` // contains filtered or unexported fields }
Location is the model entity for the Location schema.
func (*Location) Unwrap ¶
Unwrap unwraps the Location 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 (*Location) Update ¶
func (l *Location) Update() *LocationUpdateOne
Update returns a builder for updating this Location. Note that you need to call Location.Unwrap() before calling this method if this Location was returned from a transaction, and the transaction was committed or rolled back.
type LocationClient ¶
type LocationClient struct {
// contains filtered or unexported fields
}
LocationClient is a client for the Location schema.
func NewLocationClient ¶
func NewLocationClient(c config) *LocationClient
NewLocationClient returns a client for the Location from the given config.
func (*LocationClient) Create ¶
func (c *LocationClient) Create() *LocationCreate
Create returns a builder for creating a Location entity.
func (*LocationClient) CreateBulk ¶
func (c *LocationClient) CreateBulk(builders ...*LocationCreate) *LocationCreateBulk
CreateBulk returns a builder for creating a bulk of Location entities.
func (*LocationClient) Delete ¶
func (c *LocationClient) Delete() *LocationDelete
Delete returns a delete builder for Location.
func (*LocationClient) DeleteOne ¶
func (c *LocationClient) DeleteOne(l *Location) *LocationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LocationClient) DeleteOneID ¶
func (c *LocationClient) DeleteOneID(id uint32) *LocationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LocationClient) GetX ¶
func (c *LocationClient) GetX(ctx context.Context, id uint32) *Location
GetX is like Get, but panics if an error occurs.
func (*LocationClient) Hooks ¶
func (c *LocationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LocationClient) Intercept ¶
func (c *LocationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `location.Intercept(f(g(h())))`.
func (*LocationClient) Interceptors ¶
func (c *LocationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LocationClient) Query ¶
func (c *LocationClient) Query() *LocationQuery
Query returns a query builder for Location.
func (*LocationClient) Update ¶
func (c *LocationClient) Update() *LocationUpdate
Update returns an update builder for Location.
func (*LocationClient) UpdateOne ¶
func (c *LocationClient) UpdateOne(l *Location) *LocationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LocationClient) UpdateOneID ¶
func (c *LocationClient) UpdateOneID(id uint32) *LocationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LocationClient) Use ¶
func (c *LocationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `location.Hooks(f(g(h())))`.
type LocationCreate ¶
type LocationCreate struct {
// contains filtered or unexported fields
}
LocationCreate is the builder for creating a Location entity.
func (*LocationCreate) Exec ¶
func (lc *LocationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationCreate) ExecX ¶
func (lc *LocationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationCreate) Mutation ¶
func (lc *LocationCreate) Mutation() *LocationMutation
Mutation returns the LocationMutation object of the builder.
func (*LocationCreate) Save ¶
func (lc *LocationCreate) Save(ctx context.Context) (*Location, error)
Save creates the Location in the database.
func (*LocationCreate) SaveX ¶
func (lc *LocationCreate) SaveX(ctx context.Context) *Location
SaveX calls Save and panics if Save returns an error.
func (*LocationCreate) SetAddress ¶
func (lc *LocationCreate) SetAddress(s string) *LocationCreate
SetAddress sets the "address" field.
func (*LocationCreate) SetAddressJa ¶
func (lc *LocationCreate) SetAddressJa(s string) *LocationCreate
SetAddressJa sets the "address_ja" field.
func (*LocationCreate) SetCreated ¶
func (lc *LocationCreate) SetCreated(t time.Time) *LocationCreate
SetCreated sets the "created" field.
func (*LocationCreate) SetID ¶
func (lc *LocationCreate) SetID(u uint32) *LocationCreate
SetID sets the "id" field.
func (*LocationCreate) SetModified ¶
func (lc *LocationCreate) SetModified(t time.Time) *LocationCreate
SetModified sets the "modified" field.
func (*LocationCreate) SetName ¶
func (lc *LocationCreate) SetName(s string) *LocationCreate
SetName sets the "name" field.
func (*LocationCreate) SetNameJa ¶
func (lc *LocationCreate) SetNameJa(s string) *LocationCreate
SetNameJa sets the "name_ja" field.
func (*LocationCreate) SetNillableCreated ¶
func (lc *LocationCreate) SetNillableCreated(t *time.Time) *LocationCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*LocationCreate) SetNillableModified ¶
func (lc *LocationCreate) SetNillableModified(t *time.Time) *LocationCreate
SetNillableModified sets the "modified" field if the given value is not nil.
func (*LocationCreate) SetType ¶
func (lc *LocationCreate) SetType(l location.Type) *LocationCreate
SetType sets the "type" field.
type LocationCreateBulk ¶
type LocationCreateBulk struct {
// contains filtered or unexported fields
}
LocationCreateBulk is the builder for creating many Location entities in bulk.
func (*LocationCreateBulk) Exec ¶
func (lcb *LocationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationCreateBulk) ExecX ¶
func (lcb *LocationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LocationDelete ¶
type LocationDelete struct {
// contains filtered or unexported fields
}
LocationDelete is the builder for deleting a Location entity.
func (*LocationDelete) Exec ¶
func (ld *LocationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LocationDelete) ExecX ¶
func (ld *LocationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LocationDelete) Where ¶
func (ld *LocationDelete) Where(ps ...predicate.Location) *LocationDelete
Where appends a list predicates to the LocationDelete builder.
type LocationDeleteOne ¶
type LocationDeleteOne struct {
// contains filtered or unexported fields
}
LocationDeleteOne is the builder for deleting a single Location entity.
func (*LocationDeleteOne) Exec ¶
func (ldo *LocationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LocationDeleteOne) ExecX ¶
func (ldo *LocationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationDeleteOne) Where ¶
func (ldo *LocationDeleteOne) Where(ps ...predicate.Location) *LocationDeleteOne
Where appends a list predicates to the LocationDelete builder.
type LocationGroupBy ¶
type LocationGroupBy struct {
// contains filtered or unexported fields
}
LocationGroupBy is the group-by builder for Location entities.
func (*LocationGroupBy) Aggregate ¶
func (lgb *LocationGroupBy) Aggregate(fns ...AggregateFunc) *LocationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LocationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Scan ¶
func (lgb *LocationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocationMutation ¶
type LocationMutation struct {
// contains filtered or unexported fields
}
LocationMutation represents an operation that mutates the Location nodes in the graph.
func (*LocationMutation) AddField ¶
func (m *LocationMutation) 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 (*LocationMutation) AddedEdges ¶
func (m *LocationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LocationMutation) AddedField ¶
func (m *LocationMutation) 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 (*LocationMutation) AddedFields ¶
func (m *LocationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LocationMutation) AddedIDs ¶
func (m *LocationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LocationMutation) Address ¶
func (m *LocationMutation) Address() (r string, exists bool)
Address returns the value of the "address" field in the mutation.
func (*LocationMutation) AddressJa ¶
func (m *LocationMutation) AddressJa() (r string, exists bool)
AddressJa returns the value of the "address_ja" field in the mutation.
func (*LocationMutation) ClearEdge ¶
func (m *LocationMutation) 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 (*LocationMutation) ClearField ¶
func (m *LocationMutation) 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 (*LocationMutation) ClearedEdges ¶
func (m *LocationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LocationMutation) ClearedFields ¶
func (m *LocationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LocationMutation) Client ¶
func (m LocationMutation) 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 (*LocationMutation) Created ¶
func (m *LocationMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*LocationMutation) EdgeCleared ¶
func (m *LocationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LocationMutation) Field ¶
func (m *LocationMutation) 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 (*LocationMutation) FieldCleared ¶
func (m *LocationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LocationMutation) Fields ¶
func (m *LocationMutation) 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 (*LocationMutation) GetType ¶
func (m *LocationMutation) GetType() (r location.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*LocationMutation) ID ¶
func (m *LocationMutation) ID() (id uint32, 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 (*LocationMutation) IDs ¶
func (m *LocationMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LocationMutation) Modified ¶
func (m *LocationMutation) Modified() (r time.Time, exists bool)
Modified returns the value of the "modified" field in the mutation.
func (*LocationMutation) Name ¶
func (m *LocationMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*LocationMutation) NameJa ¶
func (m *LocationMutation) NameJa() (r string, exists bool)
NameJa returns the value of the "name_ja" field in the mutation.
func (*LocationMutation) OldAddress ¶
func (m *LocationMutation) OldAddress(ctx context.Context) (v string, err error)
OldAddress returns the old "address" field's value of the Location entity. If the Location 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 (*LocationMutation) OldAddressJa ¶
func (m *LocationMutation) OldAddressJa(ctx context.Context) (v string, err error)
OldAddressJa returns the old "address_ja" field's value of the Location entity. If the Location 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 (*LocationMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the Location entity. If the Location 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 (*LocationMutation) 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 (*LocationMutation) OldModified ¶
OldModified returns the old "modified" field's value of the Location entity. If the Location 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 (*LocationMutation) OldName ¶
func (m *LocationMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Location entity. If the Location 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 (*LocationMutation) OldNameJa ¶
func (m *LocationMutation) OldNameJa(ctx context.Context) (v string, err error)
OldNameJa returns the old "name_ja" field's value of the Location entity. If the Location 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 (*LocationMutation) OldType ¶
OldType returns the old "type" field's value of the Location entity. If the Location 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 (*LocationMutation) RemovedEdges ¶
func (m *LocationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LocationMutation) RemovedIDs ¶
func (m *LocationMutation) 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 (*LocationMutation) ResetAddress ¶
func (m *LocationMutation) ResetAddress()
ResetAddress resets all changes to the "address" field.
func (*LocationMutation) ResetAddressJa ¶
func (m *LocationMutation) ResetAddressJa()
ResetAddressJa resets all changes to the "address_ja" field.
func (*LocationMutation) ResetCreated ¶
func (m *LocationMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*LocationMutation) ResetEdge ¶
func (m *LocationMutation) 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 (*LocationMutation) ResetField ¶
func (m *LocationMutation) 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 (*LocationMutation) ResetModified ¶
func (m *LocationMutation) ResetModified()
ResetModified resets all changes to the "modified" field.
func (*LocationMutation) ResetName ¶
func (m *LocationMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*LocationMutation) ResetNameJa ¶
func (m *LocationMutation) ResetNameJa()
ResetNameJa resets all changes to the "name_ja" field.
func (*LocationMutation) ResetType ¶
func (m *LocationMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*LocationMutation) SetAddress ¶
func (m *LocationMutation) SetAddress(s string)
SetAddress sets the "address" field.
func (*LocationMutation) SetAddressJa ¶
func (m *LocationMutation) SetAddressJa(s string)
SetAddressJa sets the "address_ja" field.
func (*LocationMutation) SetCreated ¶
func (m *LocationMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*LocationMutation) SetField ¶
func (m *LocationMutation) 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 (*LocationMutation) SetID ¶
func (m *LocationMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Location entities.
func (*LocationMutation) SetModified ¶
func (m *LocationMutation) SetModified(t time.Time)
SetModified sets the "modified" field.
func (*LocationMutation) SetName ¶
func (m *LocationMutation) SetName(s string)
SetName sets the "name" field.
func (*LocationMutation) SetNameJa ¶
func (m *LocationMutation) SetNameJa(s string)
SetNameJa sets the "name_ja" field.
func (*LocationMutation) SetOp ¶
func (m *LocationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LocationMutation) SetType ¶
func (m *LocationMutation) SetType(l location.Type)
SetType sets the "type" field.
func (LocationMutation) Tx ¶
func (m LocationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LocationMutation) Type ¶
func (m *LocationMutation) Type() string
Type returns the node type of this mutation (Location).
func (*LocationMutation) Where ¶
func (m *LocationMutation) Where(ps ...predicate.Location)
Where appends a list predicates to the LocationMutation builder.
func (*LocationMutation) WhereP ¶
func (m *LocationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LocationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LocationQuery ¶
type LocationQuery struct {
// contains filtered or unexported fields
}
LocationQuery is the builder for querying Location entities.
func (*LocationQuery) Aggregate ¶
func (lq *LocationQuery) Aggregate(fns ...AggregateFunc) *LocationSelect
Aggregate returns a LocationSelect configured with the given aggregations.
func (*LocationQuery) All ¶
func (lq *LocationQuery) All(ctx context.Context) ([]*Location, error)
All executes the query and returns a list of Locations.
func (*LocationQuery) AllX ¶
func (lq *LocationQuery) AllX(ctx context.Context) []*Location
AllX is like All, but panics if an error occurs.
func (*LocationQuery) Clone ¶
func (lq *LocationQuery) Clone() *LocationQuery
Clone returns a duplicate of the LocationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LocationQuery) Count ¶
func (lq *LocationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LocationQuery) CountX ¶
func (lq *LocationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LocationQuery) Exist ¶
func (lq *LocationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LocationQuery) ExistX ¶
func (lq *LocationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LocationQuery) First ¶
func (lq *LocationQuery) First(ctx context.Context) (*Location, error)
First returns the first Location entity from the query. Returns a *NotFoundError when no Location was found.
func (*LocationQuery) FirstID ¶
func (lq *LocationQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first Location ID from the query. Returns a *NotFoundError when no Location ID was found.
func (*LocationQuery) FirstIDX ¶
func (lq *LocationQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*LocationQuery) FirstX ¶
func (lq *LocationQuery) FirstX(ctx context.Context) *Location
FirstX is like First, but panics if an error occurs.
func (*LocationQuery) GroupBy ¶
func (lq *LocationQuery) GroupBy(field string, fields ...string) *LocationGroupBy
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 { Type location.Type `json:"type,omitempty"` Count int `json:"count,omitempty"` } client.Location.Query(). GroupBy(location.FieldType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LocationQuery) IDs ¶
func (lq *LocationQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of Location IDs.
func (*LocationQuery) IDsX ¶
func (lq *LocationQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*LocationQuery) Limit ¶
func (lq *LocationQuery) Limit(limit int) *LocationQuery
Limit the number of records to be returned by this query.
func (*LocationQuery) Offset ¶
func (lq *LocationQuery) Offset(offset int) *LocationQuery
Offset to start from.
func (*LocationQuery) Only ¶
func (lq *LocationQuery) Only(ctx context.Context) (*Location, error)
Only returns a single Location entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Location entity is found. Returns a *NotFoundError when no Location entities are found.
func (*LocationQuery) OnlyID ¶
func (lq *LocationQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only Location ID in the query. Returns a *NotSingularError when more than one Location ID is found. Returns a *NotFoundError when no entities are found.
func (*LocationQuery) OnlyIDX ¶
func (lq *LocationQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LocationQuery) OnlyX ¶
func (lq *LocationQuery) OnlyX(ctx context.Context) *Location
OnlyX is like Only, but panics if an error occurs.
func (*LocationQuery) Order ¶
func (lq *LocationQuery) Order(o ...OrderFunc) *LocationQuery
Order specifies how the records should be ordered.
func (*LocationQuery) Select ¶
func (lq *LocationQuery) Select(fields ...string) *LocationSelect
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 { Type location.Type `json:"type,omitempty"` } client.Location.Query(). Select(location.FieldType). Scan(ctx, &v)
func (*LocationQuery) Unique ¶
func (lq *LocationQuery) Unique(unique bool) *LocationQuery
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 (*LocationQuery) Where ¶
func (lq *LocationQuery) Where(ps ...predicate.Location) *LocationQuery
Where adds a new predicate for the LocationQuery builder.
type LocationSelect ¶
type LocationSelect struct { *LocationQuery // contains filtered or unexported fields }
LocationSelect is the builder for selecting fields of Location entities.
func (*LocationSelect) Aggregate ¶
func (ls *LocationSelect) Aggregate(fns ...AggregateFunc) *LocationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LocationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Scan ¶
func (ls *LocationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocationUpdate ¶
type LocationUpdate struct {
// contains filtered or unexported fields
}
LocationUpdate is the builder for updating Location entities.
func (*LocationUpdate) Exec ¶
func (lu *LocationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationUpdate) ExecX ¶
func (lu *LocationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationUpdate) Mutation ¶
func (lu *LocationUpdate) Mutation() *LocationMutation
Mutation returns the LocationMutation object of the builder.
func (*LocationUpdate) Save ¶
func (lu *LocationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LocationUpdate) SaveX ¶
func (lu *LocationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LocationUpdate) SetAddress ¶
func (lu *LocationUpdate) SetAddress(s string) *LocationUpdate
SetAddress sets the "address" field.
func (*LocationUpdate) SetAddressJa ¶
func (lu *LocationUpdate) SetAddressJa(s string) *LocationUpdate
SetAddressJa sets the "address_ja" field.
func (*LocationUpdate) SetCreated ¶
func (lu *LocationUpdate) SetCreated(t time.Time) *LocationUpdate
SetCreated sets the "created" field.
func (*LocationUpdate) SetModified ¶
func (lu *LocationUpdate) SetModified(t time.Time) *LocationUpdate
SetModified sets the "modified" field.
func (*LocationUpdate) SetName ¶
func (lu *LocationUpdate) SetName(s string) *LocationUpdate
SetName sets the "name" field.
func (*LocationUpdate) SetNameJa ¶
func (lu *LocationUpdate) SetNameJa(s string) *LocationUpdate
SetNameJa sets the "name_ja" field.
func (*LocationUpdate) SetNillableCreated ¶
func (lu *LocationUpdate) SetNillableCreated(t *time.Time) *LocationUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*LocationUpdate) SetType ¶
func (lu *LocationUpdate) SetType(l location.Type) *LocationUpdate
SetType sets the "type" field.
func (*LocationUpdate) Where ¶
func (lu *LocationUpdate) Where(ps ...predicate.Location) *LocationUpdate
Where appends a list predicates to the LocationUpdate builder.
type LocationUpdateOne ¶
type LocationUpdateOne struct {
// contains filtered or unexported fields
}
LocationUpdateOne is the builder for updating a single Location entity.
func (*LocationUpdateOne) Exec ¶
func (luo *LocationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LocationUpdateOne) ExecX ¶
func (luo *LocationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationUpdateOne) Mutation ¶
func (luo *LocationUpdateOne) Mutation() *LocationMutation
Mutation returns the LocationMutation object of the builder.
func (*LocationUpdateOne) Save ¶
func (luo *LocationUpdateOne) Save(ctx context.Context) (*Location, error)
Save executes the query and returns the updated Location entity.
func (*LocationUpdateOne) SaveX ¶
func (luo *LocationUpdateOne) SaveX(ctx context.Context) *Location
SaveX is like Save, but panics if an error occurs.
func (*LocationUpdateOne) Select ¶
func (luo *LocationUpdateOne) Select(field string, fields ...string) *LocationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LocationUpdateOne) SetAddress ¶
func (luo *LocationUpdateOne) SetAddress(s string) *LocationUpdateOne
SetAddress sets the "address" field.
func (*LocationUpdateOne) SetAddressJa ¶
func (luo *LocationUpdateOne) SetAddressJa(s string) *LocationUpdateOne
SetAddressJa sets the "address_ja" field.
func (*LocationUpdateOne) SetCreated ¶
func (luo *LocationUpdateOne) SetCreated(t time.Time) *LocationUpdateOne
SetCreated sets the "created" field.
func (*LocationUpdateOne) SetModified ¶
func (luo *LocationUpdateOne) SetModified(t time.Time) *LocationUpdateOne
SetModified sets the "modified" field.
func (*LocationUpdateOne) SetName ¶
func (luo *LocationUpdateOne) SetName(s string) *LocationUpdateOne
SetName sets the "name" field.
func (*LocationUpdateOne) SetNameJa ¶
func (luo *LocationUpdateOne) SetNameJa(s string) *LocationUpdateOne
SetNameJa sets the "name_ja" field.
func (*LocationUpdateOne) SetNillableCreated ¶
func (luo *LocationUpdateOne) SetNillableCreated(t *time.Time) *LocationUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*LocationUpdateOne) SetType ¶
func (luo *LocationUpdateOne) SetType(l location.Type) *LocationUpdateOne
SetType sets the "type" field.
func (*LocationUpdateOne) Where ¶
func (luo *LocationUpdateOne) Where(ps ...predicate.Location) *LocationUpdateOne
Where appends a list predicates to the LocationUpdate builder.
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 Notice ¶
type Notice struct { // ID of the ent. ID uint32 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID uint32 `json:"user_id,omitempty"` // DiscordWebhook holds the value of the "discord_webhook" field. DiscordWebhook string `json:"discord_webhook,omitempty"` // SlackWebhook holds the value of the "slack_webhook" field. SlackWebhook string `json:"slack_webhook,omitempty"` // Mail holds the value of the "mail" field. Mail string `json:"mail,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Modified holds the value of the "modified" field. Modified time.Time `json:"modified,omitempty"` // contains filtered or unexported fields }
Notice is the model entity for the Notice schema.
func (*Notice) Unwrap ¶
Unwrap unwraps the Notice 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 (*Notice) Update ¶
func (n *Notice) Update() *NoticeUpdateOne
Update returns a builder for updating this Notice. Note that you need to call Notice.Unwrap() before calling this method if this Notice was returned from a transaction, and the transaction was committed or rolled back.
type NoticeClient ¶
type NoticeClient struct {
// contains filtered or unexported fields
}
NoticeClient is a client for the Notice schema.
func NewNoticeClient ¶
func NewNoticeClient(c config) *NoticeClient
NewNoticeClient returns a client for the Notice from the given config.
func (*NoticeClient) Create ¶
func (c *NoticeClient) Create() *NoticeCreate
Create returns a builder for creating a Notice entity.
func (*NoticeClient) CreateBulk ¶
func (c *NoticeClient) CreateBulk(builders ...*NoticeCreate) *NoticeCreateBulk
CreateBulk returns a builder for creating a bulk of Notice entities.
func (*NoticeClient) Delete ¶
func (c *NoticeClient) Delete() *NoticeDelete
Delete returns a delete builder for Notice.
func (*NoticeClient) DeleteOne ¶
func (c *NoticeClient) DeleteOne(n *Notice) *NoticeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NoticeClient) DeleteOneID ¶
func (c *NoticeClient) DeleteOneID(id uint32) *NoticeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NoticeClient) GetX ¶
func (c *NoticeClient) GetX(ctx context.Context, id uint32) *Notice
GetX is like Get, but panics if an error occurs.
func (*NoticeClient) Intercept ¶
func (c *NoticeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `notice.Intercept(f(g(h())))`.
func (*NoticeClient) Interceptors ¶
func (c *NoticeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NoticeClient) Query ¶
func (c *NoticeClient) Query() *NoticeQuery
Query returns a query builder for Notice.
func (*NoticeClient) Update ¶
func (c *NoticeClient) Update() *NoticeUpdate
Update returns an update builder for Notice.
func (*NoticeClient) UpdateOne ¶
func (c *NoticeClient) UpdateOne(n *Notice) *NoticeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NoticeClient) UpdateOneID ¶
func (c *NoticeClient) UpdateOneID(id uint32) *NoticeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NoticeClient) Use ¶
func (c *NoticeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notice.Hooks(f(g(h())))`.
type NoticeCreate ¶
type NoticeCreate struct {
// contains filtered or unexported fields
}
NoticeCreate is the builder for creating a Notice entity.
func (*NoticeCreate) Exec ¶
func (nc *NoticeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NoticeCreate) ExecX ¶
func (nc *NoticeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoticeCreate) Mutation ¶
func (nc *NoticeCreate) Mutation() *NoticeMutation
Mutation returns the NoticeMutation object of the builder.
func (*NoticeCreate) Save ¶
func (nc *NoticeCreate) Save(ctx context.Context) (*Notice, error)
Save creates the Notice in the database.
func (*NoticeCreate) SaveX ¶
func (nc *NoticeCreate) SaveX(ctx context.Context) *Notice
SaveX calls Save and panics if Save returns an error.
func (*NoticeCreate) SetCreated ¶
func (nc *NoticeCreate) SetCreated(t time.Time) *NoticeCreate
SetCreated sets the "created" field.
func (*NoticeCreate) SetDiscordWebhook ¶
func (nc *NoticeCreate) SetDiscordWebhook(s string) *NoticeCreate
SetDiscordWebhook sets the "discord_webhook" field.
func (*NoticeCreate) SetID ¶
func (nc *NoticeCreate) SetID(u uint32) *NoticeCreate
SetID sets the "id" field.
func (*NoticeCreate) SetMail ¶
func (nc *NoticeCreate) SetMail(s string) *NoticeCreate
SetMail sets the "mail" field.
func (*NoticeCreate) SetModified ¶
func (nc *NoticeCreate) SetModified(t time.Time) *NoticeCreate
SetModified sets the "modified" field.
func (*NoticeCreate) SetNillableCreated ¶
func (nc *NoticeCreate) SetNillableCreated(t *time.Time) *NoticeCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*NoticeCreate) SetNillableDiscordWebhook ¶
func (nc *NoticeCreate) SetNillableDiscordWebhook(s *string) *NoticeCreate
SetNillableDiscordWebhook sets the "discord_webhook" field if the given value is not nil.
func (*NoticeCreate) SetNillableMail ¶
func (nc *NoticeCreate) SetNillableMail(s *string) *NoticeCreate
SetNillableMail sets the "mail" field if the given value is not nil.
func (*NoticeCreate) SetNillableModified ¶
func (nc *NoticeCreate) SetNillableModified(t *time.Time) *NoticeCreate
SetNillableModified sets the "modified" field if the given value is not nil.
func (*NoticeCreate) SetNillableSlackWebhook ¶
func (nc *NoticeCreate) SetNillableSlackWebhook(s *string) *NoticeCreate
SetNillableSlackWebhook sets the "slack_webhook" field if the given value is not nil.
func (*NoticeCreate) SetSlackWebhook ¶
func (nc *NoticeCreate) SetSlackWebhook(s string) *NoticeCreate
SetSlackWebhook sets the "slack_webhook" field.
func (*NoticeCreate) SetUserID ¶
func (nc *NoticeCreate) SetUserID(u uint32) *NoticeCreate
SetUserID sets the "user_id" field.
type NoticeCreateBulk ¶
type NoticeCreateBulk struct {
// contains filtered or unexported fields
}
NoticeCreateBulk is the builder for creating many Notice entities in bulk.
func (*NoticeCreateBulk) Exec ¶
func (ncb *NoticeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NoticeCreateBulk) ExecX ¶
func (ncb *NoticeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NoticeDelete ¶
type NoticeDelete struct {
// contains filtered or unexported fields
}
NoticeDelete is the builder for deleting a Notice entity.
func (*NoticeDelete) Exec ¶
func (nd *NoticeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NoticeDelete) ExecX ¶
func (nd *NoticeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NoticeDelete) Where ¶
func (nd *NoticeDelete) Where(ps ...predicate.Notice) *NoticeDelete
Where appends a list predicates to the NoticeDelete builder.
type NoticeDeleteOne ¶
type NoticeDeleteOne struct {
// contains filtered or unexported fields
}
NoticeDeleteOne is the builder for deleting a single Notice entity.
func (*NoticeDeleteOne) Exec ¶
func (ndo *NoticeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NoticeDeleteOne) ExecX ¶
func (ndo *NoticeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoticeDeleteOne) Where ¶
func (ndo *NoticeDeleteOne) Where(ps ...predicate.Notice) *NoticeDeleteOne
Where appends a list predicates to the NoticeDelete builder.
type NoticeGroupBy ¶
type NoticeGroupBy struct {
// contains filtered or unexported fields
}
NoticeGroupBy is the group-by builder for Notice entities.
func (*NoticeGroupBy) Aggregate ¶
func (ngb *NoticeGroupBy) Aggregate(fns ...AggregateFunc) *NoticeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NoticeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NoticeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NoticeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NoticeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NoticeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NoticeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NoticeGroupBy) Scan ¶
func (ngb *NoticeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NoticeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NoticeMutation ¶
type NoticeMutation struct {
// contains filtered or unexported fields
}
NoticeMutation represents an operation that mutates the Notice nodes in the graph.
func (*NoticeMutation) AddField ¶
func (m *NoticeMutation) 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 (*NoticeMutation) AddUserID ¶
func (m *NoticeMutation) AddUserID(u int32)
AddUserID adds u to the "user_id" field.
func (*NoticeMutation) AddedEdges ¶
func (m *NoticeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NoticeMutation) AddedField ¶
func (m *NoticeMutation) 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 (*NoticeMutation) AddedFields ¶
func (m *NoticeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NoticeMutation) AddedIDs ¶
func (m *NoticeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NoticeMutation) AddedUserID ¶
func (m *NoticeMutation) AddedUserID() (r int32, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*NoticeMutation) ClearDiscordWebhook ¶
func (m *NoticeMutation) ClearDiscordWebhook()
ClearDiscordWebhook clears the value of the "discord_webhook" field.
func (*NoticeMutation) ClearEdge ¶
func (m *NoticeMutation) 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 (*NoticeMutation) ClearField ¶
func (m *NoticeMutation) 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 (*NoticeMutation) ClearMail ¶
func (m *NoticeMutation) ClearMail()
ClearMail clears the value of the "mail" field.
func (*NoticeMutation) ClearSlackWebhook ¶
func (m *NoticeMutation) ClearSlackWebhook()
ClearSlackWebhook clears the value of the "slack_webhook" field.
func (*NoticeMutation) ClearedEdges ¶
func (m *NoticeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NoticeMutation) ClearedFields ¶
func (m *NoticeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NoticeMutation) Client ¶
func (m NoticeMutation) 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 (*NoticeMutation) Created ¶
func (m *NoticeMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*NoticeMutation) DiscordWebhook ¶
func (m *NoticeMutation) DiscordWebhook() (r string, exists bool)
DiscordWebhook returns the value of the "discord_webhook" field in the mutation.
func (*NoticeMutation) DiscordWebhookCleared ¶
func (m *NoticeMutation) DiscordWebhookCleared() bool
DiscordWebhookCleared returns if the "discord_webhook" field was cleared in this mutation.
func (*NoticeMutation) EdgeCleared ¶
func (m *NoticeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NoticeMutation) Field ¶
func (m *NoticeMutation) 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 (*NoticeMutation) FieldCleared ¶
func (m *NoticeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NoticeMutation) Fields ¶
func (m *NoticeMutation) 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 (*NoticeMutation) ID ¶
func (m *NoticeMutation) ID() (id uint32, 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 (*NoticeMutation) IDs ¶
func (m *NoticeMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NoticeMutation) Mail ¶
func (m *NoticeMutation) Mail() (r string, exists bool)
Mail returns the value of the "mail" field in the mutation.
func (*NoticeMutation) MailCleared ¶
func (m *NoticeMutation) MailCleared() bool
MailCleared returns if the "mail" field was cleared in this mutation.
func (*NoticeMutation) Modified ¶
func (m *NoticeMutation) Modified() (r time.Time, exists bool)
Modified returns the value of the "modified" field in the mutation.
func (*NoticeMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the Notice entity. If the Notice 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 (*NoticeMutation) OldDiscordWebhook ¶
func (m *NoticeMutation) OldDiscordWebhook(ctx context.Context) (v string, err error)
OldDiscordWebhook returns the old "discord_webhook" field's value of the Notice entity. If the Notice 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 (*NoticeMutation) 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 (*NoticeMutation) OldMail ¶
func (m *NoticeMutation) OldMail(ctx context.Context) (v string, err error)
OldMail returns the old "mail" field's value of the Notice entity. If the Notice 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 (*NoticeMutation) OldModified ¶
OldModified returns the old "modified" field's value of the Notice entity. If the Notice 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 (*NoticeMutation) OldSlackWebhook ¶
func (m *NoticeMutation) OldSlackWebhook(ctx context.Context) (v string, err error)
OldSlackWebhook returns the old "slack_webhook" field's value of the Notice entity. If the Notice 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 (*NoticeMutation) OldUserID ¶
func (m *NoticeMutation) OldUserID(ctx context.Context) (v uint32, err error)
OldUserID returns the old "user_id" field's value of the Notice entity. If the Notice 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 (*NoticeMutation) RemovedEdges ¶
func (m *NoticeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NoticeMutation) RemovedIDs ¶
func (m *NoticeMutation) 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 (*NoticeMutation) ResetCreated ¶
func (m *NoticeMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*NoticeMutation) ResetDiscordWebhook ¶
func (m *NoticeMutation) ResetDiscordWebhook()
ResetDiscordWebhook resets all changes to the "discord_webhook" field.
func (*NoticeMutation) ResetEdge ¶
func (m *NoticeMutation) 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 (*NoticeMutation) ResetField ¶
func (m *NoticeMutation) 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 (*NoticeMutation) ResetMail ¶
func (m *NoticeMutation) ResetMail()
ResetMail resets all changes to the "mail" field.
func (*NoticeMutation) ResetModified ¶
func (m *NoticeMutation) ResetModified()
ResetModified resets all changes to the "modified" field.
func (*NoticeMutation) ResetSlackWebhook ¶
func (m *NoticeMutation) ResetSlackWebhook()
ResetSlackWebhook resets all changes to the "slack_webhook" field.
func (*NoticeMutation) ResetUserID ¶
func (m *NoticeMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*NoticeMutation) SetCreated ¶
func (m *NoticeMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*NoticeMutation) SetDiscordWebhook ¶
func (m *NoticeMutation) SetDiscordWebhook(s string)
SetDiscordWebhook sets the "discord_webhook" field.
func (*NoticeMutation) SetField ¶
func (m *NoticeMutation) 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 (*NoticeMutation) SetID ¶
func (m *NoticeMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Notice entities.
func (*NoticeMutation) SetMail ¶
func (m *NoticeMutation) SetMail(s string)
SetMail sets the "mail" field.
func (*NoticeMutation) SetModified ¶
func (m *NoticeMutation) SetModified(t time.Time)
SetModified sets the "modified" field.
func (*NoticeMutation) SetOp ¶
func (m *NoticeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NoticeMutation) SetSlackWebhook ¶
func (m *NoticeMutation) SetSlackWebhook(s string)
SetSlackWebhook sets the "slack_webhook" field.
func (*NoticeMutation) SetUserID ¶
func (m *NoticeMutation) SetUserID(u uint32)
SetUserID sets the "user_id" field.
func (*NoticeMutation) SlackWebhook ¶
func (m *NoticeMutation) SlackWebhook() (r string, exists bool)
SlackWebhook returns the value of the "slack_webhook" field in the mutation.
func (*NoticeMutation) SlackWebhookCleared ¶
func (m *NoticeMutation) SlackWebhookCleared() bool
SlackWebhookCleared returns if the "slack_webhook" field was cleared in this mutation.
func (NoticeMutation) Tx ¶
func (m NoticeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NoticeMutation) Type ¶
func (m *NoticeMutation) Type() string
Type returns the node type of this mutation (Notice).
func (*NoticeMutation) UserID ¶
func (m *NoticeMutation) UserID() (r uint32, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*NoticeMutation) Where ¶
func (m *NoticeMutation) Where(ps ...predicate.Notice)
Where appends a list predicates to the NoticeMutation builder.
func (*NoticeMutation) WhereP ¶
func (m *NoticeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NoticeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NoticeQuery ¶
type NoticeQuery struct {
// contains filtered or unexported fields
}
NoticeQuery is the builder for querying Notice entities.
func (*NoticeQuery) Aggregate ¶
func (nq *NoticeQuery) Aggregate(fns ...AggregateFunc) *NoticeSelect
Aggregate returns a NoticeSelect configured with the given aggregations.
func (*NoticeQuery) All ¶
func (nq *NoticeQuery) All(ctx context.Context) ([]*Notice, error)
All executes the query and returns a list of Notices.
func (*NoticeQuery) AllX ¶
func (nq *NoticeQuery) AllX(ctx context.Context) []*Notice
AllX is like All, but panics if an error occurs.
func (*NoticeQuery) Clone ¶
func (nq *NoticeQuery) Clone() *NoticeQuery
Clone returns a duplicate of the NoticeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NoticeQuery) Count ¶
func (nq *NoticeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NoticeQuery) CountX ¶
func (nq *NoticeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NoticeQuery) Exist ¶
func (nq *NoticeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NoticeQuery) ExistX ¶
func (nq *NoticeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NoticeQuery) First ¶
func (nq *NoticeQuery) First(ctx context.Context) (*Notice, error)
First returns the first Notice entity from the query. Returns a *NotFoundError when no Notice was found.
func (*NoticeQuery) FirstID ¶
func (nq *NoticeQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first Notice ID from the query. Returns a *NotFoundError when no Notice ID was found.
func (*NoticeQuery) FirstIDX ¶
func (nq *NoticeQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*NoticeQuery) FirstX ¶
func (nq *NoticeQuery) FirstX(ctx context.Context) *Notice
FirstX is like First, but panics if an error occurs.
func (*NoticeQuery) GroupBy ¶
func (nq *NoticeQuery) GroupBy(field string, fields ...string) *NoticeGroupBy
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 { UserID uint32 `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Notice.Query(). GroupBy(notice.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NoticeQuery) IDs ¶
func (nq *NoticeQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of Notice IDs.
func (*NoticeQuery) IDsX ¶
func (nq *NoticeQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*NoticeQuery) Limit ¶
func (nq *NoticeQuery) Limit(limit int) *NoticeQuery
Limit the number of records to be returned by this query.
func (*NoticeQuery) Offset ¶
func (nq *NoticeQuery) Offset(offset int) *NoticeQuery
Offset to start from.
func (*NoticeQuery) Only ¶
func (nq *NoticeQuery) Only(ctx context.Context) (*Notice, error)
Only returns a single Notice entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Notice entity is found. Returns a *NotFoundError when no Notice entities are found.
func (*NoticeQuery) OnlyID ¶
func (nq *NoticeQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only Notice ID in the query. Returns a *NotSingularError when more than one Notice ID is found. Returns a *NotFoundError when no entities are found.
func (*NoticeQuery) OnlyIDX ¶
func (nq *NoticeQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NoticeQuery) OnlyX ¶
func (nq *NoticeQuery) OnlyX(ctx context.Context) *Notice
OnlyX is like Only, but panics if an error occurs.
func (*NoticeQuery) Order ¶
func (nq *NoticeQuery) Order(o ...OrderFunc) *NoticeQuery
Order specifies how the records should be ordered.
func (*NoticeQuery) Select ¶
func (nq *NoticeQuery) Select(fields ...string) *NoticeSelect
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 { UserID uint32 `json:"user_id,omitempty"` } client.Notice.Query(). Select(notice.FieldUserID). Scan(ctx, &v)
func (*NoticeQuery) Unique ¶
func (nq *NoticeQuery) Unique(unique bool) *NoticeQuery
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 (*NoticeQuery) Where ¶
func (nq *NoticeQuery) Where(ps ...predicate.Notice) *NoticeQuery
Where adds a new predicate for the NoticeQuery builder.
type NoticeSelect ¶
type NoticeSelect struct { *NoticeQuery // contains filtered or unexported fields }
NoticeSelect is the builder for selecting fields of Notice entities.
func (*NoticeSelect) Aggregate ¶
func (ns *NoticeSelect) Aggregate(fns ...AggregateFunc) *NoticeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NoticeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NoticeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NoticeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NoticeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NoticeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NoticeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NoticeSelect) Scan ¶
func (ns *NoticeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NoticeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NoticeUpdate ¶
type NoticeUpdate struct {
// contains filtered or unexported fields
}
NoticeUpdate is the builder for updating Notice entities.
func (*NoticeUpdate) AddUserID ¶
func (nu *NoticeUpdate) AddUserID(u int32) *NoticeUpdate
AddUserID adds u to the "user_id" field.
func (*NoticeUpdate) ClearDiscordWebhook ¶
func (nu *NoticeUpdate) ClearDiscordWebhook() *NoticeUpdate
ClearDiscordWebhook clears the value of the "discord_webhook" field.
func (*NoticeUpdate) ClearMail ¶
func (nu *NoticeUpdate) ClearMail() *NoticeUpdate
ClearMail clears the value of the "mail" field.
func (*NoticeUpdate) ClearSlackWebhook ¶
func (nu *NoticeUpdate) ClearSlackWebhook() *NoticeUpdate
ClearSlackWebhook clears the value of the "slack_webhook" field.
func (*NoticeUpdate) Exec ¶
func (nu *NoticeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NoticeUpdate) ExecX ¶
func (nu *NoticeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoticeUpdate) Mutation ¶
func (nu *NoticeUpdate) Mutation() *NoticeMutation
Mutation returns the NoticeMutation object of the builder.
func (*NoticeUpdate) Save ¶
func (nu *NoticeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NoticeUpdate) SaveX ¶
func (nu *NoticeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NoticeUpdate) SetCreated ¶
func (nu *NoticeUpdate) SetCreated(t time.Time) *NoticeUpdate
SetCreated sets the "created" field.
func (*NoticeUpdate) SetDiscordWebhook ¶
func (nu *NoticeUpdate) SetDiscordWebhook(s string) *NoticeUpdate
SetDiscordWebhook sets the "discord_webhook" field.
func (*NoticeUpdate) SetMail ¶
func (nu *NoticeUpdate) SetMail(s string) *NoticeUpdate
SetMail sets the "mail" field.
func (*NoticeUpdate) SetModified ¶
func (nu *NoticeUpdate) SetModified(t time.Time) *NoticeUpdate
SetModified sets the "modified" field.
func (*NoticeUpdate) SetNillableCreated ¶
func (nu *NoticeUpdate) SetNillableCreated(t *time.Time) *NoticeUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*NoticeUpdate) SetNillableDiscordWebhook ¶
func (nu *NoticeUpdate) SetNillableDiscordWebhook(s *string) *NoticeUpdate
SetNillableDiscordWebhook sets the "discord_webhook" field if the given value is not nil.
func (*NoticeUpdate) SetNillableMail ¶
func (nu *NoticeUpdate) SetNillableMail(s *string) *NoticeUpdate
SetNillableMail sets the "mail" field if the given value is not nil.
func (*NoticeUpdate) SetNillableSlackWebhook ¶
func (nu *NoticeUpdate) SetNillableSlackWebhook(s *string) *NoticeUpdate
SetNillableSlackWebhook sets the "slack_webhook" field if the given value is not nil.
func (*NoticeUpdate) SetSlackWebhook ¶
func (nu *NoticeUpdate) SetSlackWebhook(s string) *NoticeUpdate
SetSlackWebhook sets the "slack_webhook" field.
func (*NoticeUpdate) SetUserID ¶
func (nu *NoticeUpdate) SetUserID(u uint32) *NoticeUpdate
SetUserID sets the "user_id" field.
func (*NoticeUpdate) Where ¶
func (nu *NoticeUpdate) Where(ps ...predicate.Notice) *NoticeUpdate
Where appends a list predicates to the NoticeUpdate builder.
type NoticeUpdateOne ¶
type NoticeUpdateOne struct {
// contains filtered or unexported fields
}
NoticeUpdateOne is the builder for updating a single Notice entity.
func (*NoticeUpdateOne) AddUserID ¶
func (nuo *NoticeUpdateOne) AddUserID(u int32) *NoticeUpdateOne
AddUserID adds u to the "user_id" field.
func (*NoticeUpdateOne) ClearDiscordWebhook ¶
func (nuo *NoticeUpdateOne) ClearDiscordWebhook() *NoticeUpdateOne
ClearDiscordWebhook clears the value of the "discord_webhook" field.
func (*NoticeUpdateOne) ClearMail ¶
func (nuo *NoticeUpdateOne) ClearMail() *NoticeUpdateOne
ClearMail clears the value of the "mail" field.
func (*NoticeUpdateOne) ClearSlackWebhook ¶
func (nuo *NoticeUpdateOne) ClearSlackWebhook() *NoticeUpdateOne
ClearSlackWebhook clears the value of the "slack_webhook" field.
func (*NoticeUpdateOne) Exec ¶
func (nuo *NoticeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NoticeUpdateOne) ExecX ¶
func (nuo *NoticeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoticeUpdateOne) Mutation ¶
func (nuo *NoticeUpdateOne) Mutation() *NoticeMutation
Mutation returns the NoticeMutation object of the builder.
func (*NoticeUpdateOne) Save ¶
func (nuo *NoticeUpdateOne) Save(ctx context.Context) (*Notice, error)
Save executes the query and returns the updated Notice entity.
func (*NoticeUpdateOne) SaveX ¶
func (nuo *NoticeUpdateOne) SaveX(ctx context.Context) *Notice
SaveX is like Save, but panics if an error occurs.
func (*NoticeUpdateOne) Select ¶
func (nuo *NoticeUpdateOne) Select(field string, fields ...string) *NoticeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NoticeUpdateOne) SetCreated ¶
func (nuo *NoticeUpdateOne) SetCreated(t time.Time) *NoticeUpdateOne
SetCreated sets the "created" field.
func (*NoticeUpdateOne) SetDiscordWebhook ¶
func (nuo *NoticeUpdateOne) SetDiscordWebhook(s string) *NoticeUpdateOne
SetDiscordWebhook sets the "discord_webhook" field.
func (*NoticeUpdateOne) SetMail ¶
func (nuo *NoticeUpdateOne) SetMail(s string) *NoticeUpdateOne
SetMail sets the "mail" field.
func (*NoticeUpdateOne) SetModified ¶
func (nuo *NoticeUpdateOne) SetModified(t time.Time) *NoticeUpdateOne
SetModified sets the "modified" field.
func (*NoticeUpdateOne) SetNillableCreated ¶
func (nuo *NoticeUpdateOne) SetNillableCreated(t *time.Time) *NoticeUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*NoticeUpdateOne) SetNillableDiscordWebhook ¶
func (nuo *NoticeUpdateOne) SetNillableDiscordWebhook(s *string) *NoticeUpdateOne
SetNillableDiscordWebhook sets the "discord_webhook" field if the given value is not nil.
func (*NoticeUpdateOne) SetNillableMail ¶
func (nuo *NoticeUpdateOne) SetNillableMail(s *string) *NoticeUpdateOne
SetNillableMail sets the "mail" field if the given value is not nil.
func (*NoticeUpdateOne) SetNillableSlackWebhook ¶
func (nuo *NoticeUpdateOne) SetNillableSlackWebhook(s *string) *NoticeUpdateOne
SetNillableSlackWebhook sets the "slack_webhook" field if the given value is not nil.
func (*NoticeUpdateOne) SetSlackWebhook ¶
func (nuo *NoticeUpdateOne) SetSlackWebhook(s string) *NoticeUpdateOne
SetSlackWebhook sets the "slack_webhook" field.
func (*NoticeUpdateOne) SetUserID ¶
func (nuo *NoticeUpdateOne) SetUserID(u uint32) *NoticeUpdateOne
SetUserID sets the "user_id" field.
func (*NoticeUpdateOne) Where ¶
func (nuo *NoticeUpdateOne) Where(ps ...predicate.Notice) *NoticeUpdateOne
Where appends a list predicates to the NoticeUpdate builder.
type Product ¶
type Product struct { // ID of the ent. ID uint32 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID uint32 `json:"user_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // NameJa holds the value of the "name_ja" field. NameJa string `json:"name_ja,omitempty"` // Detail holds the value of the "detail" field. Detail string `json:"detail,omitempty"` // DetailJa holds the value of the "detail_ja" field. DetailJa string `json:"detail_ja,omitempty"` // SiteURL holds the value of the "site_url" field. SiteURL string `json:"site_url,omitempty"` // GithubURL holds the value of the "github_url" field. GithubURL string `json:"github_url,omitempty"` // DevTime holds the value of the "dev_time" field. DevTime time.Time `json:"dev_time,omitempty"` // Thumbnail holds the value of the "thumbnail" field. Thumbnail string `json:"thumbnail,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Modified holds the value of the "modified" field. Modified time.Time `json:"modified,omitempty"` // contains filtered or unexported fields }
Product is the model entity for the Product schema.
func (*Product) Unwrap ¶
Unwrap unwraps the Product 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 (*Product) Update ¶
func (pr *Product) Update() *ProductUpdateOne
Update returns a builder for updating this Product. Note that you need to call Product.Unwrap() before calling this method if this Product was returned from a transaction, and the transaction was committed or rolled back.
type ProductClient ¶
type ProductClient struct {
// contains filtered or unexported fields
}
ProductClient is a client for the Product schema.
func NewProductClient ¶
func NewProductClient(c config) *ProductClient
NewProductClient returns a client for the Product from the given config.
func (*ProductClient) Create ¶
func (c *ProductClient) Create() *ProductCreate
Create returns a builder for creating a Product entity.
func (*ProductClient) CreateBulk ¶
func (c *ProductClient) CreateBulk(builders ...*ProductCreate) *ProductCreateBulk
CreateBulk returns a builder for creating a bulk of Product entities.
func (*ProductClient) Delete ¶
func (c *ProductClient) Delete() *ProductDelete
Delete returns a delete builder for Product.
func (*ProductClient) DeleteOne ¶
func (c *ProductClient) DeleteOne(pr *Product) *ProductDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProductClient) DeleteOneID ¶
func (c *ProductClient) DeleteOneID(id uint32) *ProductDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductClient) GetX ¶
func (c *ProductClient) GetX(ctx context.Context, id uint32) *Product
GetX is like Get, but panics if an error occurs.
func (*ProductClient) Hooks ¶
func (c *ProductClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductClient) Intercept ¶
func (c *ProductClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `product.Intercept(f(g(h())))`.
func (*ProductClient) Interceptors ¶
func (c *ProductClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductClient) Query ¶
func (c *ProductClient) Query() *ProductQuery
Query returns a query builder for Product.
func (*ProductClient) Update ¶
func (c *ProductClient) Update() *ProductUpdate
Update returns an update builder for Product.
func (*ProductClient) UpdateOne ¶
func (c *ProductClient) UpdateOne(pr *Product) *ProductUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductClient) UpdateOneID ¶
func (c *ProductClient) UpdateOneID(id uint32) *ProductUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProductClient) Use ¶
func (c *ProductClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `product.Hooks(f(g(h())))`.
type ProductCreate ¶
type ProductCreate struct {
// contains filtered or unexported fields
}
ProductCreate is the builder for creating a Product entity.
func (*ProductCreate) Exec ¶
func (pc *ProductCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductCreate) ExecX ¶
func (pc *ProductCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductCreate) Mutation ¶
func (pc *ProductCreate) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductCreate) Save ¶
func (pc *ProductCreate) Save(ctx context.Context) (*Product, error)
Save creates the Product in the database.
func (*ProductCreate) SaveX ¶
func (pc *ProductCreate) SaveX(ctx context.Context) *Product
SaveX calls Save and panics if Save returns an error.
func (*ProductCreate) SetCreated ¶
func (pc *ProductCreate) SetCreated(t time.Time) *ProductCreate
SetCreated sets the "created" field.
func (*ProductCreate) SetDetail ¶
func (pc *ProductCreate) SetDetail(s string) *ProductCreate
SetDetail sets the "detail" field.
func (*ProductCreate) SetDetailJa ¶
func (pc *ProductCreate) SetDetailJa(s string) *ProductCreate
SetDetailJa sets the "detail_ja" field.
func (*ProductCreate) SetDevTime ¶
func (pc *ProductCreate) SetDevTime(t time.Time) *ProductCreate
SetDevTime sets the "dev_time" field.
func (*ProductCreate) SetGithubURL ¶
func (pc *ProductCreate) SetGithubURL(s string) *ProductCreate
SetGithubURL sets the "github_url" field.
func (*ProductCreate) SetID ¶
func (pc *ProductCreate) SetID(u uint32) *ProductCreate
SetID sets the "id" field.
func (*ProductCreate) SetModified ¶
func (pc *ProductCreate) SetModified(t time.Time) *ProductCreate
SetModified sets the "modified" field.
func (*ProductCreate) SetName ¶
func (pc *ProductCreate) SetName(s string) *ProductCreate
SetName sets the "name" field.
func (*ProductCreate) SetNameJa ¶
func (pc *ProductCreate) SetNameJa(s string) *ProductCreate
SetNameJa sets the "name_ja" field.
func (*ProductCreate) SetNillableCreated ¶
func (pc *ProductCreate) SetNillableCreated(t *time.Time) *ProductCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*ProductCreate) SetNillableGithubURL ¶
func (pc *ProductCreate) SetNillableGithubURL(s *string) *ProductCreate
SetNillableGithubURL sets the "github_url" field if the given value is not nil.
func (*ProductCreate) SetNillableModified ¶
func (pc *ProductCreate) SetNillableModified(t *time.Time) *ProductCreate
SetNillableModified sets the "modified" field if the given value is not nil.
func (*ProductCreate) SetNillableThumbnail ¶
func (pc *ProductCreate) SetNillableThumbnail(s *string) *ProductCreate
SetNillableThumbnail sets the "thumbnail" field if the given value is not nil.
func (*ProductCreate) SetSiteURL ¶
func (pc *ProductCreate) SetSiteURL(s string) *ProductCreate
SetSiteURL sets the "site_url" field.
func (*ProductCreate) SetThumbnail ¶
func (pc *ProductCreate) SetThumbnail(s string) *ProductCreate
SetThumbnail sets the "thumbnail" field.
func (*ProductCreate) SetUserID ¶
func (pc *ProductCreate) SetUserID(u uint32) *ProductCreate
SetUserID sets the "user_id" field.
type ProductCreateBulk ¶
type ProductCreateBulk struct {
// contains filtered or unexported fields
}
ProductCreateBulk is the builder for creating many Product entities in bulk.
func (*ProductCreateBulk) Exec ¶
func (pcb *ProductCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductCreateBulk) ExecX ¶
func (pcb *ProductCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProductDelete ¶
type ProductDelete struct {
// contains filtered or unexported fields
}
ProductDelete is the builder for deleting a Product entity.
func (*ProductDelete) Exec ¶
func (pd *ProductDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductDelete) ExecX ¶
func (pd *ProductDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductDelete) Where ¶
func (pd *ProductDelete) Where(ps ...predicate.Product) *ProductDelete
Where appends a list predicates to the ProductDelete builder.
type ProductDeleteOne ¶
type ProductDeleteOne struct {
// contains filtered or unexported fields
}
ProductDeleteOne is the builder for deleting a single Product entity.
func (*ProductDeleteOne) Exec ¶
func (pdo *ProductDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductDeleteOne) ExecX ¶
func (pdo *ProductDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductDeleteOne) Where ¶
func (pdo *ProductDeleteOne) Where(ps ...predicate.Product) *ProductDeleteOne
Where appends a list predicates to the ProductDelete builder.
type ProductGroupBy ¶
type ProductGroupBy struct {
// contains filtered or unexported fields
}
ProductGroupBy is the group-by builder for Product entities.
func (*ProductGroupBy) Aggregate ¶
func (pgb *ProductGroupBy) Aggregate(fns ...AggregateFunc) *ProductGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Scan ¶
func (pgb *ProductGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductMutation ¶
type ProductMutation struct {
// contains filtered or unexported fields
}
ProductMutation represents an operation that mutates the Product nodes in the graph.
func (*ProductMutation) AddField ¶
func (m *ProductMutation) 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 (*ProductMutation) AddUserID ¶
func (m *ProductMutation) AddUserID(u int32)
AddUserID adds u to the "user_id" field.
func (*ProductMutation) AddedEdges ¶
func (m *ProductMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductMutation) AddedField ¶
func (m *ProductMutation) 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 (*ProductMutation) AddedFields ¶
func (m *ProductMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductMutation) AddedIDs ¶
func (m *ProductMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductMutation) AddedUserID ¶
func (m *ProductMutation) AddedUserID() (r int32, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*ProductMutation) ClearEdge ¶
func (m *ProductMutation) 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 (*ProductMutation) ClearField ¶
func (m *ProductMutation) 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 (*ProductMutation) ClearGithubURL ¶
func (m *ProductMutation) ClearGithubURL()
ClearGithubURL clears the value of the "github_url" field.
func (*ProductMutation) ClearThumbnail ¶
func (m *ProductMutation) ClearThumbnail()
ClearThumbnail clears the value of the "thumbnail" field.
func (*ProductMutation) ClearedEdges ¶
func (m *ProductMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductMutation) ClearedFields ¶
func (m *ProductMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductMutation) Client ¶
func (m ProductMutation) 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 (*ProductMutation) Created ¶
func (m *ProductMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*ProductMutation) Detail ¶
func (m *ProductMutation) Detail() (r string, exists bool)
Detail returns the value of the "detail" field in the mutation.
func (*ProductMutation) DetailJa ¶
func (m *ProductMutation) DetailJa() (r string, exists bool)
DetailJa returns the value of the "detail_ja" field in the mutation.
func (*ProductMutation) DevTime ¶
func (m *ProductMutation) DevTime() (r time.Time, exists bool)
DevTime returns the value of the "dev_time" field in the mutation.
func (*ProductMutation) EdgeCleared ¶
func (m *ProductMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductMutation) Field ¶
func (m *ProductMutation) 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 (*ProductMutation) FieldCleared ¶
func (m *ProductMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductMutation) Fields ¶
func (m *ProductMutation) 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 (*ProductMutation) GithubURL ¶
func (m *ProductMutation) GithubURL() (r string, exists bool)
GithubURL returns the value of the "github_url" field in the mutation.
func (*ProductMutation) GithubURLCleared ¶
func (m *ProductMutation) GithubURLCleared() bool
GithubURLCleared returns if the "github_url" field was cleared in this mutation.
func (*ProductMutation) ID ¶
func (m *ProductMutation) ID() (id uint32, 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 (*ProductMutation) IDs ¶
func (m *ProductMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProductMutation) Modified ¶
func (m *ProductMutation) Modified() (r time.Time, exists bool)
Modified returns the value of the "modified" field in the mutation.
func (*ProductMutation) Name ¶
func (m *ProductMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProductMutation) NameJa ¶
func (m *ProductMutation) NameJa() (r string, exists bool)
NameJa returns the value of the "name_ja" field in the mutation.
func (*ProductMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the Product entity. If the Product 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 (*ProductMutation) OldDetail ¶
func (m *ProductMutation) OldDetail(ctx context.Context) (v string, err error)
OldDetail returns the old "detail" field's value of the Product entity. If the Product 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 (*ProductMutation) OldDetailJa ¶
func (m *ProductMutation) OldDetailJa(ctx context.Context) (v string, err error)
OldDetailJa returns the old "detail_ja" field's value of the Product entity. If the Product 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 (*ProductMutation) OldDevTime ¶
OldDevTime returns the old "dev_time" field's value of the Product entity. If the Product 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 (*ProductMutation) 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 (*ProductMutation) OldGithubURL ¶
func (m *ProductMutation) OldGithubURL(ctx context.Context) (v string, err error)
OldGithubURL returns the old "github_url" field's value of the Product entity. If the Product 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 (*ProductMutation) OldModified ¶
OldModified returns the old "modified" field's value of the Product entity. If the Product 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 (*ProductMutation) OldName ¶
func (m *ProductMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Product entity. If the Product 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 (*ProductMutation) OldNameJa ¶
func (m *ProductMutation) OldNameJa(ctx context.Context) (v string, err error)
OldNameJa returns the old "name_ja" field's value of the Product entity. If the Product 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 (*ProductMutation) OldSiteURL ¶
func (m *ProductMutation) OldSiteURL(ctx context.Context) (v string, err error)
OldSiteURL returns the old "site_url" field's value of the Product entity. If the Product 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 (*ProductMutation) OldThumbnail ¶
func (m *ProductMutation) OldThumbnail(ctx context.Context) (v string, err error)
OldThumbnail returns the old "thumbnail" field's value of the Product entity. If the Product 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 (*ProductMutation) OldUserID ¶
func (m *ProductMutation) OldUserID(ctx context.Context) (v uint32, err error)
OldUserID returns the old "user_id" field's value of the Product entity. If the Product 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 (*ProductMutation) RemovedEdges ¶
func (m *ProductMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductMutation) RemovedIDs ¶
func (m *ProductMutation) 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 (*ProductMutation) ResetCreated ¶
func (m *ProductMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*ProductMutation) ResetDetail ¶
func (m *ProductMutation) ResetDetail()
ResetDetail resets all changes to the "detail" field.
func (*ProductMutation) ResetDetailJa ¶
func (m *ProductMutation) ResetDetailJa()
ResetDetailJa resets all changes to the "detail_ja" field.
func (*ProductMutation) ResetDevTime ¶
func (m *ProductMutation) ResetDevTime()
ResetDevTime resets all changes to the "dev_time" field.
func (*ProductMutation) ResetEdge ¶
func (m *ProductMutation) 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 (*ProductMutation) ResetField ¶
func (m *ProductMutation) 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 (*ProductMutation) ResetGithubURL ¶
func (m *ProductMutation) ResetGithubURL()
ResetGithubURL resets all changes to the "github_url" field.
func (*ProductMutation) ResetModified ¶
func (m *ProductMutation) ResetModified()
ResetModified resets all changes to the "modified" field.
func (*ProductMutation) ResetName ¶
func (m *ProductMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProductMutation) ResetNameJa ¶
func (m *ProductMutation) ResetNameJa()
ResetNameJa resets all changes to the "name_ja" field.
func (*ProductMutation) ResetSiteURL ¶
func (m *ProductMutation) ResetSiteURL()
ResetSiteURL resets all changes to the "site_url" field.
func (*ProductMutation) ResetThumbnail ¶
func (m *ProductMutation) ResetThumbnail()
ResetThumbnail resets all changes to the "thumbnail" field.
func (*ProductMutation) ResetUserID ¶
func (m *ProductMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ProductMutation) SetCreated ¶
func (m *ProductMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*ProductMutation) SetDetail ¶
func (m *ProductMutation) SetDetail(s string)
SetDetail sets the "detail" field.
func (*ProductMutation) SetDetailJa ¶
func (m *ProductMutation) SetDetailJa(s string)
SetDetailJa sets the "detail_ja" field.
func (*ProductMutation) SetDevTime ¶
func (m *ProductMutation) SetDevTime(t time.Time)
SetDevTime sets the "dev_time" field.
func (*ProductMutation) SetField ¶
func (m *ProductMutation) 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 (*ProductMutation) SetGithubURL ¶
func (m *ProductMutation) SetGithubURL(s string)
SetGithubURL sets the "github_url" field.
func (*ProductMutation) SetID ¶
func (m *ProductMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Product entities.
func (*ProductMutation) SetModified ¶
func (m *ProductMutation) SetModified(t time.Time)
SetModified sets the "modified" field.
func (*ProductMutation) SetName ¶
func (m *ProductMutation) SetName(s string)
SetName sets the "name" field.
func (*ProductMutation) SetNameJa ¶
func (m *ProductMutation) SetNameJa(s string)
SetNameJa sets the "name_ja" field.
func (*ProductMutation) SetOp ¶
func (m *ProductMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductMutation) SetSiteURL ¶
func (m *ProductMutation) SetSiteURL(s string)
SetSiteURL sets the "site_url" field.
func (*ProductMutation) SetThumbnail ¶
func (m *ProductMutation) SetThumbnail(s string)
SetThumbnail sets the "thumbnail" field.
func (*ProductMutation) SetUserID ¶
func (m *ProductMutation) SetUserID(u uint32)
SetUserID sets the "user_id" field.
func (*ProductMutation) SiteURL ¶
func (m *ProductMutation) SiteURL() (r string, exists bool)
SiteURL returns the value of the "site_url" field in the mutation.
func (*ProductMutation) Thumbnail ¶
func (m *ProductMutation) Thumbnail() (r string, exists bool)
Thumbnail returns the value of the "thumbnail" field in the mutation.
func (*ProductMutation) ThumbnailCleared ¶
func (m *ProductMutation) ThumbnailCleared() bool
ThumbnailCleared returns if the "thumbnail" field was cleared in this mutation.
func (ProductMutation) Tx ¶
func (m ProductMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductMutation) Type ¶
func (m *ProductMutation) Type() string
Type returns the node type of this mutation (Product).
func (*ProductMutation) UserID ¶
func (m *ProductMutation) UserID() (r uint32, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ProductMutation) Where ¶
func (m *ProductMutation) Where(ps ...predicate.Product)
Where appends a list predicates to the ProductMutation builder.
func (*ProductMutation) WhereP ¶
func (m *ProductMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProductQuery ¶
type ProductQuery struct {
// contains filtered or unexported fields
}
ProductQuery is the builder for querying Product entities.
func (*ProductQuery) Aggregate ¶
func (pq *ProductQuery) Aggregate(fns ...AggregateFunc) *ProductSelect
Aggregate returns a ProductSelect configured with the given aggregations.
func (*ProductQuery) All ¶
func (pq *ProductQuery) All(ctx context.Context) ([]*Product, error)
All executes the query and returns a list of Products.
func (*ProductQuery) AllX ¶
func (pq *ProductQuery) AllX(ctx context.Context) []*Product
AllX is like All, but panics if an error occurs.
func (*ProductQuery) Clone ¶
func (pq *ProductQuery) Clone() *ProductQuery
Clone returns a duplicate of the ProductQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductQuery) Count ¶
func (pq *ProductQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductQuery) CountX ¶
func (pq *ProductQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductQuery) Exist ¶
func (pq *ProductQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductQuery) ExistX ¶
func (pq *ProductQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductQuery) First ¶
func (pq *ProductQuery) First(ctx context.Context) (*Product, error)
First returns the first Product entity from the query. Returns a *NotFoundError when no Product was found.
func (*ProductQuery) FirstID ¶
func (pq *ProductQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first Product ID from the query. Returns a *NotFoundError when no Product ID was found.
func (*ProductQuery) FirstIDX ¶
func (pq *ProductQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProductQuery) FirstX ¶
func (pq *ProductQuery) FirstX(ctx context.Context) *Product
FirstX is like First, but panics if an error occurs.
func (*ProductQuery) GroupBy ¶
func (pq *ProductQuery) GroupBy(field string, fields ...string) *ProductGroupBy
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 { UserID uint32 `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Product.Query(). GroupBy(product.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductQuery) IDs ¶
func (pq *ProductQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of Product IDs.
func (*ProductQuery) IDsX ¶
func (pq *ProductQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*ProductQuery) Limit ¶
func (pq *ProductQuery) Limit(limit int) *ProductQuery
Limit the number of records to be returned by this query.
func (*ProductQuery) Offset ¶
func (pq *ProductQuery) Offset(offset int) *ProductQuery
Offset to start from.
func (*ProductQuery) Only ¶
func (pq *ProductQuery) Only(ctx context.Context) (*Product, error)
Only returns a single Product entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Product entity is found. Returns a *NotFoundError when no Product entities are found.
func (*ProductQuery) OnlyID ¶
func (pq *ProductQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only Product ID in the query. Returns a *NotSingularError when more than one Product ID is found. Returns a *NotFoundError when no entities are found.
func (*ProductQuery) OnlyIDX ¶
func (pq *ProductQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProductQuery) OnlyX ¶
func (pq *ProductQuery) OnlyX(ctx context.Context) *Product
OnlyX is like Only, but panics if an error occurs.
func (*ProductQuery) Order ¶
func (pq *ProductQuery) Order(o ...OrderFunc) *ProductQuery
Order specifies how the records should be ordered.
func (*ProductQuery) Select ¶
func (pq *ProductQuery) Select(fields ...string) *ProductSelect
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 { UserID uint32 `json:"user_id,omitempty"` } client.Product.Query(). Select(product.FieldUserID). Scan(ctx, &v)
func (*ProductQuery) Unique ¶
func (pq *ProductQuery) Unique(unique bool) *ProductQuery
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 (*ProductQuery) Where ¶
func (pq *ProductQuery) Where(ps ...predicate.Product) *ProductQuery
Where adds a new predicate for the ProductQuery builder.
type ProductSelect ¶
type ProductSelect struct { *ProductQuery // contains filtered or unexported fields }
ProductSelect is the builder for selecting fields of Product entities.
func (*ProductSelect) Aggregate ¶
func (ps *ProductSelect) Aggregate(fns ...AggregateFunc) *ProductSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Scan ¶
func (ps *ProductSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductUpdate ¶
type ProductUpdate struct {
// contains filtered or unexported fields
}
ProductUpdate is the builder for updating Product entities.
func (*ProductUpdate) AddUserID ¶
func (pu *ProductUpdate) AddUserID(u int32) *ProductUpdate
AddUserID adds u to the "user_id" field.
func (*ProductUpdate) ClearGithubURL ¶
func (pu *ProductUpdate) ClearGithubURL() *ProductUpdate
ClearGithubURL clears the value of the "github_url" field.
func (*ProductUpdate) ClearThumbnail ¶
func (pu *ProductUpdate) ClearThumbnail() *ProductUpdate
ClearThumbnail clears the value of the "thumbnail" field.
func (*ProductUpdate) Exec ¶
func (pu *ProductUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductUpdate) ExecX ¶
func (pu *ProductUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductUpdate) Mutation ¶
func (pu *ProductUpdate) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductUpdate) Save ¶
func (pu *ProductUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductUpdate) SaveX ¶
func (pu *ProductUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductUpdate) SetCreated ¶
func (pu *ProductUpdate) SetCreated(t time.Time) *ProductUpdate
SetCreated sets the "created" field.
func (*ProductUpdate) SetDetail ¶
func (pu *ProductUpdate) SetDetail(s string) *ProductUpdate
SetDetail sets the "detail" field.
func (*ProductUpdate) SetDetailJa ¶
func (pu *ProductUpdate) SetDetailJa(s string) *ProductUpdate
SetDetailJa sets the "detail_ja" field.
func (*ProductUpdate) SetDevTime ¶
func (pu *ProductUpdate) SetDevTime(t time.Time) *ProductUpdate
SetDevTime sets the "dev_time" field.
func (*ProductUpdate) SetGithubURL ¶
func (pu *ProductUpdate) SetGithubURL(s string) *ProductUpdate
SetGithubURL sets the "github_url" field.
func (*ProductUpdate) SetModified ¶
func (pu *ProductUpdate) SetModified(t time.Time) *ProductUpdate
SetModified sets the "modified" field.
func (*ProductUpdate) SetName ¶
func (pu *ProductUpdate) SetName(s string) *ProductUpdate
SetName sets the "name" field.
func (*ProductUpdate) SetNameJa ¶
func (pu *ProductUpdate) SetNameJa(s string) *ProductUpdate
SetNameJa sets the "name_ja" field.
func (*ProductUpdate) SetNillableCreated ¶
func (pu *ProductUpdate) SetNillableCreated(t *time.Time) *ProductUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*ProductUpdate) SetNillableGithubURL ¶
func (pu *ProductUpdate) SetNillableGithubURL(s *string) *ProductUpdate
SetNillableGithubURL sets the "github_url" field if the given value is not nil.
func (*ProductUpdate) SetNillableThumbnail ¶
func (pu *ProductUpdate) SetNillableThumbnail(s *string) *ProductUpdate
SetNillableThumbnail sets the "thumbnail" field if the given value is not nil.
func (*ProductUpdate) SetSiteURL ¶
func (pu *ProductUpdate) SetSiteURL(s string) *ProductUpdate
SetSiteURL sets the "site_url" field.
func (*ProductUpdate) SetThumbnail ¶
func (pu *ProductUpdate) SetThumbnail(s string) *ProductUpdate
SetThumbnail sets the "thumbnail" field.
func (*ProductUpdate) SetUserID ¶
func (pu *ProductUpdate) SetUserID(u uint32) *ProductUpdate
SetUserID sets the "user_id" field.
func (*ProductUpdate) Where ¶
func (pu *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate
Where appends a list predicates to the ProductUpdate builder.
type ProductUpdateOne ¶
type ProductUpdateOne struct {
// contains filtered or unexported fields
}
ProductUpdateOne is the builder for updating a single Product entity.
func (*ProductUpdateOne) AddUserID ¶
func (puo *ProductUpdateOne) AddUserID(u int32) *ProductUpdateOne
AddUserID adds u to the "user_id" field.
func (*ProductUpdateOne) ClearGithubURL ¶
func (puo *ProductUpdateOne) ClearGithubURL() *ProductUpdateOne
ClearGithubURL clears the value of the "github_url" field.
func (*ProductUpdateOne) ClearThumbnail ¶
func (puo *ProductUpdateOne) ClearThumbnail() *ProductUpdateOne
ClearThumbnail clears the value of the "thumbnail" field.
func (*ProductUpdateOne) Exec ¶
func (puo *ProductUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductUpdateOne) ExecX ¶
func (puo *ProductUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductUpdateOne) Mutation ¶
func (puo *ProductUpdateOne) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductUpdateOne) Save ¶
func (puo *ProductUpdateOne) Save(ctx context.Context) (*Product, error)
Save executes the query and returns the updated Product entity.
func (*ProductUpdateOne) SaveX ¶
func (puo *ProductUpdateOne) SaveX(ctx context.Context) *Product
SaveX is like Save, but panics if an error occurs.
func (*ProductUpdateOne) Select ¶
func (puo *ProductUpdateOne) Select(field string, fields ...string) *ProductUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductUpdateOne) SetCreated ¶
func (puo *ProductUpdateOne) SetCreated(t time.Time) *ProductUpdateOne
SetCreated sets the "created" field.
func (*ProductUpdateOne) SetDetail ¶
func (puo *ProductUpdateOne) SetDetail(s string) *ProductUpdateOne
SetDetail sets the "detail" field.
func (*ProductUpdateOne) SetDetailJa ¶
func (puo *ProductUpdateOne) SetDetailJa(s string) *ProductUpdateOne
SetDetailJa sets the "detail_ja" field.
func (*ProductUpdateOne) SetDevTime ¶
func (puo *ProductUpdateOne) SetDevTime(t time.Time) *ProductUpdateOne
SetDevTime sets the "dev_time" field.
func (*ProductUpdateOne) SetGithubURL ¶
func (puo *ProductUpdateOne) SetGithubURL(s string) *ProductUpdateOne
SetGithubURL sets the "github_url" field.
func (*ProductUpdateOne) SetModified ¶
func (puo *ProductUpdateOne) SetModified(t time.Time) *ProductUpdateOne
SetModified sets the "modified" field.
func (*ProductUpdateOne) SetName ¶
func (puo *ProductUpdateOne) SetName(s string) *ProductUpdateOne
SetName sets the "name" field.
func (*ProductUpdateOne) SetNameJa ¶
func (puo *ProductUpdateOne) SetNameJa(s string) *ProductUpdateOne
SetNameJa sets the "name_ja" field.
func (*ProductUpdateOne) SetNillableCreated ¶
func (puo *ProductUpdateOne) SetNillableCreated(t *time.Time) *ProductUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableGithubURL ¶
func (puo *ProductUpdateOne) SetNillableGithubURL(s *string) *ProductUpdateOne
SetNillableGithubURL sets the "github_url" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableThumbnail ¶
func (puo *ProductUpdateOne) SetNillableThumbnail(s *string) *ProductUpdateOne
SetNillableThumbnail sets the "thumbnail" field if the given value is not nil.
func (*ProductUpdateOne) SetSiteURL ¶
func (puo *ProductUpdateOne) SetSiteURL(s string) *ProductUpdateOne
SetSiteURL sets the "site_url" field.
func (*ProductUpdateOne) SetThumbnail ¶
func (puo *ProductUpdateOne) SetThumbnail(s string) *ProductUpdateOne
SetThumbnail sets the "thumbnail" field.
func (*ProductUpdateOne) SetUserID ¶
func (puo *ProductUpdateOne) SetUserID(u uint32) *ProductUpdateOne
SetUserID sets the "user_id" field.
func (*ProductUpdateOne) Where ¶
func (puo *ProductUpdateOne) Where(ps ...predicate.Product) *ProductUpdateOne
Where appends a list predicates to the ProductUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Session ¶
type Session struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID uint32 `json:"user_id,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Period holds the value of the "period" field. Period time.Time `json:"period,omitempty"` // contains filtered or unexported fields }
Session is the model entity for the Session schema.
func (*Session) Unwrap ¶
Unwrap unwraps the Session 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 (*Session) Update ¶
func (s *Session) Update() *SessionUpdateOne
Update returns a builder for updating this Session. Note that you need to call Session.Unwrap() before calling this method if this Session was returned from a transaction, and the transaction was committed or rolled back.
type SessionClient ¶
type SessionClient struct {
// contains filtered or unexported fields
}
SessionClient is a client for the Session schema.
func NewSessionClient ¶
func NewSessionClient(c config) *SessionClient
NewSessionClient returns a client for the Session from the given config.
func (*SessionClient) Create ¶
func (c *SessionClient) Create() *SessionCreate
Create returns a builder for creating a Session entity.
func (*SessionClient) CreateBulk ¶
func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
CreateBulk returns a builder for creating a bulk of Session entities.
func (*SessionClient) Delete ¶
func (c *SessionClient) Delete() *SessionDelete
Delete returns a delete builder for Session.
func (*SessionClient) DeleteOne ¶
func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SessionClient) DeleteOneID ¶
func (c *SessionClient) DeleteOneID(id uuid.UUID) *SessionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SessionClient) Hooks ¶
func (c *SessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SessionClient) Intercept ¶
func (c *SessionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `session.Intercept(f(g(h())))`.
func (*SessionClient) Interceptors ¶
func (c *SessionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SessionClient) Query ¶
func (c *SessionClient) Query() *SessionQuery
Query returns a query builder for Session.
func (*SessionClient) Update ¶
func (c *SessionClient) Update() *SessionUpdate
Update returns an update builder for Session.
func (*SessionClient) UpdateOne ¶
func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SessionClient) UpdateOneID ¶
func (c *SessionClient) UpdateOneID(id uuid.UUID) *SessionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SessionClient) Use ¶
func (c *SessionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `session.Hooks(f(g(h())))`.
type SessionCreate ¶
type SessionCreate struct {
// contains filtered or unexported fields
}
SessionCreate is the builder for creating a Session entity.
func (*SessionCreate) Exec ¶
func (sc *SessionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionCreate) ExecX ¶
func (sc *SessionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionCreate) Mutation ¶
func (sc *SessionCreate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionCreate) Save ¶
func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
Save creates the Session in the database.
func (*SessionCreate) SaveX ¶
func (sc *SessionCreate) SaveX(ctx context.Context) *Session
SaveX calls Save and panics if Save returns an error.
func (*SessionCreate) SetCreated ¶
func (sc *SessionCreate) SetCreated(t time.Time) *SessionCreate
SetCreated sets the "created" field.
func (*SessionCreate) SetID ¶
func (sc *SessionCreate) SetID(u uuid.UUID) *SessionCreate
SetID sets the "id" field.
func (*SessionCreate) SetNillableCreated ¶
func (sc *SessionCreate) SetNillableCreated(t *time.Time) *SessionCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*SessionCreate) SetNillableID ¶
func (sc *SessionCreate) SetNillableID(u *uuid.UUID) *SessionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SessionCreate) SetPeriod ¶
func (sc *SessionCreate) SetPeriod(t time.Time) *SessionCreate
SetPeriod sets the "period" field.
func (*SessionCreate) SetUserID ¶
func (sc *SessionCreate) SetUserID(u uint32) *SessionCreate
SetUserID sets the "user_id" field.
type SessionCreateBulk ¶
type SessionCreateBulk struct {
// contains filtered or unexported fields
}
SessionCreateBulk is the builder for creating many Session entities in bulk.
func (*SessionCreateBulk) Exec ¶
func (scb *SessionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionCreateBulk) ExecX ¶
func (scb *SessionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SessionDelete ¶
type SessionDelete struct {
// contains filtered or unexported fields
}
SessionDelete is the builder for deleting a Session entity.
func (*SessionDelete) Exec ¶
func (sd *SessionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SessionDelete) ExecX ¶
func (sd *SessionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SessionDelete) Where ¶
func (sd *SessionDelete) Where(ps ...predicate.Session) *SessionDelete
Where appends a list predicates to the SessionDelete builder.
type SessionDeleteOne ¶
type SessionDeleteOne struct {
// contains filtered or unexported fields
}
SessionDeleteOne is the builder for deleting a single Session entity.
func (*SessionDeleteOne) Exec ¶
func (sdo *SessionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SessionDeleteOne) ExecX ¶
func (sdo *SessionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionDeleteOne) Where ¶
func (sdo *SessionDeleteOne) Where(ps ...predicate.Session) *SessionDeleteOne
Where appends a list predicates to the SessionDelete builder.
type SessionGroupBy ¶
type SessionGroupBy struct {
// contains filtered or unexported fields
}
SessionGroupBy is the group-by builder for Session entities.
func (*SessionGroupBy) Aggregate ¶
func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SessionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Scan ¶
func (sgb *SessionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SessionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SessionMutation ¶
type SessionMutation struct {
// contains filtered or unexported fields
}
SessionMutation represents an operation that mutates the Session nodes in the graph.
func (*SessionMutation) AddField ¶
func (m *SessionMutation) 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 (*SessionMutation) AddUserID ¶
func (m *SessionMutation) AddUserID(u int32)
AddUserID adds u to the "user_id" field.
func (*SessionMutation) AddedEdges ¶
func (m *SessionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SessionMutation) AddedField ¶
func (m *SessionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was 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 (*SessionMutation) AddedFields ¶
func (m *SessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SessionMutation) AddedIDs ¶
func (m *SessionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SessionMutation) AddedUserID ¶
func (m *SessionMutation) AddedUserID() (r int32, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*SessionMutation) ClearEdge ¶
func (m *SessionMutation) 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 (*SessionMutation) ClearField ¶
func (m *SessionMutation) 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 (*SessionMutation) ClearedEdges ¶
func (m *SessionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SessionMutation) ClearedFields ¶
func (m *SessionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SessionMutation) Client ¶
func (m SessionMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*SessionMutation) Created ¶
func (m *SessionMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*SessionMutation) EdgeCleared ¶
func (m *SessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SessionMutation) Field ¶
func (m *SessionMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SessionMutation) FieldCleared ¶
func (m *SessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SessionMutation) Fields ¶
func (m *SessionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SessionMutation) ID ¶
func (m *SessionMutation) ID() (id uuid.UUID, 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 (*SessionMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SessionMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SessionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SessionMutation) OldPeriod ¶
OldPeriod returns the old "period" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SessionMutation) OldUserID ¶
func (m *SessionMutation) OldUserID(ctx context.Context) (v uint32, err error)
OldUserID returns the old "user_id" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SessionMutation) Period ¶
func (m *SessionMutation) Period() (r time.Time, exists bool)
Period returns the value of the "period" field in the mutation.
func (*SessionMutation) RemovedEdges ¶
func (m *SessionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SessionMutation) RemovedIDs ¶
func (m *SessionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SessionMutation) ResetCreated ¶
func (m *SessionMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*SessionMutation) ResetEdge ¶
func (m *SessionMutation) 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 (*SessionMutation) ResetField ¶
func (m *SessionMutation) 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 (*SessionMutation) ResetPeriod ¶
func (m *SessionMutation) ResetPeriod()
ResetPeriod resets all changes to the "period" field.
func (*SessionMutation) ResetUserID ¶
func (m *SessionMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*SessionMutation) SetCreated ¶
func (m *SessionMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*SessionMutation) SetField ¶
func (m *SessionMutation) 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 (*SessionMutation) SetID ¶
func (m *SessionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Session entities.
func (*SessionMutation) SetOp ¶
func (m *SessionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SessionMutation) SetPeriod ¶
func (m *SessionMutation) SetPeriod(t time.Time)
SetPeriod sets the "period" field.
func (*SessionMutation) SetUserID ¶
func (m *SessionMutation) SetUserID(u uint32)
SetUserID sets the "user_id" field.
func (SessionMutation) Tx ¶
func (m SessionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SessionMutation) Type ¶
func (m *SessionMutation) Type() string
Type returns the node type of this mutation (Session).
func (*SessionMutation) UserID ¶
func (m *SessionMutation) UserID() (r uint32, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*SessionMutation) Where ¶
func (m *SessionMutation) Where(ps ...predicate.Session)
Where appends a list predicates to the SessionMutation builder.
func (*SessionMutation) WhereP ¶
func (m *SessionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SessionQuery ¶
type SessionQuery struct {
// contains filtered or unexported fields
}
SessionQuery is the builder for querying Session entities.
func (*SessionQuery) Aggregate ¶
func (sq *SessionQuery) Aggregate(fns ...AggregateFunc) *SessionSelect
Aggregate returns a SessionSelect configured with the given aggregations.
func (*SessionQuery) All ¶
func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
All executes the query and returns a list of Sessions.
func (*SessionQuery) AllX ¶
func (sq *SessionQuery) AllX(ctx context.Context) []*Session
AllX is like All, but panics if an error occurs.
func (*SessionQuery) Clone ¶
func (sq *SessionQuery) Clone() *SessionQuery
Clone returns a duplicate of the SessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SessionQuery) Count ¶
func (sq *SessionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SessionQuery) CountX ¶
func (sq *SessionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SessionQuery) Exist ¶
func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SessionQuery) ExistX ¶
func (sq *SessionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SessionQuery) First ¶
func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
First returns the first Session entity from the query. Returns a *NotFoundError when no Session was found.
func (*SessionQuery) FirstID ¶
FirstID returns the first Session ID from the query. Returns a *NotFoundError when no Session ID was found.
func (*SessionQuery) FirstIDX ¶
func (sq *SessionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SessionQuery) FirstX ¶
func (sq *SessionQuery) FirstX(ctx context.Context) *Session
FirstX is like First, but panics if an error occurs.
func (*SessionQuery) GroupBy ¶
func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
GroupBy 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 { UserID uint32 `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Session.Query(). GroupBy(session.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SessionQuery) IDsX ¶
func (sq *SessionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SessionQuery) Limit ¶
func (sq *SessionQuery) Limit(limit int) *SessionQuery
Limit the number of records to be returned by this query.
func (*SessionQuery) Offset ¶
func (sq *SessionQuery) Offset(offset int) *SessionQuery
Offset to start from.
func (*SessionQuery) Only ¶
func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
Only returns a single Session entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Session entity is found. Returns a *NotFoundError when no Session entities are found.
func (*SessionQuery) OnlyID ¶
OnlyID is like Only, but returns the only Session ID in the query. Returns a *NotSingularError when more than one Session ID is found. Returns a *NotFoundError when no entities are found.
func (*SessionQuery) OnlyIDX ¶
func (sq *SessionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SessionQuery) OnlyX ¶
func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
OnlyX is like Only, but panics if an error occurs.
func (*SessionQuery) Order ¶
func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
Order specifies how the records should be ordered.
func (*SessionQuery) Select ¶
func (sq *SessionQuery) Select(fields ...string) *SessionSelect
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 { UserID uint32 `json:"user_id,omitempty"` } client.Session.Query(). Select(session.FieldUserID). Scan(ctx, &v)
func (*SessionQuery) Unique ¶
func (sq *SessionQuery) Unique(unique bool) *SessionQuery
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 (*SessionQuery) Where ¶
func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
Where adds a new predicate for the SessionQuery builder.
type SessionSelect ¶
type SessionSelect struct { *SessionQuery // contains filtered or unexported fields }
SessionSelect is the builder for selecting fields of Session entities.
func (*SessionSelect) Aggregate ¶
func (ss *SessionSelect) Aggregate(fns ...AggregateFunc) *SessionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SessionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Scan ¶
func (ss *SessionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SessionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SessionUpdate ¶
type SessionUpdate struct {
// contains filtered or unexported fields
}
SessionUpdate is the builder for updating Session entities.
func (*SessionUpdate) AddUserID ¶
func (su *SessionUpdate) AddUserID(u int32) *SessionUpdate
AddUserID adds u to the "user_id" field.
func (*SessionUpdate) Exec ¶
func (su *SessionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionUpdate) ExecX ¶
func (su *SessionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdate) Mutation ¶
func (su *SessionUpdate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdate) Save ¶
func (su *SessionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SessionUpdate) SaveX ¶
func (su *SessionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdate) SetCreated ¶
func (su *SessionUpdate) SetCreated(t time.Time) *SessionUpdate
SetCreated sets the "created" field.
func (*SessionUpdate) SetNillableCreated ¶
func (su *SessionUpdate) SetNillableCreated(t *time.Time) *SessionUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*SessionUpdate) SetPeriod ¶
func (su *SessionUpdate) SetPeriod(t time.Time) *SessionUpdate
SetPeriod sets the "period" field.
func (*SessionUpdate) SetUserID ¶
func (su *SessionUpdate) SetUserID(u uint32) *SessionUpdate
SetUserID sets the "user_id" field.
func (*SessionUpdate) Where ¶
func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
Where appends a list predicates to the SessionUpdate builder.
type SessionUpdateOne ¶
type SessionUpdateOne struct {
// contains filtered or unexported fields
}
SessionUpdateOne is the builder for updating a single Session entity.
func (*SessionUpdateOne) AddUserID ¶
func (suo *SessionUpdateOne) AddUserID(u int32) *SessionUpdateOne
AddUserID adds u to the "user_id" field.
func (*SessionUpdateOne) Exec ¶
func (suo *SessionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SessionUpdateOne) ExecX ¶
func (suo *SessionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdateOne) Mutation ¶
func (suo *SessionUpdateOne) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdateOne) Save ¶
func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
Save executes the query and returns the updated Session entity.
func (*SessionUpdateOne) SaveX ¶
func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdateOne) Select ¶
func (suo *SessionUpdateOne) Select(field string, fields ...string) *SessionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SessionUpdateOne) SetCreated ¶
func (suo *SessionUpdateOne) SetCreated(t time.Time) *SessionUpdateOne
SetCreated sets the "created" field.
func (*SessionUpdateOne) SetNillableCreated ¶
func (suo *SessionUpdateOne) SetNillableCreated(t *time.Time) *SessionUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*SessionUpdateOne) SetPeriod ¶
func (suo *SessionUpdateOne) SetPeriod(t time.Time) *SessionUpdateOne
SetPeriod sets the "period" field.
func (*SessionUpdateOne) SetUserID ¶
func (suo *SessionUpdateOne) SetUserID(u uint32) *SessionUpdateOne
SetUserID sets the "user_id" field.
func (*SessionUpdateOne) Where ¶
func (suo *SessionUpdateOne) Where(ps ...predicate.Session) *SessionUpdateOne
Where appends a list predicates to the SessionUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Biography is the client for interacting with the Biography builders. Biography *BiographyClient // Category is the client for interacting with the Category builders. Category *CategoryClient // Contact is the client for interacting with the Contact builders. Contact *ContactClient // ContactDefault is the client for interacting with the ContactDefault builders. ContactDefault *ContactDefaultClient // Link is the client for interacting with the Link builders. Link *LinkClient // Location is the client for interacting with the Location builders. Location *LocationClient // Notice is the client for interacting with the Notice builders. Notice *NoticeClient // Product is the client for interacting with the Product builders. Product *ProductClient // Session is the client for interacting with the Session builders. Session *SessionClient // 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 uint32 `json:"id,omitempty"` // GivenName holds the value of the "given_name" field. GivenName string `json:"given_name,omitempty"` // FamilyName holds the value of the "family_name" field. FamilyName string `json:"family_name,omitempty"` // GivenNameJa holds the value of the "given_name_ja" field. GivenNameJa string `json:"given_name_ja,omitempty"` // FamilyNameJa holds the value of the "family_name_ja" field. FamilyNameJa string `json:"family_name_ja,omitempty"` // UserID holds the value of the "user_id" field. UserID string `json:"user_id,omitempty"` // Mail holds the value of the "mail" field. Mail string `json:"mail,omitempty"` // BirthDate holds the value of the "birth_date" field. BirthDate time.Time `json:"birth_date,omitempty"` // Location holds the value of the "location" field. Location string `json:"location,omitempty"` // LocationJa holds the value of the "location_ja" field. LocationJa string `json:"location_ja,omitempty"` // SSOToken holds the value of the "sso_token" field. SSOToken string `json:"sso_token,omitempty"` // AvatarURL holds the value of the "avatar_url" field. AvatarURL string `json:"avatar_url,omitempty"` // Selected holds the value of the "selected" field. Selected bool `json:"selected,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Modified holds the value of the "modified" field. Modified time.Time `json:"modified,omitempty"` // 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 builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uint32) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id uint32) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for 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 uint32) *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) 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) SetAvatarURL ¶
func (uc *UserCreate) SetAvatarURL(s string) *UserCreate
SetAvatarURL sets the "avatar_url" field.
func (*UserCreate) SetBirthDate ¶
func (uc *UserCreate) SetBirthDate(t time.Time) *UserCreate
SetBirthDate sets the "birth_date" field.
func (*UserCreate) SetCreated ¶
func (uc *UserCreate) SetCreated(t time.Time) *UserCreate
SetCreated sets the "created" field.
func (*UserCreate) SetFamilyName ¶
func (uc *UserCreate) SetFamilyName(s string) *UserCreate
SetFamilyName sets the "family_name" field.
func (*UserCreate) SetFamilyNameJa ¶
func (uc *UserCreate) SetFamilyNameJa(s string) *UserCreate
SetFamilyNameJa sets the "family_name_ja" field.
func (*UserCreate) SetGivenName ¶
func (uc *UserCreate) SetGivenName(s string) *UserCreate
SetGivenName sets the "given_name" field.
func (*UserCreate) SetGivenNameJa ¶
func (uc *UserCreate) SetGivenNameJa(s string) *UserCreate
SetGivenNameJa sets the "given_name_ja" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uint32) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetLocation ¶
func (uc *UserCreate) SetLocation(s string) *UserCreate
SetLocation sets the "location" field.
func (*UserCreate) SetLocationJa ¶
func (uc *UserCreate) SetLocationJa(s string) *UserCreate
SetLocationJa sets the "location_ja" field.
func (*UserCreate) SetMail ¶
func (uc *UserCreate) SetMail(s string) *UserCreate
SetMail sets the "mail" field.
func (*UserCreate) SetModified ¶
func (uc *UserCreate) SetModified(t time.Time) *UserCreate
SetModified sets the "modified" field.
func (*UserCreate) SetNillableAvatarURL ¶
func (uc *UserCreate) SetNillableAvatarURL(s *string) *UserCreate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*UserCreate) SetNillableCreated ¶
func (uc *UserCreate) SetNillableCreated(t *time.Time) *UserCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*UserCreate) SetNillableModified ¶
func (uc *UserCreate) SetNillableModified(t *time.Time) *UserCreate
SetNillableModified sets the "modified" field if the given value is not nil.
func (*UserCreate) SetNillableSelected ¶
func (uc *UserCreate) SetNillableSelected(b *bool) *UserCreate
SetNillableSelected sets the "selected" field if the given value is not nil.
func (*UserCreate) SetSSOToken ¶
func (uc *UserCreate) SetSSOToken(s string) *UserCreate
SetSSOToken sets the "sso_token" field.
func (*UserCreate) SetSelected ¶
func (uc *UserCreate) SetSelected(b bool) *UserCreate
SetSelected sets the "selected" field.
func (*UserCreate) SetUserID ¶
func (uc *UserCreate) SetUserID(s string) *UserCreate
SetUserID sets the "user_id" 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.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) 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) AvatarURL ¶
func (m *UserMutation) AvatarURL() (r string, exists bool)
AvatarURL returns the value of the "avatar_url" field in the mutation.
func (*UserMutation) AvatarURLCleared ¶
func (m *UserMutation) AvatarURLCleared() bool
AvatarURLCleared returns if the "avatar_url" field was cleared in this mutation.
func (*UserMutation) BirthDate ¶
func (m *UserMutation) BirthDate() (r time.Time, exists bool)
BirthDate returns the value of the "birth_date" field in the mutation.
func (*UserMutation) ClearAvatarURL ¶
func (m *UserMutation) ClearAvatarURL()
ClearAvatarURL clears the value of the "avatar_url" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) 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) Created ¶
func (m *UserMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) FamilyName ¶
func (m *UserMutation) FamilyName() (r string, exists bool)
FamilyName returns the value of the "family_name" field in the mutation.
func (*UserMutation) FamilyNameJa ¶
func (m *UserMutation) FamilyNameJa() (r string, exists bool)
FamilyNameJa returns the value of the "family_name_ja" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean 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) GivenName ¶
func (m *UserMutation) GivenName() (r string, exists bool)
GivenName returns the value of the "given_name" field in the mutation.
func (*UserMutation) GivenNameJa ¶
func (m *UserMutation) GivenNameJa() (r string, exists bool)
GivenNameJa returns the value of the "given_name_ja" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uint32, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) Location ¶
func (m *UserMutation) Location() (r string, exists bool)
Location returns the value of the "location" field in the mutation.
func (*UserMutation) LocationJa ¶
func (m *UserMutation) LocationJa() (r string, exists bool)
LocationJa returns the value of the "location_ja" field in the mutation.
func (*UserMutation) Mail ¶
func (m *UserMutation) Mail() (r string, exists bool)
Mail returns the value of the "mail" field in the mutation.
func (*UserMutation) Modified ¶
func (m *UserMutation) Modified() (r time.Time, exists bool)
Modified returns the value of the "modified" field in the mutation.
func (*UserMutation) OldAvatarURL ¶
func (m *UserMutation) OldAvatarURL(ctx context.Context) (v string, err error)
OldAvatarURL returns the old "avatar_url" 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) OldBirthDate ¶
OldBirthDate returns the old "birth_date" 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) OldCreated ¶
OldCreated returns the old "created" 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) OldFamilyName ¶
func (m *UserMutation) OldFamilyName(ctx context.Context) (v string, err error)
OldFamilyName returns the old "family_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) OldFamilyNameJa ¶
func (m *UserMutation) OldFamilyNameJa(ctx context.Context) (v string, err error)
OldFamilyNameJa returns the old "family_name_ja" 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) OldGivenName ¶
func (m *UserMutation) OldGivenName(ctx context.Context) (v string, err error)
OldGivenName returns the old "given_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) OldGivenNameJa ¶
func (m *UserMutation) OldGivenNameJa(ctx context.Context) (v string, err error)
OldGivenNameJa returns the old "given_name_ja" 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) OldLocation ¶
func (m *UserMutation) OldLocation(ctx context.Context) (v string, err error)
OldLocation returns the old "location" 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) OldLocationJa ¶
func (m *UserMutation) OldLocationJa(ctx context.Context) (v string, err error)
OldLocationJa returns the old "location_ja" 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) OldMail ¶
func (m *UserMutation) OldMail(ctx context.Context) (v string, err error)
OldMail returns the old "mail" 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) OldModified ¶
OldModified returns the old "modified" 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) OldSSOToken ¶
func (m *UserMutation) OldSSOToken(ctx context.Context) (v string, err error)
OldSSOToken returns the old "sso_token" 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) OldSelected ¶
func (m *UserMutation) OldSelected(ctx context.Context) (v bool, err error)
OldSelected returns the old "selected" 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) OldUserID ¶
func (m *UserMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" 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) 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) ResetAvatarURL ¶
func (m *UserMutation) ResetAvatarURL()
ResetAvatarURL resets all changes to the "avatar_url" field.
func (*UserMutation) ResetBirthDate ¶
func (m *UserMutation) ResetBirthDate()
ResetBirthDate resets all changes to the "birth_date" field.
func (*UserMutation) ResetCreated ¶
func (m *UserMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetFamilyName ¶
func (m *UserMutation) ResetFamilyName()
ResetFamilyName resets all changes to the "family_name" field.
func (*UserMutation) ResetFamilyNameJa ¶
func (m *UserMutation) ResetFamilyNameJa()
ResetFamilyNameJa resets all changes to the "family_name_ja" field.
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) ResetGivenName ¶
func (m *UserMutation) ResetGivenName()
ResetGivenName resets all changes to the "given_name" field.
func (*UserMutation) ResetGivenNameJa ¶
func (m *UserMutation) ResetGivenNameJa()
ResetGivenNameJa resets all changes to the "given_name_ja" field.
func (*UserMutation) ResetLocation ¶
func (m *UserMutation) ResetLocation()
ResetLocation resets all changes to the "location" field.
func (*UserMutation) ResetLocationJa ¶
func (m *UserMutation) ResetLocationJa()
ResetLocationJa resets all changes to the "location_ja" field.
func (*UserMutation) ResetMail ¶
func (m *UserMutation) ResetMail()
ResetMail resets all changes to the "mail" field.
func (*UserMutation) ResetModified ¶
func (m *UserMutation) ResetModified()
ResetModified resets all changes to the "modified" field.
func (*UserMutation) ResetSSOToken ¶
func (m *UserMutation) ResetSSOToken()
ResetSSOToken resets all changes to the "sso_token" field.
func (*UserMutation) ResetSelected ¶
func (m *UserMutation) ResetSelected()
ResetSelected resets all changes to the "selected" field.
func (*UserMutation) ResetUserID ¶
func (m *UserMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserMutation) SSOToken ¶
func (m *UserMutation) SSOToken() (r string, exists bool)
SSOToken returns the value of the "sso_token" field in the mutation.
func (*UserMutation) Selected ¶
func (m *UserMutation) Selected() (r bool, exists bool)
Selected returns the value of the "selected" field in the mutation.
func (*UserMutation) SetAvatarURL ¶
func (m *UserMutation) SetAvatarURL(s string)
SetAvatarURL sets the "avatar_url" field.
func (*UserMutation) SetBirthDate ¶
func (m *UserMutation) SetBirthDate(t time.Time)
SetBirthDate sets the "birth_date" field.
func (*UserMutation) SetCreated ¶
func (m *UserMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*UserMutation) SetFamilyName ¶
func (m *UserMutation) SetFamilyName(s string)
SetFamilyName sets the "family_name" field.
func (*UserMutation) SetFamilyNameJa ¶
func (m *UserMutation) SetFamilyNameJa(s string)
SetFamilyNameJa sets the "family_name_ja" 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) SetGivenName ¶
func (m *UserMutation) SetGivenName(s string)
SetGivenName sets the "given_name" field.
func (*UserMutation) SetGivenNameJa ¶
func (m *UserMutation) SetGivenNameJa(s string)
SetGivenNameJa sets the "given_name_ja" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetLocation ¶
func (m *UserMutation) SetLocation(s string)
SetLocation sets the "location" field.
func (*UserMutation) SetLocationJa ¶
func (m *UserMutation) SetLocationJa(s string)
SetLocationJa sets the "location_ja" field.
func (*UserMutation) SetMail ¶
func (m *UserMutation) SetMail(s string)
SetMail sets the "mail" field.
func (*UserMutation) SetModified ¶
func (m *UserMutation) SetModified(t time.Time)
SetModified sets the "modified" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetSSOToken ¶
func (m *UserMutation) SetSSOToken(s string)
SetSSOToken sets the "sso_token" field.
func (*UserMutation) SetSelected ¶
func (m *UserMutation) SetSelected(b bool)
SetSelected sets the "selected" field.
func (*UserMutation) SetUserID ¶
func (m *UserMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UserID ¶
func (m *UserMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) 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 { GivenName string `json:"given_name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldGivenName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) 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 { GivenName string `json:"given_name,omitempty"` } client.User.Query(). Select(user.FieldGivenName). Scan(ctx, &v)
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) ClearAvatarURL ¶
func (uu *UserUpdate) ClearAvatarURL() *UserUpdate
ClearAvatarURL clears the value of the "avatar_url" field.
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) 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) SetAvatarURL ¶
func (uu *UserUpdate) SetAvatarURL(s string) *UserUpdate
SetAvatarURL sets the "avatar_url" field.
func (*UserUpdate) SetBirthDate ¶
func (uu *UserUpdate) SetBirthDate(t time.Time) *UserUpdate
SetBirthDate sets the "birth_date" field.
func (*UserUpdate) SetCreated ¶
func (uu *UserUpdate) SetCreated(t time.Time) *UserUpdate
SetCreated sets the "created" field.
func (*UserUpdate) SetFamilyName ¶
func (uu *UserUpdate) SetFamilyName(s string) *UserUpdate
SetFamilyName sets the "family_name" field.
func (*UserUpdate) SetFamilyNameJa ¶
func (uu *UserUpdate) SetFamilyNameJa(s string) *UserUpdate
SetFamilyNameJa sets the "family_name_ja" field.
func (*UserUpdate) SetGivenName ¶
func (uu *UserUpdate) SetGivenName(s string) *UserUpdate
SetGivenName sets the "given_name" field.
func (*UserUpdate) SetGivenNameJa ¶
func (uu *UserUpdate) SetGivenNameJa(s string) *UserUpdate
SetGivenNameJa sets the "given_name_ja" field.
func (*UserUpdate) SetLocation ¶
func (uu *UserUpdate) SetLocation(s string) *UserUpdate
SetLocation sets the "location" field.
func (*UserUpdate) SetLocationJa ¶
func (uu *UserUpdate) SetLocationJa(s string) *UserUpdate
SetLocationJa sets the "location_ja" field.
func (*UserUpdate) SetMail ¶
func (uu *UserUpdate) SetMail(s string) *UserUpdate
SetMail sets the "mail" field.
func (*UserUpdate) SetModified ¶
func (uu *UserUpdate) SetModified(t time.Time) *UserUpdate
SetModified sets the "modified" field.
func (*UserUpdate) SetNillableAvatarURL ¶
func (uu *UserUpdate) SetNillableAvatarURL(s *string) *UserUpdate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*UserUpdate) SetNillableCreated ¶
func (uu *UserUpdate) SetNillableCreated(t *time.Time) *UserUpdate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*UserUpdate) SetNillableSelected ¶
func (uu *UserUpdate) SetNillableSelected(b *bool) *UserUpdate
SetNillableSelected sets the "selected" field if the given value is not nil.
func (*UserUpdate) SetSSOToken ¶
func (uu *UserUpdate) SetSSOToken(s string) *UserUpdate
SetSSOToken sets the "sso_token" field.
func (*UserUpdate) SetSelected ¶
func (uu *UserUpdate) SetSelected(b bool) *UserUpdate
SetSelected sets the "selected" field.
func (*UserUpdate) SetUserID ¶
func (uu *UserUpdate) SetUserID(s string) *UserUpdate
SetUserID sets the "user_id" 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) ClearAvatarURL ¶
func (uuo *UserUpdateOne) ClearAvatarURL() *UserUpdateOne
ClearAvatarURL clears the value of the "avatar_url" field.
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) 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) SetAvatarURL ¶
func (uuo *UserUpdateOne) SetAvatarURL(s string) *UserUpdateOne
SetAvatarURL sets the "avatar_url" field.
func (*UserUpdateOne) SetBirthDate ¶
func (uuo *UserUpdateOne) SetBirthDate(t time.Time) *UserUpdateOne
SetBirthDate sets the "birth_date" field.
func (*UserUpdateOne) SetCreated ¶
func (uuo *UserUpdateOne) SetCreated(t time.Time) *UserUpdateOne
SetCreated sets the "created" field.
func (*UserUpdateOne) SetFamilyName ¶
func (uuo *UserUpdateOne) SetFamilyName(s string) *UserUpdateOne
SetFamilyName sets the "family_name" field.
func (*UserUpdateOne) SetFamilyNameJa ¶
func (uuo *UserUpdateOne) SetFamilyNameJa(s string) *UserUpdateOne
SetFamilyNameJa sets the "family_name_ja" field.
func (*UserUpdateOne) SetGivenName ¶
func (uuo *UserUpdateOne) SetGivenName(s string) *UserUpdateOne
SetGivenName sets the "given_name" field.
func (*UserUpdateOne) SetGivenNameJa ¶
func (uuo *UserUpdateOne) SetGivenNameJa(s string) *UserUpdateOne
SetGivenNameJa sets the "given_name_ja" field.
func (*UserUpdateOne) SetLocation ¶
func (uuo *UserUpdateOne) SetLocation(s string) *UserUpdateOne
SetLocation sets the "location" field.
func (*UserUpdateOne) SetLocationJa ¶
func (uuo *UserUpdateOne) SetLocationJa(s string) *UserUpdateOne
SetLocationJa sets the "location_ja" field.
func (*UserUpdateOne) SetMail ¶
func (uuo *UserUpdateOne) SetMail(s string) *UserUpdateOne
SetMail sets the "mail" field.
func (*UserUpdateOne) SetModified ¶
func (uuo *UserUpdateOne) SetModified(t time.Time) *UserUpdateOne
SetModified sets the "modified" field.
func (*UserUpdateOne) SetNillableAvatarURL ¶
func (uuo *UserUpdateOne) SetNillableAvatarURL(s *string) *UserUpdateOne
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCreated ¶
func (uuo *UserUpdateOne) SetNillableCreated(t *time.Time) *UserUpdateOne
SetNillableCreated sets the "created" field if the given value is not nil.
func (*UserUpdateOne) SetNillableSelected ¶
func (uuo *UserUpdateOne) SetNillableSelected(b *bool) *UserUpdateOne
SetNillableSelected sets the "selected" field if the given value is not nil.
func (*UserUpdateOne) SetSSOToken ¶
func (uuo *UserUpdateOne) SetSSOToken(s string) *UserUpdateOne
SetSSOToken sets the "sso_token" field.
func (*UserUpdateOne) SetSelected ¶
func (uuo *UserUpdateOne) SetSelected(b bool) *UserUpdateOne
SetSelected sets the "selected" field.
func (*UserUpdateOne) SetUserID ¶
func (uuo *UserUpdateOne) SetUserID(s string) *UserUpdateOne
SetUserID sets the "user_id" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- biography.go
- biography_create.go
- biography_delete.go
- biography_query.go
- biography_update.go
- category.go
- category_create.go
- category_delete.go
- category_query.go
- category_update.go
- client.go
- contact.go
- contact_create.go
- contact_delete.go
- contact_query.go
- contact_update.go
- contactdefault.go
- contactdefault_create.go
- contactdefault_delete.go
- contactdefault_query.go
- contactdefault_update.go
- ent.go
- generate.go
- link.go
- link_create.go
- link_delete.go
- link_query.go
- link_update.go
- location.go
- location_create.go
- location_delete.go
- location_query.go
- location_update.go
- mutation.go
- notice.go
- notice_create.go
- notice_delete.go
- notice_query.go
- notice_update.go
- product.go
- product_create.go
- product_delete.go
- product_query.go
- product_update.go
- runtime.go
- session.go
- session_create.go
- session_delete.go
- session_query.go
- session_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go