Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type ActionFields
- type AggregateFunc
- type Api
- type ApiOption
- type Assets
- type AssetsApi
- type AssetsApiFilter
- type AssetsClient
- func (c *AssetsClient) Create() *AssetsCreate
- func (c *AssetsClient) CreateBulk(builders ...*AssetsCreate) *AssetsCreateBulk
- func (c *AssetsClient) Delete() *AssetsDelete
- func (c *AssetsClient) DeleteOne(a *Assets) *AssetsDeleteOne
- func (c *AssetsClient) DeleteOneID(id int) *AssetsDeleteOne
- func (c *AssetsClient) Get(ctx context.Context, id int) (*Assets, error)
- func (c *AssetsClient) GetX(ctx context.Context, id int) *Assets
- func (c *AssetsClient) Hooks() []Hook
- func (c *AssetsClient) Query() *AssetsQuery
- func (c *AssetsClient) QueryView(a *Assets) *ViewQuery
- func (c *AssetsClient) Update() *AssetsUpdate
- func (c *AssetsClient) UpdateOne(a *Assets) *AssetsUpdateOne
- func (c *AssetsClient) UpdateOneID(id int) *AssetsUpdateOne
- func (c *AssetsClient) Use(hooks ...Hook)
- type AssetsCreate
- func (ac *AssetsCreate) AddView(v ...*View) *AssetsCreate
- func (ac *AssetsCreate) AddViewIDs(ids ...int) *AssetsCreate
- func (ac *AssetsCreate) Mutation() *AssetsMutation
- func (ac *AssetsCreate) Save(ctx context.Context) (*Assets, error)
- func (ac *AssetsCreate) SaveX(ctx context.Context) *Assets
- func (ac *AssetsCreate) SetExt(s string) *AssetsCreate
- func (ac *AssetsCreate) SetPath(s string) *AssetsCreate
- func (ac *AssetsCreate) SetType(s string) *AssetsCreate
- type AssetsCreateBulk
- type AssetsDelete
- type AssetsDeleteOne
- type AssetsEdges
- type AssetsGroupBy
- func (agb *AssetsGroupBy) Aggregate(fns ...AggregateFunc) *AssetsGroupBy
- func (agb *AssetsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (agb *AssetsGroupBy) BoolX(ctx context.Context) bool
- func (agb *AssetsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (agb *AssetsGroupBy) BoolsX(ctx context.Context) []bool
- func (agb *AssetsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (agb *AssetsGroupBy) Float64X(ctx context.Context) float64
- func (agb *AssetsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (agb *AssetsGroupBy) Float64sX(ctx context.Context) []float64
- func (agb *AssetsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (agb *AssetsGroupBy) IntX(ctx context.Context) int
- func (agb *AssetsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (agb *AssetsGroupBy) IntsX(ctx context.Context) []int
- func (agb *AssetsGroupBy) Scan(ctx context.Context, v interface{}) error
- func (agb *AssetsGroupBy) ScanX(ctx context.Context, v interface{})
- func (agb *AssetsGroupBy) String(ctx context.Context) (_ string, err error)
- func (agb *AssetsGroupBy) StringX(ctx context.Context) string
- func (agb *AssetsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (agb *AssetsGroupBy) StringsX(ctx context.Context) []string
- type AssetsMutation
- func (m *AssetsMutation) AddField(name string, value ent.Value) error
- func (m *AssetsMutation) AddViewIDs(ids ...int)
- func (m *AssetsMutation) AddedEdges() []string
- func (m *AssetsMutation) AddedField(name string) (ent.Value, bool)
- func (m *AssetsMutation) AddedFields() []string
- func (m *AssetsMutation) AddedIDs(name string) []ent.Value
- func (m *AssetsMutation) ClearEdge(name string) error
- func (m *AssetsMutation) ClearField(name string) error
- func (m *AssetsMutation) ClearView()
- func (m *AssetsMutation) ClearedEdges() []string
- func (m *AssetsMutation) ClearedFields() []string
- func (m AssetsMutation) Client() *Client
- func (m *AssetsMutation) EdgeCleared(name string) bool
- func (m *AssetsMutation) Ext() (r string, exists bool)
- func (m *AssetsMutation) Field(name string) (ent.Value, bool)
- func (m *AssetsMutation) FieldCleared(name string) bool
- func (m *AssetsMutation) Fields() []string
- func (m *AssetsMutation) GetType() (r string, exists bool)
- func (m *AssetsMutation) ID() (id int, exists bool)
- func (m *AssetsMutation) OldExt(ctx context.Context) (v string, err error)
- func (m *AssetsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AssetsMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *AssetsMutation) OldType(ctx context.Context) (v string, err error)
- func (m *AssetsMutation) Op() Op
- func (m *AssetsMutation) Path() (r string, exists bool)
- func (m *AssetsMutation) RemoveViewIDs(ids ...int)
- func (m *AssetsMutation) RemovedEdges() []string
- func (m *AssetsMutation) RemovedIDs(name string) []ent.Value
- func (m *AssetsMutation) RemovedViewIDs() (ids []int)
- func (m *AssetsMutation) ResetEdge(name string) error
- func (m *AssetsMutation) ResetExt()
- func (m *AssetsMutation) ResetField(name string) error
- func (m *AssetsMutation) ResetPath()
- func (m *AssetsMutation) ResetType()
- func (m *AssetsMutation) ResetView()
- func (m *AssetsMutation) SetExt(s string)
- func (m *AssetsMutation) SetField(name string, value ent.Value) error
- func (m *AssetsMutation) SetPath(s string)
- func (m *AssetsMutation) SetType(s string)
- func (m AssetsMutation) Tx() (*Tx, error)
- func (m *AssetsMutation) Type() string
- func (m *AssetsMutation) ViewCleared() bool
- func (m *AssetsMutation) ViewIDs() (ids []int)
- type AssetsQuery
- func (aq *AssetsQuery) All(ctx context.Context) ([]*Assets, error)
- func (aq *AssetsQuery) AllX(ctx context.Context) []*Assets
- func (aq *AssetsQuery) Clone() *AssetsQuery
- func (aq *AssetsQuery) Count(ctx context.Context) (int, error)
- func (aq *AssetsQuery) CountX(ctx context.Context) int
- func (aq *AssetsQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AssetsQuery) ExistX(ctx context.Context) bool
- func (aq *AssetsQuery) First(ctx context.Context) (*Assets, error)
- func (aq *AssetsQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AssetsQuery) FirstIDX(ctx context.Context) int
- func (aq *AssetsQuery) FirstX(ctx context.Context) *Assets
- func (aq *AssetsQuery) GroupBy(field string, fields ...string) *AssetsGroupBy
- func (aq *AssetsQuery) IDs(ctx context.Context) ([]int, error)
- func (aq *AssetsQuery) IDsX(ctx context.Context) []int
- func (aq *AssetsQuery) Limit(limit int) *AssetsQuery
- func (aq *AssetsQuery) Offset(offset int) *AssetsQuery
- func (aq *AssetsQuery) Only(ctx context.Context) (*Assets, error)
- func (aq *AssetsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AssetsQuery) OnlyIDX(ctx context.Context) int
- func (aq *AssetsQuery) OnlyX(ctx context.Context) *Assets
- func (aq *AssetsQuery) Order(o ...OrderFunc) *AssetsQuery
- func (aq *AssetsQuery) QueryView() *ViewQuery
- func (aq *AssetsQuery) Select(field string, fields ...string) *AssetsSelect
- func (aq *AssetsQuery) Unique(unique bool) *AssetsQuery
- func (aq *AssetsQuery) Where(ps ...predicate.Assets) *AssetsQuery
- func (aq *AssetsQuery) WithView(opts ...func(*ViewQuery)) *AssetsQuery
- type AssetsSelect
- func (as *AssetsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (as *AssetsSelect) BoolX(ctx context.Context) bool
- func (as *AssetsSelect) Bools(ctx context.Context) ([]bool, error)
- func (as *AssetsSelect) BoolsX(ctx context.Context) []bool
- func (as *AssetsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (as *AssetsSelect) Float64X(ctx context.Context) float64
- func (as *AssetsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (as *AssetsSelect) Float64sX(ctx context.Context) []float64
- func (as *AssetsSelect) Int(ctx context.Context) (_ int, err error)
- func (as *AssetsSelect) IntX(ctx context.Context) int
- func (as *AssetsSelect) Ints(ctx context.Context) ([]int, error)
- func (as *AssetsSelect) IntsX(ctx context.Context) []int
- func (as *AssetsSelect) Scan(ctx context.Context, v interface{}) error
- func (as *AssetsSelect) ScanX(ctx context.Context, v interface{})
- func (as *AssetsSelect) String(ctx context.Context) (_ string, err error)
- func (as *AssetsSelect) StringX(ctx context.Context) string
- func (as *AssetsSelect) Strings(ctx context.Context) ([]string, error)
- func (as *AssetsSelect) StringsX(ctx context.Context) []string
- type AssetsSlice
- type AssetsUpdate
- func (au *AssetsUpdate) AddView(v ...*View) *AssetsUpdate
- func (au *AssetsUpdate) AddViewIDs(ids ...int) *AssetsUpdate
- func (au *AssetsUpdate) ClearView() *AssetsUpdate
- func (au *AssetsUpdate) Exec(ctx context.Context) error
- func (au *AssetsUpdate) ExecX(ctx context.Context)
- func (au *AssetsUpdate) Mutation() *AssetsMutation
- func (au *AssetsUpdate) RemoveView(v ...*View) *AssetsUpdate
- func (au *AssetsUpdate) RemoveViewIDs(ids ...int) *AssetsUpdate
- func (au *AssetsUpdate) Save(ctx context.Context) (int, error)
- func (au *AssetsUpdate) SaveX(ctx context.Context) int
- func (au *AssetsUpdate) SetExt(s string) *AssetsUpdate
- func (au *AssetsUpdate) SetPath(s string) *AssetsUpdate
- func (au *AssetsUpdate) SetType(s string) *AssetsUpdate
- func (au *AssetsUpdate) Where(ps ...predicate.Assets) *AssetsUpdate
- type AssetsUpdateOne
- func (auo *AssetsUpdateOne) AddView(v ...*View) *AssetsUpdateOne
- func (auo *AssetsUpdateOne) AddViewIDs(ids ...int) *AssetsUpdateOne
- func (auo *AssetsUpdateOne) ClearView() *AssetsUpdateOne
- func (auo *AssetsUpdateOne) Exec(ctx context.Context) error
- func (auo *AssetsUpdateOne) ExecX(ctx context.Context)
- func (auo *AssetsUpdateOne) Mutation() *AssetsMutation
- func (auo *AssetsUpdateOne) RemoveView(v ...*View) *AssetsUpdateOne
- func (auo *AssetsUpdateOne) RemoveViewIDs(ids ...int) *AssetsUpdateOne
- func (auo *AssetsUpdateOne) Save(ctx context.Context) (*Assets, error)
- func (auo *AssetsUpdateOne) SaveX(ctx context.Context) *Assets
- func (auo *AssetsUpdateOne) Select(field string, fields ...string) *AssetsUpdateOne
- func (auo *AssetsUpdateOne) SetExt(s string) *AssetsUpdateOne
- func (auo *AssetsUpdateOne) SetPath(s string) *AssetsUpdateOne
- func (auo *AssetsUpdateOne) SetType(s string) *AssetsUpdateOne
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CurdBuilder
- type DataSet
- type DataSetApi
- type DataSetApiFilter
- type DataSetClient
- func (c *DataSetClient) Create() *DataSetCreate
- func (c *DataSetClient) CreateBulk(builders ...*DataSetCreate) *DataSetCreateBulk
- func (c *DataSetClient) Delete() *DataSetDelete
- func (c *DataSetClient) DeleteOne(ds *DataSet) *DataSetDeleteOne
- func (c *DataSetClient) DeleteOneID(id int) *DataSetDeleteOne
- func (c *DataSetClient) Get(ctx context.Context, id int) (*DataSet, error)
- func (c *DataSetClient) GetX(ctx context.Context, id int) *DataSet
- func (c *DataSetClient) Hooks() []Hook
- func (c *DataSetClient) Query() *DataSetQuery
- func (c *DataSetClient) QueryBlock(ds *DataSet) *ViewBlockQuery
- func (c *DataSetClient) Update() *DataSetUpdate
- func (c *DataSetClient) UpdateOne(ds *DataSet) *DataSetUpdateOne
- func (c *DataSetClient) UpdateOneID(id int) *DataSetUpdateOne
- func (c *DataSetClient) Use(hooks ...Hook)
- type DataSetCreate
- func (dsc *DataSetCreate) Mutation() *DataSetMutation
- func (dsc *DataSetCreate) Save(ctx context.Context) (*DataSet, error)
- func (dsc *DataSetCreate) SaveX(ctx context.Context) *DataSet
- func (dsc *DataSetCreate) SetBlock(v *ViewBlock) *DataSetCreate
- func (dsc *DataSetCreate) SetBlockID(id int) *DataSetCreate
- func (dsc *DataSetCreate) SetConfig(s string) *DataSetCreate
- func (dsc *DataSetCreate) SetNillableBlockID(id *int) *DataSetCreate
- func (dsc *DataSetCreate) SetTitle(s string) *DataSetCreate
- func (dsc *DataSetCreate) SetType(s string) *DataSetCreate
- type DataSetCreateBulk
- type DataSetDelete
- type DataSetDeleteOne
- type DataSetEdges
- type DataSetGroupBy
- func (dsgb *DataSetGroupBy) Aggregate(fns ...AggregateFunc) *DataSetGroupBy
- func (dsgb *DataSetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (dsgb *DataSetGroupBy) BoolX(ctx context.Context) bool
- func (dsgb *DataSetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dsgb *DataSetGroupBy) BoolsX(ctx context.Context) []bool
- func (dsgb *DataSetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (dsgb *DataSetGroupBy) Float64X(ctx context.Context) float64
- func (dsgb *DataSetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dsgb *DataSetGroupBy) Float64sX(ctx context.Context) []float64
- func (dsgb *DataSetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (dsgb *DataSetGroupBy) IntX(ctx context.Context) int
- func (dsgb *DataSetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dsgb *DataSetGroupBy) IntsX(ctx context.Context) []int
- func (dsgb *DataSetGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dsgb *DataSetGroupBy) ScanX(ctx context.Context, v interface{})
- func (dsgb *DataSetGroupBy) String(ctx context.Context) (_ string, err error)
- func (dsgb *DataSetGroupBy) StringX(ctx context.Context) string
- func (dsgb *DataSetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dsgb *DataSetGroupBy) StringsX(ctx context.Context) []string
- type DataSetMutation
- func (m *DataSetMutation) AddField(name string, value ent.Value) error
- func (m *DataSetMutation) AddedEdges() []string
- func (m *DataSetMutation) AddedField(name string) (ent.Value, bool)
- func (m *DataSetMutation) AddedFields() []string
- func (m *DataSetMutation) AddedIDs(name string) []ent.Value
- func (m *DataSetMutation) BlockCleared() bool
- func (m *DataSetMutation) BlockID() (id int, exists bool)
- func (m *DataSetMutation) BlockIDs() (ids []int)
- func (m *DataSetMutation) ClearBlock()
- func (m *DataSetMutation) ClearEdge(name string) error
- func (m *DataSetMutation) ClearField(name string) error
- func (m *DataSetMutation) ClearedEdges() []string
- func (m *DataSetMutation) ClearedFields() []string
- func (m DataSetMutation) Client() *Client
- func (m *DataSetMutation) Config() (r string, exists bool)
- func (m *DataSetMutation) EdgeCleared(name string) bool
- func (m *DataSetMutation) Field(name string) (ent.Value, bool)
- func (m *DataSetMutation) FieldCleared(name string) bool
- func (m *DataSetMutation) Fields() []string
- func (m *DataSetMutation) GetType() (r string, exists bool)
- func (m *DataSetMutation) ID() (id int, exists bool)
- func (m *DataSetMutation) OldConfig(ctx context.Context) (v string, err error)
- func (m *DataSetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DataSetMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *DataSetMutation) OldType(ctx context.Context) (v string, err error)
- func (m *DataSetMutation) Op() Op
- func (m *DataSetMutation) RemovedEdges() []string
- func (m *DataSetMutation) RemovedIDs(name string) []ent.Value
- func (m *DataSetMutation) ResetBlock()
- func (m *DataSetMutation) ResetConfig()
- func (m *DataSetMutation) ResetEdge(name string) error
- func (m *DataSetMutation) ResetField(name string) error
- func (m *DataSetMutation) ResetTitle()
- func (m *DataSetMutation) ResetType()
- func (m *DataSetMutation) SetBlockID(id int)
- func (m *DataSetMutation) SetConfig(s string)
- func (m *DataSetMutation) SetField(name string, value ent.Value) error
- func (m *DataSetMutation) SetTitle(s string)
- func (m *DataSetMutation) SetType(s string)
- func (m *DataSetMutation) Title() (r string, exists bool)
- func (m DataSetMutation) Tx() (*Tx, error)
- func (m *DataSetMutation) Type() string
- type DataSetQuery
- func (dsq *DataSetQuery) All(ctx context.Context) ([]*DataSet, error)
- func (dsq *DataSetQuery) AllX(ctx context.Context) []*DataSet
- func (dsq *DataSetQuery) Clone() *DataSetQuery
- func (dsq *DataSetQuery) Count(ctx context.Context) (int, error)
- func (dsq *DataSetQuery) CountX(ctx context.Context) int
- func (dsq *DataSetQuery) Exist(ctx context.Context) (bool, error)
- func (dsq *DataSetQuery) ExistX(ctx context.Context) bool
- func (dsq *DataSetQuery) First(ctx context.Context) (*DataSet, error)
- func (dsq *DataSetQuery) FirstID(ctx context.Context) (id int, err error)
- func (dsq *DataSetQuery) FirstIDX(ctx context.Context) int
- func (dsq *DataSetQuery) FirstX(ctx context.Context) *DataSet
- func (dsq *DataSetQuery) GroupBy(field string, fields ...string) *DataSetGroupBy
- func (dsq *DataSetQuery) IDs(ctx context.Context) ([]int, error)
- func (dsq *DataSetQuery) IDsX(ctx context.Context) []int
- func (dsq *DataSetQuery) Limit(limit int) *DataSetQuery
- func (dsq *DataSetQuery) Offset(offset int) *DataSetQuery
- func (dsq *DataSetQuery) Only(ctx context.Context) (*DataSet, error)
- func (dsq *DataSetQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dsq *DataSetQuery) OnlyIDX(ctx context.Context) int
- func (dsq *DataSetQuery) OnlyX(ctx context.Context) *DataSet
- func (dsq *DataSetQuery) Order(o ...OrderFunc) *DataSetQuery
- func (dsq *DataSetQuery) QueryBlock() *ViewBlockQuery
- func (dsq *DataSetQuery) Select(field string, fields ...string) *DataSetSelect
- func (dsq *DataSetQuery) Unique(unique bool) *DataSetQuery
- func (dsq *DataSetQuery) Where(ps ...predicate.DataSet) *DataSetQuery
- func (dsq *DataSetQuery) WithBlock(opts ...func(*ViewBlockQuery)) *DataSetQuery
- type DataSetSelect
- func (dss *DataSetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (dss *DataSetSelect) BoolX(ctx context.Context) bool
- func (dss *DataSetSelect) Bools(ctx context.Context) ([]bool, error)
- func (dss *DataSetSelect) BoolsX(ctx context.Context) []bool
- func (dss *DataSetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (dss *DataSetSelect) Float64X(ctx context.Context) float64
- func (dss *DataSetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (dss *DataSetSelect) Float64sX(ctx context.Context) []float64
- func (dss *DataSetSelect) Int(ctx context.Context) (_ int, err error)
- func (dss *DataSetSelect) IntX(ctx context.Context) int
- func (dss *DataSetSelect) Ints(ctx context.Context) ([]int, error)
- func (dss *DataSetSelect) IntsX(ctx context.Context) []int
- func (dss *DataSetSelect) Scan(ctx context.Context, v interface{}) error
- func (dss *DataSetSelect) ScanX(ctx context.Context, v interface{})
- func (dss *DataSetSelect) String(ctx context.Context) (_ string, err error)
- func (dss *DataSetSelect) StringX(ctx context.Context) string
- func (dss *DataSetSelect) Strings(ctx context.Context) ([]string, error)
- func (dss *DataSetSelect) StringsX(ctx context.Context) []string
- type DataSetUpdate
- func (dsu *DataSetUpdate) ClearBlock() *DataSetUpdate
- func (dsu *DataSetUpdate) Exec(ctx context.Context) error
- func (dsu *DataSetUpdate) ExecX(ctx context.Context)
- func (dsu *DataSetUpdate) Mutation() *DataSetMutation
- func (dsu *DataSetUpdate) Save(ctx context.Context) (int, error)
- func (dsu *DataSetUpdate) SaveX(ctx context.Context) int
- func (dsu *DataSetUpdate) SetBlock(v *ViewBlock) *DataSetUpdate
- func (dsu *DataSetUpdate) SetBlockID(id int) *DataSetUpdate
- func (dsu *DataSetUpdate) SetConfig(s string) *DataSetUpdate
- func (dsu *DataSetUpdate) SetNillableBlockID(id *int) *DataSetUpdate
- func (dsu *DataSetUpdate) SetTitle(s string) *DataSetUpdate
- func (dsu *DataSetUpdate) SetType(s string) *DataSetUpdate
- func (dsu *DataSetUpdate) Where(ps ...predicate.DataSet) *DataSetUpdate
- type DataSetUpdateOne
- func (dsuo *DataSetUpdateOne) ClearBlock() *DataSetUpdateOne
- func (dsuo *DataSetUpdateOne) Exec(ctx context.Context) error
- func (dsuo *DataSetUpdateOne) ExecX(ctx context.Context)
- func (dsuo *DataSetUpdateOne) Mutation() *DataSetMutation
- func (dsuo *DataSetUpdateOne) Save(ctx context.Context) (*DataSet, error)
- func (dsuo *DataSetUpdateOne) SaveX(ctx context.Context) *DataSet
- func (dsuo *DataSetUpdateOne) Select(field string, fields ...string) *DataSetUpdateOne
- func (dsuo *DataSetUpdateOne) SetBlock(v *ViewBlock) *DataSetUpdateOne
- func (dsuo *DataSetUpdateOne) SetBlockID(id int) *DataSetUpdateOne
- func (dsuo *DataSetUpdateOne) SetConfig(s string) *DataSetUpdateOne
- func (dsuo *DataSetUpdateOne) SetNillableBlockID(id *int) *DataSetUpdateOne
- func (dsuo *DataSetUpdateOne) SetTitle(s string) *DataSetUpdateOne
- func (dsuo *DataSetUpdateOne) SetType(s string) *DataSetUpdateOne
- type DataSets
- type Endpoint
- type Hook
- type Menu
- type MenuApi
- type MenuApiFilter
- type MenuClient
- func (c *MenuClient) Create() *MenuCreate
- func (c *MenuClient) CreateBulk(builders ...*MenuCreate) *MenuCreateBulk
- func (c *MenuClient) Delete() *MenuDelete
- func (c *MenuClient) DeleteOne(m *Menu) *MenuDeleteOne
- func (c *MenuClient) DeleteOneID(id int) *MenuDeleteOne
- func (c *MenuClient) Get(ctx context.Context, id int) (*Menu, error)
- func (c *MenuClient) GetX(ctx context.Context, id int) *Menu
- func (c *MenuClient) Hooks() []Hook
- func (c *MenuClient) Query() *MenuQuery
- func (c *MenuClient) QueryChildren(m *Menu) *MenuQuery
- func (c *MenuClient) QueryParent(m *Menu) *MenuQuery
- func (c *MenuClient) Update() *MenuUpdate
- func (c *MenuClient) UpdateOne(m *Menu) *MenuUpdateOne
- func (c *MenuClient) UpdateOneID(id int) *MenuUpdateOne
- func (c *MenuClient) Use(hooks ...Hook)
- type MenuCreate
- func (mc *MenuCreate) AddChildIDs(ids ...int) *MenuCreate
- func (mc *MenuCreate) AddChildren(m ...*Menu) *MenuCreate
- func (mc *MenuCreate) Mutation() *MenuMutation
- func (mc *MenuCreate) Save(ctx context.Context) (*Menu, error)
- func (mc *MenuCreate) SaveX(ctx context.Context) *Menu
- func (mc *MenuCreate) SetCreatedAt(t time.Time) *MenuCreate
- func (mc *MenuCreate) SetNillableCreatedAt(t *time.Time) *MenuCreate
- func (mc *MenuCreate) SetNillableParentID(id *int) *MenuCreate
- func (mc *MenuCreate) SetNillableUpdatedAt(t *time.Time) *MenuCreate
- func (mc *MenuCreate) SetParent(m *Menu) *MenuCreate
- func (mc *MenuCreate) SetParentID(id int) *MenuCreate
- func (mc *MenuCreate) SetTitle(s string) *MenuCreate
- func (mc *MenuCreate) SetURL(s string) *MenuCreate
- func (mc *MenuCreate) SetUpdatedAt(t time.Time) *MenuCreate
- type MenuCreateBulk
- type MenuDelete
- type MenuDeleteOne
- type MenuEdges
- type MenuGroupBy
- func (mgb *MenuGroupBy) Aggregate(fns ...AggregateFunc) *MenuGroupBy
- func (mgb *MenuGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (mgb *MenuGroupBy) BoolX(ctx context.Context) bool
- func (mgb *MenuGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (mgb *MenuGroupBy) BoolsX(ctx context.Context) []bool
- func (mgb *MenuGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (mgb *MenuGroupBy) Float64X(ctx context.Context) float64
- func (mgb *MenuGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (mgb *MenuGroupBy) Float64sX(ctx context.Context) []float64
- func (mgb *MenuGroupBy) Int(ctx context.Context) (_ int, err error)
- func (mgb *MenuGroupBy) IntX(ctx context.Context) int
- func (mgb *MenuGroupBy) Ints(ctx context.Context) ([]int, error)
- func (mgb *MenuGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MenuGroupBy) Scan(ctx context.Context, v interface{}) error
- func (mgb *MenuGroupBy) ScanX(ctx context.Context, v interface{})
- func (mgb *MenuGroupBy) String(ctx context.Context) (_ string, err error)
- func (mgb *MenuGroupBy) StringX(ctx context.Context) string
- func (mgb *MenuGroupBy) Strings(ctx context.Context) ([]string, error)
- func (mgb *MenuGroupBy) StringsX(ctx context.Context) []string
- type MenuMutation
- func (m *MenuMutation) AddChildIDs(ids ...int)
- func (m *MenuMutation) AddField(name string, value ent.Value) error
- func (m *MenuMutation) AddedEdges() []string
- func (m *MenuMutation) AddedField(name string) (ent.Value, bool)
- func (m *MenuMutation) AddedFields() []string
- func (m *MenuMutation) AddedIDs(name string) []ent.Value
- func (m *MenuMutation) ChildrenCleared() bool
- func (m *MenuMutation) ChildrenIDs() (ids []int)
- func (m *MenuMutation) ClearChildren()
- func (m *MenuMutation) ClearEdge(name string) error
- func (m *MenuMutation) ClearField(name string) error
- func (m *MenuMutation) ClearParent()
- func (m *MenuMutation) ClearedEdges() []string
- func (m *MenuMutation) ClearedFields() []string
- func (m MenuMutation) Client() *Client
- func (m *MenuMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MenuMutation) EdgeCleared(name string) bool
- func (m *MenuMutation) Field(name string) (ent.Value, bool)
- func (m *MenuMutation) FieldCleared(name string) bool
- func (m *MenuMutation) Fields() []string
- func (m *MenuMutation) ID() (id int, exists bool)
- func (m *MenuMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MenuMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MenuMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *MenuMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *MenuMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MenuMutation) Op() Op
- func (m *MenuMutation) ParentCleared() bool
- func (m *MenuMutation) ParentID() (id int, exists bool)
- func (m *MenuMutation) ParentIDs() (ids []int)
- func (m *MenuMutation) RemoveChildIDs(ids ...int)
- func (m *MenuMutation) RemovedChildrenIDs() (ids []int)
- func (m *MenuMutation) RemovedEdges() []string
- func (m *MenuMutation) RemovedIDs(name string) []ent.Value
- func (m *MenuMutation) ResetChildren()
- func (m *MenuMutation) ResetCreatedAt()
- func (m *MenuMutation) ResetEdge(name string) error
- func (m *MenuMutation) ResetField(name string) error
- func (m *MenuMutation) ResetParent()
- func (m *MenuMutation) ResetTitle()
- func (m *MenuMutation) ResetURL()
- func (m *MenuMutation) ResetUpdatedAt()
- func (m *MenuMutation) SetCreatedAt(t time.Time)
- func (m *MenuMutation) SetField(name string, value ent.Value) error
- func (m *MenuMutation) SetParentID(id int)
- func (m *MenuMutation) SetTitle(s string)
- func (m *MenuMutation) SetURL(s string)
- func (m *MenuMutation) SetUpdatedAt(t time.Time)
- func (m *MenuMutation) Title() (r string, exists bool)
- func (m MenuMutation) Tx() (*Tx, error)
- func (m *MenuMutation) Type() string
- func (m *MenuMutation) URL() (r string, exists bool)
- func (m *MenuMutation) UpdatedAt() (r time.Time, exists bool)
- type MenuQuery
- func (mq *MenuQuery) All(ctx context.Context) ([]*Menu, error)
- func (mq *MenuQuery) AllX(ctx context.Context) []*Menu
- func (mq *MenuQuery) Clone() *MenuQuery
- func (mq *MenuQuery) Count(ctx context.Context) (int, error)
- func (mq *MenuQuery) CountX(ctx context.Context) int
- func (mq *MenuQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MenuQuery) ExistX(ctx context.Context) bool
- func (mq *MenuQuery) First(ctx context.Context) (*Menu, error)
- func (mq *MenuQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MenuQuery) FirstIDX(ctx context.Context) int
- func (mq *MenuQuery) FirstX(ctx context.Context) *Menu
- func (mq *MenuQuery) GroupBy(field string, fields ...string) *MenuGroupBy
- func (mq *MenuQuery) IDs(ctx context.Context) ([]int, error)
- func (mq *MenuQuery) IDsX(ctx context.Context) []int
- func (mq *MenuQuery) Limit(limit int) *MenuQuery
- func (mq *MenuQuery) Offset(offset int) *MenuQuery
- func (mq *MenuQuery) Only(ctx context.Context) (*Menu, error)
- func (mq *MenuQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MenuQuery) OnlyIDX(ctx context.Context) int
- func (mq *MenuQuery) OnlyX(ctx context.Context) *Menu
- func (mq *MenuQuery) Order(o ...OrderFunc) *MenuQuery
- func (mq *MenuQuery) QueryChildren() *MenuQuery
- func (mq *MenuQuery) QueryParent() *MenuQuery
- func (mq *MenuQuery) Select(field string, fields ...string) *MenuSelect
- func (mq *MenuQuery) Unique(unique bool) *MenuQuery
- func (mq *MenuQuery) Where(ps ...predicate.Menu) *MenuQuery
- func (mq *MenuQuery) WithChildren(opts ...func(*MenuQuery)) *MenuQuery
- func (mq *MenuQuery) WithParent(opts ...func(*MenuQuery)) *MenuQuery
- type MenuSelect
- func (ms *MenuSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ms *MenuSelect) BoolX(ctx context.Context) bool
- func (ms *MenuSelect) Bools(ctx context.Context) ([]bool, error)
- func (ms *MenuSelect) BoolsX(ctx context.Context) []bool
- func (ms *MenuSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ms *MenuSelect) Float64X(ctx context.Context) float64
- func (ms *MenuSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ms *MenuSelect) Float64sX(ctx context.Context) []float64
- func (ms *MenuSelect) Int(ctx context.Context) (_ int, err error)
- func (ms *MenuSelect) IntX(ctx context.Context) int
- func (ms *MenuSelect) Ints(ctx context.Context) ([]int, error)
- func (ms *MenuSelect) IntsX(ctx context.Context) []int
- func (ms *MenuSelect) Scan(ctx context.Context, v interface{}) error
- func (ms *MenuSelect) ScanX(ctx context.Context, v interface{})
- func (ms *MenuSelect) String(ctx context.Context) (_ string, err error)
- func (ms *MenuSelect) StringX(ctx context.Context) string
- func (ms *MenuSelect) Strings(ctx context.Context) ([]string, error)
- func (ms *MenuSelect) StringsX(ctx context.Context) []string
- type MenuUpdate
- func (mu *MenuUpdate) AddChildIDs(ids ...int) *MenuUpdate
- func (mu *MenuUpdate) AddChildren(m ...*Menu) *MenuUpdate
- func (mu *MenuUpdate) ClearChildren() *MenuUpdate
- func (mu *MenuUpdate) ClearParent() *MenuUpdate
- func (mu *MenuUpdate) Exec(ctx context.Context) error
- func (mu *MenuUpdate) ExecX(ctx context.Context)
- func (mu *MenuUpdate) Mutation() *MenuMutation
- func (mu *MenuUpdate) RemoveChildIDs(ids ...int) *MenuUpdate
- func (mu *MenuUpdate) RemoveChildren(m ...*Menu) *MenuUpdate
- func (mu *MenuUpdate) Save(ctx context.Context) (int, error)
- func (mu *MenuUpdate) SaveX(ctx context.Context) int
- func (mu *MenuUpdate) SetCreatedAt(t time.Time) *MenuUpdate
- func (mu *MenuUpdate) SetNillableCreatedAt(t *time.Time) *MenuUpdate
- func (mu *MenuUpdate) SetNillableParentID(id *int) *MenuUpdate
- func (mu *MenuUpdate) SetParent(m *Menu) *MenuUpdate
- func (mu *MenuUpdate) SetParentID(id int) *MenuUpdate
- func (mu *MenuUpdate) SetTitle(s string) *MenuUpdate
- func (mu *MenuUpdate) SetURL(s string) *MenuUpdate
- func (mu *MenuUpdate) SetUpdatedAt(t time.Time) *MenuUpdate
- func (mu *MenuUpdate) Where(ps ...predicate.Menu) *MenuUpdate
- type MenuUpdateOne
- func (muo *MenuUpdateOne) AddChildIDs(ids ...int) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddChildren(m ...*Menu) *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearChildren() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearParent() *MenuUpdateOne
- func (muo *MenuUpdateOne) Exec(ctx context.Context) error
- func (muo *MenuUpdateOne) ExecX(ctx context.Context)
- func (muo *MenuUpdateOne) Mutation() *MenuMutation
- func (muo *MenuUpdateOne) RemoveChildIDs(ids ...int) *MenuUpdateOne
- func (muo *MenuUpdateOne) RemoveChildren(m ...*Menu) *MenuUpdateOne
- func (muo *MenuUpdateOne) Save(ctx context.Context) (*Menu, error)
- func (muo *MenuUpdateOne) SaveX(ctx context.Context) *Menu
- func (muo *MenuUpdateOne) Select(field string, fields ...string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetCreatedAt(t time.Time) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableCreatedAt(t *time.Time) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableParentID(id *int) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetParent(m *Menu) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetParentID(id int) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetTitle(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetURL(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetUpdatedAt(t time.Time) *MenuUpdateOne
- type Menus
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Share
- type ShareApi
- type ShareApiFilter
- type ShareClient
- func (c *ShareClient) Create() *ShareCreate
- func (c *ShareClient) CreateBulk(builders ...*ShareCreate) *ShareCreateBulk
- func (c *ShareClient) Delete() *ShareDelete
- func (c *ShareClient) DeleteOne(s *Share) *ShareDeleteOne
- func (c *ShareClient) DeleteOneID(id int) *ShareDeleteOne
- func (c *ShareClient) Get(ctx context.Context, id int) (*Share, error)
- func (c *ShareClient) GetX(ctx context.Context, id int) *Share
- func (c *ShareClient) Hooks() []Hook
- func (c *ShareClient) Query() *ShareQuery
- func (c *ShareClient) QueryCreator(s *Share) *UserQuery
- func (c *ShareClient) QueryView(s *Share) *ViewQuery
- func (c *ShareClient) Update() *ShareUpdate
- func (c *ShareClient) UpdateOne(s *Share) *ShareUpdateOne
- func (c *ShareClient) UpdateOneID(id int) *ShareUpdateOne
- func (c *ShareClient) Use(hooks ...Hook)
- type ShareCreate
- func (sc *ShareCreate) Mutation() *ShareMutation
- func (sc *ShareCreate) Save(ctx context.Context) (*Share, error)
- func (sc *ShareCreate) SaveX(ctx context.Context) *Share
- func (sc *ShareCreate) SetCreator(u *User) *ShareCreate
- func (sc *ShareCreate) SetCreatorID(id int) *ShareCreate
- func (sc *ShareCreate) SetEndAt(t time.Time) *ShareCreate
- func (sc *ShareCreate) SetNillableCreatorID(id *int) *ShareCreate
- func (sc *ShareCreate) SetNillableViewID(id *int) *ShareCreate
- func (sc *ShareCreate) SetView(v *View) *ShareCreate
- func (sc *ShareCreate) SetViewID(id int) *ShareCreate
- type ShareCreateBulk
- type ShareDelete
- type ShareDeleteOne
- type ShareEdges
- type ShareGroupBy
- func (sgb *ShareGroupBy) Aggregate(fns ...AggregateFunc) *ShareGroupBy
- func (sgb *ShareGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sgb *ShareGroupBy) BoolX(ctx context.Context) bool
- func (sgb *ShareGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *ShareGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *ShareGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sgb *ShareGroupBy) Float64X(ctx context.Context) float64
- func (sgb *ShareGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *ShareGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *ShareGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sgb *ShareGroupBy) IntX(ctx context.Context) int
- func (sgb *ShareGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *ShareGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ShareGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *ShareGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *ShareGroupBy) String(ctx context.Context) (_ string, err error)
- func (sgb *ShareGroupBy) StringX(ctx context.Context) string
- func (sgb *ShareGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *ShareGroupBy) StringsX(ctx context.Context) []string
- type ShareMutation
- func (m *ShareMutation) AddField(name string, value ent.Value) error
- func (m *ShareMutation) AddedEdges() []string
- func (m *ShareMutation) AddedField(name string) (ent.Value, bool)
- func (m *ShareMutation) AddedFields() []string
- func (m *ShareMutation) AddedIDs(name string) []ent.Value
- func (m *ShareMutation) ClearCreator()
- func (m *ShareMutation) ClearEdge(name string) error
- func (m *ShareMutation) ClearField(name string) error
- func (m *ShareMutation) ClearView()
- func (m *ShareMutation) ClearedEdges() []string
- func (m *ShareMutation) ClearedFields() []string
- func (m ShareMutation) Client() *Client
- func (m *ShareMutation) CreatorCleared() bool
- func (m *ShareMutation) CreatorID() (id int, exists bool)
- func (m *ShareMutation) CreatorIDs() (ids []int)
- func (m *ShareMutation) EdgeCleared(name string) bool
- func (m *ShareMutation) EndAt() (r time.Time, exists bool)
- func (m *ShareMutation) Field(name string) (ent.Value, bool)
- func (m *ShareMutation) FieldCleared(name string) bool
- func (m *ShareMutation) Fields() []string
- func (m *ShareMutation) ID() (id int, exists bool)
- func (m *ShareMutation) OldEndAt(ctx context.Context) (v time.Time, err error)
- func (m *ShareMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ShareMutation) Op() Op
- func (m *ShareMutation) RemovedEdges() []string
- func (m *ShareMutation) RemovedIDs(name string) []ent.Value
- func (m *ShareMutation) ResetCreator()
- func (m *ShareMutation) ResetEdge(name string) error
- func (m *ShareMutation) ResetEndAt()
- func (m *ShareMutation) ResetField(name string) error
- func (m *ShareMutation) ResetView()
- func (m *ShareMutation) SetCreatorID(id int)
- func (m *ShareMutation) SetEndAt(t time.Time)
- func (m *ShareMutation) SetField(name string, value ent.Value) error
- func (m *ShareMutation) SetViewID(id int)
- func (m ShareMutation) Tx() (*Tx, error)
- func (m *ShareMutation) Type() string
- func (m *ShareMutation) ViewCleared() bool
- func (m *ShareMutation) ViewID() (id int, exists bool)
- func (m *ShareMutation) ViewIDs() (ids []int)
- type ShareQuery
- func (sq *ShareQuery) All(ctx context.Context) ([]*Share, error)
- func (sq *ShareQuery) AllX(ctx context.Context) []*Share
- func (sq *ShareQuery) Clone() *ShareQuery
- func (sq *ShareQuery) Count(ctx context.Context) (int, error)
- func (sq *ShareQuery) CountX(ctx context.Context) int
- func (sq *ShareQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ShareQuery) ExistX(ctx context.Context) bool
- func (sq *ShareQuery) First(ctx context.Context) (*Share, error)
- func (sq *ShareQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *ShareQuery) FirstIDX(ctx context.Context) int
- func (sq *ShareQuery) FirstX(ctx context.Context) *Share
- func (sq *ShareQuery) GroupBy(field string, fields ...string) *ShareGroupBy
- func (sq *ShareQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *ShareQuery) IDsX(ctx context.Context) []int
- func (sq *ShareQuery) Limit(limit int) *ShareQuery
- func (sq *ShareQuery) Offset(offset int) *ShareQuery
- func (sq *ShareQuery) Only(ctx context.Context) (*Share, error)
- func (sq *ShareQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *ShareQuery) OnlyIDX(ctx context.Context) int
- func (sq *ShareQuery) OnlyX(ctx context.Context) *Share
- func (sq *ShareQuery) Order(o ...OrderFunc) *ShareQuery
- func (sq *ShareQuery) QueryCreator() *UserQuery
- func (sq *ShareQuery) QueryView() *ViewQuery
- func (sq *ShareQuery) Select(field string, fields ...string) *ShareSelect
- func (sq *ShareQuery) Unique(unique bool) *ShareQuery
- func (sq *ShareQuery) Where(ps ...predicate.Share) *ShareQuery
- func (sq *ShareQuery) WithCreator(opts ...func(*UserQuery)) *ShareQuery
- func (sq *ShareQuery) WithView(opts ...func(*ViewQuery)) *ShareQuery
- type ShareSelect
- func (ss *ShareSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ss *ShareSelect) BoolX(ctx context.Context) bool
- func (ss *ShareSelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *ShareSelect) BoolsX(ctx context.Context) []bool
- func (ss *ShareSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ss *ShareSelect) Float64X(ctx context.Context) float64
- func (ss *ShareSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *ShareSelect) Float64sX(ctx context.Context) []float64
- func (ss *ShareSelect) Int(ctx context.Context) (_ int, err error)
- func (ss *ShareSelect) IntX(ctx context.Context) int
- func (ss *ShareSelect) Ints(ctx context.Context) ([]int, error)
- func (ss *ShareSelect) IntsX(ctx context.Context) []int
- func (ss *ShareSelect) Scan(ctx context.Context, v interface{}) error
- func (ss *ShareSelect) ScanX(ctx context.Context, v interface{})
- func (ss *ShareSelect) String(ctx context.Context) (_ string, err error)
- func (ss *ShareSelect) StringX(ctx context.Context) string
- func (ss *ShareSelect) Strings(ctx context.Context) ([]string, error)
- func (ss *ShareSelect) StringsX(ctx context.Context) []string
- type ShareUpdate
- func (su *ShareUpdate) ClearCreator() *ShareUpdate
- func (su *ShareUpdate) ClearView() *ShareUpdate
- func (su *ShareUpdate) Exec(ctx context.Context) error
- func (su *ShareUpdate) ExecX(ctx context.Context)
- func (su *ShareUpdate) Mutation() *ShareMutation
- func (su *ShareUpdate) Save(ctx context.Context) (int, error)
- func (su *ShareUpdate) SaveX(ctx context.Context) int
- func (su *ShareUpdate) SetCreator(u *User) *ShareUpdate
- func (su *ShareUpdate) SetCreatorID(id int) *ShareUpdate
- func (su *ShareUpdate) SetEndAt(t time.Time) *ShareUpdate
- func (su *ShareUpdate) SetNillableCreatorID(id *int) *ShareUpdate
- func (su *ShareUpdate) SetNillableViewID(id *int) *ShareUpdate
- func (su *ShareUpdate) SetView(v *View) *ShareUpdate
- func (su *ShareUpdate) SetViewID(id int) *ShareUpdate
- func (su *ShareUpdate) Where(ps ...predicate.Share) *ShareUpdate
- type ShareUpdateOne
- func (suo *ShareUpdateOne) ClearCreator() *ShareUpdateOne
- func (suo *ShareUpdateOne) ClearView() *ShareUpdateOne
- func (suo *ShareUpdateOne) Exec(ctx context.Context) error
- func (suo *ShareUpdateOne) ExecX(ctx context.Context)
- func (suo *ShareUpdateOne) Mutation() *ShareMutation
- func (suo *ShareUpdateOne) Save(ctx context.Context) (*Share, error)
- func (suo *ShareUpdateOne) SaveX(ctx context.Context) *Share
- func (suo *ShareUpdateOne) Select(field string, fields ...string) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetCreator(u *User) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetCreatorID(id int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetEndAt(t time.Time) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillableCreatorID(id *int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetNillableViewID(id *int) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetView(v *View) *ShareUpdateOne
- func (suo *ShareUpdateOne) SetViewID(id int) *ShareUpdateOne
- type Shares
- type Tx
- type TypeConfig
- type TypeConfigApi
- type TypeConfigApiFilter
- type TypeConfigClient
- func (c *TypeConfigClient) Create() *TypeConfigCreate
- func (c *TypeConfigClient) CreateBulk(builders ...*TypeConfigCreate) *TypeConfigCreateBulk
- func (c *TypeConfigClient) Delete() *TypeConfigDelete
- func (c *TypeConfigClient) DeleteOne(tc *TypeConfig) *TypeConfigDeleteOne
- func (c *TypeConfigClient) DeleteOneID(id int) *TypeConfigDeleteOne
- func (c *TypeConfigClient) Get(ctx context.Context, id int) (*TypeConfig, error)
- func (c *TypeConfigClient) GetX(ctx context.Context, id int) *TypeConfig
- func (c *TypeConfigClient) Hooks() []Hook
- func (c *TypeConfigClient) Query() *TypeConfigQuery
- func (c *TypeConfigClient) Update() *TypeConfigUpdate
- func (c *TypeConfigClient) UpdateOne(tc *TypeConfig) *TypeConfigUpdateOne
- func (c *TypeConfigClient) UpdateOneID(id int) *TypeConfigUpdateOne
- func (c *TypeConfigClient) Use(hooks ...Hook)
- type TypeConfigCreate
- func (tcc *TypeConfigCreate) Mutation() *TypeConfigMutation
- func (tcc *TypeConfigCreate) Save(ctx context.Context) (*TypeConfig, error)
- func (tcc *TypeConfigCreate) SaveX(ctx context.Context) *TypeConfig
- func (tcc *TypeConfigCreate) SetConfig(s string) *TypeConfigCreate
- func (tcc *TypeConfigCreate) SetID(i int) *TypeConfigCreate
- func (tcc *TypeConfigCreate) SetTitle(s string) *TypeConfigCreate
- func (tcc *TypeConfigCreate) SetType(s string) *TypeConfigCreate
- type TypeConfigCreateBulk
- type TypeConfigDelete
- type TypeConfigDeleteOne
- type TypeConfigGroupBy
- func (tcgb *TypeConfigGroupBy) Aggregate(fns ...AggregateFunc) *TypeConfigGroupBy
- func (tcgb *TypeConfigGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (tcgb *TypeConfigGroupBy) BoolX(ctx context.Context) bool
- func (tcgb *TypeConfigGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (tcgb *TypeConfigGroupBy) BoolsX(ctx context.Context) []bool
- func (tcgb *TypeConfigGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (tcgb *TypeConfigGroupBy) Float64X(ctx context.Context) float64
- func (tcgb *TypeConfigGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (tcgb *TypeConfigGroupBy) Float64sX(ctx context.Context) []float64
- func (tcgb *TypeConfigGroupBy) Int(ctx context.Context) (_ int, err error)
- func (tcgb *TypeConfigGroupBy) IntX(ctx context.Context) int
- func (tcgb *TypeConfigGroupBy) Ints(ctx context.Context) ([]int, error)
- func (tcgb *TypeConfigGroupBy) IntsX(ctx context.Context) []int
- func (tcgb *TypeConfigGroupBy) Scan(ctx context.Context, v interface{}) error
- func (tcgb *TypeConfigGroupBy) ScanX(ctx context.Context, v interface{})
- func (tcgb *TypeConfigGroupBy) String(ctx context.Context) (_ string, err error)
- func (tcgb *TypeConfigGroupBy) StringX(ctx context.Context) string
- func (tcgb *TypeConfigGroupBy) Strings(ctx context.Context) ([]string, error)
- func (tcgb *TypeConfigGroupBy) StringsX(ctx context.Context) []string
- type TypeConfigMutation
- func (m *TypeConfigMutation) AddField(name string, value ent.Value) error
- func (m *TypeConfigMutation) AddedEdges() []string
- func (m *TypeConfigMutation) AddedField(name string) (ent.Value, bool)
- func (m *TypeConfigMutation) AddedFields() []string
- func (m *TypeConfigMutation) AddedIDs(name string) []ent.Value
- func (m *TypeConfigMutation) ClearEdge(name string) error
- func (m *TypeConfigMutation) ClearField(name string) error
- func (m *TypeConfigMutation) ClearedEdges() []string
- func (m *TypeConfigMutation) ClearedFields() []string
- func (m TypeConfigMutation) Client() *Client
- func (m *TypeConfigMutation) Config() (r string, exists bool)
- func (m *TypeConfigMutation) EdgeCleared(name string) bool
- func (m *TypeConfigMutation) Field(name string) (ent.Value, bool)
- func (m *TypeConfigMutation) FieldCleared(name string) bool
- func (m *TypeConfigMutation) Fields() []string
- func (m *TypeConfigMutation) GetType() (r string, exists bool)
- func (m *TypeConfigMutation) ID() (id int, exists bool)
- func (m *TypeConfigMutation) OldConfig(ctx context.Context) (v string, err error)
- func (m *TypeConfigMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TypeConfigMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *TypeConfigMutation) OldType(ctx context.Context) (v string, err error)
- func (m *TypeConfigMutation) Op() Op
- func (m *TypeConfigMutation) RemovedEdges() []string
- func (m *TypeConfigMutation) RemovedIDs(name string) []ent.Value
- func (m *TypeConfigMutation) ResetConfig()
- func (m *TypeConfigMutation) ResetEdge(name string) error
- func (m *TypeConfigMutation) ResetField(name string) error
- func (m *TypeConfigMutation) ResetTitle()
- func (m *TypeConfigMutation) ResetType()
- func (m *TypeConfigMutation) SetConfig(s string)
- func (m *TypeConfigMutation) SetField(name string, value ent.Value) error
- func (m *TypeConfigMutation) SetID(id int)
- func (m *TypeConfigMutation) SetTitle(s string)
- func (m *TypeConfigMutation) SetType(s string)
- func (m *TypeConfigMutation) Title() (r string, exists bool)
- func (m TypeConfigMutation) Tx() (*Tx, error)
- func (m *TypeConfigMutation) Type() string
- type TypeConfigQuery
- func (tcq *TypeConfigQuery) All(ctx context.Context) ([]*TypeConfig, error)
- func (tcq *TypeConfigQuery) AllX(ctx context.Context) []*TypeConfig
- func (tcq *TypeConfigQuery) Clone() *TypeConfigQuery
- func (tcq *TypeConfigQuery) Count(ctx context.Context) (int, error)
- func (tcq *TypeConfigQuery) CountX(ctx context.Context) int
- func (tcq *TypeConfigQuery) Exist(ctx context.Context) (bool, error)
- func (tcq *TypeConfigQuery) ExistX(ctx context.Context) bool
- func (tcq *TypeConfigQuery) First(ctx context.Context) (*TypeConfig, error)
- func (tcq *TypeConfigQuery) FirstID(ctx context.Context) (id int, err error)
- func (tcq *TypeConfigQuery) FirstIDX(ctx context.Context) int
- func (tcq *TypeConfigQuery) FirstX(ctx context.Context) *TypeConfig
- func (tcq *TypeConfigQuery) GroupBy(field string, fields ...string) *TypeConfigGroupBy
- func (tcq *TypeConfigQuery) IDs(ctx context.Context) ([]int, error)
- func (tcq *TypeConfigQuery) IDsX(ctx context.Context) []int
- func (tcq *TypeConfigQuery) Limit(limit int) *TypeConfigQuery
- func (tcq *TypeConfigQuery) Offset(offset int) *TypeConfigQuery
- func (tcq *TypeConfigQuery) Only(ctx context.Context) (*TypeConfig, error)
- func (tcq *TypeConfigQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tcq *TypeConfigQuery) OnlyIDX(ctx context.Context) int
- func (tcq *TypeConfigQuery) OnlyX(ctx context.Context) *TypeConfig
- func (tcq *TypeConfigQuery) Order(o ...OrderFunc) *TypeConfigQuery
- func (tcq *TypeConfigQuery) Select(field string, fields ...string) *TypeConfigSelect
- func (tcq *TypeConfigQuery) Unique(unique bool) *TypeConfigQuery
- func (tcq *TypeConfigQuery) Where(ps ...predicate.TypeConfig) *TypeConfigQuery
- type TypeConfigSelect
- func (tcs *TypeConfigSelect) Bool(ctx context.Context) (_ bool, err error)
- func (tcs *TypeConfigSelect) BoolX(ctx context.Context) bool
- func (tcs *TypeConfigSelect) Bools(ctx context.Context) ([]bool, error)
- func (tcs *TypeConfigSelect) BoolsX(ctx context.Context) []bool
- func (tcs *TypeConfigSelect) Float64(ctx context.Context) (_ float64, err error)
- func (tcs *TypeConfigSelect) Float64X(ctx context.Context) float64
- func (tcs *TypeConfigSelect) Float64s(ctx context.Context) ([]float64, error)
- func (tcs *TypeConfigSelect) Float64sX(ctx context.Context) []float64
- func (tcs *TypeConfigSelect) Int(ctx context.Context) (_ int, err error)
- func (tcs *TypeConfigSelect) IntX(ctx context.Context) int
- func (tcs *TypeConfigSelect) Ints(ctx context.Context) ([]int, error)
- func (tcs *TypeConfigSelect) IntsX(ctx context.Context) []int
- func (tcs *TypeConfigSelect) Scan(ctx context.Context, v interface{}) error
- func (tcs *TypeConfigSelect) ScanX(ctx context.Context, v interface{})
- func (tcs *TypeConfigSelect) String(ctx context.Context) (_ string, err error)
- func (tcs *TypeConfigSelect) StringX(ctx context.Context) string
- func (tcs *TypeConfigSelect) Strings(ctx context.Context) ([]string, error)
- func (tcs *TypeConfigSelect) StringsX(ctx context.Context) []string
- type TypeConfigUpdate
- func (tcu *TypeConfigUpdate) Exec(ctx context.Context) error
- func (tcu *TypeConfigUpdate) ExecX(ctx context.Context)
- func (tcu *TypeConfigUpdate) Mutation() *TypeConfigMutation
- func (tcu *TypeConfigUpdate) Save(ctx context.Context) (int, error)
- func (tcu *TypeConfigUpdate) SaveX(ctx context.Context) int
- func (tcu *TypeConfigUpdate) SetConfig(s string) *TypeConfigUpdate
- func (tcu *TypeConfigUpdate) SetTitle(s string) *TypeConfigUpdate
- func (tcu *TypeConfigUpdate) SetType(s string) *TypeConfigUpdate
- func (tcu *TypeConfigUpdate) Where(ps ...predicate.TypeConfig) *TypeConfigUpdate
- type TypeConfigUpdateOne
- func (tcuo *TypeConfigUpdateOne) Exec(ctx context.Context) error
- func (tcuo *TypeConfigUpdateOne) ExecX(ctx context.Context)
- func (tcuo *TypeConfigUpdateOne) Mutation() *TypeConfigMutation
- func (tcuo *TypeConfigUpdateOne) Save(ctx context.Context) (*TypeConfig, error)
- func (tcuo *TypeConfigUpdateOne) SaveX(ctx context.Context) *TypeConfig
- func (tcuo *TypeConfigUpdateOne) Select(field string, fields ...string) *TypeConfigUpdateOne
- func (tcuo *TypeConfigUpdateOne) SetConfig(s string) *TypeConfigUpdateOne
- func (tcuo *TypeConfigUpdateOne) SetTitle(s string) *TypeConfigUpdateOne
- func (tcuo *TypeConfigUpdateOne) SetType(s string) *TypeConfigUpdateOne
- type TypeConfigs
- type User
- type UserApi
- type UserApiFilter
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryShare(u *User) *ShareQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddShare(s ...*Share) *UserCreate
- func (uc *UserCreate) AddShareIDs(ids ...int) *UserCreate
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetEnable(cf *contact.BoolField) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UserGroupBy) IntX(ctx context.Context) int
- func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (ugb *UserGroupBy) StringX(ctx context.Context) string
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddShareIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearShare()
- 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) Enable() (r *contact.BoolField, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) OldEnable(ctx context.Context) (v *contact.BoolField, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemoveShareIDs(ids ...int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedShareIDs() (ids []int)
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEnable()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetShare()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetEnable(cf *contact.BoolField)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) ShareCleared() bool
- func (m *UserMutation) ShareIDs() (ids []int)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Username() (r string, exists bool)
- type UserQuery
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryShare() *ShareQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithShare(opts ...func(*ShareQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UserSelect) BoolX(ctx context.Context) bool
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UserSelect) Float64X(ctx context.Context) float64
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UserSelect) IntX(ctx context.Context) int
- func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UserSelect) ScanX(ctx context.Context, v interface{})
- func (us *UserSelect) String(ctx context.Context) (_ string, err error)
- func (us *UserSelect) StringX(ctx context.Context) string
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddShare(s ...*Share) *UserUpdate
- func (uu *UserUpdate) AddShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) ClearShare() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveShare(s ...*Share) *UserUpdate
- func (uu *UserUpdate) RemoveShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEnable(cf *contact.BoolField) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddShare(s ...*Share) *UserUpdateOne
- func (uuo *UserUpdateOne) AddShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearShare() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveShare(s ...*Share) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEnable(cf *contact.BoolField) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- type Users
- type ValidationError
- type Value
- type View
- type ViewApi
- type ViewApiFilter
- type ViewBlock
- type ViewBlockApi
- type ViewBlockApiFilter
- type ViewBlockClient
- func (c *ViewBlockClient) Create() *ViewBlockCreate
- func (c *ViewBlockClient) CreateBulk(builders ...*ViewBlockCreate) *ViewBlockCreateBulk
- func (c *ViewBlockClient) Delete() *ViewBlockDelete
- func (c *ViewBlockClient) DeleteOne(vb *ViewBlock) *ViewBlockDeleteOne
- func (c *ViewBlockClient) DeleteOneID(id int) *ViewBlockDeleteOne
- func (c *ViewBlockClient) Get(ctx context.Context, id int) (*ViewBlock, error)
- func (c *ViewBlockClient) GetX(ctx context.Context, id int) *ViewBlock
- func (c *ViewBlockClient) Hooks() []Hook
- func (c *ViewBlockClient) Query() *ViewBlockQuery
- func (c *ViewBlockClient) QueryDataset(vb *ViewBlock) *DataSetQuery
- func (c *ViewBlockClient) QueryView(vb *ViewBlock) *ViewQuery
- func (c *ViewBlockClient) Update() *ViewBlockUpdate
- func (c *ViewBlockClient) UpdateOne(vb *ViewBlock) *ViewBlockUpdateOne
- func (c *ViewBlockClient) UpdateOneID(id int) *ViewBlockUpdateOne
- func (c *ViewBlockClient) Use(hooks ...Hook)
- type ViewBlockCreate
- func (vbc *ViewBlockCreate) AddDataset(d ...*DataSet) *ViewBlockCreate
- func (vbc *ViewBlockCreate) AddDatasetIDs(ids ...int) *ViewBlockCreate
- func (vbc *ViewBlockCreate) Mutation() *ViewBlockMutation
- func (vbc *ViewBlockCreate) Save(ctx context.Context) (*ViewBlock, error)
- func (vbc *ViewBlockCreate) SaveX(ctx context.Context) *ViewBlock
- func (vbc *ViewBlockCreate) SetConfig(s string) *ViewBlockCreate
- func (vbc *ViewBlockCreate) SetNillableViewID(id *int) *ViewBlockCreate
- func (vbc *ViewBlockCreate) SetType(s string) *ViewBlockCreate
- func (vbc *ViewBlockCreate) SetView(v *View) *ViewBlockCreate
- func (vbc *ViewBlockCreate) SetViewID(id int) *ViewBlockCreate
- type ViewBlockCreateBulk
- type ViewBlockDelete
- type ViewBlockDeleteOne
- type ViewBlockEdges
- type ViewBlockGroupBy
- func (vbgb *ViewBlockGroupBy) Aggregate(fns ...AggregateFunc) *ViewBlockGroupBy
- func (vbgb *ViewBlockGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (vbgb *ViewBlockGroupBy) BoolX(ctx context.Context) bool
- func (vbgb *ViewBlockGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (vbgb *ViewBlockGroupBy) BoolsX(ctx context.Context) []bool
- func (vbgb *ViewBlockGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (vbgb *ViewBlockGroupBy) Float64X(ctx context.Context) float64
- func (vbgb *ViewBlockGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (vbgb *ViewBlockGroupBy) Float64sX(ctx context.Context) []float64
- func (vbgb *ViewBlockGroupBy) Int(ctx context.Context) (_ int, err error)
- func (vbgb *ViewBlockGroupBy) IntX(ctx context.Context) int
- func (vbgb *ViewBlockGroupBy) Ints(ctx context.Context) ([]int, error)
- func (vbgb *ViewBlockGroupBy) IntsX(ctx context.Context) []int
- func (vbgb *ViewBlockGroupBy) Scan(ctx context.Context, v interface{}) error
- func (vbgb *ViewBlockGroupBy) ScanX(ctx context.Context, v interface{})
- func (vbgb *ViewBlockGroupBy) String(ctx context.Context) (_ string, err error)
- func (vbgb *ViewBlockGroupBy) StringX(ctx context.Context) string
- func (vbgb *ViewBlockGroupBy) Strings(ctx context.Context) ([]string, error)
- func (vbgb *ViewBlockGroupBy) StringsX(ctx context.Context) []string
- type ViewBlockMutation
- func (m *ViewBlockMutation) AddDatasetIDs(ids ...int)
- func (m *ViewBlockMutation) AddField(name string, value ent.Value) error
- func (m *ViewBlockMutation) AddedEdges() []string
- func (m *ViewBlockMutation) AddedField(name string) (ent.Value, bool)
- func (m *ViewBlockMutation) AddedFields() []string
- func (m *ViewBlockMutation) AddedIDs(name string) []ent.Value
- func (m *ViewBlockMutation) ClearDataset()
- func (m *ViewBlockMutation) ClearEdge(name string) error
- func (m *ViewBlockMutation) ClearField(name string) error
- func (m *ViewBlockMutation) ClearView()
- func (m *ViewBlockMutation) ClearedEdges() []string
- func (m *ViewBlockMutation) ClearedFields() []string
- func (m ViewBlockMutation) Client() *Client
- func (m *ViewBlockMutation) Config() (r string, exists bool)
- func (m *ViewBlockMutation) DatasetCleared() bool
- func (m *ViewBlockMutation) DatasetIDs() (ids []int)
- func (m *ViewBlockMutation) EdgeCleared(name string) bool
- func (m *ViewBlockMutation) Field(name string) (ent.Value, bool)
- func (m *ViewBlockMutation) FieldCleared(name string) bool
- func (m *ViewBlockMutation) Fields() []string
- func (m *ViewBlockMutation) GetType() (r string, exists bool)
- func (m *ViewBlockMutation) ID() (id int, exists bool)
- func (m *ViewBlockMutation) OldConfig(ctx context.Context) (v string, err error)
- func (m *ViewBlockMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ViewBlockMutation) OldType(ctx context.Context) (v string, err error)
- func (m *ViewBlockMutation) Op() Op
- func (m *ViewBlockMutation) RemoveDatasetIDs(ids ...int)
- func (m *ViewBlockMutation) RemovedDatasetIDs() (ids []int)
- func (m *ViewBlockMutation) RemovedEdges() []string
- func (m *ViewBlockMutation) RemovedIDs(name string) []ent.Value
- func (m *ViewBlockMutation) ResetConfig()
- func (m *ViewBlockMutation) ResetDataset()
- func (m *ViewBlockMutation) ResetEdge(name string) error
- func (m *ViewBlockMutation) ResetField(name string) error
- func (m *ViewBlockMutation) ResetType()
- func (m *ViewBlockMutation) ResetView()
- func (m *ViewBlockMutation) SetConfig(s string)
- func (m *ViewBlockMutation) SetField(name string, value ent.Value) error
- func (m *ViewBlockMutation) SetType(s string)
- func (m *ViewBlockMutation) SetViewID(id int)
- func (m ViewBlockMutation) Tx() (*Tx, error)
- func (m *ViewBlockMutation) Type() string
- func (m *ViewBlockMutation) ViewCleared() bool
- func (m *ViewBlockMutation) ViewID() (id int, exists bool)
- func (m *ViewBlockMutation) ViewIDs() (ids []int)
- type ViewBlockQuery
- func (vbq *ViewBlockQuery) All(ctx context.Context) ([]*ViewBlock, error)
- func (vbq *ViewBlockQuery) AllX(ctx context.Context) []*ViewBlock
- func (vbq *ViewBlockQuery) Clone() *ViewBlockQuery
- func (vbq *ViewBlockQuery) Count(ctx context.Context) (int, error)
- func (vbq *ViewBlockQuery) CountX(ctx context.Context) int
- func (vbq *ViewBlockQuery) Exist(ctx context.Context) (bool, error)
- func (vbq *ViewBlockQuery) ExistX(ctx context.Context) bool
- func (vbq *ViewBlockQuery) First(ctx context.Context) (*ViewBlock, error)
- func (vbq *ViewBlockQuery) FirstID(ctx context.Context) (id int, err error)
- func (vbq *ViewBlockQuery) FirstIDX(ctx context.Context) int
- func (vbq *ViewBlockQuery) FirstX(ctx context.Context) *ViewBlock
- func (vbq *ViewBlockQuery) GroupBy(field string, fields ...string) *ViewBlockGroupBy
- func (vbq *ViewBlockQuery) IDs(ctx context.Context) ([]int, error)
- func (vbq *ViewBlockQuery) IDsX(ctx context.Context) []int
- func (vbq *ViewBlockQuery) Limit(limit int) *ViewBlockQuery
- func (vbq *ViewBlockQuery) Offset(offset int) *ViewBlockQuery
- func (vbq *ViewBlockQuery) Only(ctx context.Context) (*ViewBlock, error)
- func (vbq *ViewBlockQuery) OnlyID(ctx context.Context) (id int, err error)
- func (vbq *ViewBlockQuery) OnlyIDX(ctx context.Context) int
- func (vbq *ViewBlockQuery) OnlyX(ctx context.Context) *ViewBlock
- func (vbq *ViewBlockQuery) Order(o ...OrderFunc) *ViewBlockQuery
- func (vbq *ViewBlockQuery) QueryDataset() *DataSetQuery
- func (vbq *ViewBlockQuery) QueryView() *ViewQuery
- func (vbq *ViewBlockQuery) Select(field string, fields ...string) *ViewBlockSelect
- func (vbq *ViewBlockQuery) Unique(unique bool) *ViewBlockQuery
- func (vbq *ViewBlockQuery) Where(ps ...predicate.ViewBlock) *ViewBlockQuery
- func (vbq *ViewBlockQuery) WithDataset(opts ...func(*DataSetQuery)) *ViewBlockQuery
- func (vbq *ViewBlockQuery) WithView(opts ...func(*ViewQuery)) *ViewBlockQuery
- type ViewBlockSelect
- func (vbs *ViewBlockSelect) Bool(ctx context.Context) (_ bool, err error)
- func (vbs *ViewBlockSelect) BoolX(ctx context.Context) bool
- func (vbs *ViewBlockSelect) Bools(ctx context.Context) ([]bool, error)
- func (vbs *ViewBlockSelect) BoolsX(ctx context.Context) []bool
- func (vbs *ViewBlockSelect) Float64(ctx context.Context) (_ float64, err error)
- func (vbs *ViewBlockSelect) Float64X(ctx context.Context) float64
- func (vbs *ViewBlockSelect) Float64s(ctx context.Context) ([]float64, error)
- func (vbs *ViewBlockSelect) Float64sX(ctx context.Context) []float64
- func (vbs *ViewBlockSelect) Int(ctx context.Context) (_ int, err error)
- func (vbs *ViewBlockSelect) IntX(ctx context.Context) int
- func (vbs *ViewBlockSelect) Ints(ctx context.Context) ([]int, error)
- func (vbs *ViewBlockSelect) IntsX(ctx context.Context) []int
- func (vbs *ViewBlockSelect) Scan(ctx context.Context, v interface{}) error
- func (vbs *ViewBlockSelect) ScanX(ctx context.Context, v interface{})
- func (vbs *ViewBlockSelect) String(ctx context.Context) (_ string, err error)
- func (vbs *ViewBlockSelect) StringX(ctx context.Context) string
- func (vbs *ViewBlockSelect) Strings(ctx context.Context) ([]string, error)
- func (vbs *ViewBlockSelect) StringsX(ctx context.Context) []string
- type ViewBlockUpdate
- func (vbu *ViewBlockUpdate) AddDataset(d ...*DataSet) *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) AddDatasetIDs(ids ...int) *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) ClearDataset() *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) ClearView() *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) Exec(ctx context.Context) error
- func (vbu *ViewBlockUpdate) ExecX(ctx context.Context)
- func (vbu *ViewBlockUpdate) Mutation() *ViewBlockMutation
- func (vbu *ViewBlockUpdate) RemoveDataset(d ...*DataSet) *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) RemoveDatasetIDs(ids ...int) *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) Save(ctx context.Context) (int, error)
- func (vbu *ViewBlockUpdate) SaveX(ctx context.Context) int
- func (vbu *ViewBlockUpdate) SetConfig(s string) *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) SetNillableViewID(id *int) *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) SetType(s string) *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) SetView(v *View) *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) SetViewID(id int) *ViewBlockUpdate
- func (vbu *ViewBlockUpdate) Where(ps ...predicate.ViewBlock) *ViewBlockUpdate
- type ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) AddDataset(d ...*DataSet) *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) AddDatasetIDs(ids ...int) *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) ClearDataset() *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) ClearView() *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) Exec(ctx context.Context) error
- func (vbuo *ViewBlockUpdateOne) ExecX(ctx context.Context)
- func (vbuo *ViewBlockUpdateOne) Mutation() *ViewBlockMutation
- func (vbuo *ViewBlockUpdateOne) RemoveDataset(d ...*DataSet) *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) RemoveDatasetIDs(ids ...int) *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) Save(ctx context.Context) (*ViewBlock, error)
- func (vbuo *ViewBlockUpdateOne) SaveX(ctx context.Context) *ViewBlock
- func (vbuo *ViewBlockUpdateOne) Select(field string, fields ...string) *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) SetConfig(s string) *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) SetNillableViewID(id *int) *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) SetType(s string) *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) SetView(v *View) *ViewBlockUpdateOne
- func (vbuo *ViewBlockUpdateOne) SetViewID(id int) *ViewBlockUpdateOne
- type ViewBlocks
- type ViewClient
- func (c *ViewClient) Create() *ViewCreate
- func (c *ViewClient) CreateBulk(builders ...*ViewCreate) *ViewCreateBulk
- func (c *ViewClient) Delete() *ViewDelete
- func (c *ViewClient) DeleteOne(v *View) *ViewDeleteOne
- func (c *ViewClient) DeleteOneID(id int) *ViewDeleteOne
- func (c *ViewClient) Get(ctx context.Context, id int) (*View, error)
- func (c *ViewClient) GetX(ctx context.Context, id int) *View
- func (c *ViewClient) Hooks() []Hook
- func (c *ViewClient) Query() *ViewQuery
- func (c *ViewClient) QueryBg(v *View) *AssetsQuery
- func (c *ViewClient) QueryBlocks(v *View) *ViewBlockQuery
- func (c *ViewClient) QueryShare(v *View) *ShareQuery
- func (c *ViewClient) Update() *ViewUpdate
- func (c *ViewClient) UpdateOne(v *View) *ViewUpdateOne
- func (c *ViewClient) UpdateOneID(id int) *ViewUpdateOne
- func (c *ViewClient) Use(hooks ...Hook)
- type ViewCreate
- func (vc *ViewCreate) AddBlockIDs(ids ...int) *ViewCreate
- func (vc *ViewCreate) AddBlocks(v ...*ViewBlock) *ViewCreate
- func (vc *ViewCreate) AddShare(s ...*Share) *ViewCreate
- func (vc *ViewCreate) AddShareIDs(ids ...int) *ViewCreate
- func (vc *ViewCreate) Mutation() *ViewMutation
- func (vc *ViewCreate) Save(ctx context.Context) (*View, error)
- func (vc *ViewCreate) SaveX(ctx context.Context) *View
- func (vc *ViewCreate) SetBg(a *Assets) *ViewCreate
- func (vc *ViewCreate) SetBgID(id int) *ViewCreate
- func (vc *ViewCreate) SetConfig(s string) *ViewCreate
- func (vc *ViewCreate) SetDesc(s string) *ViewCreate
- func (vc *ViewCreate) SetNillableBgID(id *int) *ViewCreate
- type ViewCreateBulk
- type ViewDelete
- type ViewDeleteOne
- type ViewEdges
- type ViewGroupBy
- func (vgb *ViewGroupBy) Aggregate(fns ...AggregateFunc) *ViewGroupBy
- func (vgb *ViewGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (vgb *ViewGroupBy) BoolX(ctx context.Context) bool
- func (vgb *ViewGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (vgb *ViewGroupBy) BoolsX(ctx context.Context) []bool
- func (vgb *ViewGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (vgb *ViewGroupBy) Float64X(ctx context.Context) float64
- func (vgb *ViewGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (vgb *ViewGroupBy) Float64sX(ctx context.Context) []float64
- func (vgb *ViewGroupBy) Int(ctx context.Context) (_ int, err error)
- func (vgb *ViewGroupBy) IntX(ctx context.Context) int
- func (vgb *ViewGroupBy) Ints(ctx context.Context) ([]int, error)
- func (vgb *ViewGroupBy) IntsX(ctx context.Context) []int
- func (vgb *ViewGroupBy) Scan(ctx context.Context, v interface{}) error
- func (vgb *ViewGroupBy) ScanX(ctx context.Context, v interface{})
- func (vgb *ViewGroupBy) String(ctx context.Context) (_ string, err error)
- func (vgb *ViewGroupBy) StringX(ctx context.Context) string
- func (vgb *ViewGroupBy) Strings(ctx context.Context) ([]string, error)
- func (vgb *ViewGroupBy) StringsX(ctx context.Context) []string
- type ViewMutation
- func (m *ViewMutation) AddBlockIDs(ids ...int)
- func (m *ViewMutation) AddField(name string, value ent.Value) error
- func (m *ViewMutation) AddShareIDs(ids ...int)
- func (m *ViewMutation) AddedEdges() []string
- func (m *ViewMutation) AddedField(name string) (ent.Value, bool)
- func (m *ViewMutation) AddedFields() []string
- func (m *ViewMutation) AddedIDs(name string) []ent.Value
- func (m *ViewMutation) BgCleared() bool
- func (m *ViewMutation) BgID() (id int, exists bool)
- func (m *ViewMutation) BgIDs() (ids []int)
- func (m *ViewMutation) BlocksCleared() bool
- func (m *ViewMutation) BlocksIDs() (ids []int)
- func (m *ViewMutation) ClearBg()
- func (m *ViewMutation) ClearBlocks()
- func (m *ViewMutation) ClearEdge(name string) error
- func (m *ViewMutation) ClearField(name string) error
- func (m *ViewMutation) ClearShare()
- func (m *ViewMutation) ClearedEdges() []string
- func (m *ViewMutation) ClearedFields() []string
- func (m ViewMutation) Client() *Client
- func (m *ViewMutation) Config() (r string, exists bool)
- func (m *ViewMutation) Desc() (r string, exists bool)
- func (m *ViewMutation) EdgeCleared(name string) bool
- func (m *ViewMutation) Field(name string) (ent.Value, bool)
- func (m *ViewMutation) FieldCleared(name string) bool
- func (m *ViewMutation) Fields() []string
- func (m *ViewMutation) ID() (id int, exists bool)
- func (m *ViewMutation) OldConfig(ctx context.Context) (v string, err error)
- func (m *ViewMutation) OldDesc(ctx context.Context) (v string, err error)
- func (m *ViewMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ViewMutation) Op() Op
- func (m *ViewMutation) RemoveBlockIDs(ids ...int)
- func (m *ViewMutation) RemoveShareIDs(ids ...int)
- func (m *ViewMutation) RemovedBlocksIDs() (ids []int)
- func (m *ViewMutation) RemovedEdges() []string
- func (m *ViewMutation) RemovedIDs(name string) []ent.Value
- func (m *ViewMutation) RemovedShareIDs() (ids []int)
- func (m *ViewMutation) ResetBg()
- func (m *ViewMutation) ResetBlocks()
- func (m *ViewMutation) ResetConfig()
- func (m *ViewMutation) ResetDesc()
- func (m *ViewMutation) ResetEdge(name string) error
- func (m *ViewMutation) ResetField(name string) error
- func (m *ViewMutation) ResetShare()
- func (m *ViewMutation) SetBgID(id int)
- func (m *ViewMutation) SetConfig(s string)
- func (m *ViewMutation) SetDesc(s string)
- func (m *ViewMutation) SetField(name string, value ent.Value) error
- func (m *ViewMutation) ShareCleared() bool
- func (m *ViewMutation) ShareIDs() (ids []int)
- func (m ViewMutation) Tx() (*Tx, error)
- func (m *ViewMutation) Type() string
- type ViewQuery
- func (vq *ViewQuery) All(ctx context.Context) ([]*View, error)
- func (vq *ViewQuery) AllX(ctx context.Context) []*View
- func (vq *ViewQuery) Clone() *ViewQuery
- func (vq *ViewQuery) Count(ctx context.Context) (int, error)
- func (vq *ViewQuery) CountX(ctx context.Context) int
- func (vq *ViewQuery) Exist(ctx context.Context) (bool, error)
- func (vq *ViewQuery) ExistX(ctx context.Context) bool
- func (vq *ViewQuery) First(ctx context.Context) (*View, error)
- func (vq *ViewQuery) FirstID(ctx context.Context) (id int, err error)
- func (vq *ViewQuery) FirstIDX(ctx context.Context) int
- func (vq *ViewQuery) FirstX(ctx context.Context) *View
- func (vq *ViewQuery) GroupBy(field string, fields ...string) *ViewGroupBy
- func (vq *ViewQuery) IDs(ctx context.Context) ([]int, error)
- func (vq *ViewQuery) IDsX(ctx context.Context) []int
- func (vq *ViewQuery) Limit(limit int) *ViewQuery
- func (vq *ViewQuery) Offset(offset int) *ViewQuery
- func (vq *ViewQuery) Only(ctx context.Context) (*View, error)
- func (vq *ViewQuery) OnlyID(ctx context.Context) (id int, err error)
- func (vq *ViewQuery) OnlyIDX(ctx context.Context) int
- func (vq *ViewQuery) OnlyX(ctx context.Context) *View
- func (vq *ViewQuery) Order(o ...OrderFunc) *ViewQuery
- func (vq *ViewQuery) QueryBg() *AssetsQuery
- func (vq *ViewQuery) QueryBlocks() *ViewBlockQuery
- func (vq *ViewQuery) QueryShare() *ShareQuery
- func (vq *ViewQuery) Select(field string, fields ...string) *ViewSelect
- func (vq *ViewQuery) Unique(unique bool) *ViewQuery
- func (vq *ViewQuery) Where(ps ...predicate.View) *ViewQuery
- func (vq *ViewQuery) WithBg(opts ...func(*AssetsQuery)) *ViewQuery
- func (vq *ViewQuery) WithBlocks(opts ...func(*ViewBlockQuery)) *ViewQuery
- func (vq *ViewQuery) WithShare(opts ...func(*ShareQuery)) *ViewQuery
- type ViewSelect
- func (vs *ViewSelect) Bool(ctx context.Context) (_ bool, err error)
- func (vs *ViewSelect) BoolX(ctx context.Context) bool
- func (vs *ViewSelect) Bools(ctx context.Context) ([]bool, error)
- func (vs *ViewSelect) BoolsX(ctx context.Context) []bool
- func (vs *ViewSelect) Float64(ctx context.Context) (_ float64, err error)
- func (vs *ViewSelect) Float64X(ctx context.Context) float64
- func (vs *ViewSelect) Float64s(ctx context.Context) ([]float64, error)
- func (vs *ViewSelect) Float64sX(ctx context.Context) []float64
- func (vs *ViewSelect) Int(ctx context.Context) (_ int, err error)
- func (vs *ViewSelect) IntX(ctx context.Context) int
- func (vs *ViewSelect) Ints(ctx context.Context) ([]int, error)
- func (vs *ViewSelect) IntsX(ctx context.Context) []int
- func (vs *ViewSelect) Scan(ctx context.Context, v interface{}) error
- func (vs *ViewSelect) ScanX(ctx context.Context, v interface{})
- func (vs *ViewSelect) String(ctx context.Context) (_ string, err error)
- func (vs *ViewSelect) StringX(ctx context.Context) string
- func (vs *ViewSelect) Strings(ctx context.Context) ([]string, error)
- func (vs *ViewSelect) StringsX(ctx context.Context) []string
- type ViewUpdate
- func (vu *ViewUpdate) AddBlockIDs(ids ...int) *ViewUpdate
- func (vu *ViewUpdate) AddBlocks(v ...*ViewBlock) *ViewUpdate
- func (vu *ViewUpdate) AddShare(s ...*Share) *ViewUpdate
- func (vu *ViewUpdate) AddShareIDs(ids ...int) *ViewUpdate
- func (vu *ViewUpdate) ClearBg() *ViewUpdate
- func (vu *ViewUpdate) ClearBlocks() *ViewUpdate
- func (vu *ViewUpdate) ClearShare() *ViewUpdate
- func (vu *ViewUpdate) Exec(ctx context.Context) error
- func (vu *ViewUpdate) ExecX(ctx context.Context)
- func (vu *ViewUpdate) Mutation() *ViewMutation
- func (vu *ViewUpdate) RemoveBlockIDs(ids ...int) *ViewUpdate
- func (vu *ViewUpdate) RemoveBlocks(v ...*ViewBlock) *ViewUpdate
- func (vu *ViewUpdate) RemoveShare(s ...*Share) *ViewUpdate
- func (vu *ViewUpdate) RemoveShareIDs(ids ...int) *ViewUpdate
- func (vu *ViewUpdate) Save(ctx context.Context) (int, error)
- func (vu *ViewUpdate) SaveX(ctx context.Context) int
- func (vu *ViewUpdate) SetBg(a *Assets) *ViewUpdate
- func (vu *ViewUpdate) SetBgID(id int) *ViewUpdate
- func (vu *ViewUpdate) SetConfig(s string) *ViewUpdate
- func (vu *ViewUpdate) SetDesc(s string) *ViewUpdate
- func (vu *ViewUpdate) SetNillableBgID(id *int) *ViewUpdate
- func (vu *ViewUpdate) Where(ps ...predicate.View) *ViewUpdate
- type ViewUpdateOne
- func (vuo *ViewUpdateOne) AddBlockIDs(ids ...int) *ViewUpdateOne
- func (vuo *ViewUpdateOne) AddBlocks(v ...*ViewBlock) *ViewUpdateOne
- func (vuo *ViewUpdateOne) AddShare(s ...*Share) *ViewUpdateOne
- func (vuo *ViewUpdateOne) AddShareIDs(ids ...int) *ViewUpdateOne
- func (vuo *ViewUpdateOne) ClearBg() *ViewUpdateOne
- func (vuo *ViewUpdateOne) ClearBlocks() *ViewUpdateOne
- func (vuo *ViewUpdateOne) ClearShare() *ViewUpdateOne
- func (vuo *ViewUpdateOne) Exec(ctx context.Context) error
- func (vuo *ViewUpdateOne) ExecX(ctx context.Context)
- func (vuo *ViewUpdateOne) Mutation() *ViewMutation
- func (vuo *ViewUpdateOne) RemoveBlockIDs(ids ...int) *ViewUpdateOne
- func (vuo *ViewUpdateOne) RemoveBlocks(v ...*ViewBlock) *ViewUpdateOne
- func (vuo *ViewUpdateOne) RemoveShare(s ...*Share) *ViewUpdateOne
- func (vuo *ViewUpdateOne) RemoveShareIDs(ids ...int) *ViewUpdateOne
- func (vuo *ViewUpdateOne) Save(ctx context.Context) (*View, error)
- func (vuo *ViewUpdateOne) SaveX(ctx context.Context) *View
- func (vuo *ViewUpdateOne) Select(field string, fields ...string) *ViewUpdateOne
- func (vuo *ViewUpdateOne) SetBg(a *Assets) *ViewUpdateOne
- func (vuo *ViewUpdateOne) SetBgID(id int) *ViewUpdateOne
- func (vuo *ViewUpdateOne) SetConfig(s string) *ViewUpdateOne
- func (vuo *ViewUpdateOne) SetDesc(s string) *ViewUpdateOne
- func (vuo *ViewUpdateOne) SetNillableBgID(id *int) *ViewUpdateOne
- type Views
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAssets = "Assets" TypeDataSet = "DataSet" TypeMenu = "Menu" TypeTypeConfig = "TypeConfig" TypeUser = "User" TypeView = "View" TypeViewBlock = "ViewBlock" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type ActionFields ¶
func (*ActionFields) SetFields ¶
func (af *ActionFields) SetFields(fields []string)
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(model.As(model.Sum(field1), "sum_field1"), (model.As(model.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 Api ¶
type Api struct {
Fields struct {
Create ActionFields
Update ActionFields
}
Client *Client
}
type Assets ¶
type Assets struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Path holds the value of the "path" field.
Path string `json:"path,omitempty"`
// Ext holds the value of the "ext" field.
Ext string `json:"ext,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the AssetsQuery when eager-loading is set.
Edges AssetsEdges `json:"edges"`
// contains filtered or unexported fields
}
Assets is the model entity for the Assets schema.
func (*Assets) Unwrap ¶
Unwrap unwraps the Assets 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 (*Assets) Update ¶
func (a *Assets) Update() *AssetsUpdateOne
Update returns a builder for updating this Assets. Note that you need to call Assets.Unwrap() before calling this method if this Assets was returned from a transaction, and the transaction was committed or rolled back.
type AssetsApi ¶
type AssetsApi struct {
*Api
Filter AssetsApiFilter
SkipCreateAutoEdge bool
SkipUpdateAutoEdge bool
}
func NewAssetsApi ¶
type AssetsApiFilter ¶
type AssetsApiFilter struct {
CreatePipe func(help *contact.GinHelp, createPipe *AssetsCreate, edges AssetsEdges)
CreateAfter func(help *contact.GinHelp, item *Assets, edges AssetsEdges)
UpdatePipe func(help *contact.GinHelp, old *Assets, updatePipe *AssetsUpdateOne, edges AssetsEdges)
UpdateAfter func(help *contact.GinHelp, old *Assets, item *Assets, edges AssetsEdges)
ListPipe func(help *contact.GinHelp, listPipe *AssetsQuery)
ListData func(help *contact.GinHelp, items []*Assets) interface{}
DeleteBefore func(help *contact.GinHelp, item *Assets)
GetPipe func(help *contact.GinHelp, getPipe *AssetsQuery)
GetData func(help *contact.GinHelp, item *Assets) *Assets
}
type AssetsClient ¶
type AssetsClient struct {
// contains filtered or unexported fields
}
AssetsClient is a client for the Assets schema.
func NewAssetsClient ¶
func NewAssetsClient(c config) *AssetsClient
NewAssetsClient returns a client for the Assets from the given config.
func (*AssetsClient) Create ¶
func (c *AssetsClient) Create() *AssetsCreate
Create returns a create builder for Assets.
func (*AssetsClient) CreateBulk ¶
func (c *AssetsClient) CreateBulk(builders ...*AssetsCreate) *AssetsCreateBulk
CreateBulk returns a builder for creating a bulk of Assets entities.
func (*AssetsClient) Delete ¶
func (c *AssetsClient) Delete() *AssetsDelete
Delete returns a delete builder for Assets.
func (*AssetsClient) DeleteOne ¶
func (c *AssetsClient) DeleteOne(a *Assets) *AssetsDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*AssetsClient) DeleteOneID ¶
func (c *AssetsClient) DeleteOneID(id int) *AssetsDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*AssetsClient) GetX ¶
func (c *AssetsClient) GetX(ctx context.Context, id int) *Assets
GetX is like Get, but panics if an error occurs.
func (*AssetsClient) Query ¶
func (c *AssetsClient) Query() *AssetsQuery
Query returns a query builder for Assets.
func (*AssetsClient) QueryView ¶
func (c *AssetsClient) QueryView(a *Assets) *ViewQuery
QueryView queries the view edge of a Assets.
func (*AssetsClient) Update ¶
func (c *AssetsClient) Update() *AssetsUpdate
Update returns an update builder for Assets.
func (*AssetsClient) UpdateOne ¶
func (c *AssetsClient) UpdateOne(a *Assets) *AssetsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AssetsClient) UpdateOneID ¶
func (c *AssetsClient) UpdateOneID(id int) *AssetsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AssetsClient) Use ¶
func (c *AssetsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `assets.Hooks(f(g(h())))`.
type AssetsCreate ¶
type AssetsCreate struct {
// contains filtered or unexported fields
}
AssetsCreate is the builder for creating a Assets entity.
func (*AssetsCreate) AddView ¶
func (ac *AssetsCreate) AddView(v ...*View) *AssetsCreate
AddView adds the "view" edges to the View entity.
func (*AssetsCreate) AddViewIDs ¶
func (ac *AssetsCreate) AddViewIDs(ids ...int) *AssetsCreate
AddViewIDs adds the "view" edge to the View entity by IDs.
func (*AssetsCreate) Mutation ¶
func (ac *AssetsCreate) Mutation() *AssetsMutation
Mutation returns the AssetsMutation object of the builder.
func (*AssetsCreate) Save ¶
func (ac *AssetsCreate) Save(ctx context.Context) (*Assets, error)
Save creates the Assets in the database.
func (*AssetsCreate) SaveX ¶
func (ac *AssetsCreate) SaveX(ctx context.Context) *Assets
SaveX calls Save and panics if Save returns an error.
func (*AssetsCreate) SetExt ¶
func (ac *AssetsCreate) SetExt(s string) *AssetsCreate
SetExt sets the "ext" field.
func (*AssetsCreate) SetPath ¶
func (ac *AssetsCreate) SetPath(s string) *AssetsCreate
SetPath sets the "path" field.
func (*AssetsCreate) SetType ¶
func (ac *AssetsCreate) SetType(s string) *AssetsCreate
SetType sets the "type" field.
type AssetsCreateBulk ¶
type AssetsCreateBulk struct {
// contains filtered or unexported fields
}
AssetsCreateBulk is the builder for creating many Assets entities in bulk.
type AssetsDelete ¶
type AssetsDelete struct {
// contains filtered or unexported fields
}
AssetsDelete is the builder for deleting a Assets entity.
func (*AssetsDelete) Exec ¶
func (ad *AssetsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AssetsDelete) ExecX ¶
func (ad *AssetsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AssetsDelete) Where ¶
func (ad *AssetsDelete) Where(ps ...predicate.Assets) *AssetsDelete
Where adds a new predicate to the AssetsDelete builder.
type AssetsDeleteOne ¶
type AssetsDeleteOne struct {
// contains filtered or unexported fields
}
AssetsDeleteOne is the builder for deleting a single Assets entity.
func (*AssetsDeleteOne) Exec ¶
func (ado *AssetsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AssetsDeleteOne) ExecX ¶
func (ado *AssetsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AssetsEdges ¶
type AssetsEdges struct {
// View holds the value of the view edge.
View []*View `json:"view,omitempty"`
// contains filtered or unexported fields
}
AssetsEdges holds the relations/edges for other nodes in the graph.
func (AssetsEdges) ViewOrErr ¶
func (e AssetsEdges) ViewOrErr() ([]*View, error)
ViewOrErr returns the View value or an error if the edge was not loaded in eager-loading.
type AssetsGroupBy ¶
type AssetsGroupBy struct {
// contains filtered or unexported fields
}
AssetsGroupBy is the group-by builder for Assets entities.
func (*AssetsGroupBy) Aggregate ¶
func (agb *AssetsGroupBy) Aggregate(fns ...AggregateFunc) *AssetsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AssetsGroupBy) Bool ¶
func (agb *AssetsGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AssetsGroupBy) BoolX ¶
func (agb *AssetsGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AssetsGroupBy) Bools ¶
func (agb *AssetsGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*AssetsGroupBy) BoolsX ¶
func (agb *AssetsGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AssetsGroupBy) Float64 ¶
func (agb *AssetsGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AssetsGroupBy) Float64X ¶
func (agb *AssetsGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AssetsGroupBy) Float64s ¶
func (agb *AssetsGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*AssetsGroupBy) Float64sX ¶
func (agb *AssetsGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AssetsGroupBy) Int ¶
func (agb *AssetsGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AssetsGroupBy) IntX ¶
func (agb *AssetsGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AssetsGroupBy) Ints ¶
func (agb *AssetsGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*AssetsGroupBy) IntsX ¶
func (agb *AssetsGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AssetsGroupBy) Scan ¶
func (agb *AssetsGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*AssetsGroupBy) ScanX ¶
func (agb *AssetsGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AssetsGroupBy) String ¶
func (agb *AssetsGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AssetsGroupBy) StringX ¶
func (agb *AssetsGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AssetsMutation ¶
type AssetsMutation struct {
// contains filtered or unexported fields
}
AssetsMutation represents an operation that mutates the Assets nodes in the graph.
func (*AssetsMutation) AddField ¶
func (m *AssetsMutation) 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 (*AssetsMutation) AddViewIDs ¶
func (m *AssetsMutation) AddViewIDs(ids ...int)
AddViewIDs adds the "view" edge to the View entity by ids.
func (*AssetsMutation) AddedEdges ¶
func (m *AssetsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AssetsMutation) AddedField ¶
func (m *AssetsMutation) 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 (*AssetsMutation) AddedFields ¶
func (m *AssetsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AssetsMutation) AddedIDs ¶
func (m *AssetsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AssetsMutation) ClearEdge ¶
func (m *AssetsMutation) 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 (*AssetsMutation) ClearField ¶
func (m *AssetsMutation) 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 (*AssetsMutation) ClearView ¶
func (m *AssetsMutation) ClearView()
ClearView clears the "view" edge to the View entity.
func (*AssetsMutation) ClearedEdges ¶
func (m *AssetsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AssetsMutation) ClearedFields ¶
func (m *AssetsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AssetsMutation) Client ¶
func (m AssetsMutation) 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 (*AssetsMutation) EdgeCleared ¶
func (m *AssetsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AssetsMutation) Ext ¶
func (m *AssetsMutation) Ext() (r string, exists bool)
Ext returns the value of the "ext" field in the mutation.
func (*AssetsMutation) Field ¶
func (m *AssetsMutation) 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 (*AssetsMutation) FieldCleared ¶
func (m *AssetsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AssetsMutation) Fields ¶
func (m *AssetsMutation) 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 (*AssetsMutation) GetType ¶
func (m *AssetsMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*AssetsMutation) ID ¶
func (m *AssetsMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*AssetsMutation) OldExt ¶
func (m *AssetsMutation) OldExt(ctx context.Context) (v string, err error)
OldExt returns the old "ext" field's value of the Assets entity. If the Assets 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 (*AssetsMutation) 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 (*AssetsMutation) OldPath ¶
func (m *AssetsMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the Assets entity. If the Assets 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 (*AssetsMutation) OldType ¶
func (m *AssetsMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Assets entity. If the Assets 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 (*AssetsMutation) Path ¶
func (m *AssetsMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*AssetsMutation) RemoveViewIDs ¶
func (m *AssetsMutation) RemoveViewIDs(ids ...int)
RemoveViewIDs removes the "view" edge to the View entity by IDs.
func (*AssetsMutation) RemovedEdges ¶
func (m *AssetsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AssetsMutation) RemovedIDs ¶
func (m *AssetsMutation) 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 (*AssetsMutation) RemovedViewIDs ¶
func (m *AssetsMutation) RemovedViewIDs() (ids []int)
RemovedView returns the removed IDs of the "view" edge to the View entity.
func (*AssetsMutation) ResetEdge ¶
func (m *AssetsMutation) 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 (*AssetsMutation) ResetExt ¶
func (m *AssetsMutation) ResetExt()
ResetExt resets all changes to the "ext" field.
func (*AssetsMutation) ResetField ¶
func (m *AssetsMutation) 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 (*AssetsMutation) ResetPath ¶
func (m *AssetsMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*AssetsMutation) ResetType ¶
func (m *AssetsMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*AssetsMutation) ResetView ¶
func (m *AssetsMutation) ResetView()
ResetView resets all changes to the "view" edge.
func (*AssetsMutation) SetExt ¶
func (m *AssetsMutation) SetExt(s string)
SetExt sets the "ext" field.
func (*AssetsMutation) SetField ¶
func (m *AssetsMutation) 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 (*AssetsMutation) SetPath ¶
func (m *AssetsMutation) SetPath(s string)
SetPath sets the "path" field.
func (*AssetsMutation) SetType ¶
func (m *AssetsMutation) SetType(s string)
SetType sets the "type" field.
func (AssetsMutation) Tx ¶
func (m AssetsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AssetsMutation) Type ¶
func (m *AssetsMutation) Type() string
Type returns the node type of this mutation (Assets).
func (*AssetsMutation) ViewCleared ¶
func (m *AssetsMutation) ViewCleared() bool
ViewCleared reports if the "view" edge to the View entity was cleared.
func (*AssetsMutation) ViewIDs ¶
func (m *AssetsMutation) ViewIDs() (ids []int)
ViewIDs returns the "view" edge IDs in the mutation.
type AssetsQuery ¶
type AssetsQuery struct {
// contains filtered or unexported fields
}
AssetsQuery is the builder for querying Assets entities.
func (*AssetsQuery) All ¶
func (aq *AssetsQuery) All(ctx context.Context) ([]*Assets, error)
All executes the query and returns a list of AssetsSlice.
func (*AssetsQuery) AllX ¶
func (aq *AssetsQuery) AllX(ctx context.Context) []*Assets
AllX is like All, but panics if an error occurs.
func (*AssetsQuery) Clone ¶
func (aq *AssetsQuery) Clone() *AssetsQuery
Clone returns a duplicate of the AssetsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AssetsQuery) Count ¶
func (aq *AssetsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AssetsQuery) CountX ¶
func (aq *AssetsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AssetsQuery) Exist ¶
func (aq *AssetsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AssetsQuery) ExistX ¶
func (aq *AssetsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AssetsQuery) First ¶
func (aq *AssetsQuery) First(ctx context.Context) (*Assets, error)
First returns the first Assets entity from the query. Returns a *NotFoundError when no Assets was found.
func (*AssetsQuery) FirstID ¶
func (aq *AssetsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Assets ID from the query. Returns a *NotFoundError when no Assets ID was found.
func (*AssetsQuery) FirstIDX ¶
func (aq *AssetsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AssetsQuery) FirstX ¶
func (aq *AssetsQuery) FirstX(ctx context.Context) *Assets
FirstX is like First, but panics if an error occurs.
func (*AssetsQuery) GroupBy ¶
func (aq *AssetsQuery) GroupBy(field string, fields ...string) *AssetsGroupBy
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 {
Path string `json:"path,omitempty"`
Count int `json:"count,omitempty"`
}
client.Assets.Query().
GroupBy(assets.FieldPath).
Aggregate(model.Count()).
Scan(ctx, &v)
func (*AssetsQuery) IDs ¶
func (aq *AssetsQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Assets IDs.
func (*AssetsQuery) IDsX ¶
func (aq *AssetsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AssetsQuery) Limit ¶
func (aq *AssetsQuery) Limit(limit int) *AssetsQuery
Limit adds a limit step to the query.
func (*AssetsQuery) Offset ¶
func (aq *AssetsQuery) Offset(offset int) *AssetsQuery
Offset adds an offset step to the query.
func (*AssetsQuery) Only ¶
func (aq *AssetsQuery) Only(ctx context.Context) (*Assets, error)
Only returns a single Assets entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Assets entity is not found. Returns a *NotFoundError when no Assets entities are found.
func (*AssetsQuery) OnlyID ¶
func (aq *AssetsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Assets ID in the query. Returns a *NotSingularError when exactly one Assets ID is not found. Returns a *NotFoundError when no entities are found.
func (*AssetsQuery) OnlyIDX ¶
func (aq *AssetsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AssetsQuery) OnlyX ¶
func (aq *AssetsQuery) OnlyX(ctx context.Context) *Assets
OnlyX is like Only, but panics if an error occurs.
func (*AssetsQuery) Order ¶
func (aq *AssetsQuery) Order(o ...OrderFunc) *AssetsQuery
Order adds an order step to the query.
func (*AssetsQuery) QueryView ¶
func (aq *AssetsQuery) QueryView() *ViewQuery
QueryView chains the current query on the "view" edge.
func (*AssetsQuery) Select ¶
func (aq *AssetsQuery) Select(field string, fields ...string) *AssetsSelect
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 {
Path string `json:"path,omitempty"`
}
client.Assets.Query().
Select(assets.FieldPath).
Scan(ctx, &v)
func (*AssetsQuery) Unique ¶
func (aq *AssetsQuery) Unique(unique bool) *AssetsQuery
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 (*AssetsQuery) Where ¶
func (aq *AssetsQuery) Where(ps ...predicate.Assets) *AssetsQuery
Where adds a new predicate for the AssetsQuery builder.
func (*AssetsQuery) WithView ¶
func (aq *AssetsQuery) WithView(opts ...func(*ViewQuery)) *AssetsQuery
WithView tells the query-builder to eager-load the nodes that are connected to the "view" edge. The optional arguments are used to configure the query builder of the edge.
type AssetsSelect ¶
type AssetsSelect struct {
*AssetsQuery
// contains filtered or unexported fields
}
AssetsSelect is the builder for selecting fields of Assets entities.
func (*AssetsSelect) Bool ¶
func (as *AssetsSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AssetsSelect) BoolX ¶
func (as *AssetsSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AssetsSelect) Bools ¶
func (as *AssetsSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AssetsSelect) BoolsX ¶
func (as *AssetsSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AssetsSelect) Float64 ¶
func (as *AssetsSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AssetsSelect) Float64X ¶
func (as *AssetsSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AssetsSelect) Float64s ¶
func (as *AssetsSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AssetsSelect) Float64sX ¶
func (as *AssetsSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AssetsSelect) Int ¶
func (as *AssetsSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AssetsSelect) IntX ¶
func (as *AssetsSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AssetsSelect) Ints ¶
func (as *AssetsSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AssetsSelect) IntsX ¶
func (as *AssetsSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AssetsSelect) Scan ¶
func (as *AssetsSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*AssetsSelect) ScanX ¶
func (as *AssetsSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AssetsSelect) String ¶
func (as *AssetsSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AssetsSelect) StringX ¶
func (as *AssetsSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AssetsUpdate ¶
type AssetsUpdate struct {
// contains filtered or unexported fields
}
AssetsUpdate is the builder for updating Assets entities.
func (*AssetsUpdate) AddView ¶
func (au *AssetsUpdate) AddView(v ...*View) *AssetsUpdate
AddView adds the "view" edges to the View entity.
func (*AssetsUpdate) AddViewIDs ¶
func (au *AssetsUpdate) AddViewIDs(ids ...int) *AssetsUpdate
AddViewIDs adds the "view" edge to the View entity by IDs.
func (*AssetsUpdate) ClearView ¶
func (au *AssetsUpdate) ClearView() *AssetsUpdate
ClearView clears all "view" edges to the View entity.
func (*AssetsUpdate) Exec ¶
func (au *AssetsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AssetsUpdate) ExecX ¶
func (au *AssetsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AssetsUpdate) Mutation ¶
func (au *AssetsUpdate) Mutation() *AssetsMutation
Mutation returns the AssetsMutation object of the builder.
func (*AssetsUpdate) RemoveView ¶
func (au *AssetsUpdate) RemoveView(v ...*View) *AssetsUpdate
RemoveView removes "view" edges to View entities.
func (*AssetsUpdate) RemoveViewIDs ¶
func (au *AssetsUpdate) RemoveViewIDs(ids ...int) *AssetsUpdate
RemoveViewIDs removes the "view" edge to View entities by IDs.
func (*AssetsUpdate) Save ¶
func (au *AssetsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AssetsUpdate) SaveX ¶
func (au *AssetsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AssetsUpdate) SetExt ¶
func (au *AssetsUpdate) SetExt(s string) *AssetsUpdate
SetExt sets the "ext" field.
func (*AssetsUpdate) SetPath ¶
func (au *AssetsUpdate) SetPath(s string) *AssetsUpdate
SetPath sets the "path" field.
func (*AssetsUpdate) SetType ¶
func (au *AssetsUpdate) SetType(s string) *AssetsUpdate
SetType sets the "type" field.
func (*AssetsUpdate) Where ¶
func (au *AssetsUpdate) Where(ps ...predicate.Assets) *AssetsUpdate
Where adds a new predicate for the AssetsUpdate builder.
type AssetsUpdateOne ¶
type AssetsUpdateOne struct {
// contains filtered or unexported fields
}
AssetsUpdateOne is the builder for updating a single Assets entity.
func (*AssetsUpdateOne) AddView ¶
func (auo *AssetsUpdateOne) AddView(v ...*View) *AssetsUpdateOne
AddView adds the "view" edges to the View entity.
func (*AssetsUpdateOne) AddViewIDs ¶
func (auo *AssetsUpdateOne) AddViewIDs(ids ...int) *AssetsUpdateOne
AddViewIDs adds the "view" edge to the View entity by IDs.
func (*AssetsUpdateOne) ClearView ¶
func (auo *AssetsUpdateOne) ClearView() *AssetsUpdateOne
ClearView clears all "view" edges to the View entity.
func (*AssetsUpdateOne) Exec ¶
func (auo *AssetsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AssetsUpdateOne) ExecX ¶
func (auo *AssetsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AssetsUpdateOne) Mutation ¶
func (auo *AssetsUpdateOne) Mutation() *AssetsMutation
Mutation returns the AssetsMutation object of the builder.
func (*AssetsUpdateOne) RemoveView ¶
func (auo *AssetsUpdateOne) RemoveView(v ...*View) *AssetsUpdateOne
RemoveView removes "view" edges to View entities.
func (*AssetsUpdateOne) RemoveViewIDs ¶
func (auo *AssetsUpdateOne) RemoveViewIDs(ids ...int) *AssetsUpdateOne
RemoveViewIDs removes the "view" edge to View entities by IDs.
func (*AssetsUpdateOne) Save ¶
func (auo *AssetsUpdateOne) Save(ctx context.Context) (*Assets, error)
Save executes the query and returns the updated Assets entity.
func (*AssetsUpdateOne) SaveX ¶
func (auo *AssetsUpdateOne) SaveX(ctx context.Context) *Assets
SaveX is like Save, but panics if an error occurs.
func (*AssetsUpdateOne) Select ¶
func (auo *AssetsUpdateOne) Select(field string, fields ...string) *AssetsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AssetsUpdateOne) SetExt ¶
func (auo *AssetsUpdateOne) SetExt(s string) *AssetsUpdateOne
SetExt sets the "ext" field.
func (*AssetsUpdateOne) SetPath ¶
func (auo *AssetsUpdateOne) SetPath(s string) *AssetsUpdateOne
SetPath sets the "path" field.
func (*AssetsUpdateOne) SetType ¶
func (auo *AssetsUpdateOne) SetType(s string) *AssetsUpdateOne
SetType sets the "type" field.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Assets is the client for interacting with the Assets builders.
Assets *AssetsClient
// DataSet is the client for interacting with the DataSet builders.
DataSet *DataSetClient
// Menu is the client for interacting with the Menu builders.
Menu *MenuClient
Share *ShareClient
// TypeConfig is the client for interacting with the TypeConfig builders.
TypeConfig *TypeConfigClient
// User is the client for interacting with the User builders.
User *UserClient
// View is the client for interacting with the View builders.
View *ViewClient
// ViewBlock is the client for interacting with the ViewBlock builders.
ViewBlock *ViewBlockClient
// 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(). Assets. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Commit(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type CurdBuilder ¶
type CurdBuilder struct {
Apis struct {
Assets *AssetsApi
DataSet *DataSetApi
Menu *MenuApi
Share *ShareApi
TypeConfig *TypeConfigApi
User *UserApi
View *ViewApi
ViewBlock *ViewBlockApi
}
}
func NewCurdBuilder ¶
func NewCurdBuilder(client *Client) *CurdBuilder
func (*CurdBuilder) Group ¶
func (cb *CurdBuilder) Group(group *gin.RouterGroup, path string, api Endpoint)
func (*CurdBuilder) Route ¶
func (cb *CurdBuilder) Route(prefix string, r gin.IRouter, pick []string) *gin.RouterGroup
type DataSet ¶
type DataSet struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// Title holds the value of the "title" field.
Title string `json:"title,omitempty"`
// Config holds the value of the "config" field.
Config string `json:"config,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the DataSetQuery when eager-loading is set.
Edges DataSetEdges `json:"edges"`
// contains filtered or unexported fields
}
DataSet is the model entity for the DataSet schema.
func (*DataSet) QueryBlock ¶
func (ds *DataSet) QueryBlock() *ViewBlockQuery
QueryBlock queries the "block" edge of the DataSet entity.
func (*DataSet) Unwrap ¶
Unwrap unwraps the DataSet 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 (*DataSet) Update ¶
func (ds *DataSet) Update() *DataSetUpdateOne
Update returns a builder for updating this DataSet. Note that you need to call DataSet.Unwrap() before calling this method if this DataSet was returned from a transaction, and the transaction was committed or rolled back.
type DataSetApi ¶
type DataSetApi struct {
*Api
Filter DataSetApiFilter
SkipCreateAutoEdge bool
SkipUpdateAutoEdge bool
}
func NewDataSetApi ¶
func NewDataSetApi(client *Client, opt *ApiOption) *DataSetApi
func (*DataSetApi) Create ¶
func (c *DataSetApi) Create(help *contact.GinHelp)
func (*DataSetApi) Delete ¶
func (c *DataSetApi) Delete(help *contact.GinHelp)
func (*DataSetApi) Get ¶
func (c *DataSetApi) Get(help *contact.GinHelp)
func (*DataSetApi) List ¶
func (c *DataSetApi) List(help *contact.GinHelp)
func (*DataSetApi) Update ¶
func (c *DataSetApi) Update(help *contact.GinHelp)
type DataSetApiFilter ¶
type DataSetApiFilter struct {
CreatePipe func(help *contact.GinHelp, createPipe *DataSetCreate, edges DataSetEdges)
CreateAfter func(help *contact.GinHelp, item *DataSet, edges DataSetEdges)
UpdatePipe func(help *contact.GinHelp, old *DataSet, updatePipe *DataSetUpdateOne, edges DataSetEdges)
UpdateAfter func(help *contact.GinHelp, old *DataSet, item *DataSet, edges DataSetEdges)
ListPipe func(help *contact.GinHelp, listPipe *DataSetQuery)
ListData func(help *contact.GinHelp, items []*DataSet) interface{}
DeleteBefore func(help *contact.GinHelp, item *DataSet)
GetPipe func(help *contact.GinHelp, getPipe *DataSetQuery)
GetData func(help *contact.GinHelp, item *DataSet) *DataSet
}
type DataSetClient ¶
type DataSetClient struct {
// contains filtered or unexported fields
}
DataSetClient is a client for the DataSet schema.
func NewDataSetClient ¶
func NewDataSetClient(c config) *DataSetClient
NewDataSetClient returns a client for the DataSet from the given config.
func (*DataSetClient) Create ¶
func (c *DataSetClient) Create() *DataSetCreate
Create returns a create builder for DataSet.
func (*DataSetClient) CreateBulk ¶
func (c *DataSetClient) CreateBulk(builders ...*DataSetCreate) *DataSetCreateBulk
CreateBulk returns a builder for creating a bulk of DataSet entities.
func (*DataSetClient) Delete ¶
func (c *DataSetClient) Delete() *DataSetDelete
Delete returns a delete builder for DataSet.
func (*DataSetClient) DeleteOne ¶
func (c *DataSetClient) DeleteOne(ds *DataSet) *DataSetDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DataSetClient) DeleteOneID ¶
func (c *DataSetClient) DeleteOneID(id int) *DataSetDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DataSetClient) GetX ¶
func (c *DataSetClient) GetX(ctx context.Context, id int) *DataSet
GetX is like Get, but panics if an error occurs.
func (*DataSetClient) Hooks ¶
func (c *DataSetClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DataSetClient) Query ¶
func (c *DataSetClient) Query() *DataSetQuery
Query returns a query builder for DataSet.
func (*DataSetClient) QueryBlock ¶
func (c *DataSetClient) QueryBlock(ds *DataSet) *ViewBlockQuery
QueryBlock queries the block edge of a DataSet.
func (*DataSetClient) Update ¶
func (c *DataSetClient) Update() *DataSetUpdate
Update returns an update builder for DataSet.
func (*DataSetClient) UpdateOne ¶
func (c *DataSetClient) UpdateOne(ds *DataSet) *DataSetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DataSetClient) UpdateOneID ¶
func (c *DataSetClient) UpdateOneID(id int) *DataSetUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DataSetClient) Use ¶
func (c *DataSetClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dataset.Hooks(f(g(h())))`.
type DataSetCreate ¶
type DataSetCreate struct {
// contains filtered or unexported fields
}
DataSetCreate is the builder for creating a DataSet entity.
func (*DataSetCreate) Mutation ¶
func (dsc *DataSetCreate) Mutation() *DataSetMutation
Mutation returns the DataSetMutation object of the builder.
func (*DataSetCreate) Save ¶
func (dsc *DataSetCreate) Save(ctx context.Context) (*DataSet, error)
Save creates the DataSet in the database.
func (*DataSetCreate) SaveX ¶
func (dsc *DataSetCreate) SaveX(ctx context.Context) *DataSet
SaveX calls Save and panics if Save returns an error.
func (*DataSetCreate) SetBlock ¶
func (dsc *DataSetCreate) SetBlock(v *ViewBlock) *DataSetCreate
SetBlock sets the "block" edge to the ViewBlock entity.
func (*DataSetCreate) SetBlockID ¶
func (dsc *DataSetCreate) SetBlockID(id int) *DataSetCreate
SetBlockID sets the "block" edge to the ViewBlock entity by ID.
func (*DataSetCreate) SetConfig ¶
func (dsc *DataSetCreate) SetConfig(s string) *DataSetCreate
SetConfig sets the "config" field.
func (*DataSetCreate) SetNillableBlockID ¶
func (dsc *DataSetCreate) SetNillableBlockID(id *int) *DataSetCreate
SetNillableBlockID sets the "block" edge to the ViewBlock entity by ID if the given value is not nil.
func (*DataSetCreate) SetTitle ¶
func (dsc *DataSetCreate) SetTitle(s string) *DataSetCreate
SetTitle sets the "title" field.
func (*DataSetCreate) SetType ¶
func (dsc *DataSetCreate) SetType(s string) *DataSetCreate
SetType sets the "type" field.
type DataSetCreateBulk ¶
type DataSetCreateBulk struct {
// contains filtered or unexported fields
}
DataSetCreateBulk is the builder for creating many DataSet entities in bulk.
type DataSetDelete ¶
type DataSetDelete struct {
// contains filtered or unexported fields
}
DataSetDelete is the builder for deleting a DataSet entity.
func (*DataSetDelete) Exec ¶
func (dsd *DataSetDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DataSetDelete) ExecX ¶
func (dsd *DataSetDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DataSetDelete) Where ¶
func (dsd *DataSetDelete) Where(ps ...predicate.DataSet) *DataSetDelete
Where adds a new predicate to the DataSetDelete builder.
type DataSetDeleteOne ¶
type DataSetDeleteOne struct {
// contains filtered or unexported fields
}
DataSetDeleteOne is the builder for deleting a single DataSet entity.
func (*DataSetDeleteOne) Exec ¶
func (dsdo *DataSetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DataSetDeleteOne) ExecX ¶
func (dsdo *DataSetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DataSetEdges ¶
type DataSetEdges struct {
// Block holds the value of the block edge.
Block *ViewBlock `json:"block,omitempty"`
// contains filtered or unexported fields
}
DataSetEdges holds the relations/edges for other nodes in the graph.
func (DataSetEdges) BlockOrErr ¶
func (e DataSetEdges) BlockOrErr() (*ViewBlock, error)
BlockOrErr returns the Block value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DataSetGroupBy ¶
type DataSetGroupBy struct {
// contains filtered or unexported fields
}
DataSetGroupBy is the group-by builder for DataSet entities.
func (*DataSetGroupBy) Aggregate ¶
func (dsgb *DataSetGroupBy) Aggregate(fns ...AggregateFunc) *DataSetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DataSetGroupBy) Bool ¶
func (dsgb *DataSetGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DataSetGroupBy) BoolX ¶
func (dsgb *DataSetGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DataSetGroupBy) Bools ¶
func (dsgb *DataSetGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*DataSetGroupBy) BoolsX ¶
func (dsgb *DataSetGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DataSetGroupBy) Float64 ¶
func (dsgb *DataSetGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DataSetGroupBy) Float64X ¶
func (dsgb *DataSetGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DataSetGroupBy) Float64s ¶
func (dsgb *DataSetGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*DataSetGroupBy) Float64sX ¶
func (dsgb *DataSetGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DataSetGroupBy) Int ¶
func (dsgb *DataSetGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DataSetGroupBy) IntX ¶
func (dsgb *DataSetGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DataSetGroupBy) Ints ¶
func (dsgb *DataSetGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*DataSetGroupBy) IntsX ¶
func (dsgb *DataSetGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DataSetGroupBy) Scan ¶
func (dsgb *DataSetGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DataSetGroupBy) ScanX ¶
func (dsgb *DataSetGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DataSetGroupBy) String ¶
func (dsgb *DataSetGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DataSetGroupBy) StringX ¶
func (dsgb *DataSetGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DataSetMutation ¶
type DataSetMutation struct {
// contains filtered or unexported fields
}
DataSetMutation represents an operation that mutates the DataSet nodes in the graph.
func (*DataSetMutation) AddField ¶
func (m *DataSetMutation) 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 (*DataSetMutation) AddedEdges ¶
func (m *DataSetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DataSetMutation) AddedField ¶
func (m *DataSetMutation) 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 (*DataSetMutation) AddedFields ¶
func (m *DataSetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DataSetMutation) AddedIDs ¶
func (m *DataSetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DataSetMutation) BlockCleared ¶
func (m *DataSetMutation) BlockCleared() bool
BlockCleared reports if the "block" edge to the ViewBlock entity was cleared.
func (*DataSetMutation) BlockID ¶
func (m *DataSetMutation) BlockID() (id int, exists bool)
BlockID returns the "block" edge ID in the mutation.
func (*DataSetMutation) BlockIDs ¶
func (m *DataSetMutation) BlockIDs() (ids []int)
BlockIDs returns the "block" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BlockID instead. It exists only for internal usage by the builders.
func (*DataSetMutation) ClearBlock ¶
func (m *DataSetMutation) ClearBlock()
ClearBlock clears the "block" edge to the ViewBlock entity.
func (*DataSetMutation) ClearEdge ¶
func (m *DataSetMutation) 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 (*DataSetMutation) ClearField ¶
func (m *DataSetMutation) 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 (*DataSetMutation) ClearedEdges ¶
func (m *DataSetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DataSetMutation) ClearedFields ¶
func (m *DataSetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DataSetMutation) Client ¶
func (m DataSetMutation) 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 (*DataSetMutation) Config ¶
func (m *DataSetMutation) Config() (r string, exists bool)
Config returns the value of the "config" field in the mutation.
func (*DataSetMutation) EdgeCleared ¶
func (m *DataSetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DataSetMutation) Field ¶
func (m *DataSetMutation) 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 (*DataSetMutation) FieldCleared ¶
func (m *DataSetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DataSetMutation) Fields ¶
func (m *DataSetMutation) 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 (*DataSetMutation) GetType ¶
func (m *DataSetMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*DataSetMutation) ID ¶
func (m *DataSetMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*DataSetMutation) OldConfig ¶
func (m *DataSetMutation) OldConfig(ctx context.Context) (v string, err error)
OldConfig returns the old "config" field's value of the DataSet entity. If the DataSet 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 (*DataSetMutation) 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 (*DataSetMutation) OldTitle ¶
func (m *DataSetMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the DataSet entity. If the DataSet 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 (*DataSetMutation) OldType ¶
func (m *DataSetMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the DataSet entity. If the DataSet 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 (*DataSetMutation) RemovedEdges ¶
func (m *DataSetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DataSetMutation) RemovedIDs ¶
func (m *DataSetMutation) 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 (*DataSetMutation) ResetBlock ¶
func (m *DataSetMutation) ResetBlock()
ResetBlock resets all changes to the "block" edge.
func (*DataSetMutation) ResetConfig ¶
func (m *DataSetMutation) ResetConfig()
ResetConfig resets all changes to the "config" field.
func (*DataSetMutation) ResetEdge ¶
func (m *DataSetMutation) 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 (*DataSetMutation) ResetField ¶
func (m *DataSetMutation) 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 (*DataSetMutation) ResetTitle ¶
func (m *DataSetMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*DataSetMutation) ResetType ¶
func (m *DataSetMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*DataSetMutation) SetBlockID ¶
func (m *DataSetMutation) SetBlockID(id int)
SetBlockID sets the "block" edge to the ViewBlock entity by id.
func (*DataSetMutation) SetConfig ¶
func (m *DataSetMutation) SetConfig(s string)
SetConfig sets the "config" field.
func (*DataSetMutation) SetField ¶
func (m *DataSetMutation) 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 (*DataSetMutation) SetTitle ¶
func (m *DataSetMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*DataSetMutation) SetType ¶
func (m *DataSetMutation) SetType(s string)
SetType sets the "type" field.
func (*DataSetMutation) Title ¶
func (m *DataSetMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (DataSetMutation) Tx ¶
func (m DataSetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DataSetMutation) Type ¶
func (m *DataSetMutation) Type() string
Type returns the node type of this mutation (DataSet).
type DataSetQuery ¶
type DataSetQuery struct {
// contains filtered or unexported fields
}
DataSetQuery is the builder for querying DataSet entities.
func (*DataSetQuery) All ¶
func (dsq *DataSetQuery) All(ctx context.Context) ([]*DataSet, error)
All executes the query and returns a list of DataSets.
func (*DataSetQuery) AllX ¶
func (dsq *DataSetQuery) AllX(ctx context.Context) []*DataSet
AllX is like All, but panics if an error occurs.
func (*DataSetQuery) Clone ¶
func (dsq *DataSetQuery) Clone() *DataSetQuery
Clone returns a duplicate of the DataSetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DataSetQuery) Count ¶
func (dsq *DataSetQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DataSetQuery) CountX ¶
func (dsq *DataSetQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DataSetQuery) Exist ¶
func (dsq *DataSetQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DataSetQuery) ExistX ¶
func (dsq *DataSetQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DataSetQuery) First ¶
func (dsq *DataSetQuery) First(ctx context.Context) (*DataSet, error)
First returns the first DataSet entity from the query. Returns a *NotFoundError when no DataSet was found.
func (*DataSetQuery) FirstID ¶
func (dsq *DataSetQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DataSet ID from the query. Returns a *NotFoundError when no DataSet ID was found.
func (*DataSetQuery) FirstIDX ¶
func (dsq *DataSetQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DataSetQuery) FirstX ¶
func (dsq *DataSetQuery) FirstX(ctx context.Context) *DataSet
FirstX is like First, but panics if an error occurs.
func (*DataSetQuery) GroupBy ¶
func (dsq *DataSetQuery) GroupBy(field string, fields ...string) *DataSetGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Type string `json:"type,omitempty"`
Count int `json:"count,omitempty"`
}
client.DataSet.Query().
GroupBy(dataset.FieldType).
Aggregate(model.Count()).
Scan(ctx, &v)
func (*DataSetQuery) IDs ¶
func (dsq *DataSetQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of DataSet IDs.
func (*DataSetQuery) IDsX ¶
func (dsq *DataSetQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DataSetQuery) Limit ¶
func (dsq *DataSetQuery) Limit(limit int) *DataSetQuery
Limit adds a limit step to the query.
func (*DataSetQuery) Offset ¶
func (dsq *DataSetQuery) Offset(offset int) *DataSetQuery
Offset adds an offset step to the query.
func (*DataSetQuery) Only ¶
func (dsq *DataSetQuery) Only(ctx context.Context) (*DataSet, error)
Only returns a single DataSet entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one DataSet entity is not found. Returns a *NotFoundError when no DataSet entities are found.
func (*DataSetQuery) OnlyID ¶
func (dsq *DataSetQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DataSet ID in the query. Returns a *NotSingularError when exactly one DataSet ID is not found. Returns a *NotFoundError when no entities are found.
func (*DataSetQuery) OnlyIDX ¶
func (dsq *DataSetQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DataSetQuery) OnlyX ¶
func (dsq *DataSetQuery) OnlyX(ctx context.Context) *DataSet
OnlyX is like Only, but panics if an error occurs.
func (*DataSetQuery) Order ¶
func (dsq *DataSetQuery) Order(o ...OrderFunc) *DataSetQuery
Order adds an order step to the query.
func (*DataSetQuery) QueryBlock ¶
func (dsq *DataSetQuery) QueryBlock() *ViewBlockQuery
QueryBlock chains the current query on the "block" edge.
func (*DataSetQuery) Select ¶
func (dsq *DataSetQuery) Select(field string, fields ...string) *DataSetSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Type string `json:"type,omitempty"`
}
client.DataSet.Query().
Select(dataset.FieldType).
Scan(ctx, &v)
func (*DataSetQuery) Unique ¶
func (dsq *DataSetQuery) Unique(unique bool) *DataSetQuery
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 (*DataSetQuery) Where ¶
func (dsq *DataSetQuery) Where(ps ...predicate.DataSet) *DataSetQuery
Where adds a new predicate for the DataSetQuery builder.
func (*DataSetQuery) WithBlock ¶
func (dsq *DataSetQuery) WithBlock(opts ...func(*ViewBlockQuery)) *DataSetQuery
WithBlock tells the query-builder to eager-load the nodes that are connected to the "block" edge. The optional arguments are used to configure the query builder of the edge.
type DataSetSelect ¶
type DataSetSelect struct {
*DataSetQuery
// contains filtered or unexported fields
}
DataSetSelect is the builder for selecting fields of DataSet entities.
func (*DataSetSelect) Bool ¶
func (dss *DataSetSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DataSetSelect) BoolX ¶
func (dss *DataSetSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DataSetSelect) Bools ¶
func (dss *DataSetSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DataSetSelect) BoolsX ¶
func (dss *DataSetSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DataSetSelect) Float64 ¶
func (dss *DataSetSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DataSetSelect) Float64X ¶
func (dss *DataSetSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DataSetSelect) Float64s ¶
func (dss *DataSetSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DataSetSelect) Float64sX ¶
func (dss *DataSetSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DataSetSelect) Int ¶
func (dss *DataSetSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DataSetSelect) IntX ¶
func (dss *DataSetSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DataSetSelect) Ints ¶
func (dss *DataSetSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DataSetSelect) IntsX ¶
func (dss *DataSetSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DataSetSelect) Scan ¶
func (dss *DataSetSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DataSetSelect) ScanX ¶
func (dss *DataSetSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DataSetSelect) String ¶
func (dss *DataSetSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DataSetSelect) StringX ¶
func (dss *DataSetSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DataSetUpdate ¶
type DataSetUpdate struct {
// contains filtered or unexported fields
}
DataSetUpdate is the builder for updating DataSet entities.
func (*DataSetUpdate) ClearBlock ¶
func (dsu *DataSetUpdate) ClearBlock() *DataSetUpdate
ClearBlock clears the "block" edge to the ViewBlock entity.
func (*DataSetUpdate) Exec ¶
func (dsu *DataSetUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DataSetUpdate) ExecX ¶
func (dsu *DataSetUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataSetUpdate) Mutation ¶
func (dsu *DataSetUpdate) Mutation() *DataSetMutation
Mutation returns the DataSetMutation object of the builder.
func (*DataSetUpdate) Save ¶
func (dsu *DataSetUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DataSetUpdate) SaveX ¶
func (dsu *DataSetUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DataSetUpdate) SetBlock ¶
func (dsu *DataSetUpdate) SetBlock(v *ViewBlock) *DataSetUpdate
SetBlock sets the "block" edge to the ViewBlock entity.
func (*DataSetUpdate) SetBlockID ¶
func (dsu *DataSetUpdate) SetBlockID(id int) *DataSetUpdate
SetBlockID sets the "block" edge to the ViewBlock entity by ID.
func (*DataSetUpdate) SetConfig ¶
func (dsu *DataSetUpdate) SetConfig(s string) *DataSetUpdate
SetConfig sets the "config" field.
func (*DataSetUpdate) SetNillableBlockID ¶
func (dsu *DataSetUpdate) SetNillableBlockID(id *int) *DataSetUpdate
SetNillableBlockID sets the "block" edge to the ViewBlock entity by ID if the given value is not nil.
func (*DataSetUpdate) SetTitle ¶
func (dsu *DataSetUpdate) SetTitle(s string) *DataSetUpdate
SetTitle sets the "title" field.
func (*DataSetUpdate) SetType ¶
func (dsu *DataSetUpdate) SetType(s string) *DataSetUpdate
SetType sets the "type" field.
func (*DataSetUpdate) Where ¶
func (dsu *DataSetUpdate) Where(ps ...predicate.DataSet) *DataSetUpdate
Where adds a new predicate for the DataSetUpdate builder.
type DataSetUpdateOne ¶
type DataSetUpdateOne struct {
// contains filtered or unexported fields
}
DataSetUpdateOne is the builder for updating a single DataSet entity.
func (*DataSetUpdateOne) ClearBlock ¶
func (dsuo *DataSetUpdateOne) ClearBlock() *DataSetUpdateOne
ClearBlock clears the "block" edge to the ViewBlock entity.
func (*DataSetUpdateOne) Exec ¶
func (dsuo *DataSetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DataSetUpdateOne) ExecX ¶
func (dsuo *DataSetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataSetUpdateOne) Mutation ¶
func (dsuo *DataSetUpdateOne) Mutation() *DataSetMutation
Mutation returns the DataSetMutation object of the builder.
func (*DataSetUpdateOne) Save ¶
func (dsuo *DataSetUpdateOne) Save(ctx context.Context) (*DataSet, error)
Save executes the query and returns the updated DataSet entity.
func (*DataSetUpdateOne) SaveX ¶
func (dsuo *DataSetUpdateOne) SaveX(ctx context.Context) *DataSet
SaveX is like Save, but panics if an error occurs.
func (*DataSetUpdateOne) Select ¶
func (dsuo *DataSetUpdateOne) Select(field string, fields ...string) *DataSetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DataSetUpdateOne) SetBlock ¶
func (dsuo *DataSetUpdateOne) SetBlock(v *ViewBlock) *DataSetUpdateOne
SetBlock sets the "block" edge to the ViewBlock entity.
func (*DataSetUpdateOne) SetBlockID ¶
func (dsuo *DataSetUpdateOne) SetBlockID(id int) *DataSetUpdateOne
SetBlockID sets the "block" edge to the ViewBlock entity by ID.
func (*DataSetUpdateOne) SetConfig ¶
func (dsuo *DataSetUpdateOne) SetConfig(s string) *DataSetUpdateOne
SetConfig sets the "config" field.
func (*DataSetUpdateOne) SetNillableBlockID ¶
func (dsuo *DataSetUpdateOne) SetNillableBlockID(id *int) *DataSetUpdateOne
SetNillableBlockID sets the "block" edge to the ViewBlock entity by ID if the given value is not nil.
func (*DataSetUpdateOne) SetTitle ¶
func (dsuo *DataSetUpdateOne) SetTitle(s string) *DataSetUpdateOne
SetTitle sets the "title" field.
func (*DataSetUpdateOne) SetType ¶
func (dsuo *DataSetUpdateOne) SetType(s string) *DataSetUpdateOne
SetType sets the "type" field.
type Menu ¶
type Menu struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Title holds the value of the "title" field.
Title string `json:"title,omitempty"`
// URL holds the value of the "url" field.
URL string `json:"url,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the MenuQuery when eager-loading is set.
Edges MenuEdges `json:"edges"`
// contains filtered or unexported fields
}
Menu is the model entity for the Menu schema.
func (*Menu) QueryChildren ¶
QueryChildren queries the "children" edge of the Menu entity.
func (*Menu) QueryParent ¶
QueryParent queries the "parent" edge of the Menu entity.
func (*Menu) Unwrap ¶
Unwrap unwraps the Menu 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 (*Menu) Update ¶
func (m *Menu) Update() *MenuUpdateOne
Update returns a builder for updating this Menu. Note that you need to call Menu.Unwrap() before calling this method if this Menu was returned from a transaction, and the transaction was committed or rolled back.
type MenuApi ¶
type MenuApi struct {
*Api
Filter MenuApiFilter
SkipCreateAutoEdge bool
SkipUpdateAutoEdge bool
}
func NewMenuApi ¶
type MenuApiFilter ¶
type MenuApiFilter struct {
CreatePipe func(help *contact.GinHelp, createPipe *MenuCreate, edges MenuEdges)
CreateAfter func(help *contact.GinHelp, item *Menu, edges MenuEdges)
UpdatePipe func(help *contact.GinHelp, old *Menu, updatePipe *MenuUpdateOne, edges MenuEdges)
UpdateAfter func(help *contact.GinHelp, old *Menu, item *Menu, edges MenuEdges)
ListPipe func(help *contact.GinHelp, listPipe *MenuQuery)
ListData func(help *contact.GinHelp, items []*Menu) interface{}
DeleteBefore func(help *contact.GinHelp, item *Menu)
GetPipe func(help *contact.GinHelp, getPipe *MenuQuery)
GetData func(help *contact.GinHelp, item *Menu) *Menu
}
type MenuClient ¶
type MenuClient struct {
// contains filtered or unexported fields
}
MenuClient is a client for the Menu schema.
func NewMenuClient ¶
func NewMenuClient(c config) *MenuClient
NewMenuClient returns a client for the Menu from the given config.
func (*MenuClient) Create ¶
func (c *MenuClient) Create() *MenuCreate
Create returns a create builder for Menu.
func (*MenuClient) CreateBulk ¶
func (c *MenuClient) CreateBulk(builders ...*MenuCreate) *MenuCreateBulk
CreateBulk returns a builder for creating a bulk of Menu entities.
func (*MenuClient) Delete ¶
func (c *MenuClient) Delete() *MenuDelete
Delete returns a delete builder for Menu.
func (*MenuClient) DeleteOne ¶
func (c *MenuClient) DeleteOne(m *Menu) *MenuDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MenuClient) DeleteOneID ¶
func (c *MenuClient) DeleteOneID(id int) *MenuDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MenuClient) GetX ¶
func (c *MenuClient) GetX(ctx context.Context, id int) *Menu
GetX is like Get, but panics if an error occurs.
func (*MenuClient) Query ¶
func (c *MenuClient) Query() *MenuQuery
Query returns a query builder for Menu.
func (*MenuClient) QueryChildren ¶
func (c *MenuClient) QueryChildren(m *Menu) *MenuQuery
QueryChildren queries the children edge of a Menu.
func (*MenuClient) QueryParent ¶
func (c *MenuClient) QueryParent(m *Menu) *MenuQuery
QueryParent queries the parent edge of a Menu.
func (*MenuClient) Update ¶
func (c *MenuClient) Update() *MenuUpdate
Update returns an update builder for Menu.
func (*MenuClient) UpdateOne ¶
func (c *MenuClient) UpdateOne(m *Menu) *MenuUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MenuClient) UpdateOneID ¶
func (c *MenuClient) UpdateOneID(id int) *MenuUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MenuClient) Use ¶
func (c *MenuClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `menu.Hooks(f(g(h())))`.
type MenuCreate ¶
type MenuCreate struct {
// contains filtered or unexported fields
}
MenuCreate is the builder for creating a Menu entity.
func (*MenuCreate) AddChildIDs ¶
func (mc *MenuCreate) AddChildIDs(ids ...int) *MenuCreate
AddChildIDs adds the "children" edge to the Menu entity by IDs.
func (*MenuCreate) AddChildren ¶
func (mc *MenuCreate) AddChildren(m ...*Menu) *MenuCreate
AddChildren adds the "children" edges to the Menu entity.
func (*MenuCreate) Mutation ¶
func (mc *MenuCreate) Mutation() *MenuMutation
Mutation returns the MenuMutation object of the builder.
func (*MenuCreate) Save ¶
func (mc *MenuCreate) Save(ctx context.Context) (*Menu, error)
Save creates the Menu in the database.
func (*MenuCreate) SaveX ¶
func (mc *MenuCreate) SaveX(ctx context.Context) *Menu
SaveX calls Save and panics if Save returns an error.
func (*MenuCreate) SetCreatedAt ¶
func (mc *MenuCreate) SetCreatedAt(t time.Time) *MenuCreate
SetCreatedAt sets the "created_at" field.
func (*MenuCreate) SetNillableCreatedAt ¶
func (mc *MenuCreate) SetNillableCreatedAt(t *time.Time) *MenuCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MenuCreate) SetNillableParentID ¶
func (mc *MenuCreate) SetNillableParentID(id *int) *MenuCreate
SetNillableParentID sets the "parent" edge to the Menu entity by ID if the given value is not nil.
func (*MenuCreate) SetNillableUpdatedAt ¶
func (mc *MenuCreate) SetNillableUpdatedAt(t *time.Time) *MenuCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MenuCreate) SetParent ¶
func (mc *MenuCreate) SetParent(m *Menu) *MenuCreate
SetParent sets the "parent" edge to the Menu entity.
func (*MenuCreate) SetParentID ¶
func (mc *MenuCreate) SetParentID(id int) *MenuCreate
SetParentID sets the "parent" edge to the Menu entity by ID.
func (*MenuCreate) SetTitle ¶
func (mc *MenuCreate) SetTitle(s string) *MenuCreate
SetTitle sets the "title" field.
func (*MenuCreate) SetURL ¶
func (mc *MenuCreate) SetURL(s string) *MenuCreate
SetURL sets the "url" field.
func (*MenuCreate) SetUpdatedAt ¶
func (mc *MenuCreate) SetUpdatedAt(t time.Time) *MenuCreate
SetUpdatedAt sets the "updated_at" field.
type MenuCreateBulk ¶
type MenuCreateBulk struct {
// contains filtered or unexported fields
}
MenuCreateBulk is the builder for creating many Menu entities in bulk.
type MenuDelete ¶
type MenuDelete struct {
// contains filtered or unexported fields
}
MenuDelete is the builder for deleting a Menu entity.
func (*MenuDelete) Exec ¶
func (md *MenuDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MenuDelete) ExecX ¶
func (md *MenuDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MenuDelete) Where ¶
func (md *MenuDelete) Where(ps ...predicate.Menu) *MenuDelete
Where adds a new predicate to the MenuDelete builder.
type MenuDeleteOne ¶
type MenuDeleteOne struct {
// contains filtered or unexported fields
}
MenuDeleteOne is the builder for deleting a single Menu entity.
func (*MenuDeleteOne) Exec ¶
func (mdo *MenuDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MenuDeleteOne) ExecX ¶
func (mdo *MenuDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MenuEdges ¶
type MenuEdges struct {
// Parent holds the value of the parent edge.
Parent *Menu `json:"parent,omitempty"`
// Children holds the value of the children edge.
Children []*Menu `json:"children,omitempty"`
// contains filtered or unexported fields
}
MenuEdges holds the relations/edges for other nodes in the graph.
func (MenuEdges) ChildrenOrErr ¶
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (MenuEdges) ParentOrErr ¶
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MenuGroupBy ¶
type MenuGroupBy struct {
// contains filtered or unexported fields
}
MenuGroupBy is the group-by builder for Menu entities.
func (*MenuGroupBy) Aggregate ¶
func (mgb *MenuGroupBy) Aggregate(fns ...AggregateFunc) *MenuGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MenuGroupBy) Bool ¶
func (mgb *MenuGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MenuGroupBy) BoolX ¶
func (mgb *MenuGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MenuGroupBy) Bools ¶
func (mgb *MenuGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*MenuGroupBy) BoolsX ¶
func (mgb *MenuGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MenuGroupBy) Float64 ¶
func (mgb *MenuGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MenuGroupBy) Float64X ¶
func (mgb *MenuGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MenuGroupBy) Float64s ¶
func (mgb *MenuGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*MenuGroupBy) Float64sX ¶
func (mgb *MenuGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MenuGroupBy) Int ¶
func (mgb *MenuGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MenuGroupBy) IntX ¶
func (mgb *MenuGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MenuGroupBy) Ints ¶
func (mgb *MenuGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*MenuGroupBy) IntsX ¶
func (mgb *MenuGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MenuGroupBy) Scan ¶
func (mgb *MenuGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*MenuGroupBy) ScanX ¶
func (mgb *MenuGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MenuGroupBy) String ¶
func (mgb *MenuGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MenuGroupBy) StringX ¶
func (mgb *MenuGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MenuMutation ¶
type MenuMutation struct {
// contains filtered or unexported fields
}
MenuMutation represents an operation that mutates the Menu nodes in the graph.
func (*MenuMutation) AddChildIDs ¶
func (m *MenuMutation) AddChildIDs(ids ...int)
AddChildIDs adds the "children" edge to the Menu entity by ids.
func (*MenuMutation) AddField ¶
func (m *MenuMutation) 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 (*MenuMutation) AddedEdges ¶
func (m *MenuMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MenuMutation) AddedField ¶
func (m *MenuMutation) 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 (*MenuMutation) AddedFields ¶
func (m *MenuMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MenuMutation) AddedIDs ¶
func (m *MenuMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MenuMutation) ChildrenCleared ¶
func (m *MenuMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the Menu entity was cleared.
func (*MenuMutation) ChildrenIDs ¶
func (m *MenuMutation) ChildrenIDs() (ids []int)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*MenuMutation) ClearChildren ¶
func (m *MenuMutation) ClearChildren()
ClearChildren clears the "children" edge to the Menu entity.
func (*MenuMutation) ClearEdge ¶
func (m *MenuMutation) 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 (*MenuMutation) ClearField ¶
func (m *MenuMutation) 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 (*MenuMutation) ClearParent ¶
func (m *MenuMutation) ClearParent()
ClearParent clears the "parent" edge to the Menu entity.
func (*MenuMutation) ClearedEdges ¶
func (m *MenuMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MenuMutation) ClearedFields ¶
func (m *MenuMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MenuMutation) Client ¶
func (m MenuMutation) 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 (*MenuMutation) CreatedAt ¶
func (m *MenuMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MenuMutation) EdgeCleared ¶
func (m *MenuMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MenuMutation) Field ¶
func (m *MenuMutation) 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 (*MenuMutation) FieldCleared ¶
func (m *MenuMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MenuMutation) Fields ¶
func (m *MenuMutation) 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 (*MenuMutation) ID ¶
func (m *MenuMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*MenuMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Menu entity. If the Menu 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 (*MenuMutation) 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 (*MenuMutation) OldTitle ¶
func (m *MenuMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldURL ¶
func (m *MenuMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Menu entity. If the Menu 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 (*MenuMutation) ParentCleared ¶
func (m *MenuMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the Menu entity was cleared.
func (*MenuMutation) ParentID ¶
func (m *MenuMutation) ParentID() (id int, exists bool)
ParentID returns the "parent" edge ID in the mutation.
func (*MenuMutation) ParentIDs ¶
func (m *MenuMutation) ParentIDs() (ids []int)
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 (*MenuMutation) RemoveChildIDs ¶
func (m *MenuMutation) RemoveChildIDs(ids ...int)
RemoveChildIDs removes the "children" edge to the Menu entity by IDs.
func (*MenuMutation) RemovedChildrenIDs ¶
func (m *MenuMutation) RemovedChildrenIDs() (ids []int)
RemovedChildren returns the removed IDs of the "children" edge to the Menu entity.
func (*MenuMutation) RemovedEdges ¶
func (m *MenuMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MenuMutation) RemovedIDs ¶
func (m *MenuMutation) 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 (*MenuMutation) ResetChildren ¶
func (m *MenuMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*MenuMutation) ResetCreatedAt ¶
func (m *MenuMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MenuMutation) ResetEdge ¶
func (m *MenuMutation) 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 (*MenuMutation) ResetField ¶
func (m *MenuMutation) 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 (*MenuMutation) ResetParent ¶
func (m *MenuMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*MenuMutation) ResetTitle ¶
func (m *MenuMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*MenuMutation) ResetURL ¶
func (m *MenuMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*MenuMutation) ResetUpdatedAt ¶
func (m *MenuMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MenuMutation) SetCreatedAt ¶
func (m *MenuMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MenuMutation) SetField ¶
func (m *MenuMutation) 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 (*MenuMutation) SetParentID ¶
func (m *MenuMutation) SetParentID(id int)
SetParentID sets the "parent" edge to the Menu entity by id.
func (*MenuMutation) SetTitle ¶
func (m *MenuMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*MenuMutation) SetUpdatedAt ¶
func (m *MenuMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MenuMutation) Title ¶
func (m *MenuMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (MenuMutation) Tx ¶
func (m MenuMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MenuMutation) Type ¶
func (m *MenuMutation) Type() string
Type returns the node type of this mutation (Menu).
func (*MenuMutation) URL ¶
func (m *MenuMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
type MenuQuery ¶
type MenuQuery struct {
// contains filtered or unexported fields
}
MenuQuery is the builder for querying Menu entities.
func (*MenuQuery) Clone ¶
Clone returns a duplicate of the MenuQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MenuQuery) First ¶
First returns the first Menu entity from the query. Returns a *NotFoundError when no Menu was found.
func (*MenuQuery) FirstID ¶
FirstID returns the first Menu ID from the query. Returns a *NotFoundError when no Menu ID was found.
func (*MenuQuery) GroupBy ¶
func (mq *MenuQuery) GroupBy(field string, fields ...string) *MenuGroupBy
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 {
Title string `json:"title,omitempty"`
Count int `json:"count,omitempty"`
}
client.Menu.Query().
GroupBy(menu.FieldTitle).
Aggregate(model.Count()).
Scan(ctx, &v)
func (*MenuQuery) Only ¶
Only returns a single Menu entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Menu entity is not found. Returns a *NotFoundError when no Menu entities are found.
func (*MenuQuery) OnlyID ¶
OnlyID is like Only, but returns the only Menu ID in the query. Returns a *NotSingularError when exactly one Menu ID is not found. Returns a *NotFoundError when no entities are found.
func (*MenuQuery) QueryChildren ¶
QueryChildren chains the current query on the "children" edge.
func (*MenuQuery) QueryParent ¶
QueryParent chains the current query on the "parent" edge.
func (*MenuQuery) Select ¶
func (mq *MenuQuery) Select(field string, fields ...string) *MenuSelect
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 {
Title string `json:"title,omitempty"`
}
client.Menu.Query().
Select(menu.FieldTitle).
Scan(ctx, &v)
func (*MenuQuery) 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 (*MenuQuery) 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 (*MenuQuery) 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.
type MenuSelect ¶
type MenuSelect struct {
*MenuQuery
// contains filtered or unexported fields
}
MenuSelect is the builder for selecting fields of Menu entities.
func (*MenuSelect) Bool ¶
func (ms *MenuSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MenuSelect) BoolX ¶
func (ms *MenuSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MenuSelect) Bools ¶
func (ms *MenuSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MenuSelect) BoolsX ¶
func (ms *MenuSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MenuSelect) Float64 ¶
func (ms *MenuSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MenuSelect) Float64X ¶
func (ms *MenuSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MenuSelect) Float64s ¶
func (ms *MenuSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MenuSelect) Float64sX ¶
func (ms *MenuSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MenuSelect) Int ¶
func (ms *MenuSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MenuSelect) IntX ¶
func (ms *MenuSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MenuSelect) Ints ¶
func (ms *MenuSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MenuSelect) IntsX ¶
func (ms *MenuSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MenuSelect) Scan ¶
func (ms *MenuSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*MenuSelect) ScanX ¶
func (ms *MenuSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MenuSelect) String ¶
func (ms *MenuSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MenuSelect) StringX ¶
func (ms *MenuSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MenuUpdate ¶
type MenuUpdate struct {
// contains filtered or unexported fields
}
MenuUpdate is the builder for updating Menu entities.
func (*MenuUpdate) AddChildIDs ¶
func (mu *MenuUpdate) AddChildIDs(ids ...int) *MenuUpdate
AddChildIDs adds the "children" edge to the Menu entity by IDs.
func (*MenuUpdate) AddChildren ¶
func (mu *MenuUpdate) AddChildren(m ...*Menu) *MenuUpdate
AddChildren adds the "children" edges to the Menu entity.
func (*MenuUpdate) ClearChildren ¶
func (mu *MenuUpdate) ClearChildren() *MenuUpdate
ClearChildren clears all "children" edges to the Menu entity.
func (*MenuUpdate) ClearParent ¶
func (mu *MenuUpdate) ClearParent() *MenuUpdate
ClearParent clears the "parent" edge to the Menu entity.
func (*MenuUpdate) Exec ¶
func (mu *MenuUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MenuUpdate) ExecX ¶
func (mu *MenuUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuUpdate) Mutation ¶
func (mu *MenuUpdate) Mutation() *MenuMutation
Mutation returns the MenuMutation object of the builder.
func (*MenuUpdate) RemoveChildIDs ¶
func (mu *MenuUpdate) RemoveChildIDs(ids ...int) *MenuUpdate
RemoveChildIDs removes the "children" edge to Menu entities by IDs.
func (*MenuUpdate) RemoveChildren ¶
func (mu *MenuUpdate) RemoveChildren(m ...*Menu) *MenuUpdate
RemoveChildren removes "children" edges to Menu entities.
func (*MenuUpdate) Save ¶
func (mu *MenuUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MenuUpdate) SaveX ¶
func (mu *MenuUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MenuUpdate) SetCreatedAt ¶
func (mu *MenuUpdate) SetCreatedAt(t time.Time) *MenuUpdate
SetCreatedAt sets the "created_at" field.
func (*MenuUpdate) SetNillableCreatedAt ¶
func (mu *MenuUpdate) SetNillableCreatedAt(t *time.Time) *MenuUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MenuUpdate) SetNillableParentID ¶
func (mu *MenuUpdate) SetNillableParentID(id *int) *MenuUpdate
SetNillableParentID sets the "parent" edge to the Menu entity by ID if the given value is not nil.
func (*MenuUpdate) SetParent ¶
func (mu *MenuUpdate) SetParent(m *Menu) *MenuUpdate
SetParent sets the "parent" edge to the Menu entity.
func (*MenuUpdate) SetParentID ¶
func (mu *MenuUpdate) SetParentID(id int) *MenuUpdate
SetParentID sets the "parent" edge to the Menu entity by ID.
func (*MenuUpdate) SetTitle ¶
func (mu *MenuUpdate) SetTitle(s string) *MenuUpdate
SetTitle sets the "title" field.
func (*MenuUpdate) SetURL ¶
func (mu *MenuUpdate) SetURL(s string) *MenuUpdate
SetURL sets the "url" field.
func (*MenuUpdate) SetUpdatedAt ¶
func (mu *MenuUpdate) SetUpdatedAt(t time.Time) *MenuUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MenuUpdate) Where ¶
func (mu *MenuUpdate) Where(ps ...predicate.Menu) *MenuUpdate
Where adds a new predicate for the MenuUpdate builder.
type MenuUpdateOne ¶
type MenuUpdateOne struct {
// contains filtered or unexported fields
}
MenuUpdateOne is the builder for updating a single Menu entity.
func (*MenuUpdateOne) AddChildIDs ¶
func (muo *MenuUpdateOne) AddChildIDs(ids ...int) *MenuUpdateOne
AddChildIDs adds the "children" edge to the Menu entity by IDs.
func (*MenuUpdateOne) AddChildren ¶
func (muo *MenuUpdateOne) AddChildren(m ...*Menu) *MenuUpdateOne
AddChildren adds the "children" edges to the Menu entity.
func (*MenuUpdateOne) ClearChildren ¶
func (muo *MenuUpdateOne) ClearChildren() *MenuUpdateOne
ClearChildren clears all "children" edges to the Menu entity.
func (*MenuUpdateOne) ClearParent ¶
func (muo *MenuUpdateOne) ClearParent() *MenuUpdateOne
ClearParent clears the "parent" edge to the Menu entity.
func (*MenuUpdateOne) Exec ¶
func (muo *MenuUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MenuUpdateOne) ExecX ¶
func (muo *MenuUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuUpdateOne) Mutation ¶
func (muo *MenuUpdateOne) Mutation() *MenuMutation
Mutation returns the MenuMutation object of the builder.
func (*MenuUpdateOne) RemoveChildIDs ¶
func (muo *MenuUpdateOne) RemoveChildIDs(ids ...int) *MenuUpdateOne
RemoveChildIDs removes the "children" edge to Menu entities by IDs.
func (*MenuUpdateOne) RemoveChildren ¶
func (muo *MenuUpdateOne) RemoveChildren(m ...*Menu) *MenuUpdateOne
RemoveChildren removes "children" edges to Menu entities.
func (*MenuUpdateOne) Save ¶
func (muo *MenuUpdateOne) Save(ctx context.Context) (*Menu, error)
Save executes the query and returns the updated Menu entity.
func (*MenuUpdateOne) SaveX ¶
func (muo *MenuUpdateOne) SaveX(ctx context.Context) *Menu
SaveX is like Save, but panics if an error occurs.
func (*MenuUpdateOne) Select ¶
func (muo *MenuUpdateOne) Select(field string, fields ...string) *MenuUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MenuUpdateOne) SetCreatedAt ¶
func (muo *MenuUpdateOne) SetCreatedAt(t time.Time) *MenuUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MenuUpdateOne) SetNillableCreatedAt ¶
func (muo *MenuUpdateOne) SetNillableCreatedAt(t *time.Time) *MenuUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableParentID ¶
func (muo *MenuUpdateOne) SetNillableParentID(id *int) *MenuUpdateOne
SetNillableParentID sets the "parent" edge to the Menu entity by ID if the given value is not nil.
func (*MenuUpdateOne) SetParent ¶
func (muo *MenuUpdateOne) SetParent(m *Menu) *MenuUpdateOne
SetParent sets the "parent" edge to the Menu entity.
func (*MenuUpdateOne) SetParentID ¶
func (muo *MenuUpdateOne) SetParentID(id int) *MenuUpdateOne
SetParentID sets the "parent" edge to the Menu entity by ID.
func (*MenuUpdateOne) SetTitle ¶
func (muo *MenuUpdateOne) SetTitle(s string) *MenuUpdateOne
SetTitle sets the "title" field.
func (*MenuUpdateOne) SetURL ¶
func (muo *MenuUpdateOne) SetURL(s string) *MenuUpdateOne
SetURL sets the "url" field.
func (*MenuUpdateOne) SetUpdatedAt ¶
func (muo *MenuUpdateOne) SetUpdatedAt(t time.Time) *MenuUpdateOne
SetUpdatedAt sets the "updated_at" field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollbacker method.
type Share ¶
type Share struct {
ID int `json:"id,omitempty"`
EndAt time.Time `json:"end_at,omitempty"`
// The values are being populated by the ShareQuery when eager-loading is set.
Edges ShareEdges `json:"edges"`
// contains filtered or unexported fields
}
Share is the model entity for the Share schema.
func (*Share) QueryCreator ¶
QueryCreator queries the "creator" edge of the Share entity.
func (*Share) Unwrap ¶
Unwrap unwraps the Share 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 (*Share) Update ¶
func (s *Share) Update() *ShareUpdateOne
Update returns a builder for updating this Share. Note that you need to call Share.Unwrap() before calling this method if this Share was returned from a transaction, and the transaction was committed or rolled back.
type ShareApiFilter ¶
type ShareApiFilter struct {
}
type ShareClient ¶
type ShareClient struct {
// contains filtered or unexported fields
}
ShareClient is a client for the Share schema.
func NewShareClient ¶
func NewShareClient(c config) *ShareClient
NewShareClient returns a client for the Share from the given config.
func (*ShareClient) Create ¶
func (c *ShareClient) Create() *ShareCreate
Create returns a create builder for Share.
func (*ShareClient) CreateBulk ¶
func (c *ShareClient) CreateBulk(builders ...*ShareCreate) *ShareCreateBulk
CreateBulk returns a builder for creating a bulk of Share entities.
func (*ShareClient) Delete ¶
func (c *ShareClient) Delete() *ShareDelete
Delete returns a delete builder for Share.
func (*ShareClient) DeleteOne ¶
func (c *ShareClient) DeleteOne(s *Share) *ShareDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ShareClient) DeleteOneID ¶
func (c *ShareClient) DeleteOneID(id int) *ShareDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ShareClient) GetX ¶
func (c *ShareClient) GetX(ctx context.Context, id int) *Share
GetX is like Get, but panics if an error occurs.
func (*ShareClient) Query ¶
func (c *ShareClient) Query() *ShareQuery
Query returns a query builder for Share.
func (*ShareClient) QueryCreator ¶
func (c *ShareClient) QueryCreator(s *Share) *UserQuery
QueryCreator queries the creator edge of a Share.
func (*ShareClient) QueryView ¶
func (c *ShareClient) QueryView(s *Share) *ViewQuery
QueryView queries the view edge of a Share.
func (*ShareClient) Update ¶
func (c *ShareClient) Update() *ShareUpdate
Update returns an update builder for Share.
func (*ShareClient) UpdateOne ¶
func (c *ShareClient) UpdateOne(s *Share) *ShareUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ShareClient) UpdateOneID ¶
func (c *ShareClient) UpdateOneID(id int) *ShareUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ShareClient) Use ¶
func (c *ShareClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `share.Hooks(f(g(h())))`.
type ShareCreate ¶
type ShareCreate struct {
// contains filtered or unexported fields
}
ShareCreate is the builder for creating a Share entity.
func (*ShareCreate) Mutation ¶
func (sc *ShareCreate) Mutation() *ShareMutation
Mutation returns the ShareMutation object of the builder.
func (*ShareCreate) Save ¶
func (sc *ShareCreate) Save(ctx context.Context) (*Share, error)
Save creates the Share in the database.
func (*ShareCreate) SaveX ¶
func (sc *ShareCreate) SaveX(ctx context.Context) *Share
SaveX calls Save and panics if Save returns an error.
func (*ShareCreate) SetCreator ¶
func (sc *ShareCreate) SetCreator(u *User) *ShareCreate
SetCreator sets the "creator" edge to the User entity.
func (*ShareCreate) SetCreatorID ¶
func (sc *ShareCreate) SetCreatorID(id int) *ShareCreate
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*ShareCreate) SetEndAt ¶
func (sc *ShareCreate) SetEndAt(t time.Time) *ShareCreate
SetEndAt sets the "end_at" field.
func (*ShareCreate) SetNillableCreatorID ¶
func (sc *ShareCreate) SetNillableCreatorID(id *int) *ShareCreate
SetNillableCreatorID sets the "creator" edge to the User entity by ID if the given value is not nil.
func (*ShareCreate) SetNillableViewID ¶
func (sc *ShareCreate) SetNillableViewID(id *int) *ShareCreate
SetNillableViewID sets the "view" edge to the View entity by ID if the given value is not nil.
func (*ShareCreate) SetView ¶
func (sc *ShareCreate) SetView(v *View) *ShareCreate
SetView sets the "view" edge to the View entity.
func (*ShareCreate) SetViewID ¶
func (sc *ShareCreate) SetViewID(id int) *ShareCreate
SetViewID sets the "view" edge to the View entity by ID.
type ShareCreateBulk ¶
type ShareCreateBulk struct {
// contains filtered or unexported fields
}
ShareCreateBulk is the builder for creating many Share entities in bulk.
type ShareDelete ¶
type ShareDelete struct {
// contains filtered or unexported fields
}
ShareDelete is the builder for deleting a Share entity.
func (*ShareDelete) Exec ¶
func (sd *ShareDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ShareDelete) ExecX ¶
func (sd *ShareDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ShareDelete) Where ¶
func (sd *ShareDelete) Where(ps ...predicate.Share) *ShareDelete
Where adds a new predicate to the ShareDelete builder.
type ShareDeleteOne ¶
type ShareDeleteOne struct {
// contains filtered or unexported fields
}
ShareDeleteOne is the builder for deleting a single Share entity.
func (*ShareDeleteOne) Exec ¶
func (sdo *ShareDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ShareDeleteOne) ExecX ¶
func (sdo *ShareDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ShareEdges ¶
type ShareEdges struct {
View *View `json:"view,omitempty"`
Creator *User `json:"creator,omitempty"`
// contains filtered or unexported fields
}
ShareEdges holds the relations/edges for other nodes in the graph.
func (ShareEdges) CreatorOrErr ¶
func (e ShareEdges) CreatorOrErr() (*User, error)
CreatorOrErr returns the Creator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ShareEdges) ViewOrErr ¶
func (e ShareEdges) ViewOrErr() (*View, error)
ViewOrErr returns the View value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ShareGroupBy ¶
type ShareGroupBy struct {
// contains filtered or unexported fields
}
ShareGroupBy is the group-by builder for Share entities.
func (*ShareGroupBy) Aggregate ¶
func (sgb *ShareGroupBy) Aggregate(fns ...AggregateFunc) *ShareGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ShareGroupBy) Bool ¶
func (sgb *ShareGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ShareGroupBy) BoolX ¶
func (sgb *ShareGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ShareGroupBy) Bools ¶
func (sgb *ShareGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*ShareGroupBy) BoolsX ¶
func (sgb *ShareGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ShareGroupBy) Float64 ¶
func (sgb *ShareGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ShareGroupBy) Float64X ¶
func (sgb *ShareGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ShareGroupBy) Float64s ¶
func (sgb *ShareGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*ShareGroupBy) Float64sX ¶
func (sgb *ShareGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ShareGroupBy) Int ¶
func (sgb *ShareGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ShareGroupBy) IntX ¶
func (sgb *ShareGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ShareGroupBy) Ints ¶
func (sgb *ShareGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*ShareGroupBy) IntsX ¶
func (sgb *ShareGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ShareGroupBy) Scan ¶
func (sgb *ShareGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ShareGroupBy) ScanX ¶
func (sgb *ShareGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ShareGroupBy) String ¶
func (sgb *ShareGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ShareGroupBy) StringX ¶
func (sgb *ShareGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ShareMutation ¶
type ShareMutation struct {
// contains filtered or unexported fields
}
ShareMutation represents an operation that mutates the Share nodes in the graph.
func (*ShareMutation) AddField ¶
func (m *ShareMutation) 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 (*ShareMutation) AddedEdges ¶
func (m *ShareMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ShareMutation) AddedField ¶
func (m *ShareMutation) 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 (*ShareMutation) AddedFields ¶
func (m *ShareMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ShareMutation) AddedIDs ¶
func (m *ShareMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ShareMutation) ClearCreator ¶
func (m *ShareMutation) ClearCreator()
ClearCreator clears the "creator" edge to the User entity.
func (*ShareMutation) ClearEdge ¶
func (m *ShareMutation) 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 (*ShareMutation) ClearField ¶
func (m *ShareMutation) 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 (*ShareMutation) ClearView ¶
func (m *ShareMutation) ClearView()
ClearView clears the "view" edge to the View entity.
func (*ShareMutation) ClearedEdges ¶
func (m *ShareMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ShareMutation) ClearedFields ¶
func (m *ShareMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ShareMutation) Client ¶
func (m ShareMutation) 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 (*ShareMutation) CreatorCleared ¶
func (m *ShareMutation) CreatorCleared() bool
CreatorCleared reports if the "creator" edge to the User entity was cleared.
func (*ShareMutation) CreatorID ¶
func (m *ShareMutation) CreatorID() (id int, exists bool)
CreatorID returns the "creator" edge ID in the mutation.
func (*ShareMutation) CreatorIDs ¶
func (m *ShareMutation) CreatorIDs() (ids []int)
CreatorIDs returns the "creator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatorID instead. It exists only for internal usage by the builders.
func (*ShareMutation) EdgeCleared ¶
func (m *ShareMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ShareMutation) EndAt ¶
func (m *ShareMutation) EndAt() (r time.Time, exists bool)
EndAt returns the value of the "end_at" field in the mutation.
func (*ShareMutation) Field ¶
func (m *ShareMutation) 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 (*ShareMutation) FieldCleared ¶
func (m *ShareMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ShareMutation) Fields ¶
func (m *ShareMutation) 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 (*ShareMutation) ID ¶
func (m *ShareMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*ShareMutation) OldEndAt ¶
OldEndAt returns the old "end_at" field's value of the Share entity. If the Share 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 (*ShareMutation) 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 (*ShareMutation) RemovedEdges ¶
func (m *ShareMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ShareMutation) RemovedIDs ¶
func (m *ShareMutation) 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 (*ShareMutation) ResetCreator ¶
func (m *ShareMutation) ResetCreator()
ResetCreator resets all changes to the "creator" edge.
func (*ShareMutation) ResetEdge ¶
func (m *ShareMutation) 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 (*ShareMutation) ResetEndAt ¶
func (m *ShareMutation) ResetEndAt()
ResetEndAt resets all changes to the "end_at" field.
func (*ShareMutation) ResetField ¶
func (m *ShareMutation) 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 (*ShareMutation) ResetView ¶
func (m *ShareMutation) ResetView()
ResetView resets all changes to the "view" edge.
func (*ShareMutation) SetCreatorID ¶
func (m *ShareMutation) SetCreatorID(id int)
SetCreatorID sets the "creator" edge to the User entity by id.
func (*ShareMutation) SetEndAt ¶
func (m *ShareMutation) SetEndAt(t time.Time)
SetEndAt sets the "end_at" field.
func (*ShareMutation) SetField ¶
func (m *ShareMutation) 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 (*ShareMutation) SetViewID ¶
func (m *ShareMutation) SetViewID(id int)
SetViewID sets the "view" edge to the View entity by id.
func (ShareMutation) Tx ¶
func (m ShareMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ShareMutation) Type ¶
func (m *ShareMutation) Type() string
Type returns the node type of this mutation (Share).
func (*ShareMutation) ViewCleared ¶
func (m *ShareMutation) ViewCleared() bool
ViewCleared reports if the "view" edge to the View entity was cleared.
func (*ShareMutation) ViewID ¶
func (m *ShareMutation) ViewID() (id int, exists bool)
ViewID returns the "view" edge ID in the mutation.
func (*ShareMutation) ViewIDs ¶
func (m *ShareMutation) ViewIDs() (ids []int)
ViewIDs returns the "view" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ViewID instead. It exists only for internal usage by the builders.
type ShareQuery ¶
type ShareQuery struct {
// contains filtered or unexported fields
}
ShareQuery is the builder for querying Share entities.
func (*ShareQuery) All ¶
func (sq *ShareQuery) All(ctx context.Context) ([]*Share, error)
All executes the query and returns a list of Shares.
func (*ShareQuery) AllX ¶
func (sq *ShareQuery) AllX(ctx context.Context) []*Share
AllX is like All, but panics if an error occurs.
func (*ShareQuery) Clone ¶
func (sq *ShareQuery) Clone() *ShareQuery
Clone returns a duplicate of the ShareQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ShareQuery) Count ¶
func (sq *ShareQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ShareQuery) CountX ¶
func (sq *ShareQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ShareQuery) Exist ¶
func (sq *ShareQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ShareQuery) ExistX ¶
func (sq *ShareQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ShareQuery) First ¶
func (sq *ShareQuery) First(ctx context.Context) (*Share, error)
First returns the first Share entity from the query. Returns a *NotFoundError when no Share was found.
func (*ShareQuery) FirstID ¶
func (sq *ShareQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Share ID from the query. Returns a *NotFoundError when no Share ID was found.
func (*ShareQuery) FirstIDX ¶
func (sq *ShareQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ShareQuery) FirstX ¶
func (sq *ShareQuery) FirstX(ctx context.Context) *Share
FirstX is like First, but panics if an error occurs.
func (*ShareQuery) GroupBy ¶
func (sq *ShareQuery) GroupBy(field string, fields ...string) *ShareGroupBy
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 {
EndAt time.Time `json:"end_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Share.Query().
GroupBy(share.FieldEndAt).
Aggregate(model.Count()).
Scan(ctx, &v)
func (*ShareQuery) IDs ¶
func (sq *ShareQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Share IDs.
func (*ShareQuery) IDsX ¶
func (sq *ShareQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ShareQuery) Limit ¶
func (sq *ShareQuery) Limit(limit int) *ShareQuery
Limit adds a limit step to the query.
func (*ShareQuery) Offset ¶
func (sq *ShareQuery) Offset(offset int) *ShareQuery
Offset adds an offset step to the query.
func (*ShareQuery) Only ¶
func (sq *ShareQuery) Only(ctx context.Context) (*Share, error)
Only returns a single Share entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Share entity is not found. Returns a *NotFoundError when no Share entities are found.
func (*ShareQuery) OnlyID ¶
func (sq *ShareQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Share ID in the query. Returns a *NotSingularError when exactly one Share ID is not found. Returns a *NotFoundError when no entities are found.
func (*ShareQuery) OnlyIDX ¶
func (sq *ShareQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ShareQuery) OnlyX ¶
func (sq *ShareQuery) OnlyX(ctx context.Context) *Share
OnlyX is like Only, but panics if an error occurs.
func (*ShareQuery) Order ¶
func (sq *ShareQuery) Order(o ...OrderFunc) *ShareQuery
Order adds an order step to the query.
func (*ShareQuery) QueryCreator ¶
func (sq *ShareQuery) QueryCreator() *UserQuery
QueryCreator chains the current query on the "creator" edge.
func (*ShareQuery) QueryView ¶
func (sq *ShareQuery) QueryView() *ViewQuery
QueryView chains the current query on the "view" edge.
func (*ShareQuery) Select ¶
func (sq *ShareQuery) Select(field string, fields ...string) *ShareSelect
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 {
EndAt time.Time `json:"end_at,omitempty"`
}
client.Share.Query().
Select(share.FieldEndAt).
Scan(ctx, &v)
func (*ShareQuery) Unique ¶
func (sq *ShareQuery) Unique(unique bool) *ShareQuery
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 (*ShareQuery) Where ¶
func (sq *ShareQuery) Where(ps ...predicate.Share) *ShareQuery
Where adds a new predicate for the ShareQuery builder.
func (*ShareQuery) WithCreator ¶
func (sq *ShareQuery) WithCreator(opts ...func(*UserQuery)) *ShareQuery
WithCreator tells the query-builder to eager-load the nodes that are connected to the "creator" edge. The optional arguments are used to configure the query builder of the edge.
func (*ShareQuery) WithView ¶
func (sq *ShareQuery) WithView(opts ...func(*ViewQuery)) *ShareQuery
WithView tells the query-builder to eager-load the nodes that are connected to the "view" edge. The optional arguments are used to configure the query builder of the edge.
type ShareSelect ¶
type ShareSelect struct {
// contains filtered or unexported fields
}
ShareSelect is the builder for selecting fields of Share entities.
func (*ShareSelect) Bool ¶
func (ss *ShareSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShareSelect) BoolX ¶
func (ss *ShareSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ShareSelect) Bools ¶
func (ss *ShareSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShareSelect) BoolsX ¶
func (ss *ShareSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ShareSelect) Float64 ¶
func (ss *ShareSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShareSelect) Float64X ¶
func (ss *ShareSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ShareSelect) Float64s ¶
func (ss *ShareSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShareSelect) Float64sX ¶
func (ss *ShareSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ShareSelect) Int ¶
func (ss *ShareSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShareSelect) IntX ¶
func (ss *ShareSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ShareSelect) Ints ¶
func (ss *ShareSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShareSelect) IntsX ¶
func (ss *ShareSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ShareSelect) Scan ¶
func (ss *ShareSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ShareSelect) ScanX ¶
func (ss *ShareSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ShareSelect) String ¶
func (ss *ShareSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ShareSelect) StringX ¶
func (ss *ShareSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ShareUpdate ¶
type ShareUpdate struct {
// contains filtered or unexported fields
}
ShareUpdate is the builder for updating Share entities.
func (*ShareUpdate) ClearCreator ¶
func (su *ShareUpdate) ClearCreator() *ShareUpdate
ClearCreator clears the "creator" edge to the User entity.
func (*ShareUpdate) ClearView ¶
func (su *ShareUpdate) ClearView() *ShareUpdate
ClearView clears the "view" edge to the View entity.
func (*ShareUpdate) Exec ¶
func (su *ShareUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShareUpdate) ExecX ¶
func (su *ShareUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShareUpdate) Mutation ¶
func (su *ShareUpdate) Mutation() *ShareMutation
Mutation returns the ShareMutation object of the builder.
func (*ShareUpdate) Save ¶
func (su *ShareUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ShareUpdate) SaveX ¶
func (su *ShareUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ShareUpdate) SetCreator ¶
func (su *ShareUpdate) SetCreator(u *User) *ShareUpdate
SetCreator sets the "creator" edge to the User entity.
func (*ShareUpdate) SetCreatorID ¶
func (su *ShareUpdate) SetCreatorID(id int) *ShareUpdate
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*ShareUpdate) SetEndAt ¶
func (su *ShareUpdate) SetEndAt(t time.Time) *ShareUpdate
SetEndAt sets the "end_at" field.
func (*ShareUpdate) SetNillableCreatorID ¶
func (su *ShareUpdate) SetNillableCreatorID(id *int) *ShareUpdate
SetNillableCreatorID sets the "creator" edge to the User entity by ID if the given value is not nil.
func (*ShareUpdate) SetNillableViewID ¶
func (su *ShareUpdate) SetNillableViewID(id *int) *ShareUpdate
SetNillableViewID sets the "view" edge to the View entity by ID if the given value is not nil.
func (*ShareUpdate) SetView ¶
func (su *ShareUpdate) SetView(v *View) *ShareUpdate
SetView sets the "view" edge to the View entity.
func (*ShareUpdate) SetViewID ¶
func (su *ShareUpdate) SetViewID(id int) *ShareUpdate
SetViewID sets the "view" edge to the View entity by ID.
func (*ShareUpdate) Where ¶
func (su *ShareUpdate) Where(ps ...predicate.Share) *ShareUpdate
Where adds a new predicate for the ShareUpdate builder.
type ShareUpdateOne ¶
type ShareUpdateOne struct {
// contains filtered or unexported fields
}
ShareUpdateOne is the builder for updating a single Share entity.
func (*ShareUpdateOne) ClearCreator ¶
func (suo *ShareUpdateOne) ClearCreator() *ShareUpdateOne
ClearCreator clears the "creator" edge to the User entity.
func (*ShareUpdateOne) ClearView ¶
func (suo *ShareUpdateOne) ClearView() *ShareUpdateOne
ClearView clears the "view" edge to the View entity.
func (*ShareUpdateOne) Exec ¶
func (suo *ShareUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ShareUpdateOne) ExecX ¶
func (suo *ShareUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShareUpdateOne) Mutation ¶
func (suo *ShareUpdateOne) Mutation() *ShareMutation
Mutation returns the ShareMutation object of the builder.
func (*ShareUpdateOne) Save ¶
func (suo *ShareUpdateOne) Save(ctx context.Context) (*Share, error)
Save executes the query and returns the updated Share entity.
func (*ShareUpdateOne) SaveX ¶
func (suo *ShareUpdateOne) SaveX(ctx context.Context) *Share
SaveX is like Save, but panics if an error occurs.
func (*ShareUpdateOne) Select ¶
func (suo *ShareUpdateOne) Select(field string, fields ...string) *ShareUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ShareUpdateOne) SetCreator ¶
func (suo *ShareUpdateOne) SetCreator(u *User) *ShareUpdateOne
SetCreator sets the "creator" edge to the User entity.
func (*ShareUpdateOne) SetCreatorID ¶
func (suo *ShareUpdateOne) SetCreatorID(id int) *ShareUpdateOne
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*ShareUpdateOne) SetEndAt ¶
func (suo *ShareUpdateOne) SetEndAt(t time.Time) *ShareUpdateOne
SetEndAt sets the "end_at" field.
func (*ShareUpdateOne) SetNillableCreatorID ¶
func (suo *ShareUpdateOne) SetNillableCreatorID(id *int) *ShareUpdateOne
SetNillableCreatorID sets the "creator" edge to the User entity by ID if the given value is not nil.
func (*ShareUpdateOne) SetNillableViewID ¶
func (suo *ShareUpdateOne) SetNillableViewID(id *int) *ShareUpdateOne
SetNillableViewID sets the "view" edge to the View entity by ID if the given value is not nil.
func (*ShareUpdateOne) SetView ¶
func (suo *ShareUpdateOne) SetView(v *View) *ShareUpdateOne
SetView sets the "view" edge to the View entity.
func (*ShareUpdateOne) SetViewID ¶
func (suo *ShareUpdateOne) SetViewID(id int) *ShareUpdateOne
SetViewID sets the "view" edge to the View entity by ID.
type Tx ¶
type Tx struct {
// Assets is the client for interacting with the Assets builders.
Assets *AssetsClient
// DataSet is the client for interacting with the DataSet builders.
DataSet *DataSetClient
// Menu is the client for interacting with the Menu builders.
Menu *MenuClient
Share *ShareClient
// TypeConfig is the client for interacting with the TypeConfig builders.
TypeConfig *TypeConfigClient
// User is the client for interacting with the User builders.
User *UserClient
// View is the client for interacting with the View builders.
View *ViewClient
// ViewBlock is the client for interacting with the ViewBlock builders.
ViewBlock *ViewBlockClient
// 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 TypeConfig ¶
type TypeConfig struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// Title holds the value of the "title" field.
Title string `json:"title,omitempty"`
// Config holds the value of the "config" field.
Config string `json:"config,omitempty"`
// contains filtered or unexported fields
}
TypeConfig is the model entity for the TypeConfig schema.
func (*TypeConfig) String ¶
func (tc *TypeConfig) String() string
String implements the fmt.Stringer.
func (*TypeConfig) Unwrap ¶
func (tc *TypeConfig) Unwrap() *TypeConfig
Unwrap unwraps the TypeConfig 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 (*TypeConfig) Update ¶
func (tc *TypeConfig) Update() *TypeConfigUpdateOne
Update returns a builder for updating this TypeConfig. Note that you need to call TypeConfig.Unwrap() before calling this method if this TypeConfig was returned from a transaction, and the transaction was committed or rolled back.
type TypeConfigApi ¶
type TypeConfigApi struct {
*Api
Filter TypeConfigApiFilter
SkipCreateAutoEdge bool
SkipUpdateAutoEdge bool
}
func NewTypeConfigApi ¶
func NewTypeConfigApi(client *Client, opt *ApiOption) *TypeConfigApi
func (*TypeConfigApi) Create ¶
func (c *TypeConfigApi) Create(help *contact.GinHelp)
func (*TypeConfigApi) Delete ¶
func (c *TypeConfigApi) Delete(help *contact.GinHelp)
func (*TypeConfigApi) Get ¶
func (c *TypeConfigApi) Get(help *contact.GinHelp)
func (*TypeConfigApi) List ¶
func (c *TypeConfigApi) List(help *contact.GinHelp)
func (*TypeConfigApi) Update ¶
func (c *TypeConfigApi) Update(help *contact.GinHelp)
type TypeConfigApiFilter ¶
type TypeConfigApiFilter struct {
CreatePipe func(help *contact.GinHelp, createPipe *TypeConfigCreate)
CreateAfter func(help *contact.GinHelp, item *TypeConfig)
UpdatePipe func(help *contact.GinHelp, old *TypeConfig, updatePipe *TypeConfigUpdateOne)
UpdateAfter func(help *contact.GinHelp, old *TypeConfig, item *TypeConfig)
ListPipe func(help *contact.GinHelp, listPipe *TypeConfigQuery)
ListData func(help *contact.GinHelp, items []*TypeConfig) interface{}
DeleteBefore func(help *contact.GinHelp, item *TypeConfig)
GetPipe func(help *contact.GinHelp, getPipe *TypeConfigQuery)
GetData func(help *contact.GinHelp, item *TypeConfig) *TypeConfig
}
type TypeConfigClient ¶
type TypeConfigClient struct {
// contains filtered or unexported fields
}
TypeConfigClient is a client for the TypeConfig schema.
func NewTypeConfigClient ¶
func NewTypeConfigClient(c config) *TypeConfigClient
NewTypeConfigClient returns a client for the TypeConfig from the given config.
func (*TypeConfigClient) Create ¶
func (c *TypeConfigClient) Create() *TypeConfigCreate
Create returns a create builder for TypeConfig.
func (*TypeConfigClient) CreateBulk ¶
func (c *TypeConfigClient) CreateBulk(builders ...*TypeConfigCreate) *TypeConfigCreateBulk
CreateBulk returns a builder for creating a bulk of TypeConfig entities.
func (*TypeConfigClient) Delete ¶
func (c *TypeConfigClient) Delete() *TypeConfigDelete
Delete returns a delete builder for TypeConfig.
func (*TypeConfigClient) DeleteOne ¶
func (c *TypeConfigClient) DeleteOne(tc *TypeConfig) *TypeConfigDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*TypeConfigClient) DeleteOneID ¶
func (c *TypeConfigClient) DeleteOneID(id int) *TypeConfigDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*TypeConfigClient) Get ¶
func (c *TypeConfigClient) Get(ctx context.Context, id int) (*TypeConfig, error)
Get returns a TypeConfig entity by its id.
func (*TypeConfigClient) GetX ¶
func (c *TypeConfigClient) GetX(ctx context.Context, id int) *TypeConfig
GetX is like Get, but panics if an error occurs.
func (*TypeConfigClient) Hooks ¶
func (c *TypeConfigClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TypeConfigClient) Query ¶
func (c *TypeConfigClient) Query() *TypeConfigQuery
Query returns a query builder for TypeConfig.
func (*TypeConfigClient) Update ¶
func (c *TypeConfigClient) Update() *TypeConfigUpdate
Update returns an update builder for TypeConfig.
func (*TypeConfigClient) UpdateOne ¶
func (c *TypeConfigClient) UpdateOne(tc *TypeConfig) *TypeConfigUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TypeConfigClient) UpdateOneID ¶
func (c *TypeConfigClient) UpdateOneID(id int) *TypeConfigUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TypeConfigClient) Use ¶
func (c *TypeConfigClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `typeconfig.Hooks(f(g(h())))`.
type TypeConfigCreate ¶
type TypeConfigCreate struct {
// contains filtered or unexported fields
}
TypeConfigCreate is the builder for creating a TypeConfig entity.
func (*TypeConfigCreate) Mutation ¶
func (tcc *TypeConfigCreate) Mutation() *TypeConfigMutation
Mutation returns the TypeConfigMutation object of the builder.
func (*TypeConfigCreate) Save ¶
func (tcc *TypeConfigCreate) Save(ctx context.Context) (*TypeConfig, error)
Save creates the TypeConfig in the database.
func (*TypeConfigCreate) SaveX ¶
func (tcc *TypeConfigCreate) SaveX(ctx context.Context) *TypeConfig
SaveX calls Save and panics if Save returns an error.
func (*TypeConfigCreate) SetConfig ¶
func (tcc *TypeConfigCreate) SetConfig(s string) *TypeConfigCreate
SetConfig sets the "config" field.
func (*TypeConfigCreate) SetID ¶
func (tcc *TypeConfigCreate) SetID(i int) *TypeConfigCreate
SetID sets the "id" field.
func (*TypeConfigCreate) SetTitle ¶
func (tcc *TypeConfigCreate) SetTitle(s string) *TypeConfigCreate
SetTitle sets the "title" field.
func (*TypeConfigCreate) SetType ¶
func (tcc *TypeConfigCreate) SetType(s string) *TypeConfigCreate
SetType sets the "type" field.
type TypeConfigCreateBulk ¶
type TypeConfigCreateBulk struct {
// contains filtered or unexported fields
}
TypeConfigCreateBulk is the builder for creating many TypeConfig entities in bulk.
func (*TypeConfigCreateBulk) Save ¶
func (tccb *TypeConfigCreateBulk) Save(ctx context.Context) ([]*TypeConfig, error)
Save creates the TypeConfig entities in the database.
func (*TypeConfigCreateBulk) SaveX ¶
func (tccb *TypeConfigCreateBulk) SaveX(ctx context.Context) []*TypeConfig
SaveX is like Save, but panics if an error occurs.
type TypeConfigDelete ¶
type TypeConfigDelete struct {
// contains filtered or unexported fields
}
TypeConfigDelete is the builder for deleting a TypeConfig entity.
func (*TypeConfigDelete) Exec ¶
func (tcd *TypeConfigDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TypeConfigDelete) ExecX ¶
func (tcd *TypeConfigDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TypeConfigDelete) Where ¶
func (tcd *TypeConfigDelete) Where(ps ...predicate.TypeConfig) *TypeConfigDelete
Where adds a new predicate to the TypeConfigDelete builder.
type TypeConfigDeleteOne ¶
type TypeConfigDeleteOne struct {
// contains filtered or unexported fields
}
TypeConfigDeleteOne is the builder for deleting a single TypeConfig entity.
func (*TypeConfigDeleteOne) Exec ¶
func (tcdo *TypeConfigDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TypeConfigDeleteOne) ExecX ¶
func (tcdo *TypeConfigDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TypeConfigGroupBy ¶
type TypeConfigGroupBy struct {
// contains filtered or unexported fields
}
TypeConfigGroupBy is the group-by builder for TypeConfig entities.
func (*TypeConfigGroupBy) Aggregate ¶
func (tcgb *TypeConfigGroupBy) Aggregate(fns ...AggregateFunc) *TypeConfigGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TypeConfigGroupBy) Bool ¶
func (tcgb *TypeConfigGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TypeConfigGroupBy) BoolX ¶
func (tcgb *TypeConfigGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TypeConfigGroupBy) Bools ¶
func (tcgb *TypeConfigGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*TypeConfigGroupBy) BoolsX ¶
func (tcgb *TypeConfigGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TypeConfigGroupBy) Float64 ¶
func (tcgb *TypeConfigGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TypeConfigGroupBy) Float64X ¶
func (tcgb *TypeConfigGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TypeConfigGroupBy) Float64s ¶
func (tcgb *TypeConfigGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*TypeConfigGroupBy) Float64sX ¶
func (tcgb *TypeConfigGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TypeConfigGroupBy) Int ¶
func (tcgb *TypeConfigGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TypeConfigGroupBy) IntX ¶
func (tcgb *TypeConfigGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TypeConfigGroupBy) Ints ¶
func (tcgb *TypeConfigGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*TypeConfigGroupBy) IntsX ¶
func (tcgb *TypeConfigGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TypeConfigGroupBy) Scan ¶
func (tcgb *TypeConfigGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TypeConfigGroupBy) ScanX ¶
func (tcgb *TypeConfigGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TypeConfigGroupBy) String ¶
func (tcgb *TypeConfigGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TypeConfigGroupBy) StringX ¶
func (tcgb *TypeConfigGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TypeConfigMutation ¶
type TypeConfigMutation struct {
// contains filtered or unexported fields
}
TypeConfigMutation represents an operation that mutates the TypeConfig nodes in the graph.
func (*TypeConfigMutation) AddField ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) AddedEdges ¶
func (m *TypeConfigMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TypeConfigMutation) AddedField ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) AddedFields ¶
func (m *TypeConfigMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TypeConfigMutation) AddedIDs ¶
func (m *TypeConfigMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TypeConfigMutation) ClearEdge ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) ClearField ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) ClearedEdges ¶
func (m *TypeConfigMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TypeConfigMutation) ClearedFields ¶
func (m *TypeConfigMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TypeConfigMutation) Client ¶
func (m TypeConfigMutation) 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 (*TypeConfigMutation) Config ¶
func (m *TypeConfigMutation) Config() (r string, exists bool)
Config returns the value of the "config" field in the mutation.
func (*TypeConfigMutation) EdgeCleared ¶
func (m *TypeConfigMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TypeConfigMutation) Field ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) FieldCleared ¶
func (m *TypeConfigMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TypeConfigMutation) Fields ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) GetType ¶
func (m *TypeConfigMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*TypeConfigMutation) ID ¶
func (m *TypeConfigMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*TypeConfigMutation) OldConfig ¶
func (m *TypeConfigMutation) OldConfig(ctx context.Context) (v string, err error)
OldConfig returns the old "config" field's value of the TypeConfig entity. If the TypeConfig 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 (*TypeConfigMutation) 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 (*TypeConfigMutation) OldTitle ¶
func (m *TypeConfigMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the TypeConfig entity. If the TypeConfig 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 (*TypeConfigMutation) OldType ¶
func (m *TypeConfigMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the TypeConfig entity. If the TypeConfig 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 (*TypeConfigMutation) RemovedEdges ¶
func (m *TypeConfigMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TypeConfigMutation) RemovedIDs ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) ResetConfig ¶
func (m *TypeConfigMutation) ResetConfig()
ResetConfig resets all changes to the "config" field.
func (*TypeConfigMutation) ResetEdge ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) ResetField ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) ResetTitle ¶
func (m *TypeConfigMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*TypeConfigMutation) ResetType ¶
func (m *TypeConfigMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*TypeConfigMutation) SetConfig ¶
func (m *TypeConfigMutation) SetConfig(s string)
SetConfig sets the "config" field.
func (*TypeConfigMutation) SetField ¶
func (m *TypeConfigMutation) 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 (*TypeConfigMutation) SetID ¶
func (m *TypeConfigMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TypeConfig entities.
func (*TypeConfigMutation) SetTitle ¶
func (m *TypeConfigMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*TypeConfigMutation) SetType ¶
func (m *TypeConfigMutation) SetType(s string)
SetType sets the "type" field.
func (*TypeConfigMutation) Title ¶
func (m *TypeConfigMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (TypeConfigMutation) Tx ¶
func (m TypeConfigMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TypeConfigMutation) Type ¶
func (m *TypeConfigMutation) Type() string
Type returns the node type of this mutation (TypeConfig).
type TypeConfigQuery ¶
type TypeConfigQuery struct {
// contains filtered or unexported fields
}
TypeConfigQuery is the builder for querying TypeConfig entities.
func (*TypeConfigQuery) All ¶
func (tcq *TypeConfigQuery) All(ctx context.Context) ([]*TypeConfig, error)
All executes the query and returns a list of TypeConfigs.
func (*TypeConfigQuery) AllX ¶
func (tcq *TypeConfigQuery) AllX(ctx context.Context) []*TypeConfig
AllX is like All, but panics if an error occurs.
func (*TypeConfigQuery) Clone ¶
func (tcq *TypeConfigQuery) Clone() *TypeConfigQuery
Clone returns a duplicate of the TypeConfigQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TypeConfigQuery) Count ¶
func (tcq *TypeConfigQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TypeConfigQuery) CountX ¶
func (tcq *TypeConfigQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TypeConfigQuery) Exist ¶
func (tcq *TypeConfigQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TypeConfigQuery) ExistX ¶
func (tcq *TypeConfigQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TypeConfigQuery) First ¶
func (tcq *TypeConfigQuery) First(ctx context.Context) (*TypeConfig, error)
First returns the first TypeConfig entity from the query. Returns a *NotFoundError when no TypeConfig was found.
func (*TypeConfigQuery) FirstID ¶
func (tcq *TypeConfigQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TypeConfig ID from the query. Returns a *NotFoundError when no TypeConfig ID was found.
func (*TypeConfigQuery) FirstIDX ¶
func (tcq *TypeConfigQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TypeConfigQuery) FirstX ¶
func (tcq *TypeConfigQuery) FirstX(ctx context.Context) *TypeConfig
FirstX is like First, but panics if an error occurs.
func (*TypeConfigQuery) GroupBy ¶
func (tcq *TypeConfigQuery) GroupBy(field string, fields ...string) *TypeConfigGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Type string `json:"type,omitempty"`
Count int `json:"count,omitempty"`
}
client.TypeConfig.Query().
GroupBy(typeconfig.FieldType).
Aggregate(model.Count()).
Scan(ctx, &v)
func (*TypeConfigQuery) IDs ¶
func (tcq *TypeConfigQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of TypeConfig IDs.
func (*TypeConfigQuery) IDsX ¶
func (tcq *TypeConfigQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TypeConfigQuery) Limit ¶
func (tcq *TypeConfigQuery) Limit(limit int) *TypeConfigQuery
Limit adds a limit step to the query.
func (*TypeConfigQuery) Offset ¶
func (tcq *TypeConfigQuery) Offset(offset int) *TypeConfigQuery
Offset adds an offset step to the query.
func (*TypeConfigQuery) Only ¶
func (tcq *TypeConfigQuery) Only(ctx context.Context) (*TypeConfig, error)
Only returns a single TypeConfig entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one TypeConfig entity is not found. Returns a *NotFoundError when no TypeConfig entities are found.
func (*TypeConfigQuery) OnlyID ¶
func (tcq *TypeConfigQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TypeConfig ID in the query. Returns a *NotSingularError when exactly one TypeConfig ID is not found. Returns a *NotFoundError when no entities are found.
func (*TypeConfigQuery) OnlyIDX ¶
func (tcq *TypeConfigQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TypeConfigQuery) OnlyX ¶
func (tcq *TypeConfigQuery) OnlyX(ctx context.Context) *TypeConfig
OnlyX is like Only, but panics if an error occurs.
func (*TypeConfigQuery) Order ¶
func (tcq *TypeConfigQuery) Order(o ...OrderFunc) *TypeConfigQuery
Order adds an order step to the query.
func (*TypeConfigQuery) Select ¶
func (tcq *TypeConfigQuery) Select(field string, fields ...string) *TypeConfigSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Type string `json:"type,omitempty"`
}
client.TypeConfig.Query().
Select(typeconfig.FieldType).
Scan(ctx, &v)
func (*TypeConfigQuery) Unique ¶
func (tcq *TypeConfigQuery) Unique(unique bool) *TypeConfigQuery
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 (*TypeConfigQuery) Where ¶
func (tcq *TypeConfigQuery) Where(ps ...predicate.TypeConfig) *TypeConfigQuery
Where adds a new predicate for the TypeConfigQuery builder.
type TypeConfigSelect ¶
type TypeConfigSelect struct {
*TypeConfigQuery
// contains filtered or unexported fields
}
TypeConfigSelect is the builder for selecting fields of TypeConfig entities.
func (*TypeConfigSelect) Bool ¶
func (tcs *TypeConfigSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TypeConfigSelect) BoolX ¶
func (tcs *TypeConfigSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TypeConfigSelect) Bools ¶
func (tcs *TypeConfigSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TypeConfigSelect) BoolsX ¶
func (tcs *TypeConfigSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TypeConfigSelect) Float64 ¶
func (tcs *TypeConfigSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TypeConfigSelect) Float64X ¶
func (tcs *TypeConfigSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TypeConfigSelect) Float64s ¶
func (tcs *TypeConfigSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TypeConfigSelect) Float64sX ¶
func (tcs *TypeConfigSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TypeConfigSelect) Int ¶
func (tcs *TypeConfigSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TypeConfigSelect) IntX ¶
func (tcs *TypeConfigSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TypeConfigSelect) Ints ¶
func (tcs *TypeConfigSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TypeConfigSelect) IntsX ¶
func (tcs *TypeConfigSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TypeConfigSelect) Scan ¶
func (tcs *TypeConfigSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TypeConfigSelect) ScanX ¶
func (tcs *TypeConfigSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TypeConfigSelect) String ¶
func (tcs *TypeConfigSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*TypeConfigSelect) StringX ¶
func (tcs *TypeConfigSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TypeConfigUpdate ¶
type TypeConfigUpdate struct {
// contains filtered or unexported fields
}
TypeConfigUpdate is the builder for updating TypeConfig entities.
func (*TypeConfigUpdate) Exec ¶
func (tcu *TypeConfigUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TypeConfigUpdate) ExecX ¶
func (tcu *TypeConfigUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TypeConfigUpdate) Mutation ¶
func (tcu *TypeConfigUpdate) Mutation() *TypeConfigMutation
Mutation returns the TypeConfigMutation object of the builder.
func (*TypeConfigUpdate) Save ¶
func (tcu *TypeConfigUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TypeConfigUpdate) SaveX ¶
func (tcu *TypeConfigUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TypeConfigUpdate) SetConfig ¶
func (tcu *TypeConfigUpdate) SetConfig(s string) *TypeConfigUpdate
SetConfig sets the "config" field.
func (*TypeConfigUpdate) SetTitle ¶
func (tcu *TypeConfigUpdate) SetTitle(s string) *TypeConfigUpdate
SetTitle sets the "title" field.
func (*TypeConfigUpdate) SetType ¶
func (tcu *TypeConfigUpdate) SetType(s string) *TypeConfigUpdate
SetType sets the "type" field.
func (*TypeConfigUpdate) Where ¶
func (tcu *TypeConfigUpdate) Where(ps ...predicate.TypeConfig) *TypeConfigUpdate
Where adds a new predicate for the TypeConfigUpdate builder.
type TypeConfigUpdateOne ¶
type TypeConfigUpdateOne struct {
// contains filtered or unexported fields
}
TypeConfigUpdateOne is the builder for updating a single TypeConfig entity.
func (*TypeConfigUpdateOne) Exec ¶
func (tcuo *TypeConfigUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TypeConfigUpdateOne) ExecX ¶
func (tcuo *TypeConfigUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TypeConfigUpdateOne) Mutation ¶
func (tcuo *TypeConfigUpdateOne) Mutation() *TypeConfigMutation
Mutation returns the TypeConfigMutation object of the builder.
func (*TypeConfigUpdateOne) Save ¶
func (tcuo *TypeConfigUpdateOne) Save(ctx context.Context) (*TypeConfig, error)
Save executes the query and returns the updated TypeConfig entity.
func (*TypeConfigUpdateOne) SaveX ¶
func (tcuo *TypeConfigUpdateOne) SaveX(ctx context.Context) *TypeConfig
SaveX is like Save, but panics if an error occurs.
func (*TypeConfigUpdateOne) Select ¶
func (tcuo *TypeConfigUpdateOne) Select(field string, fields ...string) *TypeConfigUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TypeConfigUpdateOne) SetConfig ¶
func (tcuo *TypeConfigUpdateOne) SetConfig(s string) *TypeConfigUpdateOne
SetConfig sets the "config" field.
func (*TypeConfigUpdateOne) SetTitle ¶
func (tcuo *TypeConfigUpdateOne) SetTitle(s string) *TypeConfigUpdateOne
SetTitle sets the "title" field.
func (*TypeConfigUpdateOne) SetType ¶
func (tcuo *TypeConfigUpdateOne) SetType(s string) *TypeConfigUpdateOne
SetType sets the "type" field.
type User ¶
type User struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Username holds the value of the "username" field.
Username string `json:"username,omitempty"`
// Password holds the value of the "password" field.
Password string `json:"password,omitempty"`
// Enable holds the value of the "enable" field.
Enable *contact.BoolField `json:"enable,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) QueryShare ¶
func (u *User) QueryShare() *ShareQuery
QueryShare queries the "share" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserApi ¶
type UserApi struct {
*Api
Filter UserApiFilter
SkipCreateAutoEdge bool
SkipUpdateAutoEdge bool
}
func NewUserApi ¶
type UserApiFilter ¶
type UserApiFilter struct {
CreatePipe func(help *contact.GinHelp, createPipe *UserCreate, edges UserEdges)
CreateAfter func(help *contact.GinHelp, item *User, edges UserEdges)
UpdatePipe func(help *contact.GinHelp, old *User, updatePipe *UserUpdateOne, edges UserEdges)
UpdateAfter func(help *contact.GinHelp, old *User, item *User, edges UserEdges)
ListPipe func(help *contact.GinHelp, listPipe *UserQuery)
ListData func(help *contact.GinHelp, items []*User) interface{}
DeleteBefore func(help *contact.GinHelp, item *User)
GetPipe func(help *contact.GinHelp, getPipe *UserQuery)
GetData func(help *contact.GinHelp, item *User) *User
}
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a create builder for User.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryShare ¶
func (c *UserClient) QueryShare(u *User) *ShareQuery
QueryShare queries the share edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddShare ¶
func (uc *UserCreate) AddShare(s ...*Share) *UserCreate
AddShare adds the "share" edges to the Share entity.
func (*UserCreate) AddShareIDs ¶
func (uc *UserCreate) AddShareIDs(ids ...int) *UserCreate
AddShareIDs adds the "share" edge to the Share entity by IDs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetEnable ¶
func (uc *UserCreate) SetEnable(cf *contact.BoolField) *UserCreate
SetEnable sets the "enable" field.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where adds a new predicate to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct {
Share []*Share `json:"share,omitempty"`
// contains filtered or unexported fields
}
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) ShareOrErr ¶
ShareOrErr returns the Share value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolX ¶
func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserGroupBy) Bools ¶
func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolsX ¶
func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupBy) Float64 ¶
func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64X ¶
func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶
func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64sX ¶
func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Int ¶
func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntX ¶
func (ugb *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserGroupBy) Ints ¶
func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntsX ¶
func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) ScanX ¶
func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserGroupBy) String ¶
func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) StringX ¶
func (ugb *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddShareIDs ¶
func (m *UserMutation) AddShareIDs(ids ...int)
AddShareIDs adds the "share" edge to the Share entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearShare ¶
func (m *UserMutation) ClearShare()
ClearShare clears the "share" edge to the Share entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Enable ¶
func (m *UserMutation) Enable() (r *contact.BoolField, exists bool)
Enable returns the value of the "enable" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*UserMutation) OldEnable ¶
OldEnable returns the old "enable" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
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) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemoveShareIDs ¶
func (m *UserMutation) RemoveShareIDs(ids ...int)
RemoveShareIDs removes the "share" edge to the Share entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedShareIDs ¶
func (m *UserMutation) RemovedShareIDs() (ids []int)
RemovedShare returns the removed IDs of the "share" edge to the Share entity.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEnable ¶
func (m *UserMutation) ResetEnable()
ResetEnable resets all changes to the "enable" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetShare ¶
func (m *UserMutation) ResetShare()
ResetShare resets all changes to the "share" edge.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetEnable ¶
func (m *UserMutation) SetEnable(cf *contact.BoolField)
SetEnable sets the "enable" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UserMutation) ShareCleared ¶
func (m *UserMutation) ShareCleared() bool
ShareCleared reports if the "share" edge to the Share entity was cleared.
func (*UserMutation) ShareIDs ¶
func (m *UserMutation) ShareIDs() (ids []int)
ShareIDs returns the "share" edge IDs in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Username string `json:"username,omitempty"`
Count int `json:"count,omitempty"`
}
client.User.Query().
GroupBy(user.FieldUsername).
Aggregate(model.Count()).
Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one User entity is not found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when exactly one User ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryShare ¶
func (uq *UserQuery) QueryShare() *ShareQuery
QueryShare chains the current query on the "share" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(field string, 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 {
Username string `json:"username,omitempty"`
}
client.User.Query().
Select(user.FieldUsername).
Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithShare ¶
func (uq *UserQuery) WithShare(opts ...func(*ShareQuery)) *UserQuery
WithShare tells the query-builder to eager-load the nodes that are connected to the "share" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct {
*UserQuery
// contains filtered or unexported fields
}
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolX ¶
func (us *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSelect) Bools ¶
func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolsX ¶
func (us *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSelect) Float64 ¶
func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶
func (us *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSelect) Float64s ¶
func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶
func (us *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Int ¶
func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntX ¶
func (us *UserSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSelect) Ints ¶
func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntsX ¶
func (us *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) ScanX ¶
func (us *UserSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSelect) String ¶
func (us *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSelect) StringX ¶
func (us *UserSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddShare ¶
func (uu *UserUpdate) AddShare(s ...*Share) *UserUpdate
AddShare adds the "share" edges to the Share entity.
func (*UserUpdate) AddShareIDs ¶
func (uu *UserUpdate) AddShareIDs(ids ...int) *UserUpdate
AddShareIDs adds the "share" edge to the Share entity by IDs.
func (*UserUpdate) ClearShare ¶
func (uu *UserUpdate) ClearShare() *UserUpdate
ClearShare clears all "share" edges to the Share entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveShare ¶
func (uu *UserUpdate) RemoveShare(s ...*Share) *UserUpdate
RemoveShare removes "share" edges to Share entities.
func (*UserUpdate) RemoveShareIDs ¶
func (uu *UserUpdate) RemoveShareIDs(ids ...int) *UserUpdate
RemoveShareIDs removes the "share" edge to Share entities by IDs.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEnable ¶
func (uu *UserUpdate) SetEnable(cf *contact.BoolField) *UserUpdate
SetEnable sets the "enable" field.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where adds a new predicate for the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddShare ¶
func (uuo *UserUpdateOne) AddShare(s ...*Share) *UserUpdateOne
AddShare adds the "share" edges to the Share entity.
func (*UserUpdateOne) AddShareIDs ¶
func (uuo *UserUpdateOne) AddShareIDs(ids ...int) *UserUpdateOne
AddShareIDs adds the "share" edge to the Share entity by IDs.
func (*UserUpdateOne) ClearShare ¶
func (uuo *UserUpdateOne) ClearShare() *UserUpdateOne
ClearShare clears all "share" edges to the Share entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveShare ¶
func (uuo *UserUpdateOne) RemoveShare(s ...*Share) *UserUpdateOne
RemoveShare removes "share" edges to Share entities.
func (*UserUpdateOne) RemoveShareIDs ¶
func (uuo *UserUpdateOne) RemoveShareIDs(ids ...int) *UserUpdateOne
RemoveShareIDs removes the "share" edge to Share entities by IDs.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetEnable ¶
func (uuo *UserUpdateOne) SetEnable(cf *contact.BoolField) *UserUpdateOne
SetEnable sets the "enable" field.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
type ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type View ¶
type View struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Desc holds the value of the "desc" field.
Desc string `json:"desc,omitempty"`
// Config holds the value of the "config" field.
Config string `json:"config,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ViewQuery when eager-loading is set.
Edges ViewEdges `json:"edges"`
// contains filtered or unexported fields
}
View is the model entity for the View schema.
func (*View) QueryBg ¶
func (v *View) QueryBg() *AssetsQuery
QueryBg queries the "bg" edge of the View entity.
func (*View) QueryBlocks ¶
func (v *View) QueryBlocks() *ViewBlockQuery
QueryBlocks queries the "blocks" edge of the View entity.
func (*View) QueryShare ¶
func (v *View) QueryShare() *ShareQuery
QueryShare queries the "share" edge of the View entity.
func (*View) Unwrap ¶
Unwrap unwraps the View 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 (*View) Update ¶
func (v *View) Update() *ViewUpdateOne
Update returns a builder for updating this View. Note that you need to call View.Unwrap() before calling this method if this View was returned from a transaction, and the transaction was committed or rolled back.
type ViewApi ¶
type ViewApi struct {
*Api
Filter ViewApiFilter
SkipCreateAutoEdge bool
SkipUpdateAutoEdge bool
}
func NewViewApi ¶
type ViewApiFilter ¶
type ViewApiFilter struct {
CreatePipe func(help *contact.GinHelp, createPipe *ViewCreate, edges ViewEdges)
CreateAfter func(help *contact.GinHelp, item *View, edges ViewEdges)
UpdatePipe func(help *contact.GinHelp, old *View, updatePipe *ViewUpdateOne, edges ViewEdges)
UpdateAfter func(help *contact.GinHelp, old *View, item *View, edges ViewEdges)
ListPipe func(help *contact.GinHelp, listPipe *ViewQuery)
ListData func(help *contact.GinHelp, items []*View) interface{}
DeleteBefore func(help *contact.GinHelp, item *View)
GetPipe func(help *contact.GinHelp, getPipe *ViewQuery)
GetData func(help *contact.GinHelp, item *View) *View
}
type ViewBlock ¶
type ViewBlock struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// Config holds the value of the "config" field.
Config string `json:"config,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ViewBlockQuery when eager-loading is set.
Edges ViewBlockEdges `json:"edges"`
// contains filtered or unexported fields
}
ViewBlock is the model entity for the ViewBlock schema.
func (*ViewBlock) QueryDataset ¶
func (vb *ViewBlock) QueryDataset() *DataSetQuery
QueryDataset queries the "dataset" edge of the ViewBlock entity.
func (*ViewBlock) Unwrap ¶
Unwrap unwraps the ViewBlock 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 (*ViewBlock) Update ¶
func (vb *ViewBlock) Update() *ViewBlockUpdateOne
Update returns a builder for updating this ViewBlock. Note that you need to call ViewBlock.Unwrap() before calling this method if this ViewBlock was returned from a transaction, and the transaction was committed or rolled back.
type ViewBlockApi ¶
type ViewBlockApi struct {
*Api
Filter ViewBlockApiFilter
SkipCreateAutoEdge bool
SkipUpdateAutoEdge bool
}
func NewViewBlockApi ¶
func NewViewBlockApi(client *Client, opt *ApiOption) *ViewBlockApi
func (*ViewBlockApi) Create ¶
func (c *ViewBlockApi) Create(help *contact.GinHelp)
func (*ViewBlockApi) Delete ¶
func (c *ViewBlockApi) Delete(help *contact.GinHelp)
func (*ViewBlockApi) Get ¶
func (c *ViewBlockApi) Get(help *contact.GinHelp)
func (*ViewBlockApi) List ¶
func (c *ViewBlockApi) List(help *contact.GinHelp)
func (*ViewBlockApi) Update ¶
func (c *ViewBlockApi) Update(help *contact.GinHelp)
type ViewBlockApiFilter ¶
type ViewBlockApiFilter struct {
CreatePipe func(help *contact.GinHelp, createPipe *ViewBlockCreate, edges ViewBlockEdges)
CreateAfter func(help *contact.GinHelp, item *ViewBlock, edges ViewBlockEdges)
UpdatePipe func(help *contact.GinHelp, old *ViewBlock, updatePipe *ViewBlockUpdateOne, edges ViewBlockEdges)
UpdateAfter func(help *contact.GinHelp, old *ViewBlock, item *ViewBlock, edges ViewBlockEdges)
ListPipe func(help *contact.GinHelp, listPipe *ViewBlockQuery)
ListData func(help *contact.GinHelp, items []*ViewBlock) interface{}
DeleteBefore func(help *contact.GinHelp, item *ViewBlock)
GetPipe func(help *contact.GinHelp, getPipe *ViewBlockQuery)
GetData func(help *contact.GinHelp, item *ViewBlock) *ViewBlock
}
type ViewBlockClient ¶
type ViewBlockClient struct {
// contains filtered or unexported fields
}
ViewBlockClient is a client for the ViewBlock schema.
func NewViewBlockClient ¶
func NewViewBlockClient(c config) *ViewBlockClient
NewViewBlockClient returns a client for the ViewBlock from the given config.
func (*ViewBlockClient) Create ¶
func (c *ViewBlockClient) Create() *ViewBlockCreate
Create returns a create builder for ViewBlock.
func (*ViewBlockClient) CreateBulk ¶
func (c *ViewBlockClient) CreateBulk(builders ...*ViewBlockCreate) *ViewBlockCreateBulk
CreateBulk returns a builder for creating a bulk of ViewBlock entities.
func (*ViewBlockClient) Delete ¶
func (c *ViewBlockClient) Delete() *ViewBlockDelete
Delete returns a delete builder for ViewBlock.
func (*ViewBlockClient) DeleteOne ¶
func (c *ViewBlockClient) DeleteOne(vb *ViewBlock) *ViewBlockDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ViewBlockClient) DeleteOneID ¶
func (c *ViewBlockClient) DeleteOneID(id int) *ViewBlockDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ViewBlockClient) GetX ¶
func (c *ViewBlockClient) GetX(ctx context.Context, id int) *ViewBlock
GetX is like Get, but panics if an error occurs.
func (*ViewBlockClient) Hooks ¶
func (c *ViewBlockClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ViewBlockClient) Query ¶
func (c *ViewBlockClient) Query() *ViewBlockQuery
Query returns a query builder for ViewBlock.
func (*ViewBlockClient) QueryDataset ¶
func (c *ViewBlockClient) QueryDataset(vb *ViewBlock) *DataSetQuery
QueryDataset queries the dataset edge of a ViewBlock.
func (*ViewBlockClient) QueryView ¶
func (c *ViewBlockClient) QueryView(vb *ViewBlock) *ViewQuery
QueryView queries the view edge of a ViewBlock.
func (*ViewBlockClient) Update ¶
func (c *ViewBlockClient) Update() *ViewBlockUpdate
Update returns an update builder for ViewBlock.
func (*ViewBlockClient) UpdateOne ¶
func (c *ViewBlockClient) UpdateOne(vb *ViewBlock) *ViewBlockUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ViewBlockClient) UpdateOneID ¶
func (c *ViewBlockClient) UpdateOneID(id int) *ViewBlockUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ViewBlockClient) Use ¶
func (c *ViewBlockClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `viewblock.Hooks(f(g(h())))`.
type ViewBlockCreate ¶
type ViewBlockCreate struct {
// contains filtered or unexported fields
}
ViewBlockCreate is the builder for creating a ViewBlock entity.
func (*ViewBlockCreate) AddDataset ¶
func (vbc *ViewBlockCreate) AddDataset(d ...*DataSet) *ViewBlockCreate
AddDataset adds the "dataset" edges to the DataSet entity.
func (*ViewBlockCreate) AddDatasetIDs ¶
func (vbc *ViewBlockCreate) AddDatasetIDs(ids ...int) *ViewBlockCreate
AddDatasetIDs adds the "dataset" edge to the DataSet entity by IDs.
func (*ViewBlockCreate) Mutation ¶
func (vbc *ViewBlockCreate) Mutation() *ViewBlockMutation
Mutation returns the ViewBlockMutation object of the builder.
func (*ViewBlockCreate) Save ¶
func (vbc *ViewBlockCreate) Save(ctx context.Context) (*ViewBlock, error)
Save creates the ViewBlock in the database.
func (*ViewBlockCreate) SaveX ¶
func (vbc *ViewBlockCreate) SaveX(ctx context.Context) *ViewBlock
SaveX calls Save and panics if Save returns an error.
func (*ViewBlockCreate) SetConfig ¶
func (vbc *ViewBlockCreate) SetConfig(s string) *ViewBlockCreate
SetConfig sets the "config" field.
func (*ViewBlockCreate) SetNillableViewID ¶
func (vbc *ViewBlockCreate) SetNillableViewID(id *int) *ViewBlockCreate
SetNillableViewID sets the "view" edge to the View entity by ID if the given value is not nil.
func (*ViewBlockCreate) SetType ¶
func (vbc *ViewBlockCreate) SetType(s string) *ViewBlockCreate
SetType sets the "type" field.
func (*ViewBlockCreate) SetView ¶
func (vbc *ViewBlockCreate) SetView(v *View) *ViewBlockCreate
SetView sets the "view" edge to the View entity.
func (*ViewBlockCreate) SetViewID ¶
func (vbc *ViewBlockCreate) SetViewID(id int) *ViewBlockCreate
SetViewID sets the "view" edge to the View entity by ID.
type ViewBlockCreateBulk ¶
type ViewBlockCreateBulk struct {
// contains filtered or unexported fields
}
ViewBlockCreateBulk is the builder for creating many ViewBlock entities in bulk.
type ViewBlockDelete ¶
type ViewBlockDelete struct {
// contains filtered or unexported fields
}
ViewBlockDelete is the builder for deleting a ViewBlock entity.
func (*ViewBlockDelete) Exec ¶
func (vbd *ViewBlockDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ViewBlockDelete) ExecX ¶
func (vbd *ViewBlockDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ViewBlockDelete) Where ¶
func (vbd *ViewBlockDelete) Where(ps ...predicate.ViewBlock) *ViewBlockDelete
Where adds a new predicate to the ViewBlockDelete builder.
type ViewBlockDeleteOne ¶
type ViewBlockDeleteOne struct {
// contains filtered or unexported fields
}
ViewBlockDeleteOne is the builder for deleting a single ViewBlock entity.
func (*ViewBlockDeleteOne) Exec ¶
func (vbdo *ViewBlockDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ViewBlockDeleteOne) ExecX ¶
func (vbdo *ViewBlockDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ViewBlockEdges ¶
type ViewBlockEdges struct {
// View holds the value of the view edge.
View *View `json:"view,omitempty"`
// Dataset holds the value of the dataset edge.
Dataset []*DataSet `json:"dataset,omitempty"`
// contains filtered or unexported fields
}
ViewBlockEdges holds the relations/edges for other nodes in the graph.
func (ViewBlockEdges) DatasetOrErr ¶
func (e ViewBlockEdges) DatasetOrErr() ([]*DataSet, error)
DatasetOrErr returns the Dataset value or an error if the edge was not loaded in eager-loading.
func (ViewBlockEdges) ViewOrErr ¶
func (e ViewBlockEdges) ViewOrErr() (*View, error)
ViewOrErr returns the View value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ViewBlockGroupBy ¶
type ViewBlockGroupBy struct {
// contains filtered or unexported fields
}
ViewBlockGroupBy is the group-by builder for ViewBlock entities.
func (*ViewBlockGroupBy) Aggregate ¶
func (vbgb *ViewBlockGroupBy) Aggregate(fns ...AggregateFunc) *ViewBlockGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ViewBlockGroupBy) Bool ¶
func (vbgb *ViewBlockGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ViewBlockGroupBy) BoolX ¶
func (vbgb *ViewBlockGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ViewBlockGroupBy) Bools ¶
func (vbgb *ViewBlockGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*ViewBlockGroupBy) BoolsX ¶
func (vbgb *ViewBlockGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ViewBlockGroupBy) Float64 ¶
func (vbgb *ViewBlockGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ViewBlockGroupBy) Float64X ¶
func (vbgb *ViewBlockGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ViewBlockGroupBy) Float64s ¶
func (vbgb *ViewBlockGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*ViewBlockGroupBy) Float64sX ¶
func (vbgb *ViewBlockGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ViewBlockGroupBy) Int ¶
func (vbgb *ViewBlockGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ViewBlockGroupBy) IntX ¶
func (vbgb *ViewBlockGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ViewBlockGroupBy) Ints ¶
func (vbgb *ViewBlockGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*ViewBlockGroupBy) IntsX ¶
func (vbgb *ViewBlockGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ViewBlockGroupBy) Scan ¶
func (vbgb *ViewBlockGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ViewBlockGroupBy) ScanX ¶
func (vbgb *ViewBlockGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ViewBlockGroupBy) String ¶
func (vbgb *ViewBlockGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ViewBlockGroupBy) StringX ¶
func (vbgb *ViewBlockGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ViewBlockMutation ¶
type ViewBlockMutation struct {
// contains filtered or unexported fields
}
ViewBlockMutation represents an operation that mutates the ViewBlock nodes in the graph.
func (*ViewBlockMutation) AddDatasetIDs ¶
func (m *ViewBlockMutation) AddDatasetIDs(ids ...int)
AddDatasetIDs adds the "dataset" edge to the DataSet entity by ids.
func (*ViewBlockMutation) AddField ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) AddedEdges ¶
func (m *ViewBlockMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ViewBlockMutation) AddedField ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) AddedFields ¶
func (m *ViewBlockMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ViewBlockMutation) AddedIDs ¶
func (m *ViewBlockMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ViewBlockMutation) ClearDataset ¶
func (m *ViewBlockMutation) ClearDataset()
ClearDataset clears the "dataset" edge to the DataSet entity.
func (*ViewBlockMutation) ClearEdge ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) ClearField ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) ClearView ¶
func (m *ViewBlockMutation) ClearView()
ClearView clears the "view" edge to the View entity.
func (*ViewBlockMutation) ClearedEdges ¶
func (m *ViewBlockMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ViewBlockMutation) ClearedFields ¶
func (m *ViewBlockMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ViewBlockMutation) Client ¶
func (m ViewBlockMutation) 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 (*ViewBlockMutation) Config ¶
func (m *ViewBlockMutation) Config() (r string, exists bool)
Config returns the value of the "config" field in the mutation.
func (*ViewBlockMutation) DatasetCleared ¶
func (m *ViewBlockMutation) DatasetCleared() bool
DatasetCleared reports if the "dataset" edge to the DataSet entity was cleared.
func (*ViewBlockMutation) DatasetIDs ¶
func (m *ViewBlockMutation) DatasetIDs() (ids []int)
DatasetIDs returns the "dataset" edge IDs in the mutation.
func (*ViewBlockMutation) EdgeCleared ¶
func (m *ViewBlockMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ViewBlockMutation) Field ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) FieldCleared ¶
func (m *ViewBlockMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ViewBlockMutation) Fields ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) GetType ¶
func (m *ViewBlockMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*ViewBlockMutation) ID ¶
func (m *ViewBlockMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*ViewBlockMutation) OldConfig ¶
func (m *ViewBlockMutation) OldConfig(ctx context.Context) (v string, err error)
OldConfig returns the old "config" field's value of the ViewBlock entity. If the ViewBlock 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 (*ViewBlockMutation) 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 (*ViewBlockMutation) OldType ¶
func (m *ViewBlockMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the ViewBlock entity. If the ViewBlock 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 (*ViewBlockMutation) RemoveDatasetIDs ¶
func (m *ViewBlockMutation) RemoveDatasetIDs(ids ...int)
RemoveDatasetIDs removes the "dataset" edge to the DataSet entity by IDs.
func (*ViewBlockMutation) RemovedDatasetIDs ¶
func (m *ViewBlockMutation) RemovedDatasetIDs() (ids []int)
RemovedDataset returns the removed IDs of the "dataset" edge to the DataSet entity.
func (*ViewBlockMutation) RemovedEdges ¶
func (m *ViewBlockMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ViewBlockMutation) RemovedIDs ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) ResetConfig ¶
func (m *ViewBlockMutation) ResetConfig()
ResetConfig resets all changes to the "config" field.
func (*ViewBlockMutation) ResetDataset ¶
func (m *ViewBlockMutation) ResetDataset()
ResetDataset resets all changes to the "dataset" edge.
func (*ViewBlockMutation) ResetEdge ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) ResetField ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) ResetType ¶
func (m *ViewBlockMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*ViewBlockMutation) ResetView ¶
func (m *ViewBlockMutation) ResetView()
ResetView resets all changes to the "view" edge.
func (*ViewBlockMutation) SetConfig ¶
func (m *ViewBlockMutation) SetConfig(s string)
SetConfig sets the "config" field.
func (*ViewBlockMutation) SetField ¶
func (m *ViewBlockMutation) 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 (*ViewBlockMutation) SetType ¶
func (m *ViewBlockMutation) SetType(s string)
SetType sets the "type" field.
func (*ViewBlockMutation) SetViewID ¶
func (m *ViewBlockMutation) SetViewID(id int)
SetViewID sets the "view" edge to the View entity by id.
func (ViewBlockMutation) Tx ¶
func (m ViewBlockMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ViewBlockMutation) Type ¶
func (m *ViewBlockMutation) Type() string
Type returns the node type of this mutation (ViewBlock).
func (*ViewBlockMutation) ViewCleared ¶
func (m *ViewBlockMutation) ViewCleared() bool
ViewCleared reports if the "view" edge to the View entity was cleared.
func (*ViewBlockMutation) ViewID ¶
func (m *ViewBlockMutation) ViewID() (id int, exists bool)
ViewID returns the "view" edge ID in the mutation.
func (*ViewBlockMutation) ViewIDs ¶
func (m *ViewBlockMutation) ViewIDs() (ids []int)
ViewIDs returns the "view" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ViewID instead. It exists only for internal usage by the builders.
type ViewBlockQuery ¶
type ViewBlockQuery struct {
// contains filtered or unexported fields
}
ViewBlockQuery is the builder for querying ViewBlock entities.
func (*ViewBlockQuery) All ¶
func (vbq *ViewBlockQuery) All(ctx context.Context) ([]*ViewBlock, error)
All executes the query and returns a list of ViewBlocks.
func (*ViewBlockQuery) AllX ¶
func (vbq *ViewBlockQuery) AllX(ctx context.Context) []*ViewBlock
AllX is like All, but panics if an error occurs.
func (*ViewBlockQuery) Clone ¶
func (vbq *ViewBlockQuery) Clone() *ViewBlockQuery
Clone returns a duplicate of the ViewBlockQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ViewBlockQuery) Count ¶
func (vbq *ViewBlockQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ViewBlockQuery) CountX ¶
func (vbq *ViewBlockQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ViewBlockQuery) Exist ¶
func (vbq *ViewBlockQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ViewBlockQuery) ExistX ¶
func (vbq *ViewBlockQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ViewBlockQuery) First ¶
func (vbq *ViewBlockQuery) First(ctx context.Context) (*ViewBlock, error)
First returns the first ViewBlock entity from the query. Returns a *NotFoundError when no ViewBlock was found.
func (*ViewBlockQuery) FirstID ¶
func (vbq *ViewBlockQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ViewBlock ID from the query. Returns a *NotFoundError when no ViewBlock ID was found.
func (*ViewBlockQuery) FirstIDX ¶
func (vbq *ViewBlockQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ViewBlockQuery) FirstX ¶
func (vbq *ViewBlockQuery) FirstX(ctx context.Context) *ViewBlock
FirstX is like First, but panics if an error occurs.
func (*ViewBlockQuery) GroupBy ¶
func (vbq *ViewBlockQuery) GroupBy(field string, fields ...string) *ViewBlockGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Type string `json:"type,omitempty"`
Count int `json:"count,omitempty"`
}
client.ViewBlock.Query().
GroupBy(viewblock.FieldType).
Aggregate(model.Count()).
Scan(ctx, &v)
func (*ViewBlockQuery) IDs ¶
func (vbq *ViewBlockQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of ViewBlock IDs.
func (*ViewBlockQuery) IDsX ¶
func (vbq *ViewBlockQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ViewBlockQuery) Limit ¶
func (vbq *ViewBlockQuery) Limit(limit int) *ViewBlockQuery
Limit adds a limit step to the query.
func (*ViewBlockQuery) Offset ¶
func (vbq *ViewBlockQuery) Offset(offset int) *ViewBlockQuery
Offset adds an offset step to the query.
func (*ViewBlockQuery) Only ¶
func (vbq *ViewBlockQuery) Only(ctx context.Context) (*ViewBlock, error)
Only returns a single ViewBlock entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one ViewBlock entity is not found. Returns a *NotFoundError when no ViewBlock entities are found.
func (*ViewBlockQuery) OnlyID ¶
func (vbq *ViewBlockQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ViewBlock ID in the query. Returns a *NotSingularError when exactly one ViewBlock ID is not found. Returns a *NotFoundError when no entities are found.
func (*ViewBlockQuery) OnlyIDX ¶
func (vbq *ViewBlockQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ViewBlockQuery) OnlyX ¶
func (vbq *ViewBlockQuery) OnlyX(ctx context.Context) *ViewBlock
OnlyX is like Only, but panics if an error occurs.
func (*ViewBlockQuery) Order ¶
func (vbq *ViewBlockQuery) Order(o ...OrderFunc) *ViewBlockQuery
Order adds an order step to the query.
func (*ViewBlockQuery) QueryDataset ¶
func (vbq *ViewBlockQuery) QueryDataset() *DataSetQuery
QueryDataset chains the current query on the "dataset" edge.
func (*ViewBlockQuery) QueryView ¶
func (vbq *ViewBlockQuery) QueryView() *ViewQuery
QueryView chains the current query on the "view" edge.
func (*ViewBlockQuery) Select ¶
func (vbq *ViewBlockQuery) Select(field string, fields ...string) *ViewBlockSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Type string `json:"type,omitempty"`
}
client.ViewBlock.Query().
Select(viewblock.FieldType).
Scan(ctx, &v)
func (*ViewBlockQuery) Unique ¶
func (vbq *ViewBlockQuery) Unique(unique bool) *ViewBlockQuery
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 (*ViewBlockQuery) Where ¶
func (vbq *ViewBlockQuery) Where(ps ...predicate.ViewBlock) *ViewBlockQuery
Where adds a new predicate for the ViewBlockQuery builder.
func (*ViewBlockQuery) WithDataset ¶
func (vbq *ViewBlockQuery) WithDataset(opts ...func(*DataSetQuery)) *ViewBlockQuery
WithDataset tells the query-builder to eager-load the nodes that are connected to the "dataset" edge. The optional arguments are used to configure the query builder of the edge.
func (*ViewBlockQuery) WithView ¶
func (vbq *ViewBlockQuery) WithView(opts ...func(*ViewQuery)) *ViewBlockQuery
WithView tells the query-builder to eager-load the nodes that are connected to the "view" edge. The optional arguments are used to configure the query builder of the edge.
type ViewBlockSelect ¶
type ViewBlockSelect struct {
*ViewBlockQuery
// contains filtered or unexported fields
}
ViewBlockSelect is the builder for selecting fields of ViewBlock entities.
func (*ViewBlockSelect) Bool ¶
func (vbs *ViewBlockSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ViewBlockSelect) BoolX ¶
func (vbs *ViewBlockSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ViewBlockSelect) Bools ¶
func (vbs *ViewBlockSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ViewBlockSelect) BoolsX ¶
func (vbs *ViewBlockSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ViewBlockSelect) Float64 ¶
func (vbs *ViewBlockSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ViewBlockSelect) Float64X ¶
func (vbs *ViewBlockSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ViewBlockSelect) Float64s ¶
func (vbs *ViewBlockSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ViewBlockSelect) Float64sX ¶
func (vbs *ViewBlockSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ViewBlockSelect) Int ¶
func (vbs *ViewBlockSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ViewBlockSelect) IntX ¶
func (vbs *ViewBlockSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ViewBlockSelect) Ints ¶
func (vbs *ViewBlockSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ViewBlockSelect) IntsX ¶
func (vbs *ViewBlockSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ViewBlockSelect) Scan ¶
func (vbs *ViewBlockSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ViewBlockSelect) ScanX ¶
func (vbs *ViewBlockSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ViewBlockSelect) String ¶
func (vbs *ViewBlockSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ViewBlockSelect) StringX ¶
func (vbs *ViewBlockSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ViewBlockUpdate ¶
type ViewBlockUpdate struct {
// contains filtered or unexported fields
}
ViewBlockUpdate is the builder for updating ViewBlock entities.
func (*ViewBlockUpdate) AddDataset ¶
func (vbu *ViewBlockUpdate) AddDataset(d ...*DataSet) *ViewBlockUpdate
AddDataset adds the "dataset" edges to the DataSet entity.
func (*ViewBlockUpdate) AddDatasetIDs ¶
func (vbu *ViewBlockUpdate) AddDatasetIDs(ids ...int) *ViewBlockUpdate
AddDatasetIDs adds the "dataset" edge to the DataSet entity by IDs.
func (*ViewBlockUpdate) ClearDataset ¶
func (vbu *ViewBlockUpdate) ClearDataset() *ViewBlockUpdate
ClearDataset clears all "dataset" edges to the DataSet entity.
func (*ViewBlockUpdate) ClearView ¶
func (vbu *ViewBlockUpdate) ClearView() *ViewBlockUpdate
ClearView clears the "view" edge to the View entity.
func (*ViewBlockUpdate) Exec ¶
func (vbu *ViewBlockUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ViewBlockUpdate) ExecX ¶
func (vbu *ViewBlockUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ViewBlockUpdate) Mutation ¶
func (vbu *ViewBlockUpdate) Mutation() *ViewBlockMutation
Mutation returns the ViewBlockMutation object of the builder.
func (*ViewBlockUpdate) RemoveDataset ¶
func (vbu *ViewBlockUpdate) RemoveDataset(d ...*DataSet) *ViewBlockUpdate
RemoveDataset removes "dataset" edges to DataSet entities.
func (*ViewBlockUpdate) RemoveDatasetIDs ¶
func (vbu *ViewBlockUpdate) RemoveDatasetIDs(ids ...int) *ViewBlockUpdate
RemoveDatasetIDs removes the "dataset" edge to DataSet entities by IDs.
func (*ViewBlockUpdate) Save ¶
func (vbu *ViewBlockUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ViewBlockUpdate) SaveX ¶
func (vbu *ViewBlockUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ViewBlockUpdate) SetConfig ¶
func (vbu *ViewBlockUpdate) SetConfig(s string) *ViewBlockUpdate
SetConfig sets the "config" field.
func (*ViewBlockUpdate) SetNillableViewID ¶
func (vbu *ViewBlockUpdate) SetNillableViewID(id *int) *ViewBlockUpdate
SetNillableViewID sets the "view" edge to the View entity by ID if the given value is not nil.
func (*ViewBlockUpdate) SetType ¶
func (vbu *ViewBlockUpdate) SetType(s string) *ViewBlockUpdate
SetType sets the "type" field.
func (*ViewBlockUpdate) SetView ¶
func (vbu *ViewBlockUpdate) SetView(v *View) *ViewBlockUpdate
SetView sets the "view" edge to the View entity.
func (*ViewBlockUpdate) SetViewID ¶
func (vbu *ViewBlockUpdate) SetViewID(id int) *ViewBlockUpdate
SetViewID sets the "view" edge to the View entity by ID.
func (*ViewBlockUpdate) Where ¶
func (vbu *ViewBlockUpdate) Where(ps ...predicate.ViewBlock) *ViewBlockUpdate
Where adds a new predicate for the ViewBlockUpdate builder.
type ViewBlockUpdateOne ¶
type ViewBlockUpdateOne struct {
// contains filtered or unexported fields
}
ViewBlockUpdateOne is the builder for updating a single ViewBlock entity.
func (*ViewBlockUpdateOne) AddDataset ¶
func (vbuo *ViewBlockUpdateOne) AddDataset(d ...*DataSet) *ViewBlockUpdateOne
AddDataset adds the "dataset" edges to the DataSet entity.
func (*ViewBlockUpdateOne) AddDatasetIDs ¶
func (vbuo *ViewBlockUpdateOne) AddDatasetIDs(ids ...int) *ViewBlockUpdateOne
AddDatasetIDs adds the "dataset" edge to the DataSet entity by IDs.
func (*ViewBlockUpdateOne) ClearDataset ¶
func (vbuo *ViewBlockUpdateOne) ClearDataset() *ViewBlockUpdateOne
ClearDataset clears all "dataset" edges to the DataSet entity.
func (*ViewBlockUpdateOne) ClearView ¶
func (vbuo *ViewBlockUpdateOne) ClearView() *ViewBlockUpdateOne
ClearView clears the "view" edge to the View entity.
func (*ViewBlockUpdateOne) Exec ¶
func (vbuo *ViewBlockUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ViewBlockUpdateOne) ExecX ¶
func (vbuo *ViewBlockUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ViewBlockUpdateOne) Mutation ¶
func (vbuo *ViewBlockUpdateOne) Mutation() *ViewBlockMutation
Mutation returns the ViewBlockMutation object of the builder.
func (*ViewBlockUpdateOne) RemoveDataset ¶
func (vbuo *ViewBlockUpdateOne) RemoveDataset(d ...*DataSet) *ViewBlockUpdateOne
RemoveDataset removes "dataset" edges to DataSet entities.
func (*ViewBlockUpdateOne) RemoveDatasetIDs ¶
func (vbuo *ViewBlockUpdateOne) RemoveDatasetIDs(ids ...int) *ViewBlockUpdateOne
RemoveDatasetIDs removes the "dataset" edge to DataSet entities by IDs.
func (*ViewBlockUpdateOne) Save ¶
func (vbuo *ViewBlockUpdateOne) Save(ctx context.Context) (*ViewBlock, error)
Save executes the query and returns the updated ViewBlock entity.
func (*ViewBlockUpdateOne) SaveX ¶
func (vbuo *ViewBlockUpdateOne) SaveX(ctx context.Context) *ViewBlock
SaveX is like Save, but panics if an error occurs.
func (*ViewBlockUpdateOne) Select ¶
func (vbuo *ViewBlockUpdateOne) Select(field string, fields ...string) *ViewBlockUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ViewBlockUpdateOne) SetConfig ¶
func (vbuo *ViewBlockUpdateOne) SetConfig(s string) *ViewBlockUpdateOne
SetConfig sets the "config" field.
func (*ViewBlockUpdateOne) SetNillableViewID ¶
func (vbuo *ViewBlockUpdateOne) SetNillableViewID(id *int) *ViewBlockUpdateOne
SetNillableViewID sets the "view" edge to the View entity by ID if the given value is not nil.
func (*ViewBlockUpdateOne) SetType ¶
func (vbuo *ViewBlockUpdateOne) SetType(s string) *ViewBlockUpdateOne
SetType sets the "type" field.
func (*ViewBlockUpdateOne) SetView ¶
func (vbuo *ViewBlockUpdateOne) SetView(v *View) *ViewBlockUpdateOne
SetView sets the "view" edge to the View entity.
func (*ViewBlockUpdateOne) SetViewID ¶
func (vbuo *ViewBlockUpdateOne) SetViewID(id int) *ViewBlockUpdateOne
SetViewID sets the "view" edge to the View entity by ID.
type ViewClient ¶
type ViewClient struct {
// contains filtered or unexported fields
}
ViewClient is a client for the View schema.
func NewViewClient ¶
func NewViewClient(c config) *ViewClient
NewViewClient returns a client for the View from the given config.
func (*ViewClient) Create ¶
func (c *ViewClient) Create() *ViewCreate
Create returns a create builder for View.
func (*ViewClient) CreateBulk ¶
func (c *ViewClient) CreateBulk(builders ...*ViewCreate) *ViewCreateBulk
CreateBulk returns a builder for creating a bulk of View entities.
func (*ViewClient) Delete ¶
func (c *ViewClient) Delete() *ViewDelete
Delete returns a delete builder for View.
func (*ViewClient) DeleteOne ¶
func (c *ViewClient) DeleteOne(v *View) *ViewDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ViewClient) DeleteOneID ¶
func (c *ViewClient) DeleteOneID(id int) *ViewDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ViewClient) GetX ¶
func (c *ViewClient) GetX(ctx context.Context, id int) *View
GetX is like Get, but panics if an error occurs.
func (*ViewClient) Query ¶
func (c *ViewClient) Query() *ViewQuery
Query returns a query builder for View.
func (*ViewClient) QueryBg ¶
func (c *ViewClient) QueryBg(v *View) *AssetsQuery
QueryBg queries the bg edge of a View.
func (*ViewClient) QueryBlocks ¶
func (c *ViewClient) QueryBlocks(v *View) *ViewBlockQuery
QueryBlocks queries the blocks edge of a View.
func (*ViewClient) QueryShare ¶
func (c *ViewClient) QueryShare(v *View) *ShareQuery
QueryShare queries the share edge of a View.
func (*ViewClient) Update ¶
func (c *ViewClient) Update() *ViewUpdate
Update returns an update builder for View.
func (*ViewClient) UpdateOne ¶
func (c *ViewClient) UpdateOne(v *View) *ViewUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ViewClient) UpdateOneID ¶
func (c *ViewClient) UpdateOneID(id int) *ViewUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ViewClient) Use ¶
func (c *ViewClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `view.Hooks(f(g(h())))`.
type ViewCreate ¶
type ViewCreate struct {
// contains filtered or unexported fields
}
ViewCreate is the builder for creating a View entity.
func (*ViewCreate) AddBlockIDs ¶
func (vc *ViewCreate) AddBlockIDs(ids ...int) *ViewCreate
AddBlockIDs adds the "blocks" edge to the ViewBlock entity by IDs.
func (*ViewCreate) AddBlocks ¶
func (vc *ViewCreate) AddBlocks(v ...*ViewBlock) *ViewCreate
AddBlocks adds the "blocks" edges to the ViewBlock entity.
func (*ViewCreate) AddShare ¶
func (vc *ViewCreate) AddShare(s ...*Share) *ViewCreate
AddShare adds the "share" edges to the Share entity.
func (*ViewCreate) AddShareIDs ¶
func (vc *ViewCreate) AddShareIDs(ids ...int) *ViewCreate
AddShareIDs adds the "share" edge to the Share entity by IDs.
func (*ViewCreate) Mutation ¶
func (vc *ViewCreate) Mutation() *ViewMutation
Mutation returns the ViewMutation object of the builder.
func (*ViewCreate) Save ¶
func (vc *ViewCreate) Save(ctx context.Context) (*View, error)
Save creates the View in the database.
func (*ViewCreate) SaveX ¶
func (vc *ViewCreate) SaveX(ctx context.Context) *View
SaveX calls Save and panics if Save returns an error.
func (*ViewCreate) SetBg ¶
func (vc *ViewCreate) SetBg(a *Assets) *ViewCreate
SetBg sets the "bg" edge to the Assets entity.
func (*ViewCreate) SetBgID ¶
func (vc *ViewCreate) SetBgID(id int) *ViewCreate
SetBgID sets the "bg" edge to the Assets entity by ID.
func (*ViewCreate) SetConfig ¶
func (vc *ViewCreate) SetConfig(s string) *ViewCreate
SetConfig sets the "config" field.
func (*ViewCreate) SetDesc ¶
func (vc *ViewCreate) SetDesc(s string) *ViewCreate
SetDesc sets the "desc" field.
func (*ViewCreate) SetNillableBgID ¶
func (vc *ViewCreate) SetNillableBgID(id *int) *ViewCreate
SetNillableBgID sets the "bg" edge to the Assets entity by ID if the given value is not nil.
type ViewCreateBulk ¶
type ViewCreateBulk struct {
// contains filtered or unexported fields
}
ViewCreateBulk is the builder for creating many View entities in bulk.
type ViewDelete ¶
type ViewDelete struct {
// contains filtered or unexported fields
}
ViewDelete is the builder for deleting a View entity.
func (*ViewDelete) Exec ¶
func (vd *ViewDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ViewDelete) ExecX ¶
func (vd *ViewDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ViewDelete) Where ¶
func (vd *ViewDelete) Where(ps ...predicate.View) *ViewDelete
Where adds a new predicate to the ViewDelete builder.
type ViewDeleteOne ¶
type ViewDeleteOne struct {
// contains filtered or unexported fields
}
ViewDeleteOne is the builder for deleting a single View entity.
func (*ViewDeleteOne) Exec ¶
func (vdo *ViewDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ViewDeleteOne) ExecX ¶
func (vdo *ViewDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ViewEdges ¶
type ViewEdges struct {
// Bg holds the value of the bg edge.
Bg *Assets `json:"bg,omitempty"`
// Blocks holds the value of the blocks edge.
Blocks []*ViewBlock `json:"blocks,omitempty"`
Share []*Share `json:"share,omitempty"`
// contains filtered or unexported fields
}
ViewEdges holds the relations/edges for other nodes in the graph.
func (ViewEdges) BgOrErr ¶
BgOrErr returns the Bg value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ViewEdges) BlocksOrErr ¶
BlocksOrErr returns the Blocks value or an error if the edge was not loaded in eager-loading.
func (ViewEdges) ShareOrErr ¶
ShareOrErr returns the Share value or an error if the edge was not loaded in eager-loading.
type ViewGroupBy ¶
type ViewGroupBy struct {
// contains filtered or unexported fields
}
ViewGroupBy is the group-by builder for View entities.
func (*ViewGroupBy) Aggregate ¶
func (vgb *ViewGroupBy) Aggregate(fns ...AggregateFunc) *ViewGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ViewGroupBy) Bool ¶
func (vgb *ViewGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ViewGroupBy) BoolX ¶
func (vgb *ViewGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ViewGroupBy) Bools ¶
func (vgb *ViewGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*ViewGroupBy) BoolsX ¶
func (vgb *ViewGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ViewGroupBy) Float64 ¶
func (vgb *ViewGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ViewGroupBy) Float64X ¶
func (vgb *ViewGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ViewGroupBy) Float64s ¶
func (vgb *ViewGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*ViewGroupBy) Float64sX ¶
func (vgb *ViewGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ViewGroupBy) Int ¶
func (vgb *ViewGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ViewGroupBy) IntX ¶
func (vgb *ViewGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ViewGroupBy) Ints ¶
func (vgb *ViewGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*ViewGroupBy) IntsX ¶
func (vgb *ViewGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ViewGroupBy) Scan ¶
func (vgb *ViewGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ViewGroupBy) ScanX ¶
func (vgb *ViewGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ViewGroupBy) String ¶
func (vgb *ViewGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ViewGroupBy) StringX ¶
func (vgb *ViewGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ViewMutation ¶
type ViewMutation struct {
// contains filtered or unexported fields
}
ViewMutation represents an operation that mutates the View nodes in the graph.
func (*ViewMutation) AddBlockIDs ¶
func (m *ViewMutation) AddBlockIDs(ids ...int)
AddBlockIDs adds the "blocks" edge to the ViewBlock entity by ids.
func (*ViewMutation) AddField ¶
func (m *ViewMutation) 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 (*ViewMutation) AddShareIDs ¶
func (m *ViewMutation) AddShareIDs(ids ...int)
AddShareIDs adds the "share" edge to the Share entity by ids.
func (*ViewMutation) AddedEdges ¶
func (m *ViewMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ViewMutation) AddedField ¶
func (m *ViewMutation) 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 (*ViewMutation) AddedFields ¶
func (m *ViewMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ViewMutation) AddedIDs ¶
func (m *ViewMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ViewMutation) BgCleared ¶
func (m *ViewMutation) BgCleared() bool
BgCleared reports if the "bg" edge to the Assets entity was cleared.
func (*ViewMutation) BgID ¶
func (m *ViewMutation) BgID() (id int, exists bool)
BgID returns the "bg" edge ID in the mutation.
func (*ViewMutation) BgIDs ¶
func (m *ViewMutation) BgIDs() (ids []int)
BgIDs returns the "bg" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BgID instead. It exists only for internal usage by the builders.
func (*ViewMutation) BlocksCleared ¶
func (m *ViewMutation) BlocksCleared() bool
BlocksCleared reports if the "blocks" edge to the ViewBlock entity was cleared.
func (*ViewMutation) BlocksIDs ¶
func (m *ViewMutation) BlocksIDs() (ids []int)
BlocksIDs returns the "blocks" edge IDs in the mutation.
func (*ViewMutation) ClearBg ¶
func (m *ViewMutation) ClearBg()
ClearBg clears the "bg" edge to the Assets entity.
func (*ViewMutation) ClearBlocks ¶
func (m *ViewMutation) ClearBlocks()
ClearBlocks clears the "blocks" edge to the ViewBlock entity.
func (*ViewMutation) ClearEdge ¶
func (m *ViewMutation) 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 (*ViewMutation) ClearField ¶
func (m *ViewMutation) 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 (*ViewMutation) ClearShare ¶
func (m *ViewMutation) ClearShare()
ClearShare clears the "share" edge to the Share entity.
func (*ViewMutation) ClearedEdges ¶
func (m *ViewMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ViewMutation) ClearedFields ¶
func (m *ViewMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ViewMutation) Client ¶
func (m ViewMutation) 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 (*ViewMutation) Config ¶
func (m *ViewMutation) Config() (r string, exists bool)
Config returns the value of the "config" field in the mutation.
func (*ViewMutation) Desc ¶
func (m *ViewMutation) Desc() (r string, exists bool)
Desc returns the value of the "desc" field in the mutation.
func (*ViewMutation) EdgeCleared ¶
func (m *ViewMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ViewMutation) Field ¶
func (m *ViewMutation) 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 (*ViewMutation) FieldCleared ¶
func (m *ViewMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ViewMutation) Fields ¶
func (m *ViewMutation) 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 (*ViewMutation) ID ¶
func (m *ViewMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*ViewMutation) OldConfig ¶
func (m *ViewMutation) OldConfig(ctx context.Context) (v string, err error)
OldConfig returns the old "config" field's value of the View entity. If the View 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 (*ViewMutation) OldDesc ¶
func (m *ViewMutation) OldDesc(ctx context.Context) (v string, err error)
OldDesc returns the old "desc" field's value of the View entity. If the View 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 (*ViewMutation) 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 (*ViewMutation) RemoveBlockIDs ¶
func (m *ViewMutation) RemoveBlockIDs(ids ...int)
RemoveBlockIDs removes the "blocks" edge to the ViewBlock entity by IDs.
func (*ViewMutation) RemoveShareIDs ¶
func (m *ViewMutation) RemoveShareIDs(ids ...int)
RemoveShareIDs removes the "share" edge to the Share entity by IDs.
func (*ViewMutation) RemovedBlocksIDs ¶
func (m *ViewMutation) RemovedBlocksIDs() (ids []int)
RemovedBlocks returns the removed IDs of the "blocks" edge to the ViewBlock entity.
func (*ViewMutation) RemovedEdges ¶
func (m *ViewMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ViewMutation) RemovedIDs ¶
func (m *ViewMutation) 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 (*ViewMutation) RemovedShareIDs ¶
func (m *ViewMutation) RemovedShareIDs() (ids []int)
RemovedShare returns the removed IDs of the "share" edge to the Share entity.
func (*ViewMutation) ResetBg ¶
func (m *ViewMutation) ResetBg()
ResetBg resets all changes to the "bg" edge.
func (*ViewMutation) ResetBlocks ¶
func (m *ViewMutation) ResetBlocks()
ResetBlocks resets all changes to the "blocks" edge.
func (*ViewMutation) ResetConfig ¶
func (m *ViewMutation) ResetConfig()
ResetConfig resets all changes to the "config" field.
func (*ViewMutation) ResetDesc ¶
func (m *ViewMutation) ResetDesc()
ResetDesc resets all changes to the "desc" field.
func (*ViewMutation) ResetEdge ¶
func (m *ViewMutation) 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 (*ViewMutation) ResetField ¶
func (m *ViewMutation) 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 (*ViewMutation) ResetShare ¶
func (m *ViewMutation) ResetShare()
ResetShare resets all changes to the "share" edge.
func (*ViewMutation) SetBgID ¶
func (m *ViewMutation) SetBgID(id int)
SetBgID sets the "bg" edge to the Assets entity by id.
func (*ViewMutation) SetConfig ¶
func (m *ViewMutation) SetConfig(s string)
SetConfig sets the "config" field.
func (*ViewMutation) SetDesc ¶
func (m *ViewMutation) SetDesc(s string)
SetDesc sets the "desc" field.
func (*ViewMutation) SetField ¶
func (m *ViewMutation) 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 (*ViewMutation) ShareCleared ¶
func (m *ViewMutation) ShareCleared() bool
ShareCleared reports if the "share" edge to the Share entity was cleared.
func (*ViewMutation) ShareIDs ¶
func (m *ViewMutation) ShareIDs() (ids []int)
ShareIDs returns the "share" edge IDs in the mutation.
func (ViewMutation) Tx ¶
func (m ViewMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ViewMutation) Type ¶
func (m *ViewMutation) Type() string
Type returns the node type of this mutation (View).
type ViewQuery ¶
type ViewQuery struct {
// contains filtered or unexported fields
}
ViewQuery is the builder for querying View entities.
func (*ViewQuery) Clone ¶
Clone returns a duplicate of the ViewQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ViewQuery) First ¶
First returns the first View entity from the query. Returns a *NotFoundError when no View was found.
func (*ViewQuery) FirstID ¶
FirstID returns the first View ID from the query. Returns a *NotFoundError when no View ID was found.
func (*ViewQuery) GroupBy ¶
func (vq *ViewQuery) GroupBy(field string, fields ...string) *ViewGroupBy
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 {
Desc string `json:"desc,omitempty"`
Count int `json:"count,omitempty"`
}
client.View.Query().
GroupBy(view.FieldDesc).
Aggregate(model.Count()).
Scan(ctx, &v)
func (*ViewQuery) Only ¶
Only returns a single View entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one View entity is not found. Returns a *NotFoundError when no View entities are found.
func (*ViewQuery) OnlyID ¶
OnlyID is like Only, but returns the only View ID in the query. Returns a *NotSingularError when exactly one View ID is not found. Returns a *NotFoundError when no entities are found.
func (*ViewQuery) QueryBg ¶
func (vq *ViewQuery) QueryBg() *AssetsQuery
QueryBg chains the current query on the "bg" edge.
func (*ViewQuery) QueryBlocks ¶
func (vq *ViewQuery) QueryBlocks() *ViewBlockQuery
QueryBlocks chains the current query on the "blocks" edge.
func (*ViewQuery) QueryShare ¶
func (vq *ViewQuery) QueryShare() *ShareQuery
QueryShare chains the current query on the "share" edge.
func (*ViewQuery) Select ¶
func (vq *ViewQuery) Select(field string, fields ...string) *ViewSelect
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 {
Desc string `json:"desc,omitempty"`
}
client.View.Query().
Select(view.FieldDesc).
Scan(ctx, &v)
func (*ViewQuery) 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 (*ViewQuery) WithBg ¶
func (vq *ViewQuery) WithBg(opts ...func(*AssetsQuery)) *ViewQuery
WithBg tells the query-builder to eager-load the nodes that are connected to the "bg" edge. The optional arguments are used to configure the query builder of the edge.
func (*ViewQuery) WithBlocks ¶
func (vq *ViewQuery) WithBlocks(opts ...func(*ViewBlockQuery)) *ViewQuery
WithBlocks tells the query-builder to eager-load the nodes that are connected to the "blocks" edge. The optional arguments are used to configure the query builder of the edge.
func (*ViewQuery) WithShare ¶
func (vq *ViewQuery) WithShare(opts ...func(*ShareQuery)) *ViewQuery
WithShare tells the query-builder to eager-load the nodes that are connected to the "share" edge. The optional arguments are used to configure the query builder of the edge.
type ViewSelect ¶
type ViewSelect struct {
*ViewQuery
// contains filtered or unexported fields
}
ViewSelect is the builder for selecting fields of View entities.
func (*ViewSelect) Bool ¶
func (vs *ViewSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ViewSelect) BoolX ¶
func (vs *ViewSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ViewSelect) Bools ¶
func (vs *ViewSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ViewSelect) BoolsX ¶
func (vs *ViewSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ViewSelect) Float64 ¶
func (vs *ViewSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ViewSelect) Float64X ¶
func (vs *ViewSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ViewSelect) Float64s ¶
func (vs *ViewSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ViewSelect) Float64sX ¶
func (vs *ViewSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ViewSelect) Int ¶
func (vs *ViewSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ViewSelect) IntX ¶
func (vs *ViewSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ViewSelect) Ints ¶
func (vs *ViewSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ViewSelect) IntsX ¶
func (vs *ViewSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ViewSelect) Scan ¶
func (vs *ViewSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ViewSelect) ScanX ¶
func (vs *ViewSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ViewSelect) String ¶
func (vs *ViewSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ViewSelect) StringX ¶
func (vs *ViewSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ViewUpdate ¶
type ViewUpdate struct {
// contains filtered or unexported fields
}
ViewUpdate is the builder for updating View entities.
func (*ViewUpdate) AddBlockIDs ¶
func (vu *ViewUpdate) AddBlockIDs(ids ...int) *ViewUpdate
AddBlockIDs adds the "blocks" edge to the ViewBlock entity by IDs.
func (*ViewUpdate) AddBlocks ¶
func (vu *ViewUpdate) AddBlocks(v ...*ViewBlock) *ViewUpdate
AddBlocks adds the "blocks" edges to the ViewBlock entity.
func (*ViewUpdate) AddShare ¶
func (vu *ViewUpdate) AddShare(s ...*Share) *ViewUpdate
AddShare adds the "share" edges to the Share entity.
func (*ViewUpdate) AddShareIDs ¶
func (vu *ViewUpdate) AddShareIDs(ids ...int) *ViewUpdate
AddShareIDs adds the "share" edge to the Share entity by IDs.
func (*ViewUpdate) ClearBg ¶
func (vu *ViewUpdate) ClearBg() *ViewUpdate
ClearBg clears the "bg" edge to the Assets entity.
func (*ViewUpdate) ClearBlocks ¶
func (vu *ViewUpdate) ClearBlocks() *ViewUpdate
ClearBlocks clears all "blocks" edges to the ViewBlock entity.
func (*ViewUpdate) ClearShare ¶
func (vu *ViewUpdate) ClearShare() *ViewUpdate
ClearShare clears all "share" edges to the Share entity.
func (*ViewUpdate) Exec ¶
func (vu *ViewUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ViewUpdate) ExecX ¶
func (vu *ViewUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ViewUpdate) Mutation ¶
func (vu *ViewUpdate) Mutation() *ViewMutation
Mutation returns the ViewMutation object of the builder.
func (*ViewUpdate) RemoveBlockIDs ¶
func (vu *ViewUpdate) RemoveBlockIDs(ids ...int) *ViewUpdate
RemoveBlockIDs removes the "blocks" edge to ViewBlock entities by IDs.
func (*ViewUpdate) RemoveBlocks ¶
func (vu *ViewUpdate) RemoveBlocks(v ...*ViewBlock) *ViewUpdate
RemoveBlocks removes "blocks" edges to ViewBlock entities.
func (*ViewUpdate) RemoveShare ¶
func (vu *ViewUpdate) RemoveShare(s ...*Share) *ViewUpdate
RemoveShare removes "share" edges to Share entities.
func (*ViewUpdate) RemoveShareIDs ¶
func (vu *ViewUpdate) RemoveShareIDs(ids ...int) *ViewUpdate
RemoveShareIDs removes the "share" edge to Share entities by IDs.
func (*ViewUpdate) Save ¶
func (vu *ViewUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ViewUpdate) SaveX ¶
func (vu *ViewUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ViewUpdate) SetBg ¶
func (vu *ViewUpdate) SetBg(a *Assets) *ViewUpdate
SetBg sets the "bg" edge to the Assets entity.
func (*ViewUpdate) SetBgID ¶
func (vu *ViewUpdate) SetBgID(id int) *ViewUpdate
SetBgID sets the "bg" edge to the Assets entity by ID.
func (*ViewUpdate) SetConfig ¶
func (vu *ViewUpdate) SetConfig(s string) *ViewUpdate
SetConfig sets the "config" field.
func (*ViewUpdate) SetDesc ¶
func (vu *ViewUpdate) SetDesc(s string) *ViewUpdate
SetDesc sets the "desc" field.
func (*ViewUpdate) SetNillableBgID ¶
func (vu *ViewUpdate) SetNillableBgID(id *int) *ViewUpdate
SetNillableBgID sets the "bg" edge to the Assets entity by ID if the given value is not nil.
func (*ViewUpdate) Where ¶
func (vu *ViewUpdate) Where(ps ...predicate.View) *ViewUpdate
Where adds a new predicate for the ViewUpdate builder.
type ViewUpdateOne ¶
type ViewUpdateOne struct {
// contains filtered or unexported fields
}
ViewUpdateOne is the builder for updating a single View entity.
func (*ViewUpdateOne) AddBlockIDs ¶
func (vuo *ViewUpdateOne) AddBlockIDs(ids ...int) *ViewUpdateOne
AddBlockIDs adds the "blocks" edge to the ViewBlock entity by IDs.
func (*ViewUpdateOne) AddBlocks ¶
func (vuo *ViewUpdateOne) AddBlocks(v ...*ViewBlock) *ViewUpdateOne
AddBlocks adds the "blocks" edges to the ViewBlock entity.
func (*ViewUpdateOne) AddShare ¶
func (vuo *ViewUpdateOne) AddShare(s ...*Share) *ViewUpdateOne
AddShare adds the "share" edges to the Share entity.
func (*ViewUpdateOne) AddShareIDs ¶
func (vuo *ViewUpdateOne) AddShareIDs(ids ...int) *ViewUpdateOne
AddShareIDs adds the "share" edge to the Share entity by IDs.
func (*ViewUpdateOne) ClearBg ¶
func (vuo *ViewUpdateOne) ClearBg() *ViewUpdateOne
ClearBg clears the "bg" edge to the Assets entity.
func (*ViewUpdateOne) ClearBlocks ¶
func (vuo *ViewUpdateOne) ClearBlocks() *ViewUpdateOne
ClearBlocks clears all "blocks" edges to the ViewBlock entity.
func (*ViewUpdateOne) ClearShare ¶
func (vuo *ViewUpdateOne) ClearShare() *ViewUpdateOne
ClearShare clears all "share" edges to the Share entity.
func (*ViewUpdateOne) Exec ¶
func (vuo *ViewUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ViewUpdateOne) ExecX ¶
func (vuo *ViewUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ViewUpdateOne) Mutation ¶
func (vuo *ViewUpdateOne) Mutation() *ViewMutation
Mutation returns the ViewMutation object of the builder.
func (*ViewUpdateOne) RemoveBlockIDs ¶
func (vuo *ViewUpdateOne) RemoveBlockIDs(ids ...int) *ViewUpdateOne
RemoveBlockIDs removes the "blocks" edge to ViewBlock entities by IDs.
func (*ViewUpdateOne) RemoveBlocks ¶
func (vuo *ViewUpdateOne) RemoveBlocks(v ...*ViewBlock) *ViewUpdateOne
RemoveBlocks removes "blocks" edges to ViewBlock entities.
func (*ViewUpdateOne) RemoveShare ¶
func (vuo *ViewUpdateOne) RemoveShare(s ...*Share) *ViewUpdateOne
RemoveShare removes "share" edges to Share entities.
func (*ViewUpdateOne) RemoveShareIDs ¶
func (vuo *ViewUpdateOne) RemoveShareIDs(ids ...int) *ViewUpdateOne
RemoveShareIDs removes the "share" edge to Share entities by IDs.
func (*ViewUpdateOne) Save ¶
func (vuo *ViewUpdateOne) Save(ctx context.Context) (*View, error)
Save executes the query and returns the updated View entity.
func (*ViewUpdateOne) SaveX ¶
func (vuo *ViewUpdateOne) SaveX(ctx context.Context) *View
SaveX is like Save, but panics if an error occurs.
func (*ViewUpdateOne) Select ¶
func (vuo *ViewUpdateOne) Select(field string, fields ...string) *ViewUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ViewUpdateOne) SetBg ¶
func (vuo *ViewUpdateOne) SetBg(a *Assets) *ViewUpdateOne
SetBg sets the "bg" edge to the Assets entity.
func (*ViewUpdateOne) SetBgID ¶
func (vuo *ViewUpdateOne) SetBgID(id int) *ViewUpdateOne
SetBgID sets the "bg" edge to the Assets entity by ID.
func (*ViewUpdateOne) SetConfig ¶
func (vuo *ViewUpdateOne) SetConfig(s string) *ViewUpdateOne
SetConfig sets the "config" field.
func (*ViewUpdateOne) SetDesc ¶
func (vuo *ViewUpdateOne) SetDesc(s string) *ViewUpdateOne
SetDesc sets the "desc" field.
func (*ViewUpdateOne) SetNillableBgID ¶
func (vuo *ViewUpdateOne) SetNillableBgID(id *int) *ViewUpdateOne
SetNillableBgID sets the "bg" edge to the Assets entity by ID if the given value is not nil.
Source Files
¶
- assets.go
- assets_create.go
- assets_delete.go
- assets_query.go
- assets_update.go
- client.go
- config.go
- context.go
- curd.go
- dataset.go
- dataset_create.go
- dataset_delete.go
- dataset_query.go
- dataset_update.go
- ent.go
- menu.go
- menu_create.go
- menu_delete.go
- menu_query.go
- menu_update.go
- mutation.go
- runtime.go
- share.go
- share_create.go
- share_delete.go
- share_query.go
- share_update.go
- tx.go
- typeconfig.go
- typeconfig_create.go
- typeconfig_delete.go
- typeconfig_query.go
- typeconfig_update.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- view.go
- view_create.go
- view_delete.go
- view_query.go
- view_update.go
- viewblock.go
- viewblock_create.go
- viewblock_delete.go
- viewblock_query.go
- viewblock_update.go