Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IDToType(ctx context.Context, id pulid.ID) (string, error)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type BillProduct
- func (n *BillProduct) IsNode()
- func (bp *BillProduct) String() string
- func (bp *BillProduct) ToEdge(order *BillProductOrder) *BillProductEdge
- func (bp *BillProduct) Unwrap() *BillProduct
- func (bp *BillProduct) Update() *BillProductUpdateOne
- func (bp *BillProduct) Value(name string) (ent.Value, error)
- type BillProductClient
- func (c *BillProductClient) Create() *BillProductCreate
- func (c *BillProductClient) CreateBulk(builders ...*BillProductCreate) *BillProductCreateBulk
- func (c *BillProductClient) Delete() *BillProductDelete
- func (c *BillProductClient) DeleteOne(bp *BillProduct) *BillProductDeleteOne
- func (c *BillProductClient) DeleteOneID(id pulid.ID) *BillProductDeleteOne
- func (c *BillProductClient) Get(ctx context.Context, id pulid.ID) (*BillProduct, error)
- func (c *BillProductClient) GetX(ctx context.Context, id pulid.ID) *BillProduct
- func (c *BillProductClient) Hooks() []Hook
- func (c *BillProductClient) Intercept(interceptors ...Interceptor)
- func (c *BillProductClient) Interceptors() []Interceptor
- func (c *BillProductClient) Query() *BillProductQuery
- func (c *BillProductClient) Update() *BillProductUpdate
- func (c *BillProductClient) UpdateOne(bp *BillProduct) *BillProductUpdateOne
- func (c *BillProductClient) UpdateOneID(id pulid.ID) *BillProductUpdateOne
- func (c *BillProductClient) Use(hooks ...Hook)
- type BillProductConnection
- type BillProductCreate
- func (bpc *BillProductCreate) Exec(ctx context.Context) error
- func (bpc *BillProductCreate) ExecX(ctx context.Context)
- func (bpc *BillProductCreate) Mutation() *BillProductMutation
- func (bpc *BillProductCreate) Save(ctx context.Context) (*BillProduct, error)
- func (bpc *BillProductCreate) SaveX(ctx context.Context) *BillProduct
- func (bpc *BillProductCreate) SetID(pu pulid.ID) *BillProductCreate
- func (bpc *BillProductCreate) SetName(s string) *BillProductCreate
- func (bpc *BillProductCreate) SetNillableID(pu *pulid.ID) *BillProductCreate
- func (bpc *BillProductCreate) SetQuantity(u uint64) *BillProductCreate
- func (bpc *BillProductCreate) SetSku(s string) *BillProductCreate
- type BillProductCreateBulk
- type BillProductDelete
- type BillProductDeleteOne
- type BillProductEdge
- type BillProductGroupBy
- func (bpgb *BillProductGroupBy) Aggregate(fns ...AggregateFunc) *BillProductGroupBy
- func (s *BillProductGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BillProductGroupBy) BoolX(ctx context.Context) bool
- func (s *BillProductGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BillProductGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BillProductGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BillProductGroupBy) Float64X(ctx context.Context) float64
- func (s *BillProductGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BillProductGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BillProductGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BillProductGroupBy) IntX(ctx context.Context) int
- func (s *BillProductGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BillProductGroupBy) IntsX(ctx context.Context) []int
- func (bpgb *BillProductGroupBy) Scan(ctx context.Context, v any) error
- func (s *BillProductGroupBy) ScanX(ctx context.Context, v any)
- func (s *BillProductGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BillProductGroupBy) StringX(ctx context.Context) string
- func (s *BillProductGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BillProductGroupBy) StringsX(ctx context.Context) []string
- type BillProductMutation
- func (m *BillProductMutation) AddField(name string, value ent.Value) error
- func (m *BillProductMutation) AddQuantity(u int64)
- func (m *BillProductMutation) AddedEdges() []string
- func (m *BillProductMutation) AddedField(name string) (ent.Value, bool)
- func (m *BillProductMutation) AddedFields() []string
- func (m *BillProductMutation) AddedIDs(name string) []ent.Value
- func (m *BillProductMutation) AddedQuantity() (r int64, exists bool)
- func (m *BillProductMutation) ClearEdge(name string) error
- func (m *BillProductMutation) ClearField(name string) error
- func (m *BillProductMutation) ClearedEdges() []string
- func (m *BillProductMutation) ClearedFields() []string
- func (m BillProductMutation) Client() *Client
- func (m *BillProductMutation) EdgeCleared(name string) bool
- func (m *BillProductMutation) Field(name string) (ent.Value, bool)
- func (m *BillProductMutation) FieldCleared(name string) bool
- func (m *BillProductMutation) Fields() []string
- func (m *BillProductMutation) ID() (id pulid.ID, exists bool)
- func (m *BillProductMutation) IDs(ctx context.Context) ([]pulid.ID, error)
- func (m *BillProductMutation) Name() (r string, exists bool)
- func (m *BillProductMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BillProductMutation) OldName(ctx context.Context) (v string, err error)
- func (m *BillProductMutation) OldQuantity(ctx context.Context) (v uint64, err error)
- func (m *BillProductMutation) OldSku(ctx context.Context) (v string, err error)
- func (m *BillProductMutation) Op() Op
- func (m *BillProductMutation) Quantity() (r uint64, exists bool)
- func (m *BillProductMutation) RemovedEdges() []string
- func (m *BillProductMutation) RemovedIDs(name string) []ent.Value
- func (m *BillProductMutation) ResetEdge(name string) error
- func (m *BillProductMutation) ResetField(name string) error
- func (m *BillProductMutation) ResetName()
- func (m *BillProductMutation) ResetQuantity()
- func (m *BillProductMutation) ResetSku()
- func (m *BillProductMutation) SetField(name string, value ent.Value) error
- func (m *BillProductMutation) SetID(id pulid.ID)
- func (m *BillProductMutation) SetName(s string)
- func (m *BillProductMutation) SetOp(op Op)
- func (m *BillProductMutation) SetQuantity(u uint64)
- func (m *BillProductMutation) SetSku(s string)
- func (m *BillProductMutation) Sku() (r string, exists bool)
- func (m BillProductMutation) Tx() (*Tx, error)
- func (m *BillProductMutation) Type() string
- func (m *BillProductMutation) Where(ps ...predicate.BillProduct)
- func (m *BillProductMutation) WhereP(ps ...func(*sql.Selector))
- type BillProductOrder
- type BillProductOrderField
- type BillProductPaginateOption
- type BillProductQuery
- func (bpq *BillProductQuery) Aggregate(fns ...AggregateFunc) *BillProductSelect
- func (bpq *BillProductQuery) All(ctx context.Context) ([]*BillProduct, error)
- func (bpq *BillProductQuery) AllX(ctx context.Context) []*BillProduct
- func (bpq *BillProductQuery) Clone() *BillProductQuery
- func (bp *BillProductQuery) CollectFields(ctx context.Context, satisfies ...string) (*BillProductQuery, error)
- func (bpq *BillProductQuery) Count(ctx context.Context) (int, error)
- func (bpq *BillProductQuery) CountX(ctx context.Context) int
- func (bpq *BillProductQuery) Exist(ctx context.Context) (bool, error)
- func (bpq *BillProductQuery) ExistX(ctx context.Context) bool
- func (bpq *BillProductQuery) First(ctx context.Context) (*BillProduct, error)
- func (bpq *BillProductQuery) FirstID(ctx context.Context) (id pulid.ID, err error)
- func (bpq *BillProductQuery) FirstIDX(ctx context.Context) pulid.ID
- func (bpq *BillProductQuery) FirstX(ctx context.Context) *BillProduct
- func (bpq *BillProductQuery) GroupBy(field string, fields ...string) *BillProductGroupBy
- func (bpq *BillProductQuery) IDs(ctx context.Context) (ids []pulid.ID, err error)
- func (bpq *BillProductQuery) IDsX(ctx context.Context) []pulid.ID
- func (bpq *BillProductQuery) Limit(limit int) *BillProductQuery
- func (bpq *BillProductQuery) Offset(offset int) *BillProductQuery
- func (bpq *BillProductQuery) Only(ctx context.Context) (*BillProduct, error)
- func (bpq *BillProductQuery) OnlyID(ctx context.Context) (id pulid.ID, err error)
- func (bpq *BillProductQuery) OnlyIDX(ctx context.Context) pulid.ID
- func (bpq *BillProductQuery) OnlyX(ctx context.Context) *BillProduct
- func (bpq *BillProductQuery) Order(o ...billproduct.OrderOption) *BillProductQuery
- func (bp *BillProductQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*BillProductConnection, error)
- func (bpq *BillProductQuery) Select(fields ...string) *BillProductSelect
- func (bpq *BillProductQuery) Unique(unique bool) *BillProductQuery
- func (bpq *BillProductQuery) Where(ps ...predicate.BillProduct) *BillProductQuery
- type BillProductSelect
- func (bps *BillProductSelect) Aggregate(fns ...AggregateFunc) *BillProductSelect
- func (s *BillProductSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BillProductSelect) BoolX(ctx context.Context) bool
- func (s *BillProductSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BillProductSelect) BoolsX(ctx context.Context) []bool
- func (s *BillProductSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BillProductSelect) Float64X(ctx context.Context) float64
- func (s *BillProductSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BillProductSelect) Float64sX(ctx context.Context) []float64
- func (s *BillProductSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BillProductSelect) IntX(ctx context.Context) int
- func (s *BillProductSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BillProductSelect) IntsX(ctx context.Context) []int
- func (bps *BillProductSelect) Scan(ctx context.Context, v any) error
- func (s *BillProductSelect) ScanX(ctx context.Context, v any)
- func (s *BillProductSelect) String(ctx context.Context) (_ string, err error)
- func (s *BillProductSelect) StringX(ctx context.Context) string
- func (s *BillProductSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BillProductSelect) StringsX(ctx context.Context) []string
- type BillProductUpdate
- func (bpu *BillProductUpdate) AddQuantity(u int64) *BillProductUpdate
- func (bpu *BillProductUpdate) Exec(ctx context.Context) error
- func (bpu *BillProductUpdate) ExecX(ctx context.Context)
- func (bpu *BillProductUpdate) Mutation() *BillProductMutation
- func (bpu *BillProductUpdate) Save(ctx context.Context) (int, error)
- func (bpu *BillProductUpdate) SaveX(ctx context.Context) int
- func (bpu *BillProductUpdate) SetName(s string) *BillProductUpdate
- func (bpu *BillProductUpdate) SetQuantity(u uint64) *BillProductUpdate
- func (bpu *BillProductUpdate) SetSku(s string) *BillProductUpdate
- func (bpu *BillProductUpdate) Where(ps ...predicate.BillProduct) *BillProductUpdate
- type BillProductUpdateOne
- func (bpuo *BillProductUpdateOne) AddQuantity(u int64) *BillProductUpdateOne
- func (bpuo *BillProductUpdateOne) Exec(ctx context.Context) error
- func (bpuo *BillProductUpdateOne) ExecX(ctx context.Context)
- func (bpuo *BillProductUpdateOne) Mutation() *BillProductMutation
- func (bpuo *BillProductUpdateOne) Save(ctx context.Context) (*BillProduct, error)
- func (bpuo *BillProductUpdateOne) SaveX(ctx context.Context) *BillProduct
- func (bpuo *BillProductUpdateOne) Select(field string, fields ...string) *BillProductUpdateOne
- func (bpuo *BillProductUpdateOne) SetName(s string) *BillProductUpdateOne
- func (bpuo *BillProductUpdateOne) SetQuantity(u uint64) *BillProductUpdateOne
- func (bpuo *BillProductUpdateOne) SetSku(s string) *BillProductUpdateOne
- func (bpuo *BillProductUpdateOne) Where(ps ...predicate.BillProduct) *BillProductUpdateOne
- type BillProductWhereInput
- type BillProducts
- type Categories
- type Category
- func (n *Category) IsNode()
- func (c *Category) NamedSubCategories(name string) ([]*Category, error)
- func (c *Category) NamedTodos(name string) ([]*Todo, error)
- func (c *Category) QuerySubCategories() *CategoryQuery
- func (c *Category) QueryTodos() *TodoQuery
- func (c *Category) String() string
- func (c *Category) SubCategories(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*CategoryConnection, error)
- func (c *Category) ToEdge(order *CategoryOrder) *CategoryEdge
- func (c *Category) Todos(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*TodoConnection, error)
- func (c *Category) Unwrap() *Category
- func (c *Category) Update() *CategoryUpdateOne
- func (c *Category) Value(name string) (ent.Value, error)
- 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 pulid.ID) *CategoryDeleteOne
- func (c *CategoryClient) Get(ctx context.Context, id pulid.ID) (*Category, error)
- func (c *CategoryClient) GetX(ctx context.Context, id pulid.ID) *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) QuerySubCategories(ca *Category) *CategoryQuery
- func (c *CategoryClient) QueryTodos(ca *Category) *TodoQuery
- func (c *CategoryClient) Update() *CategoryUpdate
- func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne
- func (c *CategoryClient) UpdateOneID(id pulid.ID) *CategoryUpdateOne
- func (c *CategoryClient) Use(hooks ...Hook)
- type CategoryConnection
- type CategoryCreate
- func (cc *CategoryCreate) AddSubCategories(c ...*Category) *CategoryCreate
- func (cc *CategoryCreate) AddSubCategoryIDs(ids ...pulid.ID) *CategoryCreate
- func (cc *CategoryCreate) AddTodoIDs(ids ...pulid.ID) *CategoryCreate
- func (cc *CategoryCreate) AddTodos(t ...*Todo) *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) SetConfig(sc *schematype.CategoryConfig) *CategoryCreate
- func (cc *CategoryCreate) SetCount(u uint64) *CategoryCreate
- func (cc *CategoryCreate) SetDuration(t time.Duration) *CategoryCreate
- func (cc *CategoryCreate) SetID(pu pulid.ID) *CategoryCreate
- func (c *CategoryCreate) SetInput(i CreateCategoryInput) *CategoryCreate
- func (cc *CategoryCreate) SetNillableCount(u *uint64) *CategoryCreate
- func (cc *CategoryCreate) SetNillableDuration(t *time.Duration) *CategoryCreate
- func (cc *CategoryCreate) SetNillableID(pu *pulid.ID) *CategoryCreate
- func (cc *CategoryCreate) SetStatus(c category.Status) *CategoryCreate
- func (cc *CategoryCreate) SetStrings(s []string) *CategoryCreate
- func (cc *CategoryCreate) SetText(s string) *CategoryCreate
- type CategoryCreateBulk
- type CategoryDelete
- type CategoryDeleteOne
- type CategoryEdge
- type CategoryEdges
- 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) AddCount(u int64)
- func (m *CategoryMutation) AddDuration(t time.Duration)
- func (m *CategoryMutation) AddField(name string, value ent.Value) error
- func (m *CategoryMutation) AddSubCategoryIDs(ids ...pulid.ID)
- func (m *CategoryMutation) AddTodoIDs(ids ...pulid.ID)
- func (m *CategoryMutation) AddedCount() (r int64, exists bool)
- func (m *CategoryMutation) AddedDuration() (r time.Duration, exists bool)
- 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) AppendStrings(s []string)
- func (m *CategoryMutation) AppendedStrings() ([]string, bool)
- func (m *CategoryMutation) ClearConfig()
- func (m *CategoryMutation) ClearCount()
- func (m *CategoryMutation) ClearDuration()
- func (m *CategoryMutation) ClearEdge(name string) error
- func (m *CategoryMutation) ClearField(name string) error
- func (m *CategoryMutation) ClearStrings()
- func (m *CategoryMutation) ClearSubCategories()
- func (m *CategoryMutation) ClearTodos()
- func (m *CategoryMutation) ClearedEdges() []string
- func (m *CategoryMutation) ClearedFields() []string
- func (m CategoryMutation) Client() *Client
- func (m *CategoryMutation) Config() (r *schematype.CategoryConfig, exists bool)
- func (m *CategoryMutation) ConfigCleared() bool
- func (m *CategoryMutation) Count() (r uint64, exists bool)
- func (m *CategoryMutation) CountCleared() bool
- func (m *CategoryMutation) Duration() (r time.Duration, exists bool)
- func (m *CategoryMutation) DurationCleared() bool
- func (m *CategoryMutation) EdgeCleared(name string) 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 pulid.ID, exists bool)
- func (m *CategoryMutation) IDs(ctx context.Context) ([]pulid.ID, error)
- func (m *CategoryMutation) OldConfig(ctx context.Context) (v *schematype.CategoryConfig, err error)
- func (m *CategoryMutation) OldCount(ctx context.Context) (v uint64, err error)
- func (m *CategoryMutation) OldDuration(ctx context.Context) (v time.Duration, err error)
- func (m *CategoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CategoryMutation) OldStatus(ctx context.Context) (v category.Status, err error)
- func (m *CategoryMutation) OldStrings(ctx context.Context) (v []string, err error)
- func (m *CategoryMutation) OldText(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) Op() Op
- func (m *CategoryMutation) RemoveSubCategoryIDs(ids ...pulid.ID)
- func (m *CategoryMutation) RemoveTodoIDs(ids ...pulid.ID)
- func (m *CategoryMutation) RemovedEdges() []string
- func (m *CategoryMutation) RemovedIDs(name string) []ent.Value
- func (m *CategoryMutation) RemovedSubCategoriesIDs() (ids []pulid.ID)
- func (m *CategoryMutation) RemovedTodosIDs() (ids []pulid.ID)
- func (m *CategoryMutation) ResetConfig()
- func (m *CategoryMutation) ResetCount()
- func (m *CategoryMutation) ResetDuration()
- func (m *CategoryMutation) ResetEdge(name string) error
- func (m *CategoryMutation) ResetField(name string) error
- func (m *CategoryMutation) ResetStatus()
- func (m *CategoryMutation) ResetStrings()
- func (m *CategoryMutation) ResetSubCategories()
- func (m *CategoryMutation) ResetText()
- func (m *CategoryMutation) ResetTodos()
- func (m *CategoryMutation) SetConfig(sc *schematype.CategoryConfig)
- func (m *CategoryMutation) SetCount(u uint64)
- func (m *CategoryMutation) SetDuration(t time.Duration)
- func (m *CategoryMutation) SetField(name string, value ent.Value) error
- func (m *CategoryMutation) SetID(id pulid.ID)
- func (m *CategoryMutation) SetOp(op Op)
- func (m *CategoryMutation) SetStatus(c category.Status)
- func (m *CategoryMutation) SetStrings(s []string)
- func (m *CategoryMutation) SetText(s string)
- func (m *CategoryMutation) Status() (r category.Status, exists bool)
- func (m *CategoryMutation) Strings() (r []string, exists bool)
- func (m *CategoryMutation) StringsCleared() bool
- func (m *CategoryMutation) SubCategoriesCleared() bool
- func (m *CategoryMutation) SubCategoriesIDs() (ids []pulid.ID)
- func (m *CategoryMutation) Text() (r string, exists bool)
- func (m *CategoryMutation) TodosCleared() bool
- func (m *CategoryMutation) TodosIDs() (ids []pulid.ID)
- 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 CategoryOrder
- type CategoryOrderField
- type CategoryPaginateOption
- 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 (c *CategoryQuery) CollectFields(ctx context.Context, satisfies ...string) (*CategoryQuery, error)
- 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 pulid.ID, err error)
- func (cq *CategoryQuery) FirstIDX(ctx context.Context) pulid.ID
- 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 []pulid.ID, err error)
- func (cq *CategoryQuery) IDsX(ctx context.Context) []pulid.ID
- 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 pulid.ID, err error)
- func (cq *CategoryQuery) OnlyIDX(ctx context.Context) pulid.ID
- func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category
- func (cq *CategoryQuery) Order(o ...category.OrderOption) *CategoryQuery
- func (c *CategoryQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*CategoryConnection, error)
- func (cq *CategoryQuery) QuerySubCategories() *CategoryQuery
- func (cq *CategoryQuery) QueryTodos() *TodoQuery
- func (cq *CategoryQuery) Select(fields ...string) *CategorySelect
- func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery
- func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery
- func (cq *CategoryQuery) WithNamedSubCategories(name string, opts ...func(*CategoryQuery)) *CategoryQuery
- func (cq *CategoryQuery) WithNamedTodos(name string, opts ...func(*TodoQuery)) *CategoryQuery
- func (cq *CategoryQuery) WithSubCategories(opts ...func(*CategoryQuery)) *CategoryQuery
- func (cq *CategoryQuery) WithTodos(opts ...func(*TodoQuery)) *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) AddCount(u int64) *CategoryUpdate
- func (cu *CategoryUpdate) AddDuration(t time.Duration) *CategoryUpdate
- func (cu *CategoryUpdate) AddSubCategories(c ...*Category) *CategoryUpdate
- func (cu *CategoryUpdate) AddSubCategoryIDs(ids ...pulid.ID) *CategoryUpdate
- func (cu *CategoryUpdate) AddTodoIDs(ids ...pulid.ID) *CategoryUpdate
- func (cu *CategoryUpdate) AddTodos(t ...*Todo) *CategoryUpdate
- func (cu *CategoryUpdate) AppendStrings(s []string) *CategoryUpdate
- func (cu *CategoryUpdate) ClearConfig() *CategoryUpdate
- func (cu *CategoryUpdate) ClearCount() *CategoryUpdate
- func (cu *CategoryUpdate) ClearDuration() *CategoryUpdate
- func (cu *CategoryUpdate) ClearStrings() *CategoryUpdate
- func (cu *CategoryUpdate) ClearSubCategories() *CategoryUpdate
- func (cu *CategoryUpdate) ClearTodos() *CategoryUpdate
- func (cu *CategoryUpdate) Exec(ctx context.Context) error
- func (cu *CategoryUpdate) ExecX(ctx context.Context)
- func (cu *CategoryUpdate) Mutation() *CategoryMutation
- func (cu *CategoryUpdate) RemoveSubCategories(c ...*Category) *CategoryUpdate
- func (cu *CategoryUpdate) RemoveSubCategoryIDs(ids ...pulid.ID) *CategoryUpdate
- func (cu *CategoryUpdate) RemoveTodoIDs(ids ...pulid.ID) *CategoryUpdate
- func (cu *CategoryUpdate) RemoveTodos(t ...*Todo) *CategoryUpdate
- func (cu *CategoryUpdate) Save(ctx context.Context) (int, error)
- func (cu *CategoryUpdate) SaveX(ctx context.Context) int
- func (cu *CategoryUpdate) SetConfig(sc *schematype.CategoryConfig) *CategoryUpdate
- func (cu *CategoryUpdate) SetCount(u uint64) *CategoryUpdate
- func (cu *CategoryUpdate) SetDuration(t time.Duration) *CategoryUpdate
- func (c *CategoryUpdate) SetInput(i UpdateCategoryInput) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableCount(u *uint64) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableDuration(t *time.Duration) *CategoryUpdate
- func (cu *CategoryUpdate) SetStatus(c category.Status) *CategoryUpdate
- func (cu *CategoryUpdate) SetStrings(s []string) *CategoryUpdate
- func (cu *CategoryUpdate) SetText(s string) *CategoryUpdate
- func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate
- type CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddCount(u int64) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddDuration(t time.Duration) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddSubCategories(c ...*Category) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddSubCategoryIDs(ids ...pulid.ID) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddTodoIDs(ids ...pulid.ID) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddTodos(t ...*Todo) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AppendStrings(s []string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearConfig() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearCount() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearDuration() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearStrings() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearSubCategories() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearTodos() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error
- func (cuo *CategoryUpdateOne) ExecX(ctx context.Context)
- func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation
- func (cuo *CategoryUpdateOne) RemoveSubCategories(c ...*Category) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) RemoveSubCategoryIDs(ids ...pulid.ID) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) RemoveTodoIDs(ids ...pulid.ID) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) RemoveTodos(t ...*Todo) *CategoryUpdateOne
- 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) SetConfig(sc *schematype.CategoryConfig) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetCount(u uint64) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetDuration(t time.Duration) *CategoryUpdateOne
- func (c *CategoryUpdateOne) SetInput(i UpdateCategoryInput) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableCount(u *uint64) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableDuration(t *time.Duration) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetStatus(c category.Status) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetStrings(s []string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetText(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Where(ps ...predicate.Category) *CategoryUpdateOne
- type CategoryWhereInput
- 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) Noder(ctx context.Context, id pulid.ID, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []pulid.ID, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CreateCategoryInput
- type CreateTodoInput
- type CreateUserInput
- type Cursor
- type Friendship
- func (f *Friendship) Friend(ctx context.Context) (*User, error)
- func (n *Friendship) IsNode()
- func (f *Friendship) QueryFriend() *UserQuery
- func (f *Friendship) QueryUser() *UserQuery
- func (f *Friendship) String() string
- func (f *Friendship) ToEdge(order *FriendshipOrder) *FriendshipEdge
- func (f *Friendship) Unwrap() *Friendship
- func (f *Friendship) Update() *FriendshipUpdateOne
- func (f *Friendship) User(ctx context.Context) (*User, error)
- func (f *Friendship) Value(name string) (ent.Value, error)
- type FriendshipClient
- func (c *FriendshipClient) Create() *FriendshipCreate
- func (c *FriendshipClient) CreateBulk(builders ...*FriendshipCreate) *FriendshipCreateBulk
- func (c *FriendshipClient) Delete() *FriendshipDelete
- func (c *FriendshipClient) DeleteOne(f *Friendship) *FriendshipDeleteOne
- func (c *FriendshipClient) DeleteOneID(id pulid.ID) *FriendshipDeleteOne
- func (c *FriendshipClient) Get(ctx context.Context, id pulid.ID) (*Friendship, error)
- func (c *FriendshipClient) GetX(ctx context.Context, id pulid.ID) *Friendship
- func (c *FriendshipClient) Hooks() []Hook
- func (c *FriendshipClient) Intercept(interceptors ...Interceptor)
- func (c *FriendshipClient) Interceptors() []Interceptor
- func (c *FriendshipClient) Query() *FriendshipQuery
- func (c *FriendshipClient) QueryFriend(f *Friendship) *UserQuery
- func (c *FriendshipClient) QueryUser(f *Friendship) *UserQuery
- func (c *FriendshipClient) Update() *FriendshipUpdate
- func (c *FriendshipClient) UpdateOne(f *Friendship) *FriendshipUpdateOne
- func (c *FriendshipClient) UpdateOneID(id pulid.ID) *FriendshipUpdateOne
- func (c *FriendshipClient) Use(hooks ...Hook)
- type FriendshipConnection
- type FriendshipCreate
- func (fc *FriendshipCreate) Exec(ctx context.Context) error
- func (fc *FriendshipCreate) ExecX(ctx context.Context)
- func (fc *FriendshipCreate) Mutation() *FriendshipMutation
- func (fc *FriendshipCreate) Save(ctx context.Context) (*Friendship, error)
- func (fc *FriendshipCreate) SaveX(ctx context.Context) *Friendship
- func (fc *FriendshipCreate) SetCreatedAt(t time.Time) *FriendshipCreate
- func (fc *FriendshipCreate) SetFriend(u *User) *FriendshipCreate
- func (fc *FriendshipCreate) SetFriendID(pu pulid.ID) *FriendshipCreate
- func (fc *FriendshipCreate) SetID(pu pulid.ID) *FriendshipCreate
- func (fc *FriendshipCreate) SetNillableCreatedAt(t *time.Time) *FriendshipCreate
- func (fc *FriendshipCreate) SetNillableID(pu *pulid.ID) *FriendshipCreate
- func (fc *FriendshipCreate) SetUser(u *User) *FriendshipCreate
- func (fc *FriendshipCreate) SetUserID(pu pulid.ID) *FriendshipCreate
- type FriendshipCreateBulk
- type FriendshipDelete
- type FriendshipDeleteOne
- type FriendshipEdge
- type FriendshipEdges
- type FriendshipGroupBy
- func (fgb *FriendshipGroupBy) Aggregate(fns ...AggregateFunc) *FriendshipGroupBy
- func (s *FriendshipGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FriendshipGroupBy) BoolX(ctx context.Context) bool
- func (s *FriendshipGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FriendshipGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FriendshipGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FriendshipGroupBy) Float64X(ctx context.Context) float64
- func (s *FriendshipGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FriendshipGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FriendshipGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FriendshipGroupBy) IntX(ctx context.Context) int
- func (s *FriendshipGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FriendshipGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FriendshipGroupBy) Scan(ctx context.Context, v any) error
- func (s *FriendshipGroupBy) ScanX(ctx context.Context, v any)
- func (s *FriendshipGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FriendshipGroupBy) StringX(ctx context.Context) string
- func (s *FriendshipGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FriendshipGroupBy) StringsX(ctx context.Context) []string
- type FriendshipMutation
- func (m *FriendshipMutation) AddField(name string, value ent.Value) error
- func (m *FriendshipMutation) AddedEdges() []string
- func (m *FriendshipMutation) AddedField(name string) (ent.Value, bool)
- func (m *FriendshipMutation) AddedFields() []string
- func (m *FriendshipMutation) AddedIDs(name string) []ent.Value
- func (m *FriendshipMutation) ClearEdge(name string) error
- func (m *FriendshipMutation) ClearField(name string) error
- func (m *FriendshipMutation) ClearFriend()
- func (m *FriendshipMutation) ClearUser()
- func (m *FriendshipMutation) ClearedEdges() []string
- func (m *FriendshipMutation) ClearedFields() []string
- func (m FriendshipMutation) Client() *Client
- func (m *FriendshipMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FriendshipMutation) EdgeCleared(name string) bool
- func (m *FriendshipMutation) Field(name string) (ent.Value, bool)
- func (m *FriendshipMutation) FieldCleared(name string) bool
- func (m *FriendshipMutation) Fields() []string
- func (m *FriendshipMutation) FriendCleared() bool
- func (m *FriendshipMutation) FriendID() (r pulid.ID, exists bool)
- func (m *FriendshipMutation) FriendIDs() (ids []pulid.ID)
- func (m *FriendshipMutation) ID() (id pulid.ID, exists bool)
- func (m *FriendshipMutation) IDs(ctx context.Context) ([]pulid.ID, error)
- func (m *FriendshipMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FriendshipMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FriendshipMutation) OldFriendID(ctx context.Context) (v pulid.ID, err error)
- func (m *FriendshipMutation) OldUserID(ctx context.Context) (v pulid.ID, err error)
- func (m *FriendshipMutation) Op() Op
- func (m *FriendshipMutation) RemovedEdges() []string
- func (m *FriendshipMutation) RemovedIDs(name string) []ent.Value
- func (m *FriendshipMutation) ResetCreatedAt()
- func (m *FriendshipMutation) ResetEdge(name string) error
- func (m *FriendshipMutation) ResetField(name string) error
- func (m *FriendshipMutation) ResetFriend()
- func (m *FriendshipMutation) ResetFriendID()
- func (m *FriendshipMutation) ResetUser()
- func (m *FriendshipMutation) ResetUserID()
- func (m *FriendshipMutation) SetCreatedAt(t time.Time)
- func (m *FriendshipMutation) SetField(name string, value ent.Value) error
- func (m *FriendshipMutation) SetFriendID(pu pulid.ID)
- func (m *FriendshipMutation) SetID(id pulid.ID)
- func (m *FriendshipMutation) SetOp(op Op)
- func (m *FriendshipMutation) SetUserID(pu pulid.ID)
- func (m FriendshipMutation) Tx() (*Tx, error)
- func (m *FriendshipMutation) Type() string
- func (m *FriendshipMutation) UserCleared() bool
- func (m *FriendshipMutation) UserID() (r pulid.ID, exists bool)
- func (m *FriendshipMutation) UserIDs() (ids []pulid.ID)
- func (m *FriendshipMutation) Where(ps ...predicate.Friendship)
- func (m *FriendshipMutation) WhereP(ps ...func(*sql.Selector))
- type FriendshipOrder
- type FriendshipOrderField
- type FriendshipPaginateOption
- type FriendshipQuery
- func (fq *FriendshipQuery) Aggregate(fns ...AggregateFunc) *FriendshipSelect
- func (fq *FriendshipQuery) All(ctx context.Context) ([]*Friendship, error)
- func (fq *FriendshipQuery) AllX(ctx context.Context) []*Friendship
- func (fq *FriendshipQuery) Clone() *FriendshipQuery
- func (f *FriendshipQuery) CollectFields(ctx context.Context, satisfies ...string) (*FriendshipQuery, error)
- func (fq *FriendshipQuery) Count(ctx context.Context) (int, error)
- func (fq *FriendshipQuery) CountX(ctx context.Context) int
- func (fq *FriendshipQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FriendshipQuery) ExistX(ctx context.Context) bool
- func (fq *FriendshipQuery) First(ctx context.Context) (*Friendship, error)
- func (fq *FriendshipQuery) FirstID(ctx context.Context) (id pulid.ID, err error)
- func (fq *FriendshipQuery) FirstIDX(ctx context.Context) pulid.ID
- func (fq *FriendshipQuery) FirstX(ctx context.Context) *Friendship
- func (fq *FriendshipQuery) GroupBy(field string, fields ...string) *FriendshipGroupBy
- func (fq *FriendshipQuery) IDs(ctx context.Context) (ids []pulid.ID, err error)
- func (fq *FriendshipQuery) IDsX(ctx context.Context) []pulid.ID
- func (fq *FriendshipQuery) Limit(limit int) *FriendshipQuery
- func (fq *FriendshipQuery) Offset(offset int) *FriendshipQuery
- func (fq *FriendshipQuery) Only(ctx context.Context) (*Friendship, error)
- func (fq *FriendshipQuery) OnlyID(ctx context.Context) (id pulid.ID, err error)
- func (fq *FriendshipQuery) OnlyIDX(ctx context.Context) pulid.ID
- func (fq *FriendshipQuery) OnlyX(ctx context.Context) *Friendship
- func (fq *FriendshipQuery) Order(o ...friendship.OrderOption) *FriendshipQuery
- func (f *FriendshipQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*FriendshipConnection, error)
- func (fq *FriendshipQuery) QueryFriend() *UserQuery
- func (fq *FriendshipQuery) QueryUser() *UserQuery
- func (fq *FriendshipQuery) Select(fields ...string) *FriendshipSelect
- func (fq *FriendshipQuery) Unique(unique bool) *FriendshipQuery
- func (fq *FriendshipQuery) Where(ps ...predicate.Friendship) *FriendshipQuery
- func (fq *FriendshipQuery) WithFriend(opts ...func(*UserQuery)) *FriendshipQuery
- func (fq *FriendshipQuery) WithUser(opts ...func(*UserQuery)) *FriendshipQuery
- type FriendshipSelect
- func (fs *FriendshipSelect) Aggregate(fns ...AggregateFunc) *FriendshipSelect
- func (s *FriendshipSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FriendshipSelect) BoolX(ctx context.Context) bool
- func (s *FriendshipSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FriendshipSelect) BoolsX(ctx context.Context) []bool
- func (s *FriendshipSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FriendshipSelect) Float64X(ctx context.Context) float64
- func (s *FriendshipSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FriendshipSelect) Float64sX(ctx context.Context) []float64
- func (s *FriendshipSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FriendshipSelect) IntX(ctx context.Context) int
- func (s *FriendshipSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FriendshipSelect) IntsX(ctx context.Context) []int
- func (fs *FriendshipSelect) Scan(ctx context.Context, v any) error
- func (s *FriendshipSelect) ScanX(ctx context.Context, v any)
- func (s *FriendshipSelect) String(ctx context.Context) (_ string, err error)
- func (s *FriendshipSelect) StringX(ctx context.Context) string
- func (s *FriendshipSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FriendshipSelect) StringsX(ctx context.Context) []string
- type FriendshipUpdate
- func (fu *FriendshipUpdate) ClearFriend() *FriendshipUpdate
- func (fu *FriendshipUpdate) ClearUser() *FriendshipUpdate
- func (fu *FriendshipUpdate) Exec(ctx context.Context) error
- func (fu *FriendshipUpdate) ExecX(ctx context.Context)
- func (fu *FriendshipUpdate) Mutation() *FriendshipMutation
- func (fu *FriendshipUpdate) Save(ctx context.Context) (int, error)
- func (fu *FriendshipUpdate) SaveX(ctx context.Context) int
- func (fu *FriendshipUpdate) SetCreatedAt(t time.Time) *FriendshipUpdate
- func (fu *FriendshipUpdate) SetFriend(u *User) *FriendshipUpdate
- func (fu *FriendshipUpdate) SetFriendID(pu pulid.ID) *FriendshipUpdate
- func (fu *FriendshipUpdate) SetNillableCreatedAt(t *time.Time) *FriendshipUpdate
- func (fu *FriendshipUpdate) SetUser(u *User) *FriendshipUpdate
- func (fu *FriendshipUpdate) SetUserID(pu pulid.ID) *FriendshipUpdate
- func (fu *FriendshipUpdate) Where(ps ...predicate.Friendship) *FriendshipUpdate
- type FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) ClearFriend() *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) ClearUser() *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) Exec(ctx context.Context) error
- func (fuo *FriendshipUpdateOne) ExecX(ctx context.Context)
- func (fuo *FriendshipUpdateOne) Mutation() *FriendshipMutation
- func (fuo *FriendshipUpdateOne) Save(ctx context.Context) (*Friendship, error)
- func (fuo *FriendshipUpdateOne) SaveX(ctx context.Context) *Friendship
- func (fuo *FriendshipUpdateOne) Select(field string, fields ...string) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetCreatedAt(t time.Time) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetFriend(u *User) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetFriendID(pu pulid.ID) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetNillableCreatedAt(t *time.Time) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetUser(u *User) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetUserID(pu pulid.ID) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) Where(ps ...predicate.Friendship) *FriendshipUpdateOne
- type FriendshipWhereInput
- type Friendships
- type Group
- func (n *Group) IsNode()
- func (gr *Group) NamedUsers(name string) ([]*User, error)
- func (gr *Group) QueryUsers() *UserQuery
- func (gr *Group) String() string
- func (gr *Group) ToEdge(order *GroupOrder) *GroupEdge
- func (gr *Group) Unwrap() *Group
- func (gr *Group) Update() *GroupUpdateOne
- func (gr *Group) Users(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*UserConnection, error)
- func (gr *Group) Value(name string) (ent.Value, error)
- type GroupClient
- func (c *GroupClient) Create() *GroupCreate
- func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
- func (c *GroupClient) Delete() *GroupDelete
- func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
- func (c *GroupClient) DeleteOneID(id pulid.ID) *GroupDeleteOne
- func (c *GroupClient) Get(ctx context.Context, id pulid.ID) (*Group, error)
- func (c *GroupClient) GetX(ctx context.Context, id pulid.ID) *Group
- func (c *GroupClient) Hooks() []Hook
- func (c *GroupClient) Intercept(interceptors ...Interceptor)
- func (c *GroupClient) Interceptors() []Interceptor
- func (c *GroupClient) Query() *GroupQuery
- func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
- func (c *GroupClient) Update() *GroupUpdate
- func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
- func (c *GroupClient) UpdateOneID(id pulid.ID) *GroupUpdateOne
- func (c *GroupClient) Use(hooks ...Hook)
- type GroupConnection
- type GroupCreate
- func (gc *GroupCreate) AddUserIDs(ids ...pulid.ID) *GroupCreate
- func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
- func (gc *GroupCreate) Exec(ctx context.Context) error
- func (gc *GroupCreate) ExecX(ctx context.Context)
- func (gc *GroupCreate) Mutation() *GroupMutation
- func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
- func (gc *GroupCreate) SaveX(ctx context.Context) *Group
- func (gc *GroupCreate) SetID(pu pulid.ID) *GroupCreate
- func (gc *GroupCreate) SetName(s string) *GroupCreate
- func (gc *GroupCreate) SetNillableID(pu *pulid.ID) *GroupCreate
- func (gc *GroupCreate) SetNillableName(s *string) *GroupCreate
- type GroupCreateBulk
- type GroupDelete
- type GroupDeleteOne
- type GroupEdge
- type GroupEdges
- type GroupGroupBy
- func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
- func (s *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupGroupBy) IntX(ctx context.Context) int
- func (s *GroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupGroupBy) StringX(ctx context.Context) string
- func (s *GroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupGroupBy) StringsX(ctx context.Context) []string
- type GroupMutation
- func (m *GroupMutation) AddField(name string, value ent.Value) error
- func (m *GroupMutation) AddUserIDs(ids ...pulid.ID)
- func (m *GroupMutation) AddedEdges() []string
- func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupMutation) AddedFields() []string
- func (m *GroupMutation) AddedIDs(name string) []ent.Value
- func (m *GroupMutation) ClearEdge(name string) error
- func (m *GroupMutation) ClearField(name string) error
- func (m *GroupMutation) ClearUsers()
- func (m *GroupMutation) ClearedEdges() []string
- func (m *GroupMutation) ClearedFields() []string
- func (m GroupMutation) Client() *Client
- func (m *GroupMutation) EdgeCleared(name string) bool
- func (m *GroupMutation) Field(name string) (ent.Value, bool)
- func (m *GroupMutation) FieldCleared(name string) bool
- func (m *GroupMutation) Fields() []string
- func (m *GroupMutation) ID() (id pulid.ID, exists bool)
- func (m *GroupMutation) IDs(ctx context.Context) ([]pulid.ID, error)
- func (m *GroupMutation) Name() (r string, exists bool)
- func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroupMutation) Op() Op
- func (m *GroupMutation) RemoveUserIDs(ids ...pulid.ID)
- func (m *GroupMutation) RemovedEdges() []string
- func (m *GroupMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupMutation) RemovedUsersIDs() (ids []pulid.ID)
- func (m *GroupMutation) ResetEdge(name string) error
- func (m *GroupMutation) ResetField(name string) error
- func (m *GroupMutation) ResetName()
- func (m *GroupMutation) ResetUsers()
- func (m *GroupMutation) SetField(name string, value ent.Value) error
- func (m *GroupMutation) SetID(id pulid.ID)
- func (m *GroupMutation) SetName(s string)
- func (m *GroupMutation) SetOp(op Op)
- func (m GroupMutation) Tx() (*Tx, error)
- func (m *GroupMutation) Type() string
- func (m *GroupMutation) UsersCleared() bool
- func (m *GroupMutation) UsersIDs() (ids []pulid.ID)
- func (m *GroupMutation) Where(ps ...predicate.Group)
- func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
- type GroupOrder
- type GroupOrderField
- type GroupPaginateOption
- type GroupQuery
- func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
- func (gq *GroupQuery) AllX(ctx context.Context) []*Group
- func (gq *GroupQuery) Clone() *GroupQuery
- func (gr *GroupQuery) CollectFields(ctx context.Context, satisfies ...string) (*GroupQuery, error)
- func (gq *GroupQuery) Count(ctx context.Context) (int, error)
- func (gq *GroupQuery) CountX(ctx context.Context) int
- func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GroupQuery) ExistX(ctx context.Context) bool
- func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) FirstID(ctx context.Context) (id pulid.ID, err error)
- func (gq *GroupQuery) FirstIDX(ctx context.Context) pulid.ID
- func (gq *GroupQuery) FirstX(ctx context.Context) *Group
- func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
- func (gq *GroupQuery) IDs(ctx context.Context) (ids []pulid.ID, err error)
- func (gq *GroupQuery) IDsX(ctx context.Context) []pulid.ID
- func (gq *GroupQuery) Limit(limit int) *GroupQuery
- func (gq *GroupQuery) Offset(offset int) *GroupQuery
- func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) OnlyID(ctx context.Context) (id pulid.ID, err error)
- func (gq *GroupQuery) OnlyIDX(ctx context.Context) pulid.ID
- func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
- func (gq *GroupQuery) Order(o ...group.OrderOption) *GroupQuery
- func (gr *GroupQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*GroupConnection, error)
- func (gq *GroupQuery) QueryUsers() *UserQuery
- func (gq *GroupQuery) Select(fields ...string) *GroupSelect
- func (gq *GroupQuery) Unique(unique bool) *GroupQuery
- func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
- func (gq *GroupQuery) WithNamedUsers(name string, opts ...func(*UserQuery)) *GroupQuery
- func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
- type GroupSelect
- func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (s *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupSelect) BoolX(ctx context.Context) bool
- func (s *GroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupSelect) BoolsX(ctx context.Context) []bool
- func (s *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupSelect) Float64X(ctx context.Context) float64
- func (s *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupSelect) IntX(ctx context.Context) int
- func (s *GroupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupSelect) IntsX(ctx context.Context) []int
- func (gs *GroupSelect) Scan(ctx context.Context, v any) error
- func (s *GroupSelect) ScanX(ctx context.Context, v any)
- func (s *GroupSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupSelect) StringX(ctx context.Context) string
- func (s *GroupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupSelect) StringsX(ctx context.Context) []string
- type GroupUpdate
- func (gu *GroupUpdate) AddUserIDs(ids ...pulid.ID) *GroupUpdate
- func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) ClearUsers() *GroupUpdate
- func (gu *GroupUpdate) Exec(ctx context.Context) error
- func (gu *GroupUpdate) ExecX(ctx context.Context)
- func (gu *GroupUpdate) Mutation() *GroupMutation
- func (gu *GroupUpdate) RemoveUserIDs(ids ...pulid.ID) *GroupUpdate
- func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
- func (gu *GroupUpdate) SaveX(ctx context.Context) int
- func (gu *GroupUpdate) SetName(s string) *GroupUpdate
- func (gu *GroupUpdate) SetNillableName(s *string) *GroupUpdate
- func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
- type GroupUpdateOne
- func (guo *GroupUpdateOne) AddUserIDs(ids ...pulid.ID) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
- func (guo *GroupUpdateOne) Exec(ctx context.Context) error
- func (guo *GroupUpdateOne) ExecX(ctx context.Context)
- func (guo *GroupUpdateOne) Mutation() *GroupMutation
- func (guo *GroupUpdateOne) RemoveUserIDs(ids ...pulid.ID) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
- func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
- func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableName(s *string) *GroupUpdateOne
- func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
- type GroupWhereInput
- type Groups
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Todo
- func (t *Todo) Category(ctx context.Context) (*Category, error)
- func (t *Todo) Children(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*TodoConnection, error)
- func (n *Todo) IsNode()
- func (t *Todo) NamedChildren(name string) ([]*Todo, error)
- func (t *Todo) Parent(ctx context.Context) (*Todo, error)
- func (t *Todo) QueryCategory() *CategoryQuery
- func (t *Todo) QueryChildren() *TodoQuery
- func (t *Todo) QueryParent() *TodoQuery
- func (t *Todo) QuerySecret() *VerySecretQuery
- func (t *Todo) String() string
- func (t *Todo) ToEdge(order *TodoOrder) *TodoEdge
- func (t *Todo) Unwrap() *Todo
- func (t *Todo) Update() *TodoUpdateOne
- func (t *Todo) Value(name string) (ent.Value, error)
- type TodoClient
- func (c *TodoClient) Create() *TodoCreate
- func (c *TodoClient) CreateBulk(builders ...*TodoCreate) *TodoCreateBulk
- func (c *TodoClient) Delete() *TodoDelete
- func (c *TodoClient) DeleteOne(t *Todo) *TodoDeleteOne
- func (c *TodoClient) DeleteOneID(id pulid.ID) *TodoDeleteOne
- func (c *TodoClient) Get(ctx context.Context, id pulid.ID) (*Todo, error)
- func (c *TodoClient) GetX(ctx context.Context, id pulid.ID) *Todo
- func (c *TodoClient) Hooks() []Hook
- func (c *TodoClient) Intercept(interceptors ...Interceptor)
- func (c *TodoClient) Interceptors() []Interceptor
- func (c *TodoClient) Query() *TodoQuery
- func (c *TodoClient) QueryCategory(t *Todo) *CategoryQuery
- func (c *TodoClient) QueryChildren(t *Todo) *TodoQuery
- func (c *TodoClient) QueryParent(t *Todo) *TodoQuery
- func (c *TodoClient) QuerySecret(t *Todo) *VerySecretQuery
- func (c *TodoClient) Update() *TodoUpdate
- func (c *TodoClient) UpdateOne(t *Todo) *TodoUpdateOne
- func (c *TodoClient) UpdateOneID(id pulid.ID) *TodoUpdateOne
- func (c *TodoClient) Use(hooks ...Hook)
- type TodoConnection
- type TodoCreate
- func (tc *TodoCreate) AddChildIDs(ids ...pulid.ID) *TodoCreate
- func (tc *TodoCreate) AddChildren(t ...*Todo) *TodoCreate
- func (tc *TodoCreate) Exec(ctx context.Context) error
- func (tc *TodoCreate) ExecX(ctx context.Context)
- func (tc *TodoCreate) Mutation() *TodoMutation
- func (tc *TodoCreate) Save(ctx context.Context) (*Todo, error)
- func (tc *TodoCreate) SaveX(ctx context.Context) *Todo
- func (tc *TodoCreate) SetBlob(b []byte) *TodoCreate
- func (tc *TodoCreate) SetCategory(c *Category) *TodoCreate
- func (tc *TodoCreate) SetCategoryID(pu pulid.ID) *TodoCreate
- func (tc *TodoCreate) SetCreatedAt(t time.Time) *TodoCreate
- func (tc *TodoCreate) SetCustom(c []customstruct.Custom) *TodoCreate
- func (tc *TodoCreate) SetCustomp(c []*customstruct.Custom) *TodoCreate
- func (tc *TodoCreate) SetID(pu pulid.ID) *TodoCreate
- func (tc *TodoCreate) SetInit(m map[string]interface{}) *TodoCreate
- func (c *TodoCreate) SetInput(i CreateTodoInput) *TodoCreate
- func (tc *TodoCreate) SetNillableCategoryID(pu *pulid.ID) *TodoCreate
- func (tc *TodoCreate) SetNillableCreatedAt(t *time.Time) *TodoCreate
- func (tc *TodoCreate) SetNillableID(pu *pulid.ID) *TodoCreate
- func (tc *TodoCreate) SetNillableParentID(id *pulid.ID) *TodoCreate
- func (tc *TodoCreate) SetNillablePriority(i *int) *TodoCreate
- func (tc *TodoCreate) SetNillableSecretID(id *pulid.ID) *TodoCreate
- func (tc *TodoCreate) SetParent(t *Todo) *TodoCreate
- func (tc *TodoCreate) SetParentID(id pulid.ID) *TodoCreate
- func (tc *TodoCreate) SetPriority(i int) *TodoCreate
- func (tc *TodoCreate) SetSecret(v *VerySecret) *TodoCreate
- func (tc *TodoCreate) SetSecretID(id pulid.ID) *TodoCreate
- func (tc *TodoCreate) SetStatus(t todo.Status) *TodoCreate
- func (tc *TodoCreate) SetText(s string) *TodoCreate
- type TodoCreateBulk
- type TodoDelete
- type TodoDeleteOne
- type TodoEdge
- type TodoEdges
- type TodoGroupBy
- func (tgb *TodoGroupBy) Aggregate(fns ...AggregateFunc) *TodoGroupBy
- func (s *TodoGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TodoGroupBy) BoolX(ctx context.Context) bool
- func (s *TodoGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TodoGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TodoGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TodoGroupBy) Float64X(ctx context.Context) float64
- func (s *TodoGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TodoGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TodoGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TodoGroupBy) IntX(ctx context.Context) int
- func (s *TodoGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TodoGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TodoGroupBy) Scan(ctx context.Context, v any) error
- func (s *TodoGroupBy) ScanX(ctx context.Context, v any)
- func (s *TodoGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TodoGroupBy) StringX(ctx context.Context) string
- func (s *TodoGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TodoGroupBy) StringsX(ctx context.Context) []string
- type TodoMutation
- func (m *TodoMutation) AddChildIDs(ids ...pulid.ID)
- func (m *TodoMutation) AddField(name string, value ent.Value) error
- func (m *TodoMutation) AddPriority(i int)
- func (m *TodoMutation) AddedEdges() []string
- func (m *TodoMutation) AddedField(name string) (ent.Value, bool)
- func (m *TodoMutation) AddedFields() []string
- func (m *TodoMutation) AddedIDs(name string) []ent.Value
- func (m *TodoMutation) AddedPriority() (r int, exists bool)
- func (m *TodoMutation) AppendCustom(c []customstruct.Custom)
- func (m *TodoMutation) AppendCustomp(c []*customstruct.Custom)
- func (m *TodoMutation) AppendedCustom() ([]customstruct.Custom, bool)
- func (m *TodoMutation) AppendedCustomp() ([]*customstruct.Custom, bool)
- func (m *TodoMutation) Blob() (r []byte, exists bool)
- func (m *TodoMutation) BlobCleared() bool
- func (m *TodoMutation) CategoryCleared() bool
- func (m *TodoMutation) CategoryID() (r pulid.ID, exists bool)
- func (m *TodoMutation) CategoryIDCleared() bool
- func (m *TodoMutation) CategoryIDs() (ids []pulid.ID)
- func (m *TodoMutation) ChildrenCleared() bool
- func (m *TodoMutation) ChildrenIDs() (ids []pulid.ID)
- func (m *TodoMutation) ClearBlob()
- func (m *TodoMutation) ClearCategory()
- func (m *TodoMutation) ClearCategoryID()
- func (m *TodoMutation) ClearChildren()
- func (m *TodoMutation) ClearCustom()
- func (m *TodoMutation) ClearCustomp()
- func (m *TodoMutation) ClearEdge(name string) error
- func (m *TodoMutation) ClearField(name string) error
- func (m *TodoMutation) ClearInit()
- func (m *TodoMutation) ClearParent()
- func (m *TodoMutation) ClearSecret()
- func (m *TodoMutation) ClearedEdges() []string
- func (m *TodoMutation) ClearedFields() []string
- func (m TodoMutation) Client() *Client
- func (m *TodoMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TodoMutation) Custom() (r []customstruct.Custom, exists bool)
- func (m *TodoMutation) CustomCleared() bool
- func (m *TodoMutation) Customp() (r []*customstruct.Custom, exists bool)
- func (m *TodoMutation) CustompCleared() bool
- func (m *TodoMutation) EdgeCleared(name string) bool
- func (m *TodoMutation) Field(name string) (ent.Value, bool)
- func (m *TodoMutation) FieldCleared(name string) bool
- func (m *TodoMutation) Fields() []string
- func (m *TodoMutation) ID() (id pulid.ID, exists bool)
- func (m *TodoMutation) IDs(ctx context.Context) ([]pulid.ID, error)
- func (m *TodoMutation) Init() (r map[string]interface{}, exists bool)
- func (m *TodoMutation) InitCleared() bool
- func (m *TodoMutation) OldBlob(ctx context.Context) (v []byte, err error)
- func (m *TodoMutation) OldCategoryID(ctx context.Context) (v pulid.ID, err error)
- func (m *TodoMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TodoMutation) OldCustom(ctx context.Context) (v []customstruct.Custom, err error)
- func (m *TodoMutation) OldCustomp(ctx context.Context) (v []*customstruct.Custom, err error)
- func (m *TodoMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TodoMutation) OldInit(ctx context.Context) (v map[string]interface{}, err error)
- func (m *TodoMutation) OldPriority(ctx context.Context) (v int, err error)
- func (m *TodoMutation) OldStatus(ctx context.Context) (v todo.Status, err error)
- func (m *TodoMutation) OldText(ctx context.Context) (v string, err error)
- func (m *TodoMutation) Op() Op
- func (m *TodoMutation) ParentCleared() bool
- func (m *TodoMutation) ParentID() (id pulid.ID, exists bool)
- func (m *TodoMutation) ParentIDs() (ids []pulid.ID)
- func (m *TodoMutation) Priority() (r int, exists bool)
- func (m *TodoMutation) RemoveChildIDs(ids ...pulid.ID)
- func (m *TodoMutation) RemovedChildrenIDs() (ids []pulid.ID)
- func (m *TodoMutation) RemovedEdges() []string
- func (m *TodoMutation) RemovedIDs(name string) []ent.Value
- func (m *TodoMutation) ResetBlob()
- func (m *TodoMutation) ResetCategory()
- func (m *TodoMutation) ResetCategoryID()
- func (m *TodoMutation) ResetChildren()
- func (m *TodoMutation) ResetCreatedAt()
- func (m *TodoMutation) ResetCustom()
- func (m *TodoMutation) ResetCustomp()
- func (m *TodoMutation) ResetEdge(name string) error
- func (m *TodoMutation) ResetField(name string) error
- func (m *TodoMutation) ResetInit()
- func (m *TodoMutation) ResetParent()
- func (m *TodoMutation) ResetPriority()
- func (m *TodoMutation) ResetSecret()
- func (m *TodoMutation) ResetStatus()
- func (m *TodoMutation) ResetText()
- func (m *TodoMutation) SecretCleared() bool
- func (m *TodoMutation) SecretID() (id pulid.ID, exists bool)
- func (m *TodoMutation) SecretIDs() (ids []pulid.ID)
- func (m *TodoMutation) SetBlob(b []byte)
- func (m *TodoMutation) SetCategoryID(pu pulid.ID)
- func (m *TodoMutation) SetCreatedAt(t time.Time)
- func (m *TodoMutation) SetCustom(c []customstruct.Custom)
- func (m *TodoMutation) SetCustomp(c []*customstruct.Custom)
- func (m *TodoMutation) SetField(name string, value ent.Value) error
- func (m *TodoMutation) SetID(id pulid.ID)
- func (m *TodoMutation) SetInit(value map[string]interface{})
- func (m *TodoMutation) SetOp(op Op)
- func (m *TodoMutation) SetParentID(id pulid.ID)
- func (m *TodoMutation) SetPriority(i int)
- func (m *TodoMutation) SetSecretID(id pulid.ID)
- func (m *TodoMutation) SetStatus(t todo.Status)
- func (m *TodoMutation) SetText(s string)
- func (m *TodoMutation) Status() (r todo.Status, exists bool)
- func (m *TodoMutation) Text() (r string, exists bool)
- func (m TodoMutation) Tx() (*Tx, error)
- func (m *TodoMutation) Type() string
- func (m *TodoMutation) Where(ps ...predicate.Todo)
- func (m *TodoMutation) WhereP(ps ...func(*sql.Selector))
- type TodoOrder
- type TodoOrderField
- type TodoPaginateOption
- type TodoQuery
- func (tq *TodoQuery) Aggregate(fns ...AggregateFunc) *TodoSelect
- func (tq *TodoQuery) All(ctx context.Context) ([]*Todo, error)
- func (tq *TodoQuery) AllX(ctx context.Context) []*Todo
- func (tq *TodoQuery) Clone() *TodoQuery
- func (t *TodoQuery) CollectFields(ctx context.Context, satisfies ...string) (*TodoQuery, error)
- func (tq *TodoQuery) Count(ctx context.Context) (int, error)
- func (tq *TodoQuery) CountX(ctx context.Context) int
- func (tq *TodoQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TodoQuery) ExistX(ctx context.Context) bool
- func (tq *TodoQuery) First(ctx context.Context) (*Todo, error)
- func (tq *TodoQuery) FirstID(ctx context.Context) (id pulid.ID, err error)
- func (tq *TodoQuery) FirstIDX(ctx context.Context) pulid.ID
- func (tq *TodoQuery) FirstX(ctx context.Context) *Todo
- func (tq *TodoQuery) GroupBy(field string, fields ...string) *TodoGroupBy
- func (tq *TodoQuery) IDs(ctx context.Context) (ids []pulid.ID, err error)
- func (tq *TodoQuery) IDsX(ctx context.Context) []pulid.ID
- func (tq *TodoQuery) Limit(limit int) *TodoQuery
- func (tq *TodoQuery) Offset(offset int) *TodoQuery
- func (tq *TodoQuery) Only(ctx context.Context) (*Todo, error)
- func (tq *TodoQuery) OnlyID(ctx context.Context) (id pulid.ID, err error)
- func (tq *TodoQuery) OnlyIDX(ctx context.Context) pulid.ID
- func (tq *TodoQuery) OnlyX(ctx context.Context) *Todo
- func (tq *TodoQuery) Order(o ...todo.OrderOption) *TodoQuery
- func (t *TodoQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*TodoConnection, error)
- func (tq *TodoQuery) QueryCategory() *CategoryQuery
- func (tq *TodoQuery) QueryChildren() *TodoQuery
- func (tq *TodoQuery) QueryParent() *TodoQuery
- func (tq *TodoQuery) QuerySecret() *VerySecretQuery
- func (tq *TodoQuery) Select(fields ...string) *TodoSelect
- func (tq *TodoQuery) Unique(unique bool) *TodoQuery
- func (tq *TodoQuery) Where(ps ...predicate.Todo) *TodoQuery
- func (tq *TodoQuery) WithCategory(opts ...func(*CategoryQuery)) *TodoQuery
- func (tq *TodoQuery) WithChildren(opts ...func(*TodoQuery)) *TodoQuery
- func (tq *TodoQuery) WithNamedChildren(name string, opts ...func(*TodoQuery)) *TodoQuery
- func (tq *TodoQuery) WithParent(opts ...func(*TodoQuery)) *TodoQuery
- func (tq *TodoQuery) WithSecret(opts ...func(*VerySecretQuery)) *TodoQuery
- type TodoSelect
- func (ts *TodoSelect) Aggregate(fns ...AggregateFunc) *TodoSelect
- func (s *TodoSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TodoSelect) BoolX(ctx context.Context) bool
- func (s *TodoSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TodoSelect) BoolsX(ctx context.Context) []bool
- func (s *TodoSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TodoSelect) Float64X(ctx context.Context) float64
- func (s *TodoSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TodoSelect) Float64sX(ctx context.Context) []float64
- func (s *TodoSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TodoSelect) IntX(ctx context.Context) int
- func (s *TodoSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TodoSelect) IntsX(ctx context.Context) []int
- func (ts *TodoSelect) Scan(ctx context.Context, v any) error
- func (s *TodoSelect) ScanX(ctx context.Context, v any)
- func (s *TodoSelect) String(ctx context.Context) (_ string, err error)
- func (s *TodoSelect) StringX(ctx context.Context) string
- func (s *TodoSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TodoSelect) StringsX(ctx context.Context) []string
- type TodoUpdate
- func (tu *TodoUpdate) AddChildIDs(ids ...pulid.ID) *TodoUpdate
- func (tu *TodoUpdate) AddChildren(t ...*Todo) *TodoUpdate
- func (tu *TodoUpdate) AddPriority(i int) *TodoUpdate
- func (tu *TodoUpdate) AppendCustom(c []customstruct.Custom) *TodoUpdate
- func (tu *TodoUpdate) AppendCustomp(c []*customstruct.Custom) *TodoUpdate
- func (tu *TodoUpdate) ClearBlob() *TodoUpdate
- func (tu *TodoUpdate) ClearChildren() *TodoUpdate
- func (tu *TodoUpdate) ClearCustom() *TodoUpdate
- func (tu *TodoUpdate) ClearCustomp() *TodoUpdate
- func (tu *TodoUpdate) ClearInit() *TodoUpdate
- func (tu *TodoUpdate) ClearParent() *TodoUpdate
- func (tu *TodoUpdate) ClearSecret() *TodoUpdate
- func (tu *TodoUpdate) Exec(ctx context.Context) error
- func (tu *TodoUpdate) ExecX(ctx context.Context)
- func (tu *TodoUpdate) Mutation() *TodoMutation
- func (tu *TodoUpdate) RemoveChildIDs(ids ...pulid.ID) *TodoUpdate
- func (tu *TodoUpdate) RemoveChildren(t ...*Todo) *TodoUpdate
- func (tu *TodoUpdate) Save(ctx context.Context) (int, error)
- func (tu *TodoUpdate) SaveX(ctx context.Context) int
- func (tu *TodoUpdate) SetBlob(b []byte) *TodoUpdate
- func (tu *TodoUpdate) SetCustom(c []customstruct.Custom) *TodoUpdate
- func (tu *TodoUpdate) SetCustomp(c []*customstruct.Custom) *TodoUpdate
- func (tu *TodoUpdate) SetInit(m map[string]interface{}) *TodoUpdate
- func (c *TodoUpdate) SetInput(i UpdateTodoInput) *TodoUpdate
- func (tu *TodoUpdate) SetNillableParentID(id *pulid.ID) *TodoUpdate
- func (tu *TodoUpdate) SetNillablePriority(i *int) *TodoUpdate
- func (tu *TodoUpdate) SetNillableSecretID(id *pulid.ID) *TodoUpdate
- func (tu *TodoUpdate) SetParent(t *Todo) *TodoUpdate
- func (tu *TodoUpdate) SetParentID(id pulid.ID) *TodoUpdate
- func (tu *TodoUpdate) SetPriority(i int) *TodoUpdate
- func (tu *TodoUpdate) SetSecret(v *VerySecret) *TodoUpdate
- func (tu *TodoUpdate) SetSecretID(id pulid.ID) *TodoUpdate
- func (tu *TodoUpdate) SetStatus(t todo.Status) *TodoUpdate
- func (tu *TodoUpdate) SetText(s string) *TodoUpdate
- func (tu *TodoUpdate) Where(ps ...predicate.Todo) *TodoUpdate
- type TodoUpdateOne
- func (tuo *TodoUpdateOne) AddChildIDs(ids ...pulid.ID) *TodoUpdateOne
- func (tuo *TodoUpdateOne) AddChildren(t ...*Todo) *TodoUpdateOne
- func (tuo *TodoUpdateOne) AddPriority(i int) *TodoUpdateOne
- func (tuo *TodoUpdateOne) AppendCustom(c []customstruct.Custom) *TodoUpdateOne
- func (tuo *TodoUpdateOne) AppendCustomp(c []*customstruct.Custom) *TodoUpdateOne
- func (tuo *TodoUpdateOne) ClearBlob() *TodoUpdateOne
- func (tuo *TodoUpdateOne) ClearChildren() *TodoUpdateOne
- func (tuo *TodoUpdateOne) ClearCustom() *TodoUpdateOne
- func (tuo *TodoUpdateOne) ClearCustomp() *TodoUpdateOne
- func (tuo *TodoUpdateOne) ClearInit() *TodoUpdateOne
- func (tuo *TodoUpdateOne) ClearParent() *TodoUpdateOne
- func (tuo *TodoUpdateOne) ClearSecret() *TodoUpdateOne
- func (tuo *TodoUpdateOne) Exec(ctx context.Context) error
- func (tuo *TodoUpdateOne) ExecX(ctx context.Context)
- func (tuo *TodoUpdateOne) Mutation() *TodoMutation
- func (tuo *TodoUpdateOne) RemoveChildIDs(ids ...pulid.ID) *TodoUpdateOne
- func (tuo *TodoUpdateOne) RemoveChildren(t ...*Todo) *TodoUpdateOne
- func (tuo *TodoUpdateOne) Save(ctx context.Context) (*Todo, error)
- func (tuo *TodoUpdateOne) SaveX(ctx context.Context) *Todo
- func (tuo *TodoUpdateOne) Select(field string, fields ...string) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetBlob(b []byte) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetCustom(c []customstruct.Custom) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetCustomp(c []*customstruct.Custom) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetInit(m map[string]interface{}) *TodoUpdateOne
- func (c *TodoUpdateOne) SetInput(i UpdateTodoInput) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetNillableParentID(id *pulid.ID) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetNillablePriority(i *int) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetNillableSecretID(id *pulid.ID) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetParent(t *Todo) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetParentID(id pulid.ID) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetPriority(i int) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetSecret(v *VerySecret) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetSecretID(id pulid.ID) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetStatus(t todo.Status) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetText(s string) *TodoUpdateOne
- func (tuo *TodoUpdateOne) Where(ps ...predicate.Todo) *TodoUpdateOne
- type TodoWhereInput
- type Todos
- type TraverseFunc
- type Traverser
- type Tx
- type UpdateCategoryInput
- type UpdateTodoInput
- type UpdateUserInput
- type User
- func (u *User) Friends(ctx context.Context) (result []*User, err error)
- func (u *User) Friendships(ctx context.Context) (result []*Friendship, err error)
- func (u *User) Groups(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*GroupConnection, error)
- func (n *User) IsNode()
- func (u *User) NamedFriends(name string) ([]*User, error)
- func (u *User) NamedFriendships(name string) ([]*Friendship, error)
- func (u *User) NamedGroups(name string) ([]*Group, error)
- func (u *User) QueryFriends() *UserQuery
- func (u *User) QueryFriendships() *FriendshipQuery
- func (u *User) QueryGroups() *GroupQuery
- func (u *User) String() string
- func (u *User) ToEdge(order *UserOrder) *UserEdge
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- 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 pulid.ID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id pulid.ID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id pulid.ID) *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) QueryFriends(u *User) *UserQuery
- func (c *UserClient) QueryFriendships(u *User) *FriendshipQuery
- func (c *UserClient) QueryGroups(u *User) *GroupQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id pulid.ID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserConnection
- type UserCreate
- func (uc *UserCreate) AddFriendIDs(ids ...pulid.ID) *UserCreate
- func (uc *UserCreate) AddFriends(u ...*User) *UserCreate
- func (uc *UserCreate) AddFriendshipIDs(ids ...pulid.ID) *UserCreate
- func (uc *UserCreate) AddFriendships(f ...*Friendship) *UserCreate
- func (uc *UserCreate) AddGroupIDs(ids ...pulid.ID) *UserCreate
- func (uc *UserCreate) AddGroups(g ...*Group) *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) SetID(pu pulid.ID) *UserCreate
- func (c *UserCreate) SetInput(i CreateUserInput) *UserCreate
- func (uc *UserCreate) SetMetadata(m map[string]interface{}) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableID(pu *pulid.ID) *UserCreate
- func (uc *UserCreate) SetNillableName(s *string) *UserCreate
- func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUsername(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetUsername(u uuid.UUID) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdge
- type UserEdges
- 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) AddFriendIDs(ids ...pulid.ID)
- func (m *UserMutation) AddFriendshipIDs(ids ...pulid.ID)
- func (m *UserMutation) AddGroupIDs(ids ...pulid.ID)
- 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) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearFriends()
- func (m *UserMutation) ClearFriendships()
- func (m *UserMutation) ClearGroups()
- func (m *UserMutation) ClearMetadata()
- func (m *UserMutation) ClearPassword()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FriendsCleared() bool
- func (m *UserMutation) FriendsIDs() (ids []pulid.ID)
- func (m *UserMutation) FriendshipsCleared() bool
- func (m *UserMutation) FriendshipsIDs() (ids []pulid.ID)
- func (m *UserMutation) GroupsCleared() bool
- func (m *UserMutation) GroupsIDs() (ids []pulid.ID)
- func (m *UserMutation) ID() (id pulid.ID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]pulid.ID, error)
- func (m *UserMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *UserMutation) MetadataCleared() bool
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PasswordCleared() bool
- func (m *UserMutation) RemoveFriendIDs(ids ...pulid.ID)
- func (m *UserMutation) RemoveFriendshipIDs(ids ...pulid.ID)
- func (m *UserMutation) RemoveGroupIDs(ids ...pulid.ID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedFriendsIDs() (ids []pulid.ID)
- func (m *UserMutation) RemovedFriendshipsIDs() (ids []pulid.ID)
- func (m *UserMutation) RemovedGroupsIDs() (ids []pulid.ID)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFriends()
- func (m *UserMutation) ResetFriendships()
- func (m *UserMutation) ResetGroups()
- func (m *UserMutation) ResetMetadata()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id pulid.ID)
- func (m *UserMutation) SetMetadata(value map[string]interface{})
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetUsername(u uuid.UUID)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Username() (r uuid.UUID, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserOrder
- type UserOrderField
- type UserPaginateOption
- 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 (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserQuery, error)
- 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 pulid.ID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) pulid.ID
- 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 []pulid.ID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []pulid.ID
- 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 pulid.ID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) pulid.ID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (u *UserQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*UserConnection, error)
- func (uq *UserQuery) QueryFriends() *UserQuery
- func (uq *UserQuery) QueryFriendships() *FriendshipQuery
- func (uq *UserQuery) QueryGroups() *GroupQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithFriends(opts ...func(*UserQuery)) *UserQuery
- func (uq *UserQuery) WithFriendships(opts ...func(*FriendshipQuery)) *UserQuery
- func (uq *UserQuery) WithGroups(opts ...func(*GroupQuery)) *UserQuery
- func (uq *UserQuery) WithNamedFriends(name string, opts ...func(*UserQuery)) *UserQuery
- func (uq *UserQuery) WithNamedFriendships(name string, opts ...func(*FriendshipQuery)) *UserQuery
- func (uq *UserQuery) WithNamedGroups(name string, opts ...func(*GroupQuery)) *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) AddFriendIDs(ids ...pulid.ID) *UserUpdate
- func (uu *UserUpdate) AddFriends(u ...*User) *UserUpdate
- func (uu *UserUpdate) AddFriendshipIDs(ids ...pulid.ID) *UserUpdate
- func (uu *UserUpdate) AddFriendships(f ...*Friendship) *UserUpdate
- func (uu *UserUpdate) AddGroupIDs(ids ...pulid.ID) *UserUpdate
- func (uu *UserUpdate) AddGroups(g ...*Group) *UserUpdate
- func (uu *UserUpdate) ClearFriends() *UserUpdate
- func (uu *UserUpdate) ClearFriendships() *UserUpdate
- func (uu *UserUpdate) ClearGroups() *UserUpdate
- func (uu *UserUpdate) ClearMetadata() *UserUpdate
- func (uu *UserUpdate) ClearPassword() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveFriendIDs(ids ...pulid.ID) *UserUpdate
- func (uu *UserUpdate) RemoveFriends(u ...*User) *UserUpdate
- func (uu *UserUpdate) RemoveFriendshipIDs(ids ...pulid.ID) *UserUpdate
- func (uu *UserUpdate) RemoveFriendships(f ...*Friendship) *UserUpdate
- func (uu *UserUpdate) RemoveGroupIDs(ids ...pulid.ID) *UserUpdate
- func (uu *UserUpdate) RemoveGroups(g ...*Group) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (c *UserUpdate) SetInput(i UpdateUserInput) *UserUpdate
- func (uu *UserUpdate) SetMetadata(m map[string]interface{}) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUsername(u *uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetUsername(u uuid.UUID) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddFriendIDs(ids ...pulid.ID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFriends(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFriendshipIDs(ids ...pulid.ID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFriendships(f ...*Friendship) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroupIDs(ids ...pulid.ID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroups(g ...*Group) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFriends() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFriendships() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMetadata() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveFriendIDs(ids ...pulid.ID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFriends(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFriendshipIDs(ids ...pulid.ID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFriendships(f ...*Friendship) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...pulid.ID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (c *UserUpdateOne) SetInput(i UpdateUserInput) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMetadata(m map[string]interface{}) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUsername(u *uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(u uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserWhereInput
- type Users
- type ValidationError
- type Value
- type VerySecret
- type VerySecretClient
- func (c *VerySecretClient) Create() *VerySecretCreate
- func (c *VerySecretClient) CreateBulk(builders ...*VerySecretCreate) *VerySecretCreateBulk
- func (c *VerySecretClient) Delete() *VerySecretDelete
- func (c *VerySecretClient) DeleteOne(vs *VerySecret) *VerySecretDeleteOne
- func (c *VerySecretClient) DeleteOneID(id pulid.ID) *VerySecretDeleteOne
- func (c *VerySecretClient) Get(ctx context.Context, id pulid.ID) (*VerySecret, error)
- func (c *VerySecretClient) GetX(ctx context.Context, id pulid.ID) *VerySecret
- func (c *VerySecretClient) Hooks() []Hook
- func (c *VerySecretClient) Intercept(interceptors ...Interceptor)
- func (c *VerySecretClient) Interceptors() []Interceptor
- func (c *VerySecretClient) Query() *VerySecretQuery
- func (c *VerySecretClient) Update() *VerySecretUpdate
- func (c *VerySecretClient) UpdateOne(vs *VerySecret) *VerySecretUpdateOne
- func (c *VerySecretClient) UpdateOneID(id pulid.ID) *VerySecretUpdateOne
- func (c *VerySecretClient) Use(hooks ...Hook)
- type VerySecretCreate
- func (vsc *VerySecretCreate) Exec(ctx context.Context) error
- func (vsc *VerySecretCreate) ExecX(ctx context.Context)
- func (vsc *VerySecretCreate) Mutation() *VerySecretMutation
- func (vsc *VerySecretCreate) Save(ctx context.Context) (*VerySecret, error)
- func (vsc *VerySecretCreate) SaveX(ctx context.Context) *VerySecret
- func (vsc *VerySecretCreate) SetID(pu pulid.ID) *VerySecretCreate
- func (vsc *VerySecretCreate) SetNillableID(pu *pulid.ID) *VerySecretCreate
- func (vsc *VerySecretCreate) SetPassword(s string) *VerySecretCreate
- type VerySecretCreateBulk
- type VerySecretDelete
- type VerySecretDeleteOne
- type VerySecretGroupBy
- func (vsgb *VerySecretGroupBy) Aggregate(fns ...AggregateFunc) *VerySecretGroupBy
- func (s *VerySecretGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *VerySecretGroupBy) BoolX(ctx context.Context) bool
- func (s *VerySecretGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *VerySecretGroupBy) BoolsX(ctx context.Context) []bool
- func (s *VerySecretGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *VerySecretGroupBy) Float64X(ctx context.Context) float64
- func (s *VerySecretGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *VerySecretGroupBy) Float64sX(ctx context.Context) []float64
- func (s *VerySecretGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *VerySecretGroupBy) IntX(ctx context.Context) int
- func (s *VerySecretGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *VerySecretGroupBy) IntsX(ctx context.Context) []int
- func (vsgb *VerySecretGroupBy) Scan(ctx context.Context, v any) error
- func (s *VerySecretGroupBy) ScanX(ctx context.Context, v any)
- func (s *VerySecretGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *VerySecretGroupBy) StringX(ctx context.Context) string
- func (s *VerySecretGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *VerySecretGroupBy) StringsX(ctx context.Context) []string
- type VerySecretMutation
- func (m *VerySecretMutation) AddField(name string, value ent.Value) error
- func (m *VerySecretMutation) AddedEdges() []string
- func (m *VerySecretMutation) AddedField(name string) (ent.Value, bool)
- func (m *VerySecretMutation) AddedFields() []string
- func (m *VerySecretMutation) AddedIDs(name string) []ent.Value
- func (m *VerySecretMutation) ClearEdge(name string) error
- func (m *VerySecretMutation) ClearField(name string) error
- func (m *VerySecretMutation) ClearedEdges() []string
- func (m *VerySecretMutation) ClearedFields() []string
- func (m VerySecretMutation) Client() *Client
- func (m *VerySecretMutation) EdgeCleared(name string) bool
- func (m *VerySecretMutation) Field(name string) (ent.Value, bool)
- func (m *VerySecretMutation) FieldCleared(name string) bool
- func (m *VerySecretMutation) Fields() []string
- func (m *VerySecretMutation) ID() (id pulid.ID, exists bool)
- func (m *VerySecretMutation) IDs(ctx context.Context) ([]pulid.ID, error)
- func (m *VerySecretMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *VerySecretMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *VerySecretMutation) Op() Op
- func (m *VerySecretMutation) Password() (r string, exists bool)
- func (m *VerySecretMutation) RemovedEdges() []string
- func (m *VerySecretMutation) RemovedIDs(name string) []ent.Value
- func (m *VerySecretMutation) ResetEdge(name string) error
- func (m *VerySecretMutation) ResetField(name string) error
- func (m *VerySecretMutation) ResetPassword()
- func (m *VerySecretMutation) SetField(name string, value ent.Value) error
- func (m *VerySecretMutation) SetID(id pulid.ID)
- func (m *VerySecretMutation) SetOp(op Op)
- func (m *VerySecretMutation) SetPassword(s string)
- func (m VerySecretMutation) Tx() (*Tx, error)
- func (m *VerySecretMutation) Type() string
- func (m *VerySecretMutation) Where(ps ...predicate.VerySecret)
- func (m *VerySecretMutation) WhereP(ps ...func(*sql.Selector))
- type VerySecretQuery
- func (vsq *VerySecretQuery) Aggregate(fns ...AggregateFunc) *VerySecretSelect
- func (vsq *VerySecretQuery) All(ctx context.Context) ([]*VerySecret, error)
- func (vsq *VerySecretQuery) AllX(ctx context.Context) []*VerySecret
- func (vsq *VerySecretQuery) Clone() *VerySecretQuery
- func (vsq *VerySecretQuery) Count(ctx context.Context) (int, error)
- func (vsq *VerySecretQuery) CountX(ctx context.Context) int
- func (vsq *VerySecretQuery) Exist(ctx context.Context) (bool, error)
- func (vsq *VerySecretQuery) ExistX(ctx context.Context) bool
- func (vsq *VerySecretQuery) First(ctx context.Context) (*VerySecret, error)
- func (vsq *VerySecretQuery) FirstID(ctx context.Context) (id pulid.ID, err error)
- func (vsq *VerySecretQuery) FirstIDX(ctx context.Context) pulid.ID
- func (vsq *VerySecretQuery) FirstX(ctx context.Context) *VerySecret
- func (vsq *VerySecretQuery) GroupBy(field string, fields ...string) *VerySecretGroupBy
- func (vsq *VerySecretQuery) IDs(ctx context.Context) (ids []pulid.ID, err error)
- func (vsq *VerySecretQuery) IDsX(ctx context.Context) []pulid.ID
- func (vsq *VerySecretQuery) Limit(limit int) *VerySecretQuery
- func (vsq *VerySecretQuery) Offset(offset int) *VerySecretQuery
- func (vsq *VerySecretQuery) Only(ctx context.Context) (*VerySecret, error)
- func (vsq *VerySecretQuery) OnlyID(ctx context.Context) (id pulid.ID, err error)
- func (vsq *VerySecretQuery) OnlyIDX(ctx context.Context) pulid.ID
- func (vsq *VerySecretQuery) OnlyX(ctx context.Context) *VerySecret
- func (vsq *VerySecretQuery) Order(o ...verysecret.OrderOption) *VerySecretQuery
- func (vsq *VerySecretQuery) Select(fields ...string) *VerySecretSelect
- func (vsq *VerySecretQuery) Unique(unique bool) *VerySecretQuery
- func (vsq *VerySecretQuery) Where(ps ...predicate.VerySecret) *VerySecretQuery
- type VerySecretSelect
- func (vss *VerySecretSelect) Aggregate(fns ...AggregateFunc) *VerySecretSelect
- func (s *VerySecretSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *VerySecretSelect) BoolX(ctx context.Context) bool
- func (s *VerySecretSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *VerySecretSelect) BoolsX(ctx context.Context) []bool
- func (s *VerySecretSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *VerySecretSelect) Float64X(ctx context.Context) float64
- func (s *VerySecretSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *VerySecretSelect) Float64sX(ctx context.Context) []float64
- func (s *VerySecretSelect) Int(ctx context.Context) (_ int, err error)
- func (s *VerySecretSelect) IntX(ctx context.Context) int
- func (s *VerySecretSelect) Ints(ctx context.Context) ([]int, error)
- func (s *VerySecretSelect) IntsX(ctx context.Context) []int
- func (vss *VerySecretSelect) Scan(ctx context.Context, v any) error
- func (s *VerySecretSelect) ScanX(ctx context.Context, v any)
- func (s *VerySecretSelect) String(ctx context.Context) (_ string, err error)
- func (s *VerySecretSelect) StringX(ctx context.Context) string
- func (s *VerySecretSelect) Strings(ctx context.Context) ([]string, error)
- func (s *VerySecretSelect) StringsX(ctx context.Context) []string
- type VerySecretUpdate
- func (vsu *VerySecretUpdate) Exec(ctx context.Context) error
- func (vsu *VerySecretUpdate) ExecX(ctx context.Context)
- func (vsu *VerySecretUpdate) Mutation() *VerySecretMutation
- func (vsu *VerySecretUpdate) Save(ctx context.Context) (int, error)
- func (vsu *VerySecretUpdate) SaveX(ctx context.Context) int
- func (vsu *VerySecretUpdate) SetPassword(s string) *VerySecretUpdate
- func (vsu *VerySecretUpdate) Where(ps ...predicate.VerySecret) *VerySecretUpdate
- type VerySecretUpdateOne
- func (vsuo *VerySecretUpdateOne) Exec(ctx context.Context) error
- func (vsuo *VerySecretUpdateOne) ExecX(ctx context.Context)
- func (vsuo *VerySecretUpdateOne) Mutation() *VerySecretMutation
- func (vsuo *VerySecretUpdateOne) Save(ctx context.Context) (*VerySecret, error)
- func (vsuo *VerySecretUpdateOne) SaveX(ctx context.Context) *VerySecret
- func (vsuo *VerySecretUpdateOne) Select(field string, fields ...string) *VerySecretUpdateOne
- func (vsuo *VerySecretUpdateOne) SetPassword(s string) *VerySecretUpdateOne
- func (vsuo *VerySecretUpdateOne) Where(ps ...predicate.VerySecret) *VerySecretUpdateOne
- type VerySecrets
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeBillProduct = "BillProduct" TypeCategory = "Category" TypeFriendship = "Friendship" TypeGroup = "Group" TypeTodo = "Todo" TypeUser = "User" TypeVerySecret = "VerySecret" )
Variables ¶
var ( // CategoryOrderFieldText orders Category by text. CategoryOrderFieldText = &CategoryOrderField{ Value: func(c *Category) (ent.Value, error) { return c.Text, nil }, column: category.FieldText, toTerm: category.ByText, toCursor: func(c *Category) Cursor { return Cursor{ ID: c.ID, Value: c.Text, } }, } // CategoryOrderFieldDuration orders Category by duration. CategoryOrderFieldDuration = &CategoryOrderField{ Value: func(c *Category) (ent.Value, error) { return c.Duration, nil }, column: category.FieldDuration, toTerm: category.ByDuration, toCursor: func(c *Category) Cursor { return Cursor{ ID: c.ID, Value: c.Duration, } }, } // CategoryOrderFieldCount orders Category by count. CategoryOrderFieldCount = &CategoryOrderField{ Value: func(c *Category) (ent.Value, error) { return c.Count, nil }, column: category.FieldCount, toTerm: category.ByCount, toCursor: func(c *Category) Cursor { return Cursor{ ID: c.ID, Value: c.Count, } }, } // CategoryOrderFieldTodosCount orders by TODOS_COUNT. CategoryOrderFieldTodosCount = &CategoryOrderField{ Value: func(c *Category) (ent.Value, error) { return c.Value("todos_count") }, column: "todos_count", toTerm: func(opts ...sql.OrderTermOption) category.OrderOption { return category.ByTodosCount( append(opts, sql.OrderSelectAs("todos_count"))..., ) }, toCursor: func(c *Category) Cursor { cv, _ := c.Value("todos_count") return Cursor{ ID: c.ID, Value: cv, } }, } )
var ( // TodoOrderFieldCreatedAt orders Todo by created_at. TodoOrderFieldCreatedAt = &TodoOrderField{ Value: func(t *Todo) (ent.Value, error) { return t.CreatedAt, nil }, column: todo.FieldCreatedAt, toTerm: todo.ByCreatedAt, toCursor: func(t *Todo) Cursor { return Cursor{ ID: t.ID, Value: t.CreatedAt, } }, } // TodoOrderFieldStatus orders Todo by status. TodoOrderFieldStatus = &TodoOrderField{ Value: func(t *Todo) (ent.Value, error) { return t.Status, nil }, column: todo.FieldStatus, toTerm: todo.ByStatus, toCursor: func(t *Todo) Cursor { return Cursor{ ID: t.ID, Value: t.Status, } }, } // TodoOrderFieldPriority orders Todo by priority. TodoOrderFieldPriority = &TodoOrderField{ Value: func(t *Todo) (ent.Value, error) { return t.Priority, nil }, column: todo.FieldPriority, toTerm: todo.ByPriority, toCursor: func(t *Todo) Cursor { return Cursor{ ID: t.ID, Value: t.Priority, } }, } // TodoOrderFieldText orders Todo by text. TodoOrderFieldText = &TodoOrderField{ Value: func(t *Todo) (ent.Value, error) { return t.Text, nil }, column: todo.FieldText, toTerm: todo.ByText, toCursor: func(t *Todo) Cursor { return Cursor{ ID: t.ID, Value: t.Text, } }, } // TodoOrderFieldParentStatus orders by PARENT_STATUS. TodoOrderFieldParentStatus = &TodoOrderField{ Value: func(t *Todo) (ent.Value, error) { return t.Value("parent_status") }, column: "parent_status", toTerm: func(opts ...sql.OrderTermOption) todo.OrderOption { return todo.ByParentField( todo.FieldStatus, append(opts, sql.OrderSelectAs("parent_status"))..., ) }, toCursor: func(t *Todo) Cursor { cv, _ := t.Value("parent_status") return Cursor{ ID: t.ID, Value: cv, } }, } // TodoOrderFieldChildrenCount orders by CHILDREN_COUNT. TodoOrderFieldChildrenCount = &TodoOrderField{ Value: func(t *Todo) (ent.Value, error) { return t.Value("children_count") }, column: "children_count", toTerm: func(opts ...sql.OrderTermOption) todo.OrderOption { return todo.ByChildrenCount( append(opts, sql.OrderSelectAs("children_count"))..., ) }, toCursor: func(t *Todo) Cursor { cv, _ := t.Value("children_count") return Cursor{ ID: t.ID, Value: cv, } }, } // CategoryOrderFieldCategoryText orders by CATEGORY_TEXT. CategoryOrderFieldCategoryText = &TodoOrderField{ Value: func(t *Todo) (ent.Value, error) { return t.Value("category_text") }, column: "category_text", toTerm: func(opts ...sql.OrderTermOption) todo.OrderOption { return todo.ByCategoryField( category.FieldText, append(opts, sql.OrderSelectAs("category_text"))..., ) }, toCursor: func(t *Todo) Cursor { cv, _ := t.Value("category_text") return Cursor{ ID: t.ID, Value: cv, } }, } )
var DefaultBillProductOrder = &BillProductOrder{ Direction: entgql.OrderDirectionAsc, Field: &BillProductOrderField{ Value: func(bp *BillProduct) (ent.Value, error) { return bp.ID, nil }, column: billproduct.FieldID, toTerm: billproduct.ByID, toCursor: func(bp *BillProduct) Cursor { return Cursor{ID: bp.ID} }, }, }
DefaultBillProductOrder is the default ordering of BillProduct.
var DefaultCategoryOrder = &CategoryOrder{ Direction: entgql.OrderDirectionAsc, Field: &CategoryOrderField{ Value: func(c *Category) (ent.Value, error) { return c.ID, nil }, column: category.FieldID, toTerm: category.ByID, toCursor: func(c *Category) Cursor { return Cursor{ID: c.ID} }, }, }
DefaultCategoryOrder is the default ordering of Category.
var DefaultFriendshipOrder = &FriendshipOrder{ Direction: entgql.OrderDirectionAsc, Field: &FriendshipOrderField{ Value: func(f *Friendship) (ent.Value, error) { return f.ID, nil }, column: friendship.FieldID, toTerm: friendship.ByID, toCursor: func(f *Friendship) Cursor { return Cursor{ID: f.ID} }, }, }
DefaultFriendshipOrder is the default ordering of Friendship.
var DefaultGroupOrder = &GroupOrder{ Direction: entgql.OrderDirectionAsc, Field: &GroupOrderField{ Value: func(gr *Group) (ent.Value, error) { return gr.ID, nil }, column: group.FieldID, toTerm: group.ByID, toCursor: func(gr *Group) Cursor { return Cursor{ID: gr.ID} }, }, }
DefaultGroupOrder is the default ordering of Group.
var DefaultTodoOrder = &TodoOrder{ Direction: entgql.OrderDirectionAsc, Field: &TodoOrderField{ Value: func(t *Todo) (ent.Value, error) { return t.ID, nil }, column: todo.FieldID, toTerm: todo.ByID, toCursor: func(t *Todo) Cursor { return Cursor{ID: t.ID} }, }, }
DefaultTodoOrder is the default ordering of Todo.
var DefaultUserOrder = &UserOrder{ Direction: entgql.OrderDirectionAsc, Field: &UserOrderField{ Value: func(u *User) (ent.Value, error) { return u.ID, nil }, column: user.FieldID, toTerm: user.ByID, toCursor: func(u *User) Cursor { return Cursor{ID: u.ID} }, }, }
DefaultUserOrder is the default ordering of User.
var ErrEmptyBillProductWhereInput = errors.New("ent: empty predicate BillProductWhereInput")
ErrEmptyBillProductWhereInput is returned in case the BillProductWhereInput is empty.
var ErrEmptyCategoryWhereInput = errors.New("ent: empty predicate CategoryWhereInput")
ErrEmptyCategoryWhereInput is returned in case the CategoryWhereInput is empty.
var ErrEmptyFriendshipWhereInput = errors.New("ent: empty predicate FriendshipWhereInput")
ErrEmptyFriendshipWhereInput is returned in case the FriendshipWhereInput is empty.
var ErrEmptyGroupWhereInput = errors.New("ent: empty predicate GroupWhereInput")
ErrEmptyGroupWhereInput is returned in case the GroupWhereInput is empty.
var ErrEmptyTodoWhereInput = errors.New("ent: empty predicate TodoWhereInput")
ErrEmptyTodoWhereInput is returned in case the TodoWhereInput is empty.
var ErrEmptyUserWhereInput = errors.New("ent: empty predicate UserWhereInput")
ErrEmptyUserWhereInput is returned in case the UserWhereInput is empty.
var ( // UserOrderFieldGroupsCount orders by GROUPS_COUNT. UserOrderFieldGroupsCount = &UserOrderField{ Value: func(u *User) (ent.Value, error) { return u.Value("groups_count") }, column: "groups_count", toTerm: func(opts ...sql.OrderTermOption) user.OrderOption { return user.ByGroupsCount( append(opts, sql.OrderSelectAs("groups_count"))..., ) }, toCursor: func(u *User) Cursor { cv, _ := u.Value("groups_count") return Cursor{ ID: u.ID, Value: cv, } }, } )
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.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx 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 BillProduct ¶ added in v0.3.4
type BillProduct struct { // ID of the ent. ID pulid.ID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Sku holds the value of the "sku" field. Sku string `json:"sku,omitempty"` // Quantity holds the value of the "quantity" field. Quantity uint64 `json:"quantity,omitempty"` // contains filtered or unexported fields }
BillProduct is the model entity for the BillProduct schema.
func (*BillProduct) IsNode ¶ added in v0.3.5
func (n *BillProduct) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*BillProduct) String ¶ added in v0.3.4
func (bp *BillProduct) String() string
String implements the fmt.Stringer.
func (*BillProduct) ToEdge ¶ added in v0.3.4
func (bp *BillProduct) ToEdge(order *BillProductOrder) *BillProductEdge
ToEdge converts BillProduct into BillProductEdge.
func (*BillProduct) Unwrap ¶ added in v0.3.4
func (bp *BillProduct) Unwrap() *BillProduct
Unwrap unwraps the BillProduct 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 (*BillProduct) Update ¶ added in v0.3.4
func (bp *BillProduct) Update() *BillProductUpdateOne
Update returns a builder for updating this BillProduct. Note that you need to call BillProduct.Unwrap() before calling this method if this BillProduct was returned from a transaction, and the transaction was committed or rolled back.
type BillProductClient ¶ added in v0.3.4
type BillProductClient struct {
// contains filtered or unexported fields
}
BillProductClient is a client for the BillProduct schema.
func NewBillProductClient ¶ added in v0.3.4
func NewBillProductClient(c config) *BillProductClient
NewBillProductClient returns a client for the BillProduct from the given config.
func (*BillProductClient) Create ¶ added in v0.3.4
func (c *BillProductClient) Create() *BillProductCreate
Create returns a builder for creating a BillProduct entity.
func (*BillProductClient) CreateBulk ¶ added in v0.3.4
func (c *BillProductClient) CreateBulk(builders ...*BillProductCreate) *BillProductCreateBulk
CreateBulk returns a builder for creating a bulk of BillProduct entities.
func (*BillProductClient) Delete ¶ added in v0.3.4
func (c *BillProductClient) Delete() *BillProductDelete
Delete returns a delete builder for BillProduct.
func (*BillProductClient) DeleteOne ¶ added in v0.3.4
func (c *BillProductClient) DeleteOne(bp *BillProduct) *BillProductDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BillProductClient) DeleteOneID ¶ added in v0.3.4
func (c *BillProductClient) DeleteOneID(id pulid.ID) *BillProductDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BillProductClient) Get ¶ added in v0.3.4
func (c *BillProductClient) Get(ctx context.Context, id pulid.ID) (*BillProduct, error)
Get returns a BillProduct entity by its id.
func (*BillProductClient) GetX ¶ added in v0.3.4
func (c *BillProductClient) GetX(ctx context.Context, id pulid.ID) *BillProduct
GetX is like Get, but panics if an error occurs.
func (*BillProductClient) Hooks ¶ added in v0.3.4
func (c *BillProductClient) Hooks() []Hook
Hooks returns the client hooks.
func (*BillProductClient) Intercept ¶ added in v0.3.5
func (c *BillProductClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `billproduct.Intercept(f(g(h())))`.
func (*BillProductClient) Interceptors ¶ added in v0.3.5
func (c *BillProductClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BillProductClient) Query ¶ added in v0.3.4
func (c *BillProductClient) Query() *BillProductQuery
Query returns a query builder for BillProduct.
func (*BillProductClient) Update ¶ added in v0.3.4
func (c *BillProductClient) Update() *BillProductUpdate
Update returns an update builder for BillProduct.
func (*BillProductClient) UpdateOne ¶ added in v0.3.4
func (c *BillProductClient) UpdateOne(bp *BillProduct) *BillProductUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BillProductClient) UpdateOneID ¶ added in v0.3.4
func (c *BillProductClient) UpdateOneID(id pulid.ID) *BillProductUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BillProductClient) Use ¶ added in v0.3.4
func (c *BillProductClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `billproduct.Hooks(f(g(h())))`.
type BillProductConnection ¶ added in v0.3.4
type BillProductConnection struct { Edges []*BillProductEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
BillProductConnection is the connection containing edges to BillProduct.
type BillProductCreate ¶ added in v0.3.4
type BillProductCreate struct {
// contains filtered or unexported fields
}
BillProductCreate is the builder for creating a BillProduct entity.
func (*BillProductCreate) Exec ¶ added in v0.3.4
func (bpc *BillProductCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BillProductCreate) ExecX ¶ added in v0.3.4
func (bpc *BillProductCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillProductCreate) Mutation ¶ added in v0.3.4
func (bpc *BillProductCreate) Mutation() *BillProductMutation
Mutation returns the BillProductMutation object of the builder.
func (*BillProductCreate) Save ¶ added in v0.3.4
func (bpc *BillProductCreate) Save(ctx context.Context) (*BillProduct, error)
Save creates the BillProduct in the database.
func (*BillProductCreate) SaveX ¶ added in v0.3.4
func (bpc *BillProductCreate) SaveX(ctx context.Context) *BillProduct
SaveX calls Save and panics if Save returns an error.
func (*BillProductCreate) SetID ¶ added in v0.3.4
func (bpc *BillProductCreate) SetID(pu pulid.ID) *BillProductCreate
SetID sets the "id" field.
func (*BillProductCreate) SetName ¶ added in v0.3.4
func (bpc *BillProductCreate) SetName(s string) *BillProductCreate
SetName sets the "name" field.
func (*BillProductCreate) SetNillableID ¶ added in v0.3.4
func (bpc *BillProductCreate) SetNillableID(pu *pulid.ID) *BillProductCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*BillProductCreate) SetQuantity ¶ added in v0.3.4
func (bpc *BillProductCreate) SetQuantity(u uint64) *BillProductCreate
SetQuantity sets the "quantity" field.
func (*BillProductCreate) SetSku ¶ added in v0.3.4
func (bpc *BillProductCreate) SetSku(s string) *BillProductCreate
SetSku sets the "sku" field.
type BillProductCreateBulk ¶ added in v0.3.4
type BillProductCreateBulk struct {
// contains filtered or unexported fields
}
BillProductCreateBulk is the builder for creating many BillProduct entities in bulk.
func (*BillProductCreateBulk) Exec ¶ added in v0.3.4
func (bpcb *BillProductCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BillProductCreateBulk) ExecX ¶ added in v0.3.4
func (bpcb *BillProductCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillProductCreateBulk) Save ¶ added in v0.3.4
func (bpcb *BillProductCreateBulk) Save(ctx context.Context) ([]*BillProduct, error)
Save creates the BillProduct entities in the database.
func (*BillProductCreateBulk) SaveX ¶ added in v0.3.4
func (bpcb *BillProductCreateBulk) SaveX(ctx context.Context) []*BillProduct
SaveX is like Save, but panics if an error occurs.
type BillProductDelete ¶ added in v0.3.4
type BillProductDelete struct {
// contains filtered or unexported fields
}
BillProductDelete is the builder for deleting a BillProduct entity.
func (*BillProductDelete) Exec ¶ added in v0.3.4
func (bpd *BillProductDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BillProductDelete) ExecX ¶ added in v0.3.4
func (bpd *BillProductDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BillProductDelete) Where ¶ added in v0.3.4
func (bpd *BillProductDelete) Where(ps ...predicate.BillProduct) *BillProductDelete
Where appends a list predicates to the BillProductDelete builder.
type BillProductDeleteOne ¶ added in v0.3.4
type BillProductDeleteOne struct {
// contains filtered or unexported fields
}
BillProductDeleteOne is the builder for deleting a single BillProduct entity.
func (*BillProductDeleteOne) Exec ¶ added in v0.3.4
func (bpdo *BillProductDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BillProductDeleteOne) ExecX ¶ added in v0.3.4
func (bpdo *BillProductDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillProductDeleteOne) Where ¶ added in v0.4.0
func (bpdo *BillProductDeleteOne) Where(ps ...predicate.BillProduct) *BillProductDeleteOne
Where appends a list predicates to the BillProductDelete builder.
type BillProductEdge ¶ added in v0.3.4
type BillProductEdge struct { Node *BillProduct `json:"node"` Cursor Cursor `json:"cursor"` }
BillProductEdge is the edge representation of BillProduct.
type BillProductGroupBy ¶ added in v0.3.4
type BillProductGroupBy struct {
// contains filtered or unexported fields
}
BillProductGroupBy is the group-by builder for BillProduct entities.
func (*BillProductGroupBy) Aggregate ¶ added in v0.3.4
func (bpgb *BillProductGroupBy) Aggregate(fns ...AggregateFunc) *BillProductGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BillProductGroupBy) Bool ¶ added in v0.3.4
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BillProductGroupBy) BoolX ¶ added in v0.3.4
BoolX is like Bool, but panics if an error occurs.
func (*BillProductGroupBy) Bools ¶ added in v0.3.4
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BillProductGroupBy) BoolsX ¶ added in v0.3.4
BoolsX is like Bools, but panics if an error occurs.
func (*BillProductGroupBy) Float64 ¶ added in v0.3.4
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BillProductGroupBy) Float64X ¶ added in v0.3.4
Float64X is like Float64, but panics if an error occurs.
func (*BillProductGroupBy) Float64s ¶ added in v0.3.4
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BillProductGroupBy) Float64sX ¶ added in v0.3.4
Float64sX is like Float64s, but panics if an error occurs.
func (*BillProductGroupBy) Int ¶ added in v0.3.4
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BillProductGroupBy) Ints ¶ added in v0.3.4
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BillProductGroupBy) IntsX ¶ added in v0.3.4
IntsX is like Ints, but panics if an error occurs.
func (*BillProductGroupBy) Scan ¶ added in v0.3.4
func (bpgb *BillProductGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BillProductGroupBy) ScanX ¶ added in v0.3.4
ScanX is like Scan, but panics if an error occurs.
func (*BillProductGroupBy) String ¶ added in v0.3.4
String returns a single string from a selector. It is only allowed when selecting one field.
func (*BillProductGroupBy) StringX ¶ added in v0.3.4
StringX is like String, but panics if an error occurs.
type BillProductMutation ¶ added in v0.3.4
type BillProductMutation struct {
// contains filtered or unexported fields
}
BillProductMutation represents an operation that mutates the BillProduct nodes in the graph.
func (*BillProductMutation) AddField ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) AddQuantity ¶ added in v0.3.4
func (m *BillProductMutation) AddQuantity(u int64)
AddQuantity adds u to the "quantity" field.
func (*BillProductMutation) AddedEdges ¶ added in v0.3.4
func (m *BillProductMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BillProductMutation) AddedField ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) AddedFields ¶ added in v0.3.4
func (m *BillProductMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BillProductMutation) AddedIDs ¶ added in v0.3.4
func (m *BillProductMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BillProductMutation) AddedQuantity ¶ added in v0.3.4
func (m *BillProductMutation) AddedQuantity() (r int64, exists bool)
AddedQuantity returns the value that was added to the "quantity" field in this mutation.
func (*BillProductMutation) ClearEdge ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) ClearField ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) ClearedEdges ¶ added in v0.3.4
func (m *BillProductMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BillProductMutation) ClearedFields ¶ added in v0.3.4
func (m *BillProductMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BillProductMutation) Client ¶ added in v0.3.4
func (m BillProductMutation) 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 (*BillProductMutation) EdgeCleared ¶ added in v0.3.4
func (m *BillProductMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BillProductMutation) Field ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) FieldCleared ¶ added in v0.3.4
func (m *BillProductMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BillProductMutation) Fields ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) ID ¶ added in v0.3.4
func (m *BillProductMutation) ID() (id pulid.ID, 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 (*BillProductMutation) IDs ¶ added in v0.3.4
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 (*BillProductMutation) Name ¶ added in v0.3.4
func (m *BillProductMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*BillProductMutation) OldField ¶ added in v0.3.4
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 (*BillProductMutation) OldName ¶ added in v0.3.4
func (m *BillProductMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the BillProduct entity. If the BillProduct 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 (*BillProductMutation) OldQuantity ¶ added in v0.3.4
func (m *BillProductMutation) OldQuantity(ctx context.Context) (v uint64, err error)
OldQuantity returns the old "quantity" field's value of the BillProduct entity. If the BillProduct 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 (*BillProductMutation) OldSku ¶ added in v0.3.4
func (m *BillProductMutation) OldSku(ctx context.Context) (v string, err error)
OldSku returns the old "sku" field's value of the BillProduct entity. If the BillProduct 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 (*BillProductMutation) Op ¶ added in v0.3.4
func (m *BillProductMutation) Op() Op
Op returns the operation name.
func (*BillProductMutation) Quantity ¶ added in v0.3.4
func (m *BillProductMutation) Quantity() (r uint64, exists bool)
Quantity returns the value of the "quantity" field in the mutation.
func (*BillProductMutation) RemovedEdges ¶ added in v0.3.4
func (m *BillProductMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BillProductMutation) RemovedIDs ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) ResetEdge ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) ResetField ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) ResetName ¶ added in v0.3.4
func (m *BillProductMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*BillProductMutation) ResetQuantity ¶ added in v0.3.4
func (m *BillProductMutation) ResetQuantity()
ResetQuantity resets all changes to the "quantity" field.
func (*BillProductMutation) ResetSku ¶ added in v0.3.4
func (m *BillProductMutation) ResetSku()
ResetSku resets all changes to the "sku" field.
func (*BillProductMutation) SetField ¶ added in v0.3.4
func (m *BillProductMutation) 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 (*BillProductMutation) SetID ¶ added in v0.3.4
func (m *BillProductMutation) SetID(id pulid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of BillProduct entities.
func (*BillProductMutation) SetName ¶ added in v0.3.4
func (m *BillProductMutation) SetName(s string)
SetName sets the "name" field.
func (*BillProductMutation) SetOp ¶ added in v0.3.5
func (m *BillProductMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BillProductMutation) SetQuantity ¶ added in v0.3.4
func (m *BillProductMutation) SetQuantity(u uint64)
SetQuantity sets the "quantity" field.
func (*BillProductMutation) SetSku ¶ added in v0.3.4
func (m *BillProductMutation) SetSku(s string)
SetSku sets the "sku" field.
func (*BillProductMutation) Sku ¶ added in v0.3.4
func (m *BillProductMutation) Sku() (r string, exists bool)
Sku returns the value of the "sku" field in the mutation.
func (BillProductMutation) Tx ¶ added in v0.3.4
func (m BillProductMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BillProductMutation) Type ¶ added in v0.3.4
func (m *BillProductMutation) Type() string
Type returns the node type of this mutation (BillProduct).
func (*BillProductMutation) Where ¶ added in v0.3.4
func (m *BillProductMutation) Where(ps ...predicate.BillProduct)
Where appends a list predicates to the BillProductMutation builder.
func (*BillProductMutation) WhereP ¶ added in v0.3.5
func (m *BillProductMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BillProductMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BillProductOrder ¶ added in v0.3.4
type BillProductOrder struct { Direction OrderDirection `json:"direction"` Field *BillProductOrderField `json:"field"` }
BillProductOrder defines the ordering of BillProduct.
type BillProductOrderField ¶ added in v0.3.4
type BillProductOrderField struct { // Value extracts the ordering value from the given BillProduct. Value func(*BillProduct) (ent.Value, error) // contains filtered or unexported fields }
BillProductOrderField defines the ordering field of BillProduct.
type BillProductPaginateOption ¶ added in v0.3.4
type BillProductPaginateOption func(*billproductPager) error
BillProductPaginateOption enables pagination customization.
func WithBillProductFilter ¶ added in v0.3.4
func WithBillProductFilter(filter func(*BillProductQuery) (*BillProductQuery, error)) BillProductPaginateOption
WithBillProductFilter configures pagination filter.
func WithBillProductOrder ¶ added in v0.3.4
func WithBillProductOrder(order *BillProductOrder) BillProductPaginateOption
WithBillProductOrder configures pagination ordering.
type BillProductQuery ¶ added in v0.3.4
type BillProductQuery struct {
// contains filtered or unexported fields
}
BillProductQuery is the builder for querying BillProduct entities.
func (*BillProductQuery) Aggregate ¶ added in v0.3.4
func (bpq *BillProductQuery) Aggregate(fns ...AggregateFunc) *BillProductSelect
Aggregate returns a BillProductSelect configured with the given aggregations.
func (*BillProductQuery) All ¶ added in v0.3.4
func (bpq *BillProductQuery) All(ctx context.Context) ([]*BillProduct, error)
All executes the query and returns a list of BillProducts.
func (*BillProductQuery) AllX ¶ added in v0.3.4
func (bpq *BillProductQuery) AllX(ctx context.Context) []*BillProduct
AllX is like All, but panics if an error occurs.
func (*BillProductQuery) Clone ¶ added in v0.3.4
func (bpq *BillProductQuery) Clone() *BillProductQuery
Clone returns a duplicate of the BillProductQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BillProductQuery) CollectFields ¶ added in v0.3.4
func (bp *BillProductQuery) CollectFields(ctx context.Context, satisfies ...string) (*BillProductQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*BillProductQuery) Count ¶ added in v0.3.4
func (bpq *BillProductQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BillProductQuery) CountX ¶ added in v0.3.4
func (bpq *BillProductQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BillProductQuery) Exist ¶ added in v0.3.4
func (bpq *BillProductQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BillProductQuery) ExistX ¶ added in v0.3.4
func (bpq *BillProductQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BillProductQuery) First ¶ added in v0.3.4
func (bpq *BillProductQuery) First(ctx context.Context) (*BillProduct, error)
First returns the first BillProduct entity from the query. Returns a *NotFoundError when no BillProduct was found.
func (*BillProductQuery) FirstID ¶ added in v0.3.4
FirstID returns the first BillProduct ID from the query. Returns a *NotFoundError when no BillProduct ID was found.
func (*BillProductQuery) FirstIDX ¶ added in v0.3.4
func (bpq *BillProductQuery) FirstIDX(ctx context.Context) pulid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*BillProductQuery) FirstX ¶ added in v0.3.4
func (bpq *BillProductQuery) FirstX(ctx context.Context) *BillProduct
FirstX is like First, but panics if an error occurs.
func (*BillProductQuery) GroupBy ¶ added in v0.3.4
func (bpq *BillProductQuery) GroupBy(field string, fields ...string) *BillProductGroupBy
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.BillProduct.Query(). GroupBy(billproduct.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BillProductQuery) IDs ¶ added in v0.3.4
IDs executes the query and returns a list of BillProduct IDs.
func (*BillProductQuery) IDsX ¶ added in v0.3.4
func (bpq *BillProductQuery) IDsX(ctx context.Context) []pulid.ID
IDsX is like IDs, but panics if an error occurs.
func (*BillProductQuery) Limit ¶ added in v0.3.4
func (bpq *BillProductQuery) Limit(limit int) *BillProductQuery
Limit the number of records to be returned by this query.
func (*BillProductQuery) Offset ¶ added in v0.3.4
func (bpq *BillProductQuery) Offset(offset int) *BillProductQuery
Offset to start from.
func (*BillProductQuery) Only ¶ added in v0.3.4
func (bpq *BillProductQuery) Only(ctx context.Context) (*BillProduct, error)
Only returns a single BillProduct entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one BillProduct entity is found. Returns a *NotFoundError when no BillProduct entities are found.
func (*BillProductQuery) OnlyID ¶ added in v0.3.4
OnlyID is like Only, but returns the only BillProduct ID in the query. Returns a *NotSingularError when more than one BillProduct ID is found. Returns a *NotFoundError when no entities are found.
func (*BillProductQuery) OnlyIDX ¶ added in v0.3.4
func (bpq *BillProductQuery) OnlyIDX(ctx context.Context) pulid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BillProductQuery) OnlyX ¶ added in v0.3.4
func (bpq *BillProductQuery) OnlyX(ctx context.Context) *BillProduct
OnlyX is like Only, but panics if an error occurs.
func (*BillProductQuery) Order ¶ added in v0.3.4
func (bpq *BillProductQuery) Order(o ...billproduct.OrderOption) *BillProductQuery
Order specifies how the records should be ordered.
func (*BillProductQuery) Paginate ¶ added in v0.3.4
func (bp *BillProductQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...BillProductPaginateOption, ) (*BillProductConnection, error)
Paginate executes the query and returns a relay based cursor connection to BillProduct.
func (*BillProductQuery) Select ¶ added in v0.3.4
func (bpq *BillProductQuery) Select(fields ...string) *BillProductSelect
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.BillProduct.Query(). Select(billproduct.FieldName). Scan(ctx, &v)
func (*BillProductQuery) Unique ¶ added in v0.3.4
func (bpq *BillProductQuery) Unique(unique bool) *BillProductQuery
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 (*BillProductQuery) Where ¶ added in v0.3.4
func (bpq *BillProductQuery) Where(ps ...predicate.BillProduct) *BillProductQuery
Where adds a new predicate for the BillProductQuery builder.
type BillProductSelect ¶ added in v0.3.4
type BillProductSelect struct { *BillProductQuery // contains filtered or unexported fields }
BillProductSelect is the builder for selecting fields of BillProduct entities.
func (*BillProductSelect) Aggregate ¶ added in v0.3.4
func (bps *BillProductSelect) Aggregate(fns ...AggregateFunc) *BillProductSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BillProductSelect) Bool ¶ added in v0.3.4
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BillProductSelect) BoolX ¶ added in v0.3.4
BoolX is like Bool, but panics if an error occurs.
func (*BillProductSelect) Bools ¶ added in v0.3.4
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BillProductSelect) BoolsX ¶ added in v0.3.4
BoolsX is like Bools, but panics if an error occurs.
func (*BillProductSelect) Float64 ¶ added in v0.3.4
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BillProductSelect) Float64X ¶ added in v0.3.4
Float64X is like Float64, but panics if an error occurs.
func (*BillProductSelect) Float64s ¶ added in v0.3.4
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BillProductSelect) Float64sX ¶ added in v0.3.4
Float64sX is like Float64s, but panics if an error occurs.
func (*BillProductSelect) Int ¶ added in v0.3.4
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BillProductSelect) Ints ¶ added in v0.3.4
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BillProductSelect) IntsX ¶ added in v0.3.4
IntsX is like Ints, but panics if an error occurs.
func (*BillProductSelect) Scan ¶ added in v0.3.4
func (bps *BillProductSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BillProductSelect) ScanX ¶ added in v0.3.4
ScanX is like Scan, but panics if an error occurs.
func (*BillProductSelect) String ¶ added in v0.3.4
String returns a single string from a selector. It is only allowed when selecting one field.
func (*BillProductSelect) StringX ¶ added in v0.3.4
StringX is like String, but panics if an error occurs.
type BillProductUpdate ¶ added in v0.3.4
type BillProductUpdate struct {
// contains filtered or unexported fields
}
BillProductUpdate is the builder for updating BillProduct entities.
func (*BillProductUpdate) AddQuantity ¶ added in v0.3.4
func (bpu *BillProductUpdate) AddQuantity(u int64) *BillProductUpdate
AddQuantity adds u to the "quantity" field.
func (*BillProductUpdate) Exec ¶ added in v0.3.4
func (bpu *BillProductUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BillProductUpdate) ExecX ¶ added in v0.3.4
func (bpu *BillProductUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillProductUpdate) Mutation ¶ added in v0.3.4
func (bpu *BillProductUpdate) Mutation() *BillProductMutation
Mutation returns the BillProductMutation object of the builder.
func (*BillProductUpdate) Save ¶ added in v0.3.4
func (bpu *BillProductUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BillProductUpdate) SaveX ¶ added in v0.3.4
func (bpu *BillProductUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BillProductUpdate) SetName ¶ added in v0.3.4
func (bpu *BillProductUpdate) SetName(s string) *BillProductUpdate
SetName sets the "name" field.
func (*BillProductUpdate) SetQuantity ¶ added in v0.3.4
func (bpu *BillProductUpdate) SetQuantity(u uint64) *BillProductUpdate
SetQuantity sets the "quantity" field.
func (*BillProductUpdate) SetSku ¶ added in v0.3.4
func (bpu *BillProductUpdate) SetSku(s string) *BillProductUpdate
SetSku sets the "sku" field.
func (*BillProductUpdate) Where ¶ added in v0.3.4
func (bpu *BillProductUpdate) Where(ps ...predicate.BillProduct) *BillProductUpdate
Where appends a list predicates to the BillProductUpdate builder.
type BillProductUpdateOne ¶ added in v0.3.4
type BillProductUpdateOne struct {
// contains filtered or unexported fields
}
BillProductUpdateOne is the builder for updating a single BillProduct entity.
func (*BillProductUpdateOne) AddQuantity ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) AddQuantity(u int64) *BillProductUpdateOne
AddQuantity adds u to the "quantity" field.
func (*BillProductUpdateOne) Exec ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BillProductUpdateOne) ExecX ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillProductUpdateOne) Mutation ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) Mutation() *BillProductMutation
Mutation returns the BillProductMutation object of the builder.
func (*BillProductUpdateOne) Save ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) Save(ctx context.Context) (*BillProduct, error)
Save executes the query and returns the updated BillProduct entity.
func (*BillProductUpdateOne) SaveX ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) SaveX(ctx context.Context) *BillProduct
SaveX is like Save, but panics if an error occurs.
func (*BillProductUpdateOne) Select ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) Select(field string, fields ...string) *BillProductUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BillProductUpdateOne) SetName ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) SetName(s string) *BillProductUpdateOne
SetName sets the "name" field.
func (*BillProductUpdateOne) SetQuantity ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) SetQuantity(u uint64) *BillProductUpdateOne
SetQuantity sets the "quantity" field.
func (*BillProductUpdateOne) SetSku ¶ added in v0.3.4
func (bpuo *BillProductUpdateOne) SetSku(s string) *BillProductUpdateOne
SetSku sets the "sku" field.
func (*BillProductUpdateOne) Where ¶ added in v0.4.0
func (bpuo *BillProductUpdateOne) Where(ps ...predicate.BillProduct) *BillProductUpdateOne
Where appends a list predicates to the BillProductUpdate builder.
type BillProductWhereInput ¶ added in v0.3.4
type BillProductWhereInput struct { Predicates []predicate.BillProduct `json:"-"` Not *BillProductWhereInput `json:"not,omitempty"` Or []*BillProductWhereInput `json:"or,omitempty"` And []*BillProductWhereInput `json:"and,omitempty"` // "id" field predicates. ID *pulid.ID `json:"id,omitempty"` IDNEQ *pulid.ID `json:"idNEQ,omitempty"` IDIn []pulid.ID `json:"idIn,omitempty"` IDNotIn []pulid.ID `json:"idNotIn,omitempty"` IDGT *pulid.ID `json:"idGT,omitempty"` IDGTE *pulid.ID `json:"idGTE,omitempty"` IDLT *pulid.ID `json:"idLT,omitempty"` IDLTE *pulid.ID `json:"idLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "sku" field predicates. Sku *string `json:"sku,omitempty"` SkuNEQ *string `json:"skuNEQ,omitempty"` SkuIn []string `json:"skuIn,omitempty"` SkuNotIn []string `json:"skuNotIn,omitempty"` SkuGT *string `json:"skuGT,omitempty"` SkuGTE *string `json:"skuGTE,omitempty"` SkuLT *string `json:"skuLT,omitempty"` SkuLTE *string `json:"skuLTE,omitempty"` SkuContains *string `json:"skuContains,omitempty"` SkuHasPrefix *string `json:"skuHasPrefix,omitempty"` SkuHasSuffix *string `json:"skuHasSuffix,omitempty"` SkuEqualFold *string `json:"skuEqualFold,omitempty"` SkuContainsFold *string `json:"skuContainsFold,omitempty"` // "quantity" field predicates. Quantity *uint64 `json:"quantity,omitempty"` QuantityNEQ *uint64 `json:"quantityNEQ,omitempty"` QuantityIn []uint64 `json:"quantityIn,omitempty"` QuantityNotIn []uint64 `json:"quantityNotIn,omitempty"` QuantityGT *uint64 `json:"quantityGT,omitempty"` QuantityGTE *uint64 `json:"quantityGTE,omitempty"` QuantityLT *uint64 `json:"quantityLT,omitempty"` QuantityLTE *uint64 `json:"quantityLTE,omitempty"` }
BillProductWhereInput represents a where input for filtering BillProduct queries.
func (*BillProductWhereInput) AddPredicates ¶ added in v0.3.4
func (i *BillProductWhereInput) AddPredicates(predicates ...predicate.BillProduct)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*BillProductWhereInput) Filter ¶ added in v0.3.4
func (i *BillProductWhereInput) Filter(q *BillProductQuery) (*BillProductQuery, error)
Filter applies the BillProductWhereInput filter on the BillProductQuery builder.
func (*BillProductWhereInput) P ¶ added in v0.3.4
func (i *BillProductWhereInput) P() (predicate.BillProduct, error)
P returns a predicate for filtering billproducts. An error is returned if the input is empty or invalid.
type BillProducts ¶ added in v0.3.4
type BillProducts []*BillProduct
BillProducts is a parsable slice of BillProduct.
type Category ¶
type Category struct { // ID of the ent. ID pulid.ID `json:"id,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Status holds the value of the "status" field. Status category.Status `json:"status,omitempty"` // Config holds the value of the "config" field. Config *schematype.CategoryConfig `json:"config,omitempty"` // Duration holds the value of the "duration" field. Duration time.Duration `json:"duration,omitempty"` // Count holds the value of the "count" field. Count uint64 `json:"count,omitempty"` // Strings holds the value of the "strings" field. Strings []string `json:"strings,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CategoryQuery when eager-loading is set. Edges CategoryEdges `json:"edges"` // contains filtered or unexported fields }
Category is the model entity for the Category schema.
func (*Category) IsNode ¶ added in v0.3.5
func (n *Category) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Category) NamedSubCategories ¶ added in v0.4.0
NamedSubCategories returns the SubCategories named value or an error if the edge was not loaded in eager-loading with this name.
func (*Category) NamedTodos ¶ added in v0.3.1
NamedTodos returns the Todos named value or an error if the edge was not loaded in eager-loading with this name.
func (*Category) QuerySubCategories ¶ added in v0.4.0
func (c *Category) QuerySubCategories() *CategoryQuery
QuerySubCategories queries the "sub_categories" edge of the Category entity.
func (*Category) QueryTodos ¶
QueryTodos queries the "todos" edge of the Category entity.
func (*Category) SubCategories ¶ added in v0.4.0
func (c *Category) SubCategories( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy []*CategoryOrder, where *CategoryWhereInput, ) (*CategoryConnection, error)
func (*Category) ToEdge ¶
func (c *Category) ToEdge(order *CategoryOrder) *CategoryEdge
ToEdge converts Category into CategoryEdge.
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 pulid.ID) *CategoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CategoryClient) Hooks ¶
func (c *CategoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CategoryClient) Intercept ¶ added in v0.3.5
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 ¶ added in v0.3.5
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) QuerySubCategories ¶ added in v0.4.0
func (c *CategoryClient) QuerySubCategories(ca *Category) *CategoryQuery
QuerySubCategories queries the sub_categories edge of a Category.
func (*CategoryClient) QueryTodos ¶
func (c *CategoryClient) QueryTodos(ca *Category) *TodoQuery
QueryTodos queries the todos edge of a 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 pulid.ID) *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 CategoryConnection ¶
type CategoryConnection struct { Edges []*CategoryEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
CategoryConnection is the connection containing edges to Category.
type CategoryCreate ¶
type CategoryCreate struct {
// contains filtered or unexported fields
}
CategoryCreate is the builder for creating a Category entity.
func (*CategoryCreate) AddSubCategories ¶ added in v0.4.0
func (cc *CategoryCreate) AddSubCategories(c ...*Category) *CategoryCreate
AddSubCategories adds the "sub_categories" edges to the Category entity.
func (*CategoryCreate) AddSubCategoryIDs ¶ added in v0.4.0
func (cc *CategoryCreate) AddSubCategoryIDs(ids ...pulid.ID) *CategoryCreate
AddSubCategoryIDs adds the "sub_categories" edge to the Category entity by IDs.
func (*CategoryCreate) AddTodoIDs ¶
func (cc *CategoryCreate) AddTodoIDs(ids ...pulid.ID) *CategoryCreate
AddTodoIDs adds the "todos" edge to the Todo entity by IDs.
func (*CategoryCreate) AddTodos ¶
func (cc *CategoryCreate) AddTodos(t ...*Todo) *CategoryCreate
AddTodos adds the "todos" edges to the Todo entity.
func (*CategoryCreate) Exec ¶ added in v0.2.0
func (cc *CategoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreate) ExecX ¶ added in v0.2.0
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) SetConfig ¶
func (cc *CategoryCreate) SetConfig(sc *schematype.CategoryConfig) *CategoryCreate
SetConfig sets the "config" field.
func (*CategoryCreate) SetCount ¶ added in v0.2.0
func (cc *CategoryCreate) SetCount(u uint64) *CategoryCreate
SetCount sets the "count" field.
func (*CategoryCreate) SetDuration ¶ added in v0.2.0
func (cc *CategoryCreate) SetDuration(t time.Duration) *CategoryCreate
SetDuration sets the "duration" field.
func (*CategoryCreate) SetID ¶
func (cc *CategoryCreate) SetID(pu pulid.ID) *CategoryCreate
SetID sets the "id" field.
func (*CategoryCreate) SetInput ¶ added in v0.3.3
func (c *CategoryCreate) SetInput(i CreateCategoryInput) *CategoryCreate
SetInput applies the change-set in the CreateCategoryInput on the CategoryCreate builder.
func (*CategoryCreate) SetNillableCount ¶ added in v0.2.0
func (cc *CategoryCreate) SetNillableCount(u *uint64) *CategoryCreate
SetNillableCount sets the "count" field if the given value is not nil.
func (*CategoryCreate) SetNillableDuration ¶ added in v0.2.0
func (cc *CategoryCreate) SetNillableDuration(t *time.Duration) *CategoryCreate
SetNillableDuration sets the "duration" field if the given value is not nil.
func (*CategoryCreate) SetNillableID ¶
func (cc *CategoryCreate) SetNillableID(pu *pulid.ID) *CategoryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CategoryCreate) SetStatus ¶
func (cc *CategoryCreate) SetStatus(c category.Status) *CategoryCreate
SetStatus sets the "status" field.
func (*CategoryCreate) SetStrings ¶ added in v0.3.0
func (cc *CategoryCreate) SetStrings(s []string) *CategoryCreate
SetStrings sets the "strings" field.
func (*CategoryCreate) SetText ¶
func (cc *CategoryCreate) SetText(s string) *CategoryCreate
SetText sets the "text" field.
type CategoryCreateBulk ¶
type CategoryCreateBulk struct {
// contains filtered or unexported fields
}
CategoryCreateBulk is the builder for creating many Category entities in bulk.
func (*CategoryCreateBulk) Exec ¶ added in v0.2.0
func (ccb *CategoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreateBulk) ExecX ¶ added in v0.2.0
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 ¶ added in v0.4.0
func (cdo *CategoryDeleteOne) Where(ps ...predicate.Category) *CategoryDeleteOne
Where appends a list predicates to the CategoryDelete builder.
type CategoryEdge ¶
CategoryEdge is the edge representation of Category.
type CategoryEdges ¶
type CategoryEdges struct { // Todos holds the value of the todos edge. Todos []*Todo `json:"todos,omitempty"` // SubCategories holds the value of the sub_categories edge. SubCategories []*Category `json:"sub_categories,omitempty"` // contains filtered or unexported fields }
CategoryEdges holds the relations/edges for other nodes in the graph.
func (CategoryEdges) SubCategoriesOrErr ¶ added in v0.4.0
func (e CategoryEdges) SubCategoriesOrErr() ([]*Category, error)
SubCategoriesOrErr returns the SubCategories value or an error if the edge was not loaded in eager-loading.
func (CategoryEdges) TodosOrErr ¶
func (e CategoryEdges) TodosOrErr() ([]*Todo, error)
TodosOrErr returns the Todos value or an error if the edge was not loaded in eager-loading.
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) AddCount ¶ added in v0.2.0
func (m *CategoryMutation) AddCount(u int64)
AddCount adds u to the "count" field.
func (*CategoryMutation) AddDuration ¶ added in v0.2.0
func (m *CategoryMutation) AddDuration(t time.Duration)
AddDuration adds t to the "duration" field.
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) AddSubCategoryIDs ¶ added in v0.4.0
func (m *CategoryMutation) AddSubCategoryIDs(ids ...pulid.ID)
AddSubCategoryIDs adds the "sub_categories" edge to the Category entity by ids.
func (*CategoryMutation) AddTodoIDs ¶
func (m *CategoryMutation) AddTodoIDs(ids ...pulid.ID)
AddTodoIDs adds the "todos" edge to the Todo entity by ids.
func (*CategoryMutation) AddedCount ¶ added in v0.2.0
func (m *CategoryMutation) AddedCount() (r int64, exists bool)
AddedCount returns the value that was added to the "count" field in this mutation.
func (*CategoryMutation) AddedDuration ¶ added in v0.2.0
func (m *CategoryMutation) AddedDuration() (r time.Duration, exists bool)
AddedDuration returns the value that was added to the "duration" field in this mutation.
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) AppendStrings ¶ added in v0.3.3
func (m *CategoryMutation) AppendStrings(s []string)
AppendStrings adds s to the "strings" field.
func (*CategoryMutation) AppendedStrings ¶ added in v0.3.3
func (m *CategoryMutation) AppendedStrings() ([]string, bool)
AppendedStrings returns the list of values that were appended to the "strings" field in this mutation.
func (*CategoryMutation) ClearConfig ¶
func (m *CategoryMutation) ClearConfig()
ClearConfig clears the value of the "config" field.
func (*CategoryMutation) ClearCount ¶ added in v0.2.0
func (m *CategoryMutation) ClearCount()
ClearCount clears the value of the "count" field.
func (*CategoryMutation) ClearDuration ¶ added in v0.2.0
func (m *CategoryMutation) ClearDuration()
ClearDuration clears the value of the "duration" field.
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) ClearStrings ¶ added in v0.3.0
func (m *CategoryMutation) ClearStrings()
ClearStrings clears the value of the "strings" field.
func (*CategoryMutation) ClearSubCategories ¶ added in v0.4.0
func (m *CategoryMutation) ClearSubCategories()
ClearSubCategories clears the "sub_categories" edge to the Category entity.
func (*CategoryMutation) ClearTodos ¶
func (m *CategoryMutation) ClearTodos()
ClearTodos clears the "todos" edge to the Todo entity.
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) Config ¶
func (m *CategoryMutation) Config() (r *schematype.CategoryConfig, exists bool)
Config returns the value of the "config" field in the mutation.
func (*CategoryMutation) ConfigCleared ¶
func (m *CategoryMutation) ConfigCleared() bool
ConfigCleared returns if the "config" field was cleared in this mutation.
func (*CategoryMutation) Count ¶ added in v0.2.0
func (m *CategoryMutation) Count() (r uint64, exists bool)
Count returns the value of the "count" field in the mutation.
func (*CategoryMutation) CountCleared ¶ added in v0.2.0
func (m *CategoryMutation) CountCleared() bool
CountCleared returns if the "count" field was cleared in this mutation.
func (*CategoryMutation) Duration ¶ added in v0.2.0
func (m *CategoryMutation) Duration() (r time.Duration, exists bool)
Duration returns the value of the "duration" field in the mutation.
func (*CategoryMutation) DurationCleared ¶ added in v0.2.0
func (m *CategoryMutation) DurationCleared() bool
DurationCleared returns if the "duration" field was cleared in this 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) 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 pulid.ID, 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 ¶ added in v0.3.0
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) OldConfig ¶
func (m *CategoryMutation) OldConfig(ctx context.Context) (v *schematype.CategoryConfig, err error)
OldConfig returns the old "config" 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) OldCount ¶ added in v0.2.0
func (m *CategoryMutation) OldCount(ctx context.Context) (v uint64, err error)
OldCount returns the old "count" 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) OldDuration ¶ added in v0.2.0
OldDuration returns the old "duration" 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) OldStatus ¶
OldStatus returns the old "status" 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) OldStrings ¶ added in v0.3.0
func (m *CategoryMutation) OldStrings(ctx context.Context) (v []string, err error)
OldStrings returns the old "strings" 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) OldText ¶
func (m *CategoryMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" 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) RemoveSubCategoryIDs ¶ added in v0.4.0
func (m *CategoryMutation) RemoveSubCategoryIDs(ids ...pulid.ID)
RemoveSubCategoryIDs removes the "sub_categories" edge to the Category entity by IDs.
func (*CategoryMutation) RemoveTodoIDs ¶
func (m *CategoryMutation) RemoveTodoIDs(ids ...pulid.ID)
RemoveTodoIDs removes the "todos" edge to the Todo entity by IDs.
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) RemovedSubCategoriesIDs ¶ added in v0.4.0
func (m *CategoryMutation) RemovedSubCategoriesIDs() (ids []pulid.ID)
RemovedSubCategories returns the removed IDs of the "sub_categories" edge to the Category entity.
func (*CategoryMutation) RemovedTodosIDs ¶
func (m *CategoryMutation) RemovedTodosIDs() (ids []pulid.ID)
RemovedTodos returns the removed IDs of the "todos" edge to the Todo entity.
func (*CategoryMutation) ResetConfig ¶
func (m *CategoryMutation) ResetConfig()
ResetConfig resets all changes to the "config" field.
func (*CategoryMutation) ResetCount ¶ added in v0.2.0
func (m *CategoryMutation) ResetCount()
ResetCount resets all changes to the "count" field.
func (*CategoryMutation) ResetDuration ¶ added in v0.2.0
func (m *CategoryMutation) ResetDuration()
ResetDuration resets all changes to the "duration" 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) 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) ResetStatus ¶
func (m *CategoryMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*CategoryMutation) ResetStrings ¶ added in v0.3.0
func (m *CategoryMutation) ResetStrings()
ResetStrings resets all changes to the "strings" field.
func (*CategoryMutation) ResetSubCategories ¶ added in v0.4.0
func (m *CategoryMutation) ResetSubCategories()
ResetSubCategories resets all changes to the "sub_categories" edge.
func (*CategoryMutation) ResetText ¶
func (m *CategoryMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*CategoryMutation) ResetTodos ¶
func (m *CategoryMutation) ResetTodos()
ResetTodos resets all changes to the "todos" edge.
func (*CategoryMutation) SetConfig ¶
func (m *CategoryMutation) SetConfig(sc *schematype.CategoryConfig)
SetConfig sets the "config" field.
func (*CategoryMutation) SetCount ¶ added in v0.2.0
func (m *CategoryMutation) SetCount(u uint64)
SetCount sets the "count" field.
func (*CategoryMutation) SetDuration ¶ added in v0.2.0
func (m *CategoryMutation) SetDuration(t time.Duration)
SetDuration sets the "duration" 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 pulid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Category entities.
func (*CategoryMutation) SetOp ¶ added in v0.3.5
func (m *CategoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CategoryMutation) SetStatus ¶
func (m *CategoryMutation) SetStatus(c category.Status)
SetStatus sets the "status" field.
func (*CategoryMutation) SetStrings ¶ added in v0.3.0
func (m *CategoryMutation) SetStrings(s []string)
SetStrings sets the "strings" field.
func (*CategoryMutation) SetText ¶
func (m *CategoryMutation) SetText(s string)
SetText sets the "text" field.
func (*CategoryMutation) Status ¶
func (m *CategoryMutation) Status() (r category.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*CategoryMutation) Strings ¶ added in v0.3.0
func (m *CategoryMutation) Strings() (r []string, exists bool)
Strings returns the value of the "strings" field in the mutation.
func (*CategoryMutation) StringsCleared ¶ added in v0.3.0
func (m *CategoryMutation) StringsCleared() bool
StringsCleared returns if the "strings" field was cleared in this mutation.
func (*CategoryMutation) SubCategoriesCleared ¶ added in v0.4.0
func (m *CategoryMutation) SubCategoriesCleared() bool
SubCategoriesCleared reports if the "sub_categories" edge to the Category entity was cleared.
func (*CategoryMutation) SubCategoriesIDs ¶ added in v0.4.0
func (m *CategoryMutation) SubCategoriesIDs() (ids []pulid.ID)
SubCategoriesIDs returns the "sub_categories" edge IDs in the mutation.
func (*CategoryMutation) Text ¶
func (m *CategoryMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (*CategoryMutation) TodosCleared ¶
func (m *CategoryMutation) TodosCleared() bool
TodosCleared reports if the "todos" edge to the Todo entity was cleared.
func (*CategoryMutation) TodosIDs ¶
func (m *CategoryMutation) TodosIDs() (ids []pulid.ID)
TodosIDs returns the "todos" edge IDs in the mutation.
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 ¶ added in v0.2.0
func (m *CategoryMutation) Where(ps ...predicate.Category)
Where appends a list predicates to the CategoryMutation builder.
func (*CategoryMutation) WhereP ¶ added in v0.3.5
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 CategoryOrder ¶
type CategoryOrder struct { Direction OrderDirection `json:"direction"` Field *CategoryOrderField `json:"field"` }
CategoryOrder defines the ordering of Category.
type CategoryOrderField ¶
type CategoryOrderField struct { // Value extracts the ordering value from the given Category. Value func(*Category) (ent.Value, error) // contains filtered or unexported fields }
CategoryOrderField defines the ordering field of Category.
func (CategoryOrderField) MarshalGQL ¶
func (f CategoryOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (CategoryOrderField) String ¶
func (f CategoryOrderField) String() string
String implement fmt.Stringer interface.
func (*CategoryOrderField) UnmarshalGQL ¶
func (f *CategoryOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type CategoryPaginateOption ¶
type CategoryPaginateOption func(*categoryPager) error
CategoryPaginateOption enables pagination customization.
func WithCategoryFilter ¶
func WithCategoryFilter(filter func(*CategoryQuery) (*CategoryQuery, error)) CategoryPaginateOption
WithCategoryFilter configures pagination filter.
func WithCategoryOrder ¶
func WithCategoryOrder(order []*CategoryOrder) CategoryPaginateOption
WithCategoryOrder configures pagination ordering.
type CategoryQuery ¶
type CategoryQuery struct {
// contains filtered or unexported fields
}
CategoryQuery is the builder for querying Category entities.
func (*CategoryQuery) Aggregate ¶ added in v0.3.4
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) CollectFields ¶
func (c *CategoryQuery) CollectFields(ctx context.Context, satisfies ...string) (*CategoryQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
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 ¶
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) pulid.ID
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 { Text string `json:"text,omitempty"` Count int `json:"count,omitempty"` } client.Category.Query(). GroupBy(category.FieldText). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CategoryQuery) IDsX ¶
func (cq *CategoryQuery) IDsX(ctx context.Context) []pulid.ID
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 ¶
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) pulid.ID
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 ...category.OrderOption) *CategoryQuery
Order specifies how the records should be ordered.
func (*CategoryQuery) Paginate ¶
func (c *CategoryQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...CategoryPaginateOption, ) (*CategoryConnection, error)
Paginate executes the query and returns a relay based cursor connection to Category.
func (*CategoryQuery) QuerySubCategories ¶ added in v0.4.0
func (cq *CategoryQuery) QuerySubCategories() *CategoryQuery
QuerySubCategories chains the current query on the "sub_categories" edge.
func (*CategoryQuery) QueryTodos ¶
func (cq *CategoryQuery) QueryTodos() *TodoQuery
QueryTodos chains the current query on the "todos" edge.
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 { Text string `json:"text,omitempty"` } client.Category.Query(). Select(category.FieldText). 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.
func (*CategoryQuery) WithNamedSubCategories ¶ added in v0.4.0
func (cq *CategoryQuery) WithNamedSubCategories(name string, opts ...func(*CategoryQuery)) *CategoryQuery
WithNamedSubCategories tells the query-builder to eager-load the nodes that are connected to the "sub_categories" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*CategoryQuery) WithNamedTodos ¶ added in v0.3.1
func (cq *CategoryQuery) WithNamedTodos(name string, opts ...func(*TodoQuery)) *CategoryQuery
WithNamedTodos tells the query-builder to eager-load the nodes that are connected to the "todos" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*CategoryQuery) WithSubCategories ¶ added in v0.4.0
func (cq *CategoryQuery) WithSubCategories(opts ...func(*CategoryQuery)) *CategoryQuery
WithSubCategories tells the query-builder to eager-load the nodes that are connected to the "sub_categories" edge. The optional arguments are used to configure the query builder of the edge.
func (*CategoryQuery) WithTodos ¶
func (cq *CategoryQuery) WithTodos(opts ...func(*TodoQuery)) *CategoryQuery
WithTodos tells the query-builder to eager-load the nodes that are connected to the "todos" edge. The optional arguments are used to configure the query builder of the edge.
type CategorySelect ¶
type CategorySelect struct { *CategoryQuery // contains filtered or unexported fields }
CategorySelect is the builder for selecting fields of Category entities.
func (*CategorySelect) Aggregate ¶ added in v0.3.4
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) AddCount ¶ added in v0.2.0
func (cu *CategoryUpdate) AddCount(u int64) *CategoryUpdate
AddCount adds u to the "count" field.
func (*CategoryUpdate) AddDuration ¶ added in v0.2.0
func (cu *CategoryUpdate) AddDuration(t time.Duration) *CategoryUpdate
AddDuration adds t to the "duration" field.
func (*CategoryUpdate) AddSubCategories ¶ added in v0.4.0
func (cu *CategoryUpdate) AddSubCategories(c ...*Category) *CategoryUpdate
AddSubCategories adds the "sub_categories" edges to the Category entity.
func (*CategoryUpdate) AddSubCategoryIDs ¶ added in v0.4.0
func (cu *CategoryUpdate) AddSubCategoryIDs(ids ...pulid.ID) *CategoryUpdate
AddSubCategoryIDs adds the "sub_categories" edge to the Category entity by IDs.
func (*CategoryUpdate) AddTodoIDs ¶
func (cu *CategoryUpdate) AddTodoIDs(ids ...pulid.ID) *CategoryUpdate
AddTodoIDs adds the "todos" edge to the Todo entity by IDs.
func (*CategoryUpdate) AddTodos ¶
func (cu *CategoryUpdate) AddTodos(t ...*Todo) *CategoryUpdate
AddTodos adds the "todos" edges to the Todo entity.
func (*CategoryUpdate) AppendStrings ¶ added in v0.3.3
func (cu *CategoryUpdate) AppendStrings(s []string) *CategoryUpdate
AppendStrings appends s to the "strings" field.
func (*CategoryUpdate) ClearConfig ¶
func (cu *CategoryUpdate) ClearConfig() *CategoryUpdate
ClearConfig clears the value of the "config" field.
func (*CategoryUpdate) ClearCount ¶ added in v0.2.0
func (cu *CategoryUpdate) ClearCount() *CategoryUpdate
ClearCount clears the value of the "count" field.
func (*CategoryUpdate) ClearDuration ¶ added in v0.2.0
func (cu *CategoryUpdate) ClearDuration() *CategoryUpdate
ClearDuration clears the value of the "duration" field.
func (*CategoryUpdate) ClearStrings ¶ added in v0.3.0
func (cu *CategoryUpdate) ClearStrings() *CategoryUpdate
ClearStrings clears the value of the "strings" field.
func (*CategoryUpdate) ClearSubCategories ¶ added in v0.4.0
func (cu *CategoryUpdate) ClearSubCategories() *CategoryUpdate
ClearSubCategories clears all "sub_categories" edges to the Category entity.
func (*CategoryUpdate) ClearTodos ¶
func (cu *CategoryUpdate) ClearTodos() *CategoryUpdate
ClearTodos clears all "todos" edges to the Todo entity.
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) RemoveSubCategories ¶ added in v0.4.0
func (cu *CategoryUpdate) RemoveSubCategories(c ...*Category) *CategoryUpdate
RemoveSubCategories removes "sub_categories" edges to Category entities.
func (*CategoryUpdate) RemoveSubCategoryIDs ¶ added in v0.4.0
func (cu *CategoryUpdate) RemoveSubCategoryIDs(ids ...pulid.ID) *CategoryUpdate
RemoveSubCategoryIDs removes the "sub_categories" edge to Category entities by IDs.
func (*CategoryUpdate) RemoveTodoIDs ¶
func (cu *CategoryUpdate) RemoveTodoIDs(ids ...pulid.ID) *CategoryUpdate
RemoveTodoIDs removes the "todos" edge to Todo entities by IDs.
func (*CategoryUpdate) RemoveTodos ¶
func (cu *CategoryUpdate) RemoveTodos(t ...*Todo) *CategoryUpdate
RemoveTodos removes "todos" edges to Todo entities.
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) SetConfig ¶
func (cu *CategoryUpdate) SetConfig(sc *schematype.CategoryConfig) *CategoryUpdate
SetConfig sets the "config" field.
func (*CategoryUpdate) SetCount ¶ added in v0.2.0
func (cu *CategoryUpdate) SetCount(u uint64) *CategoryUpdate
SetCount sets the "count" field.
func (*CategoryUpdate) SetDuration ¶ added in v0.2.0
func (cu *CategoryUpdate) SetDuration(t time.Duration) *CategoryUpdate
SetDuration sets the "duration" field.
func (*CategoryUpdate) SetInput ¶ added in v0.3.3
func (c *CategoryUpdate) SetInput(i UpdateCategoryInput) *CategoryUpdate
SetInput applies the change-set in the UpdateCategoryInput on the CategoryUpdate builder.
func (*CategoryUpdate) SetNillableCount ¶ added in v0.2.0
func (cu *CategoryUpdate) SetNillableCount(u *uint64) *CategoryUpdate
SetNillableCount sets the "count" field if the given value is not nil.
func (*CategoryUpdate) SetNillableDuration ¶ added in v0.2.0
func (cu *CategoryUpdate) SetNillableDuration(t *time.Duration) *CategoryUpdate
SetNillableDuration sets the "duration" field if the given value is not nil.
func (*CategoryUpdate) SetStatus ¶
func (cu *CategoryUpdate) SetStatus(c category.Status) *CategoryUpdate
SetStatus sets the "status" field.
func (*CategoryUpdate) SetStrings ¶ added in v0.3.0
func (cu *CategoryUpdate) SetStrings(s []string) *CategoryUpdate
SetStrings sets the "strings" field.
func (*CategoryUpdate) SetText ¶
func (cu *CategoryUpdate) SetText(s string) *CategoryUpdate
SetText sets the "text" field.
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) AddCount ¶ added in v0.2.0
func (cuo *CategoryUpdateOne) AddCount(u int64) *CategoryUpdateOne
AddCount adds u to the "count" field.
func (*CategoryUpdateOne) AddDuration ¶ added in v0.2.0
func (cuo *CategoryUpdateOne) AddDuration(t time.Duration) *CategoryUpdateOne
AddDuration adds t to the "duration" field.
func (*CategoryUpdateOne) AddSubCategories ¶ added in v0.4.0
func (cuo *CategoryUpdateOne) AddSubCategories(c ...*Category) *CategoryUpdateOne
AddSubCategories adds the "sub_categories" edges to the Category entity.
func (*CategoryUpdateOne) AddSubCategoryIDs ¶ added in v0.4.0
func (cuo *CategoryUpdateOne) AddSubCategoryIDs(ids ...pulid.ID) *CategoryUpdateOne
AddSubCategoryIDs adds the "sub_categories" edge to the Category entity by IDs.
func (*CategoryUpdateOne) AddTodoIDs ¶
func (cuo *CategoryUpdateOne) AddTodoIDs(ids ...pulid.ID) *CategoryUpdateOne
AddTodoIDs adds the "todos" edge to the Todo entity by IDs.
func (*CategoryUpdateOne) AddTodos ¶
func (cuo *CategoryUpdateOne) AddTodos(t ...*Todo) *CategoryUpdateOne
AddTodos adds the "todos" edges to the Todo entity.
func (*CategoryUpdateOne) AppendStrings ¶ added in v0.3.3
func (cuo *CategoryUpdateOne) AppendStrings(s []string) *CategoryUpdateOne
AppendStrings appends s to the "strings" field.
func (*CategoryUpdateOne) ClearConfig ¶
func (cuo *CategoryUpdateOne) ClearConfig() *CategoryUpdateOne
ClearConfig clears the value of the "config" field.
func (*CategoryUpdateOne) ClearCount ¶ added in v0.2.0
func (cuo *CategoryUpdateOne) ClearCount() *CategoryUpdateOne
ClearCount clears the value of the "count" field.
func (*CategoryUpdateOne) ClearDuration ¶ added in v0.2.0
func (cuo *CategoryUpdateOne) ClearDuration() *CategoryUpdateOne
ClearDuration clears the value of the "duration" field.
func (*CategoryUpdateOne) ClearStrings ¶ added in v0.3.0
func (cuo *CategoryUpdateOne) ClearStrings() *CategoryUpdateOne
ClearStrings clears the value of the "strings" field.
func (*CategoryUpdateOne) ClearSubCategories ¶ added in v0.4.0
func (cuo *CategoryUpdateOne) ClearSubCategories() *CategoryUpdateOne
ClearSubCategories clears all "sub_categories" edges to the Category entity.
func (*CategoryUpdateOne) ClearTodos ¶
func (cuo *CategoryUpdateOne) ClearTodos() *CategoryUpdateOne
ClearTodos clears all "todos" edges to the Todo 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) RemoveSubCategories ¶ added in v0.4.0
func (cuo *CategoryUpdateOne) RemoveSubCategories(c ...*Category) *CategoryUpdateOne
RemoveSubCategories removes "sub_categories" edges to Category entities.
func (*CategoryUpdateOne) RemoveSubCategoryIDs ¶ added in v0.4.0
func (cuo *CategoryUpdateOne) RemoveSubCategoryIDs(ids ...pulid.ID) *CategoryUpdateOne
RemoveSubCategoryIDs removes the "sub_categories" edge to Category entities by IDs.
func (*CategoryUpdateOne) RemoveTodoIDs ¶
func (cuo *CategoryUpdateOne) RemoveTodoIDs(ids ...pulid.ID) *CategoryUpdateOne
RemoveTodoIDs removes the "todos" edge to Todo entities by IDs.
func (*CategoryUpdateOne) RemoveTodos ¶
func (cuo *CategoryUpdateOne) RemoveTodos(t ...*Todo) *CategoryUpdateOne
RemoveTodos removes "todos" edges to Todo entities.
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) SetConfig ¶
func (cuo *CategoryUpdateOne) SetConfig(sc *schematype.CategoryConfig) *CategoryUpdateOne
SetConfig sets the "config" field.
func (*CategoryUpdateOne) SetCount ¶ added in v0.2.0
func (cuo *CategoryUpdateOne) SetCount(u uint64) *CategoryUpdateOne
SetCount sets the "count" field.
func (*CategoryUpdateOne) SetDuration ¶ added in v0.2.0
func (cuo *CategoryUpdateOne) SetDuration(t time.Duration) *CategoryUpdateOne
SetDuration sets the "duration" field.
func (*CategoryUpdateOne) SetInput ¶ added in v0.3.3
func (c *CategoryUpdateOne) SetInput(i UpdateCategoryInput) *CategoryUpdateOne
SetInput applies the change-set in the UpdateCategoryInput on the CategoryUpdateOne builder.
func (*CategoryUpdateOne) SetNillableCount ¶ added in v0.2.0
func (cuo *CategoryUpdateOne) SetNillableCount(u *uint64) *CategoryUpdateOne
SetNillableCount sets the "count" field if the given value is not nil.
func (*CategoryUpdateOne) SetNillableDuration ¶ added in v0.2.0
func (cuo *CategoryUpdateOne) SetNillableDuration(t *time.Duration) *CategoryUpdateOne
SetNillableDuration sets the "duration" field if the given value is not nil.
func (*CategoryUpdateOne) SetStatus ¶
func (cuo *CategoryUpdateOne) SetStatus(c category.Status) *CategoryUpdateOne
SetStatus sets the "status" field.
func (*CategoryUpdateOne) SetStrings ¶ added in v0.3.0
func (cuo *CategoryUpdateOne) SetStrings(s []string) *CategoryUpdateOne
SetStrings sets the "strings" field.
func (*CategoryUpdateOne) SetText ¶
func (cuo *CategoryUpdateOne) SetText(s string) *CategoryUpdateOne
SetText sets the "text" field.
func (*CategoryUpdateOne) Where ¶ added in v0.4.0
func (cuo *CategoryUpdateOne) Where(ps ...predicate.Category) *CategoryUpdateOne
Where appends a list predicates to the CategoryUpdate builder.
type CategoryWhereInput ¶
type CategoryWhereInput struct { Predicates []predicate.Category `json:"-"` Not *CategoryWhereInput `json:"not,omitempty"` Or []*CategoryWhereInput `json:"or,omitempty"` And []*CategoryWhereInput `json:"and,omitempty"` // "id" field predicates. ID *pulid.ID `json:"id,omitempty"` IDNEQ *pulid.ID `json:"idNEQ,omitempty"` IDIn []pulid.ID `json:"idIn,omitempty"` IDNotIn []pulid.ID `json:"idNotIn,omitempty"` IDGT *pulid.ID `json:"idGT,omitempty"` IDGTE *pulid.ID `json:"idGTE,omitempty"` IDLT *pulid.ID `json:"idLT,omitempty"` IDLTE *pulid.ID `json:"idLTE,omitempty"` // "text" field predicates. Text *string `json:"text,omitempty"` TextNEQ *string `json:"textNEQ,omitempty"` TextIn []string `json:"textIn,omitempty"` TextNotIn []string `json:"textNotIn,omitempty"` TextGT *string `json:"textGT,omitempty"` TextGTE *string `json:"textGTE,omitempty"` TextLT *string `json:"textLT,omitempty"` TextLTE *string `json:"textLTE,omitempty"` TextContains *string `json:"textContains,omitempty"` TextHasPrefix *string `json:"textHasPrefix,omitempty"` TextHasSuffix *string `json:"textHasSuffix,omitempty"` TextEqualFold *string `json:"textEqualFold,omitempty"` TextContainsFold *string `json:"textContainsFold,omitempty"` // "status" field predicates. Status *category.Status `json:"status,omitempty"` StatusNEQ *category.Status `json:"statusNEQ,omitempty"` StatusIn []category.Status `json:"statusIn,omitempty"` StatusNotIn []category.Status `json:"statusNotIn,omitempty"` // "config" field predicates. Config *schematype.CategoryConfig `json:"config,omitempty"` ConfigNEQ *schematype.CategoryConfig `json:"configNEQ,omitempty"` ConfigIn []*schematype.CategoryConfig `json:"configIn,omitempty"` ConfigNotIn []*schematype.CategoryConfig `json:"configNotIn,omitempty"` ConfigGT *schematype.CategoryConfig `json:"configGT,omitempty"` ConfigGTE *schematype.CategoryConfig `json:"configGTE,omitempty"` ConfigLT *schematype.CategoryConfig `json:"configLT,omitempty"` ConfigLTE *schematype.CategoryConfig `json:"configLTE,omitempty"` ConfigIsNil bool `json:"configIsNil,omitempty"` ConfigNotNil bool `json:"configNotNil,omitempty"` // "duration" field predicates. Duration *time.Duration `json:"duration,omitempty"` DurationNEQ *time.Duration `json:"durationNEQ,omitempty"` DurationIn []time.Duration `json:"durationIn,omitempty"` DurationNotIn []time.Duration `json:"durationNotIn,omitempty"` DurationGT *time.Duration `json:"durationGT,omitempty"` DurationGTE *time.Duration `json:"durationGTE,omitempty"` DurationLT *time.Duration `json:"durationLT,omitempty"` DurationLTE *time.Duration `json:"durationLTE,omitempty"` DurationIsNil bool `json:"durationIsNil,omitempty"` DurationNotNil bool `json:"durationNotNil,omitempty"` // "count" field predicates. Count *uint64 `json:"count,omitempty"` CountNEQ *uint64 `json:"countNEQ,omitempty"` CountIn []uint64 `json:"countIn,omitempty"` CountNotIn []uint64 `json:"countNotIn,omitempty"` CountGT *uint64 `json:"countGT,omitempty"` CountGTE *uint64 `json:"countGTE,omitempty"` CountLT *uint64 `json:"countLT,omitempty"` CountLTE *uint64 `json:"countLTE,omitempty"` CountIsNil bool `json:"countIsNil,omitempty"` CountNotNil bool `json:"countNotNil,omitempty"` // "todos" edge predicates. HasTodos *bool `json:"hasTodos,omitempty"` HasTodosWith []*TodoWhereInput `json:"hasTodosWith,omitempty"` // "sub_categories" edge predicates. HasSubCategories *bool `json:"hasSubCategories,omitempty"` HasSubCategoriesWith []*CategoryWhereInput `json:"hasSubCategoriesWith,omitempty"` }
CategoryWhereInput represents a where input for filtering Category queries.
func (*CategoryWhereInput) AddPredicates ¶ added in v0.3.0
func (i *CategoryWhereInput) AddPredicates(predicates ...predicate.Category)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*CategoryWhereInput) Filter ¶
func (i *CategoryWhereInput) Filter(q *CategoryQuery) (*CategoryQuery, error)
Filter applies the CategoryWhereInput filter on the CategoryQuery builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // BillProduct is the client for interacting with the BillProduct builders. BillProduct *BillProductClient // Category is the client for interacting with the Category builders. Category *CategoryClient // Friendship is the client for interacting with the Friendship builders. Friendship *FriendshipClient // Group is the client for interacting with the Group builders. Group *GroupClient // Todo is the client for interacting with the Todo builders. Todo *TodoClient // User is the client for interacting with the User builders. User *UserClient // VerySecret is the client for interacting with the VerySecret builders. VerySecret *VerySecretClient // 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(). BillProduct. Query(). Count(ctx)
func (*Client) Intercept ¶ added in v0.3.5
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(...)`.
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(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 CreateCategoryInput ¶ added in v0.3.3
type CreateCategoryInput struct { Text string Status category.Status Config *schematype.CategoryConfig Duration *time.Duration Count *uint64 Strings []string TodoIDs []pulid.ID SubCategoryIDs []pulid.ID }
CreateCategoryInput represents a mutation input for creating categories.
func (*CreateCategoryInput) Mutate ¶ added in v0.3.3
func (i *CreateCategoryInput) Mutate(m *CategoryMutation)
Mutate applies the CreateCategoryInput on the CategoryMutation builder.
type CreateTodoInput ¶ added in v0.3.0
type CreateTodoInput struct { Status todo.Status Priority *int Text string Init map[string]interface{} ParentID *pulid.ID ChildIDs []pulid.ID CategoryID *pulid.ID SecretID *pulid.ID }
CreateTodoInput represents a mutation input for creating todos.
func (*CreateTodoInput) Mutate ¶ added in v0.3.0
func (i *CreateTodoInput) Mutate(m *TodoMutation)
Mutate applies the CreateTodoInput on the TodoMutation builder.
type CreateUserInput ¶ added in v0.3.0
type CreateUserInput struct { Name *string Username *uuid.UUID Password *string Metadata map[string]interface{} GroupIDs []pulid.ID FriendIDs []pulid.ID }
CreateUserInput represents a mutation input for creating users.
func (*CreateUserInput) Mutate ¶ added in v0.3.0
func (i *CreateUserInput) Mutate(m *UserMutation)
Mutate applies the CreateUserInput on the UserMutation builder.
type Friendship ¶ added in v0.3.0
type Friendship struct { // ID of the ent. ID pulid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UserID holds the value of the "user_id" field. UserID pulid.ID `json:"user_id,omitempty"` // FriendID holds the value of the "friend_id" field. FriendID pulid.ID `json:"friend_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FriendshipQuery when eager-loading is set. Edges FriendshipEdges `json:"edges"` // contains filtered or unexported fields }
Friendship is the model entity for the Friendship schema.
func (*Friendship) Friend ¶ added in v0.3.0
func (f *Friendship) Friend(ctx context.Context) (*User, error)
func (*Friendship) IsNode ¶ added in v0.3.5
func (n *Friendship) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Friendship) QueryFriend ¶ added in v0.3.0
func (f *Friendship) QueryFriend() *UserQuery
QueryFriend queries the "friend" edge of the Friendship entity.
func (*Friendship) QueryUser ¶ added in v0.3.0
func (f *Friendship) QueryUser() *UserQuery
QueryUser queries the "user" edge of the Friendship entity.
func (*Friendship) String ¶ added in v0.3.0
func (f *Friendship) String() string
String implements the fmt.Stringer.
func (*Friendship) ToEdge ¶ added in v0.3.0
func (f *Friendship) ToEdge(order *FriendshipOrder) *FriendshipEdge
ToEdge converts Friendship into FriendshipEdge.
func (*Friendship) Unwrap ¶ added in v0.3.0
func (f *Friendship) Unwrap() *Friendship
Unwrap unwraps the Friendship 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 (*Friendship) Update ¶ added in v0.3.0
func (f *Friendship) Update() *FriendshipUpdateOne
Update returns a builder for updating this Friendship. Note that you need to call Friendship.Unwrap() before calling this method if this Friendship was returned from a transaction, and the transaction was committed or rolled back.
type FriendshipClient ¶ added in v0.3.0
type FriendshipClient struct {
// contains filtered or unexported fields
}
FriendshipClient is a client for the Friendship schema.
func NewFriendshipClient ¶ added in v0.3.0
func NewFriendshipClient(c config) *FriendshipClient
NewFriendshipClient returns a client for the Friendship from the given config.
func (*FriendshipClient) Create ¶ added in v0.3.0
func (c *FriendshipClient) Create() *FriendshipCreate
Create returns a builder for creating a Friendship entity.
func (*FriendshipClient) CreateBulk ¶ added in v0.3.0
func (c *FriendshipClient) CreateBulk(builders ...*FriendshipCreate) *FriendshipCreateBulk
CreateBulk returns a builder for creating a bulk of Friendship entities.
func (*FriendshipClient) Delete ¶ added in v0.3.0
func (c *FriendshipClient) Delete() *FriendshipDelete
Delete returns a delete builder for Friendship.
func (*FriendshipClient) DeleteOne ¶ added in v0.3.0
func (c *FriendshipClient) DeleteOne(f *Friendship) *FriendshipDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FriendshipClient) DeleteOneID ¶ added in v0.3.0
func (c *FriendshipClient) DeleteOneID(id pulid.ID) *FriendshipDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FriendshipClient) Get ¶ added in v0.3.0
func (c *FriendshipClient) Get(ctx context.Context, id pulid.ID) (*Friendship, error)
Get returns a Friendship entity by its id.
func (*FriendshipClient) GetX ¶ added in v0.3.0
func (c *FriendshipClient) GetX(ctx context.Context, id pulid.ID) *Friendship
GetX is like Get, but panics if an error occurs.
func (*FriendshipClient) Hooks ¶ added in v0.3.0
func (c *FriendshipClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FriendshipClient) Intercept ¶ added in v0.3.5
func (c *FriendshipClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `friendship.Intercept(f(g(h())))`.
func (*FriendshipClient) Interceptors ¶ added in v0.3.5
func (c *FriendshipClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FriendshipClient) Query ¶ added in v0.3.0
func (c *FriendshipClient) Query() *FriendshipQuery
Query returns a query builder for Friendship.
func (*FriendshipClient) QueryFriend ¶ added in v0.3.0
func (c *FriendshipClient) QueryFriend(f *Friendship) *UserQuery
QueryFriend queries the friend edge of a Friendship.
func (*FriendshipClient) QueryUser ¶ added in v0.3.0
func (c *FriendshipClient) QueryUser(f *Friendship) *UserQuery
QueryUser queries the user edge of a Friendship.
func (*FriendshipClient) Update ¶ added in v0.3.0
func (c *FriendshipClient) Update() *FriendshipUpdate
Update returns an update builder for Friendship.
func (*FriendshipClient) UpdateOne ¶ added in v0.3.0
func (c *FriendshipClient) UpdateOne(f *Friendship) *FriendshipUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FriendshipClient) UpdateOneID ¶ added in v0.3.0
func (c *FriendshipClient) UpdateOneID(id pulid.ID) *FriendshipUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FriendshipClient) Use ¶ added in v0.3.0
func (c *FriendshipClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `friendship.Hooks(f(g(h())))`.
type FriendshipConnection ¶ added in v0.3.0
type FriendshipConnection struct { Edges []*FriendshipEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
FriendshipConnection is the connection containing edges to Friendship.
type FriendshipCreate ¶ added in v0.3.0
type FriendshipCreate struct {
// contains filtered or unexported fields
}
FriendshipCreate is the builder for creating a Friendship entity.
func (*FriendshipCreate) Exec ¶ added in v0.3.0
func (fc *FriendshipCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendshipCreate) ExecX ¶ added in v0.3.0
func (fc *FriendshipCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipCreate) Mutation ¶ added in v0.3.0
func (fc *FriendshipCreate) Mutation() *FriendshipMutation
Mutation returns the FriendshipMutation object of the builder.
func (*FriendshipCreate) Save ¶ added in v0.3.0
func (fc *FriendshipCreate) Save(ctx context.Context) (*Friendship, error)
Save creates the Friendship in the database.
func (*FriendshipCreate) SaveX ¶ added in v0.3.0
func (fc *FriendshipCreate) SaveX(ctx context.Context) *Friendship
SaveX calls Save and panics if Save returns an error.
func (*FriendshipCreate) SetCreatedAt ¶ added in v0.3.0
func (fc *FriendshipCreate) SetCreatedAt(t time.Time) *FriendshipCreate
SetCreatedAt sets the "created_at" field.
func (*FriendshipCreate) SetFriend ¶ added in v0.3.0
func (fc *FriendshipCreate) SetFriend(u *User) *FriendshipCreate
SetFriend sets the "friend" edge to the User entity.
func (*FriendshipCreate) SetFriendID ¶ added in v0.3.0
func (fc *FriendshipCreate) SetFriendID(pu pulid.ID) *FriendshipCreate
SetFriendID sets the "friend_id" field.
func (*FriendshipCreate) SetID ¶ added in v0.3.0
func (fc *FriendshipCreate) SetID(pu pulid.ID) *FriendshipCreate
SetID sets the "id" field.
func (*FriendshipCreate) SetNillableCreatedAt ¶ added in v0.3.0
func (fc *FriendshipCreate) SetNillableCreatedAt(t *time.Time) *FriendshipCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FriendshipCreate) SetNillableID ¶ added in v0.3.0
func (fc *FriendshipCreate) SetNillableID(pu *pulid.ID) *FriendshipCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*FriendshipCreate) SetUser ¶ added in v0.3.0
func (fc *FriendshipCreate) SetUser(u *User) *FriendshipCreate
SetUser sets the "user" edge to the User entity.
func (*FriendshipCreate) SetUserID ¶ added in v0.3.0
func (fc *FriendshipCreate) SetUserID(pu pulid.ID) *FriendshipCreate
SetUserID sets the "user_id" field.
type FriendshipCreateBulk ¶ added in v0.3.0
type FriendshipCreateBulk struct {
// contains filtered or unexported fields
}
FriendshipCreateBulk is the builder for creating many Friendship entities in bulk.
func (*FriendshipCreateBulk) Exec ¶ added in v0.3.0
func (fcb *FriendshipCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendshipCreateBulk) ExecX ¶ added in v0.3.0
func (fcb *FriendshipCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipCreateBulk) Save ¶ added in v0.3.0
func (fcb *FriendshipCreateBulk) Save(ctx context.Context) ([]*Friendship, error)
Save creates the Friendship entities in the database.
func (*FriendshipCreateBulk) SaveX ¶ added in v0.3.0
func (fcb *FriendshipCreateBulk) SaveX(ctx context.Context) []*Friendship
SaveX is like Save, but panics if an error occurs.
type FriendshipDelete ¶ added in v0.3.0
type FriendshipDelete struct {
// contains filtered or unexported fields
}
FriendshipDelete is the builder for deleting a Friendship entity.
func (*FriendshipDelete) Exec ¶ added in v0.3.0
func (fd *FriendshipDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FriendshipDelete) ExecX ¶ added in v0.3.0
func (fd *FriendshipDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipDelete) Where ¶ added in v0.3.0
func (fd *FriendshipDelete) Where(ps ...predicate.Friendship) *FriendshipDelete
Where appends a list predicates to the FriendshipDelete builder.
type FriendshipDeleteOne ¶ added in v0.3.0
type FriendshipDeleteOne struct {
// contains filtered or unexported fields
}
FriendshipDeleteOne is the builder for deleting a single Friendship entity.
func (*FriendshipDeleteOne) Exec ¶ added in v0.3.0
func (fdo *FriendshipDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FriendshipDeleteOne) ExecX ¶ added in v0.3.0
func (fdo *FriendshipDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipDeleteOne) Where ¶ added in v0.4.0
func (fdo *FriendshipDeleteOne) Where(ps ...predicate.Friendship) *FriendshipDeleteOne
Where appends a list predicates to the FriendshipDelete builder.
type FriendshipEdge ¶ added in v0.3.0
type FriendshipEdge struct { Node *Friendship `json:"node"` Cursor Cursor `json:"cursor"` }
FriendshipEdge is the edge representation of Friendship.
type FriendshipEdges ¶ added in v0.3.0
type FriendshipEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Friend holds the value of the friend edge. Friend *User `json:"friend,omitempty"` // contains filtered or unexported fields }
FriendshipEdges holds the relations/edges for other nodes in the graph.
func (FriendshipEdges) FriendOrErr ¶ added in v0.3.0
func (e FriendshipEdges) FriendOrErr() (*User, error)
FriendOrErr returns the Friend value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (FriendshipEdges) UserOrErr ¶ added in v0.3.0
func (e FriendshipEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FriendshipGroupBy ¶ added in v0.3.0
type FriendshipGroupBy struct {
// contains filtered or unexported fields
}
FriendshipGroupBy is the group-by builder for Friendship entities.
func (*FriendshipGroupBy) Aggregate ¶ added in v0.3.0
func (fgb *FriendshipGroupBy) Aggregate(fns ...AggregateFunc) *FriendshipGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FriendshipGroupBy) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) BoolX ¶ added in v0.3.0
BoolX is like Bool, but panics if an error occurs.
func (*FriendshipGroupBy) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) BoolsX ¶ added in v0.3.0
BoolsX is like Bools, but panics if an error occurs.
func (*FriendshipGroupBy) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*FriendshipGroupBy) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*FriendshipGroupBy) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) IntsX ¶ added in v0.3.0
IntsX is like Ints, but panics if an error occurs.
func (*FriendshipGroupBy) Scan ¶ added in v0.3.0
func (fgb *FriendshipGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FriendshipGroupBy) ScanX ¶ added in v0.3.0
ScanX is like Scan, but panics if an error occurs.
func (*FriendshipGroupBy) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type FriendshipMutation ¶ added in v0.3.0
type FriendshipMutation struct {
// contains filtered or unexported fields
}
FriendshipMutation represents an operation that mutates the Friendship nodes in the graph.
func (*FriendshipMutation) AddField ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) AddedEdges ¶ added in v0.3.0
func (m *FriendshipMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FriendshipMutation) AddedField ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) AddedFields ¶ added in v0.3.0
func (m *FriendshipMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FriendshipMutation) AddedIDs ¶ added in v0.3.0
func (m *FriendshipMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FriendshipMutation) ClearEdge ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) ClearField ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) ClearFriend ¶ added in v0.3.0
func (m *FriendshipMutation) ClearFriend()
ClearFriend clears the "friend" edge to the User entity.
func (*FriendshipMutation) ClearUser ¶ added in v0.3.0
func (m *FriendshipMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*FriendshipMutation) ClearedEdges ¶ added in v0.3.0
func (m *FriendshipMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FriendshipMutation) ClearedFields ¶ added in v0.3.0
func (m *FriendshipMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FriendshipMutation) Client ¶ added in v0.3.0
func (m FriendshipMutation) 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 (*FriendshipMutation) CreatedAt ¶ added in v0.3.0
func (m *FriendshipMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FriendshipMutation) EdgeCleared ¶ added in v0.3.0
func (m *FriendshipMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FriendshipMutation) Field ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) FieldCleared ¶ added in v0.3.0
func (m *FriendshipMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FriendshipMutation) Fields ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) FriendCleared ¶ added in v0.3.0
func (m *FriendshipMutation) FriendCleared() bool
FriendCleared reports if the "friend" edge to the User entity was cleared.
func (*FriendshipMutation) FriendID ¶ added in v0.3.0
func (m *FriendshipMutation) FriendID() (r pulid.ID, exists bool)
FriendID returns the value of the "friend_id" field in the mutation.
func (*FriendshipMutation) FriendIDs ¶ added in v0.3.0
func (m *FriendshipMutation) FriendIDs() (ids []pulid.ID)
FriendIDs returns the "friend" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FriendID instead. It exists only for internal usage by the builders.
func (*FriendshipMutation) ID ¶ added in v0.3.0
func (m *FriendshipMutation) ID() (id pulid.ID, 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 (*FriendshipMutation) IDs ¶ added in v0.3.0
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 (*FriendshipMutation) OldCreatedAt ¶ added in v0.3.0
OldCreatedAt returns the old "created_at" field's value of the Friendship entity. If the Friendship 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 (*FriendshipMutation) OldField ¶ added in v0.3.0
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 (*FriendshipMutation) OldFriendID ¶ added in v0.3.0
OldFriendID returns the old "friend_id" field's value of the Friendship entity. If the Friendship 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 (*FriendshipMutation) OldUserID ¶ added in v0.3.0
OldUserID returns the old "user_id" field's value of the Friendship entity. If the Friendship 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 (*FriendshipMutation) Op ¶ added in v0.3.0
func (m *FriendshipMutation) Op() Op
Op returns the operation name.
func (*FriendshipMutation) RemovedEdges ¶ added in v0.3.0
func (m *FriendshipMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FriendshipMutation) RemovedIDs ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) ResetCreatedAt ¶ added in v0.3.0
func (m *FriendshipMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FriendshipMutation) ResetEdge ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) ResetField ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) ResetFriend ¶ added in v0.3.0
func (m *FriendshipMutation) ResetFriend()
ResetFriend resets all changes to the "friend" edge.
func (*FriendshipMutation) ResetFriendID ¶ added in v0.3.0
func (m *FriendshipMutation) ResetFriendID()
ResetFriendID resets all changes to the "friend_id" field.
func (*FriendshipMutation) ResetUser ¶ added in v0.3.0
func (m *FriendshipMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*FriendshipMutation) ResetUserID ¶ added in v0.3.0
func (m *FriendshipMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*FriendshipMutation) SetCreatedAt ¶ added in v0.3.0
func (m *FriendshipMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FriendshipMutation) SetField ¶ added in v0.3.0
func (m *FriendshipMutation) 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 (*FriendshipMutation) SetFriendID ¶ added in v0.3.0
func (m *FriendshipMutation) SetFriendID(pu pulid.ID)
SetFriendID sets the "friend_id" field.
func (*FriendshipMutation) SetID ¶ added in v0.3.0
func (m *FriendshipMutation) SetID(id pulid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Friendship entities.
func (*FriendshipMutation) SetOp ¶ added in v0.3.5
func (m *FriendshipMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FriendshipMutation) SetUserID ¶ added in v0.3.0
func (m *FriendshipMutation) SetUserID(pu pulid.ID)
SetUserID sets the "user_id" field.
func (FriendshipMutation) Tx ¶ added in v0.3.0
func (m FriendshipMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FriendshipMutation) Type ¶ added in v0.3.0
func (m *FriendshipMutation) Type() string
Type returns the node type of this mutation (Friendship).
func (*FriendshipMutation) UserCleared ¶ added in v0.3.0
func (m *FriendshipMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*FriendshipMutation) UserID ¶ added in v0.3.0
func (m *FriendshipMutation) UserID() (r pulid.ID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*FriendshipMutation) UserIDs ¶ added in v0.3.0
func (m *FriendshipMutation) UserIDs() (ids []pulid.ID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*FriendshipMutation) Where ¶ added in v0.3.0
func (m *FriendshipMutation) Where(ps ...predicate.Friendship)
Where appends a list predicates to the FriendshipMutation builder.
func (*FriendshipMutation) WhereP ¶ added in v0.3.5
func (m *FriendshipMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FriendshipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FriendshipOrder ¶ added in v0.3.0
type FriendshipOrder struct { Direction OrderDirection `json:"direction"` Field *FriendshipOrderField `json:"field"` }
FriendshipOrder defines the ordering of Friendship.
type FriendshipOrderField ¶ added in v0.3.0
type FriendshipOrderField struct { // Value extracts the ordering value from the given Friendship. Value func(*Friendship) (ent.Value, error) // contains filtered or unexported fields }
FriendshipOrderField defines the ordering field of Friendship.
type FriendshipPaginateOption ¶ added in v0.3.0
type FriendshipPaginateOption func(*friendshipPager) error
FriendshipPaginateOption enables pagination customization.
func WithFriendshipFilter ¶ added in v0.3.0
func WithFriendshipFilter(filter func(*FriendshipQuery) (*FriendshipQuery, error)) FriendshipPaginateOption
WithFriendshipFilter configures pagination filter.
func WithFriendshipOrder ¶ added in v0.3.0
func WithFriendshipOrder(order *FriendshipOrder) FriendshipPaginateOption
WithFriendshipOrder configures pagination ordering.
type FriendshipQuery ¶ added in v0.3.0
type FriendshipQuery struct {
// contains filtered or unexported fields
}
FriendshipQuery is the builder for querying Friendship entities.
func (*FriendshipQuery) Aggregate ¶ added in v0.3.4
func (fq *FriendshipQuery) Aggregate(fns ...AggregateFunc) *FriendshipSelect
Aggregate returns a FriendshipSelect configured with the given aggregations.
func (*FriendshipQuery) All ¶ added in v0.3.0
func (fq *FriendshipQuery) All(ctx context.Context) ([]*Friendship, error)
All executes the query and returns a list of Friendships.
func (*FriendshipQuery) AllX ¶ added in v0.3.0
func (fq *FriendshipQuery) AllX(ctx context.Context) []*Friendship
AllX is like All, but panics if an error occurs.
func (*FriendshipQuery) Clone ¶ added in v0.3.0
func (fq *FriendshipQuery) Clone() *FriendshipQuery
Clone returns a duplicate of the FriendshipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FriendshipQuery) CollectFields ¶ added in v0.3.0
func (f *FriendshipQuery) CollectFields(ctx context.Context, satisfies ...string) (*FriendshipQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*FriendshipQuery) Count ¶ added in v0.3.0
func (fq *FriendshipQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FriendshipQuery) CountX ¶ added in v0.3.0
func (fq *FriendshipQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FriendshipQuery) Exist ¶ added in v0.3.0
func (fq *FriendshipQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FriendshipQuery) ExistX ¶ added in v0.3.0
func (fq *FriendshipQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FriendshipQuery) First ¶ added in v0.3.0
func (fq *FriendshipQuery) First(ctx context.Context) (*Friendship, error)
First returns the first Friendship entity from the query. Returns a *NotFoundError when no Friendship was found.
func (*FriendshipQuery) FirstID ¶ added in v0.3.0
FirstID returns the first Friendship ID from the query. Returns a *NotFoundError when no Friendship ID was found.
func (*FriendshipQuery) FirstIDX ¶ added in v0.3.0
func (fq *FriendshipQuery) FirstIDX(ctx context.Context) pulid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*FriendshipQuery) FirstX ¶ added in v0.3.0
func (fq *FriendshipQuery) FirstX(ctx context.Context) *Friendship
FirstX is like First, but panics if an error occurs.
func (*FriendshipQuery) GroupBy ¶ added in v0.3.0
func (fq *FriendshipQuery) GroupBy(field string, fields ...string) *FriendshipGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Friendship.Query(). GroupBy(friendship.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FriendshipQuery) IDs ¶ added in v0.3.0
IDs executes the query and returns a list of Friendship IDs.
func (*FriendshipQuery) IDsX ¶ added in v0.3.0
func (fq *FriendshipQuery) IDsX(ctx context.Context) []pulid.ID
IDsX is like IDs, but panics if an error occurs.
func (*FriendshipQuery) Limit ¶ added in v0.3.0
func (fq *FriendshipQuery) Limit(limit int) *FriendshipQuery
Limit the number of records to be returned by this query.
func (*FriendshipQuery) Offset ¶ added in v0.3.0
func (fq *FriendshipQuery) Offset(offset int) *FriendshipQuery
Offset to start from.
func (*FriendshipQuery) Only ¶ added in v0.3.0
func (fq *FriendshipQuery) Only(ctx context.Context) (*Friendship, error)
Only returns a single Friendship entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Friendship entity is found. Returns a *NotFoundError when no Friendship entities are found.
func (*FriendshipQuery) OnlyID ¶ added in v0.3.0
OnlyID is like Only, but returns the only Friendship ID in the query. Returns a *NotSingularError when more than one Friendship ID is found. Returns a *NotFoundError when no entities are found.
func (*FriendshipQuery) OnlyIDX ¶ added in v0.3.0
func (fq *FriendshipQuery) OnlyIDX(ctx context.Context) pulid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FriendshipQuery) OnlyX ¶ added in v0.3.0
func (fq *FriendshipQuery) OnlyX(ctx context.Context) *Friendship
OnlyX is like Only, but panics if an error occurs.
func (*FriendshipQuery) Order ¶ added in v0.3.0
func (fq *FriendshipQuery) Order(o ...friendship.OrderOption) *FriendshipQuery
Order specifies how the records should be ordered.
func (*FriendshipQuery) Paginate ¶ added in v0.3.0
func (f *FriendshipQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...FriendshipPaginateOption, ) (*FriendshipConnection, error)
Paginate executes the query and returns a relay based cursor connection to Friendship.
func (*FriendshipQuery) QueryFriend ¶ added in v0.3.0
func (fq *FriendshipQuery) QueryFriend() *UserQuery
QueryFriend chains the current query on the "friend" edge.
func (*FriendshipQuery) QueryUser ¶ added in v0.3.0
func (fq *FriendshipQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*FriendshipQuery) Select ¶ added in v0.3.0
func (fq *FriendshipQuery) Select(fields ...string) *FriendshipSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Friendship.Query(). Select(friendship.FieldCreatedAt). Scan(ctx, &v)
func (*FriendshipQuery) Unique ¶ added in v0.3.0
func (fq *FriendshipQuery) Unique(unique bool) *FriendshipQuery
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 (*FriendshipQuery) Where ¶ added in v0.3.0
func (fq *FriendshipQuery) Where(ps ...predicate.Friendship) *FriendshipQuery
Where adds a new predicate for the FriendshipQuery builder.
func (*FriendshipQuery) WithFriend ¶ added in v0.3.0
func (fq *FriendshipQuery) WithFriend(opts ...func(*UserQuery)) *FriendshipQuery
WithFriend tells the query-builder to eager-load the nodes that are connected to the "friend" edge. The optional arguments are used to configure the query builder of the edge.
func (*FriendshipQuery) WithUser ¶ added in v0.3.0
func (fq *FriendshipQuery) WithUser(opts ...func(*UserQuery)) *FriendshipQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type FriendshipSelect ¶ added in v0.3.0
type FriendshipSelect struct { *FriendshipQuery // contains filtered or unexported fields }
FriendshipSelect is the builder for selecting fields of Friendship entities.
func (*FriendshipSelect) Aggregate ¶ added in v0.3.4
func (fs *FriendshipSelect) Aggregate(fns ...AggregateFunc) *FriendshipSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FriendshipSelect) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) BoolsX ¶ added in v0.3.0
BoolsX is like Bools, but panics if an error occurs.
func (*FriendshipSelect) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*FriendshipSelect) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*FriendshipSelect) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Scan ¶ added in v0.3.0
func (fs *FriendshipSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FriendshipSelect) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type FriendshipUpdate ¶ added in v0.3.0
type FriendshipUpdate struct {
// contains filtered or unexported fields
}
FriendshipUpdate is the builder for updating Friendship entities.
func (*FriendshipUpdate) ClearFriend ¶ added in v0.3.0
func (fu *FriendshipUpdate) ClearFriend() *FriendshipUpdate
ClearFriend clears the "friend" edge to the User entity.
func (*FriendshipUpdate) ClearUser ¶ added in v0.3.0
func (fu *FriendshipUpdate) ClearUser() *FriendshipUpdate
ClearUser clears the "user" edge to the User entity.
func (*FriendshipUpdate) Exec ¶ added in v0.3.0
func (fu *FriendshipUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendshipUpdate) ExecX ¶ added in v0.3.0
func (fu *FriendshipUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipUpdate) Mutation ¶ added in v0.3.0
func (fu *FriendshipUpdate) Mutation() *FriendshipMutation
Mutation returns the FriendshipMutation object of the builder.
func (*FriendshipUpdate) Save ¶ added in v0.3.0
func (fu *FriendshipUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FriendshipUpdate) SaveX ¶ added in v0.3.0
func (fu *FriendshipUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FriendshipUpdate) SetCreatedAt ¶ added in v0.3.0
func (fu *FriendshipUpdate) SetCreatedAt(t time.Time) *FriendshipUpdate
SetCreatedAt sets the "created_at" field.
func (*FriendshipUpdate) SetFriend ¶ added in v0.3.0
func (fu *FriendshipUpdate) SetFriend(u *User) *FriendshipUpdate
SetFriend sets the "friend" edge to the User entity.
func (*FriendshipUpdate) SetFriendID ¶ added in v0.3.0
func (fu *FriendshipUpdate) SetFriendID(pu pulid.ID) *FriendshipUpdate
SetFriendID sets the "friend_id" field.
func (*FriendshipUpdate) SetNillableCreatedAt ¶ added in v0.3.0
func (fu *FriendshipUpdate) SetNillableCreatedAt(t *time.Time) *FriendshipUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FriendshipUpdate) SetUser ¶ added in v0.3.0
func (fu *FriendshipUpdate) SetUser(u *User) *FriendshipUpdate
SetUser sets the "user" edge to the User entity.
func (*FriendshipUpdate) SetUserID ¶ added in v0.3.0
func (fu *FriendshipUpdate) SetUserID(pu pulid.ID) *FriendshipUpdate
SetUserID sets the "user_id" field.
func (*FriendshipUpdate) Where ¶ added in v0.3.0
func (fu *FriendshipUpdate) Where(ps ...predicate.Friendship) *FriendshipUpdate
Where appends a list predicates to the FriendshipUpdate builder.
type FriendshipUpdateOne ¶ added in v0.3.0
type FriendshipUpdateOne struct {
// contains filtered or unexported fields
}
FriendshipUpdateOne is the builder for updating a single Friendship entity.
func (*FriendshipUpdateOne) ClearFriend ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) ClearFriend() *FriendshipUpdateOne
ClearFriend clears the "friend" edge to the User entity.
func (*FriendshipUpdateOne) ClearUser ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) ClearUser() *FriendshipUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*FriendshipUpdateOne) Exec ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FriendshipUpdateOne) ExecX ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipUpdateOne) Mutation ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) Mutation() *FriendshipMutation
Mutation returns the FriendshipMutation object of the builder.
func (*FriendshipUpdateOne) Save ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) Save(ctx context.Context) (*Friendship, error)
Save executes the query and returns the updated Friendship entity.
func (*FriendshipUpdateOne) SaveX ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) SaveX(ctx context.Context) *Friendship
SaveX is like Save, but panics if an error occurs.
func (*FriendshipUpdateOne) Select ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) Select(field string, fields ...string) *FriendshipUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FriendshipUpdateOne) SetCreatedAt ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) SetCreatedAt(t time.Time) *FriendshipUpdateOne
SetCreatedAt sets the "created_at" field.
func (*FriendshipUpdateOne) SetFriend ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) SetFriend(u *User) *FriendshipUpdateOne
SetFriend sets the "friend" edge to the User entity.
func (*FriendshipUpdateOne) SetFriendID ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) SetFriendID(pu pulid.ID) *FriendshipUpdateOne
SetFriendID sets the "friend_id" field.
func (*FriendshipUpdateOne) SetNillableCreatedAt ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) SetNillableCreatedAt(t *time.Time) *FriendshipUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FriendshipUpdateOne) SetUser ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) SetUser(u *User) *FriendshipUpdateOne
SetUser sets the "user" edge to the User entity.
func (*FriendshipUpdateOne) SetUserID ¶ added in v0.3.0
func (fuo *FriendshipUpdateOne) SetUserID(pu pulid.ID) *FriendshipUpdateOne
SetUserID sets the "user_id" field.
func (*FriendshipUpdateOne) Where ¶ added in v0.4.0
func (fuo *FriendshipUpdateOne) Where(ps ...predicate.Friendship) *FriendshipUpdateOne
Where appends a list predicates to the FriendshipUpdate builder.
type FriendshipWhereInput ¶ added in v0.3.0
type FriendshipWhereInput struct { Predicates []predicate.Friendship `json:"-"` Not *FriendshipWhereInput `json:"not,omitempty"` Or []*FriendshipWhereInput `json:"or,omitempty"` And []*FriendshipWhereInput `json:"and,omitempty"` // "id" field predicates. ID *pulid.ID `json:"id,omitempty"` IDNEQ *pulid.ID `json:"idNEQ,omitempty"` IDIn []pulid.ID `json:"idIn,omitempty"` IDNotIn []pulid.ID `json:"idNotIn,omitempty"` IDGT *pulid.ID `json:"idGT,omitempty"` IDGTE *pulid.ID `json:"idGTE,omitempty"` IDLT *pulid.ID `json:"idLT,omitempty"` IDLTE *pulid.ID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "user_id" field predicates. UserID *pulid.ID `json:"userID,omitempty"` UserIDNEQ *pulid.ID `json:"userIDNEQ,omitempty"` UserIDIn []pulid.ID `json:"userIDIn,omitempty"` UserIDNotIn []pulid.ID `json:"userIDNotIn,omitempty"` UserIDGT *pulid.ID `json:"userIDGT,omitempty"` UserIDGTE *pulid.ID `json:"userIDGTE,omitempty"` UserIDLT *pulid.ID `json:"userIDLT,omitempty"` UserIDLTE *pulid.ID `json:"userIDLTE,omitempty"` UserIDContains *pulid.ID `json:"userIDContains,omitempty"` UserIDHasPrefix *pulid.ID `json:"userIDHasPrefix,omitempty"` UserIDHasSuffix *pulid.ID `json:"userIDHasSuffix,omitempty"` UserIDEqualFold *pulid.ID `json:"userIDEqualFold,omitempty"` UserIDContainsFold *pulid.ID `json:"userIDContainsFold,omitempty"` // "friend_id" field predicates. FriendID *pulid.ID `json:"friendID,omitempty"` FriendIDNEQ *pulid.ID `json:"friendIDNEQ,omitempty"` FriendIDIn []pulid.ID `json:"friendIDIn,omitempty"` FriendIDNotIn []pulid.ID `json:"friendIDNotIn,omitempty"` FriendIDGT *pulid.ID `json:"friendIDGT,omitempty"` FriendIDGTE *pulid.ID `json:"friendIDGTE,omitempty"` FriendIDLT *pulid.ID `json:"friendIDLT,omitempty"` FriendIDLTE *pulid.ID `json:"friendIDLTE,omitempty"` FriendIDContains *pulid.ID `json:"friendIDContains,omitempty"` FriendIDHasPrefix *pulid.ID `json:"friendIDHasPrefix,omitempty"` FriendIDHasSuffix *pulid.ID `json:"friendIDHasSuffix,omitempty"` FriendIDEqualFold *pulid.ID `json:"friendIDEqualFold,omitempty"` FriendIDContainsFold *pulid.ID `json:"friendIDContainsFold,omitempty"` // "user" edge predicates. HasUser *bool `json:"hasUser,omitempty"` HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"` // "friend" edge predicates. HasFriend *bool `json:"hasFriend,omitempty"` HasFriendWith []*UserWhereInput `json:"hasFriendWith,omitempty"` }
FriendshipWhereInput represents a where input for filtering Friendship queries.
func (*FriendshipWhereInput) AddPredicates ¶ added in v0.3.0
func (i *FriendshipWhereInput) AddPredicates(predicates ...predicate.Friendship)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*FriendshipWhereInput) Filter ¶ added in v0.3.0
func (i *FriendshipWhereInput) Filter(q *FriendshipQuery) (*FriendshipQuery, error)
Filter applies the FriendshipWhereInput filter on the FriendshipQuery builder.
func (*FriendshipWhereInput) P ¶ added in v0.3.0
func (i *FriendshipWhereInput) P() (predicate.Friendship, error)
P returns a predicate for filtering friendships. An error is returned if the input is empty or invalid.
type Friendships ¶ added in v0.3.0
type Friendships []*Friendship
Friendships is a parsable slice of Friendship.
type Group ¶ added in v0.3.0
type Group struct { // ID of the ent. ID pulid.ID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupQuery when eager-loading is set. Edges GroupEdges `json:"edges"` // contains filtered or unexported fields }
Group is the model entity for the Group schema.
func (*Group) IsNode ¶ added in v0.3.5
func (n *Group) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Group) NamedUsers ¶ added in v0.3.1
NamedUsers returns the Users named value or an error if the edge was not loaded in eager-loading with this name.
func (*Group) QueryUsers ¶ added in v0.3.0
QueryUsers queries the "users" edge of the Group entity.
func (*Group) ToEdge ¶ added in v0.3.0
func (gr *Group) ToEdge(order *GroupOrder) *GroupEdge
ToEdge converts Group into GroupEdge.
func (*Group) Unwrap ¶ added in v0.3.0
Unwrap unwraps the Group 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 (*Group) Update ¶ added in v0.3.0
func (gr *Group) Update() *GroupUpdateOne
Update returns a builder for updating this Group. Note that you need to call Group.Unwrap() before calling this method if this Group was returned from a transaction, and the transaction was committed or rolled back.
type GroupClient ¶ added in v0.3.0
type GroupClient struct {
// contains filtered or unexported fields
}
GroupClient is a client for the Group schema.
func NewGroupClient ¶ added in v0.3.0
func NewGroupClient(c config) *GroupClient
NewGroupClient returns a client for the Group from the given config.
func (*GroupClient) Create ¶ added in v0.3.0
func (c *GroupClient) Create() *GroupCreate
Create returns a builder for creating a Group entity.
func (*GroupClient) CreateBulk ¶ added in v0.3.0
func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
CreateBulk returns a builder for creating a bulk of Group entities.
func (*GroupClient) Delete ¶ added in v0.3.0
func (c *GroupClient) Delete() *GroupDelete
Delete returns a delete builder for Group.
func (*GroupClient) DeleteOne ¶ added in v0.3.0
func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroupClient) DeleteOneID ¶ added in v0.3.0
func (c *GroupClient) DeleteOneID(id pulid.ID) *GroupDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroupClient) Hooks ¶ added in v0.3.0
func (c *GroupClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroupClient) Intercept ¶ added in v0.3.5
func (c *GroupClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `group.Intercept(f(g(h())))`.
func (*GroupClient) Interceptors ¶ added in v0.3.5
func (c *GroupClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroupClient) Query ¶ added in v0.3.0
func (c *GroupClient) Query() *GroupQuery
Query returns a query builder for Group.
func (*GroupClient) QueryUsers ¶ added in v0.3.0
func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
QueryUsers queries the users edge of a Group.
func (*GroupClient) Update ¶ added in v0.3.0
func (c *GroupClient) Update() *GroupUpdate
Update returns an update builder for Group.
func (*GroupClient) UpdateOne ¶ added in v0.3.0
func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupClient) UpdateOneID ¶ added in v0.3.0
func (c *GroupClient) UpdateOneID(id pulid.ID) *GroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupClient) Use ¶ added in v0.3.0
func (c *GroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `group.Hooks(f(g(h())))`.
type GroupConnection ¶ added in v0.3.0
type GroupConnection struct { Edges []*GroupEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
GroupConnection is the connection containing edges to Group.
type GroupCreate ¶ added in v0.3.0
type GroupCreate struct {
// contains filtered or unexported fields
}
GroupCreate is the builder for creating a Group entity.
func (*GroupCreate) AddUserIDs ¶ added in v0.3.0
func (gc *GroupCreate) AddUserIDs(ids ...pulid.ID) *GroupCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupCreate) AddUsers ¶ added in v0.3.0
func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
AddUsers adds the "users" edges to the User entity.
func (*GroupCreate) Exec ¶ added in v0.3.0
func (gc *GroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreate) ExecX ¶ added in v0.3.0
func (gc *GroupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupCreate) Mutation ¶ added in v0.3.0
func (gc *GroupCreate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupCreate) Save ¶ added in v0.3.0
func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
Save creates the Group in the database.
func (*GroupCreate) SaveX ¶ added in v0.3.0
func (gc *GroupCreate) SaveX(ctx context.Context) *Group
SaveX calls Save and panics if Save returns an error.
func (*GroupCreate) SetID ¶ added in v0.3.0
func (gc *GroupCreate) SetID(pu pulid.ID) *GroupCreate
SetID sets the "id" field.
func (*GroupCreate) SetName ¶ added in v0.3.0
func (gc *GroupCreate) SetName(s string) *GroupCreate
SetName sets the "name" field.
func (*GroupCreate) SetNillableID ¶ added in v0.3.0
func (gc *GroupCreate) SetNillableID(pu *pulid.ID) *GroupCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*GroupCreate) SetNillableName ¶ added in v0.3.0
func (gc *GroupCreate) SetNillableName(s *string) *GroupCreate
SetNillableName sets the "name" field if the given value is not nil.
type GroupCreateBulk ¶ added in v0.3.0
type GroupCreateBulk struct {
// contains filtered or unexported fields
}
GroupCreateBulk is the builder for creating many Group entities in bulk.
func (*GroupCreateBulk) Exec ¶ added in v0.3.0
func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreateBulk) ExecX ¶ added in v0.3.0
func (gcb *GroupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupDelete ¶ added in v0.3.0
type GroupDelete struct {
// contains filtered or unexported fields
}
GroupDelete is the builder for deleting a Group entity.
func (*GroupDelete) Exec ¶ added in v0.3.0
func (gd *GroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupDelete) ExecX ¶ added in v0.3.0
func (gd *GroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupDelete) Where ¶ added in v0.3.0
func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete
Where appends a list predicates to the GroupDelete builder.
type GroupDeleteOne ¶ added in v0.3.0
type GroupDeleteOne struct {
// contains filtered or unexported fields
}
GroupDeleteOne is the builder for deleting a single Group entity.
func (*GroupDeleteOne) Exec ¶ added in v0.3.0
func (gdo *GroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupDeleteOne) ExecX ¶ added in v0.3.0
func (gdo *GroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupDeleteOne) Where ¶ added in v0.4.0
func (gdo *GroupDeleteOne) Where(ps ...predicate.Group) *GroupDeleteOne
Where appends a list predicates to the GroupDelete builder.
type GroupEdges ¶ added in v0.3.0
type GroupEdges struct { // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
GroupEdges holds the relations/edges for other nodes in the graph.
func (GroupEdges) UsersOrErr ¶ added in v0.3.0
func (e GroupEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type GroupGroupBy ¶ added in v0.3.0
type GroupGroupBy struct {
// contains filtered or unexported fields
}
GroupGroupBy is the group-by builder for Group entities.
func (*GroupGroupBy) Aggregate ¶ added in v0.3.0
func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupGroupBy) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*GroupGroupBy) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupGroupBy) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Scan ¶ added in v0.3.0
func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupGroupBy) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type GroupMutation ¶ added in v0.3.0
type GroupMutation struct {
// contains filtered or unexported fields
}
GroupMutation represents an operation that mutates the Group nodes in the graph.
func (*GroupMutation) AddField ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) AddUserIDs ¶ added in v0.3.0
func (m *GroupMutation) AddUserIDs(ids ...pulid.ID)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*GroupMutation) AddedEdges ¶ added in v0.3.0
func (m *GroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupMutation) AddedField ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) AddedFields ¶ added in v0.3.0
func (m *GroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupMutation) AddedIDs ¶ added in v0.3.0
func (m *GroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupMutation) ClearEdge ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) ClearField ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) ClearUsers ¶ added in v0.3.0
func (m *GroupMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*GroupMutation) ClearedEdges ¶ added in v0.3.0
func (m *GroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupMutation) ClearedFields ¶ added in v0.3.0
func (m *GroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupMutation) Client ¶ added in v0.3.0
func (m GroupMutation) 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 (*GroupMutation) EdgeCleared ¶ added in v0.3.0
func (m *GroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupMutation) Field ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) FieldCleared ¶ added in v0.3.0
func (m *GroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupMutation) Fields ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) ID ¶ added in v0.3.0
func (m *GroupMutation) ID() (id pulid.ID, 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 (*GroupMutation) IDs ¶ added in v0.3.0
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 (*GroupMutation) Name ¶ added in v0.3.0
func (m *GroupMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GroupMutation) OldField ¶ added in v0.3.0
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 (*GroupMutation) OldName ¶ added in v0.3.0
func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Group entity. If the Group 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 (*GroupMutation) Op ¶ added in v0.3.0
func (m *GroupMutation) Op() Op
Op returns the operation name.
func (*GroupMutation) RemoveUserIDs ¶ added in v0.3.0
func (m *GroupMutation) RemoveUserIDs(ids ...pulid.ID)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*GroupMutation) RemovedEdges ¶ added in v0.3.0
func (m *GroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupMutation) RemovedIDs ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) RemovedUsersIDs ¶ added in v0.3.0
func (m *GroupMutation) RemovedUsersIDs() (ids []pulid.ID)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*GroupMutation) ResetEdge ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) ResetField ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) ResetName ¶ added in v0.3.0
func (m *GroupMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GroupMutation) ResetUsers ¶ added in v0.3.0
func (m *GroupMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*GroupMutation) SetField ¶ added in v0.3.0
func (m *GroupMutation) 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 (*GroupMutation) SetID ¶ added in v0.3.0
func (m *GroupMutation) SetID(id pulid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Group entities.
func (*GroupMutation) SetName ¶ added in v0.3.0
func (m *GroupMutation) SetName(s string)
SetName sets the "name" field.
func (*GroupMutation) SetOp ¶ added in v0.3.5
func (m *GroupMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (GroupMutation) Tx ¶ added in v0.3.0
func (m GroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupMutation) Type ¶ added in v0.3.0
func (m *GroupMutation) Type() string
Type returns the node type of this mutation (Group).
func (*GroupMutation) UsersCleared ¶ added in v0.3.0
func (m *GroupMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*GroupMutation) UsersIDs ¶ added in v0.3.0
func (m *GroupMutation) UsersIDs() (ids []pulid.ID)
UsersIDs returns the "users" edge IDs in the mutation.
func (*GroupMutation) Where ¶ added in v0.3.0
func (m *GroupMutation) Where(ps ...predicate.Group)
Where appends a list predicates to the GroupMutation builder.
func (*GroupMutation) WhereP ¶ added in v0.3.5
func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroupOrder ¶ added in v0.3.0
type GroupOrder struct { Direction OrderDirection `json:"direction"` Field *GroupOrderField `json:"field"` }
GroupOrder defines the ordering of Group.
type GroupOrderField ¶ added in v0.3.0
type GroupOrderField struct { // Value extracts the ordering value from the given Group. Value func(*Group) (ent.Value, error) // contains filtered or unexported fields }
GroupOrderField defines the ordering field of Group.
type GroupPaginateOption ¶ added in v0.3.0
type GroupPaginateOption func(*groupPager) error
GroupPaginateOption enables pagination customization.
func WithGroupFilter ¶ added in v0.3.0
func WithGroupFilter(filter func(*GroupQuery) (*GroupQuery, error)) GroupPaginateOption
WithGroupFilter configures pagination filter.
func WithGroupOrder ¶ added in v0.3.0
func WithGroupOrder(order []*GroupOrder) GroupPaginateOption
WithGroupOrder configures pagination ordering.
type GroupQuery ¶ added in v0.3.0
type GroupQuery struct {
// contains filtered or unexported fields
}
GroupQuery is the builder for querying Group entities.
func (*GroupQuery) Aggregate ¶ added in v0.3.4
func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate returns a GroupSelect configured with the given aggregations.
func (*GroupQuery) All ¶ added in v0.3.0
func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
All executes the query and returns a list of Groups.
func (*GroupQuery) AllX ¶ added in v0.3.0
func (gq *GroupQuery) AllX(ctx context.Context) []*Group
AllX is like All, but panics if an error occurs.
func (*GroupQuery) Clone ¶ added in v0.3.0
func (gq *GroupQuery) Clone() *GroupQuery
Clone returns a duplicate of the GroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupQuery) CollectFields ¶ added in v0.3.0
func (gr *GroupQuery) CollectFields(ctx context.Context, satisfies ...string) (*GroupQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*GroupQuery) Count ¶ added in v0.3.0
func (gq *GroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupQuery) CountX ¶ added in v0.3.0
func (gq *GroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupQuery) Exist ¶ added in v0.3.0
func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupQuery) ExistX ¶ added in v0.3.0
func (gq *GroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupQuery) First ¶ added in v0.3.0
func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
First returns the first Group entity from the query. Returns a *NotFoundError when no Group was found.
func (*GroupQuery) FirstID ¶ added in v0.3.0
FirstID returns the first Group ID from the query. Returns a *NotFoundError when no Group ID was found.
func (*GroupQuery) FirstIDX ¶ added in v0.3.0
func (gq *GroupQuery) FirstIDX(ctx context.Context) pulid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupQuery) FirstX ¶ added in v0.3.0
func (gq *GroupQuery) FirstX(ctx context.Context) *Group
FirstX is like First, but panics if an error occurs.
func (*GroupQuery) GroupBy ¶ added in v0.3.0
func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
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.Group.Query(). GroupBy(group.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupQuery) IDsX ¶ added in v0.3.0
func (gq *GroupQuery) IDsX(ctx context.Context) []pulid.ID
IDsX is like IDs, but panics if an error occurs.
func (*GroupQuery) Limit ¶ added in v0.3.0
func (gq *GroupQuery) Limit(limit int) *GroupQuery
Limit the number of records to be returned by this query.
func (*GroupQuery) Offset ¶ added in v0.3.0
func (gq *GroupQuery) Offset(offset int) *GroupQuery
Offset to start from.
func (*GroupQuery) Only ¶ added in v0.3.0
func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
Only returns a single Group entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Group entity is found. Returns a *NotFoundError when no Group entities are found.
func (*GroupQuery) OnlyID ¶ added in v0.3.0
OnlyID is like Only, but returns the only Group ID in the query. Returns a *NotSingularError when more than one Group ID is found. Returns a *NotFoundError when no entities are found.
func (*GroupQuery) OnlyIDX ¶ added in v0.3.0
func (gq *GroupQuery) OnlyIDX(ctx context.Context) pulid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupQuery) OnlyX ¶ added in v0.3.0
func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
OnlyX is like Only, but panics if an error occurs.
func (*GroupQuery) Order ¶ added in v0.3.0
func (gq *GroupQuery) Order(o ...group.OrderOption) *GroupQuery
Order specifies how the records should be ordered.
func (*GroupQuery) Paginate ¶ added in v0.3.0
func (gr *GroupQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...GroupPaginateOption, ) (*GroupConnection, error)
Paginate executes the query and returns a relay based cursor connection to Group.
func (*GroupQuery) QueryUsers ¶ added in v0.3.0
func (gq *GroupQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*GroupQuery) Select ¶ added in v0.3.0
func (gq *GroupQuery) Select(fields ...string) *GroupSelect
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.Group.Query(). Select(group.FieldName). Scan(ctx, &v)
func (*GroupQuery) Unique ¶ added in v0.3.0
func (gq *GroupQuery) Unique(unique bool) *GroupQuery
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 (*GroupQuery) Where ¶ added in v0.3.0
func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
Where adds a new predicate for the GroupQuery builder.
func (*GroupQuery) WithNamedUsers ¶ added in v0.3.1
func (gq *GroupQuery) WithNamedUsers(name string, opts ...func(*UserQuery)) *GroupQuery
WithNamedUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithUsers ¶ added in v0.3.0
func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type GroupSelect ¶ added in v0.3.0
type GroupSelect struct { *GroupQuery // contains filtered or unexported fields }
GroupSelect is the builder for selecting fields of Group entities.
func (*GroupSelect) Aggregate ¶ added in v0.3.4
func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroupSelect) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*GroupSelect) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupSelect) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Scan ¶ added in v0.3.0
func (gs *GroupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupSelect) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*GroupSelect) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type GroupUpdate ¶ added in v0.3.0
type GroupUpdate struct {
// contains filtered or unexported fields
}
GroupUpdate is the builder for updating Group entities.
func (*GroupUpdate) AddUserIDs ¶ added in v0.3.0
func (gu *GroupUpdate) AddUserIDs(ids ...pulid.ID) *GroupUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdate) AddUsers ¶ added in v0.3.0
func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdate) ClearUsers ¶ added in v0.3.0
func (gu *GroupUpdate) ClearUsers() *GroupUpdate
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdate) Exec ¶ added in v0.3.0
func (gu *GroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpdate) ExecX ¶ added in v0.3.0
func (gu *GroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdate) Mutation ¶ added in v0.3.0
func (gu *GroupUpdate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdate) RemoveUserIDs ¶ added in v0.3.0
func (gu *GroupUpdate) RemoveUserIDs(ids ...pulid.ID) *GroupUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdate) RemoveUsers ¶ added in v0.3.0
func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdate) Save ¶ added in v0.3.0
func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupUpdate) SaveX ¶ added in v0.3.0
func (gu *GroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdate) SetName ¶ added in v0.3.0
func (gu *GroupUpdate) SetName(s string) *GroupUpdate
SetName sets the "name" field.
func (*GroupUpdate) SetNillableName ¶ added in v0.3.0
func (gu *GroupUpdate) SetNillableName(s *string) *GroupUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*GroupUpdate) Where ¶ added in v0.3.0
func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
Where appends a list predicates to the GroupUpdate builder.
type GroupUpdateOne ¶ added in v0.3.0
type GroupUpdateOne struct {
// contains filtered or unexported fields
}
GroupUpdateOne is the builder for updating a single Group entity.
func (*GroupUpdateOne) AddUserIDs ¶ added in v0.3.0
func (guo *GroupUpdateOne) AddUserIDs(ids ...pulid.ID) *GroupUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdateOne) AddUsers ¶ added in v0.3.0
func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdateOne) ClearUsers ¶ added in v0.3.0
func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdateOne) Exec ¶ added in v0.3.0
func (guo *GroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupUpdateOne) ExecX ¶ added in v0.3.0
func (guo *GroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdateOne) Mutation ¶ added in v0.3.0
func (guo *GroupUpdateOne) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdateOne) RemoveUserIDs ¶ added in v0.3.0
func (guo *GroupUpdateOne) RemoveUserIDs(ids ...pulid.ID) *GroupUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdateOne) RemoveUsers ¶ added in v0.3.0
func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdateOne) Save ¶ added in v0.3.0
func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
Save executes the query and returns the updated Group entity.
func (*GroupUpdateOne) SaveX ¶ added in v0.3.0
func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdateOne) Select ¶ added in v0.3.0
func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupUpdateOne) SetName ¶ added in v0.3.0
func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
SetName sets the "name" field.
func (*GroupUpdateOne) SetNillableName ¶ added in v0.3.0
func (guo *GroupUpdateOne) SetNillableName(s *string) *GroupUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*GroupUpdateOne) Where ¶ added in v0.4.0
func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
Where appends a list predicates to the GroupUpdate builder.
type GroupWhereInput ¶ added in v0.3.0
type GroupWhereInput struct { Predicates []predicate.Group `json:"-"` Not *GroupWhereInput `json:"not,omitempty"` Or []*GroupWhereInput `json:"or,omitempty"` And []*GroupWhereInput `json:"and,omitempty"` // "id" field predicates. ID *pulid.ID `json:"id,omitempty"` IDNEQ *pulid.ID `json:"idNEQ,omitempty"` IDIn []pulid.ID `json:"idIn,omitempty"` IDNotIn []pulid.ID `json:"idNotIn,omitempty"` IDGT *pulid.ID `json:"idGT,omitempty"` IDGTE *pulid.ID `json:"idGTE,omitempty"` IDLT *pulid.ID `json:"idLT,omitempty"` IDLTE *pulid.ID `json:"idLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "users" edge predicates. HasUsers *bool `json:"hasUsers,omitempty"` HasUsersWith []*UserWhereInput `json:"hasUsersWith,omitempty"` }
GroupWhereInput represents a where input for filtering Group queries.
func (*GroupWhereInput) AddPredicates ¶ added in v0.3.0
func (i *GroupWhereInput) AddPredicates(predicates ...predicate.Group)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*GroupWhereInput) Filter ¶ added in v0.3.0
func (i *GroupWhereInput) Filter(q *GroupQuery) (*GroupQuery, error)
Filter applies the GroupWhereInput filter on the GroupQuery builder.
type InterceptFunc ¶ added in v0.3.5
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶ added in v0.3.5
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶ added in v0.3.5
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶ added in v0.3.5
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 Todo ¶
type Todo struct { // ID of the ent. ID pulid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Status holds the value of the "status" field. Status todo.Status `json:"status,omitempty"` // Priority holds the value of the "priority" field. Priority int `json:"priority,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Blob holds the value of the "blob" field. Blob []byte `json:"blob,omitempty"` // Init holds the value of the "init" field. Init map[string]interface{} `json:"init,omitempty"` // Custom holds the value of the "custom" field. Custom []customstruct.Custom `json:"custom,omitempty"` // Customp holds the value of the "customp" field. Customp []*customstruct.Custom `json:"customp,omitempty"` // CategoryID holds the value of the "category_id" field. CategoryID pulid.ID `json:"category_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TodoQuery when eager-loading is set. Edges TodoEdges `json:"edges"` // contains filtered or unexported fields }
Todo is the model entity for the Todo schema.
func (*Todo) IsNode ¶ added in v0.3.5
func (n *Todo) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Todo) NamedChildren ¶ added in v0.3.1
NamedChildren returns the Children named value or an error if the edge was not loaded in eager-loading with this name.
func (*Todo) QueryCategory ¶
func (t *Todo) QueryCategory() *CategoryQuery
QueryCategory queries the "category" edge of the Todo entity.
func (*Todo) QueryChildren ¶
QueryChildren queries the "children" edge of the Todo entity.
func (*Todo) QueryParent ¶
QueryParent queries the "parent" edge of the Todo entity.
func (*Todo) QuerySecret ¶
func (t *Todo) QuerySecret() *VerySecretQuery
QuerySecret queries the "secret" edge of the Todo entity.
func (*Todo) Unwrap ¶
Unwrap unwraps the Todo 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 (*Todo) Update ¶
func (t *Todo) Update() *TodoUpdateOne
Update returns a builder for updating this Todo. Note that you need to call Todo.Unwrap() before calling this method if this Todo was returned from a transaction, and the transaction was committed or rolled back.
type TodoClient ¶
type TodoClient struct {
// contains filtered or unexported fields
}
TodoClient is a client for the Todo schema.
func NewTodoClient ¶
func NewTodoClient(c config) *TodoClient
NewTodoClient returns a client for the Todo from the given config.
func (*TodoClient) Create ¶
func (c *TodoClient) Create() *TodoCreate
Create returns a builder for creating a Todo entity.
func (*TodoClient) CreateBulk ¶
func (c *TodoClient) CreateBulk(builders ...*TodoCreate) *TodoCreateBulk
CreateBulk returns a builder for creating a bulk of Todo entities.
func (*TodoClient) Delete ¶
func (c *TodoClient) Delete() *TodoDelete
Delete returns a delete builder for Todo.
func (*TodoClient) DeleteOne ¶
func (c *TodoClient) DeleteOne(t *Todo) *TodoDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TodoClient) DeleteOneID ¶
func (c *TodoClient) DeleteOneID(id pulid.ID) *TodoDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TodoClient) Intercept ¶ added in v0.3.5
func (c *TodoClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `todo.Intercept(f(g(h())))`.
func (*TodoClient) Interceptors ¶ added in v0.3.5
func (c *TodoClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TodoClient) Query ¶
func (c *TodoClient) Query() *TodoQuery
Query returns a query builder for Todo.
func (*TodoClient) QueryCategory ¶
func (c *TodoClient) QueryCategory(t *Todo) *CategoryQuery
QueryCategory queries the category edge of a Todo.
func (*TodoClient) QueryChildren ¶
func (c *TodoClient) QueryChildren(t *Todo) *TodoQuery
QueryChildren queries the children edge of a Todo.
func (*TodoClient) QueryParent ¶
func (c *TodoClient) QueryParent(t *Todo) *TodoQuery
QueryParent queries the parent edge of a Todo.
func (*TodoClient) QuerySecret ¶
func (c *TodoClient) QuerySecret(t *Todo) *VerySecretQuery
QuerySecret queries the secret edge of a Todo.
func (*TodoClient) Update ¶
func (c *TodoClient) Update() *TodoUpdate
Update returns an update builder for Todo.
func (*TodoClient) UpdateOne ¶
func (c *TodoClient) UpdateOne(t *Todo) *TodoUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TodoClient) UpdateOneID ¶
func (c *TodoClient) UpdateOneID(id pulid.ID) *TodoUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TodoClient) Use ¶
func (c *TodoClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `todo.Hooks(f(g(h())))`.
type TodoConnection ¶
type TodoConnection struct { Edges []*TodoEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
TodoConnection is the connection containing edges to Todo.
type TodoCreate ¶
type TodoCreate struct {
// contains filtered or unexported fields
}
TodoCreate is the builder for creating a Todo entity.
func (*TodoCreate) AddChildIDs ¶
func (tc *TodoCreate) AddChildIDs(ids ...pulid.ID) *TodoCreate
AddChildIDs adds the "children" edge to the Todo entity by IDs.
func (*TodoCreate) AddChildren ¶
func (tc *TodoCreate) AddChildren(t ...*Todo) *TodoCreate
AddChildren adds the "children" edges to the Todo entity.
func (*TodoCreate) Exec ¶ added in v0.2.0
func (tc *TodoCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TodoCreate) ExecX ¶ added in v0.2.0
func (tc *TodoCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TodoCreate) Mutation ¶
func (tc *TodoCreate) Mutation() *TodoMutation
Mutation returns the TodoMutation object of the builder.
func (*TodoCreate) Save ¶
func (tc *TodoCreate) Save(ctx context.Context) (*Todo, error)
Save creates the Todo in the database.
func (*TodoCreate) SaveX ¶
func (tc *TodoCreate) SaveX(ctx context.Context) *Todo
SaveX calls Save and panics if Save returns an error.
func (*TodoCreate) SetBlob ¶
func (tc *TodoCreate) SetBlob(b []byte) *TodoCreate
SetBlob sets the "blob" field.
func (*TodoCreate) SetCategory ¶
func (tc *TodoCreate) SetCategory(c *Category) *TodoCreate
SetCategory sets the "category" edge to the Category entity.
func (*TodoCreate) SetCategoryID ¶
func (tc *TodoCreate) SetCategoryID(pu pulid.ID) *TodoCreate
SetCategoryID sets the "category_id" field.
func (*TodoCreate) SetCreatedAt ¶
func (tc *TodoCreate) SetCreatedAt(t time.Time) *TodoCreate
SetCreatedAt sets the "created_at" field.
func (*TodoCreate) SetCustom ¶ added in v0.3.4
func (tc *TodoCreate) SetCustom(c []customstruct.Custom) *TodoCreate
SetCustom sets the "custom" field.
func (*TodoCreate) SetCustomp ¶ added in v0.3.4
func (tc *TodoCreate) SetCustomp(c []*customstruct.Custom) *TodoCreate
SetCustomp sets the "customp" field.
func (*TodoCreate) SetID ¶
func (tc *TodoCreate) SetID(pu pulid.ID) *TodoCreate
SetID sets the "id" field.
func (*TodoCreate) SetInit ¶ added in v0.3.4
func (tc *TodoCreate) SetInit(m map[string]interface{}) *TodoCreate
SetInit sets the "init" field.
func (*TodoCreate) SetInput ¶ added in v0.3.0
func (c *TodoCreate) SetInput(i CreateTodoInput) *TodoCreate
SetInput applies the change-set in the CreateTodoInput on the TodoCreate builder.
func (*TodoCreate) SetNillableCategoryID ¶
func (tc *TodoCreate) SetNillableCategoryID(pu *pulid.ID) *TodoCreate
SetNillableCategoryID sets the "category_id" field if the given value is not nil.
func (*TodoCreate) SetNillableCreatedAt ¶
func (tc *TodoCreate) SetNillableCreatedAt(t *time.Time) *TodoCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TodoCreate) SetNillableID ¶
func (tc *TodoCreate) SetNillableID(pu *pulid.ID) *TodoCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TodoCreate) SetNillableParentID ¶
func (tc *TodoCreate) SetNillableParentID(id *pulid.ID) *TodoCreate
SetNillableParentID sets the "parent" edge to the Todo entity by ID if the given value is not nil.
func (*TodoCreate) SetNillablePriority ¶
func (tc *TodoCreate) SetNillablePriority(i *int) *TodoCreate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*TodoCreate) SetNillableSecretID ¶
func (tc *TodoCreate) SetNillableSecretID(id *pulid.ID) *TodoCreate
SetNillableSecretID sets the "secret" edge to the VerySecret entity by ID if the given value is not nil.
func (*TodoCreate) SetParent ¶
func (tc *TodoCreate) SetParent(t *Todo) *TodoCreate
SetParent sets the "parent" edge to the Todo entity.
func (*TodoCreate) SetParentID ¶
func (tc *TodoCreate) SetParentID(id pulid.ID) *TodoCreate
SetParentID sets the "parent" edge to the Todo entity by ID.
func (*TodoCreate) SetPriority ¶
func (tc *TodoCreate) SetPriority(i int) *TodoCreate
SetPriority sets the "priority" field.
func (*TodoCreate) SetSecret ¶
func (tc *TodoCreate) SetSecret(v *VerySecret) *TodoCreate
SetSecret sets the "secret" edge to the VerySecret entity.
func (*TodoCreate) SetSecretID ¶
func (tc *TodoCreate) SetSecretID(id pulid.ID) *TodoCreate
SetSecretID sets the "secret" edge to the VerySecret entity by ID.
func (*TodoCreate) SetStatus ¶
func (tc *TodoCreate) SetStatus(t todo.Status) *TodoCreate
SetStatus sets the "status" field.
func (*TodoCreate) SetText ¶
func (tc *TodoCreate) SetText(s string) *TodoCreate
SetText sets the "text" field.
type TodoCreateBulk ¶
type TodoCreateBulk struct {
// contains filtered or unexported fields
}
TodoCreateBulk is the builder for creating many Todo entities in bulk.
func (*TodoCreateBulk) Exec ¶ added in v0.2.0
func (tcb *TodoCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TodoCreateBulk) ExecX ¶ added in v0.2.0
func (tcb *TodoCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TodoDelete ¶
type TodoDelete struct {
// contains filtered or unexported fields
}
TodoDelete is the builder for deleting a Todo entity.
func (*TodoDelete) Exec ¶
func (td *TodoDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TodoDelete) ExecX ¶
func (td *TodoDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TodoDelete) Where ¶
func (td *TodoDelete) Where(ps ...predicate.Todo) *TodoDelete
Where appends a list predicates to the TodoDelete builder.
type TodoDeleteOne ¶
type TodoDeleteOne struct {
// contains filtered or unexported fields
}
TodoDeleteOne is the builder for deleting a single Todo entity.
func (*TodoDeleteOne) Exec ¶
func (tdo *TodoDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TodoDeleteOne) ExecX ¶
func (tdo *TodoDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TodoDeleteOne) Where ¶ added in v0.4.0
func (tdo *TodoDeleteOne) Where(ps ...predicate.Todo) *TodoDeleteOne
Where appends a list predicates to the TodoDelete builder.
type TodoEdges ¶
type TodoEdges struct { // Parent holds the value of the parent edge. Parent *Todo `json:"parent,omitempty"` // Children holds the value of the children edge. Children []*Todo `json:"children,omitempty"` // Category holds the value of the category edge. Category *Category `json:"category,omitempty"` // Secret holds the value of the secret edge. Secret *VerySecret `json:"secret,omitempty"` // contains filtered or unexported fields }
TodoEdges holds the relations/edges for other nodes in the graph.
func (TodoEdges) CategoryOrErr ¶
CategoryOrErr returns the Category value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TodoEdges) ChildrenOrErr ¶
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (TodoEdges) ParentOrErr ¶
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TodoEdges) SecretOrErr ¶
func (e TodoEdges) SecretOrErr() (*VerySecret, error)
SecretOrErr returns the Secret value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TodoGroupBy ¶
type TodoGroupBy struct {
// contains filtered or unexported fields
}
TodoGroupBy is the group-by builder for Todo entities.
func (*TodoGroupBy) Aggregate ¶
func (tgb *TodoGroupBy) Aggregate(fns ...AggregateFunc) *TodoGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TodoGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Scan ¶
func (tgb *TodoGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TodoGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TodoMutation ¶
type TodoMutation struct {
// contains filtered or unexported fields
}
TodoMutation represents an operation that mutates the Todo nodes in the graph.
func (*TodoMutation) AddChildIDs ¶
func (m *TodoMutation) AddChildIDs(ids ...pulid.ID)
AddChildIDs adds the "children" edge to the Todo entity by ids.
func (*TodoMutation) AddField ¶
func (m *TodoMutation) 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 (*TodoMutation) AddPriority ¶
func (m *TodoMutation) AddPriority(i int)
AddPriority adds i to the "priority" field.
func (*TodoMutation) AddedEdges ¶
func (m *TodoMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TodoMutation) AddedField ¶
func (m *TodoMutation) 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 (*TodoMutation) AddedFields ¶
func (m *TodoMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TodoMutation) AddedIDs ¶
func (m *TodoMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TodoMutation) AddedPriority ¶
func (m *TodoMutation) AddedPriority() (r int, exists bool)
AddedPriority returns the value that was added to the "priority" field in this mutation.
func (*TodoMutation) AppendCustom ¶ added in v0.3.4
func (m *TodoMutation) AppendCustom(c []customstruct.Custom)
AppendCustom adds c to the "custom" field.
func (*TodoMutation) AppendCustomp ¶ added in v0.3.4
func (m *TodoMutation) AppendCustomp(c []*customstruct.Custom)
AppendCustomp adds c to the "customp" field.
func (*TodoMutation) AppendedCustom ¶ added in v0.3.4
func (m *TodoMutation) AppendedCustom() ([]customstruct.Custom, bool)
AppendedCustom returns the list of values that were appended to the "custom" field in this mutation.
func (*TodoMutation) AppendedCustomp ¶ added in v0.3.4
func (m *TodoMutation) AppendedCustomp() ([]*customstruct.Custom, bool)
AppendedCustomp returns the list of values that were appended to the "customp" field in this mutation.
func (*TodoMutation) Blob ¶
func (m *TodoMutation) Blob() (r []byte, exists bool)
Blob returns the value of the "blob" field in the mutation.
func (*TodoMutation) BlobCleared ¶
func (m *TodoMutation) BlobCleared() bool
BlobCleared returns if the "blob" field was cleared in this mutation.
func (*TodoMutation) CategoryCleared ¶
func (m *TodoMutation) CategoryCleared() bool
CategoryCleared reports if the "category" edge to the Category entity was cleared.
func (*TodoMutation) CategoryID ¶
func (m *TodoMutation) CategoryID() (r pulid.ID, exists bool)
CategoryID returns the value of the "category_id" field in the mutation.
func (*TodoMutation) CategoryIDCleared ¶ added in v0.3.0
func (m *TodoMutation) CategoryIDCleared() bool
CategoryIDCleared returns if the "category_id" field was cleared in this mutation.
func (*TodoMutation) CategoryIDs ¶
func (m *TodoMutation) CategoryIDs() (ids []pulid.ID)
CategoryIDs returns the "category" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CategoryID instead. It exists only for internal usage by the builders.
func (*TodoMutation) ChildrenCleared ¶
func (m *TodoMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the Todo entity was cleared.
func (*TodoMutation) ChildrenIDs ¶
func (m *TodoMutation) ChildrenIDs() (ids []pulid.ID)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*TodoMutation) ClearBlob ¶
func (m *TodoMutation) ClearBlob()
ClearBlob clears the value of the "blob" field.
func (*TodoMutation) ClearCategory ¶
func (m *TodoMutation) ClearCategory()
ClearCategory clears the "category" edge to the Category entity.
func (*TodoMutation) ClearCategoryID ¶ added in v0.3.0
func (m *TodoMutation) ClearCategoryID()
ClearCategoryID clears the value of the "category_id" field.
func (*TodoMutation) ClearChildren ¶
func (m *TodoMutation) ClearChildren()
ClearChildren clears the "children" edge to the Todo entity.
func (*TodoMutation) ClearCustom ¶ added in v0.3.4
func (m *TodoMutation) ClearCustom()
ClearCustom clears the value of the "custom" field.
func (*TodoMutation) ClearCustomp ¶ added in v0.3.4
func (m *TodoMutation) ClearCustomp()
ClearCustomp clears the value of the "customp" field.
func (*TodoMutation) ClearEdge ¶
func (m *TodoMutation) 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 (*TodoMutation) ClearField ¶
func (m *TodoMutation) 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 (*TodoMutation) ClearInit ¶ added in v0.3.4
func (m *TodoMutation) ClearInit()
ClearInit clears the value of the "init" field.
func (*TodoMutation) ClearParent ¶
func (m *TodoMutation) ClearParent()
ClearParent clears the "parent" edge to the Todo entity.
func (*TodoMutation) ClearSecret ¶
func (m *TodoMutation) ClearSecret()
ClearSecret clears the "secret" edge to the VerySecret entity.
func (*TodoMutation) ClearedEdges ¶
func (m *TodoMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TodoMutation) ClearedFields ¶
func (m *TodoMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TodoMutation) Client ¶
func (m TodoMutation) 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 (*TodoMutation) CreatedAt ¶
func (m *TodoMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TodoMutation) Custom ¶ added in v0.3.4
func (m *TodoMutation) Custom() (r []customstruct.Custom, exists bool)
Custom returns the value of the "custom" field in the mutation.
func (*TodoMutation) CustomCleared ¶ added in v0.3.4
func (m *TodoMutation) CustomCleared() bool
CustomCleared returns if the "custom" field was cleared in this mutation.
func (*TodoMutation) Customp ¶ added in v0.3.4
func (m *TodoMutation) Customp() (r []*customstruct.Custom, exists bool)
Customp returns the value of the "customp" field in the mutation.
func (*TodoMutation) CustompCleared ¶ added in v0.3.4
func (m *TodoMutation) CustompCleared() bool
CustompCleared returns if the "customp" field was cleared in this mutation.
func (*TodoMutation) EdgeCleared ¶
func (m *TodoMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TodoMutation) Field ¶
func (m *TodoMutation) 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 (*TodoMutation) FieldCleared ¶
func (m *TodoMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TodoMutation) Fields ¶
func (m *TodoMutation) 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 (*TodoMutation) ID ¶
func (m *TodoMutation) ID() (id pulid.ID, 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 (*TodoMutation) IDs ¶ added in v0.3.0
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 (*TodoMutation) Init ¶ added in v0.3.4
func (m *TodoMutation) Init() (r map[string]interface{}, exists bool)
Init returns the value of the "init" field in the mutation.
func (*TodoMutation) InitCleared ¶ added in v0.3.4
func (m *TodoMutation) InitCleared() bool
InitCleared returns if the "init" field was cleared in this mutation.
func (*TodoMutation) OldBlob ¶
func (m *TodoMutation) OldBlob(ctx context.Context) (v []byte, err error)
OldBlob returns the old "blob" field's value of the Todo entity. If the Todo 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 (*TodoMutation) OldCategoryID ¶ added in v0.3.0
OldCategoryID returns the old "category_id" field's value of the Todo entity. If the Todo 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 (*TodoMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Todo entity. If the Todo 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 (*TodoMutation) OldCustom ¶ added in v0.3.4
func (m *TodoMutation) OldCustom(ctx context.Context) (v []customstruct.Custom, err error)
OldCustom returns the old "custom" field's value of the Todo entity. If the Todo 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 (*TodoMutation) OldCustomp ¶ added in v0.3.4
func (m *TodoMutation) OldCustomp(ctx context.Context) (v []*customstruct.Custom, err error)
OldCustomp returns the old "customp" field's value of the Todo entity. If the Todo 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 (*TodoMutation) 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 (*TodoMutation) OldInit ¶ added in v0.3.4
func (m *TodoMutation) OldInit(ctx context.Context) (v map[string]interface{}, err error)
OldInit returns the old "init" field's value of the Todo entity. If the Todo 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 (*TodoMutation) OldPriority ¶
func (m *TodoMutation) OldPriority(ctx context.Context) (v int, err error)
OldPriority returns the old "priority" field's value of the Todo entity. If the Todo 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 (*TodoMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Todo entity. If the Todo 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 (*TodoMutation) OldText ¶
func (m *TodoMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the Todo entity. If the Todo 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 (*TodoMutation) ParentCleared ¶
func (m *TodoMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the Todo entity was cleared.
func (*TodoMutation) ParentID ¶
func (m *TodoMutation) ParentID() (id pulid.ID, exists bool)
ParentID returns the "parent" edge ID in the mutation.
func (*TodoMutation) ParentIDs ¶
func (m *TodoMutation) ParentIDs() (ids []pulid.ID)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*TodoMutation) Priority ¶
func (m *TodoMutation) Priority() (r int, exists bool)
Priority returns the value of the "priority" field in the mutation.
func (*TodoMutation) RemoveChildIDs ¶
func (m *TodoMutation) RemoveChildIDs(ids ...pulid.ID)
RemoveChildIDs removes the "children" edge to the Todo entity by IDs.
func (*TodoMutation) RemovedChildrenIDs ¶
func (m *TodoMutation) RemovedChildrenIDs() (ids []pulid.ID)
RemovedChildren returns the removed IDs of the "children" edge to the Todo entity.
func (*TodoMutation) RemovedEdges ¶
func (m *TodoMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TodoMutation) RemovedIDs ¶
func (m *TodoMutation) 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 (*TodoMutation) ResetBlob ¶
func (m *TodoMutation) ResetBlob()
ResetBlob resets all changes to the "blob" field.
func (*TodoMutation) ResetCategory ¶
func (m *TodoMutation) ResetCategory()
ResetCategory resets all changes to the "category" edge.
func (*TodoMutation) ResetCategoryID ¶ added in v0.3.0
func (m *TodoMutation) ResetCategoryID()
ResetCategoryID resets all changes to the "category_id" field.
func (*TodoMutation) ResetChildren ¶
func (m *TodoMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*TodoMutation) ResetCreatedAt ¶
func (m *TodoMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TodoMutation) ResetCustom ¶ added in v0.3.4
func (m *TodoMutation) ResetCustom()
ResetCustom resets all changes to the "custom" field.
func (*TodoMutation) ResetCustomp ¶ added in v0.3.4
func (m *TodoMutation) ResetCustomp()
ResetCustomp resets all changes to the "customp" field.
func (*TodoMutation) ResetEdge ¶
func (m *TodoMutation) 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 (*TodoMutation) ResetField ¶
func (m *TodoMutation) 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 (*TodoMutation) ResetInit ¶ added in v0.3.4
func (m *TodoMutation) ResetInit()
ResetInit resets all changes to the "init" field.
func (*TodoMutation) ResetParent ¶
func (m *TodoMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*TodoMutation) ResetPriority ¶
func (m *TodoMutation) ResetPriority()
ResetPriority resets all changes to the "priority" field.
func (*TodoMutation) ResetSecret ¶
func (m *TodoMutation) ResetSecret()
ResetSecret resets all changes to the "secret" edge.
func (*TodoMutation) ResetStatus ¶
func (m *TodoMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*TodoMutation) ResetText ¶
func (m *TodoMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*TodoMutation) SecretCleared ¶
func (m *TodoMutation) SecretCleared() bool
SecretCleared reports if the "secret" edge to the VerySecret entity was cleared.
func (*TodoMutation) SecretID ¶
func (m *TodoMutation) SecretID() (id pulid.ID, exists bool)
SecretID returns the "secret" edge ID in the mutation.
func (*TodoMutation) SecretIDs ¶
func (m *TodoMutation) SecretIDs() (ids []pulid.ID)
SecretIDs returns the "secret" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SecretID instead. It exists only for internal usage by the builders.
func (*TodoMutation) SetBlob ¶
func (m *TodoMutation) SetBlob(b []byte)
SetBlob sets the "blob" field.
func (*TodoMutation) SetCategoryID ¶
func (m *TodoMutation) SetCategoryID(pu pulid.ID)
SetCategoryID sets the "category_id" field.
func (*TodoMutation) SetCreatedAt ¶
func (m *TodoMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TodoMutation) SetCustom ¶ added in v0.3.4
func (m *TodoMutation) SetCustom(c []customstruct.Custom)
SetCustom sets the "custom" field.
func (*TodoMutation) SetCustomp ¶ added in v0.3.4
func (m *TodoMutation) SetCustomp(c []*customstruct.Custom)
SetCustomp sets the "customp" field.
func (*TodoMutation) SetField ¶
func (m *TodoMutation) 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 (*TodoMutation) SetID ¶
func (m *TodoMutation) SetID(id pulid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Todo entities.
func (*TodoMutation) SetInit ¶ added in v0.3.4
func (m *TodoMutation) SetInit(value map[string]interface{})
SetInit sets the "init" field.
func (*TodoMutation) SetOp ¶ added in v0.3.5
func (m *TodoMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TodoMutation) SetParentID ¶
func (m *TodoMutation) SetParentID(id pulid.ID)
SetParentID sets the "parent" edge to the Todo entity by id.
func (*TodoMutation) SetPriority ¶
func (m *TodoMutation) SetPriority(i int)
SetPriority sets the "priority" field.
func (*TodoMutation) SetSecretID ¶
func (m *TodoMutation) SetSecretID(id pulid.ID)
SetSecretID sets the "secret" edge to the VerySecret entity by id.
func (*TodoMutation) SetStatus ¶
func (m *TodoMutation) SetStatus(t todo.Status)
SetStatus sets the "status" field.
func (*TodoMutation) SetText ¶
func (m *TodoMutation) SetText(s string)
SetText sets the "text" field.
func (*TodoMutation) Status ¶
func (m *TodoMutation) Status() (r todo.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*TodoMutation) Text ¶
func (m *TodoMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (TodoMutation) Tx ¶
func (m TodoMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TodoMutation) Type ¶
func (m *TodoMutation) Type() string
Type returns the node type of this mutation (Todo).
func (*TodoMutation) Where ¶ added in v0.2.0
func (m *TodoMutation) Where(ps ...predicate.Todo)
Where appends a list predicates to the TodoMutation builder.
func (*TodoMutation) WhereP ¶ added in v0.3.5
func (m *TodoMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TodoMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TodoOrder ¶
type TodoOrder struct { Direction OrderDirection `json:"direction"` Field *TodoOrderField `json:"field"` }
TodoOrder defines the ordering of Todo.
type TodoOrderField ¶
type TodoOrderField struct { // Value extracts the ordering value from the given Todo. Value func(*Todo) (ent.Value, error) // contains filtered or unexported fields }
TodoOrderField defines the ordering field of Todo.
func (TodoOrderField) MarshalGQL ¶
func (f TodoOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (TodoOrderField) String ¶
func (f TodoOrderField) String() string
String implement fmt.Stringer interface.
func (*TodoOrderField) UnmarshalGQL ¶
func (f *TodoOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type TodoPaginateOption ¶
type TodoPaginateOption func(*todoPager) error
TodoPaginateOption enables pagination customization.
func WithTodoFilter ¶
func WithTodoFilter(filter func(*TodoQuery) (*TodoQuery, error)) TodoPaginateOption
WithTodoFilter configures pagination filter.
func WithTodoOrder ¶
func WithTodoOrder(order *TodoOrder) TodoPaginateOption
WithTodoOrder configures pagination ordering.
type TodoQuery ¶
type TodoQuery struct {
// contains filtered or unexported fields
}
TodoQuery is the builder for querying Todo entities.
func (*TodoQuery) Aggregate ¶ added in v0.3.4
func (tq *TodoQuery) Aggregate(fns ...AggregateFunc) *TodoSelect
Aggregate returns a TodoSelect configured with the given aggregations.
func (*TodoQuery) Clone ¶
Clone returns a duplicate of the TodoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TodoQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*TodoQuery) First ¶
First returns the first Todo entity from the query. Returns a *NotFoundError when no Todo was found.
func (*TodoQuery) FirstID ¶
FirstID returns the first Todo ID from the query. Returns a *NotFoundError when no Todo ID was found.
func (*TodoQuery) GroupBy ¶
func (tq *TodoQuery) GroupBy(field string, fields ...string) *TodoGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Todo.Query(). GroupBy(todo.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TodoQuery) Only ¶
Only returns a single Todo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Todo entity is found. Returns a *NotFoundError when no Todo entities are found.
func (*TodoQuery) OnlyID ¶
OnlyID is like Only, but returns the only Todo ID in the query. Returns a *NotSingularError when more than one Todo ID is found. Returns a *NotFoundError when no entities are found.
func (*TodoQuery) Order ¶
func (tq *TodoQuery) Order(o ...todo.OrderOption) *TodoQuery
Order specifies how the records should be ordered.
func (*TodoQuery) Paginate ¶
func (t *TodoQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...TodoPaginateOption, ) (*TodoConnection, error)
Paginate executes the query and returns a relay based cursor connection to Todo.
func (*TodoQuery) QueryCategory ¶
func (tq *TodoQuery) QueryCategory() *CategoryQuery
QueryCategory chains the current query on the "category" edge.
func (*TodoQuery) QueryChildren ¶
QueryChildren chains the current query on the "children" edge.
func (*TodoQuery) QueryParent ¶
QueryParent chains the current query on the "parent" edge.
func (*TodoQuery) QuerySecret ¶
func (tq *TodoQuery) QuerySecret() *VerySecretQuery
QuerySecret chains the current query on the "secret" edge.
func (*TodoQuery) Select ¶
func (tq *TodoQuery) Select(fields ...string) *TodoSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Todo.Query(). Select(todo.FieldCreatedAt). Scan(ctx, &v)
func (*TodoQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*TodoQuery) WithCategory ¶
func (tq *TodoQuery) WithCategory(opts ...func(*CategoryQuery)) *TodoQuery
WithCategory tells the query-builder to eager-load the nodes that are connected to the "category" edge. The optional arguments are used to configure the query builder of the edge.
func (*TodoQuery) WithChildren ¶
WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.
func (*TodoQuery) WithNamedChildren ¶ added in v0.3.1
WithNamedChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*TodoQuery) WithParent ¶
WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.
func (*TodoQuery) WithSecret ¶
func (tq *TodoQuery) WithSecret(opts ...func(*VerySecretQuery)) *TodoQuery
WithSecret tells the query-builder to eager-load the nodes that are connected to the "secret" edge. The optional arguments are used to configure the query builder of the edge.
type TodoSelect ¶
type TodoSelect struct { *TodoQuery // contains filtered or unexported fields }
TodoSelect is the builder for selecting fields of Todo entities.
func (*TodoSelect) Aggregate ¶ added in v0.3.4
func (ts *TodoSelect) Aggregate(fns ...AggregateFunc) *TodoSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TodoSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Scan ¶
func (ts *TodoSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TodoSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TodoUpdate ¶
type TodoUpdate struct {
// contains filtered or unexported fields
}
TodoUpdate is the builder for updating Todo entities.
func (*TodoUpdate) AddChildIDs ¶
func (tu *TodoUpdate) AddChildIDs(ids ...pulid.ID) *TodoUpdate
AddChildIDs adds the "children" edge to the Todo entity by IDs.
func (*TodoUpdate) AddChildren ¶
func (tu *TodoUpdate) AddChildren(t ...*Todo) *TodoUpdate
AddChildren adds the "children" edges to the Todo entity.
func (*TodoUpdate) AddPriority ¶
func (tu *TodoUpdate) AddPriority(i int) *TodoUpdate
AddPriority adds i to the "priority" field.
func (*TodoUpdate) AppendCustom ¶ added in v0.3.4
func (tu *TodoUpdate) AppendCustom(c []customstruct.Custom) *TodoUpdate
AppendCustom appends c to the "custom" field.
func (*TodoUpdate) AppendCustomp ¶ added in v0.3.4
func (tu *TodoUpdate) AppendCustomp(c []*customstruct.Custom) *TodoUpdate
AppendCustomp appends c to the "customp" field.
func (*TodoUpdate) ClearBlob ¶
func (tu *TodoUpdate) ClearBlob() *TodoUpdate
ClearBlob clears the value of the "blob" field.
func (*TodoUpdate) ClearChildren ¶
func (tu *TodoUpdate) ClearChildren() *TodoUpdate
ClearChildren clears all "children" edges to the Todo entity.
func (*TodoUpdate) ClearCustom ¶ added in v0.3.4
func (tu *TodoUpdate) ClearCustom() *TodoUpdate
ClearCustom clears the value of the "custom" field.
func (*TodoUpdate) ClearCustomp ¶ added in v0.3.4
func (tu *TodoUpdate) ClearCustomp() *TodoUpdate
ClearCustomp clears the value of the "customp" field.
func (*TodoUpdate) ClearInit ¶ added in v0.3.4
func (tu *TodoUpdate) ClearInit() *TodoUpdate
ClearInit clears the value of the "init" field.
func (*TodoUpdate) ClearParent ¶
func (tu *TodoUpdate) ClearParent() *TodoUpdate
ClearParent clears the "parent" edge to the Todo entity.
func (*TodoUpdate) ClearSecret ¶
func (tu *TodoUpdate) ClearSecret() *TodoUpdate
ClearSecret clears the "secret" edge to the VerySecret entity.
func (*TodoUpdate) Exec ¶
func (tu *TodoUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TodoUpdate) ExecX ¶
func (tu *TodoUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TodoUpdate) Mutation ¶
func (tu *TodoUpdate) Mutation() *TodoMutation
Mutation returns the TodoMutation object of the builder.
func (*TodoUpdate) RemoveChildIDs ¶
func (tu *TodoUpdate) RemoveChildIDs(ids ...pulid.ID) *TodoUpdate
RemoveChildIDs removes the "children" edge to Todo entities by IDs.
func (*TodoUpdate) RemoveChildren ¶
func (tu *TodoUpdate) RemoveChildren(t ...*Todo) *TodoUpdate
RemoveChildren removes "children" edges to Todo entities.
func (*TodoUpdate) Save ¶
func (tu *TodoUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TodoUpdate) SaveX ¶
func (tu *TodoUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TodoUpdate) SetBlob ¶
func (tu *TodoUpdate) SetBlob(b []byte) *TodoUpdate
SetBlob sets the "blob" field.
func (*TodoUpdate) SetCustom ¶ added in v0.3.4
func (tu *TodoUpdate) SetCustom(c []customstruct.Custom) *TodoUpdate
SetCustom sets the "custom" field.
func (*TodoUpdate) SetCustomp ¶ added in v0.3.4
func (tu *TodoUpdate) SetCustomp(c []*customstruct.Custom) *TodoUpdate
SetCustomp sets the "customp" field.
func (*TodoUpdate) SetInit ¶ added in v0.3.4
func (tu *TodoUpdate) SetInit(m map[string]interface{}) *TodoUpdate
SetInit sets the "init" field.
func (*TodoUpdate) SetInput ¶ added in v0.3.2
func (c *TodoUpdate) SetInput(i UpdateTodoInput) *TodoUpdate
SetInput applies the change-set in the UpdateTodoInput on the TodoUpdate builder.
func (*TodoUpdate) SetNillableParentID ¶
func (tu *TodoUpdate) SetNillableParentID(id *pulid.ID) *TodoUpdate
SetNillableParentID sets the "parent" edge to the Todo entity by ID if the given value is not nil.
func (*TodoUpdate) SetNillablePriority ¶
func (tu *TodoUpdate) SetNillablePriority(i *int) *TodoUpdate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*TodoUpdate) SetNillableSecretID ¶
func (tu *TodoUpdate) SetNillableSecretID(id *pulid.ID) *TodoUpdate
SetNillableSecretID sets the "secret" edge to the VerySecret entity by ID if the given value is not nil.
func (*TodoUpdate) SetParent ¶
func (tu *TodoUpdate) SetParent(t *Todo) *TodoUpdate
SetParent sets the "parent" edge to the Todo entity.
func (*TodoUpdate) SetParentID ¶
func (tu *TodoUpdate) SetParentID(id pulid.ID) *TodoUpdate
SetParentID sets the "parent" edge to the Todo entity by ID.
func (*TodoUpdate) SetPriority ¶
func (tu *TodoUpdate) SetPriority(i int) *TodoUpdate
SetPriority sets the "priority" field.
func (*TodoUpdate) SetSecret ¶
func (tu *TodoUpdate) SetSecret(v *VerySecret) *TodoUpdate
SetSecret sets the "secret" edge to the VerySecret entity.
func (*TodoUpdate) SetSecretID ¶
func (tu *TodoUpdate) SetSecretID(id pulid.ID) *TodoUpdate
SetSecretID sets the "secret" edge to the VerySecret entity by ID.
func (*TodoUpdate) SetStatus ¶
func (tu *TodoUpdate) SetStatus(t todo.Status) *TodoUpdate
SetStatus sets the "status" field.
func (*TodoUpdate) SetText ¶
func (tu *TodoUpdate) SetText(s string) *TodoUpdate
SetText sets the "text" field.
func (*TodoUpdate) Where ¶
func (tu *TodoUpdate) Where(ps ...predicate.Todo) *TodoUpdate
Where appends a list predicates to the TodoUpdate builder.
type TodoUpdateOne ¶
type TodoUpdateOne struct {
// contains filtered or unexported fields
}
TodoUpdateOne is the builder for updating a single Todo entity.
func (*TodoUpdateOne) AddChildIDs ¶
func (tuo *TodoUpdateOne) AddChildIDs(ids ...pulid.ID) *TodoUpdateOne
AddChildIDs adds the "children" edge to the Todo entity by IDs.
func (*TodoUpdateOne) AddChildren ¶
func (tuo *TodoUpdateOne) AddChildren(t ...*Todo) *TodoUpdateOne
AddChildren adds the "children" edges to the Todo entity.
func (*TodoUpdateOne) AddPriority ¶
func (tuo *TodoUpdateOne) AddPriority(i int) *TodoUpdateOne
AddPriority adds i to the "priority" field.
func (*TodoUpdateOne) AppendCustom ¶ added in v0.3.4
func (tuo *TodoUpdateOne) AppendCustom(c []customstruct.Custom) *TodoUpdateOne
AppendCustom appends c to the "custom" field.
func (*TodoUpdateOne) AppendCustomp ¶ added in v0.3.4
func (tuo *TodoUpdateOne) AppendCustomp(c []*customstruct.Custom) *TodoUpdateOne
AppendCustomp appends c to the "customp" field.
func (*TodoUpdateOne) ClearBlob ¶
func (tuo *TodoUpdateOne) ClearBlob() *TodoUpdateOne
ClearBlob clears the value of the "blob" field.
func (*TodoUpdateOne) ClearChildren ¶
func (tuo *TodoUpdateOne) ClearChildren() *TodoUpdateOne
ClearChildren clears all "children" edges to the Todo entity.
func (*TodoUpdateOne) ClearCustom ¶ added in v0.3.4
func (tuo *TodoUpdateOne) ClearCustom() *TodoUpdateOne
ClearCustom clears the value of the "custom" field.
func (*TodoUpdateOne) ClearCustomp ¶ added in v0.3.4
func (tuo *TodoUpdateOne) ClearCustomp() *TodoUpdateOne
ClearCustomp clears the value of the "customp" field.
func (*TodoUpdateOne) ClearInit ¶ added in v0.3.4
func (tuo *TodoUpdateOne) ClearInit() *TodoUpdateOne
ClearInit clears the value of the "init" field.
func (*TodoUpdateOne) ClearParent ¶
func (tuo *TodoUpdateOne) ClearParent() *TodoUpdateOne
ClearParent clears the "parent" edge to the Todo entity.
func (*TodoUpdateOne) ClearSecret ¶
func (tuo *TodoUpdateOne) ClearSecret() *TodoUpdateOne
ClearSecret clears the "secret" edge to the VerySecret entity.
func (*TodoUpdateOne) Exec ¶
func (tuo *TodoUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TodoUpdateOne) ExecX ¶
func (tuo *TodoUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TodoUpdateOne) Mutation ¶
func (tuo *TodoUpdateOne) Mutation() *TodoMutation
Mutation returns the TodoMutation object of the builder.
func (*TodoUpdateOne) RemoveChildIDs ¶
func (tuo *TodoUpdateOne) RemoveChildIDs(ids ...pulid.ID) *TodoUpdateOne
RemoveChildIDs removes the "children" edge to Todo entities by IDs.
func (*TodoUpdateOne) RemoveChildren ¶
func (tuo *TodoUpdateOne) RemoveChildren(t ...*Todo) *TodoUpdateOne
RemoveChildren removes "children" edges to Todo entities.
func (*TodoUpdateOne) Save ¶
func (tuo *TodoUpdateOne) Save(ctx context.Context) (*Todo, error)
Save executes the query and returns the updated Todo entity.
func (*TodoUpdateOne) SaveX ¶
func (tuo *TodoUpdateOne) SaveX(ctx context.Context) *Todo
SaveX is like Save, but panics if an error occurs.
func (*TodoUpdateOne) Select ¶
func (tuo *TodoUpdateOne) Select(field string, fields ...string) *TodoUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TodoUpdateOne) SetBlob ¶
func (tuo *TodoUpdateOne) SetBlob(b []byte) *TodoUpdateOne
SetBlob sets the "blob" field.
func (*TodoUpdateOne) SetCustom ¶ added in v0.3.4
func (tuo *TodoUpdateOne) SetCustom(c []customstruct.Custom) *TodoUpdateOne
SetCustom sets the "custom" field.
func (*TodoUpdateOne) SetCustomp ¶ added in v0.3.4
func (tuo *TodoUpdateOne) SetCustomp(c []*customstruct.Custom) *TodoUpdateOne
SetCustomp sets the "customp" field.
func (*TodoUpdateOne) SetInit ¶ added in v0.3.4
func (tuo *TodoUpdateOne) SetInit(m map[string]interface{}) *TodoUpdateOne
SetInit sets the "init" field.
func (*TodoUpdateOne) SetInput ¶ added in v0.3.2
func (c *TodoUpdateOne) SetInput(i UpdateTodoInput) *TodoUpdateOne
SetInput applies the change-set in the UpdateTodoInput on the TodoUpdateOne builder.
func (*TodoUpdateOne) SetNillableParentID ¶
func (tuo *TodoUpdateOne) SetNillableParentID(id *pulid.ID) *TodoUpdateOne
SetNillableParentID sets the "parent" edge to the Todo entity by ID if the given value is not nil.
func (*TodoUpdateOne) SetNillablePriority ¶
func (tuo *TodoUpdateOne) SetNillablePriority(i *int) *TodoUpdateOne
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*TodoUpdateOne) SetNillableSecretID ¶
func (tuo *TodoUpdateOne) SetNillableSecretID(id *pulid.ID) *TodoUpdateOne
SetNillableSecretID sets the "secret" edge to the VerySecret entity by ID if the given value is not nil.
func (*TodoUpdateOne) SetParent ¶
func (tuo *TodoUpdateOne) SetParent(t *Todo) *TodoUpdateOne
SetParent sets the "parent" edge to the Todo entity.
func (*TodoUpdateOne) SetParentID ¶
func (tuo *TodoUpdateOne) SetParentID(id pulid.ID) *TodoUpdateOne
SetParentID sets the "parent" edge to the Todo entity by ID.
func (*TodoUpdateOne) SetPriority ¶
func (tuo *TodoUpdateOne) SetPriority(i int) *TodoUpdateOne
SetPriority sets the "priority" field.
func (*TodoUpdateOne) SetSecret ¶
func (tuo *TodoUpdateOne) SetSecret(v *VerySecret) *TodoUpdateOne
SetSecret sets the "secret" edge to the VerySecret entity.
func (*TodoUpdateOne) SetSecretID ¶
func (tuo *TodoUpdateOne) SetSecretID(id pulid.ID) *TodoUpdateOne
SetSecretID sets the "secret" edge to the VerySecret entity by ID.
func (*TodoUpdateOne) SetStatus ¶
func (tuo *TodoUpdateOne) SetStatus(t todo.Status) *TodoUpdateOne
SetStatus sets the "status" field.
func (*TodoUpdateOne) SetText ¶
func (tuo *TodoUpdateOne) SetText(s string) *TodoUpdateOne
SetText sets the "text" field.
func (*TodoUpdateOne) Where ¶ added in v0.4.0
func (tuo *TodoUpdateOne) Where(ps ...predicate.Todo) *TodoUpdateOne
Where appends a list predicates to the TodoUpdate builder.
type TodoWhereInput ¶
type TodoWhereInput struct { Predicates []predicate.Todo `json:"-"` Not *TodoWhereInput `json:"not,omitempty"` Or []*TodoWhereInput `json:"or,omitempty"` And []*TodoWhereInput `json:"and,omitempty"` // "id" field predicates. ID *pulid.ID `json:"id,omitempty"` IDNEQ *pulid.ID `json:"idNEQ,omitempty"` IDIn []pulid.ID `json:"idIn,omitempty"` IDNotIn []pulid.ID `json:"idNotIn,omitempty"` IDGT *pulid.ID `json:"idGT,omitempty"` IDGTE *pulid.ID `json:"idGTE,omitempty"` IDLT *pulid.ID `json:"idLT,omitempty"` IDLTE *pulid.ID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "status" field predicates. Status *todo.Status `json:"status,omitempty"` StatusNEQ *todo.Status `json:"statusNEQ,omitempty"` StatusIn []todo.Status `json:"statusIn,omitempty"` StatusNotIn []todo.Status `json:"statusNotIn,omitempty"` // "priority" field predicates. Priority *int `json:"priority,omitempty"` PriorityNEQ *int `json:"priorityNEQ,omitempty"` PriorityIn []int `json:"priorityIn,omitempty"` PriorityNotIn []int `json:"priorityNotIn,omitempty"` PriorityGT *int `json:"priorityGT,omitempty"` PriorityGTE *int `json:"priorityGTE,omitempty"` PriorityLT *int `json:"priorityLT,omitempty"` PriorityLTE *int `json:"priorityLTE,omitempty"` // "text" field predicates. Text *string `json:"text,omitempty"` TextNEQ *string `json:"textNEQ,omitempty"` TextIn []string `json:"textIn,omitempty"` TextNotIn []string `json:"textNotIn,omitempty"` TextGT *string `json:"textGT,omitempty"` TextGTE *string `json:"textGTE,omitempty"` TextLT *string `json:"textLT,omitempty"` TextLTE *string `json:"textLTE,omitempty"` TextContains *string `json:"textContains,omitempty"` TextHasPrefix *string `json:"textHasPrefix,omitempty"` TextHasSuffix *string `json:"textHasSuffix,omitempty"` TextEqualFold *string `json:"textEqualFold,omitempty"` TextContainsFold *string `json:"textContainsFold,omitempty"` // "category_id" field predicates. CategoryID *pulid.ID `json:"categoryID,omitempty"` CategoryIDNEQ *pulid.ID `json:"categoryIDNEQ,omitempty"` CategoryIDIn []pulid.ID `json:"categoryIDIn,omitempty"` CategoryIDNotIn []pulid.ID `json:"categoryIDNotIn,omitempty"` CategoryIDGT *pulid.ID `json:"categoryIDGT,omitempty"` CategoryIDGTE *pulid.ID `json:"categoryIDGTE,omitempty"` CategoryIDLT *pulid.ID `json:"categoryIDLT,omitempty"` CategoryIDLTE *pulid.ID `json:"categoryIDLTE,omitempty"` CategoryIDContains *pulid.ID `json:"categoryIDContains,omitempty"` CategoryIDHasPrefix *pulid.ID `json:"categoryIDHasPrefix,omitempty"` CategoryIDHasSuffix *pulid.ID `json:"categoryIDHasSuffix,omitempty"` CategoryIDIsNil bool `json:"categoryIDIsNil,omitempty"` CategoryIDNotNil bool `json:"categoryIDNotNil,omitempty"` CategoryIDEqualFold *pulid.ID `json:"categoryIDEqualFold,omitempty"` CategoryIDContainsFold *pulid.ID `json:"categoryIDContainsFold,omitempty"` // "parent" edge predicates. HasParent *bool `json:"hasParent,omitempty"` HasParentWith []*TodoWhereInput `json:"hasParentWith,omitempty"` // "children" edge predicates. HasChildren *bool `json:"hasChildren,omitempty"` HasChildrenWith []*TodoWhereInput `json:"hasChildrenWith,omitempty"` // "category" edge predicates. HasCategory *bool `json:"hasCategory,omitempty"` HasCategoryWith []*CategoryWhereInput `json:"hasCategoryWith,omitempty"` }
TodoWhereInput represents a where input for filtering Todo queries.
func (*TodoWhereInput) AddPredicates ¶ added in v0.3.0
func (i *TodoWhereInput) AddPredicates(predicates ...predicate.Todo)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type TraverseFunc ¶ added in v0.3.5
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // BillProduct is the client for interacting with the BillProduct builders. BillProduct *BillProductClient // Category is the client for interacting with the Category builders. Category *CategoryClient // Friendship is the client for interacting with the Friendship builders. Friendship *FriendshipClient // Group is the client for interacting with the Group builders. Group *GroupClient // Todo is the client for interacting with the Todo builders. Todo *TodoClient // User is the client for interacting with the User builders. User *UserClient // VerySecret is the client for interacting with the VerySecret builders. VerySecret *VerySecretClient // 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 UpdateCategoryInput ¶ added in v0.3.3
type UpdateCategoryInput struct { Text *string Status *category.Status ClearConfig bool Config *schematype.CategoryConfig ClearDuration bool Duration *time.Duration ClearCount bool Count *uint64 ClearStrings bool Strings []string AppendStrings []string ClearTodos bool AddTodoIDs []pulid.ID RemoveTodoIDs []pulid.ID ClearSubCategories bool AddSubCategoryIDs []pulid.ID RemoveSubCategoryIDs []pulid.ID }
UpdateCategoryInput represents a mutation input for updating categories.
func (*UpdateCategoryInput) Mutate ¶ added in v0.3.3
func (i *UpdateCategoryInput) Mutate(m *CategoryMutation)
Mutate applies the UpdateCategoryInput on the CategoryMutation builder.
type UpdateTodoInput ¶ added in v0.3.2
type UpdateTodoInput struct { Status *todo.Status Priority *int Text *string ClearInit bool Init map[string]interface{} ClearParent bool ParentID *pulid.ID ClearChildren bool AddChildIDs []pulid.ID RemoveChildIDs []pulid.ID ClearSecret bool SecretID *pulid.ID }
UpdateTodoInput represents a mutation input for updating todos.
func (*UpdateTodoInput) Mutate ¶ added in v0.3.2
func (i *UpdateTodoInput) Mutate(m *TodoMutation)
Mutate applies the UpdateTodoInput on the TodoMutation builder.
type UpdateUserInput ¶ added in v0.3.0
type UpdateUserInput struct { Name *string Username *uuid.UUID ClearPassword bool Password *string ClearMetadata bool Metadata map[string]interface{} ClearGroups bool AddGroupIDs []pulid.ID RemoveGroupIDs []pulid.ID ClearFriends bool AddFriendIDs []pulid.ID RemoveFriendIDs []pulid.ID }
UpdateUserInput represents a mutation input for updating users.
func (*UpdateUserInput) Mutate ¶ added in v0.3.0
func (i *UpdateUserInput) Mutate(m *UserMutation)
Mutate applies the UpdateUserInput on the UserMutation builder.
type User ¶ added in v0.3.0
type User struct { // ID of the ent. ID pulid.ID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Username holds the value of the "username" field. Username uuid.UUID `json:"username,omitempty"` // Password holds the value of the "password" field. Password string `json:"-"` // Metadata holds the value of the "metadata" field. Metadata map[string]interface{} `json:"metadata,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) Friendships ¶ added in v0.3.0
func (u *User) Friendships(ctx context.Context) (result []*Friendship, err error)
func (*User) Groups ¶ added in v0.3.0
func (u *User) Groups( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, where *GroupWhereInput, ) (*GroupConnection, error)
func (*User) IsNode ¶ added in v0.3.5
func (n *User) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*User) NamedFriends ¶ added in v0.3.1
NamedFriends returns the Friends named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) NamedFriendships ¶ added in v0.3.1
func (u *User) NamedFriendships(name string) ([]*Friendship, error)
NamedFriendships returns the Friendships named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) NamedGroups ¶ added in v0.3.1
NamedGroups returns the Groups named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) QueryFriends ¶ added in v0.3.0
QueryFriends queries the "friends" edge of the User entity.
func (*User) QueryFriendships ¶ added in v0.3.0
func (u *User) QueryFriendships() *FriendshipQuery
QueryFriendships queries the "friendships" edge of the User entity.
func (*User) QueryGroups ¶ added in v0.3.0
func (u *User) QueryGroups() *GroupQuery
QueryGroups queries the "groups" edge of the User entity.
func (*User) Unwrap ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶ added in v0.3.0
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶ added in v0.3.0
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶ added in v0.3.0
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶ added in v0.3.0
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶ added in v0.3.0
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶ added in v0.3.0
func (c *UserClient) DeleteOneID(id pulid.ID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) Hooks ¶ added in v0.3.0
func (c *UserClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserClient) Intercept ¶ added in v0.3.5
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 ¶ added in v0.3.5
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶ added in v0.3.0
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryFriends ¶ added in v0.3.0
func (c *UserClient) QueryFriends(u *User) *UserQuery
QueryFriends queries the friends edge of a User.
func (*UserClient) QueryFriendships ¶ added in v0.3.0
func (c *UserClient) QueryFriendships(u *User) *FriendshipQuery
QueryFriendships queries the friendships edge of a User.
func (*UserClient) QueryGroups ¶ added in v0.3.0
func (c *UserClient) QueryGroups(u *User) *GroupQuery
QueryGroups queries the groups edge of a User.
func (*UserClient) Update ¶ added in v0.3.0
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶ added in v0.3.0
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶ added in v0.3.0
func (c *UserClient) UpdateOneID(id pulid.ID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶ added in v0.3.0
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserConnection ¶ added in v0.3.0
type UserConnection struct { Edges []*UserEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
UserConnection is the connection containing edges to User.
type UserCreate ¶ added in v0.3.0
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddFriendIDs ¶ added in v0.3.0
func (uc *UserCreate) AddFriendIDs(ids ...pulid.ID) *UserCreate
AddFriendIDs adds the "friends" edge to the User entity by IDs.
func (*UserCreate) AddFriends ¶ added in v0.3.0
func (uc *UserCreate) AddFriends(u ...*User) *UserCreate
AddFriends adds the "friends" edges to the User entity.
func (*UserCreate) AddFriendshipIDs ¶ added in v0.3.0
func (uc *UserCreate) AddFriendshipIDs(ids ...pulid.ID) *UserCreate
AddFriendshipIDs adds the "friendships" edge to the Friendship entity by IDs.
func (*UserCreate) AddFriendships ¶ added in v0.3.0
func (uc *UserCreate) AddFriendships(f ...*Friendship) *UserCreate
AddFriendships adds the "friendships" edges to the Friendship entity.
func (*UserCreate) AddGroupIDs ¶ added in v0.3.0
func (uc *UserCreate) AddGroupIDs(ids ...pulid.ID) *UserCreate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*UserCreate) AddGroups ¶ added in v0.3.0
func (uc *UserCreate) AddGroups(g ...*Group) *UserCreate
AddGroups adds the "groups" edges to the Group entity.
func (*UserCreate) Exec ¶ added in v0.3.0
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶ added in v0.3.0
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶ added in v0.3.0
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶ added in v0.3.0
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶ added in v0.3.0
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetID ¶ added in v0.3.0
func (uc *UserCreate) SetID(pu pulid.ID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetInput ¶ added in v0.3.0
func (c *UserCreate) SetInput(i CreateUserInput) *UserCreate
SetInput applies the change-set in the CreateUserInput on the UserCreate builder.
func (*UserCreate) SetMetadata ¶ added in v0.4.0
func (uc *UserCreate) SetMetadata(m map[string]interface{}) *UserCreate
SetMetadata sets the "metadata" field.
func (*UserCreate) SetName ¶ added in v0.3.0
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableID ¶ added in v0.3.0
func (uc *UserCreate) SetNillableID(pu *pulid.ID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableName ¶ added in v0.3.0
func (uc *UserCreate) SetNillableName(s *string) *UserCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserCreate) SetNillablePassword ¶ added in v0.3.3
func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserCreate) SetNillableUsername ¶ added in v0.3.5
func (uc *UserCreate) SetNillableUsername(u *uuid.UUID) *UserCreate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserCreate) SetPassword ¶ added in v0.3.3
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetUsername ¶ added in v0.3.5
func (uc *UserCreate) SetUsername(u uuid.UUID) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶ added in v0.3.0
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶ added in v0.3.0
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶ added in v0.3.0
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶ added in v0.3.0
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶ added in v0.3.0
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶ added in v0.3.0
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶ added in v0.3.0
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶ added in v0.3.0
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶ added in v0.3.0
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶ added in v0.3.0
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶ added in v0.4.0
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶ added in v0.3.0
type UserEdges struct { // The groups of the user Groups []*Group `json:"groups,omitempty"` // Friends holds the value of the friends edge. Friends []*User `json:"friends,omitempty"` // Friendships holds the value of the friendships edge. Friendships []*Friendship `json:"friendships,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) FriendsOrErr ¶ added in v0.3.0
FriendsOrErr returns the Friends value or an error if the edge was not loaded in eager-loading.
func (UserEdges) FriendshipsOrErr ¶ added in v0.3.0
func (e UserEdges) FriendshipsOrErr() ([]*Friendship, error)
FriendshipsOrErr returns the Friendships value or an error if the edge was not loaded in eager-loading.
func (UserEdges) GroupsOrErr ¶ added in v0.3.0
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶ added in v0.3.0
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶ added in v0.3.0
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶ added in v0.3.0
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 ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type UserMutation ¶ added in v0.3.0
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶ added in v0.3.0
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) AddFriendIDs ¶ added in v0.3.0
func (m *UserMutation) AddFriendIDs(ids ...pulid.ID)
AddFriendIDs adds the "friends" edge to the User entity by ids.
func (*UserMutation) AddFriendshipIDs ¶ added in v0.3.0
func (m *UserMutation) AddFriendshipIDs(ids ...pulid.ID)
AddFriendshipIDs adds the "friendships" edge to the Friendship entity by ids.
func (*UserMutation) AddGroupIDs ¶ added in v0.3.0
func (m *UserMutation) AddGroupIDs(ids ...pulid.ID)
AddGroupIDs adds the "groups" edge to the Group entity by ids.
func (*UserMutation) AddedEdges ¶ added in v0.3.0
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶ added in v0.3.0
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) ClearEdge ¶ added in v0.3.0
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 ¶ added in v0.3.0
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) ClearFriends ¶ added in v0.3.0
func (m *UserMutation) ClearFriends()
ClearFriends clears the "friends" edge to the User entity.
func (*UserMutation) ClearFriendships ¶ added in v0.3.0
func (m *UserMutation) ClearFriendships()
ClearFriendships clears the "friendships" edge to the Friendship entity.
func (*UserMutation) ClearGroups ¶ added in v0.3.0
func (m *UserMutation) ClearGroups()
ClearGroups clears the "groups" edge to the Group entity.
func (*UserMutation) ClearMetadata ¶ added in v0.4.0
func (m *UserMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*UserMutation) ClearPassword ¶ added in v0.3.3
func (m *UserMutation) ClearPassword()
ClearPassword clears the value of the "password" field.
func (*UserMutation) ClearedEdges ¶ added in v0.3.0
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶ added in v0.3.0
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶ added in v0.3.0
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) EdgeCleared ¶ added in v0.3.0
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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) FriendsCleared ¶ added in v0.3.0
func (m *UserMutation) FriendsCleared() bool
FriendsCleared reports if the "friends" edge to the User entity was cleared.
func (*UserMutation) FriendsIDs ¶ added in v0.3.0
func (m *UserMutation) FriendsIDs() (ids []pulid.ID)
FriendsIDs returns the "friends" edge IDs in the mutation.
func (*UserMutation) FriendshipsCleared ¶ added in v0.3.0
func (m *UserMutation) FriendshipsCleared() bool
FriendshipsCleared reports if the "friendships" edge to the Friendship entity was cleared.
func (*UserMutation) FriendshipsIDs ¶ added in v0.3.0
func (m *UserMutation) FriendshipsIDs() (ids []pulid.ID)
FriendshipsIDs returns the "friendships" edge IDs in the mutation.
func (*UserMutation) GroupsCleared ¶ added in v0.3.0
func (m *UserMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the Group entity was cleared.
func (*UserMutation) GroupsIDs ¶ added in v0.3.0
func (m *UserMutation) GroupsIDs() (ids []pulid.ID)
GroupsIDs returns the "groups" edge IDs in the mutation.
func (*UserMutation) ID ¶ added in v0.3.0
func (m *UserMutation) ID() (id pulid.ID, 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 ¶ added in v0.3.0
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) Metadata ¶ added in v0.4.0
func (m *UserMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*UserMutation) MetadataCleared ¶ added in v0.4.0
func (m *UserMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*UserMutation) Name ¶ added in v0.3.0
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldField ¶ added in v0.3.0
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) OldMetadata ¶ added in v0.4.0
func (m *UserMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old "metadata" 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) OldName ¶ added in v0.3.0
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶ added in v0.3.3
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶ added in v0.3.5
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Op ¶ added in v0.3.0
func (m *UserMutation) Op() Op
Op returns the operation name.
func (*UserMutation) Password ¶ added in v0.3.3
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PasswordCleared ¶ added in v0.3.3
func (m *UserMutation) PasswordCleared() bool
PasswordCleared returns if the "password" field was cleared in this mutation.
func (*UserMutation) RemoveFriendIDs ¶ added in v0.3.0
func (m *UserMutation) RemoveFriendIDs(ids ...pulid.ID)
RemoveFriendIDs removes the "friends" edge to the User entity by IDs.
func (*UserMutation) RemoveFriendshipIDs ¶ added in v0.3.0
func (m *UserMutation) RemoveFriendshipIDs(ids ...pulid.ID)
RemoveFriendshipIDs removes the "friendships" edge to the Friendship entity by IDs.
func (*UserMutation) RemoveGroupIDs ¶ added in v0.3.0
func (m *UserMutation) RemoveGroupIDs(ids ...pulid.ID)
RemoveGroupIDs removes the "groups" edge to the Group entity by IDs.
func (*UserMutation) RemovedEdges ¶ added in v0.3.0
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedFriendsIDs ¶ added in v0.3.0
func (m *UserMutation) RemovedFriendsIDs() (ids []pulid.ID)
RemovedFriends returns the removed IDs of the "friends" edge to the User entity.
func (*UserMutation) RemovedFriendshipsIDs ¶ added in v0.3.0
func (m *UserMutation) RemovedFriendshipsIDs() (ids []pulid.ID)
RemovedFriendships returns the removed IDs of the "friendships" edge to the Friendship entity.
func (*UserMutation) RemovedGroupsIDs ¶ added in v0.3.0
func (m *UserMutation) RemovedGroupsIDs() (ids []pulid.ID)
RemovedGroups returns the removed IDs of the "groups" edge to the Group entity.
func (*UserMutation) RemovedIDs ¶ added in v0.3.0
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) ResetEdge ¶ added in v0.3.0
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶ added in v0.3.0
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) ResetFriends ¶ added in v0.3.0
func (m *UserMutation) ResetFriends()
ResetFriends resets all changes to the "friends" edge.
func (*UserMutation) ResetFriendships ¶ added in v0.3.0
func (m *UserMutation) ResetFriendships()
ResetFriendships resets all changes to the "friendships" edge.
func (*UserMutation) ResetGroups ¶ added in v0.3.0
func (m *UserMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*UserMutation) ResetMetadata ¶ added in v0.4.0
func (m *UserMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*UserMutation) ResetName ¶ added in v0.3.0
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetPassword ¶ added in v0.3.3
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetUsername ¶ added in v0.3.5
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetField ¶ added in v0.3.0
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) SetID ¶ added in v0.3.0
func (m *UserMutation) SetID(id pulid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetMetadata ¶ added in v0.4.0
func (m *UserMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the "metadata" field.
func (*UserMutation) SetName ¶ added in v0.3.0
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶ added in v0.3.5
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶ added in v0.3.3
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetUsername ¶ added in v0.3.5
func (m *UserMutation) SetUsername(u uuid.UUID)
SetUsername sets the "username" field.
func (UserMutation) Tx ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Username ¶ added in v0.3.5
func (m *UserMutation) Username() (r uuid.UUID, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶ added in v0.3.0
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶ added in v0.3.5
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 UserOrder ¶ added in v0.3.0
type UserOrder struct { Direction OrderDirection `json:"direction"` Field *UserOrderField `json:"field"` }
UserOrder defines the ordering of User.
type UserOrderField ¶ added in v0.3.0
type UserOrderField struct { // Value extracts the ordering value from the given User. Value func(*User) (ent.Value, error) // contains filtered or unexported fields }
UserOrderField defines the ordering field of User.
func (UserOrderField) MarshalGQL ¶ added in v0.4.1
func (f UserOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (UserOrderField) String ¶ added in v0.4.1
func (f UserOrderField) String() string
String implement fmt.Stringer interface.
func (*UserOrderField) UnmarshalGQL ¶ added in v0.4.1
func (f *UserOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type UserPaginateOption ¶ added in v0.3.0
type UserPaginateOption func(*userPager) error
UserPaginateOption enables pagination customization.
func WithUserFilter ¶ added in v0.3.0
func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption
WithUserFilter configures pagination filter.
func WithUserOrder ¶ added in v0.3.0
func WithUserOrder(order *UserOrder) UserPaginateOption
WithUserOrder configures pagination ordering.
type UserQuery ¶ added in v0.3.0
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶ added in v0.3.4
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶ added in v0.3.0
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) CollectFields ¶ added in v0.3.0
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*UserQuery) Exist ¶ added in v0.3.0
Exist returns true if the query has elements in the graph.
func (*UserQuery) First ¶ added in v0.3.0
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶ added in v0.3.0
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) FirstIDX ¶ added in v0.3.0
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserQuery) GroupBy ¶ added in v0.3.0
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶ added in v0.3.0
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 ¶ added in v0.3.0
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) Order ¶ added in v0.3.0
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) Paginate ¶ added in v0.3.0
func (u *UserQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...UserPaginateOption, ) (*UserConnection, error)
Paginate executes the query and returns a relay based cursor connection to User.
func (*UserQuery) QueryFriends ¶ added in v0.3.0
QueryFriends chains the current query on the "friends" edge.
func (*UserQuery) QueryFriendships ¶ added in v0.3.0
func (uq *UserQuery) QueryFriendships() *FriendshipQuery
QueryFriendships chains the current query on the "friendships" edge.
func (*UserQuery) QueryGroups ¶ added in v0.3.0
func (uq *UserQuery) QueryGroups() *GroupQuery
QueryGroups chains the current query on the "groups" edge.
func (*UserQuery) Select ¶ added in v0.3.0
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 { Name string `json:"name,omitempty"` } client.User.Query(). Select(user.FieldName). Scan(ctx, &v)
func (*UserQuery) Unique ¶ added in v0.3.0
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithFriends ¶ added in v0.3.0
WithFriends tells the query-builder to eager-load the nodes that are connected to the "friends" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithFriendships ¶ added in v0.3.0
func (uq *UserQuery) WithFriendships(opts ...func(*FriendshipQuery)) *UserQuery
WithFriendships tells the query-builder to eager-load the nodes that are connected to the "friendships" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGroups ¶ added in v0.3.0
func (uq *UserQuery) WithGroups(opts ...func(*GroupQuery)) *UserQuery
WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNamedFriends ¶ added in v0.3.1
WithNamedFriends tells the query-builder to eager-load the nodes that are connected to the "friends" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNamedFriendships ¶ added in v0.3.1
func (uq *UserQuery) WithNamedFriendships(name string, opts ...func(*FriendshipQuery)) *UserQuery
WithNamedFriendships tells the query-builder to eager-load the nodes that are connected to the "friendships" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNamedGroups ¶ added in v0.3.1
func (uq *UserQuery) WithNamedGroups(name string, opts ...func(*GroupQuery)) *UserQuery
WithNamedGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶ added in v0.3.0
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶ added in v0.3.4
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*UserSelect) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶ added in v0.3.0
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 ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶ added in v0.3.0
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddFriendIDs ¶ added in v0.3.0
func (uu *UserUpdate) AddFriendIDs(ids ...pulid.ID) *UserUpdate
AddFriendIDs adds the "friends" edge to the User entity by IDs.
func (*UserUpdate) AddFriends ¶ added in v0.3.0
func (uu *UserUpdate) AddFriends(u ...*User) *UserUpdate
AddFriends adds the "friends" edges to the User entity.
func (*UserUpdate) AddFriendshipIDs ¶ added in v0.3.0
func (uu *UserUpdate) AddFriendshipIDs(ids ...pulid.ID) *UserUpdate
AddFriendshipIDs adds the "friendships" edge to the Friendship entity by IDs.
func (*UserUpdate) AddFriendships ¶ added in v0.3.0
func (uu *UserUpdate) AddFriendships(f ...*Friendship) *UserUpdate
AddFriendships adds the "friendships" edges to the Friendship entity.
func (*UserUpdate) AddGroupIDs ¶ added in v0.3.0
func (uu *UserUpdate) AddGroupIDs(ids ...pulid.ID) *UserUpdate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*UserUpdate) AddGroups ¶ added in v0.3.0
func (uu *UserUpdate) AddGroups(g ...*Group) *UserUpdate
AddGroups adds the "groups" edges to the Group entity.
func (*UserUpdate) ClearFriends ¶ added in v0.3.0
func (uu *UserUpdate) ClearFriends() *UserUpdate
ClearFriends clears all "friends" edges to the User entity.
func (*UserUpdate) ClearFriendships ¶ added in v0.3.0
func (uu *UserUpdate) ClearFriendships() *UserUpdate
ClearFriendships clears all "friendships" edges to the Friendship entity.
func (*UserUpdate) ClearGroups ¶ added in v0.3.0
func (uu *UserUpdate) ClearGroups() *UserUpdate
ClearGroups clears all "groups" edges to the Group entity.
func (*UserUpdate) ClearMetadata ¶ added in v0.4.0
func (uu *UserUpdate) ClearMetadata() *UserUpdate
ClearMetadata clears the value of the "metadata" field.
func (*UserUpdate) ClearPassword ¶ added in v0.3.3
func (uu *UserUpdate) ClearPassword() *UserUpdate
ClearPassword clears the value of the "password" field.
func (*UserUpdate) Exec ¶ added in v0.3.0
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶ added in v0.3.0
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶ added in v0.3.0
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveFriendIDs ¶ added in v0.3.0
func (uu *UserUpdate) RemoveFriendIDs(ids ...pulid.ID) *UserUpdate
RemoveFriendIDs removes the "friends" edge to User entities by IDs.
func (*UserUpdate) RemoveFriends ¶ added in v0.3.0
func (uu *UserUpdate) RemoveFriends(u ...*User) *UserUpdate
RemoveFriends removes "friends" edges to User entities.
func (*UserUpdate) RemoveFriendshipIDs ¶ added in v0.3.0
func (uu *UserUpdate) RemoveFriendshipIDs(ids ...pulid.ID) *UserUpdate
RemoveFriendshipIDs removes the "friendships" edge to Friendship entities by IDs.
func (*UserUpdate) RemoveFriendships ¶ added in v0.3.0
func (uu *UserUpdate) RemoveFriendships(f ...*Friendship) *UserUpdate
RemoveFriendships removes "friendships" edges to Friendship entities.
func (*UserUpdate) RemoveGroupIDs ¶ added in v0.3.0
func (uu *UserUpdate) RemoveGroupIDs(ids ...pulid.ID) *UserUpdate
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*UserUpdate) RemoveGroups ¶ added in v0.3.0
func (uu *UserUpdate) RemoveGroups(g ...*Group) *UserUpdate
RemoveGroups removes "groups" edges to Group entities.
func (*UserUpdate) Save ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetInput ¶ added in v0.3.0
func (c *UserUpdate) SetInput(i UpdateUserInput) *UserUpdate
SetInput applies the change-set in the UpdateUserInput on the UserUpdate builder.
func (*UserUpdate) SetMetadata ¶ added in v0.4.0
func (uu *UserUpdate) SetMetadata(m map[string]interface{}) *UserUpdate
SetMetadata sets the "metadata" field.
func (*UserUpdate) SetName ¶ added in v0.3.0
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableName ¶ added in v0.3.0
func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶ added in v0.3.3
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillableUsername ¶ added in v0.3.5
func (uu *UserUpdate) SetNillableUsername(u *uuid.UUID) *UserUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶ added in v0.3.3
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetUsername ¶ added in v0.3.5
func (uu *UserUpdate) SetUsername(u uuid.UUID) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶ added in v0.3.0
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶ added in v0.3.0
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddFriendIDs ¶ added in v0.3.0
func (uuo *UserUpdateOne) AddFriendIDs(ids ...pulid.ID) *UserUpdateOne
AddFriendIDs adds the "friends" edge to the User entity by IDs.
func (*UserUpdateOne) AddFriends ¶ added in v0.3.0
func (uuo *UserUpdateOne) AddFriends(u ...*User) *UserUpdateOne
AddFriends adds the "friends" edges to the User entity.
func (*UserUpdateOne) AddFriendshipIDs ¶ added in v0.3.0
func (uuo *UserUpdateOne) AddFriendshipIDs(ids ...pulid.ID) *UserUpdateOne
AddFriendshipIDs adds the "friendships" edge to the Friendship entity by IDs.
func (*UserUpdateOne) AddFriendships ¶ added in v0.3.0
func (uuo *UserUpdateOne) AddFriendships(f ...*Friendship) *UserUpdateOne
AddFriendships adds the "friendships" edges to the Friendship entity.
func (*UserUpdateOne) AddGroupIDs ¶ added in v0.3.0
func (uuo *UserUpdateOne) AddGroupIDs(ids ...pulid.ID) *UserUpdateOne
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*UserUpdateOne) AddGroups ¶ added in v0.3.0
func (uuo *UserUpdateOne) AddGroups(g ...*Group) *UserUpdateOne
AddGroups adds the "groups" edges to the Group entity.
func (*UserUpdateOne) ClearFriends ¶ added in v0.3.0
func (uuo *UserUpdateOne) ClearFriends() *UserUpdateOne
ClearFriends clears all "friends" edges to the User entity.
func (*UserUpdateOne) ClearFriendships ¶ added in v0.3.0
func (uuo *UserUpdateOne) ClearFriendships() *UserUpdateOne
ClearFriendships clears all "friendships" edges to the Friendship entity.
func (*UserUpdateOne) ClearGroups ¶ added in v0.3.0
func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne
ClearGroups clears all "groups" edges to the Group entity.
func (*UserUpdateOne) ClearMetadata ¶ added in v0.4.0
func (uuo *UserUpdateOne) ClearMetadata() *UserUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*UserUpdateOne) ClearPassword ¶ added in v0.3.3
func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
ClearPassword clears the value of the "password" field.
func (*UserUpdateOne) Exec ¶ added in v0.3.0
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶ added in v0.3.0
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶ added in v0.3.0
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveFriendIDs ¶ added in v0.3.0
func (uuo *UserUpdateOne) RemoveFriendIDs(ids ...pulid.ID) *UserUpdateOne
RemoveFriendIDs removes the "friends" edge to User entities by IDs.
func (*UserUpdateOne) RemoveFriends ¶ added in v0.3.0
func (uuo *UserUpdateOne) RemoveFriends(u ...*User) *UserUpdateOne
RemoveFriends removes "friends" edges to User entities.
func (*UserUpdateOne) RemoveFriendshipIDs ¶ added in v0.3.0
func (uuo *UserUpdateOne) RemoveFriendshipIDs(ids ...pulid.ID) *UserUpdateOne
RemoveFriendshipIDs removes the "friendships" edge to Friendship entities by IDs.
func (*UserUpdateOne) RemoveFriendships ¶ added in v0.3.0
func (uuo *UserUpdateOne) RemoveFriendships(f ...*Friendship) *UserUpdateOne
RemoveFriendships removes "friendships" edges to Friendship entities.
func (*UserUpdateOne) RemoveGroupIDs ¶ added in v0.3.0
func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...pulid.ID) *UserUpdateOne
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*UserUpdateOne) RemoveGroups ¶ added in v0.3.0
func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *UserUpdateOne
RemoveGroups removes "groups" edges to Group entities.
func (*UserUpdateOne) Save ¶ added in v0.3.0
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶ added in v0.3.0
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶ added in v0.3.0
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) SetInput ¶ added in v0.3.0
func (c *UserUpdateOne) SetInput(i UpdateUserInput) *UserUpdateOne
SetInput applies the change-set in the UpdateUserInput on the UserUpdateOne builder.
func (*UserUpdateOne) SetMetadata ¶ added in v0.4.0
func (uuo *UserUpdateOne) SetMetadata(m map[string]interface{}) *UserUpdateOne
SetMetadata sets the "metadata" field.
func (*UserUpdateOne) SetName ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableName ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶ added in v0.3.3
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUsername ¶ added in v0.3.5
func (uuo *UserUpdateOne) SetNillableUsername(u *uuid.UUID) *UserUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶ added in v0.3.3
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetUsername ¶ added in v0.3.5
func (uuo *UserUpdateOne) SetUsername(u uuid.UUID) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶ added in v0.4.0
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserWhereInput ¶ added in v0.3.0
type UserWhereInput struct { Predicates []predicate.User `json:"-"` Not *UserWhereInput `json:"not,omitempty"` Or []*UserWhereInput `json:"or,omitempty"` And []*UserWhereInput `json:"and,omitempty"` // "id" field predicates. ID *pulid.ID `json:"id,omitempty"` IDNEQ *pulid.ID `json:"idNEQ,omitempty"` IDIn []pulid.ID `json:"idIn,omitempty"` IDNotIn []pulid.ID `json:"idNotIn,omitempty"` IDGT *pulid.ID `json:"idGT,omitempty"` IDGTE *pulid.ID `json:"idGTE,omitempty"` IDLT *pulid.ID `json:"idLT,omitempty"` IDLTE *pulid.ID `json:"idLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "username" field predicates. Username *uuid.UUID `json:"username,omitempty"` UsernameNEQ *uuid.UUID `json:"usernameNEQ,omitempty"` UsernameIn []uuid.UUID `json:"usernameIn,omitempty"` UsernameNotIn []uuid.UUID `json:"usernameNotIn,omitempty"` UsernameGT *uuid.UUID `json:"usernameGT,omitempty"` UsernameGTE *uuid.UUID `json:"usernameGTE,omitempty"` UsernameLT *uuid.UUID `json:"usernameLT,omitempty"` UsernameLTE *uuid.UUID `json:"usernameLTE,omitempty"` // "password" field predicates. Password *string `json:"password,omitempty"` PasswordNEQ *string `json:"passwordNEQ,omitempty"` PasswordIn []string `json:"passwordIn,omitempty"` PasswordNotIn []string `json:"passwordNotIn,omitempty"` PasswordGT *string `json:"passwordGT,omitempty"` PasswordGTE *string `json:"passwordGTE,omitempty"` PasswordLT *string `json:"passwordLT,omitempty"` PasswordLTE *string `json:"passwordLTE,omitempty"` PasswordContains *string `json:"passwordContains,omitempty"` PasswordHasPrefix *string `json:"passwordHasPrefix,omitempty"` PasswordHasSuffix *string `json:"passwordHasSuffix,omitempty"` PasswordIsNil bool `json:"passwordIsNil,omitempty"` PasswordNotNil bool `json:"passwordNotNil,omitempty"` PasswordEqualFold *string `json:"passwordEqualFold,omitempty"` PasswordContainsFold *string `json:"passwordContainsFold,omitempty"` // "groups" edge predicates. HasGroups *bool `json:"hasGroups,omitempty"` HasGroupsWith []*GroupWhereInput `json:"hasGroupsWith,omitempty"` // "friends" edge predicates. HasFriends *bool `json:"hasFriends,omitempty"` HasFriendsWith []*UserWhereInput `json:"hasFriendsWith,omitempty"` // "friendships" edge predicates. HasFriendships *bool `json:"hasFriendships,omitempty"` HasFriendshipsWith []*FriendshipWhereInput `json:"hasFriendshipsWith,omitempty"` }
UserWhereInput represents a where input for filtering User queries.
func (*UserWhereInput) AddPredicates ¶ added in v0.3.0
func (i *UserWhereInput) AddPredicates(predicates ...predicate.User)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
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.
type VerySecret ¶
type VerySecret struct { // ID of the ent. ID pulid.ID `json:"id,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // contains filtered or unexported fields }
VerySecret is the model entity for the VerySecret schema.
func (*VerySecret) String ¶
func (vs *VerySecret) String() string
String implements the fmt.Stringer.
func (*VerySecret) Unwrap ¶
func (vs *VerySecret) Unwrap() *VerySecret
Unwrap unwraps the VerySecret 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 (*VerySecret) Update ¶
func (vs *VerySecret) Update() *VerySecretUpdateOne
Update returns a builder for updating this VerySecret. Note that you need to call VerySecret.Unwrap() before calling this method if this VerySecret was returned from a transaction, and the transaction was committed or rolled back.
type VerySecretClient ¶
type VerySecretClient struct {
// contains filtered or unexported fields
}
VerySecretClient is a client for the VerySecret schema.
func NewVerySecretClient ¶
func NewVerySecretClient(c config) *VerySecretClient
NewVerySecretClient returns a client for the VerySecret from the given config.
func (*VerySecretClient) Create ¶
func (c *VerySecretClient) Create() *VerySecretCreate
Create returns a builder for creating a VerySecret entity.
func (*VerySecretClient) CreateBulk ¶
func (c *VerySecretClient) CreateBulk(builders ...*VerySecretCreate) *VerySecretCreateBulk
CreateBulk returns a builder for creating a bulk of VerySecret entities.
func (*VerySecretClient) Delete ¶
func (c *VerySecretClient) Delete() *VerySecretDelete
Delete returns a delete builder for VerySecret.
func (*VerySecretClient) DeleteOne ¶
func (c *VerySecretClient) DeleteOne(vs *VerySecret) *VerySecretDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*VerySecretClient) DeleteOneID ¶
func (c *VerySecretClient) DeleteOneID(id pulid.ID) *VerySecretDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*VerySecretClient) Get ¶
func (c *VerySecretClient) Get(ctx context.Context, id pulid.ID) (*VerySecret, error)
Get returns a VerySecret entity by its id.
func (*VerySecretClient) GetX ¶
func (c *VerySecretClient) GetX(ctx context.Context, id pulid.ID) *VerySecret
GetX is like Get, but panics if an error occurs.
func (*VerySecretClient) Hooks ¶
func (c *VerySecretClient) Hooks() []Hook
Hooks returns the client hooks.
func (*VerySecretClient) Intercept ¶ added in v0.3.5
func (c *VerySecretClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `verysecret.Intercept(f(g(h())))`.
func (*VerySecretClient) Interceptors ¶ added in v0.3.5
func (c *VerySecretClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*VerySecretClient) Query ¶
func (c *VerySecretClient) Query() *VerySecretQuery
Query returns a query builder for VerySecret.
func (*VerySecretClient) Update ¶
func (c *VerySecretClient) Update() *VerySecretUpdate
Update returns an update builder for VerySecret.
func (*VerySecretClient) UpdateOne ¶
func (c *VerySecretClient) UpdateOne(vs *VerySecret) *VerySecretUpdateOne
UpdateOne returns an update builder for the given entity.
func (*VerySecretClient) UpdateOneID ¶
func (c *VerySecretClient) UpdateOneID(id pulid.ID) *VerySecretUpdateOne
UpdateOneID returns an update builder for the given id.
func (*VerySecretClient) Use ¶
func (c *VerySecretClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `verysecret.Hooks(f(g(h())))`.
type VerySecretCreate ¶
type VerySecretCreate struct {
// contains filtered or unexported fields
}
VerySecretCreate is the builder for creating a VerySecret entity.
func (*VerySecretCreate) Exec ¶ added in v0.2.0
func (vsc *VerySecretCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*VerySecretCreate) ExecX ¶ added in v0.2.0
func (vsc *VerySecretCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VerySecretCreate) Mutation ¶
func (vsc *VerySecretCreate) Mutation() *VerySecretMutation
Mutation returns the VerySecretMutation object of the builder.
func (*VerySecretCreate) Save ¶
func (vsc *VerySecretCreate) Save(ctx context.Context) (*VerySecret, error)
Save creates the VerySecret in the database.
func (*VerySecretCreate) SaveX ¶
func (vsc *VerySecretCreate) SaveX(ctx context.Context) *VerySecret
SaveX calls Save and panics if Save returns an error.
func (*VerySecretCreate) SetID ¶
func (vsc *VerySecretCreate) SetID(pu pulid.ID) *VerySecretCreate
SetID sets the "id" field.
func (*VerySecretCreate) SetNillableID ¶
func (vsc *VerySecretCreate) SetNillableID(pu *pulid.ID) *VerySecretCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*VerySecretCreate) SetPassword ¶
func (vsc *VerySecretCreate) SetPassword(s string) *VerySecretCreate
SetPassword sets the "password" field.
type VerySecretCreateBulk ¶
type VerySecretCreateBulk struct {
// contains filtered or unexported fields
}
VerySecretCreateBulk is the builder for creating many VerySecret entities in bulk.
func (*VerySecretCreateBulk) Exec ¶ added in v0.2.0
func (vscb *VerySecretCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*VerySecretCreateBulk) ExecX ¶ added in v0.2.0
func (vscb *VerySecretCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VerySecretCreateBulk) Save ¶
func (vscb *VerySecretCreateBulk) Save(ctx context.Context) ([]*VerySecret, error)
Save creates the VerySecret entities in the database.
func (*VerySecretCreateBulk) SaveX ¶
func (vscb *VerySecretCreateBulk) SaveX(ctx context.Context) []*VerySecret
SaveX is like Save, but panics if an error occurs.
type VerySecretDelete ¶
type VerySecretDelete struct {
// contains filtered or unexported fields
}
VerySecretDelete is the builder for deleting a VerySecret entity.
func (*VerySecretDelete) Exec ¶
func (vsd *VerySecretDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*VerySecretDelete) ExecX ¶
func (vsd *VerySecretDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*VerySecretDelete) Where ¶
func (vsd *VerySecretDelete) Where(ps ...predicate.VerySecret) *VerySecretDelete
Where appends a list predicates to the VerySecretDelete builder.
type VerySecretDeleteOne ¶
type VerySecretDeleteOne struct {
// contains filtered or unexported fields
}
VerySecretDeleteOne is the builder for deleting a single VerySecret entity.
func (*VerySecretDeleteOne) Exec ¶
func (vsdo *VerySecretDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*VerySecretDeleteOne) ExecX ¶
func (vsdo *VerySecretDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VerySecretDeleteOne) Where ¶ added in v0.4.0
func (vsdo *VerySecretDeleteOne) Where(ps ...predicate.VerySecret) *VerySecretDeleteOne
Where appends a list predicates to the VerySecretDelete builder.
type VerySecretGroupBy ¶
type VerySecretGroupBy struct {
// contains filtered or unexported fields
}
VerySecretGroupBy is the group-by builder for VerySecret entities.
func (*VerySecretGroupBy) Aggregate ¶
func (vsgb *VerySecretGroupBy) Aggregate(fns ...AggregateFunc) *VerySecretGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*VerySecretGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VerySecretGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VerySecretGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VerySecretGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VerySecretGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VerySecretGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VerySecretGroupBy) Scan ¶
func (vsgb *VerySecretGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VerySecretGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VerySecretMutation ¶
type VerySecretMutation struct {
// contains filtered or unexported fields
}
VerySecretMutation represents an operation that mutates the VerySecret nodes in the graph.
func (*VerySecretMutation) AddField ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) AddedEdges ¶
func (m *VerySecretMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*VerySecretMutation) AddedField ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) AddedFields ¶
func (m *VerySecretMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*VerySecretMutation) AddedIDs ¶
func (m *VerySecretMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*VerySecretMutation) ClearEdge ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) ClearField ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) ClearedEdges ¶
func (m *VerySecretMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*VerySecretMutation) ClearedFields ¶
func (m *VerySecretMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (VerySecretMutation) Client ¶
func (m VerySecretMutation) 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 (*VerySecretMutation) EdgeCleared ¶
func (m *VerySecretMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*VerySecretMutation) Field ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) FieldCleared ¶
func (m *VerySecretMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*VerySecretMutation) Fields ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) ID ¶
func (m *VerySecretMutation) ID() (id pulid.ID, 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 (*VerySecretMutation) IDs ¶ added in v0.3.0
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 (*VerySecretMutation) 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 (*VerySecretMutation) OldPassword ¶
func (m *VerySecretMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the VerySecret entity. If the VerySecret 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 (*VerySecretMutation) Password ¶
func (m *VerySecretMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*VerySecretMutation) RemovedEdges ¶
func (m *VerySecretMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*VerySecretMutation) RemovedIDs ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) ResetEdge ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) ResetField ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) ResetPassword ¶
func (m *VerySecretMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*VerySecretMutation) SetField ¶
func (m *VerySecretMutation) 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 (*VerySecretMutation) SetID ¶
func (m *VerySecretMutation) SetID(id pulid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of VerySecret entities.
func (*VerySecretMutation) SetOp ¶ added in v0.3.5
func (m *VerySecretMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*VerySecretMutation) SetPassword ¶
func (m *VerySecretMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (VerySecretMutation) Tx ¶
func (m VerySecretMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*VerySecretMutation) Type ¶
func (m *VerySecretMutation) Type() string
Type returns the node type of this mutation (VerySecret).
func (*VerySecretMutation) Where ¶ added in v0.2.0
func (m *VerySecretMutation) Where(ps ...predicate.VerySecret)
Where appends a list predicates to the VerySecretMutation builder.
func (*VerySecretMutation) WhereP ¶ added in v0.3.5
func (m *VerySecretMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the VerySecretMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type VerySecretQuery ¶
type VerySecretQuery struct {
// contains filtered or unexported fields
}
VerySecretQuery is the builder for querying VerySecret entities.
func (*VerySecretQuery) Aggregate ¶ added in v0.3.4
func (vsq *VerySecretQuery) Aggregate(fns ...AggregateFunc) *VerySecretSelect
Aggregate returns a VerySecretSelect configured with the given aggregations.
func (*VerySecretQuery) All ¶
func (vsq *VerySecretQuery) All(ctx context.Context) ([]*VerySecret, error)
All executes the query and returns a list of VerySecrets.
func (*VerySecretQuery) AllX ¶
func (vsq *VerySecretQuery) AllX(ctx context.Context) []*VerySecret
AllX is like All, but panics if an error occurs.
func (*VerySecretQuery) Clone ¶
func (vsq *VerySecretQuery) Clone() *VerySecretQuery
Clone returns a duplicate of the VerySecretQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*VerySecretQuery) Count ¶
func (vsq *VerySecretQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*VerySecretQuery) CountX ¶
func (vsq *VerySecretQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*VerySecretQuery) Exist ¶
func (vsq *VerySecretQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*VerySecretQuery) ExistX ¶
func (vsq *VerySecretQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*VerySecretQuery) First ¶
func (vsq *VerySecretQuery) First(ctx context.Context) (*VerySecret, error)
First returns the first VerySecret entity from the query. Returns a *NotFoundError when no VerySecret was found.
func (*VerySecretQuery) FirstID ¶
FirstID returns the first VerySecret ID from the query. Returns a *NotFoundError when no VerySecret ID was found.
func (*VerySecretQuery) FirstIDX ¶
func (vsq *VerySecretQuery) FirstIDX(ctx context.Context) pulid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*VerySecretQuery) FirstX ¶
func (vsq *VerySecretQuery) FirstX(ctx context.Context) *VerySecret
FirstX is like First, but panics if an error occurs.
func (*VerySecretQuery) GroupBy ¶
func (vsq *VerySecretQuery) GroupBy(field string, fields ...string) *VerySecretGroupBy
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 { Password string `json:"password,omitempty"` Count int `json:"count,omitempty"` } client.VerySecret.Query(). GroupBy(verysecret.FieldPassword). Aggregate(ent.Count()). Scan(ctx, &v)
func (*VerySecretQuery) IDsX ¶
func (vsq *VerySecretQuery) IDsX(ctx context.Context) []pulid.ID
IDsX is like IDs, but panics if an error occurs.
func (*VerySecretQuery) Limit ¶
func (vsq *VerySecretQuery) Limit(limit int) *VerySecretQuery
Limit the number of records to be returned by this query.
func (*VerySecretQuery) Offset ¶
func (vsq *VerySecretQuery) Offset(offset int) *VerySecretQuery
Offset to start from.
func (*VerySecretQuery) Only ¶
func (vsq *VerySecretQuery) Only(ctx context.Context) (*VerySecret, error)
Only returns a single VerySecret entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VerySecret entity is found. Returns a *NotFoundError when no VerySecret entities are found.
func (*VerySecretQuery) OnlyID ¶
OnlyID is like Only, but returns the only VerySecret ID in the query. Returns a *NotSingularError when more than one VerySecret ID is found. Returns a *NotFoundError when no entities are found.
func (*VerySecretQuery) OnlyIDX ¶
func (vsq *VerySecretQuery) OnlyIDX(ctx context.Context) pulid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*VerySecretQuery) OnlyX ¶
func (vsq *VerySecretQuery) OnlyX(ctx context.Context) *VerySecret
OnlyX is like Only, but panics if an error occurs.
func (*VerySecretQuery) Order ¶
func (vsq *VerySecretQuery) Order(o ...verysecret.OrderOption) *VerySecretQuery
Order specifies how the records should be ordered.
func (*VerySecretQuery) Select ¶
func (vsq *VerySecretQuery) Select(fields ...string) *VerySecretSelect
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 { Password string `json:"password,omitempty"` } client.VerySecret.Query(). Select(verysecret.FieldPassword). Scan(ctx, &v)
func (*VerySecretQuery) Unique ¶
func (vsq *VerySecretQuery) Unique(unique bool) *VerySecretQuery
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 (*VerySecretQuery) Where ¶
func (vsq *VerySecretQuery) Where(ps ...predicate.VerySecret) *VerySecretQuery
Where adds a new predicate for the VerySecretQuery builder.
type VerySecretSelect ¶
type VerySecretSelect struct { *VerySecretQuery // contains filtered or unexported fields }
VerySecretSelect is the builder for selecting fields of VerySecret entities.
func (*VerySecretSelect) Aggregate ¶ added in v0.3.4
func (vss *VerySecretSelect) Aggregate(fns ...AggregateFunc) *VerySecretSelect
Aggregate adds the given aggregation functions to the selector query.
func (*VerySecretSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VerySecretSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VerySecretSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VerySecretSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VerySecretSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VerySecretSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VerySecretSelect) Scan ¶
func (vss *VerySecretSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VerySecretSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VerySecretUpdate ¶
type VerySecretUpdate struct {
// contains filtered or unexported fields
}
VerySecretUpdate is the builder for updating VerySecret entities.
func (*VerySecretUpdate) Exec ¶
func (vsu *VerySecretUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*VerySecretUpdate) ExecX ¶
func (vsu *VerySecretUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VerySecretUpdate) Mutation ¶
func (vsu *VerySecretUpdate) Mutation() *VerySecretMutation
Mutation returns the VerySecretMutation object of the builder.
func (*VerySecretUpdate) Save ¶
func (vsu *VerySecretUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*VerySecretUpdate) SaveX ¶
func (vsu *VerySecretUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*VerySecretUpdate) SetPassword ¶
func (vsu *VerySecretUpdate) SetPassword(s string) *VerySecretUpdate
SetPassword sets the "password" field.
func (*VerySecretUpdate) Where ¶
func (vsu *VerySecretUpdate) Where(ps ...predicate.VerySecret) *VerySecretUpdate
Where appends a list predicates to the VerySecretUpdate builder.
type VerySecretUpdateOne ¶
type VerySecretUpdateOne struct {
// contains filtered or unexported fields
}
VerySecretUpdateOne is the builder for updating a single VerySecret entity.
func (*VerySecretUpdateOne) Exec ¶
func (vsuo *VerySecretUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*VerySecretUpdateOne) ExecX ¶
func (vsuo *VerySecretUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VerySecretUpdateOne) Mutation ¶
func (vsuo *VerySecretUpdateOne) Mutation() *VerySecretMutation
Mutation returns the VerySecretMutation object of the builder.
func (*VerySecretUpdateOne) Save ¶
func (vsuo *VerySecretUpdateOne) Save(ctx context.Context) (*VerySecret, error)
Save executes the query and returns the updated VerySecret entity.
func (*VerySecretUpdateOne) SaveX ¶
func (vsuo *VerySecretUpdateOne) SaveX(ctx context.Context) *VerySecret
SaveX is like Save, but panics if an error occurs.
func (*VerySecretUpdateOne) Select ¶
func (vsuo *VerySecretUpdateOne) Select(field string, fields ...string) *VerySecretUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*VerySecretUpdateOne) SetPassword ¶
func (vsuo *VerySecretUpdateOne) SetPassword(s string) *VerySecretUpdateOne
SetPassword sets the "password" field.
func (*VerySecretUpdateOne) Where ¶ added in v0.4.0
func (vsuo *VerySecretUpdateOne) Where(ps ...predicate.VerySecret) *VerySecretUpdateOne
Where appends a list predicates to the VerySecretUpdate builder.
Source Files ¶
- billproduct.go
- billproduct_create.go
- billproduct_delete.go
- billproduct_query.go
- billproduct_update.go
- category.go
- category_create.go
- category_delete.go
- category_query.go
- category_update.go
- client.go
- ent.go
- friendship.go
- friendship_create.go
- friendship_delete.go
- friendship_query.go
- friendship_update.go
- gql_collection.go
- gql_edge.go
- gql_mutation_input.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- group.go
- group_create.go
- group_delete.go
- group_query.go
- group_update.go
- mutation.go
- pulid.go
- runtime.go
- todo.go
- todo_create.go
- todo_delete.go
- todo_query.go
- todo_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- verysecret.go
- verysecret_create.go
- verysecret_delete.go
- verysecret_query.go
- verysecret_update.go