Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Artist
- type ArtistClient
- func (c *ArtistClient) Create() *ArtistCreate
- func (c *ArtistClient) CreateBulk(builders ...*ArtistCreate) *ArtistCreateBulk
- func (c *ArtistClient) Delete() *ArtistDelete
- func (c *ArtistClient) DeleteOne(a *Artist) *ArtistDeleteOne
- func (c *ArtistClient) DeleteOneID(id int) *ArtistDeleteOne
- func (c *ArtistClient) Get(ctx context.Context, id int) (*Artist, error)
- func (c *ArtistClient) GetX(ctx context.Context, id int) *Artist
- func (c *ArtistClient) Hooks() []Hook
- func (c *ArtistClient) Intercept(interceptors ...Interceptor)
- func (c *ArtistClient) Interceptors() []Interceptor
- func (c *ArtistClient) MapCreateBulk(slice any, setFunc func(*ArtistCreate, int)) *ArtistCreateBulk
- func (c *ArtistClient) Query() *ArtistQuery
- func (c *ArtistClient) QueryPrintings(a *Artist) *PrintingQuery
- func (c *ArtistClient) Update() *ArtistUpdate
- func (c *ArtistClient) UpdateOne(a *Artist) *ArtistUpdateOne
- func (c *ArtistClient) UpdateOneID(id int) *ArtistUpdateOne
- func (c *ArtistClient) Use(hooks ...Hook)
- type ArtistCreate
- func (ac *ArtistCreate) AddPrintingIDs(ids ...int) *ArtistCreate
- func (ac *ArtistCreate) AddPrintings(p ...*Printing) *ArtistCreate
- func (ac *ArtistCreate) Exec(ctx context.Context) error
- func (ac *ArtistCreate) ExecX(ctx context.Context)
- func (ac *ArtistCreate) Mutation() *ArtistMutation
- func (ac *ArtistCreate) Save(ctx context.Context) (*Artist, error)
- func (ac *ArtistCreate) SaveX(ctx context.Context) *Artist
- func (ac *ArtistCreate) SetName(s string) *ArtistCreate
- type ArtistCreateBulk
- type ArtistDelete
- type ArtistDeleteOne
- type ArtistEdges
- type ArtistGroupBy
- func (agb *ArtistGroupBy) Aggregate(fns ...AggregateFunc) *ArtistGroupBy
- func (s *ArtistGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ArtistGroupBy) BoolX(ctx context.Context) bool
- func (s *ArtistGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ArtistGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ArtistGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ArtistGroupBy) Float64X(ctx context.Context) float64
- func (s *ArtistGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ArtistGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ArtistGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ArtistGroupBy) IntX(ctx context.Context) int
- func (s *ArtistGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ArtistGroupBy) IntsX(ctx context.Context) []int
- func (agb *ArtistGroupBy) Scan(ctx context.Context, v any) error
- func (s *ArtistGroupBy) ScanX(ctx context.Context, v any)
- func (s *ArtistGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ArtistGroupBy) StringX(ctx context.Context) string
- func (s *ArtistGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ArtistGroupBy) StringsX(ctx context.Context) []string
- type ArtistMutation
- func (m *ArtistMutation) AddField(name string, value ent.Value) error
- func (m *ArtistMutation) AddPrintingIDs(ids ...int)
- func (m *ArtistMutation) AddedEdges() []string
- func (m *ArtistMutation) AddedField(name string) (ent.Value, bool)
- func (m *ArtistMutation) AddedFields() []string
- func (m *ArtistMutation) AddedIDs(name string) []ent.Value
- func (m *ArtistMutation) ClearEdge(name string) error
- func (m *ArtistMutation) ClearField(name string) error
- func (m *ArtistMutation) ClearPrintings()
- func (m *ArtistMutation) ClearedEdges() []string
- func (m *ArtistMutation) ClearedFields() []string
- func (m ArtistMutation) Client() *Client
- func (m *ArtistMutation) EdgeCleared(name string) bool
- func (m *ArtistMutation) Field(name string) (ent.Value, bool)
- func (m *ArtistMutation) FieldCleared(name string) bool
- func (m *ArtistMutation) Fields() []string
- func (m *ArtistMutation) ID() (id int, exists bool)
- func (m *ArtistMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ArtistMutation) Name() (r string, exists bool)
- func (m *ArtistMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ArtistMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ArtistMutation) Op() Op
- func (m *ArtistMutation) PrintingsCleared() bool
- func (m *ArtistMutation) PrintingsIDs() (ids []int)
- func (m *ArtistMutation) RemovePrintingIDs(ids ...int)
- func (m *ArtistMutation) RemovedEdges() []string
- func (m *ArtistMutation) RemovedIDs(name string) []ent.Value
- func (m *ArtistMutation) RemovedPrintingsIDs() (ids []int)
- func (m *ArtistMutation) ResetEdge(name string) error
- func (m *ArtistMutation) ResetField(name string) error
- func (m *ArtistMutation) ResetName()
- func (m *ArtistMutation) ResetPrintings()
- func (m *ArtistMutation) SetField(name string, value ent.Value) error
- func (m *ArtistMutation) SetName(s string)
- func (m *ArtistMutation) SetOp(op Op)
- func (m ArtistMutation) Tx() (*Tx, error)
- func (m *ArtistMutation) Type() string
- func (m *ArtistMutation) Where(ps ...predicate.Artist)
- func (m *ArtistMutation) WhereP(ps ...func(*sql.Selector))
- type ArtistQuery
- func (aq *ArtistQuery) Aggregate(fns ...AggregateFunc) *ArtistSelect
- func (aq *ArtistQuery) All(ctx context.Context) ([]*Artist, error)
- func (aq *ArtistQuery) AllX(ctx context.Context) []*Artist
- func (aq *ArtistQuery) Clone() *ArtistQuery
- func (aq *ArtistQuery) Count(ctx context.Context) (int, error)
- func (aq *ArtistQuery) CountX(ctx context.Context) int
- func (aq *ArtistQuery) Exist(ctx context.Context) (bool, error)
- func (aq *ArtistQuery) ExistX(ctx context.Context) bool
- func (aq *ArtistQuery) First(ctx context.Context) (*Artist, error)
- func (aq *ArtistQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *ArtistQuery) FirstIDX(ctx context.Context) int
- func (aq *ArtistQuery) FirstX(ctx context.Context) *Artist
- func (aq *ArtistQuery) GroupBy(field string, fields ...string) *ArtistGroupBy
- func (aq *ArtistQuery) IDs(ctx context.Context) (ids []int, err error)
- func (aq *ArtistQuery) IDsX(ctx context.Context) []int
- func (aq *ArtistQuery) Limit(limit int) *ArtistQuery
- func (aq *ArtistQuery) Offset(offset int) *ArtistQuery
- func (aq *ArtistQuery) Only(ctx context.Context) (*Artist, error)
- func (aq *ArtistQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *ArtistQuery) OnlyIDX(ctx context.Context) int
- func (aq *ArtistQuery) OnlyX(ctx context.Context) *Artist
- func (aq *ArtistQuery) Order(o ...artist.OrderOption) *ArtistQuery
- func (aq *ArtistQuery) QueryPrintings() *PrintingQuery
- func (aq *ArtistQuery) Select(fields ...string) *ArtistSelect
- func (aq *ArtistQuery) Unique(unique bool) *ArtistQuery
- func (aq *ArtistQuery) Where(ps ...predicate.Artist) *ArtistQuery
- func (aq *ArtistQuery) WithPrintings(opts ...func(*PrintingQuery)) *ArtistQuery
- type ArtistSelect
- func (as *ArtistSelect) Aggregate(fns ...AggregateFunc) *ArtistSelect
- func (s *ArtistSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ArtistSelect) BoolX(ctx context.Context) bool
- func (s *ArtistSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ArtistSelect) BoolsX(ctx context.Context) []bool
- func (s *ArtistSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ArtistSelect) Float64X(ctx context.Context) float64
- func (s *ArtistSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ArtistSelect) Float64sX(ctx context.Context) []float64
- func (s *ArtistSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ArtistSelect) IntX(ctx context.Context) int
- func (s *ArtistSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ArtistSelect) IntsX(ctx context.Context) []int
- func (as *ArtistSelect) Scan(ctx context.Context, v any) error
- func (s *ArtistSelect) ScanX(ctx context.Context, v any)
- func (s *ArtistSelect) String(ctx context.Context) (_ string, err error)
- func (s *ArtistSelect) StringX(ctx context.Context) string
- func (s *ArtistSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ArtistSelect) StringsX(ctx context.Context) []string
- type ArtistUpdate
- func (au *ArtistUpdate) AddPrintingIDs(ids ...int) *ArtistUpdate
- func (au *ArtistUpdate) AddPrintings(p ...*Printing) *ArtistUpdate
- func (au *ArtistUpdate) ClearPrintings() *ArtistUpdate
- func (au *ArtistUpdate) Exec(ctx context.Context) error
- func (au *ArtistUpdate) ExecX(ctx context.Context)
- func (au *ArtistUpdate) Mutation() *ArtistMutation
- func (au *ArtistUpdate) RemovePrintingIDs(ids ...int) *ArtistUpdate
- func (au *ArtistUpdate) RemovePrintings(p ...*Printing) *ArtistUpdate
- func (au *ArtistUpdate) Save(ctx context.Context) (int, error)
- func (au *ArtistUpdate) SaveX(ctx context.Context) int
- func (au *ArtistUpdate) SetName(s string) *ArtistUpdate
- func (au *ArtistUpdate) SetNillableName(s *string) *ArtistUpdate
- func (au *ArtistUpdate) Where(ps ...predicate.Artist) *ArtistUpdate
- type ArtistUpdateOne
- func (auo *ArtistUpdateOne) AddPrintingIDs(ids ...int) *ArtistUpdateOne
- func (auo *ArtistUpdateOne) AddPrintings(p ...*Printing) *ArtistUpdateOne
- func (auo *ArtistUpdateOne) ClearPrintings() *ArtistUpdateOne
- func (auo *ArtistUpdateOne) Exec(ctx context.Context) error
- func (auo *ArtistUpdateOne) ExecX(ctx context.Context)
- func (auo *ArtistUpdateOne) Mutation() *ArtistMutation
- func (auo *ArtistUpdateOne) RemovePrintingIDs(ids ...int) *ArtistUpdateOne
- func (auo *ArtistUpdateOne) RemovePrintings(p ...*Printing) *ArtistUpdateOne
- func (auo *ArtistUpdateOne) Save(ctx context.Context) (*Artist, error)
- func (auo *ArtistUpdateOne) SaveX(ctx context.Context) *Artist
- func (auo *ArtistUpdateOne) Select(field string, fields ...string) *ArtistUpdateOne
- func (auo *ArtistUpdateOne) SetName(s string) *ArtistUpdateOne
- func (auo *ArtistUpdateOne) SetNillableName(s *string) *ArtistUpdateOne
- func (auo *ArtistUpdateOne) Where(ps ...predicate.Artist) *ArtistUpdateOne
- type Artists
- type Card
- type CardClient
- func (c *CardClient) Create() *CardCreate
- func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk
- func (c *CardClient) Delete() *CardDelete
- func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne
- func (c *CardClient) DeleteOneID(id int) *CardDeleteOne
- func (c *CardClient) Get(ctx context.Context, id int) (*Card, error)
- func (c *CardClient) GetX(ctx context.Context, id int) *Card
- func (c *CardClient) Hooks() []Hook
- func (c *CardClient) Intercept(interceptors ...Interceptor)
- func (c *CardClient) Interceptors() []Interceptor
- func (c *CardClient) MapCreateBulk(slice any, setFunc func(*CardCreate, int)) *CardCreateBulk
- func (c *CardClient) Query() *CardQuery
- func (c *CardClient) QueryFaces(ca *Card) *CardFaceQuery
- func (c *CardClient) QueryRulings(ca *Card) *RulingQuery
- func (c *CardClient) Update() *CardUpdate
- func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne
- func (c *CardClient) UpdateOneID(id int) *CardUpdateOne
- func (c *CardClient) Use(hooks ...Hook)
- type CardCreate
- func (cc *CardCreate) AddFaceIDs(ids ...int) *CardCreate
- func (cc *CardCreate) AddFaces(c ...*CardFace) *CardCreate
- func (cc *CardCreate) AddRulingIDs(ids ...int) *CardCreate
- func (cc *CardCreate) AddRulings(r ...*Ruling) *CardCreate
- func (cc *CardCreate) Exec(ctx context.Context) error
- func (cc *CardCreate) ExecX(ctx context.Context)
- func (cc *CardCreate) Mutation() *CardMutation
- func (cc *CardCreate) Save(ctx context.Context) (*Card, error)
- func (cc *CardCreate) SaveX(ctx context.Context) *Card
- func (cc *CardCreate) SetColorIdentity(u uint8) *CardCreate
- func (cc *CardCreate) SetName(s string) *CardCreate
- func (cc *CardCreate) SetOracleID(s string) *CardCreate
- type CardCreateBulk
- type CardDelete
- type CardDeleteOne
- type CardEdges
- type CardFace
- type CardFaceClient
- func (c *CardFaceClient) Create() *CardFaceCreate
- func (c *CardFaceClient) CreateBulk(builders ...*CardFaceCreate) *CardFaceCreateBulk
- func (c *CardFaceClient) Delete() *CardFaceDelete
- func (c *CardFaceClient) DeleteOne(cf *CardFace) *CardFaceDeleteOne
- func (c *CardFaceClient) DeleteOneID(id int) *CardFaceDeleteOne
- func (c *CardFaceClient) Get(ctx context.Context, id int) (*CardFace, error)
- func (c *CardFaceClient) GetX(ctx context.Context, id int) *CardFace
- func (c *CardFaceClient) Hooks() []Hook
- func (c *CardFaceClient) Intercept(interceptors ...Interceptor)
- func (c *CardFaceClient) Interceptors() []Interceptor
- func (c *CardFaceClient) MapCreateBulk(slice any, setFunc func(*CardFaceCreate, int)) *CardFaceCreateBulk
- func (c *CardFaceClient) Query() *CardFaceQuery
- func (c *CardFaceClient) QueryCard(cf *CardFace) *CardQuery
- func (c *CardFaceClient) QueryPrintings(cf *CardFace) *PrintingQuery
- func (c *CardFaceClient) Update() *CardFaceUpdate
- func (c *CardFaceClient) UpdateOne(cf *CardFace) *CardFaceUpdateOne
- func (c *CardFaceClient) UpdateOneID(id int) *CardFaceUpdateOne
- func (c *CardFaceClient) Use(hooks ...Hook)
- type CardFaceCreate
- func (cfc *CardFaceCreate) AddPrintingIDs(ids ...int) *CardFaceCreate
- func (cfc *CardFaceCreate) AddPrintings(p ...*Printing) *CardFaceCreate
- func (cfc *CardFaceCreate) Exec(ctx context.Context) error
- func (cfc *CardFaceCreate) ExecX(ctx context.Context)
- func (cfc *CardFaceCreate) Mutation() *CardFaceMutation
- func (cfc *CardFaceCreate) Save(ctx context.Context) (*CardFace, error)
- func (cfc *CardFaceCreate) SaveX(ctx context.Context) *CardFace
- func (cfc *CardFaceCreate) SetCard(c *Card) *CardFaceCreate
- func (cfc *CardFaceCreate) SetCardID(id int) *CardFaceCreate
- func (cfc *CardFaceCreate) SetCmc(f float32) *CardFaceCreate
- func (cfc *CardFaceCreate) SetColors(s string) *CardFaceCreate
- func (cfc *CardFaceCreate) SetFlavorText(s string) *CardFaceCreate
- func (cfc *CardFaceCreate) SetLanguage(s string) *CardFaceCreate
- func (cfc *CardFaceCreate) SetLoyalty(s string) *CardFaceCreate
- func (cfc *CardFaceCreate) SetManaCost(s string) *CardFaceCreate
- func (cfc *CardFaceCreate) SetName(s string) *CardFaceCreate
- func (cfc *CardFaceCreate) SetNillableCardID(id *int) *CardFaceCreate
- func (cfc *CardFaceCreate) SetOracleText(s string) *CardFaceCreate
- func (cfc *CardFaceCreate) SetPower(s string) *CardFaceCreate
- func (cfc *CardFaceCreate) SetToughness(s string) *CardFaceCreate
- func (cfc *CardFaceCreate) SetTypeLine(s string) *CardFaceCreate
- type CardFaceCreateBulk
- type CardFaceDelete
- type CardFaceDeleteOne
- type CardFaceEdges
- type CardFaceGroupBy
- func (cfgb *CardFaceGroupBy) Aggregate(fns ...AggregateFunc) *CardFaceGroupBy
- func (s *CardFaceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CardFaceGroupBy) BoolX(ctx context.Context) bool
- func (s *CardFaceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CardFaceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CardFaceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CardFaceGroupBy) Float64X(ctx context.Context) float64
- func (s *CardFaceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CardFaceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CardFaceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CardFaceGroupBy) IntX(ctx context.Context) int
- func (s *CardFaceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CardFaceGroupBy) IntsX(ctx context.Context) []int
- func (cfgb *CardFaceGroupBy) Scan(ctx context.Context, v any) error
- func (s *CardFaceGroupBy) ScanX(ctx context.Context, v any)
- func (s *CardFaceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CardFaceGroupBy) StringX(ctx context.Context) string
- func (s *CardFaceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CardFaceGroupBy) StringsX(ctx context.Context) []string
- type CardFaceMutation
- func (m *CardFaceMutation) AddCmc(f float32)
- func (m *CardFaceMutation) AddField(name string, value ent.Value) error
- func (m *CardFaceMutation) AddPrintingIDs(ids ...int)
- func (m *CardFaceMutation) AddedCmc() (r float32, exists bool)
- func (m *CardFaceMutation) AddedEdges() []string
- func (m *CardFaceMutation) AddedField(name string) (ent.Value, bool)
- func (m *CardFaceMutation) AddedFields() []string
- func (m *CardFaceMutation) AddedIDs(name string) []ent.Value
- func (m *CardFaceMutation) CardCleared() bool
- func (m *CardFaceMutation) CardID() (id int, exists bool)
- func (m *CardFaceMutation) CardIDs() (ids []int)
- func (m *CardFaceMutation) ClearCard()
- func (m *CardFaceMutation) ClearEdge(name string) error
- func (m *CardFaceMutation) ClearField(name string) error
- func (m *CardFaceMutation) ClearPrintings()
- func (m *CardFaceMutation) ClearedEdges() []string
- func (m *CardFaceMutation) ClearedFields() []string
- func (m CardFaceMutation) Client() *Client
- func (m *CardFaceMutation) Cmc() (r float32, exists bool)
- func (m *CardFaceMutation) Colors() (r string, exists bool)
- func (m *CardFaceMutation) EdgeCleared(name string) bool
- func (m *CardFaceMutation) Field(name string) (ent.Value, bool)
- func (m *CardFaceMutation) FieldCleared(name string) bool
- func (m *CardFaceMutation) Fields() []string
- func (m *CardFaceMutation) FlavorText() (r string, exists bool)
- func (m *CardFaceMutation) ID() (id int, exists bool)
- func (m *CardFaceMutation) IDs(ctx context.Context) ([]int, error)
- func (m *CardFaceMutation) Language() (r string, exists bool)
- func (m *CardFaceMutation) Loyalty() (r string, exists bool)
- func (m *CardFaceMutation) ManaCost() (r string, exists bool)
- func (m *CardFaceMutation) Name() (r string, exists bool)
- func (m *CardFaceMutation) OldCmc(ctx context.Context) (v float32, err error)
- func (m *CardFaceMutation) OldColors(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CardFaceMutation) OldFlavorText(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) OldLanguage(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) OldLoyalty(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) OldManaCost(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) OldOracleText(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) OldPower(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) OldToughness(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) OldTypeLine(ctx context.Context) (v string, err error)
- func (m *CardFaceMutation) Op() Op
- func (m *CardFaceMutation) OracleText() (r string, exists bool)
- func (m *CardFaceMutation) Power() (r string, exists bool)
- func (m *CardFaceMutation) PrintingsCleared() bool
- func (m *CardFaceMutation) PrintingsIDs() (ids []int)
- func (m *CardFaceMutation) RemovePrintingIDs(ids ...int)
- func (m *CardFaceMutation) RemovedEdges() []string
- func (m *CardFaceMutation) RemovedIDs(name string) []ent.Value
- func (m *CardFaceMutation) RemovedPrintingsIDs() (ids []int)
- func (m *CardFaceMutation) ResetCard()
- func (m *CardFaceMutation) ResetCmc()
- func (m *CardFaceMutation) ResetColors()
- func (m *CardFaceMutation) ResetEdge(name string) error
- func (m *CardFaceMutation) ResetField(name string) error
- func (m *CardFaceMutation) ResetFlavorText()
- func (m *CardFaceMutation) ResetLanguage()
- func (m *CardFaceMutation) ResetLoyalty()
- func (m *CardFaceMutation) ResetManaCost()
- func (m *CardFaceMutation) ResetName()
- func (m *CardFaceMutation) ResetOracleText()
- func (m *CardFaceMutation) ResetPower()
- func (m *CardFaceMutation) ResetPrintings()
- func (m *CardFaceMutation) ResetToughness()
- func (m *CardFaceMutation) ResetTypeLine()
- func (m *CardFaceMutation) SetCardID(id int)
- func (m *CardFaceMutation) SetCmc(f float32)
- func (m *CardFaceMutation) SetColors(s string)
- func (m *CardFaceMutation) SetField(name string, value ent.Value) error
- func (m *CardFaceMutation) SetFlavorText(s string)
- func (m *CardFaceMutation) SetLanguage(s string)
- func (m *CardFaceMutation) SetLoyalty(s string)
- func (m *CardFaceMutation) SetManaCost(s string)
- func (m *CardFaceMutation) SetName(s string)
- func (m *CardFaceMutation) SetOp(op Op)
- func (m *CardFaceMutation) SetOracleText(s string)
- func (m *CardFaceMutation) SetPower(s string)
- func (m *CardFaceMutation) SetToughness(s string)
- func (m *CardFaceMutation) SetTypeLine(s string)
- func (m *CardFaceMutation) Toughness() (r string, exists bool)
- func (m CardFaceMutation) Tx() (*Tx, error)
- func (m *CardFaceMutation) Type() string
- func (m *CardFaceMutation) TypeLine() (r string, exists bool)
- func (m *CardFaceMutation) Where(ps ...predicate.CardFace)
- func (m *CardFaceMutation) WhereP(ps ...func(*sql.Selector))
- type CardFaceQuery
- func (cfq *CardFaceQuery) Aggregate(fns ...AggregateFunc) *CardFaceSelect
- func (cfq *CardFaceQuery) All(ctx context.Context) ([]*CardFace, error)
- func (cfq *CardFaceQuery) AllX(ctx context.Context) []*CardFace
- func (cfq *CardFaceQuery) Clone() *CardFaceQuery
- func (cfq *CardFaceQuery) Count(ctx context.Context) (int, error)
- func (cfq *CardFaceQuery) CountX(ctx context.Context) int
- func (cfq *CardFaceQuery) Exist(ctx context.Context) (bool, error)
- func (cfq *CardFaceQuery) ExistX(ctx context.Context) bool
- func (cfq *CardFaceQuery) First(ctx context.Context) (*CardFace, error)
- func (cfq *CardFaceQuery) FirstID(ctx context.Context) (id int, err error)
- func (cfq *CardFaceQuery) FirstIDX(ctx context.Context) int
- func (cfq *CardFaceQuery) FirstX(ctx context.Context) *CardFace
- func (cfq *CardFaceQuery) GroupBy(field string, fields ...string) *CardFaceGroupBy
- func (cfq *CardFaceQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cfq *CardFaceQuery) IDsX(ctx context.Context) []int
- func (cfq *CardFaceQuery) Limit(limit int) *CardFaceQuery
- func (cfq *CardFaceQuery) Offset(offset int) *CardFaceQuery
- func (cfq *CardFaceQuery) Only(ctx context.Context) (*CardFace, error)
- func (cfq *CardFaceQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cfq *CardFaceQuery) OnlyIDX(ctx context.Context) int
- func (cfq *CardFaceQuery) OnlyX(ctx context.Context) *CardFace
- func (cfq *CardFaceQuery) Order(o ...cardface.OrderOption) *CardFaceQuery
- func (cfq *CardFaceQuery) QueryCard() *CardQuery
- func (cfq *CardFaceQuery) QueryPrintings() *PrintingQuery
- func (cfq *CardFaceQuery) Select(fields ...string) *CardFaceSelect
- func (cfq *CardFaceQuery) Unique(unique bool) *CardFaceQuery
- func (cfq *CardFaceQuery) Where(ps ...predicate.CardFace) *CardFaceQuery
- func (cfq *CardFaceQuery) WithCard(opts ...func(*CardQuery)) *CardFaceQuery
- func (cfq *CardFaceQuery) WithPrintings(opts ...func(*PrintingQuery)) *CardFaceQuery
- type CardFaceSelect
- func (cfs *CardFaceSelect) Aggregate(fns ...AggregateFunc) *CardFaceSelect
- func (s *CardFaceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CardFaceSelect) BoolX(ctx context.Context) bool
- func (s *CardFaceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CardFaceSelect) BoolsX(ctx context.Context) []bool
- func (s *CardFaceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CardFaceSelect) Float64X(ctx context.Context) float64
- func (s *CardFaceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CardFaceSelect) Float64sX(ctx context.Context) []float64
- func (s *CardFaceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CardFaceSelect) IntX(ctx context.Context) int
- func (s *CardFaceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CardFaceSelect) IntsX(ctx context.Context) []int
- func (cfs *CardFaceSelect) Scan(ctx context.Context, v any) error
- func (s *CardFaceSelect) ScanX(ctx context.Context, v any)
- func (s *CardFaceSelect) String(ctx context.Context) (_ string, err error)
- func (s *CardFaceSelect) StringX(ctx context.Context) string
- func (s *CardFaceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CardFaceSelect) StringsX(ctx context.Context) []string
- type CardFaceUpdate
- func (cfu *CardFaceUpdate) AddCmc(f float32) *CardFaceUpdate
- func (cfu *CardFaceUpdate) AddPrintingIDs(ids ...int) *CardFaceUpdate
- func (cfu *CardFaceUpdate) AddPrintings(p ...*Printing) *CardFaceUpdate
- func (cfu *CardFaceUpdate) ClearCard() *CardFaceUpdate
- func (cfu *CardFaceUpdate) ClearPrintings() *CardFaceUpdate
- func (cfu *CardFaceUpdate) Exec(ctx context.Context) error
- func (cfu *CardFaceUpdate) ExecX(ctx context.Context)
- func (cfu *CardFaceUpdate) Mutation() *CardFaceMutation
- func (cfu *CardFaceUpdate) RemovePrintingIDs(ids ...int) *CardFaceUpdate
- func (cfu *CardFaceUpdate) RemovePrintings(p ...*Printing) *CardFaceUpdate
- func (cfu *CardFaceUpdate) Save(ctx context.Context) (int, error)
- func (cfu *CardFaceUpdate) SaveX(ctx context.Context) int
- func (cfu *CardFaceUpdate) SetCard(c *Card) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetCardID(id int) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetCmc(f float32) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetColors(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetFlavorText(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetLanguage(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetLoyalty(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetManaCost(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetName(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableCardID(id *int) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableCmc(f *float32) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableColors(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableFlavorText(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableLanguage(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableLoyalty(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableManaCost(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableName(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableOracleText(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillablePower(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableToughness(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetNillableTypeLine(s *string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetOracleText(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetPower(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetToughness(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) SetTypeLine(s string) *CardFaceUpdate
- func (cfu *CardFaceUpdate) Where(ps ...predicate.CardFace) *CardFaceUpdate
- type CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) AddCmc(f float32) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) AddPrintingIDs(ids ...int) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) AddPrintings(p ...*Printing) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) ClearCard() *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) ClearPrintings() *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) Exec(ctx context.Context) error
- func (cfuo *CardFaceUpdateOne) ExecX(ctx context.Context)
- func (cfuo *CardFaceUpdateOne) Mutation() *CardFaceMutation
- func (cfuo *CardFaceUpdateOne) RemovePrintingIDs(ids ...int) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) RemovePrintings(p ...*Printing) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) Save(ctx context.Context) (*CardFace, error)
- func (cfuo *CardFaceUpdateOne) SaveX(ctx context.Context) *CardFace
- func (cfuo *CardFaceUpdateOne) Select(field string, fields ...string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetCard(c *Card) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetCardID(id int) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetCmc(f float32) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetColors(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetFlavorText(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetLanguage(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetLoyalty(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetManaCost(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetName(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableCardID(id *int) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableCmc(f *float32) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableColors(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableFlavorText(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableLanguage(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableLoyalty(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableManaCost(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableName(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableOracleText(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillablePower(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableToughness(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetNillableTypeLine(s *string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetOracleText(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetPower(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetToughness(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) SetTypeLine(s string) *CardFaceUpdateOne
- func (cfuo *CardFaceUpdateOne) Where(ps ...predicate.CardFace) *CardFaceUpdateOne
- type CardFaces
- type CardGroupBy
- func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy
- func (s *CardGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CardGroupBy) BoolX(ctx context.Context) bool
- func (s *CardGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CardGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CardGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CardGroupBy) Float64X(ctx context.Context) float64
- func (s *CardGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CardGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CardGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CardGroupBy) IntX(ctx context.Context) int
- func (s *CardGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CardGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CardGroupBy) Scan(ctx context.Context, v any) error
- func (s *CardGroupBy) ScanX(ctx context.Context, v any)
- func (s *CardGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CardGroupBy) StringX(ctx context.Context) string
- func (s *CardGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CardGroupBy) StringsX(ctx context.Context) []string
- type CardMutation
- func (m *CardMutation) AddColorIdentity(u int8)
- func (m *CardMutation) AddFaceIDs(ids ...int)
- func (m *CardMutation) AddField(name string, value ent.Value) error
- func (m *CardMutation) AddRulingIDs(ids ...int)
- func (m *CardMutation) AddedColorIdentity() (r int8, exists bool)
- func (m *CardMutation) AddedEdges() []string
- func (m *CardMutation) AddedField(name string) (ent.Value, bool)
- func (m *CardMutation) AddedFields() []string
- func (m *CardMutation) AddedIDs(name string) []ent.Value
- func (m *CardMutation) ClearEdge(name string) error
- func (m *CardMutation) ClearFaces()
- func (m *CardMutation) ClearField(name string) error
- func (m *CardMutation) ClearRulings()
- func (m *CardMutation) ClearedEdges() []string
- func (m *CardMutation) ClearedFields() []string
- func (m CardMutation) Client() *Client
- func (m *CardMutation) ColorIdentity() (r uint8, exists bool)
- func (m *CardMutation) EdgeCleared(name string) bool
- func (m *CardMutation) FacesCleared() bool
- func (m *CardMutation) FacesIDs() (ids []int)
- func (m *CardMutation) Field(name string) (ent.Value, bool)
- func (m *CardMutation) FieldCleared(name string) bool
- func (m *CardMutation) Fields() []string
- func (m *CardMutation) ID() (id int, exists bool)
- func (m *CardMutation) IDs(ctx context.Context) ([]int, error)
- func (m *CardMutation) Name() (r string, exists bool)
- func (m *CardMutation) OldColorIdentity(ctx context.Context) (v uint8, err error)
- func (m *CardMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CardMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CardMutation) OldOracleID(ctx context.Context) (v string, err error)
- func (m *CardMutation) Op() Op
- func (m *CardMutation) OracleID() (r string, exists bool)
- func (m *CardMutation) RemoveFaceIDs(ids ...int)
- func (m *CardMutation) RemoveRulingIDs(ids ...int)
- func (m *CardMutation) RemovedEdges() []string
- func (m *CardMutation) RemovedFacesIDs() (ids []int)
- func (m *CardMutation) RemovedIDs(name string) []ent.Value
- func (m *CardMutation) RemovedRulingsIDs() (ids []int)
- func (m *CardMutation) ResetColorIdentity()
- func (m *CardMutation) ResetEdge(name string) error
- func (m *CardMutation) ResetFaces()
- func (m *CardMutation) ResetField(name string) error
- func (m *CardMutation) ResetName()
- func (m *CardMutation) ResetOracleID()
- func (m *CardMutation) ResetRulings()
- func (m *CardMutation) RulingsCleared() bool
- func (m *CardMutation) RulingsIDs() (ids []int)
- func (m *CardMutation) SetColorIdentity(u uint8)
- func (m *CardMutation) SetField(name string, value ent.Value) error
- func (m *CardMutation) SetName(s string)
- func (m *CardMutation) SetOp(op Op)
- func (m *CardMutation) SetOracleID(s string)
- func (m CardMutation) Tx() (*Tx, error)
- func (m *CardMutation) Type() string
- func (m *CardMutation) Where(ps ...predicate.Card)
- func (m *CardMutation) WhereP(ps ...func(*sql.Selector))
- type CardQuery
- func (cq *CardQuery) Aggregate(fns ...AggregateFunc) *CardSelect
- func (cq *CardQuery) All(ctx context.Context) ([]*Card, error)
- func (cq *CardQuery) AllX(ctx context.Context) []*Card
- func (cq *CardQuery) Clone() *CardQuery
- func (cq *CardQuery) Count(ctx context.Context) (int, error)
- func (cq *CardQuery) CountX(ctx context.Context) int
- func (cq *CardQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CardQuery) ExistX(ctx context.Context) bool
- func (cq *CardQuery) First(ctx context.Context) (*Card, error)
- func (cq *CardQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *CardQuery) FirstIDX(ctx context.Context) int
- func (cq *CardQuery) FirstX(ctx context.Context) *Card
- func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy
- func (cq *CardQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cq *CardQuery) IDsX(ctx context.Context) []int
- func (cq *CardQuery) Limit(limit int) *CardQuery
- func (cq *CardQuery) Offset(offset int) *CardQuery
- func (cq *CardQuery) Only(ctx context.Context) (*Card, error)
- func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *CardQuery) OnlyIDX(ctx context.Context) int
- func (cq *CardQuery) OnlyX(ctx context.Context) *Card
- func (cq *CardQuery) Order(o ...card.OrderOption) *CardQuery
- func (cq *CardQuery) QueryFaces() *CardFaceQuery
- func (cq *CardQuery) QueryRulings() *RulingQuery
- func (cq *CardQuery) Select(fields ...string) *CardSelect
- func (cq *CardQuery) Unique(unique bool) *CardQuery
- func (cq *CardQuery) Where(ps ...predicate.Card) *CardQuery
- func (cq *CardQuery) WithFaces(opts ...func(*CardFaceQuery)) *CardQuery
- func (cq *CardQuery) WithRulings(opts ...func(*RulingQuery)) *CardQuery
- type CardSelect
- func (cs *CardSelect) Aggregate(fns ...AggregateFunc) *CardSelect
- func (s *CardSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CardSelect) BoolX(ctx context.Context) bool
- func (s *CardSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CardSelect) BoolsX(ctx context.Context) []bool
- func (s *CardSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CardSelect) Float64X(ctx context.Context) float64
- func (s *CardSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CardSelect) Float64sX(ctx context.Context) []float64
- func (s *CardSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CardSelect) IntX(ctx context.Context) int
- func (s *CardSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CardSelect) IntsX(ctx context.Context) []int
- func (cs *CardSelect) Scan(ctx context.Context, v any) error
- func (s *CardSelect) ScanX(ctx context.Context, v any)
- func (s *CardSelect) String(ctx context.Context) (_ string, err error)
- func (s *CardSelect) StringX(ctx context.Context) string
- func (s *CardSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CardSelect) StringsX(ctx context.Context) []string
- type CardUpdate
- func (cu *CardUpdate) AddColorIdentity(u int8) *CardUpdate
- func (cu *CardUpdate) AddFaceIDs(ids ...int) *CardUpdate
- func (cu *CardUpdate) AddFaces(c ...*CardFace) *CardUpdate
- func (cu *CardUpdate) AddRulingIDs(ids ...int) *CardUpdate
- func (cu *CardUpdate) AddRulings(r ...*Ruling) *CardUpdate
- func (cu *CardUpdate) ClearFaces() *CardUpdate
- func (cu *CardUpdate) ClearRulings() *CardUpdate
- func (cu *CardUpdate) Exec(ctx context.Context) error
- func (cu *CardUpdate) ExecX(ctx context.Context)
- func (cu *CardUpdate) Mutation() *CardMutation
- func (cu *CardUpdate) RemoveFaceIDs(ids ...int) *CardUpdate
- func (cu *CardUpdate) RemoveFaces(c ...*CardFace) *CardUpdate
- func (cu *CardUpdate) RemoveRulingIDs(ids ...int) *CardUpdate
- func (cu *CardUpdate) RemoveRulings(r ...*Ruling) *CardUpdate
- func (cu *CardUpdate) Save(ctx context.Context) (int, error)
- func (cu *CardUpdate) SaveX(ctx context.Context) int
- func (cu *CardUpdate) SetColorIdentity(u uint8) *CardUpdate
- func (cu *CardUpdate) SetName(s string) *CardUpdate
- func (cu *CardUpdate) SetNillableColorIdentity(u *uint8) *CardUpdate
- func (cu *CardUpdate) SetNillableName(s *string) *CardUpdate
- func (cu *CardUpdate) SetNillableOracleID(s *string) *CardUpdate
- func (cu *CardUpdate) SetOracleID(s string) *CardUpdate
- func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate
- type CardUpdateOne
- func (cuo *CardUpdateOne) AddColorIdentity(u int8) *CardUpdateOne
- func (cuo *CardUpdateOne) AddFaceIDs(ids ...int) *CardUpdateOne
- func (cuo *CardUpdateOne) AddFaces(c ...*CardFace) *CardUpdateOne
- func (cuo *CardUpdateOne) AddRulingIDs(ids ...int) *CardUpdateOne
- func (cuo *CardUpdateOne) AddRulings(r ...*Ruling) *CardUpdateOne
- func (cuo *CardUpdateOne) ClearFaces() *CardUpdateOne
- func (cuo *CardUpdateOne) ClearRulings() *CardUpdateOne
- func (cuo *CardUpdateOne) Exec(ctx context.Context) error
- func (cuo *CardUpdateOne) ExecX(ctx context.Context)
- func (cuo *CardUpdateOne) Mutation() *CardMutation
- func (cuo *CardUpdateOne) RemoveFaceIDs(ids ...int) *CardUpdateOne
- func (cuo *CardUpdateOne) RemoveFaces(c ...*CardFace) *CardUpdateOne
- func (cuo *CardUpdateOne) RemoveRulingIDs(ids ...int) *CardUpdateOne
- func (cuo *CardUpdateOne) RemoveRulings(r ...*Ruling) *CardUpdateOne
- func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)
- func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card
- func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetColorIdentity(u uint8) *CardUpdateOne
- func (cuo *CardUpdateOne) SetName(s string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableColorIdentity(u *uint8) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableName(s *string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableOracleID(s *string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetOracleID(s string) *CardUpdateOne
- func (cuo *CardUpdateOne) Where(ps ...predicate.Card) *CardUpdateOne
- type Cards
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Printing
- func (pr *Printing) QueryArtist() *ArtistQuery
- func (pr *Printing) QueryCardFace() *CardFaceQuery
- func (pr *Printing) QueryImages() *PrintingImageQuery
- func (pr *Printing) QuerySet() *SetQuery
- func (pr *Printing) String() string
- func (pr *Printing) Unwrap() *Printing
- func (pr *Printing) Update() *PrintingUpdateOne
- func (pr *Printing) Value(name string) (ent.Value, error)
- type PrintingClient
- func (c *PrintingClient) Create() *PrintingCreate
- func (c *PrintingClient) CreateBulk(builders ...*PrintingCreate) *PrintingCreateBulk
- func (c *PrintingClient) Delete() *PrintingDelete
- func (c *PrintingClient) DeleteOne(pr *Printing) *PrintingDeleteOne
- func (c *PrintingClient) DeleteOneID(id int) *PrintingDeleteOne
- func (c *PrintingClient) Get(ctx context.Context, id int) (*Printing, error)
- func (c *PrintingClient) GetX(ctx context.Context, id int) *Printing
- func (c *PrintingClient) Hooks() []Hook
- func (c *PrintingClient) Intercept(interceptors ...Interceptor)
- func (c *PrintingClient) Interceptors() []Interceptor
- func (c *PrintingClient) MapCreateBulk(slice any, setFunc func(*PrintingCreate, int)) *PrintingCreateBulk
- func (c *PrintingClient) Query() *PrintingQuery
- func (c *PrintingClient) QueryArtist(pr *Printing) *ArtistQuery
- func (c *PrintingClient) QueryCardFace(pr *Printing) *CardFaceQuery
- func (c *PrintingClient) QueryImages(pr *Printing) *PrintingImageQuery
- func (c *PrintingClient) QuerySet(pr *Printing) *SetQuery
- func (c *PrintingClient) Update() *PrintingUpdate
- func (c *PrintingClient) UpdateOne(pr *Printing) *PrintingUpdateOne
- func (c *PrintingClient) UpdateOneID(id int) *PrintingUpdateOne
- func (c *PrintingClient) Use(hooks ...Hook)
- type PrintingCreate
- func (pc *PrintingCreate) AddImageIDs(ids ...int) *PrintingCreate
- func (pc *PrintingCreate) AddImages(p ...*PrintingImage) *PrintingCreate
- func (pc *PrintingCreate) Exec(ctx context.Context) error
- func (pc *PrintingCreate) ExecX(ctx context.Context)
- func (pc *PrintingCreate) Mutation() *PrintingMutation
- func (pc *PrintingCreate) Save(ctx context.Context) (*Printing, error)
- func (pc *PrintingCreate) SaveX(ctx context.Context) *Printing
- func (pc *PrintingCreate) SetArtist(a *Artist) *PrintingCreate
- func (pc *PrintingCreate) SetArtistID(id int) *PrintingCreate
- func (pc *PrintingCreate) SetCardFace(c *CardFace) *PrintingCreate
- func (pc *PrintingCreate) SetCardFaceID(id int) *PrintingCreate
- func (pc *PrintingCreate) SetNillableArtistID(id *int) *PrintingCreate
- func (pc *PrintingCreate) SetNillableCardFaceID(id *int) *PrintingCreate
- func (pc *PrintingCreate) SetNillableSetID(id *int) *PrintingCreate
- func (pc *PrintingCreate) SetRarity(pr printing.Rarity) *PrintingCreate
- func (pc *PrintingCreate) SetSet(s *Set) *PrintingCreate
- func (pc *PrintingCreate) SetSetID(id int) *PrintingCreate
- type PrintingCreateBulk
- type PrintingDelete
- type PrintingDeleteOne
- type PrintingEdges
- type PrintingGroupBy
- func (pgb *PrintingGroupBy) Aggregate(fns ...AggregateFunc) *PrintingGroupBy
- func (s *PrintingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PrintingGroupBy) BoolX(ctx context.Context) bool
- func (s *PrintingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PrintingGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PrintingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PrintingGroupBy) Float64X(ctx context.Context) float64
- func (s *PrintingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PrintingGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PrintingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PrintingGroupBy) IntX(ctx context.Context) int
- func (s *PrintingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PrintingGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PrintingGroupBy) Scan(ctx context.Context, v any) error
- func (s *PrintingGroupBy) ScanX(ctx context.Context, v any)
- func (s *PrintingGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PrintingGroupBy) StringX(ctx context.Context) string
- func (s *PrintingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PrintingGroupBy) StringsX(ctx context.Context) []string
- type PrintingImage
- type PrintingImageClient
- func (c *PrintingImageClient) Create() *PrintingImageCreate
- func (c *PrintingImageClient) CreateBulk(builders ...*PrintingImageCreate) *PrintingImageCreateBulk
- func (c *PrintingImageClient) Delete() *PrintingImageDelete
- func (c *PrintingImageClient) DeleteOne(pi *PrintingImage) *PrintingImageDeleteOne
- func (c *PrintingImageClient) DeleteOneID(id int) *PrintingImageDeleteOne
- func (c *PrintingImageClient) Get(ctx context.Context, id int) (*PrintingImage, error)
- func (c *PrintingImageClient) GetX(ctx context.Context, id int) *PrintingImage
- func (c *PrintingImageClient) Hooks() []Hook
- func (c *PrintingImageClient) Intercept(interceptors ...Interceptor)
- func (c *PrintingImageClient) Interceptors() []Interceptor
- func (c *PrintingImageClient) MapCreateBulk(slice any, setFunc func(*PrintingImageCreate, int)) *PrintingImageCreateBulk
- func (c *PrintingImageClient) Query() *PrintingImageQuery
- func (c *PrintingImageClient) QueryPrinting(pi *PrintingImage) *PrintingQuery
- func (c *PrintingImageClient) Update() *PrintingImageUpdate
- func (c *PrintingImageClient) UpdateOne(pi *PrintingImage) *PrintingImageUpdateOne
- func (c *PrintingImageClient) UpdateOneID(id int) *PrintingImageUpdateOne
- func (c *PrintingImageClient) Use(hooks ...Hook)
- type PrintingImageCreate
- func (pic *PrintingImageCreate) Exec(ctx context.Context) error
- func (pic *PrintingImageCreate) ExecX(ctx context.Context)
- func (pic *PrintingImageCreate) Mutation() *PrintingImageMutation
- func (pic *PrintingImageCreate) Save(ctx context.Context) (*PrintingImage, error)
- func (pic *PrintingImageCreate) SaveX(ctx context.Context) *PrintingImage
- func (pic *PrintingImageCreate) SetNillablePrintingID(id *int) *PrintingImageCreate
- func (pic *PrintingImageCreate) SetPrinting(p *Printing) *PrintingImageCreate
- func (pic *PrintingImageCreate) SetPrintingID(id int) *PrintingImageCreate
- func (pic *PrintingImageCreate) SetURL(s string) *PrintingImageCreate
- type PrintingImageCreateBulk
- func (picb *PrintingImageCreateBulk) Exec(ctx context.Context) error
- func (picb *PrintingImageCreateBulk) ExecX(ctx context.Context)
- func (picb *PrintingImageCreateBulk) Save(ctx context.Context) ([]*PrintingImage, error)
- func (picb *PrintingImageCreateBulk) SaveX(ctx context.Context) []*PrintingImage
- type PrintingImageDelete
- type PrintingImageDeleteOne
- type PrintingImageEdges
- type PrintingImageGroupBy
- func (pigb *PrintingImageGroupBy) Aggregate(fns ...AggregateFunc) *PrintingImageGroupBy
- func (s *PrintingImageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PrintingImageGroupBy) BoolX(ctx context.Context) bool
- func (s *PrintingImageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PrintingImageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PrintingImageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PrintingImageGroupBy) Float64X(ctx context.Context) float64
- func (s *PrintingImageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PrintingImageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PrintingImageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PrintingImageGroupBy) IntX(ctx context.Context) int
- func (s *PrintingImageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PrintingImageGroupBy) IntsX(ctx context.Context) []int
- func (pigb *PrintingImageGroupBy) Scan(ctx context.Context, v any) error
- func (s *PrintingImageGroupBy) ScanX(ctx context.Context, v any)
- func (s *PrintingImageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PrintingImageGroupBy) StringX(ctx context.Context) string
- func (s *PrintingImageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PrintingImageGroupBy) StringsX(ctx context.Context) []string
- type PrintingImageMutation
- func (m *PrintingImageMutation) AddField(name string, value ent.Value) error
- func (m *PrintingImageMutation) AddedEdges() []string
- func (m *PrintingImageMutation) AddedField(name string) (ent.Value, bool)
- func (m *PrintingImageMutation) AddedFields() []string
- func (m *PrintingImageMutation) AddedIDs(name string) []ent.Value
- func (m *PrintingImageMutation) ClearEdge(name string) error
- func (m *PrintingImageMutation) ClearField(name string) error
- func (m *PrintingImageMutation) ClearPrinting()
- func (m *PrintingImageMutation) ClearedEdges() []string
- func (m *PrintingImageMutation) ClearedFields() []string
- func (m PrintingImageMutation) Client() *Client
- func (m *PrintingImageMutation) EdgeCleared(name string) bool
- func (m *PrintingImageMutation) Field(name string) (ent.Value, bool)
- func (m *PrintingImageMutation) FieldCleared(name string) bool
- func (m *PrintingImageMutation) Fields() []string
- func (m *PrintingImageMutation) ID() (id int, exists bool)
- func (m *PrintingImageMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PrintingImageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PrintingImageMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *PrintingImageMutation) Op() Op
- func (m *PrintingImageMutation) PrintingCleared() bool
- func (m *PrintingImageMutation) PrintingID() (id int, exists bool)
- func (m *PrintingImageMutation) PrintingIDs() (ids []int)
- func (m *PrintingImageMutation) RemovedEdges() []string
- func (m *PrintingImageMutation) RemovedIDs(name string) []ent.Value
- func (m *PrintingImageMutation) ResetEdge(name string) error
- func (m *PrintingImageMutation) ResetField(name string) error
- func (m *PrintingImageMutation) ResetPrinting()
- func (m *PrintingImageMutation) ResetURL()
- func (m *PrintingImageMutation) SetField(name string, value ent.Value) error
- func (m *PrintingImageMutation) SetOp(op Op)
- func (m *PrintingImageMutation) SetPrintingID(id int)
- func (m *PrintingImageMutation) SetURL(s string)
- func (m PrintingImageMutation) Tx() (*Tx, error)
- func (m *PrintingImageMutation) Type() string
- func (m *PrintingImageMutation) URL() (r string, exists bool)
- func (m *PrintingImageMutation) Where(ps ...predicate.PrintingImage)
- func (m *PrintingImageMutation) WhereP(ps ...func(*sql.Selector))
- type PrintingImageQuery
- func (piq *PrintingImageQuery) Aggregate(fns ...AggregateFunc) *PrintingImageSelect
- func (piq *PrintingImageQuery) All(ctx context.Context) ([]*PrintingImage, error)
- func (piq *PrintingImageQuery) AllX(ctx context.Context) []*PrintingImage
- func (piq *PrintingImageQuery) Clone() *PrintingImageQuery
- func (piq *PrintingImageQuery) Count(ctx context.Context) (int, error)
- func (piq *PrintingImageQuery) CountX(ctx context.Context) int
- func (piq *PrintingImageQuery) Exist(ctx context.Context) (bool, error)
- func (piq *PrintingImageQuery) ExistX(ctx context.Context) bool
- func (piq *PrintingImageQuery) First(ctx context.Context) (*PrintingImage, error)
- func (piq *PrintingImageQuery) FirstID(ctx context.Context) (id int, err error)
- func (piq *PrintingImageQuery) FirstIDX(ctx context.Context) int
- func (piq *PrintingImageQuery) FirstX(ctx context.Context) *PrintingImage
- func (piq *PrintingImageQuery) GroupBy(field string, fields ...string) *PrintingImageGroupBy
- func (piq *PrintingImageQuery) IDs(ctx context.Context) (ids []int, err error)
- func (piq *PrintingImageQuery) IDsX(ctx context.Context) []int
- func (piq *PrintingImageQuery) Limit(limit int) *PrintingImageQuery
- func (piq *PrintingImageQuery) Offset(offset int) *PrintingImageQuery
- func (piq *PrintingImageQuery) Only(ctx context.Context) (*PrintingImage, error)
- func (piq *PrintingImageQuery) OnlyID(ctx context.Context) (id int, err error)
- func (piq *PrintingImageQuery) OnlyIDX(ctx context.Context) int
- func (piq *PrintingImageQuery) OnlyX(ctx context.Context) *PrintingImage
- func (piq *PrintingImageQuery) Order(o ...printingimage.OrderOption) *PrintingImageQuery
- func (piq *PrintingImageQuery) QueryPrinting() *PrintingQuery
- func (piq *PrintingImageQuery) Select(fields ...string) *PrintingImageSelect
- func (piq *PrintingImageQuery) Unique(unique bool) *PrintingImageQuery
- func (piq *PrintingImageQuery) Where(ps ...predicate.PrintingImage) *PrintingImageQuery
- func (piq *PrintingImageQuery) WithPrinting(opts ...func(*PrintingQuery)) *PrintingImageQuery
- type PrintingImageSelect
- func (pis *PrintingImageSelect) Aggregate(fns ...AggregateFunc) *PrintingImageSelect
- func (s *PrintingImageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PrintingImageSelect) BoolX(ctx context.Context) bool
- func (s *PrintingImageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PrintingImageSelect) BoolsX(ctx context.Context) []bool
- func (s *PrintingImageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PrintingImageSelect) Float64X(ctx context.Context) float64
- func (s *PrintingImageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PrintingImageSelect) Float64sX(ctx context.Context) []float64
- func (s *PrintingImageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PrintingImageSelect) IntX(ctx context.Context) int
- func (s *PrintingImageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PrintingImageSelect) IntsX(ctx context.Context) []int
- func (pis *PrintingImageSelect) Scan(ctx context.Context, v any) error
- func (s *PrintingImageSelect) ScanX(ctx context.Context, v any)
- func (s *PrintingImageSelect) String(ctx context.Context) (_ string, err error)
- func (s *PrintingImageSelect) StringX(ctx context.Context) string
- func (s *PrintingImageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PrintingImageSelect) StringsX(ctx context.Context) []string
- type PrintingImageUpdate
- func (piu *PrintingImageUpdate) ClearPrinting() *PrintingImageUpdate
- func (piu *PrintingImageUpdate) Exec(ctx context.Context) error
- func (piu *PrintingImageUpdate) ExecX(ctx context.Context)
- func (piu *PrintingImageUpdate) Mutation() *PrintingImageMutation
- func (piu *PrintingImageUpdate) Save(ctx context.Context) (int, error)
- func (piu *PrintingImageUpdate) SaveX(ctx context.Context) int
- func (piu *PrintingImageUpdate) SetNillablePrintingID(id *int) *PrintingImageUpdate
- func (piu *PrintingImageUpdate) SetNillableURL(s *string) *PrintingImageUpdate
- func (piu *PrintingImageUpdate) SetPrinting(p *Printing) *PrintingImageUpdate
- func (piu *PrintingImageUpdate) SetPrintingID(id int) *PrintingImageUpdate
- func (piu *PrintingImageUpdate) SetURL(s string) *PrintingImageUpdate
- func (piu *PrintingImageUpdate) Where(ps ...predicate.PrintingImage) *PrintingImageUpdate
- type PrintingImageUpdateOne
- func (piuo *PrintingImageUpdateOne) ClearPrinting() *PrintingImageUpdateOne
- func (piuo *PrintingImageUpdateOne) Exec(ctx context.Context) error
- func (piuo *PrintingImageUpdateOne) ExecX(ctx context.Context)
- func (piuo *PrintingImageUpdateOne) Mutation() *PrintingImageMutation
- func (piuo *PrintingImageUpdateOne) Save(ctx context.Context) (*PrintingImage, error)
- func (piuo *PrintingImageUpdateOne) SaveX(ctx context.Context) *PrintingImage
- func (piuo *PrintingImageUpdateOne) Select(field string, fields ...string) *PrintingImageUpdateOne
- func (piuo *PrintingImageUpdateOne) SetNillablePrintingID(id *int) *PrintingImageUpdateOne
- func (piuo *PrintingImageUpdateOne) SetNillableURL(s *string) *PrintingImageUpdateOne
- func (piuo *PrintingImageUpdateOne) SetPrinting(p *Printing) *PrintingImageUpdateOne
- func (piuo *PrintingImageUpdateOne) SetPrintingID(id int) *PrintingImageUpdateOne
- func (piuo *PrintingImageUpdateOne) SetURL(s string) *PrintingImageUpdateOne
- func (piuo *PrintingImageUpdateOne) Where(ps ...predicate.PrintingImage) *PrintingImageUpdateOne
- type PrintingImages
- type PrintingMutation
- func (m *PrintingMutation) AddField(name string, value ent.Value) error
- func (m *PrintingMutation) AddImageIDs(ids ...int)
- func (m *PrintingMutation) AddedEdges() []string
- func (m *PrintingMutation) AddedField(name string) (ent.Value, bool)
- func (m *PrintingMutation) AddedFields() []string
- func (m *PrintingMutation) AddedIDs(name string) []ent.Value
- func (m *PrintingMutation) ArtistCleared() bool
- func (m *PrintingMutation) ArtistID() (id int, exists bool)
- func (m *PrintingMutation) ArtistIDs() (ids []int)
- func (m *PrintingMutation) CardFaceCleared() bool
- func (m *PrintingMutation) CardFaceID() (id int, exists bool)
- func (m *PrintingMutation) CardFaceIDs() (ids []int)
- func (m *PrintingMutation) ClearArtist()
- func (m *PrintingMutation) ClearCardFace()
- func (m *PrintingMutation) ClearEdge(name string) error
- func (m *PrintingMutation) ClearField(name string) error
- func (m *PrintingMutation) ClearImages()
- func (m *PrintingMutation) ClearSet()
- func (m *PrintingMutation) ClearedEdges() []string
- func (m *PrintingMutation) ClearedFields() []string
- func (m PrintingMutation) Client() *Client
- func (m *PrintingMutation) EdgeCleared(name string) bool
- func (m *PrintingMutation) Field(name string) (ent.Value, bool)
- func (m *PrintingMutation) FieldCleared(name string) bool
- func (m *PrintingMutation) Fields() []string
- func (m *PrintingMutation) ID() (id int, exists bool)
- func (m *PrintingMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PrintingMutation) ImagesCleared() bool
- func (m *PrintingMutation) ImagesIDs() (ids []int)
- func (m *PrintingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PrintingMutation) OldRarity(ctx context.Context) (v printing.Rarity, err error)
- func (m *PrintingMutation) Op() Op
- func (m *PrintingMutation) Rarity() (r printing.Rarity, exists bool)
- func (m *PrintingMutation) RemoveImageIDs(ids ...int)
- func (m *PrintingMutation) RemovedEdges() []string
- func (m *PrintingMutation) RemovedIDs(name string) []ent.Value
- func (m *PrintingMutation) RemovedImagesIDs() (ids []int)
- func (m *PrintingMutation) ResetArtist()
- func (m *PrintingMutation) ResetCardFace()
- func (m *PrintingMutation) ResetEdge(name string) error
- func (m *PrintingMutation) ResetField(name string) error
- func (m *PrintingMutation) ResetImages()
- func (m *PrintingMutation) ResetRarity()
- func (m *PrintingMutation) ResetSet()
- func (m *PrintingMutation) SetArtistID(id int)
- func (m *PrintingMutation) SetCardFaceID(id int)
- func (m *PrintingMutation) SetCleared() bool
- func (m *PrintingMutation) SetField(name string, value ent.Value) error
- func (m *PrintingMutation) SetID() (id int, exists bool)
- func (m *PrintingMutation) SetIDs() (ids []int)
- func (m *PrintingMutation) SetOp(op Op)
- func (m *PrintingMutation) SetRarity(pr printing.Rarity)
- func (m *PrintingMutation) SetSetID(id int)
- func (m PrintingMutation) Tx() (*Tx, error)
- func (m *PrintingMutation) Type() string
- func (m *PrintingMutation) Where(ps ...predicate.Printing)
- func (m *PrintingMutation) WhereP(ps ...func(*sql.Selector))
- type PrintingQuery
- func (pq *PrintingQuery) Aggregate(fns ...AggregateFunc) *PrintingSelect
- func (pq *PrintingQuery) All(ctx context.Context) ([]*Printing, error)
- func (pq *PrintingQuery) AllX(ctx context.Context) []*Printing
- func (pq *PrintingQuery) Clone() *PrintingQuery
- func (pq *PrintingQuery) Count(ctx context.Context) (int, error)
- func (pq *PrintingQuery) CountX(ctx context.Context) int
- func (pq *PrintingQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PrintingQuery) ExistX(ctx context.Context) bool
- func (pq *PrintingQuery) First(ctx context.Context) (*Printing, error)
- func (pq *PrintingQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PrintingQuery) FirstIDX(ctx context.Context) int
- func (pq *PrintingQuery) FirstX(ctx context.Context) *Printing
- func (pq *PrintingQuery) GroupBy(field string, fields ...string) *PrintingGroupBy
- func (pq *PrintingQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *PrintingQuery) IDsX(ctx context.Context) []int
- func (pq *PrintingQuery) Limit(limit int) *PrintingQuery
- func (pq *PrintingQuery) Offset(offset int) *PrintingQuery
- func (pq *PrintingQuery) Only(ctx context.Context) (*Printing, error)
- func (pq *PrintingQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PrintingQuery) OnlyIDX(ctx context.Context) int
- func (pq *PrintingQuery) OnlyX(ctx context.Context) *Printing
- func (pq *PrintingQuery) Order(o ...printing.OrderOption) *PrintingQuery
- func (pq *PrintingQuery) QueryArtist() *ArtistQuery
- func (pq *PrintingQuery) QueryCardFace() *CardFaceQuery
- func (pq *PrintingQuery) QueryImages() *PrintingImageQuery
- func (pq *PrintingQuery) QuerySet() *SetQuery
- func (pq *PrintingQuery) Select(fields ...string) *PrintingSelect
- func (pq *PrintingQuery) Unique(unique bool) *PrintingQuery
- func (pq *PrintingQuery) Where(ps ...predicate.Printing) *PrintingQuery
- func (pq *PrintingQuery) WithArtist(opts ...func(*ArtistQuery)) *PrintingQuery
- func (pq *PrintingQuery) WithCardFace(opts ...func(*CardFaceQuery)) *PrintingQuery
- func (pq *PrintingQuery) WithImages(opts ...func(*PrintingImageQuery)) *PrintingQuery
- func (pq *PrintingQuery) WithSet(opts ...func(*SetQuery)) *PrintingQuery
- type PrintingSelect
- func (ps *PrintingSelect) Aggregate(fns ...AggregateFunc) *PrintingSelect
- func (s *PrintingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PrintingSelect) BoolX(ctx context.Context) bool
- func (s *PrintingSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PrintingSelect) BoolsX(ctx context.Context) []bool
- func (s *PrintingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PrintingSelect) Float64X(ctx context.Context) float64
- func (s *PrintingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PrintingSelect) Float64sX(ctx context.Context) []float64
- func (s *PrintingSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PrintingSelect) IntX(ctx context.Context) int
- func (s *PrintingSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PrintingSelect) IntsX(ctx context.Context) []int
- func (ps *PrintingSelect) Scan(ctx context.Context, v any) error
- func (s *PrintingSelect) ScanX(ctx context.Context, v any)
- func (s *PrintingSelect) String(ctx context.Context) (_ string, err error)
- func (s *PrintingSelect) StringX(ctx context.Context) string
- func (s *PrintingSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PrintingSelect) StringsX(ctx context.Context) []string
- type PrintingUpdate
- func (pu *PrintingUpdate) AddImageIDs(ids ...int) *PrintingUpdate
- func (pu *PrintingUpdate) AddImages(p ...*PrintingImage) *PrintingUpdate
- func (pu *PrintingUpdate) ClearArtist() *PrintingUpdate
- func (pu *PrintingUpdate) ClearCardFace() *PrintingUpdate
- func (pu *PrintingUpdate) ClearImages() *PrintingUpdate
- func (pu *PrintingUpdate) ClearSet() *PrintingUpdate
- func (pu *PrintingUpdate) Exec(ctx context.Context) error
- func (pu *PrintingUpdate) ExecX(ctx context.Context)
- func (pu *PrintingUpdate) Mutation() *PrintingMutation
- func (pu *PrintingUpdate) RemoveImageIDs(ids ...int) *PrintingUpdate
- func (pu *PrintingUpdate) RemoveImages(p ...*PrintingImage) *PrintingUpdate
- func (pu *PrintingUpdate) Save(ctx context.Context) (int, error)
- func (pu *PrintingUpdate) SaveX(ctx context.Context) int
- func (pu *PrintingUpdate) SetArtist(a *Artist) *PrintingUpdate
- func (pu *PrintingUpdate) SetArtistID(id int) *PrintingUpdate
- func (pu *PrintingUpdate) SetCardFace(c *CardFace) *PrintingUpdate
- func (pu *PrintingUpdate) SetCardFaceID(id int) *PrintingUpdate
- func (pu *PrintingUpdate) SetNillableArtistID(id *int) *PrintingUpdate
- func (pu *PrintingUpdate) SetNillableCardFaceID(id *int) *PrintingUpdate
- func (pu *PrintingUpdate) SetNillableRarity(pr *printing.Rarity) *PrintingUpdate
- func (pu *PrintingUpdate) SetNillableSetID(id *int) *PrintingUpdate
- func (pu *PrintingUpdate) SetRarity(pr printing.Rarity) *PrintingUpdate
- func (pu *PrintingUpdate) SetSet(s *Set) *PrintingUpdate
- func (pu *PrintingUpdate) SetSetID(id int) *PrintingUpdate
- func (pu *PrintingUpdate) Where(ps ...predicate.Printing) *PrintingUpdate
- type PrintingUpdateOne
- func (puo *PrintingUpdateOne) AddImageIDs(ids ...int) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) AddImages(p ...*PrintingImage) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) ClearArtist() *PrintingUpdateOne
- func (puo *PrintingUpdateOne) ClearCardFace() *PrintingUpdateOne
- func (puo *PrintingUpdateOne) ClearImages() *PrintingUpdateOne
- func (puo *PrintingUpdateOne) ClearSet() *PrintingUpdateOne
- func (puo *PrintingUpdateOne) Exec(ctx context.Context) error
- func (puo *PrintingUpdateOne) ExecX(ctx context.Context)
- func (puo *PrintingUpdateOne) Mutation() *PrintingMutation
- func (puo *PrintingUpdateOne) RemoveImageIDs(ids ...int) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) RemoveImages(p ...*PrintingImage) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) Save(ctx context.Context) (*Printing, error)
- func (puo *PrintingUpdateOne) SaveX(ctx context.Context) *Printing
- func (puo *PrintingUpdateOne) Select(field string, fields ...string) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetArtist(a *Artist) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetArtistID(id int) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetCardFace(c *CardFace) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetCardFaceID(id int) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetNillableArtistID(id *int) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetNillableCardFaceID(id *int) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetNillableRarity(pr *printing.Rarity) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetNillableSetID(id *int) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetRarity(pr printing.Rarity) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetSet(s *Set) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) SetSetID(id int) *PrintingUpdateOne
- func (puo *PrintingUpdateOne) Where(ps ...predicate.Printing) *PrintingUpdateOne
- type Printings
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Ruling
- type RulingClient
- func (c *RulingClient) Create() *RulingCreate
- func (c *RulingClient) CreateBulk(builders ...*RulingCreate) *RulingCreateBulk
- func (c *RulingClient) Delete() *RulingDelete
- func (c *RulingClient) DeleteOne(r *Ruling) *RulingDeleteOne
- func (c *RulingClient) DeleteOneID(id int) *RulingDeleteOne
- func (c *RulingClient) Get(ctx context.Context, id int) (*Ruling, error)
- func (c *RulingClient) GetX(ctx context.Context, id int) *Ruling
- func (c *RulingClient) Hooks() []Hook
- func (c *RulingClient) Intercept(interceptors ...Interceptor)
- func (c *RulingClient) Interceptors() []Interceptor
- func (c *RulingClient) MapCreateBulk(slice any, setFunc func(*RulingCreate, int)) *RulingCreateBulk
- func (c *RulingClient) Query() *RulingQuery
- func (c *RulingClient) QueryCard(r *Ruling) *CardQuery
- func (c *RulingClient) Update() *RulingUpdate
- func (c *RulingClient) UpdateOne(r *Ruling) *RulingUpdateOne
- func (c *RulingClient) UpdateOneID(id int) *RulingUpdateOne
- func (c *RulingClient) Use(hooks ...Hook)
- type RulingCreate
- func (rc *RulingCreate) Exec(ctx context.Context) error
- func (rc *RulingCreate) ExecX(ctx context.Context)
- func (rc *RulingCreate) Mutation() *RulingMutation
- func (rc *RulingCreate) Save(ctx context.Context) (*Ruling, error)
- func (rc *RulingCreate) SaveX(ctx context.Context) *Ruling
- func (rc *RulingCreate) SetCard(c *Card) *RulingCreate
- func (rc *RulingCreate) SetCardID(id int) *RulingCreate
- func (rc *RulingCreate) SetDate(t time.Time) *RulingCreate
- func (rc *RulingCreate) SetNillableCardID(id *int) *RulingCreate
- func (rc *RulingCreate) SetText(s string) *RulingCreate
- type RulingCreateBulk
- type RulingDelete
- type RulingDeleteOne
- type RulingEdges
- type RulingGroupBy
- func (rgb *RulingGroupBy) Aggregate(fns ...AggregateFunc) *RulingGroupBy
- func (s *RulingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RulingGroupBy) BoolX(ctx context.Context) bool
- func (s *RulingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RulingGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RulingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RulingGroupBy) Float64X(ctx context.Context) float64
- func (s *RulingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RulingGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RulingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RulingGroupBy) IntX(ctx context.Context) int
- func (s *RulingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RulingGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RulingGroupBy) Scan(ctx context.Context, v any) error
- func (s *RulingGroupBy) ScanX(ctx context.Context, v any)
- func (s *RulingGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RulingGroupBy) StringX(ctx context.Context) string
- func (s *RulingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RulingGroupBy) StringsX(ctx context.Context) []string
- type RulingMutation
- func (m *RulingMutation) AddField(name string, value ent.Value) error
- func (m *RulingMutation) AddedEdges() []string
- func (m *RulingMutation) AddedField(name string) (ent.Value, bool)
- func (m *RulingMutation) AddedFields() []string
- func (m *RulingMutation) AddedIDs(name string) []ent.Value
- func (m *RulingMutation) CardCleared() bool
- func (m *RulingMutation) CardID() (id int, exists bool)
- func (m *RulingMutation) CardIDs() (ids []int)
- func (m *RulingMutation) ClearCard()
- func (m *RulingMutation) ClearEdge(name string) error
- func (m *RulingMutation) ClearField(name string) error
- func (m *RulingMutation) ClearedEdges() []string
- func (m *RulingMutation) ClearedFields() []string
- func (m RulingMutation) Client() *Client
- func (m *RulingMutation) Date() (r time.Time, exists bool)
- func (m *RulingMutation) EdgeCleared(name string) bool
- func (m *RulingMutation) Field(name string) (ent.Value, bool)
- func (m *RulingMutation) FieldCleared(name string) bool
- func (m *RulingMutation) Fields() []string
- func (m *RulingMutation) ID() (id int, exists bool)
- func (m *RulingMutation) IDs(ctx context.Context) ([]int, error)
- func (m *RulingMutation) OldDate(ctx context.Context) (v time.Time, err error)
- func (m *RulingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RulingMutation) OldText(ctx context.Context) (v string, err error)
- func (m *RulingMutation) Op() Op
- func (m *RulingMutation) RemovedEdges() []string
- func (m *RulingMutation) RemovedIDs(name string) []ent.Value
- func (m *RulingMutation) ResetCard()
- func (m *RulingMutation) ResetDate()
- func (m *RulingMutation) ResetEdge(name string) error
- func (m *RulingMutation) ResetField(name string) error
- func (m *RulingMutation) ResetText()
- func (m *RulingMutation) SetCardID(id int)
- func (m *RulingMutation) SetDate(t time.Time)
- func (m *RulingMutation) SetField(name string, value ent.Value) error
- func (m *RulingMutation) SetOp(op Op)
- func (m *RulingMutation) SetText(s string)
- func (m *RulingMutation) Text() (r string, exists bool)
- func (m RulingMutation) Tx() (*Tx, error)
- func (m *RulingMutation) Type() string
- func (m *RulingMutation) Where(ps ...predicate.Ruling)
- func (m *RulingMutation) WhereP(ps ...func(*sql.Selector))
- type RulingQuery
- func (rq *RulingQuery) Aggregate(fns ...AggregateFunc) *RulingSelect
- func (rq *RulingQuery) All(ctx context.Context) ([]*Ruling, error)
- func (rq *RulingQuery) AllX(ctx context.Context) []*Ruling
- func (rq *RulingQuery) Clone() *RulingQuery
- func (rq *RulingQuery) Count(ctx context.Context) (int, error)
- func (rq *RulingQuery) CountX(ctx context.Context) int
- func (rq *RulingQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RulingQuery) ExistX(ctx context.Context) bool
- func (rq *RulingQuery) First(ctx context.Context) (*Ruling, error)
- func (rq *RulingQuery) FirstID(ctx context.Context) (id int, err error)
- func (rq *RulingQuery) FirstIDX(ctx context.Context) int
- func (rq *RulingQuery) FirstX(ctx context.Context) *Ruling
- func (rq *RulingQuery) GroupBy(field string, fields ...string) *RulingGroupBy
- func (rq *RulingQuery) IDs(ctx context.Context) (ids []int, err error)
- func (rq *RulingQuery) IDsX(ctx context.Context) []int
- func (rq *RulingQuery) Limit(limit int) *RulingQuery
- func (rq *RulingQuery) Offset(offset int) *RulingQuery
- func (rq *RulingQuery) Only(ctx context.Context) (*Ruling, error)
- func (rq *RulingQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rq *RulingQuery) OnlyIDX(ctx context.Context) int
- func (rq *RulingQuery) OnlyX(ctx context.Context) *Ruling
- func (rq *RulingQuery) Order(o ...ruling.OrderOption) *RulingQuery
- func (rq *RulingQuery) QueryCard() *CardQuery
- func (rq *RulingQuery) Select(fields ...string) *RulingSelect
- func (rq *RulingQuery) Unique(unique bool) *RulingQuery
- func (rq *RulingQuery) Where(ps ...predicate.Ruling) *RulingQuery
- func (rq *RulingQuery) WithCard(opts ...func(*CardQuery)) *RulingQuery
- type RulingSelect
- func (rs *RulingSelect) Aggregate(fns ...AggregateFunc) *RulingSelect
- func (s *RulingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RulingSelect) BoolX(ctx context.Context) bool
- func (s *RulingSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RulingSelect) BoolsX(ctx context.Context) []bool
- func (s *RulingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RulingSelect) Float64X(ctx context.Context) float64
- func (s *RulingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RulingSelect) Float64sX(ctx context.Context) []float64
- func (s *RulingSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RulingSelect) IntX(ctx context.Context) int
- func (s *RulingSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RulingSelect) IntsX(ctx context.Context) []int
- func (rs *RulingSelect) Scan(ctx context.Context, v any) error
- func (s *RulingSelect) ScanX(ctx context.Context, v any)
- func (s *RulingSelect) String(ctx context.Context) (_ string, err error)
- func (s *RulingSelect) StringX(ctx context.Context) string
- func (s *RulingSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RulingSelect) StringsX(ctx context.Context) []string
- type RulingUpdate
- func (ru *RulingUpdate) ClearCard() *RulingUpdate
- func (ru *RulingUpdate) Exec(ctx context.Context) error
- func (ru *RulingUpdate) ExecX(ctx context.Context)
- func (ru *RulingUpdate) Mutation() *RulingMutation
- func (ru *RulingUpdate) Save(ctx context.Context) (int, error)
- func (ru *RulingUpdate) SaveX(ctx context.Context) int
- func (ru *RulingUpdate) SetCard(c *Card) *RulingUpdate
- func (ru *RulingUpdate) SetCardID(id int) *RulingUpdate
- func (ru *RulingUpdate) SetDate(t time.Time) *RulingUpdate
- func (ru *RulingUpdate) SetNillableCardID(id *int) *RulingUpdate
- func (ru *RulingUpdate) SetNillableDate(t *time.Time) *RulingUpdate
- func (ru *RulingUpdate) SetNillableText(s *string) *RulingUpdate
- func (ru *RulingUpdate) SetText(s string) *RulingUpdate
- func (ru *RulingUpdate) Where(ps ...predicate.Ruling) *RulingUpdate
- type RulingUpdateOne
- func (ruo *RulingUpdateOne) ClearCard() *RulingUpdateOne
- func (ruo *RulingUpdateOne) Exec(ctx context.Context) error
- func (ruo *RulingUpdateOne) ExecX(ctx context.Context)
- func (ruo *RulingUpdateOne) Mutation() *RulingMutation
- func (ruo *RulingUpdateOne) Save(ctx context.Context) (*Ruling, error)
- func (ruo *RulingUpdateOne) SaveX(ctx context.Context) *Ruling
- func (ruo *RulingUpdateOne) Select(field string, fields ...string) *RulingUpdateOne
- func (ruo *RulingUpdateOne) SetCard(c *Card) *RulingUpdateOne
- func (ruo *RulingUpdateOne) SetCardID(id int) *RulingUpdateOne
- func (ruo *RulingUpdateOne) SetDate(t time.Time) *RulingUpdateOne
- func (ruo *RulingUpdateOne) SetNillableCardID(id *int) *RulingUpdateOne
- func (ruo *RulingUpdateOne) SetNillableDate(t *time.Time) *RulingUpdateOne
- func (ruo *RulingUpdateOne) SetNillableText(s *string) *RulingUpdateOne
- func (ruo *RulingUpdateOne) SetText(s string) *RulingUpdateOne
- func (ruo *RulingUpdateOne) Where(ps ...predicate.Ruling) *RulingUpdateOne
- type Rulings
- type Set
- type SetClient
- func (c *SetClient) Create() *SetCreate
- func (c *SetClient) CreateBulk(builders ...*SetCreate) *SetCreateBulk
- func (c *SetClient) Delete() *SetDelete
- func (c *SetClient) DeleteOne(s *Set) *SetDeleteOne
- func (c *SetClient) DeleteOneID(id int) *SetDeleteOne
- func (c *SetClient) Get(ctx context.Context, id int) (*Set, error)
- func (c *SetClient) GetX(ctx context.Context, id int) *Set
- func (c *SetClient) Hooks() []Hook
- func (c *SetClient) Intercept(interceptors ...Interceptor)
- func (c *SetClient) Interceptors() []Interceptor
- func (c *SetClient) MapCreateBulk(slice any, setFunc func(*SetCreate, int)) *SetCreateBulk
- func (c *SetClient) Query() *SetQuery
- func (c *SetClient) QueryPrintings(s *Set) *PrintingQuery
- func (c *SetClient) Update() *SetUpdate
- func (c *SetClient) UpdateOne(s *Set) *SetUpdateOne
- func (c *SetClient) UpdateOneID(id int) *SetUpdateOne
- func (c *SetClient) Use(hooks ...Hook)
- type SetCreate
- func (sc *SetCreate) AddPrintingIDs(ids ...int) *SetCreate
- func (sc *SetCreate) AddPrintings(p ...*Printing) *SetCreate
- func (sc *SetCreate) Exec(ctx context.Context) error
- func (sc *SetCreate) ExecX(ctx context.Context)
- func (sc *SetCreate) Mutation() *SetMutation
- func (sc *SetCreate) Save(ctx context.Context) (*Set, error)
- func (sc *SetCreate) SaveX(ctx context.Context) *Set
- func (sc *SetCreate) SetCode(s string) *SetCreate
- func (sc *SetCreate) SetName(s string) *SetCreate
- type SetCreateBulk
- type SetDelete
- type SetDeleteOne
- type SetEdges
- type SetGroupBy
- func (sgb *SetGroupBy) Aggregate(fns ...AggregateFunc) *SetGroupBy
- func (s *SetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SetGroupBy) BoolX(ctx context.Context) bool
- func (s *SetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SetGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SetGroupBy) Float64X(ctx context.Context) float64
- func (s *SetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SetGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SetGroupBy) IntX(ctx context.Context) int
- func (s *SetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SetGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SetGroupBy) Scan(ctx context.Context, v any) error
- func (s *SetGroupBy) ScanX(ctx context.Context, v any)
- func (s *SetGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SetGroupBy) StringX(ctx context.Context) string
- func (s *SetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SetGroupBy) StringsX(ctx context.Context) []string
- type SetMutation
- func (m *SetMutation) AddField(name string, value ent.Value) error
- func (m *SetMutation) AddPrintingIDs(ids ...int)
- func (m *SetMutation) AddedEdges() []string
- func (m *SetMutation) AddedField(name string) (ent.Value, bool)
- func (m *SetMutation) AddedFields() []string
- func (m *SetMutation) AddedIDs(name string) []ent.Value
- func (m *SetMutation) ClearEdge(name string) error
- func (m *SetMutation) ClearField(name string) error
- func (m *SetMutation) ClearPrintings()
- func (m *SetMutation) ClearedEdges() []string
- func (m *SetMutation) ClearedFields() []string
- func (m SetMutation) Client() *Client
- func (m *SetMutation) Code() (r string, exists bool)
- func (m *SetMutation) EdgeCleared(name string) bool
- func (m *SetMutation) Field(name string) (ent.Value, bool)
- func (m *SetMutation) FieldCleared(name string) bool
- func (m *SetMutation) Fields() []string
- func (m *SetMutation) ID() (id int, exists bool)
- func (m *SetMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SetMutation) Name() (r string, exists bool)
- func (m *SetMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *SetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SetMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SetMutation) Op() Op
- func (m *SetMutation) PrintingsCleared() bool
- func (m *SetMutation) PrintingsIDs() (ids []int)
- func (m *SetMutation) RemovePrintingIDs(ids ...int)
- func (m *SetMutation) RemovedEdges() []string
- func (m *SetMutation) RemovedIDs(name string) []ent.Value
- func (m *SetMutation) RemovedPrintingsIDs() (ids []int)
- func (m *SetMutation) ResetCode()
- func (m *SetMutation) ResetEdge(name string) error
- func (m *SetMutation) ResetField(name string) error
- func (m *SetMutation) ResetName()
- func (m *SetMutation) ResetPrintings()
- func (m *SetMutation) SetCode(s string)
- func (m *SetMutation) SetField(name string, value ent.Value) error
- func (m *SetMutation) SetName(s string)
- func (m *SetMutation) SetOp(op Op)
- func (m SetMutation) Tx() (*Tx, error)
- func (m *SetMutation) Type() string
- func (m *SetMutation) Where(ps ...predicate.Set)
- func (m *SetMutation) WhereP(ps ...func(*sql.Selector))
- type SetQuery
- func (sq *SetQuery) Aggregate(fns ...AggregateFunc) *SetSelect
- func (sq *SetQuery) All(ctx context.Context) ([]*Set, error)
- func (sq *SetQuery) AllX(ctx context.Context) []*Set
- func (sq *SetQuery) Clone() *SetQuery
- func (sq *SetQuery) Count(ctx context.Context) (int, error)
- func (sq *SetQuery) CountX(ctx context.Context) int
- func (sq *SetQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SetQuery) ExistX(ctx context.Context) bool
- func (sq *SetQuery) First(ctx context.Context) (*Set, error)
- func (sq *SetQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *SetQuery) FirstIDX(ctx context.Context) int
- func (sq *SetQuery) FirstX(ctx context.Context) *Set
- func (sq *SetQuery) GroupBy(field string, fields ...string) *SetGroupBy
- func (sq *SetQuery) IDs(ctx context.Context) (ids []int, err error)
- func (sq *SetQuery) IDsX(ctx context.Context) []int
- func (sq *SetQuery) Limit(limit int) *SetQuery
- func (sq *SetQuery) Offset(offset int) *SetQuery
- func (sq *SetQuery) Only(ctx context.Context) (*Set, error)
- func (sq *SetQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *SetQuery) OnlyIDX(ctx context.Context) int
- func (sq *SetQuery) OnlyX(ctx context.Context) *Set
- func (sq *SetQuery) Order(o ...set.OrderOption) *SetQuery
- func (sq *SetQuery) QueryPrintings() *PrintingQuery
- func (sq *SetQuery) Select(fields ...string) *SetSelect
- func (sq *SetQuery) Unique(unique bool) *SetQuery
- func (sq *SetQuery) Where(ps ...predicate.Set) *SetQuery
- func (sq *SetQuery) WithPrintings(opts ...func(*PrintingQuery)) *SetQuery
- type SetSelect
- func (ss *SetSelect) Aggregate(fns ...AggregateFunc) *SetSelect
- func (s *SetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SetSelect) BoolX(ctx context.Context) bool
- func (s *SetSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SetSelect) BoolsX(ctx context.Context) []bool
- func (s *SetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SetSelect) Float64X(ctx context.Context) float64
- func (s *SetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SetSelect) Float64sX(ctx context.Context) []float64
- func (s *SetSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SetSelect) IntX(ctx context.Context) int
- func (s *SetSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SetSelect) IntsX(ctx context.Context) []int
- func (ss *SetSelect) Scan(ctx context.Context, v any) error
- func (s *SetSelect) ScanX(ctx context.Context, v any)
- func (s *SetSelect) String(ctx context.Context) (_ string, err error)
- func (s *SetSelect) StringX(ctx context.Context) string
- func (s *SetSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SetSelect) StringsX(ctx context.Context) []string
- type SetUpdate
- func (su *SetUpdate) AddPrintingIDs(ids ...int) *SetUpdate
- func (su *SetUpdate) AddPrintings(p ...*Printing) *SetUpdate
- func (su *SetUpdate) ClearPrintings() *SetUpdate
- func (su *SetUpdate) Exec(ctx context.Context) error
- func (su *SetUpdate) ExecX(ctx context.Context)
- func (su *SetUpdate) Mutation() *SetMutation
- func (su *SetUpdate) RemovePrintingIDs(ids ...int) *SetUpdate
- func (su *SetUpdate) RemovePrintings(p ...*Printing) *SetUpdate
- func (su *SetUpdate) Save(ctx context.Context) (int, error)
- func (su *SetUpdate) SaveX(ctx context.Context) int
- func (su *SetUpdate) SetCode(s string) *SetUpdate
- func (su *SetUpdate) SetName(s string) *SetUpdate
- func (su *SetUpdate) SetNillableCode(s *string) *SetUpdate
- func (su *SetUpdate) SetNillableName(s *string) *SetUpdate
- func (su *SetUpdate) Where(ps ...predicate.Set) *SetUpdate
- type SetUpdateOne
- func (suo *SetUpdateOne) AddPrintingIDs(ids ...int) *SetUpdateOne
- func (suo *SetUpdateOne) AddPrintings(p ...*Printing) *SetUpdateOne
- func (suo *SetUpdateOne) ClearPrintings() *SetUpdateOne
- func (suo *SetUpdateOne) Exec(ctx context.Context) error
- func (suo *SetUpdateOne) ExecX(ctx context.Context)
- func (suo *SetUpdateOne) Mutation() *SetMutation
- func (suo *SetUpdateOne) RemovePrintingIDs(ids ...int) *SetUpdateOne
- func (suo *SetUpdateOne) RemovePrintings(p ...*Printing) *SetUpdateOne
- func (suo *SetUpdateOne) Save(ctx context.Context) (*Set, error)
- func (suo *SetUpdateOne) SaveX(ctx context.Context) *Set
- func (suo *SetUpdateOne) Select(field string, fields ...string) *SetUpdateOne
- func (suo *SetUpdateOne) SetCode(s string) *SetUpdateOne
- func (suo *SetUpdateOne) SetName(s string) *SetUpdateOne
- func (suo *SetUpdateOne) SetNillableCode(s *string) *SetUpdateOne
- func (suo *SetUpdateOne) SetNillableName(s *string) *SetUpdateOne
- func (suo *SetUpdateOne) Where(ps ...predicate.Set) *SetUpdateOne
- type Sets
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeArtist = "Artist" TypeCard = "Card" TypeCardFace = "CardFace" TypePrinting = "Printing" TypePrintingImage = "PrintingImage" TypeRuling = "Ruling" TypeSet = "Set" )
Variables ¶
var ErrTxStarted = errors.New("oracle: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(oracle.As(oracle.Sum(field1), "sum_field1"), (oracle.As(oracle.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 Artist ¶
type Artist struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ArtistQuery when eager-loading is set. Edges ArtistEdges `json:"edges"` // contains filtered or unexported fields }
Artist is the model entity for the Artist schema.
func (*Artist) QueryPrintings ¶
func (a *Artist) QueryPrintings() *PrintingQuery
QueryPrintings queries the "printings" edge of the Artist entity.
func (*Artist) Unwrap ¶
Unwrap unwraps the Artist 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 (*Artist) Update ¶
func (a *Artist) Update() *ArtistUpdateOne
Update returns a builder for updating this Artist. Note that you need to call Artist.Unwrap() before calling this method if this Artist was returned from a transaction, and the transaction was committed or rolled back.
type ArtistClient ¶
type ArtistClient struct {
// contains filtered or unexported fields
}
ArtistClient is a client for the Artist schema.
func NewArtistClient ¶
func NewArtistClient(c config) *ArtistClient
NewArtistClient returns a client for the Artist from the given config.
func (*ArtistClient) Create ¶
func (c *ArtistClient) Create() *ArtistCreate
Create returns a builder for creating a Artist entity.
func (*ArtistClient) CreateBulk ¶
func (c *ArtistClient) CreateBulk(builders ...*ArtistCreate) *ArtistCreateBulk
CreateBulk returns a builder for creating a bulk of Artist entities.
func (*ArtistClient) Delete ¶
func (c *ArtistClient) Delete() *ArtistDelete
Delete returns a delete builder for Artist.
func (*ArtistClient) DeleteOne ¶
func (c *ArtistClient) DeleteOne(a *Artist) *ArtistDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ArtistClient) DeleteOneID ¶
func (c *ArtistClient) DeleteOneID(id int) *ArtistDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ArtistClient) GetX ¶
func (c *ArtistClient) GetX(ctx context.Context, id int) *Artist
GetX is like Get, but panics if an error occurs.
func (*ArtistClient) Intercept ¶
func (c *ArtistClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `artist.Intercept(f(g(h())))`.
func (*ArtistClient) Interceptors ¶
func (c *ArtistClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ArtistClient) MapCreateBulk ¶
func (c *ArtistClient) MapCreateBulk(slice any, setFunc func(*ArtistCreate, int)) *ArtistCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ArtistClient) Query ¶
func (c *ArtistClient) Query() *ArtistQuery
Query returns a query builder for Artist.
func (*ArtistClient) QueryPrintings ¶
func (c *ArtistClient) QueryPrintings(a *Artist) *PrintingQuery
QueryPrintings queries the printings edge of a Artist.
func (*ArtistClient) Update ¶
func (c *ArtistClient) Update() *ArtistUpdate
Update returns an update builder for Artist.
func (*ArtistClient) UpdateOne ¶
func (c *ArtistClient) UpdateOne(a *Artist) *ArtistUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ArtistClient) UpdateOneID ¶
func (c *ArtistClient) UpdateOneID(id int) *ArtistUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ArtistClient) Use ¶
func (c *ArtistClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `artist.Hooks(f(g(h())))`.
type ArtistCreate ¶
type ArtistCreate struct {
// contains filtered or unexported fields
}
ArtistCreate is the builder for creating a Artist entity.
func (*ArtistCreate) AddPrintingIDs ¶
func (ac *ArtistCreate) AddPrintingIDs(ids ...int) *ArtistCreate
AddPrintingIDs adds the "printings" edge to the Printing entity by IDs.
func (*ArtistCreate) AddPrintings ¶
func (ac *ArtistCreate) AddPrintings(p ...*Printing) *ArtistCreate
AddPrintings adds the "printings" edges to the Printing entity.
func (*ArtistCreate) Exec ¶
func (ac *ArtistCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ArtistCreate) ExecX ¶
func (ac *ArtistCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ArtistCreate) Mutation ¶
func (ac *ArtistCreate) Mutation() *ArtistMutation
Mutation returns the ArtistMutation object of the builder.
func (*ArtistCreate) Save ¶
func (ac *ArtistCreate) Save(ctx context.Context) (*Artist, error)
Save creates the Artist in the database.
func (*ArtistCreate) SaveX ¶
func (ac *ArtistCreate) SaveX(ctx context.Context) *Artist
SaveX calls Save and panics if Save returns an error.
func (*ArtistCreate) SetName ¶
func (ac *ArtistCreate) SetName(s string) *ArtistCreate
SetName sets the "name" field.
type ArtistCreateBulk ¶
type ArtistCreateBulk struct {
// contains filtered or unexported fields
}
ArtistCreateBulk is the builder for creating many Artist entities in bulk.
func (*ArtistCreateBulk) Exec ¶
func (acb *ArtistCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ArtistCreateBulk) ExecX ¶
func (acb *ArtistCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ArtistDelete ¶
type ArtistDelete struct {
// contains filtered or unexported fields
}
ArtistDelete is the builder for deleting a Artist entity.
func (*ArtistDelete) Exec ¶
func (ad *ArtistDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ArtistDelete) ExecX ¶
func (ad *ArtistDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ArtistDelete) Where ¶
func (ad *ArtistDelete) Where(ps ...predicate.Artist) *ArtistDelete
Where appends a list predicates to the ArtistDelete builder.
type ArtistDeleteOne ¶
type ArtistDeleteOne struct {
// contains filtered or unexported fields
}
ArtistDeleteOne is the builder for deleting a single Artist entity.
func (*ArtistDeleteOne) Exec ¶
func (ado *ArtistDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ArtistDeleteOne) ExecX ¶
func (ado *ArtistDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ArtistDeleteOne) Where ¶
func (ado *ArtistDeleteOne) Where(ps ...predicate.Artist) *ArtistDeleteOne
Where appends a list predicates to the ArtistDelete builder.
type ArtistEdges ¶
type ArtistEdges struct { // Printings holds the value of the printings edge. Printings []*Printing `json:"printings,omitempty"` // contains filtered or unexported fields }
ArtistEdges holds the relations/edges for other nodes in the graph.
func (ArtistEdges) PrintingsOrErr ¶
func (e ArtistEdges) PrintingsOrErr() ([]*Printing, error)
PrintingsOrErr returns the Printings value or an error if the edge was not loaded in eager-loading.
type ArtistGroupBy ¶
type ArtistGroupBy struct {
// contains filtered or unexported fields
}
ArtistGroupBy is the group-by builder for Artist entities.
func (*ArtistGroupBy) Aggregate ¶
func (agb *ArtistGroupBy) Aggregate(fns ...AggregateFunc) *ArtistGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ArtistGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ArtistGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ArtistGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ArtistGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ArtistGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ArtistGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ArtistGroupBy) Scan ¶
func (agb *ArtistGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ArtistGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ArtistMutation ¶
type ArtistMutation struct {
// contains filtered or unexported fields
}
ArtistMutation represents an operation that mutates the Artist nodes in the graph.
func (*ArtistMutation) AddField ¶
func (m *ArtistMutation) 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 (*ArtistMutation) AddPrintingIDs ¶
func (m *ArtistMutation) AddPrintingIDs(ids ...int)
AddPrintingIDs adds the "printings" edge to the Printing entity by ids.
func (*ArtistMutation) AddedEdges ¶
func (m *ArtistMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ArtistMutation) AddedField ¶
func (m *ArtistMutation) 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 (*ArtistMutation) AddedFields ¶
func (m *ArtistMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ArtistMutation) AddedIDs ¶
func (m *ArtistMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ArtistMutation) ClearEdge ¶
func (m *ArtistMutation) 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 (*ArtistMutation) ClearField ¶
func (m *ArtistMutation) 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 (*ArtistMutation) ClearPrintings ¶
func (m *ArtistMutation) ClearPrintings()
ClearPrintings clears the "printings" edge to the Printing entity.
func (*ArtistMutation) ClearedEdges ¶
func (m *ArtistMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ArtistMutation) ClearedFields ¶
func (m *ArtistMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ArtistMutation) Client ¶
func (m ArtistMutation) 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 (*ArtistMutation) EdgeCleared ¶
func (m *ArtistMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ArtistMutation) Field ¶
func (m *ArtistMutation) 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 (*ArtistMutation) FieldCleared ¶
func (m *ArtistMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ArtistMutation) Fields ¶
func (m *ArtistMutation) 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 (*ArtistMutation) ID ¶
func (m *ArtistMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ArtistMutation) IDs ¶
func (m *ArtistMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ArtistMutation) Name ¶
func (m *ArtistMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ArtistMutation) 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 (*ArtistMutation) OldName ¶
func (m *ArtistMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Artist entity. If the Artist 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 (*ArtistMutation) PrintingsCleared ¶
func (m *ArtistMutation) PrintingsCleared() bool
PrintingsCleared reports if the "printings" edge to the Printing entity was cleared.
func (*ArtistMutation) PrintingsIDs ¶
func (m *ArtistMutation) PrintingsIDs() (ids []int)
PrintingsIDs returns the "printings" edge IDs in the mutation.
func (*ArtistMutation) RemovePrintingIDs ¶
func (m *ArtistMutation) RemovePrintingIDs(ids ...int)
RemovePrintingIDs removes the "printings" edge to the Printing entity by IDs.
func (*ArtistMutation) RemovedEdges ¶
func (m *ArtistMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ArtistMutation) RemovedIDs ¶
func (m *ArtistMutation) 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 (*ArtistMutation) RemovedPrintingsIDs ¶
func (m *ArtistMutation) RemovedPrintingsIDs() (ids []int)
RemovedPrintings returns the removed IDs of the "printings" edge to the Printing entity.
func (*ArtistMutation) ResetEdge ¶
func (m *ArtistMutation) 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 (*ArtistMutation) ResetField ¶
func (m *ArtistMutation) 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 (*ArtistMutation) ResetName ¶
func (m *ArtistMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ArtistMutation) ResetPrintings ¶
func (m *ArtistMutation) ResetPrintings()
ResetPrintings resets all changes to the "printings" edge.
func (*ArtistMutation) SetField ¶
func (m *ArtistMutation) 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 (*ArtistMutation) SetName ¶
func (m *ArtistMutation) SetName(s string)
SetName sets the "name" field.
func (*ArtistMutation) SetOp ¶
func (m *ArtistMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ArtistMutation) Tx ¶
func (m ArtistMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ArtistMutation) Type ¶
func (m *ArtistMutation) Type() string
Type returns the node type of this mutation (Artist).
func (*ArtistMutation) Where ¶
func (m *ArtistMutation) Where(ps ...predicate.Artist)
Where appends a list predicates to the ArtistMutation builder.
func (*ArtistMutation) WhereP ¶
func (m *ArtistMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ArtistMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ArtistQuery ¶
type ArtistQuery struct {
// contains filtered or unexported fields
}
ArtistQuery is the builder for querying Artist entities.
func (*ArtistQuery) Aggregate ¶
func (aq *ArtistQuery) Aggregate(fns ...AggregateFunc) *ArtistSelect
Aggregate returns a ArtistSelect configured with the given aggregations.
func (*ArtistQuery) All ¶
func (aq *ArtistQuery) All(ctx context.Context) ([]*Artist, error)
All executes the query and returns a list of Artists.
func (*ArtistQuery) AllX ¶
func (aq *ArtistQuery) AllX(ctx context.Context) []*Artist
AllX is like All, but panics if an error occurs.
func (*ArtistQuery) Clone ¶
func (aq *ArtistQuery) Clone() *ArtistQuery
Clone returns a duplicate of the ArtistQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ArtistQuery) Count ¶
func (aq *ArtistQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ArtistQuery) CountX ¶
func (aq *ArtistQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ArtistQuery) Exist ¶
func (aq *ArtistQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ArtistQuery) ExistX ¶
func (aq *ArtistQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ArtistQuery) First ¶
func (aq *ArtistQuery) First(ctx context.Context) (*Artist, error)
First returns the first Artist entity from the query. Returns a *NotFoundError when no Artist was found.
func (*ArtistQuery) FirstID ¶
func (aq *ArtistQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Artist ID from the query. Returns a *NotFoundError when no Artist ID was found.
func (*ArtistQuery) FirstIDX ¶
func (aq *ArtistQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ArtistQuery) FirstX ¶
func (aq *ArtistQuery) FirstX(ctx context.Context) *Artist
FirstX is like First, but panics if an error occurs.
func (*ArtistQuery) GroupBy ¶
func (aq *ArtistQuery) GroupBy(field string, fields ...string) *ArtistGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Artist.Query(). GroupBy(artist.FieldName). Aggregate(oracle.Count()). Scan(ctx, &v)
func (*ArtistQuery) IDs ¶
func (aq *ArtistQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Artist IDs.
func (*ArtistQuery) IDsX ¶
func (aq *ArtistQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ArtistQuery) Limit ¶
func (aq *ArtistQuery) Limit(limit int) *ArtistQuery
Limit the number of records to be returned by this query.
func (*ArtistQuery) Offset ¶
func (aq *ArtistQuery) Offset(offset int) *ArtistQuery
Offset to start from.
func (*ArtistQuery) Only ¶
func (aq *ArtistQuery) Only(ctx context.Context) (*Artist, error)
Only returns a single Artist entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Artist entity is found. Returns a *NotFoundError when no Artist entities are found.
func (*ArtistQuery) OnlyID ¶
func (aq *ArtistQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Artist ID in the query. Returns a *NotSingularError when more than one Artist ID is found. Returns a *NotFoundError when no entities are found.
func (*ArtistQuery) OnlyIDX ¶
func (aq *ArtistQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ArtistQuery) OnlyX ¶
func (aq *ArtistQuery) OnlyX(ctx context.Context) *Artist
OnlyX is like Only, but panics if an error occurs.
func (*ArtistQuery) Order ¶
func (aq *ArtistQuery) Order(o ...artist.OrderOption) *ArtistQuery
Order specifies how the records should be ordered.
func (*ArtistQuery) QueryPrintings ¶
func (aq *ArtistQuery) QueryPrintings() *PrintingQuery
QueryPrintings chains the current query on the "printings" edge.
func (*ArtistQuery) Select ¶
func (aq *ArtistQuery) Select(fields ...string) *ArtistSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Artist.Query(). Select(artist.FieldName). Scan(ctx, &v)
func (*ArtistQuery) Unique ¶
func (aq *ArtistQuery) Unique(unique bool) *ArtistQuery
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 (*ArtistQuery) Where ¶
func (aq *ArtistQuery) Where(ps ...predicate.Artist) *ArtistQuery
Where adds a new predicate for the ArtistQuery builder.
func (*ArtistQuery) WithPrintings ¶
func (aq *ArtistQuery) WithPrintings(opts ...func(*PrintingQuery)) *ArtistQuery
WithPrintings tells the query-builder to eager-load the nodes that are connected to the "printings" edge. The optional arguments are used to configure the query builder of the edge.
type ArtistSelect ¶
type ArtistSelect struct { *ArtistQuery // contains filtered or unexported fields }
ArtistSelect is the builder for selecting fields of Artist entities.
func (*ArtistSelect) Aggregate ¶
func (as *ArtistSelect) Aggregate(fns ...AggregateFunc) *ArtistSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ArtistSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ArtistSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ArtistSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ArtistSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ArtistSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ArtistSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ArtistSelect) Scan ¶
func (as *ArtistSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ArtistSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ArtistUpdate ¶
type ArtistUpdate struct {
// contains filtered or unexported fields
}
ArtistUpdate is the builder for updating Artist entities.
func (*ArtistUpdate) AddPrintingIDs ¶
func (au *ArtistUpdate) AddPrintingIDs(ids ...int) *ArtistUpdate
AddPrintingIDs adds the "printings" edge to the Printing entity by IDs.
func (*ArtistUpdate) AddPrintings ¶
func (au *ArtistUpdate) AddPrintings(p ...*Printing) *ArtistUpdate
AddPrintings adds the "printings" edges to the Printing entity.
func (*ArtistUpdate) ClearPrintings ¶
func (au *ArtistUpdate) ClearPrintings() *ArtistUpdate
ClearPrintings clears all "printings" edges to the Printing entity.
func (*ArtistUpdate) Exec ¶
func (au *ArtistUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ArtistUpdate) ExecX ¶
func (au *ArtistUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ArtistUpdate) Mutation ¶
func (au *ArtistUpdate) Mutation() *ArtistMutation
Mutation returns the ArtistMutation object of the builder.
func (*ArtistUpdate) RemovePrintingIDs ¶
func (au *ArtistUpdate) RemovePrintingIDs(ids ...int) *ArtistUpdate
RemovePrintingIDs removes the "printings" edge to Printing entities by IDs.
func (*ArtistUpdate) RemovePrintings ¶
func (au *ArtistUpdate) RemovePrintings(p ...*Printing) *ArtistUpdate
RemovePrintings removes "printings" edges to Printing entities.
func (*ArtistUpdate) Save ¶
func (au *ArtistUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ArtistUpdate) SaveX ¶
func (au *ArtistUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ArtistUpdate) SetName ¶
func (au *ArtistUpdate) SetName(s string) *ArtistUpdate
SetName sets the "name" field.
func (*ArtistUpdate) SetNillableName ¶
func (au *ArtistUpdate) SetNillableName(s *string) *ArtistUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ArtistUpdate) Where ¶
func (au *ArtistUpdate) Where(ps ...predicate.Artist) *ArtistUpdate
Where appends a list predicates to the ArtistUpdate builder.
type ArtistUpdateOne ¶
type ArtistUpdateOne struct {
// contains filtered or unexported fields
}
ArtistUpdateOne is the builder for updating a single Artist entity.
func (*ArtistUpdateOne) AddPrintingIDs ¶
func (auo *ArtistUpdateOne) AddPrintingIDs(ids ...int) *ArtistUpdateOne
AddPrintingIDs adds the "printings" edge to the Printing entity by IDs.
func (*ArtistUpdateOne) AddPrintings ¶
func (auo *ArtistUpdateOne) AddPrintings(p ...*Printing) *ArtistUpdateOne
AddPrintings adds the "printings" edges to the Printing entity.
func (*ArtistUpdateOne) ClearPrintings ¶
func (auo *ArtistUpdateOne) ClearPrintings() *ArtistUpdateOne
ClearPrintings clears all "printings" edges to the Printing entity.
func (*ArtistUpdateOne) Exec ¶
func (auo *ArtistUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ArtistUpdateOne) ExecX ¶
func (auo *ArtistUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ArtistUpdateOne) Mutation ¶
func (auo *ArtistUpdateOne) Mutation() *ArtistMutation
Mutation returns the ArtistMutation object of the builder.
func (*ArtistUpdateOne) RemovePrintingIDs ¶
func (auo *ArtistUpdateOne) RemovePrintingIDs(ids ...int) *ArtistUpdateOne
RemovePrintingIDs removes the "printings" edge to Printing entities by IDs.
func (*ArtistUpdateOne) RemovePrintings ¶
func (auo *ArtistUpdateOne) RemovePrintings(p ...*Printing) *ArtistUpdateOne
RemovePrintings removes "printings" edges to Printing entities.
func (*ArtistUpdateOne) Save ¶
func (auo *ArtistUpdateOne) Save(ctx context.Context) (*Artist, error)
Save executes the query and returns the updated Artist entity.
func (*ArtistUpdateOne) SaveX ¶
func (auo *ArtistUpdateOne) SaveX(ctx context.Context) *Artist
SaveX is like Save, but panics if an error occurs.
func (*ArtistUpdateOne) Select ¶
func (auo *ArtistUpdateOne) Select(field string, fields ...string) *ArtistUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ArtistUpdateOne) SetName ¶
func (auo *ArtistUpdateOne) SetName(s string) *ArtistUpdateOne
SetName sets the "name" field.
func (*ArtistUpdateOne) SetNillableName ¶
func (auo *ArtistUpdateOne) SetNillableName(s *string) *ArtistUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ArtistUpdateOne) Where ¶
func (auo *ArtistUpdateOne) Where(ps ...predicate.Artist) *ArtistUpdateOne
Where appends a list predicates to the ArtistUpdate builder.
type Card ¶
type Card struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // OracleID holds the value of the "oracle_id" field. OracleID string `json:"oracle_id,omitempty"` // ColorIdentity holds the value of the "color_identity" field. ColorIdentity uint8 `json:"color_identity,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CardQuery when eager-loading is set. Edges CardEdges `json:"edges"` // contains filtered or unexported fields }
Card is the model entity for the Card schema.
func (*Card) QueryFaces ¶
func (c *Card) QueryFaces() *CardFaceQuery
QueryFaces queries the "faces" edge of the Card entity.
func (*Card) QueryRulings ¶
func (c *Card) QueryRulings() *RulingQuery
QueryRulings queries the "rulings" edge of the Card entity.
func (*Card) Unwrap ¶
Unwrap unwraps the Card 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 (*Card) Update ¶
func (c *Card) Update() *CardUpdateOne
Update returns a builder for updating this Card. Note that you need to call Card.Unwrap() before calling this method if this Card was returned from a transaction, and the transaction was committed or rolled back.
type CardClient ¶
type CardClient struct {
// contains filtered or unexported fields
}
CardClient is a client for the Card schema.
func NewCardClient ¶
func NewCardClient(c config) *CardClient
NewCardClient returns a client for the Card from the given config.
func (*CardClient) Create ¶
func (c *CardClient) Create() *CardCreate
Create returns a builder for creating a Card entity.
func (*CardClient) CreateBulk ¶
func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk
CreateBulk returns a builder for creating a bulk of Card entities.
func (*CardClient) Delete ¶
func (c *CardClient) Delete() *CardDelete
Delete returns a delete builder for Card.
func (*CardClient) DeleteOne ¶
func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CardClient) DeleteOneID ¶
func (c *CardClient) DeleteOneID(id int) *CardDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CardClient) GetX ¶
func (c *CardClient) GetX(ctx context.Context, id int) *Card
GetX is like Get, but panics if an error occurs.
func (*CardClient) Intercept ¶
func (c *CardClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `card.Intercept(f(g(h())))`.
func (*CardClient) Interceptors ¶
func (c *CardClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CardClient) MapCreateBulk ¶
func (c *CardClient) MapCreateBulk(slice any, setFunc func(*CardCreate, int)) *CardCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CardClient) Query ¶
func (c *CardClient) Query() *CardQuery
Query returns a query builder for Card.
func (*CardClient) QueryFaces ¶
func (c *CardClient) QueryFaces(ca *Card) *CardFaceQuery
QueryFaces queries the faces edge of a Card.
func (*CardClient) QueryRulings ¶
func (c *CardClient) QueryRulings(ca *Card) *RulingQuery
QueryRulings queries the rulings edge of a Card.
func (*CardClient) Update ¶
func (c *CardClient) Update() *CardUpdate
Update returns an update builder for Card.
func (*CardClient) UpdateOne ¶
func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CardClient) UpdateOneID ¶
func (c *CardClient) UpdateOneID(id int) *CardUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CardClient) Use ¶
func (c *CardClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `card.Hooks(f(g(h())))`.
type CardCreate ¶
type CardCreate struct {
// contains filtered or unexported fields
}
CardCreate is the builder for creating a Card entity.
func (*CardCreate) AddFaceIDs ¶
func (cc *CardCreate) AddFaceIDs(ids ...int) *CardCreate
AddFaceIDs adds the "faces" edge to the CardFace entity by IDs.
func (*CardCreate) AddFaces ¶
func (cc *CardCreate) AddFaces(c ...*CardFace) *CardCreate
AddFaces adds the "faces" edges to the CardFace entity.
func (*CardCreate) AddRulingIDs ¶
func (cc *CardCreate) AddRulingIDs(ids ...int) *CardCreate
AddRulingIDs adds the "rulings" edge to the Ruling entity by IDs.
func (*CardCreate) AddRulings ¶
func (cc *CardCreate) AddRulings(r ...*Ruling) *CardCreate
AddRulings adds the "rulings" edges to the Ruling entity.
func (*CardCreate) Exec ¶
func (cc *CardCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CardCreate) ExecX ¶
func (cc *CardCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardCreate) Mutation ¶
func (cc *CardCreate) Mutation() *CardMutation
Mutation returns the CardMutation object of the builder.
func (*CardCreate) Save ¶
func (cc *CardCreate) Save(ctx context.Context) (*Card, error)
Save creates the Card in the database.
func (*CardCreate) SaveX ¶
func (cc *CardCreate) SaveX(ctx context.Context) *Card
SaveX calls Save and panics if Save returns an error.
func (*CardCreate) SetColorIdentity ¶
func (cc *CardCreate) SetColorIdentity(u uint8) *CardCreate
SetColorIdentity sets the "color_identity" field.
func (*CardCreate) SetName ¶
func (cc *CardCreate) SetName(s string) *CardCreate
SetName sets the "name" field.
func (*CardCreate) SetOracleID ¶
func (cc *CardCreate) SetOracleID(s string) *CardCreate
SetOracleID sets the "oracle_id" field.
type CardCreateBulk ¶
type CardCreateBulk struct {
// contains filtered or unexported fields
}
CardCreateBulk is the builder for creating many Card entities in bulk.
func (*CardCreateBulk) Exec ¶
func (ccb *CardCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CardCreateBulk) ExecX ¶
func (ccb *CardCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CardDelete ¶
type CardDelete struct {
// contains filtered or unexported fields
}
CardDelete is the builder for deleting a Card entity.
func (*CardDelete) Exec ¶
func (cd *CardDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CardDelete) ExecX ¶
func (cd *CardDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CardDelete) Where ¶
func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete
Where appends a list predicates to the CardDelete builder.
type CardDeleteOne ¶
type CardDeleteOne struct {
// contains filtered or unexported fields
}
CardDeleteOne is the builder for deleting a single Card entity.
func (*CardDeleteOne) Exec ¶
func (cdo *CardDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CardDeleteOne) ExecX ¶
func (cdo *CardDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardDeleteOne) Where ¶
func (cdo *CardDeleteOne) Where(ps ...predicate.Card) *CardDeleteOne
Where appends a list predicates to the CardDelete builder.
type CardEdges ¶
type CardEdges struct { // Faces holds the value of the faces edge. Faces []*CardFace `json:"faces,omitempty"` // Rulings holds the value of the rulings edge. Rulings []*Ruling `json:"rulings,omitempty"` // contains filtered or unexported fields }
CardEdges holds the relations/edges for other nodes in the graph.
func (CardEdges) FacesOrErr ¶
FacesOrErr returns the Faces value or an error if the edge was not loaded in eager-loading.
func (CardEdges) RulingsOrErr ¶
RulingsOrErr returns the Rulings value or an error if the edge was not loaded in eager-loading.
type CardFace ¶
type CardFace struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // FlavorText holds the value of the "flavor_text" field. FlavorText string `json:"flavor_text,omitempty"` // OracleText holds the value of the "oracle_text" field. OracleText string `json:"oracle_text,omitempty"` // Language holds the value of the "language" field. Language string `json:"language,omitempty"` // Cmc holds the value of the "cmc" field. Cmc float32 `json:"cmc,omitempty"` // Power holds the value of the "power" field. Power string `json:"power,omitempty"` // Toughness holds the value of the "toughness" field. Toughness string `json:"toughness,omitempty"` // Loyalty holds the value of the "loyalty" field. Loyalty string `json:"loyalty,omitempty"` // ManaCost holds the value of the "mana_cost" field. ManaCost string `json:"mana_cost,omitempty"` // TypeLine holds the value of the "type_line" field. TypeLine string `json:"type_line,omitempty"` // Colors holds the value of the "colors" field. Colors string `json:"colors,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CardFaceQuery when eager-loading is set. Edges CardFaceEdges `json:"edges"` // contains filtered or unexported fields }
CardFace is the model entity for the CardFace schema.
func (*CardFace) QueryPrintings ¶
func (cf *CardFace) QueryPrintings() *PrintingQuery
QueryPrintings queries the "printings" edge of the CardFace entity.
func (*CardFace) Unwrap ¶
Unwrap unwraps the CardFace 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 (*CardFace) Update ¶
func (cf *CardFace) Update() *CardFaceUpdateOne
Update returns a builder for updating this CardFace. Note that you need to call CardFace.Unwrap() before calling this method if this CardFace was returned from a transaction, and the transaction was committed or rolled back.
type CardFaceClient ¶
type CardFaceClient struct {
// contains filtered or unexported fields
}
CardFaceClient is a client for the CardFace schema.
func NewCardFaceClient ¶
func NewCardFaceClient(c config) *CardFaceClient
NewCardFaceClient returns a client for the CardFace from the given config.
func (*CardFaceClient) Create ¶
func (c *CardFaceClient) Create() *CardFaceCreate
Create returns a builder for creating a CardFace entity.
func (*CardFaceClient) CreateBulk ¶
func (c *CardFaceClient) CreateBulk(builders ...*CardFaceCreate) *CardFaceCreateBulk
CreateBulk returns a builder for creating a bulk of CardFace entities.
func (*CardFaceClient) Delete ¶
func (c *CardFaceClient) Delete() *CardFaceDelete
Delete returns a delete builder for CardFace.
func (*CardFaceClient) DeleteOne ¶
func (c *CardFaceClient) DeleteOne(cf *CardFace) *CardFaceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CardFaceClient) DeleteOneID ¶
func (c *CardFaceClient) DeleteOneID(id int) *CardFaceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CardFaceClient) GetX ¶
func (c *CardFaceClient) GetX(ctx context.Context, id int) *CardFace
GetX is like Get, but panics if an error occurs.
func (*CardFaceClient) Hooks ¶
func (c *CardFaceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CardFaceClient) Intercept ¶
func (c *CardFaceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cardface.Intercept(f(g(h())))`.
func (*CardFaceClient) Interceptors ¶
func (c *CardFaceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CardFaceClient) MapCreateBulk ¶
func (c *CardFaceClient) MapCreateBulk(slice any, setFunc func(*CardFaceCreate, int)) *CardFaceCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CardFaceClient) Query ¶
func (c *CardFaceClient) Query() *CardFaceQuery
Query returns a query builder for CardFace.
func (*CardFaceClient) QueryCard ¶
func (c *CardFaceClient) QueryCard(cf *CardFace) *CardQuery
QueryCard queries the card edge of a CardFace.
func (*CardFaceClient) QueryPrintings ¶
func (c *CardFaceClient) QueryPrintings(cf *CardFace) *PrintingQuery
QueryPrintings queries the printings edge of a CardFace.
func (*CardFaceClient) Update ¶
func (c *CardFaceClient) Update() *CardFaceUpdate
Update returns an update builder for CardFace.
func (*CardFaceClient) UpdateOne ¶
func (c *CardFaceClient) UpdateOne(cf *CardFace) *CardFaceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CardFaceClient) UpdateOneID ¶
func (c *CardFaceClient) UpdateOneID(id int) *CardFaceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CardFaceClient) Use ¶
func (c *CardFaceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cardface.Hooks(f(g(h())))`.
type CardFaceCreate ¶
type CardFaceCreate struct {
// contains filtered or unexported fields
}
CardFaceCreate is the builder for creating a CardFace entity.
func (*CardFaceCreate) AddPrintingIDs ¶
func (cfc *CardFaceCreate) AddPrintingIDs(ids ...int) *CardFaceCreate
AddPrintingIDs adds the "printings" edge to the Printing entity by IDs.
func (*CardFaceCreate) AddPrintings ¶
func (cfc *CardFaceCreate) AddPrintings(p ...*Printing) *CardFaceCreate
AddPrintings adds the "printings" edges to the Printing entity.
func (*CardFaceCreate) Exec ¶
func (cfc *CardFaceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CardFaceCreate) ExecX ¶
func (cfc *CardFaceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardFaceCreate) Mutation ¶
func (cfc *CardFaceCreate) Mutation() *CardFaceMutation
Mutation returns the CardFaceMutation object of the builder.
func (*CardFaceCreate) Save ¶
func (cfc *CardFaceCreate) Save(ctx context.Context) (*CardFace, error)
Save creates the CardFace in the database.
func (*CardFaceCreate) SaveX ¶
func (cfc *CardFaceCreate) SaveX(ctx context.Context) *CardFace
SaveX calls Save and panics if Save returns an error.
func (*CardFaceCreate) SetCard ¶
func (cfc *CardFaceCreate) SetCard(c *Card) *CardFaceCreate
SetCard sets the "card" edge to the Card entity.
func (*CardFaceCreate) SetCardID ¶
func (cfc *CardFaceCreate) SetCardID(id int) *CardFaceCreate
SetCardID sets the "card" edge to the Card entity by ID.
func (*CardFaceCreate) SetCmc ¶
func (cfc *CardFaceCreate) SetCmc(f float32) *CardFaceCreate
SetCmc sets the "cmc" field.
func (*CardFaceCreate) SetColors ¶
func (cfc *CardFaceCreate) SetColors(s string) *CardFaceCreate
SetColors sets the "colors" field.
func (*CardFaceCreate) SetFlavorText ¶
func (cfc *CardFaceCreate) SetFlavorText(s string) *CardFaceCreate
SetFlavorText sets the "flavor_text" field.
func (*CardFaceCreate) SetLanguage ¶
func (cfc *CardFaceCreate) SetLanguage(s string) *CardFaceCreate
SetLanguage sets the "language" field.
func (*CardFaceCreate) SetLoyalty ¶
func (cfc *CardFaceCreate) SetLoyalty(s string) *CardFaceCreate
SetLoyalty sets the "loyalty" field.
func (*CardFaceCreate) SetManaCost ¶
func (cfc *CardFaceCreate) SetManaCost(s string) *CardFaceCreate
SetManaCost sets the "mana_cost" field.
func (*CardFaceCreate) SetName ¶
func (cfc *CardFaceCreate) SetName(s string) *CardFaceCreate
SetName sets the "name" field.
func (*CardFaceCreate) SetNillableCardID ¶
func (cfc *CardFaceCreate) SetNillableCardID(id *int) *CardFaceCreate
SetNillableCardID sets the "card" edge to the Card entity by ID if the given value is not nil.
func (*CardFaceCreate) SetOracleText ¶
func (cfc *CardFaceCreate) SetOracleText(s string) *CardFaceCreate
SetOracleText sets the "oracle_text" field.
func (*CardFaceCreate) SetPower ¶
func (cfc *CardFaceCreate) SetPower(s string) *CardFaceCreate
SetPower sets the "power" field.
func (*CardFaceCreate) SetToughness ¶
func (cfc *CardFaceCreate) SetToughness(s string) *CardFaceCreate
SetToughness sets the "toughness" field.
func (*CardFaceCreate) SetTypeLine ¶
func (cfc *CardFaceCreate) SetTypeLine(s string) *CardFaceCreate
SetTypeLine sets the "type_line" field.
type CardFaceCreateBulk ¶
type CardFaceCreateBulk struct {
// contains filtered or unexported fields
}
CardFaceCreateBulk is the builder for creating many CardFace entities in bulk.
func (*CardFaceCreateBulk) Exec ¶
func (cfcb *CardFaceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CardFaceCreateBulk) ExecX ¶
func (cfcb *CardFaceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CardFaceDelete ¶
type CardFaceDelete struct {
// contains filtered or unexported fields
}
CardFaceDelete is the builder for deleting a CardFace entity.
func (*CardFaceDelete) Exec ¶
func (cfd *CardFaceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CardFaceDelete) ExecX ¶
func (cfd *CardFaceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CardFaceDelete) Where ¶
func (cfd *CardFaceDelete) Where(ps ...predicate.CardFace) *CardFaceDelete
Where appends a list predicates to the CardFaceDelete builder.
type CardFaceDeleteOne ¶
type CardFaceDeleteOne struct {
// contains filtered or unexported fields
}
CardFaceDeleteOne is the builder for deleting a single CardFace entity.
func (*CardFaceDeleteOne) Exec ¶
func (cfdo *CardFaceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CardFaceDeleteOne) ExecX ¶
func (cfdo *CardFaceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardFaceDeleteOne) Where ¶
func (cfdo *CardFaceDeleteOne) Where(ps ...predicate.CardFace) *CardFaceDeleteOne
Where appends a list predicates to the CardFaceDelete builder.
type CardFaceEdges ¶
type CardFaceEdges struct { // Card holds the value of the card edge. Card *Card `json:"card,omitempty"` // Printings holds the value of the printings edge. Printings []*Printing `json:"printings,omitempty"` // contains filtered or unexported fields }
CardFaceEdges holds the relations/edges for other nodes in the graph.
func (CardFaceEdges) CardOrErr ¶
func (e CardFaceEdges) CardOrErr() (*Card, error)
CardOrErr returns the Card value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CardFaceEdges) PrintingsOrErr ¶
func (e CardFaceEdges) PrintingsOrErr() ([]*Printing, error)
PrintingsOrErr returns the Printings value or an error if the edge was not loaded in eager-loading.
type CardFaceGroupBy ¶
type CardFaceGroupBy struct {
// contains filtered or unexported fields
}
CardFaceGroupBy is the group-by builder for CardFace entities.
func (*CardFaceGroupBy) Aggregate ¶
func (cfgb *CardFaceGroupBy) Aggregate(fns ...AggregateFunc) *CardFaceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CardFaceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CardFaceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CardFaceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CardFaceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CardFaceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CardFaceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CardFaceGroupBy) Scan ¶
func (cfgb *CardFaceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CardFaceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CardFaceMutation ¶
type CardFaceMutation struct {
// contains filtered or unexported fields
}
CardFaceMutation represents an operation that mutates the CardFace nodes in the graph.
func (*CardFaceMutation) AddCmc ¶
func (m *CardFaceMutation) AddCmc(f float32)
AddCmc adds f to the "cmc" field.
func (*CardFaceMutation) AddField ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) AddPrintingIDs ¶
func (m *CardFaceMutation) AddPrintingIDs(ids ...int)
AddPrintingIDs adds the "printings" edge to the Printing entity by ids.
func (*CardFaceMutation) AddedCmc ¶
func (m *CardFaceMutation) AddedCmc() (r float32, exists bool)
AddedCmc returns the value that was added to the "cmc" field in this mutation.
func (*CardFaceMutation) AddedEdges ¶
func (m *CardFaceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CardFaceMutation) AddedField ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) AddedFields ¶
func (m *CardFaceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CardFaceMutation) AddedIDs ¶
func (m *CardFaceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CardFaceMutation) CardCleared ¶
func (m *CardFaceMutation) CardCleared() bool
CardCleared reports if the "card" edge to the Card entity was cleared.
func (*CardFaceMutation) CardID ¶
func (m *CardFaceMutation) CardID() (id int, exists bool)
CardID returns the "card" edge ID in the mutation.
func (*CardFaceMutation) CardIDs ¶
func (m *CardFaceMutation) CardIDs() (ids []int)
CardIDs returns the "card" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CardID instead. It exists only for internal usage by the builders.
func (*CardFaceMutation) ClearCard ¶
func (m *CardFaceMutation) ClearCard()
ClearCard clears the "card" edge to the Card entity.
func (*CardFaceMutation) ClearEdge ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) ClearField ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) ClearPrintings ¶
func (m *CardFaceMutation) ClearPrintings()
ClearPrintings clears the "printings" edge to the Printing entity.
func (*CardFaceMutation) ClearedEdges ¶
func (m *CardFaceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CardFaceMutation) ClearedFields ¶
func (m *CardFaceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CardFaceMutation) Client ¶
func (m CardFaceMutation) 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 (*CardFaceMutation) Cmc ¶
func (m *CardFaceMutation) Cmc() (r float32, exists bool)
Cmc returns the value of the "cmc" field in the mutation.
func (*CardFaceMutation) Colors ¶
func (m *CardFaceMutation) Colors() (r string, exists bool)
Colors returns the value of the "colors" field in the mutation.
func (*CardFaceMutation) EdgeCleared ¶
func (m *CardFaceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CardFaceMutation) Field ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) FieldCleared ¶
func (m *CardFaceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CardFaceMutation) Fields ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) FlavorText ¶
func (m *CardFaceMutation) FlavorText() (r string, exists bool)
FlavorText returns the value of the "flavor_text" field in the mutation.
func (*CardFaceMutation) ID ¶
func (m *CardFaceMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CardFaceMutation) IDs ¶
func (m *CardFaceMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CardFaceMutation) Language ¶
func (m *CardFaceMutation) Language() (r string, exists bool)
Language returns the value of the "language" field in the mutation.
func (*CardFaceMutation) Loyalty ¶
func (m *CardFaceMutation) Loyalty() (r string, exists bool)
Loyalty returns the value of the "loyalty" field in the mutation.
func (*CardFaceMutation) ManaCost ¶
func (m *CardFaceMutation) ManaCost() (r string, exists bool)
ManaCost returns the value of the "mana_cost" field in the mutation.
func (*CardFaceMutation) Name ¶
func (m *CardFaceMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CardFaceMutation) OldCmc ¶
func (m *CardFaceMutation) OldCmc(ctx context.Context) (v float32, err error)
OldCmc returns the old "cmc" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OldColors ¶
func (m *CardFaceMutation) OldColors(ctx context.Context) (v string, err error)
OldColors returns the old "colors" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) 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 (*CardFaceMutation) OldFlavorText ¶
func (m *CardFaceMutation) OldFlavorText(ctx context.Context) (v string, err error)
OldFlavorText returns the old "flavor_text" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OldLanguage ¶
func (m *CardFaceMutation) OldLanguage(ctx context.Context) (v string, err error)
OldLanguage returns the old "language" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OldLoyalty ¶
func (m *CardFaceMutation) OldLoyalty(ctx context.Context) (v string, err error)
OldLoyalty returns the old "loyalty" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OldManaCost ¶
func (m *CardFaceMutation) OldManaCost(ctx context.Context) (v string, err error)
OldManaCost returns the old "mana_cost" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OldName ¶
func (m *CardFaceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OldOracleText ¶
func (m *CardFaceMutation) OldOracleText(ctx context.Context) (v string, err error)
OldOracleText returns the old "oracle_text" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OldPower ¶
func (m *CardFaceMutation) OldPower(ctx context.Context) (v string, err error)
OldPower returns the old "power" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OldToughness ¶
func (m *CardFaceMutation) OldToughness(ctx context.Context) (v string, err error)
OldToughness returns the old "toughness" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OldTypeLine ¶
func (m *CardFaceMutation) OldTypeLine(ctx context.Context) (v string, err error)
OldTypeLine returns the old "type_line" field's value of the CardFace entity. If the CardFace 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 (*CardFaceMutation) OracleText ¶
func (m *CardFaceMutation) OracleText() (r string, exists bool)
OracleText returns the value of the "oracle_text" field in the mutation.
func (*CardFaceMutation) Power ¶
func (m *CardFaceMutation) Power() (r string, exists bool)
Power returns the value of the "power" field in the mutation.
func (*CardFaceMutation) PrintingsCleared ¶
func (m *CardFaceMutation) PrintingsCleared() bool
PrintingsCleared reports if the "printings" edge to the Printing entity was cleared.
func (*CardFaceMutation) PrintingsIDs ¶
func (m *CardFaceMutation) PrintingsIDs() (ids []int)
PrintingsIDs returns the "printings" edge IDs in the mutation.
func (*CardFaceMutation) RemovePrintingIDs ¶
func (m *CardFaceMutation) RemovePrintingIDs(ids ...int)
RemovePrintingIDs removes the "printings" edge to the Printing entity by IDs.
func (*CardFaceMutation) RemovedEdges ¶
func (m *CardFaceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CardFaceMutation) RemovedIDs ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) RemovedPrintingsIDs ¶
func (m *CardFaceMutation) RemovedPrintingsIDs() (ids []int)
RemovedPrintings returns the removed IDs of the "printings" edge to the Printing entity.
func (*CardFaceMutation) ResetCard ¶
func (m *CardFaceMutation) ResetCard()
ResetCard resets all changes to the "card" edge.
func (*CardFaceMutation) ResetCmc ¶
func (m *CardFaceMutation) ResetCmc()
ResetCmc resets all changes to the "cmc" field.
func (*CardFaceMutation) ResetColors ¶
func (m *CardFaceMutation) ResetColors()
ResetColors resets all changes to the "colors" field.
func (*CardFaceMutation) ResetEdge ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) ResetField ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) ResetFlavorText ¶
func (m *CardFaceMutation) ResetFlavorText()
ResetFlavorText resets all changes to the "flavor_text" field.
func (*CardFaceMutation) ResetLanguage ¶
func (m *CardFaceMutation) ResetLanguage()
ResetLanguage resets all changes to the "language" field.
func (*CardFaceMutation) ResetLoyalty ¶
func (m *CardFaceMutation) ResetLoyalty()
ResetLoyalty resets all changes to the "loyalty" field.
func (*CardFaceMutation) ResetManaCost ¶
func (m *CardFaceMutation) ResetManaCost()
ResetManaCost resets all changes to the "mana_cost" field.
func (*CardFaceMutation) ResetName ¶
func (m *CardFaceMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CardFaceMutation) ResetOracleText ¶
func (m *CardFaceMutation) ResetOracleText()
ResetOracleText resets all changes to the "oracle_text" field.
func (*CardFaceMutation) ResetPower ¶
func (m *CardFaceMutation) ResetPower()
ResetPower resets all changes to the "power" field.
func (*CardFaceMutation) ResetPrintings ¶
func (m *CardFaceMutation) ResetPrintings()
ResetPrintings resets all changes to the "printings" edge.
func (*CardFaceMutation) ResetToughness ¶
func (m *CardFaceMutation) ResetToughness()
ResetToughness resets all changes to the "toughness" field.
func (*CardFaceMutation) ResetTypeLine ¶
func (m *CardFaceMutation) ResetTypeLine()
ResetTypeLine resets all changes to the "type_line" field.
func (*CardFaceMutation) SetCardID ¶
func (m *CardFaceMutation) SetCardID(id int)
SetCardID sets the "card" edge to the Card entity by id.
func (*CardFaceMutation) SetCmc ¶
func (m *CardFaceMutation) SetCmc(f float32)
SetCmc sets the "cmc" field.
func (*CardFaceMutation) SetColors ¶
func (m *CardFaceMutation) SetColors(s string)
SetColors sets the "colors" field.
func (*CardFaceMutation) SetField ¶
func (m *CardFaceMutation) 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 (*CardFaceMutation) SetFlavorText ¶
func (m *CardFaceMutation) SetFlavorText(s string)
SetFlavorText sets the "flavor_text" field.
func (*CardFaceMutation) SetLanguage ¶
func (m *CardFaceMutation) SetLanguage(s string)
SetLanguage sets the "language" field.
func (*CardFaceMutation) SetLoyalty ¶
func (m *CardFaceMutation) SetLoyalty(s string)
SetLoyalty sets the "loyalty" field.
func (*CardFaceMutation) SetManaCost ¶
func (m *CardFaceMutation) SetManaCost(s string)
SetManaCost sets the "mana_cost" field.
func (*CardFaceMutation) SetName ¶
func (m *CardFaceMutation) SetName(s string)
SetName sets the "name" field.
func (*CardFaceMutation) SetOp ¶
func (m *CardFaceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CardFaceMutation) SetOracleText ¶
func (m *CardFaceMutation) SetOracleText(s string)
SetOracleText sets the "oracle_text" field.
func (*CardFaceMutation) SetPower ¶
func (m *CardFaceMutation) SetPower(s string)
SetPower sets the "power" field.
func (*CardFaceMutation) SetToughness ¶
func (m *CardFaceMutation) SetToughness(s string)
SetToughness sets the "toughness" field.
func (*CardFaceMutation) SetTypeLine ¶
func (m *CardFaceMutation) SetTypeLine(s string)
SetTypeLine sets the "type_line" field.
func (*CardFaceMutation) Toughness ¶
func (m *CardFaceMutation) Toughness() (r string, exists bool)
Toughness returns the value of the "toughness" field in the mutation.
func (CardFaceMutation) Tx ¶
func (m CardFaceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CardFaceMutation) Type ¶
func (m *CardFaceMutation) Type() string
Type returns the node type of this mutation (CardFace).
func (*CardFaceMutation) TypeLine ¶
func (m *CardFaceMutation) TypeLine() (r string, exists bool)
TypeLine returns the value of the "type_line" field in the mutation.
func (*CardFaceMutation) Where ¶
func (m *CardFaceMutation) Where(ps ...predicate.CardFace)
Where appends a list predicates to the CardFaceMutation builder.
func (*CardFaceMutation) WhereP ¶
func (m *CardFaceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CardFaceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CardFaceQuery ¶
type CardFaceQuery struct {
// contains filtered or unexported fields
}
CardFaceQuery is the builder for querying CardFace entities.
func (*CardFaceQuery) Aggregate ¶
func (cfq *CardFaceQuery) Aggregate(fns ...AggregateFunc) *CardFaceSelect
Aggregate returns a CardFaceSelect configured with the given aggregations.
func (*CardFaceQuery) All ¶
func (cfq *CardFaceQuery) All(ctx context.Context) ([]*CardFace, error)
All executes the query and returns a list of CardFaces.
func (*CardFaceQuery) AllX ¶
func (cfq *CardFaceQuery) AllX(ctx context.Context) []*CardFace
AllX is like All, but panics if an error occurs.
func (*CardFaceQuery) Clone ¶
func (cfq *CardFaceQuery) Clone() *CardFaceQuery
Clone returns a duplicate of the CardFaceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CardFaceQuery) Count ¶
func (cfq *CardFaceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CardFaceQuery) CountX ¶
func (cfq *CardFaceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CardFaceQuery) Exist ¶
func (cfq *CardFaceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CardFaceQuery) ExistX ¶
func (cfq *CardFaceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CardFaceQuery) First ¶
func (cfq *CardFaceQuery) First(ctx context.Context) (*CardFace, error)
First returns the first CardFace entity from the query. Returns a *NotFoundError when no CardFace was found.
func (*CardFaceQuery) FirstID ¶
func (cfq *CardFaceQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first CardFace ID from the query. Returns a *NotFoundError when no CardFace ID was found.
func (*CardFaceQuery) FirstIDX ¶
func (cfq *CardFaceQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*CardFaceQuery) FirstX ¶
func (cfq *CardFaceQuery) FirstX(ctx context.Context) *CardFace
FirstX is like First, but panics if an error occurs.
func (*CardFaceQuery) GroupBy ¶
func (cfq *CardFaceQuery) GroupBy(field string, fields ...string) *CardFaceGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.CardFace.Query(). GroupBy(cardface.FieldName). Aggregate(oracle.Count()). Scan(ctx, &v)
func (*CardFaceQuery) IDs ¶
func (cfq *CardFaceQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of CardFace IDs.
func (*CardFaceQuery) IDsX ¶
func (cfq *CardFaceQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CardFaceQuery) Limit ¶
func (cfq *CardFaceQuery) Limit(limit int) *CardFaceQuery
Limit the number of records to be returned by this query.
func (*CardFaceQuery) Offset ¶
func (cfq *CardFaceQuery) Offset(offset int) *CardFaceQuery
Offset to start from.
func (*CardFaceQuery) Only ¶
func (cfq *CardFaceQuery) Only(ctx context.Context) (*CardFace, error)
Only returns a single CardFace entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CardFace entity is found. Returns a *NotFoundError when no CardFace entities are found.
func (*CardFaceQuery) OnlyID ¶
func (cfq *CardFaceQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only CardFace ID in the query. Returns a *NotSingularError when more than one CardFace ID is found. Returns a *NotFoundError when no entities are found.
func (*CardFaceQuery) OnlyIDX ¶
func (cfq *CardFaceQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CardFaceQuery) OnlyX ¶
func (cfq *CardFaceQuery) OnlyX(ctx context.Context) *CardFace
OnlyX is like Only, but panics if an error occurs.
func (*CardFaceQuery) Order ¶
func (cfq *CardFaceQuery) Order(o ...cardface.OrderOption) *CardFaceQuery
Order specifies how the records should be ordered.
func (*CardFaceQuery) QueryCard ¶
func (cfq *CardFaceQuery) QueryCard() *CardQuery
QueryCard chains the current query on the "card" edge.
func (*CardFaceQuery) QueryPrintings ¶
func (cfq *CardFaceQuery) QueryPrintings() *PrintingQuery
QueryPrintings chains the current query on the "printings" edge.
func (*CardFaceQuery) Select ¶
func (cfq *CardFaceQuery) Select(fields ...string) *CardFaceSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.CardFace.Query(). Select(cardface.FieldName). Scan(ctx, &v)
func (*CardFaceQuery) Unique ¶
func (cfq *CardFaceQuery) Unique(unique bool) *CardFaceQuery
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 (*CardFaceQuery) Where ¶
func (cfq *CardFaceQuery) Where(ps ...predicate.CardFace) *CardFaceQuery
Where adds a new predicate for the CardFaceQuery builder.
func (*CardFaceQuery) WithCard ¶
func (cfq *CardFaceQuery) WithCard(opts ...func(*CardQuery)) *CardFaceQuery
WithCard tells the query-builder to eager-load the nodes that are connected to the "card" edge. The optional arguments are used to configure the query builder of the edge.
func (*CardFaceQuery) WithPrintings ¶
func (cfq *CardFaceQuery) WithPrintings(opts ...func(*PrintingQuery)) *CardFaceQuery
WithPrintings tells the query-builder to eager-load the nodes that are connected to the "printings" edge. The optional arguments are used to configure the query builder of the edge.
type CardFaceSelect ¶
type CardFaceSelect struct { *CardFaceQuery // contains filtered or unexported fields }
CardFaceSelect is the builder for selecting fields of CardFace entities.
func (*CardFaceSelect) Aggregate ¶
func (cfs *CardFaceSelect) Aggregate(fns ...AggregateFunc) *CardFaceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CardFaceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CardFaceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CardFaceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CardFaceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CardFaceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CardFaceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CardFaceSelect) Scan ¶
func (cfs *CardFaceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CardFaceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CardFaceUpdate ¶
type CardFaceUpdate struct {
// contains filtered or unexported fields
}
CardFaceUpdate is the builder for updating CardFace entities.
func (*CardFaceUpdate) AddCmc ¶
func (cfu *CardFaceUpdate) AddCmc(f float32) *CardFaceUpdate
AddCmc adds f to the "cmc" field.
func (*CardFaceUpdate) AddPrintingIDs ¶
func (cfu *CardFaceUpdate) AddPrintingIDs(ids ...int) *CardFaceUpdate
AddPrintingIDs adds the "printings" edge to the Printing entity by IDs.
func (*CardFaceUpdate) AddPrintings ¶
func (cfu *CardFaceUpdate) AddPrintings(p ...*Printing) *CardFaceUpdate
AddPrintings adds the "printings" edges to the Printing entity.
func (*CardFaceUpdate) ClearCard ¶
func (cfu *CardFaceUpdate) ClearCard() *CardFaceUpdate
ClearCard clears the "card" edge to the Card entity.
func (*CardFaceUpdate) ClearPrintings ¶
func (cfu *CardFaceUpdate) ClearPrintings() *CardFaceUpdate
ClearPrintings clears all "printings" edges to the Printing entity.
func (*CardFaceUpdate) Exec ¶
func (cfu *CardFaceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CardFaceUpdate) ExecX ¶
func (cfu *CardFaceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardFaceUpdate) Mutation ¶
func (cfu *CardFaceUpdate) Mutation() *CardFaceMutation
Mutation returns the CardFaceMutation object of the builder.
func (*CardFaceUpdate) RemovePrintingIDs ¶
func (cfu *CardFaceUpdate) RemovePrintingIDs(ids ...int) *CardFaceUpdate
RemovePrintingIDs removes the "printings" edge to Printing entities by IDs.
func (*CardFaceUpdate) RemovePrintings ¶
func (cfu *CardFaceUpdate) RemovePrintings(p ...*Printing) *CardFaceUpdate
RemovePrintings removes "printings" edges to Printing entities.
func (*CardFaceUpdate) Save ¶
func (cfu *CardFaceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CardFaceUpdate) SaveX ¶
func (cfu *CardFaceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CardFaceUpdate) SetCard ¶
func (cfu *CardFaceUpdate) SetCard(c *Card) *CardFaceUpdate
SetCard sets the "card" edge to the Card entity.
func (*CardFaceUpdate) SetCardID ¶
func (cfu *CardFaceUpdate) SetCardID(id int) *CardFaceUpdate
SetCardID sets the "card" edge to the Card entity by ID.
func (*CardFaceUpdate) SetCmc ¶
func (cfu *CardFaceUpdate) SetCmc(f float32) *CardFaceUpdate
SetCmc sets the "cmc" field.
func (*CardFaceUpdate) SetColors ¶
func (cfu *CardFaceUpdate) SetColors(s string) *CardFaceUpdate
SetColors sets the "colors" field.
func (*CardFaceUpdate) SetFlavorText ¶
func (cfu *CardFaceUpdate) SetFlavorText(s string) *CardFaceUpdate
SetFlavorText sets the "flavor_text" field.
func (*CardFaceUpdate) SetLanguage ¶
func (cfu *CardFaceUpdate) SetLanguage(s string) *CardFaceUpdate
SetLanguage sets the "language" field.
func (*CardFaceUpdate) SetLoyalty ¶
func (cfu *CardFaceUpdate) SetLoyalty(s string) *CardFaceUpdate
SetLoyalty sets the "loyalty" field.
func (*CardFaceUpdate) SetManaCost ¶
func (cfu *CardFaceUpdate) SetManaCost(s string) *CardFaceUpdate
SetManaCost sets the "mana_cost" field.
func (*CardFaceUpdate) SetName ¶
func (cfu *CardFaceUpdate) SetName(s string) *CardFaceUpdate
SetName sets the "name" field.
func (*CardFaceUpdate) SetNillableCardID ¶
func (cfu *CardFaceUpdate) SetNillableCardID(id *int) *CardFaceUpdate
SetNillableCardID sets the "card" edge to the Card entity by ID if the given value is not nil.
func (*CardFaceUpdate) SetNillableCmc ¶
func (cfu *CardFaceUpdate) SetNillableCmc(f *float32) *CardFaceUpdate
SetNillableCmc sets the "cmc" field if the given value is not nil.
func (*CardFaceUpdate) SetNillableColors ¶
func (cfu *CardFaceUpdate) SetNillableColors(s *string) *CardFaceUpdate
SetNillableColors sets the "colors" field if the given value is not nil.
func (*CardFaceUpdate) SetNillableFlavorText ¶
func (cfu *CardFaceUpdate) SetNillableFlavorText(s *string) *CardFaceUpdate
SetNillableFlavorText sets the "flavor_text" field if the given value is not nil.
func (*CardFaceUpdate) SetNillableLanguage ¶
func (cfu *CardFaceUpdate) SetNillableLanguage(s *string) *CardFaceUpdate
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*CardFaceUpdate) SetNillableLoyalty ¶
func (cfu *CardFaceUpdate) SetNillableLoyalty(s *string) *CardFaceUpdate
SetNillableLoyalty sets the "loyalty" field if the given value is not nil.
func (*CardFaceUpdate) SetNillableManaCost ¶
func (cfu *CardFaceUpdate) SetNillableManaCost(s *string) *CardFaceUpdate
SetNillableManaCost sets the "mana_cost" field if the given value is not nil.
func (*CardFaceUpdate) SetNillableName ¶
func (cfu *CardFaceUpdate) SetNillableName(s *string) *CardFaceUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CardFaceUpdate) SetNillableOracleText ¶
func (cfu *CardFaceUpdate) SetNillableOracleText(s *string) *CardFaceUpdate
SetNillableOracleText sets the "oracle_text" field if the given value is not nil.
func (*CardFaceUpdate) SetNillablePower ¶
func (cfu *CardFaceUpdate) SetNillablePower(s *string) *CardFaceUpdate
SetNillablePower sets the "power" field if the given value is not nil.
func (*CardFaceUpdate) SetNillableToughness ¶
func (cfu *CardFaceUpdate) SetNillableToughness(s *string) *CardFaceUpdate
SetNillableToughness sets the "toughness" field if the given value is not nil.
func (*CardFaceUpdate) SetNillableTypeLine ¶
func (cfu *CardFaceUpdate) SetNillableTypeLine(s *string) *CardFaceUpdate
SetNillableTypeLine sets the "type_line" field if the given value is not nil.
func (*CardFaceUpdate) SetOracleText ¶
func (cfu *CardFaceUpdate) SetOracleText(s string) *CardFaceUpdate
SetOracleText sets the "oracle_text" field.
func (*CardFaceUpdate) SetPower ¶
func (cfu *CardFaceUpdate) SetPower(s string) *CardFaceUpdate
SetPower sets the "power" field.
func (*CardFaceUpdate) SetToughness ¶
func (cfu *CardFaceUpdate) SetToughness(s string) *CardFaceUpdate
SetToughness sets the "toughness" field.
func (*CardFaceUpdate) SetTypeLine ¶
func (cfu *CardFaceUpdate) SetTypeLine(s string) *CardFaceUpdate
SetTypeLine sets the "type_line" field.
func (*CardFaceUpdate) Where ¶
func (cfu *CardFaceUpdate) Where(ps ...predicate.CardFace) *CardFaceUpdate
Where appends a list predicates to the CardFaceUpdate builder.
type CardFaceUpdateOne ¶
type CardFaceUpdateOne struct {
// contains filtered or unexported fields
}
CardFaceUpdateOne is the builder for updating a single CardFace entity.
func (*CardFaceUpdateOne) AddCmc ¶
func (cfuo *CardFaceUpdateOne) AddCmc(f float32) *CardFaceUpdateOne
AddCmc adds f to the "cmc" field.
func (*CardFaceUpdateOne) AddPrintingIDs ¶
func (cfuo *CardFaceUpdateOne) AddPrintingIDs(ids ...int) *CardFaceUpdateOne
AddPrintingIDs adds the "printings" edge to the Printing entity by IDs.
func (*CardFaceUpdateOne) AddPrintings ¶
func (cfuo *CardFaceUpdateOne) AddPrintings(p ...*Printing) *CardFaceUpdateOne
AddPrintings adds the "printings" edges to the Printing entity.
func (*CardFaceUpdateOne) ClearCard ¶
func (cfuo *CardFaceUpdateOne) ClearCard() *CardFaceUpdateOne
ClearCard clears the "card" edge to the Card entity.
func (*CardFaceUpdateOne) ClearPrintings ¶
func (cfuo *CardFaceUpdateOne) ClearPrintings() *CardFaceUpdateOne
ClearPrintings clears all "printings" edges to the Printing entity.
func (*CardFaceUpdateOne) Exec ¶
func (cfuo *CardFaceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CardFaceUpdateOne) ExecX ¶
func (cfuo *CardFaceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardFaceUpdateOne) Mutation ¶
func (cfuo *CardFaceUpdateOne) Mutation() *CardFaceMutation
Mutation returns the CardFaceMutation object of the builder.
func (*CardFaceUpdateOne) RemovePrintingIDs ¶
func (cfuo *CardFaceUpdateOne) RemovePrintingIDs(ids ...int) *CardFaceUpdateOne
RemovePrintingIDs removes the "printings" edge to Printing entities by IDs.
func (*CardFaceUpdateOne) RemovePrintings ¶
func (cfuo *CardFaceUpdateOne) RemovePrintings(p ...*Printing) *CardFaceUpdateOne
RemovePrintings removes "printings" edges to Printing entities.
func (*CardFaceUpdateOne) Save ¶
func (cfuo *CardFaceUpdateOne) Save(ctx context.Context) (*CardFace, error)
Save executes the query and returns the updated CardFace entity.
func (*CardFaceUpdateOne) SaveX ¶
func (cfuo *CardFaceUpdateOne) SaveX(ctx context.Context) *CardFace
SaveX is like Save, but panics if an error occurs.
func (*CardFaceUpdateOne) Select ¶
func (cfuo *CardFaceUpdateOne) Select(field string, fields ...string) *CardFaceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CardFaceUpdateOne) SetCard ¶
func (cfuo *CardFaceUpdateOne) SetCard(c *Card) *CardFaceUpdateOne
SetCard sets the "card" edge to the Card entity.
func (*CardFaceUpdateOne) SetCardID ¶
func (cfuo *CardFaceUpdateOne) SetCardID(id int) *CardFaceUpdateOne
SetCardID sets the "card" edge to the Card entity by ID.
func (*CardFaceUpdateOne) SetCmc ¶
func (cfuo *CardFaceUpdateOne) SetCmc(f float32) *CardFaceUpdateOne
SetCmc sets the "cmc" field.
func (*CardFaceUpdateOne) SetColors ¶
func (cfuo *CardFaceUpdateOne) SetColors(s string) *CardFaceUpdateOne
SetColors sets the "colors" field.
func (*CardFaceUpdateOne) SetFlavorText ¶
func (cfuo *CardFaceUpdateOne) SetFlavorText(s string) *CardFaceUpdateOne
SetFlavorText sets the "flavor_text" field.
func (*CardFaceUpdateOne) SetLanguage ¶
func (cfuo *CardFaceUpdateOne) SetLanguage(s string) *CardFaceUpdateOne
SetLanguage sets the "language" field.
func (*CardFaceUpdateOne) SetLoyalty ¶
func (cfuo *CardFaceUpdateOne) SetLoyalty(s string) *CardFaceUpdateOne
SetLoyalty sets the "loyalty" field.
func (*CardFaceUpdateOne) SetManaCost ¶
func (cfuo *CardFaceUpdateOne) SetManaCost(s string) *CardFaceUpdateOne
SetManaCost sets the "mana_cost" field.
func (*CardFaceUpdateOne) SetName ¶
func (cfuo *CardFaceUpdateOne) SetName(s string) *CardFaceUpdateOne
SetName sets the "name" field.
func (*CardFaceUpdateOne) SetNillableCardID ¶
func (cfuo *CardFaceUpdateOne) SetNillableCardID(id *int) *CardFaceUpdateOne
SetNillableCardID sets the "card" edge to the Card entity by ID if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableCmc ¶
func (cfuo *CardFaceUpdateOne) SetNillableCmc(f *float32) *CardFaceUpdateOne
SetNillableCmc sets the "cmc" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableColors ¶
func (cfuo *CardFaceUpdateOne) SetNillableColors(s *string) *CardFaceUpdateOne
SetNillableColors sets the "colors" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableFlavorText ¶
func (cfuo *CardFaceUpdateOne) SetNillableFlavorText(s *string) *CardFaceUpdateOne
SetNillableFlavorText sets the "flavor_text" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableLanguage ¶
func (cfuo *CardFaceUpdateOne) SetNillableLanguage(s *string) *CardFaceUpdateOne
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableLoyalty ¶
func (cfuo *CardFaceUpdateOne) SetNillableLoyalty(s *string) *CardFaceUpdateOne
SetNillableLoyalty sets the "loyalty" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableManaCost ¶
func (cfuo *CardFaceUpdateOne) SetNillableManaCost(s *string) *CardFaceUpdateOne
SetNillableManaCost sets the "mana_cost" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableName ¶
func (cfuo *CardFaceUpdateOne) SetNillableName(s *string) *CardFaceUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableOracleText ¶
func (cfuo *CardFaceUpdateOne) SetNillableOracleText(s *string) *CardFaceUpdateOne
SetNillableOracleText sets the "oracle_text" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillablePower ¶
func (cfuo *CardFaceUpdateOne) SetNillablePower(s *string) *CardFaceUpdateOne
SetNillablePower sets the "power" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableToughness ¶
func (cfuo *CardFaceUpdateOne) SetNillableToughness(s *string) *CardFaceUpdateOne
SetNillableToughness sets the "toughness" field if the given value is not nil.
func (*CardFaceUpdateOne) SetNillableTypeLine ¶
func (cfuo *CardFaceUpdateOne) SetNillableTypeLine(s *string) *CardFaceUpdateOne
SetNillableTypeLine sets the "type_line" field if the given value is not nil.
func (*CardFaceUpdateOne) SetOracleText ¶
func (cfuo *CardFaceUpdateOne) SetOracleText(s string) *CardFaceUpdateOne
SetOracleText sets the "oracle_text" field.
func (*CardFaceUpdateOne) SetPower ¶
func (cfuo *CardFaceUpdateOne) SetPower(s string) *CardFaceUpdateOne
SetPower sets the "power" field.
func (*CardFaceUpdateOne) SetToughness ¶
func (cfuo *CardFaceUpdateOne) SetToughness(s string) *CardFaceUpdateOne
SetToughness sets the "toughness" field.
func (*CardFaceUpdateOne) SetTypeLine ¶
func (cfuo *CardFaceUpdateOne) SetTypeLine(s string) *CardFaceUpdateOne
SetTypeLine sets the "type_line" field.
func (*CardFaceUpdateOne) Where ¶
func (cfuo *CardFaceUpdateOne) Where(ps ...predicate.CardFace) *CardFaceUpdateOne
Where appends a list predicates to the CardFaceUpdate builder.
type CardGroupBy ¶
type CardGroupBy struct {
// contains filtered or unexported fields
}
CardGroupBy is the group-by builder for Card entities.
func (*CardGroupBy) Aggregate ¶
func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CardGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Scan ¶
func (cgb *CardGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CardGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CardMutation ¶
type CardMutation struct {
// contains filtered or unexported fields
}
CardMutation represents an operation that mutates the Card nodes in the graph.
func (*CardMutation) AddColorIdentity ¶
func (m *CardMutation) AddColorIdentity(u int8)
AddColorIdentity adds u to the "color_identity" field.
func (*CardMutation) AddFaceIDs ¶
func (m *CardMutation) AddFaceIDs(ids ...int)
AddFaceIDs adds the "faces" edge to the CardFace entity by ids.
func (*CardMutation) AddField ¶
func (m *CardMutation) 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 (*CardMutation) AddRulingIDs ¶
func (m *CardMutation) AddRulingIDs(ids ...int)
AddRulingIDs adds the "rulings" edge to the Ruling entity by ids.
func (*CardMutation) AddedColorIdentity ¶
func (m *CardMutation) AddedColorIdentity() (r int8, exists bool)
AddedColorIdentity returns the value that was added to the "color_identity" field in this mutation.
func (*CardMutation) AddedEdges ¶
func (m *CardMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CardMutation) AddedField ¶
func (m *CardMutation) 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 (*CardMutation) AddedFields ¶
func (m *CardMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CardMutation) AddedIDs ¶
func (m *CardMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CardMutation) ClearEdge ¶
func (m *CardMutation) 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 (*CardMutation) ClearFaces ¶
func (m *CardMutation) ClearFaces()
ClearFaces clears the "faces" edge to the CardFace entity.
func (*CardMutation) ClearField ¶
func (m *CardMutation) 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 (*CardMutation) ClearRulings ¶
func (m *CardMutation) ClearRulings()
ClearRulings clears the "rulings" edge to the Ruling entity.
func (*CardMutation) ClearedEdges ¶
func (m *CardMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CardMutation) ClearedFields ¶
func (m *CardMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CardMutation) Client ¶
func (m CardMutation) 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 (*CardMutation) ColorIdentity ¶
func (m *CardMutation) ColorIdentity() (r uint8, exists bool)
ColorIdentity returns the value of the "color_identity" field in the mutation.
func (*CardMutation) EdgeCleared ¶
func (m *CardMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CardMutation) FacesCleared ¶
func (m *CardMutation) FacesCleared() bool
FacesCleared reports if the "faces" edge to the CardFace entity was cleared.
func (*CardMutation) FacesIDs ¶
func (m *CardMutation) FacesIDs() (ids []int)
FacesIDs returns the "faces" edge IDs in the mutation.
func (*CardMutation) Field ¶
func (m *CardMutation) 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 (*CardMutation) FieldCleared ¶
func (m *CardMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CardMutation) Fields ¶
func (m *CardMutation) 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 (*CardMutation) ID ¶
func (m *CardMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CardMutation) IDs ¶
func (m *CardMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CardMutation) Name ¶
func (m *CardMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CardMutation) OldColorIdentity ¶
func (m *CardMutation) OldColorIdentity(ctx context.Context) (v uint8, err error)
OldColorIdentity returns the old "color_identity" field's value of the Card entity. If the Card 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 (*CardMutation) 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 (*CardMutation) OldName ¶
func (m *CardMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Card entity. If the Card 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 (*CardMutation) OldOracleID ¶
func (m *CardMutation) OldOracleID(ctx context.Context) (v string, err error)
OldOracleID returns the old "oracle_id" field's value of the Card entity. If the Card 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 (*CardMutation) OracleID ¶
func (m *CardMutation) OracleID() (r string, exists bool)
OracleID returns the value of the "oracle_id" field in the mutation.
func (*CardMutation) RemoveFaceIDs ¶
func (m *CardMutation) RemoveFaceIDs(ids ...int)
RemoveFaceIDs removes the "faces" edge to the CardFace entity by IDs.
func (*CardMutation) RemoveRulingIDs ¶
func (m *CardMutation) RemoveRulingIDs(ids ...int)
RemoveRulingIDs removes the "rulings" edge to the Ruling entity by IDs.
func (*CardMutation) RemovedEdges ¶
func (m *CardMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CardMutation) RemovedFacesIDs ¶
func (m *CardMutation) RemovedFacesIDs() (ids []int)
RemovedFaces returns the removed IDs of the "faces" edge to the CardFace entity.
func (*CardMutation) RemovedIDs ¶
func (m *CardMutation) 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 (*CardMutation) RemovedRulingsIDs ¶
func (m *CardMutation) RemovedRulingsIDs() (ids []int)
RemovedRulings returns the removed IDs of the "rulings" edge to the Ruling entity.
func (*CardMutation) ResetColorIdentity ¶
func (m *CardMutation) ResetColorIdentity()
ResetColorIdentity resets all changes to the "color_identity" field.
func (*CardMutation) ResetEdge ¶
func (m *CardMutation) 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 (*CardMutation) ResetFaces ¶
func (m *CardMutation) ResetFaces()
ResetFaces resets all changes to the "faces" edge.
func (*CardMutation) ResetField ¶
func (m *CardMutation) 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 (*CardMutation) ResetName ¶
func (m *CardMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CardMutation) ResetOracleID ¶
func (m *CardMutation) ResetOracleID()
ResetOracleID resets all changes to the "oracle_id" field.
func (*CardMutation) ResetRulings ¶
func (m *CardMutation) ResetRulings()
ResetRulings resets all changes to the "rulings" edge.
func (*CardMutation) RulingsCleared ¶
func (m *CardMutation) RulingsCleared() bool
RulingsCleared reports if the "rulings" edge to the Ruling entity was cleared.
func (*CardMutation) RulingsIDs ¶
func (m *CardMutation) RulingsIDs() (ids []int)
RulingsIDs returns the "rulings" edge IDs in the mutation.
func (*CardMutation) SetColorIdentity ¶
func (m *CardMutation) SetColorIdentity(u uint8)
SetColorIdentity sets the "color_identity" field.
func (*CardMutation) SetField ¶
func (m *CardMutation) 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 (*CardMutation) SetName ¶
func (m *CardMutation) SetName(s string)
SetName sets the "name" field.
func (*CardMutation) SetOp ¶
func (m *CardMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CardMutation) SetOracleID ¶
func (m *CardMutation) SetOracleID(s string)
SetOracleID sets the "oracle_id" field.
func (CardMutation) Tx ¶
func (m CardMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CardMutation) Type ¶
func (m *CardMutation) Type() string
Type returns the node type of this mutation (Card).
func (*CardMutation) Where ¶
func (m *CardMutation) Where(ps ...predicate.Card)
Where appends a list predicates to the CardMutation builder.
func (*CardMutation) WhereP ¶
func (m *CardMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CardMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CardQuery ¶
type CardQuery struct {
// contains filtered or unexported fields
}
CardQuery is the builder for querying Card entities.
func (*CardQuery) Aggregate ¶
func (cq *CardQuery) Aggregate(fns ...AggregateFunc) *CardSelect
Aggregate returns a CardSelect configured with the given aggregations.
func (*CardQuery) Clone ¶
Clone returns a duplicate of the CardQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CardQuery) First ¶
First returns the first Card entity from the query. Returns a *NotFoundError when no Card was found.
func (*CardQuery) FirstID ¶
FirstID returns the first Card ID from the query. Returns a *NotFoundError when no Card ID was found.
func (*CardQuery) GroupBy ¶
func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Card.Query(). GroupBy(card.FieldName). Aggregate(oracle.Count()). Scan(ctx, &v)
func (*CardQuery) Only ¶
Only returns a single Card entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Card entity is found. Returns a *NotFoundError when no Card entities are found.
func (*CardQuery) OnlyID ¶
OnlyID is like Only, but returns the only Card ID in the query. Returns a *NotSingularError when more than one Card ID is found. Returns a *NotFoundError when no entities are found.
func (*CardQuery) Order ¶
func (cq *CardQuery) Order(o ...card.OrderOption) *CardQuery
Order specifies how the records should be ordered.
func (*CardQuery) QueryFaces ¶
func (cq *CardQuery) QueryFaces() *CardFaceQuery
QueryFaces chains the current query on the "faces" edge.
func (*CardQuery) QueryRulings ¶
func (cq *CardQuery) QueryRulings() *RulingQuery
QueryRulings chains the current query on the "rulings" edge.
func (*CardQuery) Select ¶
func (cq *CardQuery) Select(fields ...string) *CardSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Card.Query(). Select(card.FieldName). Scan(ctx, &v)
func (*CardQuery) 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 (*CardQuery) WithFaces ¶
func (cq *CardQuery) WithFaces(opts ...func(*CardFaceQuery)) *CardQuery
WithFaces tells the query-builder to eager-load the nodes that are connected to the "faces" edge. The optional arguments are used to configure the query builder of the edge.
func (*CardQuery) WithRulings ¶
func (cq *CardQuery) WithRulings(opts ...func(*RulingQuery)) *CardQuery
WithRulings tells the query-builder to eager-load the nodes that are connected to the "rulings" edge. The optional arguments are used to configure the query builder of the edge.
type CardSelect ¶
type CardSelect struct { *CardQuery // contains filtered or unexported fields }
CardSelect is the builder for selecting fields of Card entities.
func (*CardSelect) Aggregate ¶
func (cs *CardSelect) Aggregate(fns ...AggregateFunc) *CardSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CardSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CardSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CardSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CardSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CardSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CardSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CardSelect) Scan ¶
func (cs *CardSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CardSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CardUpdate ¶
type CardUpdate struct {
// contains filtered or unexported fields
}
CardUpdate is the builder for updating Card entities.
func (*CardUpdate) AddColorIdentity ¶
func (cu *CardUpdate) AddColorIdentity(u int8) *CardUpdate
AddColorIdentity adds u to the "color_identity" field.
func (*CardUpdate) AddFaceIDs ¶
func (cu *CardUpdate) AddFaceIDs(ids ...int) *CardUpdate
AddFaceIDs adds the "faces" edge to the CardFace entity by IDs.
func (*CardUpdate) AddFaces ¶
func (cu *CardUpdate) AddFaces(c ...*CardFace) *CardUpdate
AddFaces adds the "faces" edges to the CardFace entity.
func (*CardUpdate) AddRulingIDs ¶
func (cu *CardUpdate) AddRulingIDs(ids ...int) *CardUpdate
AddRulingIDs adds the "rulings" edge to the Ruling entity by IDs.
func (*CardUpdate) AddRulings ¶
func (cu *CardUpdate) AddRulings(r ...*Ruling) *CardUpdate
AddRulings adds the "rulings" edges to the Ruling entity.
func (*CardUpdate) ClearFaces ¶
func (cu *CardUpdate) ClearFaces() *CardUpdate
ClearFaces clears all "faces" edges to the CardFace entity.
func (*CardUpdate) ClearRulings ¶
func (cu *CardUpdate) ClearRulings() *CardUpdate
ClearRulings clears all "rulings" edges to the Ruling entity.
func (*CardUpdate) Exec ¶
func (cu *CardUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CardUpdate) ExecX ¶
func (cu *CardUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardUpdate) Mutation ¶
func (cu *CardUpdate) Mutation() *CardMutation
Mutation returns the CardMutation object of the builder.
func (*CardUpdate) RemoveFaceIDs ¶
func (cu *CardUpdate) RemoveFaceIDs(ids ...int) *CardUpdate
RemoveFaceIDs removes the "faces" edge to CardFace entities by IDs.
func (*CardUpdate) RemoveFaces ¶
func (cu *CardUpdate) RemoveFaces(c ...*CardFace) *CardUpdate
RemoveFaces removes "faces" edges to CardFace entities.
func (*CardUpdate) RemoveRulingIDs ¶
func (cu *CardUpdate) RemoveRulingIDs(ids ...int) *CardUpdate
RemoveRulingIDs removes the "rulings" edge to Ruling entities by IDs.
func (*CardUpdate) RemoveRulings ¶
func (cu *CardUpdate) RemoveRulings(r ...*Ruling) *CardUpdate
RemoveRulings removes "rulings" edges to Ruling entities.
func (*CardUpdate) Save ¶
func (cu *CardUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CardUpdate) SaveX ¶
func (cu *CardUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CardUpdate) SetColorIdentity ¶
func (cu *CardUpdate) SetColorIdentity(u uint8) *CardUpdate
SetColorIdentity sets the "color_identity" field.
func (*CardUpdate) SetName ¶
func (cu *CardUpdate) SetName(s string) *CardUpdate
SetName sets the "name" field.
func (*CardUpdate) SetNillableColorIdentity ¶
func (cu *CardUpdate) SetNillableColorIdentity(u *uint8) *CardUpdate
SetNillableColorIdentity sets the "color_identity" field if the given value is not nil.
func (*CardUpdate) SetNillableName ¶
func (cu *CardUpdate) SetNillableName(s *string) *CardUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CardUpdate) SetNillableOracleID ¶
func (cu *CardUpdate) SetNillableOracleID(s *string) *CardUpdate
SetNillableOracleID sets the "oracle_id" field if the given value is not nil.
func (*CardUpdate) SetOracleID ¶
func (cu *CardUpdate) SetOracleID(s string) *CardUpdate
SetOracleID sets the "oracle_id" field.
func (*CardUpdate) Where ¶
func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate
Where appends a list predicates to the CardUpdate builder.
type CardUpdateOne ¶
type CardUpdateOne struct {
// contains filtered or unexported fields
}
CardUpdateOne is the builder for updating a single Card entity.
func (*CardUpdateOne) AddColorIdentity ¶
func (cuo *CardUpdateOne) AddColorIdentity(u int8) *CardUpdateOne
AddColorIdentity adds u to the "color_identity" field.
func (*CardUpdateOne) AddFaceIDs ¶
func (cuo *CardUpdateOne) AddFaceIDs(ids ...int) *CardUpdateOne
AddFaceIDs adds the "faces" edge to the CardFace entity by IDs.
func (*CardUpdateOne) AddFaces ¶
func (cuo *CardUpdateOne) AddFaces(c ...*CardFace) *CardUpdateOne
AddFaces adds the "faces" edges to the CardFace entity.
func (*CardUpdateOne) AddRulingIDs ¶
func (cuo *CardUpdateOne) AddRulingIDs(ids ...int) *CardUpdateOne
AddRulingIDs adds the "rulings" edge to the Ruling entity by IDs.
func (*CardUpdateOne) AddRulings ¶
func (cuo *CardUpdateOne) AddRulings(r ...*Ruling) *CardUpdateOne
AddRulings adds the "rulings" edges to the Ruling entity.
func (*CardUpdateOne) ClearFaces ¶
func (cuo *CardUpdateOne) ClearFaces() *CardUpdateOne
ClearFaces clears all "faces" edges to the CardFace entity.
func (*CardUpdateOne) ClearRulings ¶
func (cuo *CardUpdateOne) ClearRulings() *CardUpdateOne
ClearRulings clears all "rulings" edges to the Ruling entity.
func (*CardUpdateOne) Exec ¶
func (cuo *CardUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CardUpdateOne) ExecX ¶
func (cuo *CardUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardUpdateOne) Mutation ¶
func (cuo *CardUpdateOne) Mutation() *CardMutation
Mutation returns the CardMutation object of the builder.
func (*CardUpdateOne) RemoveFaceIDs ¶
func (cuo *CardUpdateOne) RemoveFaceIDs(ids ...int) *CardUpdateOne
RemoveFaceIDs removes the "faces" edge to CardFace entities by IDs.
func (*CardUpdateOne) RemoveFaces ¶
func (cuo *CardUpdateOne) RemoveFaces(c ...*CardFace) *CardUpdateOne
RemoveFaces removes "faces" edges to CardFace entities.
func (*CardUpdateOne) RemoveRulingIDs ¶
func (cuo *CardUpdateOne) RemoveRulingIDs(ids ...int) *CardUpdateOne
RemoveRulingIDs removes the "rulings" edge to Ruling entities by IDs.
func (*CardUpdateOne) RemoveRulings ¶
func (cuo *CardUpdateOne) RemoveRulings(r ...*Ruling) *CardUpdateOne
RemoveRulings removes "rulings" edges to Ruling entities.
func (*CardUpdateOne) Save ¶
func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)
Save executes the query and returns the updated Card entity.
func (*CardUpdateOne) SaveX ¶
func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card
SaveX is like Save, but panics if an error occurs.
func (*CardUpdateOne) Select ¶
func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CardUpdateOne) SetColorIdentity ¶
func (cuo *CardUpdateOne) SetColorIdentity(u uint8) *CardUpdateOne
SetColorIdentity sets the "color_identity" field.
func (*CardUpdateOne) SetName ¶
func (cuo *CardUpdateOne) SetName(s string) *CardUpdateOne
SetName sets the "name" field.
func (*CardUpdateOne) SetNillableColorIdentity ¶
func (cuo *CardUpdateOne) SetNillableColorIdentity(u *uint8) *CardUpdateOne
SetNillableColorIdentity sets the "color_identity" field if the given value is not nil.
func (*CardUpdateOne) SetNillableName ¶
func (cuo *CardUpdateOne) SetNillableName(s *string) *CardUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CardUpdateOne) SetNillableOracleID ¶
func (cuo *CardUpdateOne) SetNillableOracleID(s *string) *CardUpdateOne
SetNillableOracleID sets the "oracle_id" field if the given value is not nil.
func (*CardUpdateOne) SetOracleID ¶
func (cuo *CardUpdateOne) SetOracleID(s string) *CardUpdateOne
SetOracleID sets the "oracle_id" field.
func (*CardUpdateOne) Where ¶
func (cuo *CardUpdateOne) Where(ps ...predicate.Card) *CardUpdateOne
Where appends a list predicates to the CardUpdate builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Artist is the client for interacting with the Artist builders. Artist *ArtistClient // Card is the client for interacting with the Card builders. Card *CardClient // CardFace is the client for interacting with the CardFace builders. CardFace *CardFaceClient // Printing is the client for interacting with the Printing builders. Printing *PrintingClient // PrintingImage is the client for interacting with the PrintingImage builders. PrintingImage *PrintingImageClient // Ruling is the client for interacting with the Ruling builders. Ruling *RulingClient // Set is the client for interacting with the Set builders. Set *SetClient // 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(). Artist. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type 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 OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Printing ¶
type Printing struct { // ID of the ent. ID int `json:"id,omitempty"` // Rarity holds the value of the "rarity" field. Rarity printing.Rarity `json:"rarity,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PrintingQuery when eager-loading is set. Edges PrintingEdges `json:"edges"` // contains filtered or unexported fields }
Printing is the model entity for the Printing schema.
func (*Printing) QueryArtist ¶
func (pr *Printing) QueryArtist() *ArtistQuery
QueryArtist queries the "artist" edge of the Printing entity.
func (*Printing) QueryCardFace ¶
func (pr *Printing) QueryCardFace() *CardFaceQuery
QueryCardFace queries the "card_face" edge of the Printing entity.
func (*Printing) QueryImages ¶
func (pr *Printing) QueryImages() *PrintingImageQuery
QueryImages queries the "images" edge of the Printing entity.
func (*Printing) Unwrap ¶
Unwrap unwraps the Printing 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 (*Printing) Update ¶
func (pr *Printing) Update() *PrintingUpdateOne
Update returns a builder for updating this Printing. Note that you need to call Printing.Unwrap() before calling this method if this Printing was returned from a transaction, and the transaction was committed or rolled back.
type PrintingClient ¶
type PrintingClient struct {
// contains filtered or unexported fields
}
PrintingClient is a client for the Printing schema.
func NewPrintingClient ¶
func NewPrintingClient(c config) *PrintingClient
NewPrintingClient returns a client for the Printing from the given config.
func (*PrintingClient) Create ¶
func (c *PrintingClient) Create() *PrintingCreate
Create returns a builder for creating a Printing entity.
func (*PrintingClient) CreateBulk ¶
func (c *PrintingClient) CreateBulk(builders ...*PrintingCreate) *PrintingCreateBulk
CreateBulk returns a builder for creating a bulk of Printing entities.
func (*PrintingClient) Delete ¶
func (c *PrintingClient) Delete() *PrintingDelete
Delete returns a delete builder for Printing.
func (*PrintingClient) DeleteOne ¶
func (c *PrintingClient) DeleteOne(pr *Printing) *PrintingDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PrintingClient) DeleteOneID ¶
func (c *PrintingClient) DeleteOneID(id int) *PrintingDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PrintingClient) GetX ¶
func (c *PrintingClient) GetX(ctx context.Context, id int) *Printing
GetX is like Get, but panics if an error occurs.
func (*PrintingClient) Hooks ¶
func (c *PrintingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PrintingClient) Intercept ¶
func (c *PrintingClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `printing.Intercept(f(g(h())))`.
func (*PrintingClient) Interceptors ¶
func (c *PrintingClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PrintingClient) MapCreateBulk ¶
func (c *PrintingClient) MapCreateBulk(slice any, setFunc func(*PrintingCreate, int)) *PrintingCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PrintingClient) Query ¶
func (c *PrintingClient) Query() *PrintingQuery
Query returns a query builder for Printing.
func (*PrintingClient) QueryArtist ¶
func (c *PrintingClient) QueryArtist(pr *Printing) *ArtistQuery
QueryArtist queries the artist edge of a Printing.
func (*PrintingClient) QueryCardFace ¶
func (c *PrintingClient) QueryCardFace(pr *Printing) *CardFaceQuery
QueryCardFace queries the card_face edge of a Printing.
func (*PrintingClient) QueryImages ¶
func (c *PrintingClient) QueryImages(pr *Printing) *PrintingImageQuery
QueryImages queries the images edge of a Printing.
func (*PrintingClient) QuerySet ¶
func (c *PrintingClient) QuerySet(pr *Printing) *SetQuery
QuerySet queries the set edge of a Printing.
func (*PrintingClient) Update ¶
func (c *PrintingClient) Update() *PrintingUpdate
Update returns an update builder for Printing.
func (*PrintingClient) UpdateOne ¶
func (c *PrintingClient) UpdateOne(pr *Printing) *PrintingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PrintingClient) UpdateOneID ¶
func (c *PrintingClient) UpdateOneID(id int) *PrintingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PrintingClient) Use ¶
func (c *PrintingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `printing.Hooks(f(g(h())))`.
type PrintingCreate ¶
type PrintingCreate struct {
// contains filtered or unexported fields
}
PrintingCreate is the builder for creating a Printing entity.
func (*PrintingCreate) AddImageIDs ¶
func (pc *PrintingCreate) AddImageIDs(ids ...int) *PrintingCreate
AddImageIDs adds the "images" edge to the PrintingImage entity by IDs.
func (*PrintingCreate) AddImages ¶
func (pc *PrintingCreate) AddImages(p ...*PrintingImage) *PrintingCreate
AddImages adds the "images" edges to the PrintingImage entity.
func (*PrintingCreate) Exec ¶
func (pc *PrintingCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PrintingCreate) ExecX ¶
func (pc *PrintingCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PrintingCreate) Mutation ¶
func (pc *PrintingCreate) Mutation() *PrintingMutation
Mutation returns the PrintingMutation object of the builder.
func (*PrintingCreate) Save ¶
func (pc *PrintingCreate) Save(ctx context.Context) (*Printing, error)
Save creates the Printing in the database.
func (*PrintingCreate) SaveX ¶
func (pc *PrintingCreate) SaveX(ctx context.Context) *Printing
SaveX calls Save and panics if Save returns an error.
func (*PrintingCreate) SetArtist ¶
func (pc *PrintingCreate) SetArtist(a *Artist) *PrintingCreate
SetArtist sets the "artist" edge to the Artist entity.
func (*PrintingCreate) SetArtistID ¶
func (pc *PrintingCreate) SetArtistID(id int) *PrintingCreate
SetArtistID sets the "artist" edge to the Artist entity by ID.
func (*PrintingCreate) SetCardFace ¶
func (pc *PrintingCreate) SetCardFace(c *CardFace) *PrintingCreate
SetCardFace sets the "card_face" edge to the CardFace entity.
func (*PrintingCreate) SetCardFaceID ¶
func (pc *PrintingCreate) SetCardFaceID(id int) *PrintingCreate
SetCardFaceID sets the "card_face" edge to the CardFace entity by ID.
func (*PrintingCreate) SetNillableArtistID ¶
func (pc *PrintingCreate) SetNillableArtistID(id *int) *PrintingCreate
SetNillableArtistID sets the "artist" edge to the Artist entity by ID if the given value is not nil.
func (*PrintingCreate) SetNillableCardFaceID ¶
func (pc *PrintingCreate) SetNillableCardFaceID(id *int) *PrintingCreate
SetNillableCardFaceID sets the "card_face" edge to the CardFace entity by ID if the given value is not nil.
func (*PrintingCreate) SetNillableSetID ¶
func (pc *PrintingCreate) SetNillableSetID(id *int) *PrintingCreate
SetNillableSetID sets the "set" edge to the Set entity by ID if the given value is not nil.
func (*PrintingCreate) SetRarity ¶
func (pc *PrintingCreate) SetRarity(pr printing.Rarity) *PrintingCreate
SetRarity sets the "rarity" field.
func (*PrintingCreate) SetSet ¶
func (pc *PrintingCreate) SetSet(s *Set) *PrintingCreate
SetSet sets the "set" edge to the Set entity.
func (*PrintingCreate) SetSetID ¶
func (pc *PrintingCreate) SetSetID(id int) *PrintingCreate
SetSetID sets the "set" edge to the Set entity by ID.
type PrintingCreateBulk ¶
type PrintingCreateBulk struct {
// contains filtered or unexported fields
}
PrintingCreateBulk is the builder for creating many Printing entities in bulk.
func (*PrintingCreateBulk) Exec ¶
func (pcb *PrintingCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PrintingCreateBulk) ExecX ¶
func (pcb *PrintingCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PrintingDelete ¶
type PrintingDelete struct {
// contains filtered or unexported fields
}
PrintingDelete is the builder for deleting a Printing entity.
func (*PrintingDelete) Exec ¶
func (pd *PrintingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PrintingDelete) ExecX ¶
func (pd *PrintingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PrintingDelete) Where ¶
func (pd *PrintingDelete) Where(ps ...predicate.Printing) *PrintingDelete
Where appends a list predicates to the PrintingDelete builder.
type PrintingDeleteOne ¶
type PrintingDeleteOne struct {
// contains filtered or unexported fields
}
PrintingDeleteOne is the builder for deleting a single Printing entity.
func (*PrintingDeleteOne) Exec ¶
func (pdo *PrintingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PrintingDeleteOne) ExecX ¶
func (pdo *PrintingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PrintingDeleteOne) Where ¶
func (pdo *PrintingDeleteOne) Where(ps ...predicate.Printing) *PrintingDeleteOne
Where appends a list predicates to the PrintingDelete builder.
type PrintingEdges ¶
type PrintingEdges struct { // Artist holds the value of the artist edge. Artist *Artist `json:"artist,omitempty"` // Set holds the value of the set edge. Set *Set `json:"set,omitempty"` // CardFace holds the value of the card_face edge. CardFace *CardFace `json:"card_face,omitempty"` // Images holds the value of the images edge. Images []*PrintingImage `json:"images,omitempty"` // contains filtered or unexported fields }
PrintingEdges holds the relations/edges for other nodes in the graph.
func (PrintingEdges) ArtistOrErr ¶
func (e PrintingEdges) ArtistOrErr() (*Artist, error)
ArtistOrErr returns the Artist value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PrintingEdges) CardFaceOrErr ¶
func (e PrintingEdges) CardFaceOrErr() (*CardFace, error)
CardFaceOrErr returns the CardFace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PrintingEdges) ImagesOrErr ¶
func (e PrintingEdges) ImagesOrErr() ([]*PrintingImage, error)
ImagesOrErr returns the Images value or an error if the edge was not loaded in eager-loading.
func (PrintingEdges) SetOrErr ¶
func (e PrintingEdges) SetOrErr() (*Set, error)
SetOrErr returns the Set value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PrintingGroupBy ¶
type PrintingGroupBy struct {
// contains filtered or unexported fields
}
PrintingGroupBy is the group-by builder for Printing entities.
func (*PrintingGroupBy) Aggregate ¶
func (pgb *PrintingGroupBy) Aggregate(fns ...AggregateFunc) *PrintingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PrintingGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PrintingGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PrintingGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PrintingGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PrintingGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PrintingGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PrintingGroupBy) Scan ¶
func (pgb *PrintingGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PrintingGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PrintingImage ¶
type PrintingImage struct { // ID of the ent. ID int `json:"id,omitempty"` // URL holds the value of the "url" field. URL string `json:"url,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PrintingImageQuery when eager-loading is set. Edges PrintingImageEdges `json:"edges"` // contains filtered or unexported fields }
PrintingImage is the model entity for the PrintingImage schema.
func (*PrintingImage) QueryPrinting ¶
func (pi *PrintingImage) QueryPrinting() *PrintingQuery
QueryPrinting queries the "printing" edge of the PrintingImage entity.
func (*PrintingImage) String ¶
func (pi *PrintingImage) String() string
String implements the fmt.Stringer.
func (*PrintingImage) Unwrap ¶
func (pi *PrintingImage) Unwrap() *PrintingImage
Unwrap unwraps the PrintingImage 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 (*PrintingImage) Update ¶
func (pi *PrintingImage) Update() *PrintingImageUpdateOne
Update returns a builder for updating this PrintingImage. Note that you need to call PrintingImage.Unwrap() before calling this method if this PrintingImage was returned from a transaction, and the transaction was committed or rolled back.
type PrintingImageClient ¶
type PrintingImageClient struct {
// contains filtered or unexported fields
}
PrintingImageClient is a client for the PrintingImage schema.
func NewPrintingImageClient ¶
func NewPrintingImageClient(c config) *PrintingImageClient
NewPrintingImageClient returns a client for the PrintingImage from the given config.
func (*PrintingImageClient) Create ¶
func (c *PrintingImageClient) Create() *PrintingImageCreate
Create returns a builder for creating a PrintingImage entity.
func (*PrintingImageClient) CreateBulk ¶
func (c *PrintingImageClient) CreateBulk(builders ...*PrintingImageCreate) *PrintingImageCreateBulk
CreateBulk returns a builder for creating a bulk of PrintingImage entities.
func (*PrintingImageClient) Delete ¶
func (c *PrintingImageClient) Delete() *PrintingImageDelete
Delete returns a delete builder for PrintingImage.
func (*PrintingImageClient) DeleteOne ¶
func (c *PrintingImageClient) DeleteOne(pi *PrintingImage) *PrintingImageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PrintingImageClient) DeleteOneID ¶
func (c *PrintingImageClient) DeleteOneID(id int) *PrintingImageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PrintingImageClient) Get ¶
func (c *PrintingImageClient) Get(ctx context.Context, id int) (*PrintingImage, error)
Get returns a PrintingImage entity by its id.
func (*PrintingImageClient) GetX ¶
func (c *PrintingImageClient) GetX(ctx context.Context, id int) *PrintingImage
GetX is like Get, but panics if an error occurs.
func (*PrintingImageClient) Hooks ¶
func (c *PrintingImageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PrintingImageClient) Intercept ¶
func (c *PrintingImageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `printingimage.Intercept(f(g(h())))`.
func (*PrintingImageClient) Interceptors ¶
func (c *PrintingImageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PrintingImageClient) MapCreateBulk ¶
func (c *PrintingImageClient) MapCreateBulk(slice any, setFunc func(*PrintingImageCreate, int)) *PrintingImageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PrintingImageClient) Query ¶
func (c *PrintingImageClient) Query() *PrintingImageQuery
Query returns a query builder for PrintingImage.
func (*PrintingImageClient) QueryPrinting ¶
func (c *PrintingImageClient) QueryPrinting(pi *PrintingImage) *PrintingQuery
QueryPrinting queries the printing edge of a PrintingImage.
func (*PrintingImageClient) Update ¶
func (c *PrintingImageClient) Update() *PrintingImageUpdate
Update returns an update builder for PrintingImage.
func (*PrintingImageClient) UpdateOne ¶
func (c *PrintingImageClient) UpdateOne(pi *PrintingImage) *PrintingImageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PrintingImageClient) UpdateOneID ¶
func (c *PrintingImageClient) UpdateOneID(id int) *PrintingImageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PrintingImageClient) Use ¶
func (c *PrintingImageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `printingimage.Hooks(f(g(h())))`.
type PrintingImageCreate ¶
type PrintingImageCreate struct {
// contains filtered or unexported fields
}
PrintingImageCreate is the builder for creating a PrintingImage entity.
func (*PrintingImageCreate) Exec ¶
func (pic *PrintingImageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PrintingImageCreate) ExecX ¶
func (pic *PrintingImageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PrintingImageCreate) Mutation ¶
func (pic *PrintingImageCreate) Mutation() *PrintingImageMutation
Mutation returns the PrintingImageMutation object of the builder.
func (*PrintingImageCreate) Save ¶
func (pic *PrintingImageCreate) Save(ctx context.Context) (*PrintingImage, error)
Save creates the PrintingImage in the database.
func (*PrintingImageCreate) SaveX ¶
func (pic *PrintingImageCreate) SaveX(ctx context.Context) *PrintingImage
SaveX calls Save and panics if Save returns an error.
func (*PrintingImageCreate) SetNillablePrintingID ¶
func (pic *PrintingImageCreate) SetNillablePrintingID(id *int) *PrintingImageCreate
SetNillablePrintingID sets the "printing" edge to the Printing entity by ID if the given value is not nil.
func (*PrintingImageCreate) SetPrinting ¶
func (pic *PrintingImageCreate) SetPrinting(p *Printing) *PrintingImageCreate
SetPrinting sets the "printing" edge to the Printing entity.
func (*PrintingImageCreate) SetPrintingID ¶
func (pic *PrintingImageCreate) SetPrintingID(id int) *PrintingImageCreate
SetPrintingID sets the "printing" edge to the Printing entity by ID.
func (*PrintingImageCreate) SetURL ¶
func (pic *PrintingImageCreate) SetURL(s string) *PrintingImageCreate
SetURL sets the "url" field.
type PrintingImageCreateBulk ¶
type PrintingImageCreateBulk struct {
// contains filtered or unexported fields
}
PrintingImageCreateBulk is the builder for creating many PrintingImage entities in bulk.
func (*PrintingImageCreateBulk) Exec ¶
func (picb *PrintingImageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PrintingImageCreateBulk) ExecX ¶
func (picb *PrintingImageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PrintingImageCreateBulk) Save ¶
func (picb *PrintingImageCreateBulk) Save(ctx context.Context) ([]*PrintingImage, error)
Save creates the PrintingImage entities in the database.
func (*PrintingImageCreateBulk) SaveX ¶
func (picb *PrintingImageCreateBulk) SaveX(ctx context.Context) []*PrintingImage
SaveX is like Save, but panics if an error occurs.
type PrintingImageDelete ¶
type PrintingImageDelete struct {
// contains filtered or unexported fields
}
PrintingImageDelete is the builder for deleting a PrintingImage entity.
func (*PrintingImageDelete) Exec ¶
func (pid *PrintingImageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PrintingImageDelete) ExecX ¶
func (pid *PrintingImageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PrintingImageDelete) Where ¶
func (pid *PrintingImageDelete) Where(ps ...predicate.PrintingImage) *PrintingImageDelete
Where appends a list predicates to the PrintingImageDelete builder.
type PrintingImageDeleteOne ¶
type PrintingImageDeleteOne struct {
// contains filtered or unexported fields
}
PrintingImageDeleteOne is the builder for deleting a single PrintingImage entity.
func (*PrintingImageDeleteOne) Exec ¶
func (pido *PrintingImageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PrintingImageDeleteOne) ExecX ¶
func (pido *PrintingImageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PrintingImageDeleteOne) Where ¶
func (pido *PrintingImageDeleteOne) Where(ps ...predicate.PrintingImage) *PrintingImageDeleteOne
Where appends a list predicates to the PrintingImageDelete builder.
type PrintingImageEdges ¶
type PrintingImageEdges struct { // Printing holds the value of the printing edge. Printing *Printing `json:"printing,omitempty"` // contains filtered or unexported fields }
PrintingImageEdges holds the relations/edges for other nodes in the graph.
func (PrintingImageEdges) PrintingOrErr ¶
func (e PrintingImageEdges) PrintingOrErr() (*Printing, error)
PrintingOrErr returns the Printing value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PrintingImageGroupBy ¶
type PrintingImageGroupBy struct {
// contains filtered or unexported fields
}
PrintingImageGroupBy is the group-by builder for PrintingImage entities.
func (*PrintingImageGroupBy) Aggregate ¶
func (pigb *PrintingImageGroupBy) Aggregate(fns ...AggregateFunc) *PrintingImageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PrintingImageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PrintingImageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PrintingImageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PrintingImageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PrintingImageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PrintingImageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PrintingImageGroupBy) Scan ¶
func (pigb *PrintingImageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PrintingImageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PrintingImageMutation ¶
type PrintingImageMutation struct {
// contains filtered or unexported fields
}
PrintingImageMutation represents an operation that mutates the PrintingImage nodes in the graph.
func (*PrintingImageMutation) AddField ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) AddedEdges ¶
func (m *PrintingImageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PrintingImageMutation) AddedField ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) AddedFields ¶
func (m *PrintingImageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PrintingImageMutation) AddedIDs ¶
func (m *PrintingImageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PrintingImageMutation) ClearEdge ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) ClearField ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) ClearPrinting ¶
func (m *PrintingImageMutation) ClearPrinting()
ClearPrinting clears the "printing" edge to the Printing entity.
func (*PrintingImageMutation) ClearedEdges ¶
func (m *PrintingImageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PrintingImageMutation) ClearedFields ¶
func (m *PrintingImageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PrintingImageMutation) Client ¶
func (m PrintingImageMutation) 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 (*PrintingImageMutation) EdgeCleared ¶
func (m *PrintingImageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PrintingImageMutation) Field ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) FieldCleared ¶
func (m *PrintingImageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PrintingImageMutation) Fields ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) ID ¶
func (m *PrintingImageMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PrintingImageMutation) IDs ¶
func (m *PrintingImageMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PrintingImageMutation) 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 (*PrintingImageMutation) OldURL ¶
func (m *PrintingImageMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the PrintingImage entity. If the PrintingImage 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 (*PrintingImageMutation) Op ¶
func (m *PrintingImageMutation) Op() Op
Op returns the operation name.
func (*PrintingImageMutation) PrintingCleared ¶
func (m *PrintingImageMutation) PrintingCleared() bool
PrintingCleared reports if the "printing" edge to the Printing entity was cleared.
func (*PrintingImageMutation) PrintingID ¶
func (m *PrintingImageMutation) PrintingID() (id int, exists bool)
PrintingID returns the "printing" edge ID in the mutation.
func (*PrintingImageMutation) PrintingIDs ¶
func (m *PrintingImageMutation) PrintingIDs() (ids []int)
PrintingIDs returns the "printing" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PrintingID instead. It exists only for internal usage by the builders.
func (*PrintingImageMutation) RemovedEdges ¶
func (m *PrintingImageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PrintingImageMutation) RemovedIDs ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) ResetEdge ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) ResetField ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) ResetPrinting ¶
func (m *PrintingImageMutation) ResetPrinting()
ResetPrinting resets all changes to the "printing" edge.
func (*PrintingImageMutation) ResetURL ¶
func (m *PrintingImageMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*PrintingImageMutation) SetField ¶
func (m *PrintingImageMutation) 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 (*PrintingImageMutation) SetOp ¶
func (m *PrintingImageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PrintingImageMutation) SetPrintingID ¶
func (m *PrintingImageMutation) SetPrintingID(id int)
SetPrintingID sets the "printing" edge to the Printing entity by id.
func (*PrintingImageMutation) SetURL ¶
func (m *PrintingImageMutation) SetURL(s string)
SetURL sets the "url" field.
func (PrintingImageMutation) Tx ¶
func (m PrintingImageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PrintingImageMutation) Type ¶
func (m *PrintingImageMutation) Type() string
Type returns the node type of this mutation (PrintingImage).
func (*PrintingImageMutation) URL ¶
func (m *PrintingImageMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*PrintingImageMutation) Where ¶
func (m *PrintingImageMutation) Where(ps ...predicate.PrintingImage)
Where appends a list predicates to the PrintingImageMutation builder.
func (*PrintingImageMutation) WhereP ¶
func (m *PrintingImageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PrintingImageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PrintingImageQuery ¶
type PrintingImageQuery struct {
// contains filtered or unexported fields
}
PrintingImageQuery is the builder for querying PrintingImage entities.
func (*PrintingImageQuery) Aggregate ¶
func (piq *PrintingImageQuery) Aggregate(fns ...AggregateFunc) *PrintingImageSelect
Aggregate returns a PrintingImageSelect configured with the given aggregations.
func (*PrintingImageQuery) All ¶
func (piq *PrintingImageQuery) All(ctx context.Context) ([]*PrintingImage, error)
All executes the query and returns a list of PrintingImages.
func (*PrintingImageQuery) AllX ¶
func (piq *PrintingImageQuery) AllX(ctx context.Context) []*PrintingImage
AllX is like All, but panics if an error occurs.
func (*PrintingImageQuery) Clone ¶
func (piq *PrintingImageQuery) Clone() *PrintingImageQuery
Clone returns a duplicate of the PrintingImageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PrintingImageQuery) Count ¶
func (piq *PrintingImageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PrintingImageQuery) CountX ¶
func (piq *PrintingImageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PrintingImageQuery) Exist ¶
func (piq *PrintingImageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PrintingImageQuery) ExistX ¶
func (piq *PrintingImageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PrintingImageQuery) First ¶
func (piq *PrintingImageQuery) First(ctx context.Context) (*PrintingImage, error)
First returns the first PrintingImage entity from the query. Returns a *NotFoundError when no PrintingImage was found.
func (*PrintingImageQuery) FirstID ¶
func (piq *PrintingImageQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PrintingImage ID from the query. Returns a *NotFoundError when no PrintingImage ID was found.
func (*PrintingImageQuery) FirstIDX ¶
func (piq *PrintingImageQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PrintingImageQuery) FirstX ¶
func (piq *PrintingImageQuery) FirstX(ctx context.Context) *PrintingImage
FirstX is like First, but panics if an error occurs.
func (*PrintingImageQuery) GroupBy ¶
func (piq *PrintingImageQuery) GroupBy(field string, fields ...string) *PrintingImageGroupBy
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 { URL string `json:"url,omitempty"` Count int `json:"count,omitempty"` } client.PrintingImage.Query(). GroupBy(printingimage.FieldURL). Aggregate(oracle.Count()). Scan(ctx, &v)
func (*PrintingImageQuery) IDs ¶
func (piq *PrintingImageQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of PrintingImage IDs.
func (*PrintingImageQuery) IDsX ¶
func (piq *PrintingImageQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PrintingImageQuery) Limit ¶
func (piq *PrintingImageQuery) Limit(limit int) *PrintingImageQuery
Limit the number of records to be returned by this query.
func (*PrintingImageQuery) Offset ¶
func (piq *PrintingImageQuery) Offset(offset int) *PrintingImageQuery
Offset to start from.
func (*PrintingImageQuery) Only ¶
func (piq *PrintingImageQuery) Only(ctx context.Context) (*PrintingImage, error)
Only returns a single PrintingImage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PrintingImage entity is found. Returns a *NotFoundError when no PrintingImage entities are found.
func (*PrintingImageQuery) OnlyID ¶
func (piq *PrintingImageQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PrintingImage ID in the query. Returns a *NotSingularError when more than one PrintingImage ID is found. Returns a *NotFoundError when no entities are found.
func (*PrintingImageQuery) OnlyIDX ¶
func (piq *PrintingImageQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PrintingImageQuery) OnlyX ¶
func (piq *PrintingImageQuery) OnlyX(ctx context.Context) *PrintingImage
OnlyX is like Only, but panics if an error occurs.
func (*PrintingImageQuery) Order ¶
func (piq *PrintingImageQuery) Order(o ...printingimage.OrderOption) *PrintingImageQuery
Order specifies how the records should be ordered.
func (*PrintingImageQuery) QueryPrinting ¶
func (piq *PrintingImageQuery) QueryPrinting() *PrintingQuery
QueryPrinting chains the current query on the "printing" edge.
func (*PrintingImageQuery) Select ¶
func (piq *PrintingImageQuery) Select(fields ...string) *PrintingImageSelect
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 { URL string `json:"url,omitempty"` } client.PrintingImage.Query(). Select(printingimage.FieldURL). Scan(ctx, &v)
func (*PrintingImageQuery) Unique ¶
func (piq *PrintingImageQuery) Unique(unique bool) *PrintingImageQuery
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 (*PrintingImageQuery) Where ¶
func (piq *PrintingImageQuery) Where(ps ...predicate.PrintingImage) *PrintingImageQuery
Where adds a new predicate for the PrintingImageQuery builder.
func (*PrintingImageQuery) WithPrinting ¶
func (piq *PrintingImageQuery) WithPrinting(opts ...func(*PrintingQuery)) *PrintingImageQuery
WithPrinting tells the query-builder to eager-load the nodes that are connected to the "printing" edge. The optional arguments are used to configure the query builder of the edge.
type PrintingImageSelect ¶
type PrintingImageSelect struct { *PrintingImageQuery // contains filtered or unexported fields }
PrintingImageSelect is the builder for selecting fields of PrintingImage entities.
func (*PrintingImageSelect) Aggregate ¶
func (pis *PrintingImageSelect) Aggregate(fns ...AggregateFunc) *PrintingImageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PrintingImageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PrintingImageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PrintingImageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PrintingImageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PrintingImageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PrintingImageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PrintingImageSelect) Scan ¶
func (pis *PrintingImageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PrintingImageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PrintingImageUpdate ¶
type PrintingImageUpdate struct {
// contains filtered or unexported fields
}
PrintingImageUpdate is the builder for updating PrintingImage entities.
func (*PrintingImageUpdate) ClearPrinting ¶
func (piu *PrintingImageUpdate) ClearPrinting() *PrintingImageUpdate
ClearPrinting clears the "printing" edge to the Printing entity.
func (*PrintingImageUpdate) Exec ¶
func (piu *PrintingImageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PrintingImageUpdate) ExecX ¶
func (piu *PrintingImageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PrintingImageUpdate) Mutation ¶
func (piu *PrintingImageUpdate) Mutation() *PrintingImageMutation
Mutation returns the PrintingImageMutation object of the builder.
func (*PrintingImageUpdate) Save ¶
func (piu *PrintingImageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PrintingImageUpdate) SaveX ¶
func (piu *PrintingImageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PrintingImageUpdate) SetNillablePrintingID ¶
func (piu *PrintingImageUpdate) SetNillablePrintingID(id *int) *PrintingImageUpdate
SetNillablePrintingID sets the "printing" edge to the Printing entity by ID if the given value is not nil.
func (*PrintingImageUpdate) SetNillableURL ¶
func (piu *PrintingImageUpdate) SetNillableURL(s *string) *PrintingImageUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*PrintingImageUpdate) SetPrinting ¶
func (piu *PrintingImageUpdate) SetPrinting(p *Printing) *PrintingImageUpdate
SetPrinting sets the "printing" edge to the Printing entity.
func (*PrintingImageUpdate) SetPrintingID ¶
func (piu *PrintingImageUpdate) SetPrintingID(id int) *PrintingImageUpdate
SetPrintingID sets the "printing" edge to the Printing entity by ID.
func (*PrintingImageUpdate) SetURL ¶
func (piu *PrintingImageUpdate) SetURL(s string) *PrintingImageUpdate
SetURL sets the "url" field.
func (*PrintingImageUpdate) Where ¶
func (piu *PrintingImageUpdate) Where(ps ...predicate.PrintingImage) *PrintingImageUpdate
Where appends a list predicates to the PrintingImageUpdate builder.
type PrintingImageUpdateOne ¶
type PrintingImageUpdateOne struct {
// contains filtered or unexported fields
}
PrintingImageUpdateOne is the builder for updating a single PrintingImage entity.
func (*PrintingImageUpdateOne) ClearPrinting ¶
func (piuo *PrintingImageUpdateOne) ClearPrinting() *PrintingImageUpdateOne
ClearPrinting clears the "printing" edge to the Printing entity.
func (*PrintingImageUpdateOne) Exec ¶
func (piuo *PrintingImageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PrintingImageUpdateOne) ExecX ¶
func (piuo *PrintingImageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PrintingImageUpdateOne) Mutation ¶
func (piuo *PrintingImageUpdateOne) Mutation() *PrintingImageMutation
Mutation returns the PrintingImageMutation object of the builder.
func (*PrintingImageUpdateOne) Save ¶
func (piuo *PrintingImageUpdateOne) Save(ctx context.Context) (*PrintingImage, error)
Save executes the query and returns the updated PrintingImage entity.
func (*PrintingImageUpdateOne) SaveX ¶
func (piuo *PrintingImageUpdateOne) SaveX(ctx context.Context) *PrintingImage
SaveX is like Save, but panics if an error occurs.
func (*PrintingImageUpdateOne) Select ¶
func (piuo *PrintingImageUpdateOne) Select(field string, fields ...string) *PrintingImageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PrintingImageUpdateOne) SetNillablePrintingID ¶
func (piuo *PrintingImageUpdateOne) SetNillablePrintingID(id *int) *PrintingImageUpdateOne
SetNillablePrintingID sets the "printing" edge to the Printing entity by ID if the given value is not nil.
func (*PrintingImageUpdateOne) SetNillableURL ¶
func (piuo *PrintingImageUpdateOne) SetNillableURL(s *string) *PrintingImageUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*PrintingImageUpdateOne) SetPrinting ¶
func (piuo *PrintingImageUpdateOne) SetPrinting(p *Printing) *PrintingImageUpdateOne
SetPrinting sets the "printing" edge to the Printing entity.
func (*PrintingImageUpdateOne) SetPrintingID ¶
func (piuo *PrintingImageUpdateOne) SetPrintingID(id int) *PrintingImageUpdateOne
SetPrintingID sets the "printing" edge to the Printing entity by ID.
func (*PrintingImageUpdateOne) SetURL ¶
func (piuo *PrintingImageUpdateOne) SetURL(s string) *PrintingImageUpdateOne
SetURL sets the "url" field.
func (*PrintingImageUpdateOne) Where ¶
func (piuo *PrintingImageUpdateOne) Where(ps ...predicate.PrintingImage) *PrintingImageUpdateOne
Where appends a list predicates to the PrintingImageUpdate builder.
type PrintingImages ¶
type PrintingImages []*PrintingImage
PrintingImages is a parsable slice of PrintingImage.
type PrintingMutation ¶
type PrintingMutation struct {
// contains filtered or unexported fields
}
PrintingMutation represents an operation that mutates the Printing nodes in the graph.
func (*PrintingMutation) AddField ¶
func (m *PrintingMutation) 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 (*PrintingMutation) AddImageIDs ¶
func (m *PrintingMutation) AddImageIDs(ids ...int)
AddImageIDs adds the "images" edge to the PrintingImage entity by ids.
func (*PrintingMutation) AddedEdges ¶
func (m *PrintingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PrintingMutation) AddedField ¶
func (m *PrintingMutation) 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 (*PrintingMutation) AddedFields ¶
func (m *PrintingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PrintingMutation) AddedIDs ¶
func (m *PrintingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PrintingMutation) ArtistCleared ¶
func (m *PrintingMutation) ArtistCleared() bool
ArtistCleared reports if the "artist" edge to the Artist entity was cleared.
func (*PrintingMutation) ArtistID ¶
func (m *PrintingMutation) ArtistID() (id int, exists bool)
ArtistID returns the "artist" edge ID in the mutation.
func (*PrintingMutation) ArtistIDs ¶
func (m *PrintingMutation) ArtistIDs() (ids []int)
ArtistIDs returns the "artist" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtistID instead. It exists only for internal usage by the builders.
func (*PrintingMutation) CardFaceCleared ¶
func (m *PrintingMutation) CardFaceCleared() bool
CardFaceCleared reports if the "card_face" edge to the CardFace entity was cleared.
func (*PrintingMutation) CardFaceID ¶
func (m *PrintingMutation) CardFaceID() (id int, exists bool)
CardFaceID returns the "card_face" edge ID in the mutation.
func (*PrintingMutation) CardFaceIDs ¶
func (m *PrintingMutation) CardFaceIDs() (ids []int)
CardFaceIDs returns the "card_face" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CardFaceID instead. It exists only for internal usage by the builders.
func (*PrintingMutation) ClearArtist ¶
func (m *PrintingMutation) ClearArtist()
ClearArtist clears the "artist" edge to the Artist entity.
func (*PrintingMutation) ClearCardFace ¶
func (m *PrintingMutation) ClearCardFace()
ClearCardFace clears the "card_face" edge to the CardFace entity.
func (*PrintingMutation) ClearEdge ¶
func (m *PrintingMutation) 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 (*PrintingMutation) ClearField ¶
func (m *PrintingMutation) 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 (*PrintingMutation) ClearImages ¶
func (m *PrintingMutation) ClearImages()
ClearImages clears the "images" edge to the PrintingImage entity.
func (*PrintingMutation) ClearSet ¶
func (m *PrintingMutation) ClearSet()
ClearSet clears the "set" edge to the Set entity.
func (*PrintingMutation) ClearedEdges ¶
func (m *PrintingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PrintingMutation) ClearedFields ¶
func (m *PrintingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PrintingMutation) Client ¶
func (m PrintingMutation) 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 (*PrintingMutation) EdgeCleared ¶
func (m *PrintingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PrintingMutation) Field ¶
func (m *PrintingMutation) 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 (*PrintingMutation) FieldCleared ¶
func (m *PrintingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PrintingMutation) Fields ¶
func (m *PrintingMutation) 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 (*PrintingMutation) ID ¶
func (m *PrintingMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PrintingMutation) IDs ¶
func (m *PrintingMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PrintingMutation) ImagesCleared ¶
func (m *PrintingMutation) ImagesCleared() bool
ImagesCleared reports if the "images" edge to the PrintingImage entity was cleared.
func (*PrintingMutation) ImagesIDs ¶
func (m *PrintingMutation) ImagesIDs() (ids []int)
ImagesIDs returns the "images" edge IDs in the mutation.
func (*PrintingMutation) 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 (*PrintingMutation) OldRarity ¶
OldRarity returns the old "rarity" field's value of the Printing entity. If the Printing 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 (*PrintingMutation) Rarity ¶
func (m *PrintingMutation) Rarity() (r printing.Rarity, exists bool)
Rarity returns the value of the "rarity" field in the mutation.
func (*PrintingMutation) RemoveImageIDs ¶
func (m *PrintingMutation) RemoveImageIDs(ids ...int)
RemoveImageIDs removes the "images" edge to the PrintingImage entity by IDs.
func (*PrintingMutation) RemovedEdges ¶
func (m *PrintingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PrintingMutation) RemovedIDs ¶
func (m *PrintingMutation) 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 (*PrintingMutation) RemovedImagesIDs ¶
func (m *PrintingMutation) RemovedImagesIDs() (ids []int)
RemovedImages returns the removed IDs of the "images" edge to the PrintingImage entity.
func (*PrintingMutation) ResetArtist ¶
func (m *PrintingMutation) ResetArtist()
ResetArtist resets all changes to the "artist" edge.
func (*PrintingMutation) ResetCardFace ¶
func (m *PrintingMutation) ResetCardFace()
ResetCardFace resets all changes to the "card_face" edge.
func (*PrintingMutation) ResetEdge ¶
func (m *PrintingMutation) 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 (*PrintingMutation) ResetField ¶
func (m *PrintingMutation) 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 (*PrintingMutation) ResetImages ¶
func (m *PrintingMutation) ResetImages()
ResetImages resets all changes to the "images" edge.
func (*PrintingMutation) ResetRarity ¶
func (m *PrintingMutation) ResetRarity()
ResetRarity resets all changes to the "rarity" field.
func (*PrintingMutation) ResetSet ¶
func (m *PrintingMutation) ResetSet()
ResetSet resets all changes to the "set" edge.
func (*PrintingMutation) SetArtistID ¶
func (m *PrintingMutation) SetArtistID(id int)
SetArtistID sets the "artist" edge to the Artist entity by id.
func (*PrintingMutation) SetCardFaceID ¶
func (m *PrintingMutation) SetCardFaceID(id int)
SetCardFaceID sets the "card_face" edge to the CardFace entity by id.
func (*PrintingMutation) SetCleared ¶
func (m *PrintingMutation) SetCleared() bool
SetCleared reports if the "set" edge to the Set entity was cleared.
func (*PrintingMutation) SetField ¶
func (m *PrintingMutation) 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 (*PrintingMutation) SetID ¶
func (m *PrintingMutation) SetID() (id int, exists bool)
SetID returns the "set" edge ID in the mutation.
func (*PrintingMutation) SetIDs ¶
func (m *PrintingMutation) SetIDs() (ids []int)
SetIDs returns the "set" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SetID instead. It exists only for internal usage by the builders.
func (*PrintingMutation) SetOp ¶
func (m *PrintingMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PrintingMutation) SetRarity ¶
func (m *PrintingMutation) SetRarity(pr printing.Rarity)
SetRarity sets the "rarity" field.
func (*PrintingMutation) SetSetID ¶
func (m *PrintingMutation) SetSetID(id int)
SetSetID sets the "set" edge to the Set entity by id.
func (PrintingMutation) Tx ¶
func (m PrintingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PrintingMutation) Type ¶
func (m *PrintingMutation) Type() string
Type returns the node type of this mutation (Printing).
func (*PrintingMutation) Where ¶
func (m *PrintingMutation) Where(ps ...predicate.Printing)
Where appends a list predicates to the PrintingMutation builder.
func (*PrintingMutation) WhereP ¶
func (m *PrintingMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PrintingMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PrintingQuery ¶
type PrintingQuery struct {
// contains filtered or unexported fields
}
PrintingQuery is the builder for querying Printing entities.
func (*PrintingQuery) Aggregate ¶
func (pq *PrintingQuery) Aggregate(fns ...AggregateFunc) *PrintingSelect
Aggregate returns a PrintingSelect configured with the given aggregations.
func (*PrintingQuery) All ¶
func (pq *PrintingQuery) All(ctx context.Context) ([]*Printing, error)
All executes the query and returns a list of Printings.
func (*PrintingQuery) AllX ¶
func (pq *PrintingQuery) AllX(ctx context.Context) []*Printing
AllX is like All, but panics if an error occurs.
func (*PrintingQuery) Clone ¶
func (pq *PrintingQuery) Clone() *PrintingQuery
Clone returns a duplicate of the PrintingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PrintingQuery) Count ¶
func (pq *PrintingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PrintingQuery) CountX ¶
func (pq *PrintingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PrintingQuery) Exist ¶
func (pq *PrintingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PrintingQuery) ExistX ¶
func (pq *PrintingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PrintingQuery) First ¶
func (pq *PrintingQuery) First(ctx context.Context) (*Printing, error)
First returns the first Printing entity from the query. Returns a *NotFoundError when no Printing was found.
func (*PrintingQuery) FirstID ¶
func (pq *PrintingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Printing ID from the query. Returns a *NotFoundError when no Printing ID was found.
func (*PrintingQuery) FirstIDX ¶
func (pq *PrintingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PrintingQuery) FirstX ¶
func (pq *PrintingQuery) FirstX(ctx context.Context) *Printing
FirstX is like First, but panics if an error occurs.
func (*PrintingQuery) GroupBy ¶
func (pq *PrintingQuery) GroupBy(field string, fields ...string) *PrintingGroupBy
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 { Rarity printing.Rarity `json:"rarity,omitempty"` Count int `json:"count,omitempty"` } client.Printing.Query(). GroupBy(printing.FieldRarity). Aggregate(oracle.Count()). Scan(ctx, &v)
func (*PrintingQuery) IDs ¶
func (pq *PrintingQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Printing IDs.
func (*PrintingQuery) IDsX ¶
func (pq *PrintingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PrintingQuery) Limit ¶
func (pq *PrintingQuery) Limit(limit int) *PrintingQuery
Limit the number of records to be returned by this query.
func (*PrintingQuery) Offset ¶
func (pq *PrintingQuery) Offset(offset int) *PrintingQuery
Offset to start from.
func (*PrintingQuery) Only ¶
func (pq *PrintingQuery) Only(ctx context.Context) (*Printing, error)
Only returns a single Printing entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Printing entity is found. Returns a *NotFoundError when no Printing entities are found.
func (*PrintingQuery) OnlyID ¶
func (pq *PrintingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Printing ID in the query. Returns a *NotSingularError when more than one Printing ID is found. Returns a *NotFoundError when no entities are found.
func (*PrintingQuery) OnlyIDX ¶
func (pq *PrintingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PrintingQuery) OnlyX ¶
func (pq *PrintingQuery) OnlyX(ctx context.Context) *Printing
OnlyX is like Only, but panics if an error occurs.
func (*PrintingQuery) Order ¶
func (pq *PrintingQuery) Order(o ...printing.OrderOption) *PrintingQuery
Order specifies how the records should be ordered.
func (*PrintingQuery) QueryArtist ¶
func (pq *PrintingQuery) QueryArtist() *ArtistQuery
QueryArtist chains the current query on the "artist" edge.
func (*PrintingQuery) QueryCardFace ¶
func (pq *PrintingQuery) QueryCardFace() *CardFaceQuery
QueryCardFace chains the current query on the "card_face" edge.
func (*PrintingQuery) QueryImages ¶
func (pq *PrintingQuery) QueryImages() *PrintingImageQuery
QueryImages chains the current query on the "images" edge.
func (*PrintingQuery) QuerySet ¶
func (pq *PrintingQuery) QuerySet() *SetQuery
QuerySet chains the current query on the "set" edge.
func (*PrintingQuery) Select ¶
func (pq *PrintingQuery) Select(fields ...string) *PrintingSelect
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 { Rarity printing.Rarity `json:"rarity,omitempty"` } client.Printing.Query(). Select(printing.FieldRarity). Scan(ctx, &v)
func (*PrintingQuery) Unique ¶
func (pq *PrintingQuery) Unique(unique bool) *PrintingQuery
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 (*PrintingQuery) Where ¶
func (pq *PrintingQuery) Where(ps ...predicate.Printing) *PrintingQuery
Where adds a new predicate for the PrintingQuery builder.
func (*PrintingQuery) WithArtist ¶
func (pq *PrintingQuery) WithArtist(opts ...func(*ArtistQuery)) *PrintingQuery
WithArtist tells the query-builder to eager-load the nodes that are connected to the "artist" edge. The optional arguments are used to configure the query builder of the edge.
func (*PrintingQuery) WithCardFace ¶
func (pq *PrintingQuery) WithCardFace(opts ...func(*CardFaceQuery)) *PrintingQuery
WithCardFace tells the query-builder to eager-load the nodes that are connected to the "card_face" edge. The optional arguments are used to configure the query builder of the edge.
func (*PrintingQuery) WithImages ¶
func (pq *PrintingQuery) WithImages(opts ...func(*PrintingImageQuery)) *PrintingQuery
WithImages tells the query-builder to eager-load the nodes that are connected to the "images" edge. The optional arguments are used to configure the query builder of the edge.
func (*PrintingQuery) WithSet ¶
func (pq *PrintingQuery) WithSet(opts ...func(*SetQuery)) *PrintingQuery
WithSet tells the query-builder to eager-load the nodes that are connected to the "set" edge. The optional arguments are used to configure the query builder of the edge.
type PrintingSelect ¶
type PrintingSelect struct { *PrintingQuery // contains filtered or unexported fields }
PrintingSelect is the builder for selecting fields of Printing entities.
func (*PrintingSelect) Aggregate ¶
func (ps *PrintingSelect) Aggregate(fns ...AggregateFunc) *PrintingSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PrintingSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PrintingSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PrintingSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PrintingSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PrintingSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PrintingSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PrintingSelect) Scan ¶
func (ps *PrintingSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PrintingSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PrintingUpdate ¶
type PrintingUpdate struct {
// contains filtered or unexported fields
}
PrintingUpdate is the builder for updating Printing entities.
func (*PrintingUpdate) AddImageIDs ¶
func (pu *PrintingUpdate) AddImageIDs(ids ...int) *PrintingUpdate
AddImageIDs adds the "images" edge to the PrintingImage entity by IDs.
func (*PrintingUpdate) AddImages ¶
func (pu *PrintingUpdate) AddImages(p ...*PrintingImage) *PrintingUpdate
AddImages adds the "images" edges to the PrintingImage entity.
func (*PrintingUpdate) ClearArtist ¶
func (pu *PrintingUpdate) ClearArtist() *PrintingUpdate
ClearArtist clears the "artist" edge to the Artist entity.
func (*PrintingUpdate) ClearCardFace ¶
func (pu *PrintingUpdate) ClearCardFace() *PrintingUpdate
ClearCardFace clears the "card_face" edge to the CardFace entity.
func (*PrintingUpdate) ClearImages ¶
func (pu *PrintingUpdate) ClearImages() *PrintingUpdate
ClearImages clears all "images" edges to the PrintingImage entity.
func (*PrintingUpdate) ClearSet ¶
func (pu *PrintingUpdate) ClearSet() *PrintingUpdate
ClearSet clears the "set" edge to the Set entity.
func (*PrintingUpdate) Exec ¶
func (pu *PrintingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PrintingUpdate) ExecX ¶
func (pu *PrintingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PrintingUpdate) Mutation ¶
func (pu *PrintingUpdate) Mutation() *PrintingMutation
Mutation returns the PrintingMutation object of the builder.
func (*PrintingUpdate) RemoveImageIDs ¶
func (pu *PrintingUpdate) RemoveImageIDs(ids ...int) *PrintingUpdate
RemoveImageIDs removes the "images" edge to PrintingImage entities by IDs.
func (*PrintingUpdate) RemoveImages ¶
func (pu *PrintingUpdate) RemoveImages(p ...*PrintingImage) *PrintingUpdate
RemoveImages removes "images" edges to PrintingImage entities.
func (*PrintingUpdate) Save ¶
func (pu *PrintingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PrintingUpdate) SaveX ¶
func (pu *PrintingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PrintingUpdate) SetArtist ¶
func (pu *PrintingUpdate) SetArtist(a *Artist) *PrintingUpdate
SetArtist sets the "artist" edge to the Artist entity.
func (*PrintingUpdate) SetArtistID ¶
func (pu *PrintingUpdate) SetArtistID(id int) *PrintingUpdate
SetArtistID sets the "artist" edge to the Artist entity by ID.
func (*PrintingUpdate) SetCardFace ¶
func (pu *PrintingUpdate) SetCardFace(c *CardFace) *PrintingUpdate
SetCardFace sets the "card_face" edge to the CardFace entity.
func (*PrintingUpdate) SetCardFaceID ¶
func (pu *PrintingUpdate) SetCardFaceID(id int) *PrintingUpdate
SetCardFaceID sets the "card_face" edge to the CardFace entity by ID.
func (*PrintingUpdate) SetNillableArtistID ¶
func (pu *PrintingUpdate) SetNillableArtistID(id *int) *PrintingUpdate
SetNillableArtistID sets the "artist" edge to the Artist entity by ID if the given value is not nil.
func (*PrintingUpdate) SetNillableCardFaceID ¶
func (pu *PrintingUpdate) SetNillableCardFaceID(id *int) *PrintingUpdate
SetNillableCardFaceID sets the "card_face" edge to the CardFace entity by ID if the given value is not nil.
func (*PrintingUpdate) SetNillableRarity ¶
func (pu *PrintingUpdate) SetNillableRarity(pr *printing.Rarity) *PrintingUpdate
SetNillableRarity sets the "rarity" field if the given value is not nil.
func (*PrintingUpdate) SetNillableSetID ¶
func (pu *PrintingUpdate) SetNillableSetID(id *int) *PrintingUpdate
SetNillableSetID sets the "set" edge to the Set entity by ID if the given value is not nil.
func (*PrintingUpdate) SetRarity ¶
func (pu *PrintingUpdate) SetRarity(pr printing.Rarity) *PrintingUpdate
SetRarity sets the "rarity" field.
func (*PrintingUpdate) SetSet ¶
func (pu *PrintingUpdate) SetSet(s *Set) *PrintingUpdate
SetSet sets the "set" edge to the Set entity.
func (*PrintingUpdate) SetSetID ¶
func (pu *PrintingUpdate) SetSetID(id int) *PrintingUpdate
SetSetID sets the "set" edge to the Set entity by ID.
func (*PrintingUpdate) Where ¶
func (pu *PrintingUpdate) Where(ps ...predicate.Printing) *PrintingUpdate
Where appends a list predicates to the PrintingUpdate builder.
type PrintingUpdateOne ¶
type PrintingUpdateOne struct {
// contains filtered or unexported fields
}
PrintingUpdateOne is the builder for updating a single Printing entity.
func (*PrintingUpdateOne) AddImageIDs ¶
func (puo *PrintingUpdateOne) AddImageIDs(ids ...int) *PrintingUpdateOne
AddImageIDs adds the "images" edge to the PrintingImage entity by IDs.
func (*PrintingUpdateOne) AddImages ¶
func (puo *PrintingUpdateOne) AddImages(p ...*PrintingImage) *PrintingUpdateOne
AddImages adds the "images" edges to the PrintingImage entity.
func (*PrintingUpdateOne) ClearArtist ¶
func (puo *PrintingUpdateOne) ClearArtist() *PrintingUpdateOne
ClearArtist clears the "artist" edge to the Artist entity.
func (*PrintingUpdateOne) ClearCardFace ¶
func (puo *PrintingUpdateOne) ClearCardFace() *PrintingUpdateOne
ClearCardFace clears the "card_face" edge to the CardFace entity.
func (*PrintingUpdateOne) ClearImages ¶
func (puo *PrintingUpdateOne) ClearImages() *PrintingUpdateOne
ClearImages clears all "images" edges to the PrintingImage entity.
func (*PrintingUpdateOne) ClearSet ¶
func (puo *PrintingUpdateOne) ClearSet() *PrintingUpdateOne
ClearSet clears the "set" edge to the Set entity.
func (*PrintingUpdateOne) Exec ¶
func (puo *PrintingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PrintingUpdateOne) ExecX ¶
func (puo *PrintingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PrintingUpdateOne) Mutation ¶
func (puo *PrintingUpdateOne) Mutation() *PrintingMutation
Mutation returns the PrintingMutation object of the builder.
func (*PrintingUpdateOne) RemoveImageIDs ¶
func (puo *PrintingUpdateOne) RemoveImageIDs(ids ...int) *PrintingUpdateOne
RemoveImageIDs removes the "images" edge to PrintingImage entities by IDs.
func (*PrintingUpdateOne) RemoveImages ¶
func (puo *PrintingUpdateOne) RemoveImages(p ...*PrintingImage) *PrintingUpdateOne
RemoveImages removes "images" edges to PrintingImage entities.
func (*PrintingUpdateOne) Save ¶
func (puo *PrintingUpdateOne) Save(ctx context.Context) (*Printing, error)
Save executes the query and returns the updated Printing entity.
func (*PrintingUpdateOne) SaveX ¶
func (puo *PrintingUpdateOne) SaveX(ctx context.Context) *Printing
SaveX is like Save, but panics if an error occurs.
func (*PrintingUpdateOne) Select ¶
func (puo *PrintingUpdateOne) Select(field string, fields ...string) *PrintingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PrintingUpdateOne) SetArtist ¶
func (puo *PrintingUpdateOne) SetArtist(a *Artist) *PrintingUpdateOne
SetArtist sets the "artist" edge to the Artist entity.
func (*PrintingUpdateOne) SetArtistID ¶
func (puo *PrintingUpdateOne) SetArtistID(id int) *PrintingUpdateOne
SetArtistID sets the "artist" edge to the Artist entity by ID.
func (*PrintingUpdateOne) SetCardFace ¶
func (puo *PrintingUpdateOne) SetCardFace(c *CardFace) *PrintingUpdateOne
SetCardFace sets the "card_face" edge to the CardFace entity.
func (*PrintingUpdateOne) SetCardFaceID ¶
func (puo *PrintingUpdateOne) SetCardFaceID(id int) *PrintingUpdateOne
SetCardFaceID sets the "card_face" edge to the CardFace entity by ID.
func (*PrintingUpdateOne) SetNillableArtistID ¶
func (puo *PrintingUpdateOne) SetNillableArtistID(id *int) *PrintingUpdateOne
SetNillableArtistID sets the "artist" edge to the Artist entity by ID if the given value is not nil.
func (*PrintingUpdateOne) SetNillableCardFaceID ¶
func (puo *PrintingUpdateOne) SetNillableCardFaceID(id *int) *PrintingUpdateOne
SetNillableCardFaceID sets the "card_face" edge to the CardFace entity by ID if the given value is not nil.
func (*PrintingUpdateOne) SetNillableRarity ¶
func (puo *PrintingUpdateOne) SetNillableRarity(pr *printing.Rarity) *PrintingUpdateOne
SetNillableRarity sets the "rarity" field if the given value is not nil.
func (*PrintingUpdateOne) SetNillableSetID ¶
func (puo *PrintingUpdateOne) SetNillableSetID(id *int) *PrintingUpdateOne
SetNillableSetID sets the "set" edge to the Set entity by ID if the given value is not nil.
func (*PrintingUpdateOne) SetRarity ¶
func (puo *PrintingUpdateOne) SetRarity(pr printing.Rarity) *PrintingUpdateOne
SetRarity sets the "rarity" field.
func (*PrintingUpdateOne) SetSet ¶
func (puo *PrintingUpdateOne) SetSet(s *Set) *PrintingUpdateOne
SetSet sets the "set" edge to the Set entity.
func (*PrintingUpdateOne) SetSetID ¶
func (puo *PrintingUpdateOne) SetSetID(id int) *PrintingUpdateOne
SetSetID sets the "set" edge to the Set entity by ID.
func (*PrintingUpdateOne) Where ¶
func (puo *PrintingUpdateOne) Where(ps ...predicate.Printing) *PrintingUpdateOne
Where appends a list predicates to the PrintingUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Ruling ¶
type Ruling struct { // ID of the ent. ID int `json:"id,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Date holds the value of the "date" field. Date time.Time `json:"date,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RulingQuery when eager-loading is set. Edges RulingEdges `json:"edges"` // contains filtered or unexported fields }
Ruling is the model entity for the Ruling schema.
func (*Ruling) Unwrap ¶
Unwrap unwraps the Ruling 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 (*Ruling) Update ¶
func (r *Ruling) Update() *RulingUpdateOne
Update returns a builder for updating this Ruling. Note that you need to call Ruling.Unwrap() before calling this method if this Ruling was returned from a transaction, and the transaction was committed or rolled back.
type RulingClient ¶
type RulingClient struct {
// contains filtered or unexported fields
}
RulingClient is a client for the Ruling schema.
func NewRulingClient ¶
func NewRulingClient(c config) *RulingClient
NewRulingClient returns a client for the Ruling from the given config.
func (*RulingClient) Create ¶
func (c *RulingClient) Create() *RulingCreate
Create returns a builder for creating a Ruling entity.
func (*RulingClient) CreateBulk ¶
func (c *RulingClient) CreateBulk(builders ...*RulingCreate) *RulingCreateBulk
CreateBulk returns a builder for creating a bulk of Ruling entities.
func (*RulingClient) Delete ¶
func (c *RulingClient) Delete() *RulingDelete
Delete returns a delete builder for Ruling.
func (*RulingClient) DeleteOne ¶
func (c *RulingClient) DeleteOne(r *Ruling) *RulingDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RulingClient) DeleteOneID ¶
func (c *RulingClient) DeleteOneID(id int) *RulingDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RulingClient) GetX ¶
func (c *RulingClient) GetX(ctx context.Context, id int) *Ruling
GetX is like Get, but panics if an error occurs.
func (*RulingClient) Intercept ¶
func (c *RulingClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ruling.Intercept(f(g(h())))`.
func (*RulingClient) Interceptors ¶
func (c *RulingClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RulingClient) MapCreateBulk ¶
func (c *RulingClient) MapCreateBulk(slice any, setFunc func(*RulingCreate, int)) *RulingCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*RulingClient) Query ¶
func (c *RulingClient) Query() *RulingQuery
Query returns a query builder for Ruling.
func (*RulingClient) QueryCard ¶
func (c *RulingClient) QueryCard(r *Ruling) *CardQuery
QueryCard queries the card edge of a Ruling.
func (*RulingClient) Update ¶
func (c *RulingClient) Update() *RulingUpdate
Update returns an update builder for Ruling.
func (*RulingClient) UpdateOne ¶
func (c *RulingClient) UpdateOne(r *Ruling) *RulingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RulingClient) UpdateOneID ¶
func (c *RulingClient) UpdateOneID(id int) *RulingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RulingClient) Use ¶
func (c *RulingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ruling.Hooks(f(g(h())))`.
type RulingCreate ¶
type RulingCreate struct {
// contains filtered or unexported fields
}
RulingCreate is the builder for creating a Ruling entity.
func (*RulingCreate) Exec ¶
func (rc *RulingCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RulingCreate) ExecX ¶
func (rc *RulingCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RulingCreate) Mutation ¶
func (rc *RulingCreate) Mutation() *RulingMutation
Mutation returns the RulingMutation object of the builder.
func (*RulingCreate) Save ¶
func (rc *RulingCreate) Save(ctx context.Context) (*Ruling, error)
Save creates the Ruling in the database.
func (*RulingCreate) SaveX ¶
func (rc *RulingCreate) SaveX(ctx context.Context) *Ruling
SaveX calls Save and panics if Save returns an error.
func (*RulingCreate) SetCard ¶
func (rc *RulingCreate) SetCard(c *Card) *RulingCreate
SetCard sets the "card" edge to the Card entity.
func (*RulingCreate) SetCardID ¶
func (rc *RulingCreate) SetCardID(id int) *RulingCreate
SetCardID sets the "card" edge to the Card entity by ID.
func (*RulingCreate) SetDate ¶
func (rc *RulingCreate) SetDate(t time.Time) *RulingCreate
SetDate sets the "date" field.
func (*RulingCreate) SetNillableCardID ¶
func (rc *RulingCreate) SetNillableCardID(id *int) *RulingCreate
SetNillableCardID sets the "card" edge to the Card entity by ID if the given value is not nil.
func (*RulingCreate) SetText ¶
func (rc *RulingCreate) SetText(s string) *RulingCreate
SetText sets the "text" field.
type RulingCreateBulk ¶
type RulingCreateBulk struct {
// contains filtered or unexported fields
}
RulingCreateBulk is the builder for creating many Ruling entities in bulk.
func (*RulingCreateBulk) Exec ¶
func (rcb *RulingCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RulingCreateBulk) ExecX ¶
func (rcb *RulingCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RulingDelete ¶
type RulingDelete struct {
// contains filtered or unexported fields
}
RulingDelete is the builder for deleting a Ruling entity.
func (*RulingDelete) Exec ¶
func (rd *RulingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RulingDelete) ExecX ¶
func (rd *RulingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RulingDelete) Where ¶
func (rd *RulingDelete) Where(ps ...predicate.Ruling) *RulingDelete
Where appends a list predicates to the RulingDelete builder.
type RulingDeleteOne ¶
type RulingDeleteOne struct {
// contains filtered or unexported fields
}
RulingDeleteOne is the builder for deleting a single Ruling entity.
func (*RulingDeleteOne) Exec ¶
func (rdo *RulingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RulingDeleteOne) ExecX ¶
func (rdo *RulingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RulingDeleteOne) Where ¶
func (rdo *RulingDeleteOne) Where(ps ...predicate.Ruling) *RulingDeleteOne
Where appends a list predicates to the RulingDelete builder.
type RulingEdges ¶
type RulingEdges struct { // Card holds the value of the card edge. Card *Card `json:"card,omitempty"` // contains filtered or unexported fields }
RulingEdges holds the relations/edges for other nodes in the graph.
func (RulingEdges) CardOrErr ¶
func (e RulingEdges) CardOrErr() (*Card, error)
CardOrErr returns the Card value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RulingGroupBy ¶
type RulingGroupBy struct {
// contains filtered or unexported fields
}
RulingGroupBy is the group-by builder for Ruling entities.
func (*RulingGroupBy) Aggregate ¶
func (rgb *RulingGroupBy) Aggregate(fns ...AggregateFunc) *RulingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RulingGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RulingGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RulingGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RulingGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RulingGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RulingGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RulingGroupBy) Scan ¶
func (rgb *RulingGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RulingGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RulingMutation ¶
type RulingMutation struct {
// contains filtered or unexported fields
}
RulingMutation represents an operation that mutates the Ruling nodes in the graph.
func (*RulingMutation) AddField ¶
func (m *RulingMutation) 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 (*RulingMutation) AddedEdges ¶
func (m *RulingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RulingMutation) AddedField ¶
func (m *RulingMutation) 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 (*RulingMutation) AddedFields ¶
func (m *RulingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RulingMutation) AddedIDs ¶
func (m *RulingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RulingMutation) CardCleared ¶
func (m *RulingMutation) CardCleared() bool
CardCleared reports if the "card" edge to the Card entity was cleared.
func (*RulingMutation) CardID ¶
func (m *RulingMutation) CardID() (id int, exists bool)
CardID returns the "card" edge ID in the mutation.
func (*RulingMutation) CardIDs ¶
func (m *RulingMutation) CardIDs() (ids []int)
CardIDs returns the "card" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CardID instead. It exists only for internal usage by the builders.
func (*RulingMutation) ClearCard ¶
func (m *RulingMutation) ClearCard()
ClearCard clears the "card" edge to the Card entity.
func (*RulingMutation) ClearEdge ¶
func (m *RulingMutation) 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 (*RulingMutation) ClearField ¶
func (m *RulingMutation) 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 (*RulingMutation) ClearedEdges ¶
func (m *RulingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RulingMutation) ClearedFields ¶
func (m *RulingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RulingMutation) Client ¶
func (m RulingMutation) 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 (*RulingMutation) Date ¶
func (m *RulingMutation) Date() (r time.Time, exists bool)
Date returns the value of the "date" field in the mutation.
func (*RulingMutation) EdgeCleared ¶
func (m *RulingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RulingMutation) Field ¶
func (m *RulingMutation) 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 (*RulingMutation) FieldCleared ¶
func (m *RulingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RulingMutation) Fields ¶
func (m *RulingMutation) 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 (*RulingMutation) ID ¶
func (m *RulingMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RulingMutation) IDs ¶
func (m *RulingMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RulingMutation) OldDate ¶
OldDate returns the old "date" field's value of the Ruling entity. If the Ruling 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 (*RulingMutation) 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 (*RulingMutation) OldText ¶
func (m *RulingMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the Ruling entity. If the Ruling 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 (*RulingMutation) RemovedEdges ¶
func (m *RulingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RulingMutation) RemovedIDs ¶
func (m *RulingMutation) 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 (*RulingMutation) ResetCard ¶
func (m *RulingMutation) ResetCard()
ResetCard resets all changes to the "card" edge.
func (*RulingMutation) ResetDate ¶
func (m *RulingMutation) ResetDate()
ResetDate resets all changes to the "date" field.
func (*RulingMutation) ResetEdge ¶
func (m *RulingMutation) 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 (*RulingMutation) ResetField ¶
func (m *RulingMutation) 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 (*RulingMutation) ResetText ¶
func (m *RulingMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*RulingMutation) SetCardID ¶
func (m *RulingMutation) SetCardID(id int)
SetCardID sets the "card" edge to the Card entity by id.
func (*RulingMutation) SetDate ¶
func (m *RulingMutation) SetDate(t time.Time)
SetDate sets the "date" field.
func (*RulingMutation) SetField ¶
func (m *RulingMutation) 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 (*RulingMutation) SetOp ¶
func (m *RulingMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RulingMutation) SetText ¶
func (m *RulingMutation) SetText(s string)
SetText sets the "text" field.
func (*RulingMutation) Text ¶
func (m *RulingMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (RulingMutation) Tx ¶
func (m RulingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RulingMutation) Type ¶
func (m *RulingMutation) Type() string
Type returns the node type of this mutation (Ruling).
func (*RulingMutation) Where ¶
func (m *RulingMutation) Where(ps ...predicate.Ruling)
Where appends a list predicates to the RulingMutation builder.
func (*RulingMutation) WhereP ¶
func (m *RulingMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RulingMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RulingQuery ¶
type RulingQuery struct {
// contains filtered or unexported fields
}
RulingQuery is the builder for querying Ruling entities.
func (*RulingQuery) Aggregate ¶
func (rq *RulingQuery) Aggregate(fns ...AggregateFunc) *RulingSelect
Aggregate returns a RulingSelect configured with the given aggregations.
func (*RulingQuery) All ¶
func (rq *RulingQuery) All(ctx context.Context) ([]*Ruling, error)
All executes the query and returns a list of Rulings.
func (*RulingQuery) AllX ¶
func (rq *RulingQuery) AllX(ctx context.Context) []*Ruling
AllX is like All, but panics if an error occurs.
func (*RulingQuery) Clone ¶
func (rq *RulingQuery) Clone() *RulingQuery
Clone returns a duplicate of the RulingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RulingQuery) Count ¶
func (rq *RulingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RulingQuery) CountX ¶
func (rq *RulingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RulingQuery) Exist ¶
func (rq *RulingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RulingQuery) ExistX ¶
func (rq *RulingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RulingQuery) First ¶
func (rq *RulingQuery) First(ctx context.Context) (*Ruling, error)
First returns the first Ruling entity from the query. Returns a *NotFoundError when no Ruling was found.
func (*RulingQuery) FirstID ¶
func (rq *RulingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Ruling ID from the query. Returns a *NotFoundError when no Ruling ID was found.
func (*RulingQuery) FirstIDX ¶
func (rq *RulingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*RulingQuery) FirstX ¶
func (rq *RulingQuery) FirstX(ctx context.Context) *Ruling
FirstX is like First, but panics if an error occurs.
func (*RulingQuery) GroupBy ¶
func (rq *RulingQuery) GroupBy(field string, fields ...string) *RulingGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Text string `json:"text,omitempty"` Count int `json:"count,omitempty"` } client.Ruling.Query(). GroupBy(ruling.FieldText). Aggregate(oracle.Count()). Scan(ctx, &v)
func (*RulingQuery) IDs ¶
func (rq *RulingQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Ruling IDs.
func (*RulingQuery) IDsX ¶
func (rq *RulingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*RulingQuery) Limit ¶
func (rq *RulingQuery) Limit(limit int) *RulingQuery
Limit the number of records to be returned by this query.
func (*RulingQuery) Offset ¶
func (rq *RulingQuery) Offset(offset int) *RulingQuery
Offset to start from.
func (*RulingQuery) Only ¶
func (rq *RulingQuery) Only(ctx context.Context) (*Ruling, error)
Only returns a single Ruling entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Ruling entity is found. Returns a *NotFoundError when no Ruling entities are found.
func (*RulingQuery) OnlyID ¶
func (rq *RulingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Ruling ID in the query. Returns a *NotSingularError when more than one Ruling ID is found. Returns a *NotFoundError when no entities are found.
func (*RulingQuery) OnlyIDX ¶
func (rq *RulingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RulingQuery) OnlyX ¶
func (rq *RulingQuery) OnlyX(ctx context.Context) *Ruling
OnlyX is like Only, but panics if an error occurs.
func (*RulingQuery) Order ¶
func (rq *RulingQuery) Order(o ...ruling.OrderOption) *RulingQuery
Order specifies how the records should be ordered.
func (*RulingQuery) QueryCard ¶
func (rq *RulingQuery) QueryCard() *CardQuery
QueryCard chains the current query on the "card" edge.
func (*RulingQuery) Select ¶
func (rq *RulingQuery) Select(fields ...string) *RulingSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Text string `json:"text,omitempty"` } client.Ruling.Query(). Select(ruling.FieldText). Scan(ctx, &v)
func (*RulingQuery) Unique ¶
func (rq *RulingQuery) Unique(unique bool) *RulingQuery
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 (*RulingQuery) Where ¶
func (rq *RulingQuery) Where(ps ...predicate.Ruling) *RulingQuery
Where adds a new predicate for the RulingQuery builder.
func (*RulingQuery) WithCard ¶
func (rq *RulingQuery) WithCard(opts ...func(*CardQuery)) *RulingQuery
WithCard tells the query-builder to eager-load the nodes that are connected to the "card" edge. The optional arguments are used to configure the query builder of the edge.
type RulingSelect ¶
type RulingSelect struct { *RulingQuery // contains filtered or unexported fields }
RulingSelect is the builder for selecting fields of Ruling entities.
func (*RulingSelect) Aggregate ¶
func (rs *RulingSelect) Aggregate(fns ...AggregateFunc) *RulingSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RulingSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RulingSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RulingSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RulingSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RulingSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RulingSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RulingSelect) Scan ¶
func (rs *RulingSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RulingSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RulingUpdate ¶
type RulingUpdate struct {
// contains filtered or unexported fields
}
RulingUpdate is the builder for updating Ruling entities.
func (*RulingUpdate) ClearCard ¶
func (ru *RulingUpdate) ClearCard() *RulingUpdate
ClearCard clears the "card" edge to the Card entity.
func (*RulingUpdate) Exec ¶
func (ru *RulingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RulingUpdate) ExecX ¶
func (ru *RulingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RulingUpdate) Mutation ¶
func (ru *RulingUpdate) Mutation() *RulingMutation
Mutation returns the RulingMutation object of the builder.
func (*RulingUpdate) Save ¶
func (ru *RulingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RulingUpdate) SaveX ¶
func (ru *RulingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RulingUpdate) SetCard ¶
func (ru *RulingUpdate) SetCard(c *Card) *RulingUpdate
SetCard sets the "card" edge to the Card entity.
func (*RulingUpdate) SetCardID ¶
func (ru *RulingUpdate) SetCardID(id int) *RulingUpdate
SetCardID sets the "card" edge to the Card entity by ID.
func (*RulingUpdate) SetDate ¶
func (ru *RulingUpdate) SetDate(t time.Time) *RulingUpdate
SetDate sets the "date" field.
func (*RulingUpdate) SetNillableCardID ¶
func (ru *RulingUpdate) SetNillableCardID(id *int) *RulingUpdate
SetNillableCardID sets the "card" edge to the Card entity by ID if the given value is not nil.
func (*RulingUpdate) SetNillableDate ¶
func (ru *RulingUpdate) SetNillableDate(t *time.Time) *RulingUpdate
SetNillableDate sets the "date" field if the given value is not nil.
func (*RulingUpdate) SetNillableText ¶
func (ru *RulingUpdate) SetNillableText(s *string) *RulingUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*RulingUpdate) SetText ¶
func (ru *RulingUpdate) SetText(s string) *RulingUpdate
SetText sets the "text" field.
func (*RulingUpdate) Where ¶
func (ru *RulingUpdate) Where(ps ...predicate.Ruling) *RulingUpdate
Where appends a list predicates to the RulingUpdate builder.
type RulingUpdateOne ¶
type RulingUpdateOne struct {
// contains filtered or unexported fields
}
RulingUpdateOne is the builder for updating a single Ruling entity.
func (*RulingUpdateOne) ClearCard ¶
func (ruo *RulingUpdateOne) ClearCard() *RulingUpdateOne
ClearCard clears the "card" edge to the Card entity.
func (*RulingUpdateOne) Exec ¶
func (ruo *RulingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RulingUpdateOne) ExecX ¶
func (ruo *RulingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RulingUpdateOne) Mutation ¶
func (ruo *RulingUpdateOne) Mutation() *RulingMutation
Mutation returns the RulingMutation object of the builder.
func (*RulingUpdateOne) Save ¶
func (ruo *RulingUpdateOne) Save(ctx context.Context) (*Ruling, error)
Save executes the query and returns the updated Ruling entity.
func (*RulingUpdateOne) SaveX ¶
func (ruo *RulingUpdateOne) SaveX(ctx context.Context) *Ruling
SaveX is like Save, but panics if an error occurs.
func (*RulingUpdateOne) Select ¶
func (ruo *RulingUpdateOne) Select(field string, fields ...string) *RulingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RulingUpdateOne) SetCard ¶
func (ruo *RulingUpdateOne) SetCard(c *Card) *RulingUpdateOne
SetCard sets the "card" edge to the Card entity.
func (*RulingUpdateOne) SetCardID ¶
func (ruo *RulingUpdateOne) SetCardID(id int) *RulingUpdateOne
SetCardID sets the "card" edge to the Card entity by ID.
func (*RulingUpdateOne) SetDate ¶
func (ruo *RulingUpdateOne) SetDate(t time.Time) *RulingUpdateOne
SetDate sets the "date" field.
func (*RulingUpdateOne) SetNillableCardID ¶
func (ruo *RulingUpdateOne) SetNillableCardID(id *int) *RulingUpdateOne
SetNillableCardID sets the "card" edge to the Card entity by ID if the given value is not nil.
func (*RulingUpdateOne) SetNillableDate ¶
func (ruo *RulingUpdateOne) SetNillableDate(t *time.Time) *RulingUpdateOne
SetNillableDate sets the "date" field if the given value is not nil.
func (*RulingUpdateOne) SetNillableText ¶
func (ruo *RulingUpdateOne) SetNillableText(s *string) *RulingUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*RulingUpdateOne) SetText ¶
func (ruo *RulingUpdateOne) SetText(s string) *RulingUpdateOne
SetText sets the "text" field.
func (*RulingUpdateOne) Where ¶
func (ruo *RulingUpdateOne) Where(ps ...predicate.Ruling) *RulingUpdateOne
Where appends a list predicates to the RulingUpdate builder.
type Set ¶
type Set struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SetQuery when eager-loading is set. Edges SetEdges `json:"edges"` // contains filtered or unexported fields }
Set is the model entity for the Set schema.
func (*Set) QueryPrintings ¶
func (s *Set) QueryPrintings() *PrintingQuery
QueryPrintings queries the "printings" edge of the Set entity.
func (*Set) Unwrap ¶
Unwrap unwraps the Set 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 (*Set) Update ¶
func (s *Set) Update() *SetUpdateOne
Update returns a builder for updating this Set. Note that you need to call Set.Unwrap() before calling this method if this Set was returned from a transaction, and the transaction was committed or rolled back.
type SetClient ¶
type SetClient struct {
// contains filtered or unexported fields
}
SetClient is a client for the Set schema.
func NewSetClient ¶
func NewSetClient(c config) *SetClient
NewSetClient returns a client for the Set from the given config.
func (*SetClient) CreateBulk ¶
func (c *SetClient) CreateBulk(builders ...*SetCreate) *SetCreateBulk
CreateBulk returns a builder for creating a bulk of Set entities.
func (*SetClient) DeleteOne ¶
func (c *SetClient) DeleteOne(s *Set) *SetDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SetClient) DeleteOneID ¶
func (c *SetClient) DeleteOneID(id int) *SetDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SetClient) Intercept ¶
func (c *SetClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `set.Intercept(f(g(h())))`.
func (*SetClient) Interceptors ¶
func (c *SetClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SetClient) MapCreateBulk ¶
func (c *SetClient) MapCreateBulk(slice any, setFunc func(*SetCreate, int)) *SetCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SetClient) QueryPrintings ¶
func (c *SetClient) QueryPrintings(s *Set) *PrintingQuery
QueryPrintings queries the printings edge of a Set.
func (*SetClient) UpdateOne ¶
func (c *SetClient) UpdateOne(s *Set) *SetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SetClient) UpdateOneID ¶
func (c *SetClient) UpdateOneID(id int) *SetUpdateOne
UpdateOneID returns an update builder for the given id.
type SetCreate ¶
type SetCreate struct {
// contains filtered or unexported fields
}
SetCreate is the builder for creating a Set entity.
func (*SetCreate) AddPrintingIDs ¶
AddPrintingIDs adds the "printings" edge to the Printing entity by IDs.
func (*SetCreate) AddPrintings ¶
AddPrintings adds the "printings" edges to the Printing entity.
func (*SetCreate) Mutation ¶
func (sc *SetCreate) Mutation() *SetMutation
Mutation returns the SetMutation object of the builder.
type SetCreateBulk ¶
type SetCreateBulk struct {
// contains filtered or unexported fields
}
SetCreateBulk is the builder for creating many Set entities in bulk.
func (*SetCreateBulk) Exec ¶
func (scb *SetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SetCreateBulk) ExecX ¶
func (scb *SetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SetDelete ¶
type SetDelete struct {
// contains filtered or unexported fields
}
SetDelete is the builder for deleting a Set entity.
func (*SetDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type SetDeleteOne ¶
type SetDeleteOne struct {
// contains filtered or unexported fields
}
SetDeleteOne is the builder for deleting a single Set entity.
func (*SetDeleteOne) Exec ¶
func (sdo *SetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SetDeleteOne) ExecX ¶
func (sdo *SetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SetDeleteOne) Where ¶
func (sdo *SetDeleteOne) Where(ps ...predicate.Set) *SetDeleteOne
Where appends a list predicates to the SetDelete builder.
type SetEdges ¶
type SetEdges struct { // Printings holds the value of the printings edge. Printings []*Printing `json:"printings,omitempty"` // contains filtered or unexported fields }
SetEdges holds the relations/edges for other nodes in the graph.
func (SetEdges) PrintingsOrErr ¶
PrintingsOrErr returns the Printings value or an error if the edge was not loaded in eager-loading.
type SetGroupBy ¶
type SetGroupBy struct {
// contains filtered or unexported fields
}
SetGroupBy is the group-by builder for Set entities.
func (*SetGroupBy) Aggregate ¶
func (sgb *SetGroupBy) Aggregate(fns ...AggregateFunc) *SetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SetGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SetGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SetGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SetGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SetGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SetGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SetGroupBy) Scan ¶
func (sgb *SetGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SetGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SetMutation ¶
type SetMutation struct {
// contains filtered or unexported fields
}
SetMutation represents an operation that mutates the Set nodes in the graph.
func (*SetMutation) AddField ¶
func (m *SetMutation) 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 (*SetMutation) AddPrintingIDs ¶
func (m *SetMutation) AddPrintingIDs(ids ...int)
AddPrintingIDs adds the "printings" edge to the Printing entity by ids.
func (*SetMutation) AddedEdges ¶
func (m *SetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SetMutation) AddedField ¶
func (m *SetMutation) 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 (*SetMutation) AddedFields ¶
func (m *SetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SetMutation) AddedIDs ¶
func (m *SetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SetMutation) ClearEdge ¶
func (m *SetMutation) 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 (*SetMutation) ClearField ¶
func (m *SetMutation) 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 (*SetMutation) ClearPrintings ¶
func (m *SetMutation) ClearPrintings()
ClearPrintings clears the "printings" edge to the Printing entity.
func (*SetMutation) ClearedEdges ¶
func (m *SetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SetMutation) ClearedFields ¶
func (m *SetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SetMutation) Client ¶
func (m SetMutation) 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 (*SetMutation) Code ¶
func (m *SetMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*SetMutation) EdgeCleared ¶
func (m *SetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SetMutation) Field ¶
func (m *SetMutation) 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 (*SetMutation) FieldCleared ¶
func (m *SetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SetMutation) Fields ¶
func (m *SetMutation) 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 (*SetMutation) ID ¶
func (m *SetMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SetMutation) IDs ¶
func (m *SetMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SetMutation) Name ¶
func (m *SetMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SetMutation) OldCode ¶
func (m *SetMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Set entity. If the Set 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 (*SetMutation) 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 (*SetMutation) OldName ¶
func (m *SetMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Set entity. If the Set 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 (*SetMutation) PrintingsCleared ¶
func (m *SetMutation) PrintingsCleared() bool
PrintingsCleared reports if the "printings" edge to the Printing entity was cleared.
func (*SetMutation) PrintingsIDs ¶
func (m *SetMutation) PrintingsIDs() (ids []int)
PrintingsIDs returns the "printings" edge IDs in the mutation.
func (*SetMutation) RemovePrintingIDs ¶
func (m *SetMutation) RemovePrintingIDs(ids ...int)
RemovePrintingIDs removes the "printings" edge to the Printing entity by IDs.
func (*SetMutation) RemovedEdges ¶
func (m *SetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SetMutation) RemovedIDs ¶
func (m *SetMutation) 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 (*SetMutation) RemovedPrintingsIDs ¶
func (m *SetMutation) RemovedPrintingsIDs() (ids []int)
RemovedPrintings returns the removed IDs of the "printings" edge to the Printing entity.
func (*SetMutation) ResetCode ¶
func (m *SetMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*SetMutation) ResetEdge ¶
func (m *SetMutation) 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 (*SetMutation) ResetField ¶
func (m *SetMutation) 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 (*SetMutation) ResetName ¶
func (m *SetMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SetMutation) ResetPrintings ¶
func (m *SetMutation) ResetPrintings()
ResetPrintings resets all changes to the "printings" edge.
func (*SetMutation) SetCode ¶
func (m *SetMutation) SetCode(s string)
SetCode sets the "code" field.
func (*SetMutation) SetField ¶
func (m *SetMutation) 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 (*SetMutation) SetName ¶
func (m *SetMutation) SetName(s string)
SetName sets the "name" field.
func (*SetMutation) SetOp ¶
func (m *SetMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (SetMutation) Tx ¶
func (m SetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SetMutation) Type ¶
func (m *SetMutation) Type() string
Type returns the node type of this mutation (Set).
func (*SetMutation) Where ¶
func (m *SetMutation) Where(ps ...predicate.Set)
Where appends a list predicates to the SetMutation builder.
func (*SetMutation) WhereP ¶
func (m *SetMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SetMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SetQuery ¶
type SetQuery struct {
// contains filtered or unexported fields
}
SetQuery is the builder for querying Set entities.
func (*SetQuery) Aggregate ¶
func (sq *SetQuery) Aggregate(fns ...AggregateFunc) *SetSelect
Aggregate returns a SetSelect configured with the given aggregations.
func (*SetQuery) Clone ¶
Clone returns a duplicate of the SetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SetQuery) First ¶
First returns the first Set entity from the query. Returns a *NotFoundError when no Set was found.
func (*SetQuery) FirstID ¶
FirstID returns the first Set ID from the query. Returns a *NotFoundError when no Set ID was found.
func (*SetQuery) GroupBy ¶
func (sq *SetQuery) GroupBy(field string, fields ...string) *SetGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Set.Query(). GroupBy(set.FieldName). Aggregate(oracle.Count()). Scan(ctx, &v)
func (*SetQuery) Only ¶
Only returns a single Set entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Set entity is found. Returns a *NotFoundError when no Set entities are found.
func (*SetQuery) OnlyID ¶
OnlyID is like Only, but returns the only Set ID in the query. Returns a *NotSingularError when more than one Set ID is found. Returns a *NotFoundError when no entities are found.
func (*SetQuery) Order ¶
func (sq *SetQuery) Order(o ...set.OrderOption) *SetQuery
Order specifies how the records should be ordered.
func (*SetQuery) QueryPrintings ¶
func (sq *SetQuery) QueryPrintings() *PrintingQuery
QueryPrintings chains the current query on the "printings" edge.
func (*SetQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Set.Query(). Select(set.FieldName). Scan(ctx, &v)
func (*SetQuery) 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 (*SetQuery) WithPrintings ¶
func (sq *SetQuery) WithPrintings(opts ...func(*PrintingQuery)) *SetQuery
WithPrintings tells the query-builder to eager-load the nodes that are connected to the "printings" edge. The optional arguments are used to configure the query builder of the edge.
type SetSelect ¶
type SetSelect struct { *SetQuery // contains filtered or unexported fields }
SetSelect is the builder for selecting fields of Set entities.
func (*SetSelect) Aggregate ¶
func (ss *SetSelect) Aggregate(fns ...AggregateFunc) *SetSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SetSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SetSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SetSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SetSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SetSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SetSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SetSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SetUpdate ¶
type SetUpdate struct {
// contains filtered or unexported fields
}
SetUpdate is the builder for updating Set entities.
func (*SetUpdate) AddPrintingIDs ¶
AddPrintingIDs adds the "printings" edge to the Printing entity by IDs.
func (*SetUpdate) AddPrintings ¶
AddPrintings adds the "printings" edges to the Printing entity.
func (*SetUpdate) ClearPrintings ¶
ClearPrintings clears all "printings" edges to the Printing entity.
func (*SetUpdate) Mutation ¶
func (su *SetUpdate) Mutation() *SetMutation
Mutation returns the SetMutation object of the builder.
func (*SetUpdate) RemovePrintingIDs ¶
RemovePrintingIDs removes the "printings" edge to Printing entities by IDs.
func (*SetUpdate) RemovePrintings ¶
RemovePrintings removes "printings" edges to Printing entities.
func (*SetUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*SetUpdate) SetNillableCode ¶
SetNillableCode sets the "code" field if the given value is not nil.
func (*SetUpdate) SetNillableName ¶
SetNillableName sets the "name" field if the given value is not nil.
type SetUpdateOne ¶
type SetUpdateOne struct {
// contains filtered or unexported fields
}
SetUpdateOne is the builder for updating a single Set entity.
func (*SetUpdateOne) AddPrintingIDs ¶
func (suo *SetUpdateOne) AddPrintingIDs(ids ...int) *SetUpdateOne
AddPrintingIDs adds the "printings" edge to the Printing entity by IDs.
func (*SetUpdateOne) AddPrintings ¶
func (suo *SetUpdateOne) AddPrintings(p ...*Printing) *SetUpdateOne
AddPrintings adds the "printings" edges to the Printing entity.
func (*SetUpdateOne) ClearPrintings ¶
func (suo *SetUpdateOne) ClearPrintings() *SetUpdateOne
ClearPrintings clears all "printings" edges to the Printing entity.
func (*SetUpdateOne) Exec ¶
func (suo *SetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SetUpdateOne) ExecX ¶
func (suo *SetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SetUpdateOne) Mutation ¶
func (suo *SetUpdateOne) Mutation() *SetMutation
Mutation returns the SetMutation object of the builder.
func (*SetUpdateOne) RemovePrintingIDs ¶
func (suo *SetUpdateOne) RemovePrintingIDs(ids ...int) *SetUpdateOne
RemovePrintingIDs removes the "printings" edge to Printing entities by IDs.
func (*SetUpdateOne) RemovePrintings ¶
func (suo *SetUpdateOne) RemovePrintings(p ...*Printing) *SetUpdateOne
RemovePrintings removes "printings" edges to Printing entities.
func (*SetUpdateOne) Save ¶
func (suo *SetUpdateOne) Save(ctx context.Context) (*Set, error)
Save executes the query and returns the updated Set entity.
func (*SetUpdateOne) SaveX ¶
func (suo *SetUpdateOne) SaveX(ctx context.Context) *Set
SaveX is like Save, but panics if an error occurs.
func (*SetUpdateOne) Select ¶
func (suo *SetUpdateOne) Select(field string, fields ...string) *SetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SetUpdateOne) SetCode ¶
func (suo *SetUpdateOne) SetCode(s string) *SetUpdateOne
SetCode sets the "code" field.
func (*SetUpdateOne) SetName ¶
func (suo *SetUpdateOne) SetName(s string) *SetUpdateOne
SetName sets the "name" field.
func (*SetUpdateOne) SetNillableCode ¶
func (suo *SetUpdateOne) SetNillableCode(s *string) *SetUpdateOne
SetNillableCode sets the "code" field if the given value is not nil.
func (*SetUpdateOne) SetNillableName ¶
func (suo *SetUpdateOne) SetNillableName(s *string) *SetUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*SetUpdateOne) Where ¶
func (suo *SetUpdateOne) Where(ps ...predicate.Set) *SetUpdateOne
Where appends a list predicates to the SetUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Artist is the client for interacting with the Artist builders. Artist *ArtistClient // Card is the client for interacting with the Card builders. Card *CardClient // CardFace is the client for interacting with the CardFace builders. CardFace *CardFaceClient // Printing is the client for interacting with the Printing builders. Printing *PrintingClient // PrintingImage is the client for interacting with the PrintingImage builders. PrintingImage *PrintingImageClient // Ruling is the client for interacting with the Ruling builders. Ruling *RulingClient // Set is the client for interacting with the Set builders. Set *SetClient // 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 ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- artist.go
- artist_create.go
- artist_delete.go
- artist_query.go
- artist_update.go
- card.go
- card_create.go
- card_delete.go
- card_query.go
- card_update.go
- cardface.go
- cardface_create.go
- cardface_delete.go
- cardface_query.go
- cardface_update.go
- client.go
- ent.go
- generate.go
- mutation.go
- printing.go
- printing_create.go
- printing_delete.go
- printing_query.go
- printing_update.go
- printingimage.go
- printingimage_create.go
- printingimage_delete.go
- printingimage_query.go
- printingimage_update.go
- ruling.go
- ruling_create.go
- ruling_delete.go
- ruling_query.go
- ruling_update.go
- runtime.go
- set.go
- set_create.go
- set_delete.go
- set_query.go
- set_update.go
- tx.go