Documentation ¶
Index ¶
- Constants
- 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 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) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, 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 Item
- func (c *Item) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Item) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (i *Item) QueryRecords() *RecordQuery
- func (i *Item) QuerySets() *SetQuery
- func (i *Item) String() string
- func (i *Item) Unwrap() *Item
- func (i *Item) Update() *ItemUpdateOne
- func (i *Item) Value(name string) (ent.Value, error)
- type ItemClient
- func (c *ItemClient) Create() *ItemCreate
- func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
- func (c *ItemClient) Delete() *ItemDelete
- func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
- func (c *ItemClient) DeleteOneID(id int64) *ItemDeleteOne
- func (c *ItemClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *ItemClient) Get(ctx context.Context, id int64) (*Item, error)
- func (c *ItemClient) GetX(ctx context.Context, id int64) *Item
- func (c *ItemClient) Hooks() []Hook
- func (c *ItemClient) Intercept(interceptors ...Interceptor)
- func (c *ItemClient) Interceptors() []Interceptor
- func (c *ItemClient) Query() *ItemQuery
- func (c *ItemClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *ItemClient) QueryRecords(i *Item) *RecordQuery
- func (c *ItemClient) QuerySets(i *Item) *SetQuery
- func (c *ItemClient) Update() *ItemUpdate
- func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
- func (c *ItemClient) UpdateOneID(id int64) *ItemUpdateOne
- func (c *ItemClient) Use(hooks ...Hook)
- type ItemCreate
- func (ic *ItemCreate) AddRecordIDs(ids ...int64) *ItemCreate
- func (ic *ItemCreate) AddRecords(r ...*Record) *ItemCreate
- func (ic *ItemCreate) AddSetIDs(ids ...int64) *ItemCreate
- func (ic *ItemCreate) AddSets(s ...*Set) *ItemCreate
- func (ic *ItemCreate) Exec(ctx context.Context) error
- func (c *ItemCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ic *ItemCreate) ExecX(ctx context.Context)
- func (ic *ItemCreate) Mutation() *ItemMutation
- func (ic *ItemCreate) OnConflict(opts ...sql.ConflictOption) *ItemUpsertOne
- func (ic *ItemCreate) OnConflictColumns(columns ...string) *ItemUpsertOne
- func (c *ItemCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
- func (ic *ItemCreate) SaveX(ctx context.Context) *Item
- func (ic *ItemCreate) SetID(i int64) *ItemCreate
- func (ic *ItemCreate) SetIdentifier(s string) *ItemCreate
- type ItemCreateBulk
- func (icb *ItemCreateBulk) Exec(ctx context.Context) error
- func (c *ItemCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (icb *ItemCreateBulk) ExecX(ctx context.Context)
- func (icb *ItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *ItemUpsertBulk
- func (icb *ItemCreateBulk) OnConflictColumns(columns ...string) *ItemUpsertBulk
- func (c *ItemCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (icb *ItemCreateBulk) Save(ctx context.Context) ([]*Item, error)
- func (icb *ItemCreateBulk) SaveX(ctx context.Context) []*Item
- type ItemDelete
- func (id *ItemDelete) Exec(ctx context.Context) (int, error)
- func (c *ItemDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (id *ItemDelete) ExecX(ctx context.Context) int
- func (c *ItemDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete
- type ItemDeleteOne
- type ItemEdges
- type ItemGroupBy
- func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
- func (s *ItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemGroupBy) BoolX(ctx context.Context) bool
- func (s *ItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemGroupBy) Float64X(ctx context.Context) float64
- func (s *ItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ItemGroupBy) IntX(ctx context.Context) int
- func (s *ItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ItemGroupBy) IntsX(ctx context.Context) []int
- func (igb *ItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *ItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *ItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ItemGroupBy) StringX(ctx context.Context) string
- func (s *ItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ItemGroupBy) StringsX(ctx context.Context) []string
- type ItemMutation
- func (m *ItemMutation) AddField(name string, value ent.Value) error
- func (m *ItemMutation) AddRecordIDs(ids ...int64)
- func (m *ItemMutation) AddSetIDs(ids ...int64)
- func (m *ItemMutation) AddedEdges() []string
- func (m *ItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *ItemMutation) AddedFields() []string
- func (m *ItemMutation) AddedIDs(name string) []ent.Value
- func (m *ItemMutation) ClearEdge(name string) error
- func (m *ItemMutation) ClearField(name string) error
- func (m *ItemMutation) ClearRecords()
- func (m *ItemMutation) ClearSets()
- func (m *ItemMutation) ClearedEdges() []string
- func (m *ItemMutation) ClearedFields() []string
- func (m ItemMutation) Client() *Client
- func (m *ItemMutation) EdgeCleared(name string) bool
- func (c *ItemMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *ItemMutation) Field(name string) (ent.Value, bool)
- func (m *ItemMutation) FieldCleared(name string) bool
- func (m *ItemMutation) Fields() []string
- func (m *ItemMutation) ID() (id int64, exists bool)
- func (m *ItemMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *ItemMutation) Identifier() (r string, exists bool)
- func (m *ItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ItemMutation) OldIdentifier(ctx context.Context) (v string, err error)
- func (m *ItemMutation) Op() Op
- func (c *ItemMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *ItemMutation) RecordsCleared() bool
- func (m *ItemMutation) RecordsIDs() (ids []int64)
- func (m *ItemMutation) RemoveRecordIDs(ids ...int64)
- func (m *ItemMutation) RemoveSetIDs(ids ...int64)
- func (m *ItemMutation) RemovedEdges() []string
- func (m *ItemMutation) RemovedIDs(name string) []ent.Value
- func (m *ItemMutation) RemovedRecordsIDs() (ids []int64)
- func (m *ItemMutation) RemovedSetsIDs() (ids []int64)
- func (m *ItemMutation) ResetEdge(name string) error
- func (m *ItemMutation) ResetField(name string) error
- func (m *ItemMutation) ResetIdentifier()
- func (m *ItemMutation) ResetRecords()
- func (m *ItemMutation) ResetSets()
- func (m *ItemMutation) SetField(name string, value ent.Value) error
- func (m *ItemMutation) SetID(id int64)
- func (m *ItemMutation) SetIdentifier(s string)
- func (m *ItemMutation) SetOp(op Op)
- func (m *ItemMutation) SetsCleared() bool
- func (m *ItemMutation) SetsIDs() (ids []int64)
- func (m ItemMutation) Tx() (*Tx, error)
- func (m *ItemMutation) Type() string
- func (m *ItemMutation) Where(ps ...predicate.Item)
- func (m *ItemMutation) WhereP(ps ...func(*sql.Selector))
- type ItemQuery
- func (iq *ItemQuery) Aggregate(fns ...AggregateFunc) *ItemSelect
- func (iq *ItemQuery) All(ctx context.Context) ([]*Item, error)
- func (iq *ItemQuery) AllX(ctx context.Context) []*Item
- func (iq *ItemQuery) Clone() *ItemQuery
- func (iq *ItemQuery) Count(ctx context.Context) (int, error)
- func (iq *ItemQuery) CountX(ctx context.Context) int
- func (c *ItemQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (iq *ItemQuery) Exist(ctx context.Context) (bool, error)
- func (iq *ItemQuery) ExistX(ctx context.Context) bool
- func (iq *ItemQuery) First(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) FirstID(ctx context.Context) (id int64, err error)
- func (iq *ItemQuery) FirstIDX(ctx context.Context) int64
- func (iq *ItemQuery) FirstX(ctx context.Context) *Item
- func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
- func (iq *ItemQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (iq *ItemQuery) IDsX(ctx context.Context) []int64
- func (iq *ItemQuery) Limit(limit int) *ItemQuery
- func (iq *ItemQuery) Offset(offset int) *ItemQuery
- func (iq *ItemQuery) Only(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (iq *ItemQuery) OnlyIDX(ctx context.Context) int64
- func (iq *ItemQuery) OnlyX(ctx context.Context) *Item
- func (iq *ItemQuery) Order(o ...item.OrderOption) *ItemQuery
- func (c *ItemQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (iq *ItemQuery) QueryRecords() *RecordQuery
- func (iq *ItemQuery) QuerySets() *SetQuery
- func (iq *ItemQuery) Select(fields ...string) *ItemSelect
- func (iq *ItemQuery) Unique(unique bool) *ItemQuery
- func (iq *ItemQuery) Where(ps ...predicate.Item) *ItemQuery
- func (iq *ItemQuery) WithRecords(opts ...func(*RecordQuery)) *ItemQuery
- func (iq *ItemQuery) WithSets(opts ...func(*SetQuery)) *ItemQuery
- type ItemSelect
- func (is *ItemSelect) Aggregate(fns ...AggregateFunc) *ItemSelect
- func (s *ItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemSelect) BoolX(ctx context.Context) bool
- func (s *ItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemSelect) BoolsX(ctx context.Context) []bool
- func (c ItemSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *ItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemSelect) Float64X(ctx context.Context) float64
- func (s *ItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemSelect) Float64sX(ctx context.Context) []float64
- func (s *ItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ItemSelect) IntX(ctx context.Context) int
- func (s *ItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ItemSelect) IntsX(ctx context.Context) []int
- func (c ItemSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (is *ItemSelect) Scan(ctx context.Context, v any) error
- func (s *ItemSelect) ScanX(ctx context.Context, v any)
- func (s *ItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *ItemSelect) StringX(ctx context.Context) string
- func (s *ItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ItemSelect) StringsX(ctx context.Context) []string
- type ItemUpdate
- func (iu *ItemUpdate) AddRecordIDs(ids ...int64) *ItemUpdate
- func (iu *ItemUpdate) AddRecords(r ...*Record) *ItemUpdate
- func (iu *ItemUpdate) AddSetIDs(ids ...int64) *ItemUpdate
- func (iu *ItemUpdate) AddSets(s ...*Set) *ItemUpdate
- func (iu *ItemUpdate) ClearRecords() *ItemUpdate
- func (iu *ItemUpdate) ClearSets() *ItemUpdate
- func (iu *ItemUpdate) Exec(ctx context.Context) error
- func (c *ItemUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (iu *ItemUpdate) ExecX(ctx context.Context)
- func (iu *ItemUpdate) Mutation() *ItemMutation
- func (c *ItemUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (iu *ItemUpdate) RemoveRecordIDs(ids ...int64) *ItemUpdate
- func (iu *ItemUpdate) RemoveRecords(r ...*Record) *ItemUpdate
- func (iu *ItemUpdate) RemoveSetIDs(ids ...int64) *ItemUpdate
- func (iu *ItemUpdate) RemoveSets(s ...*Set) *ItemUpdate
- func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
- func (iu *ItemUpdate) SaveX(ctx context.Context) int
- func (iu *ItemUpdate) SetIdentifier(s string) *ItemUpdate
- func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
- type ItemUpdateOne
- func (iuo *ItemUpdateOne) AddRecordIDs(ids ...int64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddRecords(r ...*Record) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddSetIDs(ids ...int64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddSets(s ...*Set) *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearRecords() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearSets() *ItemUpdateOne
- func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
- func (c *ItemUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
- func (iuo *ItemUpdateOne) Mutation() *ItemMutation
- func (c *ItemUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (iuo *ItemUpdateOne) RemoveRecordIDs(ids ...int64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveRecords(r ...*Record) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveSetIDs(ids ...int64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveSets(s ...*Set) *ItemUpdateOne
- func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
- func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
- func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetIdentifier(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) Where(ps ...predicate.Item) *ItemUpdateOne
- type ItemUpsert
- type ItemUpsertBulk
- func (u *ItemUpsertBulk) DoNothing() *ItemUpsertBulk
- func (u *ItemUpsertBulk) Exec(ctx context.Context) error
- func (u *ItemUpsertBulk) ExecX(ctx context.Context)
- func (u *ItemUpsertBulk) Ignore() *ItemUpsertBulk
- func (u *ItemUpsertBulk) SetIdentifier(v string) *ItemUpsertBulk
- func (u *ItemUpsertBulk) Update(set func(*ItemUpsert)) *ItemUpsertBulk
- func (u *ItemUpsertBulk) UpdateIdentifier() *ItemUpsertBulk
- func (u *ItemUpsertBulk) UpdateNewValues() *ItemUpsertBulk
- type ItemUpsertOne
- func (u *ItemUpsertOne) DoNothing() *ItemUpsertOne
- func (u *ItemUpsertOne) Exec(ctx context.Context) error
- func (u *ItemUpsertOne) ExecX(ctx context.Context)
- func (u *ItemUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *ItemUpsertOne) IDX(ctx context.Context) int64
- func (u *ItemUpsertOne) Ignore() *ItemUpsertOne
- func (u *ItemUpsertOne) SetIdentifier(v string) *ItemUpsertOne
- func (u *ItemUpsertOne) Update(set func(*ItemUpsert)) *ItemUpsertOne
- func (u *ItemUpsertOne) UpdateIdentifier() *ItemUpsertOne
- func (u *ItemUpsertOne) UpdateNewValues() *ItemUpsertOne
- type Items
- type MetadataFormat
- func (c *MetadataFormat) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *MetadataFormat) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mf *MetadataFormat) QueryRecords() *RecordQuery
- func (mf *MetadataFormat) String() string
- func (mf *MetadataFormat) Unwrap() *MetadataFormat
- func (mf *MetadataFormat) Update() *MetadataFormatUpdateOne
- func (mf *MetadataFormat) Value(name string) (ent.Value, error)
- type MetadataFormatClient
- func (c *MetadataFormatClient) Create() *MetadataFormatCreate
- func (c *MetadataFormatClient) CreateBulk(builders ...*MetadataFormatCreate) *MetadataFormatCreateBulk
- func (c *MetadataFormatClient) Delete() *MetadataFormatDelete
- func (c *MetadataFormatClient) DeleteOne(mf *MetadataFormat) *MetadataFormatDeleteOne
- func (c *MetadataFormatClient) DeleteOneID(id int64) *MetadataFormatDeleteOne
- func (c *MetadataFormatClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *MetadataFormatClient) Get(ctx context.Context, id int64) (*MetadataFormat, error)
- func (c *MetadataFormatClient) GetX(ctx context.Context, id int64) *MetadataFormat
- func (c *MetadataFormatClient) Hooks() []Hook
- func (c *MetadataFormatClient) Intercept(interceptors ...Interceptor)
- func (c *MetadataFormatClient) Interceptors() []Interceptor
- func (c *MetadataFormatClient) Query() *MetadataFormatQuery
- func (c *MetadataFormatClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *MetadataFormatClient) QueryRecords(mf *MetadataFormat) *RecordQuery
- func (c *MetadataFormatClient) Update() *MetadataFormatUpdate
- func (c *MetadataFormatClient) UpdateOne(mf *MetadataFormat) *MetadataFormatUpdateOne
- func (c *MetadataFormatClient) UpdateOneID(id int64) *MetadataFormatUpdateOne
- func (c *MetadataFormatClient) Use(hooks ...Hook)
- type MetadataFormatCreate
- func (mfc *MetadataFormatCreate) AddRecordIDs(ids ...int64) *MetadataFormatCreate
- func (mfc *MetadataFormatCreate) AddRecords(r ...*Record) *MetadataFormatCreate
- func (mfc *MetadataFormatCreate) Exec(ctx context.Context) error
- func (c *MetadataFormatCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mfc *MetadataFormatCreate) ExecX(ctx context.Context)
- func (mfc *MetadataFormatCreate) Mutation() *MetadataFormatMutation
- func (mfc *MetadataFormatCreate) OnConflict(opts ...sql.ConflictOption) *MetadataFormatUpsertOne
- func (mfc *MetadataFormatCreate) OnConflictColumns(columns ...string) *MetadataFormatUpsertOne
- func (c *MetadataFormatCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mfc *MetadataFormatCreate) Save(ctx context.Context) (*MetadataFormat, error)
- func (mfc *MetadataFormatCreate) SaveX(ctx context.Context) *MetadataFormat
- func (mfc *MetadataFormatCreate) SetID(i int64) *MetadataFormatCreate
- func (mfc *MetadataFormatCreate) SetNamespace(s string) *MetadataFormatCreate
- func (mfc *MetadataFormatCreate) SetPrefix(s string) *MetadataFormatCreate
- func (mfc *MetadataFormatCreate) SetSchema(s string) *MetadataFormatCreate
- type MetadataFormatCreateBulk
- func (mfcb *MetadataFormatCreateBulk) Exec(ctx context.Context) error
- func (c *MetadataFormatCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mfcb *MetadataFormatCreateBulk) ExecX(ctx context.Context)
- func (mfcb *MetadataFormatCreateBulk) OnConflict(opts ...sql.ConflictOption) *MetadataFormatUpsertBulk
- func (mfcb *MetadataFormatCreateBulk) OnConflictColumns(columns ...string) *MetadataFormatUpsertBulk
- func (c *MetadataFormatCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mfcb *MetadataFormatCreateBulk) Save(ctx context.Context) ([]*MetadataFormat, error)
- func (mfcb *MetadataFormatCreateBulk) SaveX(ctx context.Context) []*MetadataFormat
- type MetadataFormatDelete
- func (mfd *MetadataFormatDelete) Exec(ctx context.Context) (int, error)
- func (c *MetadataFormatDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mfd *MetadataFormatDelete) ExecX(ctx context.Context) int
- func (c *MetadataFormatDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mfd *MetadataFormatDelete) Where(ps ...predicate.MetadataFormat) *MetadataFormatDelete
- type MetadataFormatDeleteOne
- type MetadataFormatEdges
- type MetadataFormatGroupBy
- func (mfgb *MetadataFormatGroupBy) Aggregate(fns ...AggregateFunc) *MetadataFormatGroupBy
- func (s *MetadataFormatGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MetadataFormatGroupBy) BoolX(ctx context.Context) bool
- func (s *MetadataFormatGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MetadataFormatGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MetadataFormatGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MetadataFormatGroupBy) Float64X(ctx context.Context) float64
- func (s *MetadataFormatGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MetadataFormatGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MetadataFormatGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MetadataFormatGroupBy) IntX(ctx context.Context) int
- func (s *MetadataFormatGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MetadataFormatGroupBy) IntsX(ctx context.Context) []int
- func (mfgb *MetadataFormatGroupBy) Scan(ctx context.Context, v any) error
- func (s *MetadataFormatGroupBy) ScanX(ctx context.Context, v any)
- func (s *MetadataFormatGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MetadataFormatGroupBy) StringX(ctx context.Context) string
- func (s *MetadataFormatGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MetadataFormatGroupBy) StringsX(ctx context.Context) []string
- type MetadataFormatMutation
- func (m *MetadataFormatMutation) AddField(name string, value ent.Value) error
- func (m *MetadataFormatMutation) AddRecordIDs(ids ...int64)
- func (m *MetadataFormatMutation) AddedEdges() []string
- func (m *MetadataFormatMutation) AddedField(name string) (ent.Value, bool)
- func (m *MetadataFormatMutation) AddedFields() []string
- func (m *MetadataFormatMutation) AddedIDs(name string) []ent.Value
- func (m *MetadataFormatMutation) ClearEdge(name string) error
- func (m *MetadataFormatMutation) ClearField(name string) error
- func (m *MetadataFormatMutation) ClearRecords()
- func (m *MetadataFormatMutation) ClearedEdges() []string
- func (m *MetadataFormatMutation) ClearedFields() []string
- func (m MetadataFormatMutation) Client() *Client
- func (m *MetadataFormatMutation) EdgeCleared(name string) bool
- func (c *MetadataFormatMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *MetadataFormatMutation) Field(name string) (ent.Value, bool)
- func (m *MetadataFormatMutation) FieldCleared(name string) bool
- func (m *MetadataFormatMutation) Fields() []string
- func (m *MetadataFormatMutation) ID() (id int64, exists bool)
- func (m *MetadataFormatMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *MetadataFormatMutation) Namespace() (r string, exists bool)
- func (m *MetadataFormatMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MetadataFormatMutation) OldNamespace(ctx context.Context) (v string, err error)
- func (m *MetadataFormatMutation) OldPrefix(ctx context.Context) (v string, err error)
- func (m *MetadataFormatMutation) OldSchema(ctx context.Context) (v string, err error)
- func (m *MetadataFormatMutation) Op() Op
- func (m *MetadataFormatMutation) Prefix() (r string, exists bool)
- func (c *MetadataFormatMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *MetadataFormatMutation) RecordsCleared() bool
- func (m *MetadataFormatMutation) RecordsIDs() (ids []int64)
- func (m *MetadataFormatMutation) RemoveRecordIDs(ids ...int64)
- func (m *MetadataFormatMutation) RemovedEdges() []string
- func (m *MetadataFormatMutation) RemovedIDs(name string) []ent.Value
- func (m *MetadataFormatMutation) RemovedRecordsIDs() (ids []int64)
- func (m *MetadataFormatMutation) ResetEdge(name string) error
- func (m *MetadataFormatMutation) ResetField(name string) error
- func (m *MetadataFormatMutation) ResetNamespace()
- func (m *MetadataFormatMutation) ResetPrefix()
- func (m *MetadataFormatMutation) ResetRecords()
- func (m *MetadataFormatMutation) ResetSchema()
- func (m *MetadataFormatMutation) Schema() (r string, exists bool)
- func (m *MetadataFormatMutation) SetField(name string, value ent.Value) error
- func (m *MetadataFormatMutation) SetID(id int64)
- func (m *MetadataFormatMutation) SetNamespace(s string)
- func (m *MetadataFormatMutation) SetOp(op Op)
- func (m *MetadataFormatMutation) SetPrefix(s string)
- func (m *MetadataFormatMutation) SetSchema(s string)
- func (m MetadataFormatMutation) Tx() (*Tx, error)
- func (m *MetadataFormatMutation) Type() string
- func (m *MetadataFormatMutation) Where(ps ...predicate.MetadataFormat)
- func (m *MetadataFormatMutation) WhereP(ps ...func(*sql.Selector))
- type MetadataFormatQuery
- func (mfq *MetadataFormatQuery) Aggregate(fns ...AggregateFunc) *MetadataFormatSelect
- func (mfq *MetadataFormatQuery) All(ctx context.Context) ([]*MetadataFormat, error)
- func (mfq *MetadataFormatQuery) AllX(ctx context.Context) []*MetadataFormat
- func (mfq *MetadataFormatQuery) Clone() *MetadataFormatQuery
- func (mfq *MetadataFormatQuery) Count(ctx context.Context) (int, error)
- func (mfq *MetadataFormatQuery) CountX(ctx context.Context) int
- func (c *MetadataFormatQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mfq *MetadataFormatQuery) Exist(ctx context.Context) (bool, error)
- func (mfq *MetadataFormatQuery) ExistX(ctx context.Context) bool
- func (mfq *MetadataFormatQuery) First(ctx context.Context) (*MetadataFormat, error)
- func (mfq *MetadataFormatQuery) FirstID(ctx context.Context) (id int64, err error)
- func (mfq *MetadataFormatQuery) FirstIDX(ctx context.Context) int64
- func (mfq *MetadataFormatQuery) FirstX(ctx context.Context) *MetadataFormat
- func (mfq *MetadataFormatQuery) GroupBy(field string, fields ...string) *MetadataFormatGroupBy
- func (mfq *MetadataFormatQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (mfq *MetadataFormatQuery) IDsX(ctx context.Context) []int64
- func (mfq *MetadataFormatQuery) Limit(limit int) *MetadataFormatQuery
- func (mfq *MetadataFormatQuery) Offset(offset int) *MetadataFormatQuery
- func (mfq *MetadataFormatQuery) Only(ctx context.Context) (*MetadataFormat, error)
- func (mfq *MetadataFormatQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (mfq *MetadataFormatQuery) OnlyIDX(ctx context.Context) int64
- func (mfq *MetadataFormatQuery) OnlyX(ctx context.Context) *MetadataFormat
- func (mfq *MetadataFormatQuery) Order(o ...metadataformat.OrderOption) *MetadataFormatQuery
- func (c *MetadataFormatQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mfq *MetadataFormatQuery) QueryRecords() *RecordQuery
- func (mfq *MetadataFormatQuery) Select(fields ...string) *MetadataFormatSelect
- func (mfq *MetadataFormatQuery) Unique(unique bool) *MetadataFormatQuery
- func (mfq *MetadataFormatQuery) Where(ps ...predicate.MetadataFormat) *MetadataFormatQuery
- func (mfq *MetadataFormatQuery) WithRecords(opts ...func(*RecordQuery)) *MetadataFormatQuery
- type MetadataFormatSelect
- func (mfs *MetadataFormatSelect) Aggregate(fns ...AggregateFunc) *MetadataFormatSelect
- func (s *MetadataFormatSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MetadataFormatSelect) BoolX(ctx context.Context) bool
- func (s *MetadataFormatSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MetadataFormatSelect) BoolsX(ctx context.Context) []bool
- func (c MetadataFormatSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *MetadataFormatSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MetadataFormatSelect) Float64X(ctx context.Context) float64
- func (s *MetadataFormatSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MetadataFormatSelect) Float64sX(ctx context.Context) []float64
- func (s *MetadataFormatSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MetadataFormatSelect) IntX(ctx context.Context) int
- func (s *MetadataFormatSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MetadataFormatSelect) IntsX(ctx context.Context) []int
- func (c MetadataFormatSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mfs *MetadataFormatSelect) Scan(ctx context.Context, v any) error
- func (s *MetadataFormatSelect) ScanX(ctx context.Context, v any)
- func (s *MetadataFormatSelect) String(ctx context.Context) (_ string, err error)
- func (s *MetadataFormatSelect) StringX(ctx context.Context) string
- func (s *MetadataFormatSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MetadataFormatSelect) StringsX(ctx context.Context) []string
- type MetadataFormatUpdate
- func (mfu *MetadataFormatUpdate) AddRecordIDs(ids ...int64) *MetadataFormatUpdate
- func (mfu *MetadataFormatUpdate) AddRecords(r ...*Record) *MetadataFormatUpdate
- func (mfu *MetadataFormatUpdate) ClearRecords() *MetadataFormatUpdate
- func (mfu *MetadataFormatUpdate) Exec(ctx context.Context) error
- func (c *MetadataFormatUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mfu *MetadataFormatUpdate) ExecX(ctx context.Context)
- func (mfu *MetadataFormatUpdate) Mutation() *MetadataFormatMutation
- func (c *MetadataFormatUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mfu *MetadataFormatUpdate) RemoveRecordIDs(ids ...int64) *MetadataFormatUpdate
- func (mfu *MetadataFormatUpdate) RemoveRecords(r ...*Record) *MetadataFormatUpdate
- func (mfu *MetadataFormatUpdate) Save(ctx context.Context) (int, error)
- func (mfu *MetadataFormatUpdate) SaveX(ctx context.Context) int
- func (mfu *MetadataFormatUpdate) SetNamespace(s string) *MetadataFormatUpdate
- func (mfu *MetadataFormatUpdate) SetPrefix(s string) *MetadataFormatUpdate
- func (mfu *MetadataFormatUpdate) SetSchema(s string) *MetadataFormatUpdate
- func (mfu *MetadataFormatUpdate) Where(ps ...predicate.MetadataFormat) *MetadataFormatUpdate
- type MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) AddRecordIDs(ids ...int64) *MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) AddRecords(r ...*Record) *MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) ClearRecords() *MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) Exec(ctx context.Context) error
- func (c *MetadataFormatUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mfuo *MetadataFormatUpdateOne) ExecX(ctx context.Context)
- func (mfuo *MetadataFormatUpdateOne) Mutation() *MetadataFormatMutation
- func (c *MetadataFormatUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mfuo *MetadataFormatUpdateOne) RemoveRecordIDs(ids ...int64) *MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) RemoveRecords(r ...*Record) *MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) Save(ctx context.Context) (*MetadataFormat, error)
- func (mfuo *MetadataFormatUpdateOne) SaveX(ctx context.Context) *MetadataFormat
- func (mfuo *MetadataFormatUpdateOne) Select(field string, fields ...string) *MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) SetNamespace(s string) *MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) SetPrefix(s string) *MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) SetSchema(s string) *MetadataFormatUpdateOne
- func (mfuo *MetadataFormatUpdateOne) Where(ps ...predicate.MetadataFormat) *MetadataFormatUpdateOne
- type MetadataFormatUpsert
- func (u *MetadataFormatUpsert) SetNamespace(v string) *MetadataFormatUpsert
- func (u *MetadataFormatUpsert) SetPrefix(v string) *MetadataFormatUpsert
- func (u *MetadataFormatUpsert) SetSchema(v string) *MetadataFormatUpsert
- func (u *MetadataFormatUpsert) UpdateNamespace() *MetadataFormatUpsert
- func (u *MetadataFormatUpsert) UpdatePrefix() *MetadataFormatUpsert
- func (u *MetadataFormatUpsert) UpdateSchema() *MetadataFormatUpsert
- type MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) DoNothing() *MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) Exec(ctx context.Context) error
- func (u *MetadataFormatUpsertBulk) ExecX(ctx context.Context)
- func (u *MetadataFormatUpsertBulk) Ignore() *MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) SetNamespace(v string) *MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) SetPrefix(v string) *MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) SetSchema(v string) *MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) Update(set func(*MetadataFormatUpsert)) *MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) UpdateNamespace() *MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) UpdateNewValues() *MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) UpdatePrefix() *MetadataFormatUpsertBulk
- func (u *MetadataFormatUpsertBulk) UpdateSchema() *MetadataFormatUpsertBulk
- type MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) DoNothing() *MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) Exec(ctx context.Context) error
- func (u *MetadataFormatUpsertOne) ExecX(ctx context.Context)
- func (u *MetadataFormatUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *MetadataFormatUpsertOne) IDX(ctx context.Context) int64
- func (u *MetadataFormatUpsertOne) Ignore() *MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) SetNamespace(v string) *MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) SetPrefix(v string) *MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) SetSchema(v string) *MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) Update(set func(*MetadataFormatUpsert)) *MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) UpdateNamespace() *MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) UpdateNewValues() *MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) UpdatePrefix() *MetadataFormatUpsertOne
- func (u *MetadataFormatUpsertOne) UpdateSchema() *MetadataFormatUpsertOne
- type MetadataFormats
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Record
- func (c *Record) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Record) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (r *Record) QueryItem() *ItemQuery
- func (r *Record) QueryMetadataFormat() *MetadataFormatQuery
- func (r *Record) String() string
- func (r *Record) Unwrap() *Record
- func (r *Record) Update() *RecordUpdateOne
- func (r *Record) Value(name string) (ent.Value, error)
- type RecordClient
- func (c *RecordClient) Create() *RecordCreate
- func (c *RecordClient) CreateBulk(builders ...*RecordCreate) *RecordCreateBulk
- func (c *RecordClient) Delete() *RecordDelete
- func (c *RecordClient) DeleteOne(r *Record) *RecordDeleteOne
- func (c *RecordClient) DeleteOneID(id int64) *RecordDeleteOne
- func (c *RecordClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *RecordClient) Get(ctx context.Context, id int64) (*Record, error)
- func (c *RecordClient) GetX(ctx context.Context, id int64) *Record
- func (c *RecordClient) Hooks() []Hook
- func (c *RecordClient) Intercept(interceptors ...Interceptor)
- func (c *RecordClient) Interceptors() []Interceptor
- func (c *RecordClient) Query() *RecordQuery
- func (c *RecordClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *RecordClient) QueryItem(r *Record) *ItemQuery
- func (c *RecordClient) QueryMetadataFormat(r *Record) *MetadataFormatQuery
- func (c *RecordClient) Update() *RecordUpdate
- func (c *RecordClient) UpdateOne(r *Record) *RecordUpdateOne
- func (c *RecordClient) UpdateOneID(id int64) *RecordUpdateOne
- func (c *RecordClient) Use(hooks ...Hook)
- type RecordCreate
- func (rc *RecordCreate) Exec(ctx context.Context) error
- func (c *RecordCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (rc *RecordCreate) ExecX(ctx context.Context)
- func (rc *RecordCreate) Mutation() *RecordMutation
- func (rc *RecordCreate) OnConflict(opts ...sql.ConflictOption) *RecordUpsertOne
- func (rc *RecordCreate) OnConflictColumns(columns ...string) *RecordUpsertOne
- func (c *RecordCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (rc *RecordCreate) Save(ctx context.Context) (*Record, error)
- func (rc *RecordCreate) SaveX(ctx context.Context) *Record
- func (rc *RecordCreate) SetDatestamp(t time.Time) *RecordCreate
- func (rc *RecordCreate) SetID(i int64) *RecordCreate
- func (rc *RecordCreate) SetItem(i *Item) *RecordCreate
- func (rc *RecordCreate) SetItemID(i int64) *RecordCreate
- func (rc *RecordCreate) SetMetadata(s string) *RecordCreate
- func (rc *RecordCreate) SetMetadataFormat(m *MetadataFormat) *RecordCreate
- func (rc *RecordCreate) SetMetadataFormatID(i int64) *RecordCreate
- func (rc *RecordCreate) SetNillableDatestamp(t *time.Time) *RecordCreate
- func (rc *RecordCreate) SetNillableMetadata(s *string) *RecordCreate
- type RecordCreateBulk
- func (rcb *RecordCreateBulk) Exec(ctx context.Context) error
- func (c *RecordCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (rcb *RecordCreateBulk) ExecX(ctx context.Context)
- func (rcb *RecordCreateBulk) OnConflict(opts ...sql.ConflictOption) *RecordUpsertBulk
- func (rcb *RecordCreateBulk) OnConflictColumns(columns ...string) *RecordUpsertBulk
- func (c *RecordCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (rcb *RecordCreateBulk) Save(ctx context.Context) ([]*Record, error)
- func (rcb *RecordCreateBulk) SaveX(ctx context.Context) []*Record
- type RecordDelete
- func (rd *RecordDelete) Exec(ctx context.Context) (int, error)
- func (c *RecordDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (rd *RecordDelete) ExecX(ctx context.Context) int
- func (c *RecordDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (rd *RecordDelete) Where(ps ...predicate.Record) *RecordDelete
- type RecordDeleteOne
- type RecordEdges
- type RecordGroupBy
- func (rgb *RecordGroupBy) Aggregate(fns ...AggregateFunc) *RecordGroupBy
- func (s *RecordGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RecordGroupBy) BoolX(ctx context.Context) bool
- func (s *RecordGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RecordGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RecordGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RecordGroupBy) Float64X(ctx context.Context) float64
- func (s *RecordGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RecordGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RecordGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RecordGroupBy) IntX(ctx context.Context) int
- func (s *RecordGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RecordGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RecordGroupBy) Scan(ctx context.Context, v any) error
- func (s *RecordGroupBy) ScanX(ctx context.Context, v any)
- func (s *RecordGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RecordGroupBy) StringX(ctx context.Context) string
- func (s *RecordGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RecordGroupBy) StringsX(ctx context.Context) []string
- type RecordMutation
- func (m *RecordMutation) AddField(name string, value ent.Value) error
- func (m *RecordMutation) AddedEdges() []string
- func (m *RecordMutation) AddedField(name string) (ent.Value, bool)
- func (m *RecordMutation) AddedFields() []string
- func (m *RecordMutation) AddedIDs(name string) []ent.Value
- func (m *RecordMutation) ClearEdge(name string) error
- func (m *RecordMutation) ClearField(name string) error
- func (m *RecordMutation) ClearItem()
- func (m *RecordMutation) ClearMetadata()
- func (m *RecordMutation) ClearMetadataFormat()
- func (m *RecordMutation) ClearedEdges() []string
- func (m *RecordMutation) ClearedFields() []string
- func (m RecordMutation) Client() *Client
- func (m *RecordMutation) Datestamp() (r time.Time, exists bool)
- func (m *RecordMutation) EdgeCleared(name string) bool
- func (c *RecordMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *RecordMutation) Field(name string) (ent.Value, bool)
- func (m *RecordMutation) FieldCleared(name string) bool
- func (m *RecordMutation) Fields() []string
- func (m *RecordMutation) ID() (id int64, exists bool)
- func (m *RecordMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *RecordMutation) ItemCleared() bool
- func (m *RecordMutation) ItemID() (r int64, exists bool)
- func (m *RecordMutation) ItemIDs() (ids []int64)
- func (m *RecordMutation) Metadata() (r string, exists bool)
- func (m *RecordMutation) MetadataCleared() bool
- func (m *RecordMutation) MetadataFormatCleared() bool
- func (m *RecordMutation) MetadataFormatID() (r int64, exists bool)
- func (m *RecordMutation) MetadataFormatIDs() (ids []int64)
- func (m *RecordMutation) OldDatestamp(ctx context.Context) (v time.Time, err error)
- func (m *RecordMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RecordMutation) OldItemID(ctx context.Context) (v int64, err error)
- func (m *RecordMutation) OldMetadata(ctx context.Context) (v *string, err error)
- func (m *RecordMutation) OldMetadataFormatID(ctx context.Context) (v int64, err error)
- func (m *RecordMutation) Op() Op
- func (c *RecordMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *RecordMutation) RemovedEdges() []string
- func (m *RecordMutation) RemovedIDs(name string) []ent.Value
- func (m *RecordMutation) ResetDatestamp()
- func (m *RecordMutation) ResetEdge(name string) error
- func (m *RecordMutation) ResetField(name string) error
- func (m *RecordMutation) ResetItem()
- func (m *RecordMutation) ResetItemID()
- func (m *RecordMutation) ResetMetadata()
- func (m *RecordMutation) ResetMetadataFormat()
- func (m *RecordMutation) ResetMetadataFormatID()
- func (m *RecordMutation) SetDatestamp(t time.Time)
- func (m *RecordMutation) SetField(name string, value ent.Value) error
- func (m *RecordMutation) SetID(id int64)
- func (m *RecordMutation) SetItemID(i int64)
- func (m *RecordMutation) SetMetadata(s string)
- func (m *RecordMutation) SetMetadataFormatID(i int64)
- func (m *RecordMutation) SetOp(op Op)
- func (m RecordMutation) Tx() (*Tx, error)
- func (m *RecordMutation) Type() string
- func (m *RecordMutation) Where(ps ...predicate.Record)
- func (m *RecordMutation) WhereP(ps ...func(*sql.Selector))
- type RecordQuery
- func (rq *RecordQuery) Aggregate(fns ...AggregateFunc) *RecordSelect
- func (rq *RecordQuery) All(ctx context.Context) ([]*Record, error)
- func (rq *RecordQuery) AllX(ctx context.Context) []*Record
- func (rq *RecordQuery) Clone() *RecordQuery
- func (rq *RecordQuery) Count(ctx context.Context) (int, error)
- func (rq *RecordQuery) CountX(ctx context.Context) int
- func (c *RecordQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (rq *RecordQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RecordQuery) ExistX(ctx context.Context) bool
- func (rq *RecordQuery) First(ctx context.Context) (*Record, error)
- func (rq *RecordQuery) FirstID(ctx context.Context) (id int64, err error)
- func (rq *RecordQuery) FirstIDX(ctx context.Context) int64
- func (rq *RecordQuery) FirstX(ctx context.Context) *Record
- func (rq *RecordQuery) GroupBy(field string, fields ...string) *RecordGroupBy
- func (rq *RecordQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (rq *RecordQuery) IDsX(ctx context.Context) []int64
- func (rq *RecordQuery) Limit(limit int) *RecordQuery
- func (rq *RecordQuery) Offset(offset int) *RecordQuery
- func (rq *RecordQuery) Only(ctx context.Context) (*Record, error)
- func (rq *RecordQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (rq *RecordQuery) OnlyIDX(ctx context.Context) int64
- func (rq *RecordQuery) OnlyX(ctx context.Context) *Record
- func (rq *RecordQuery) Order(o ...record.OrderOption) *RecordQuery
- func (c *RecordQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (rq *RecordQuery) QueryItem() *ItemQuery
- func (rq *RecordQuery) QueryMetadataFormat() *MetadataFormatQuery
- func (rq *RecordQuery) Select(fields ...string) *RecordSelect
- func (rq *RecordQuery) Unique(unique bool) *RecordQuery
- func (rq *RecordQuery) Where(ps ...predicate.Record) *RecordQuery
- func (rq *RecordQuery) WithItem(opts ...func(*ItemQuery)) *RecordQuery
- func (rq *RecordQuery) WithMetadataFormat(opts ...func(*MetadataFormatQuery)) *RecordQuery
- type RecordSelect
- func (rs *RecordSelect) Aggregate(fns ...AggregateFunc) *RecordSelect
- func (s *RecordSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RecordSelect) BoolX(ctx context.Context) bool
- func (s *RecordSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RecordSelect) BoolsX(ctx context.Context) []bool
- func (c RecordSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *RecordSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RecordSelect) Float64X(ctx context.Context) float64
- func (s *RecordSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RecordSelect) Float64sX(ctx context.Context) []float64
- func (s *RecordSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RecordSelect) IntX(ctx context.Context) int
- func (s *RecordSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RecordSelect) IntsX(ctx context.Context) []int
- func (c RecordSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (rs *RecordSelect) Scan(ctx context.Context, v any) error
- func (s *RecordSelect) ScanX(ctx context.Context, v any)
- func (s *RecordSelect) String(ctx context.Context) (_ string, err error)
- func (s *RecordSelect) StringX(ctx context.Context) string
- func (s *RecordSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RecordSelect) StringsX(ctx context.Context) []string
- type RecordUpdate
- func (ru *RecordUpdate) ClearItem() *RecordUpdate
- func (ru *RecordUpdate) ClearMetadata() *RecordUpdate
- func (ru *RecordUpdate) ClearMetadataFormat() *RecordUpdate
- func (ru *RecordUpdate) Exec(ctx context.Context) error
- func (c *RecordUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ru *RecordUpdate) ExecX(ctx context.Context)
- func (ru *RecordUpdate) Mutation() *RecordMutation
- func (c *RecordUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ru *RecordUpdate) Save(ctx context.Context) (int, error)
- func (ru *RecordUpdate) SaveX(ctx context.Context) int
- func (ru *RecordUpdate) SetDatestamp(t time.Time) *RecordUpdate
- func (ru *RecordUpdate) SetItem(i *Item) *RecordUpdate
- func (ru *RecordUpdate) SetItemID(i int64) *RecordUpdate
- func (ru *RecordUpdate) SetMetadata(s string) *RecordUpdate
- func (ru *RecordUpdate) SetMetadataFormat(m *MetadataFormat) *RecordUpdate
- func (ru *RecordUpdate) SetMetadataFormatID(i int64) *RecordUpdate
- func (ru *RecordUpdate) SetNillableDatestamp(t *time.Time) *RecordUpdate
- func (ru *RecordUpdate) SetNillableMetadata(s *string) *RecordUpdate
- func (ru *RecordUpdate) Where(ps ...predicate.Record) *RecordUpdate
- type RecordUpdateOne
- func (ruo *RecordUpdateOne) ClearItem() *RecordUpdateOne
- func (ruo *RecordUpdateOne) ClearMetadata() *RecordUpdateOne
- func (ruo *RecordUpdateOne) ClearMetadataFormat() *RecordUpdateOne
- func (ruo *RecordUpdateOne) Exec(ctx context.Context) error
- func (c *RecordUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ruo *RecordUpdateOne) ExecX(ctx context.Context)
- func (ruo *RecordUpdateOne) Mutation() *RecordMutation
- func (c *RecordUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ruo *RecordUpdateOne) Save(ctx context.Context) (*Record, error)
- func (ruo *RecordUpdateOne) SaveX(ctx context.Context) *Record
- func (ruo *RecordUpdateOne) Select(field string, fields ...string) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetDatestamp(t time.Time) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetItem(i *Item) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetItemID(i int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetMetadata(s string) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetMetadataFormat(m *MetadataFormat) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetMetadataFormatID(i int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetNillableDatestamp(t *time.Time) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetNillableMetadata(s *string) *RecordUpdateOne
- func (ruo *RecordUpdateOne) Where(ps ...predicate.Record) *RecordUpdateOne
- type RecordUpsert
- func (u *RecordUpsert) ClearMetadata() *RecordUpsert
- func (u *RecordUpsert) SetDatestamp(v time.Time) *RecordUpsert
- func (u *RecordUpsert) SetItemID(v int64) *RecordUpsert
- func (u *RecordUpsert) SetMetadata(v string) *RecordUpsert
- func (u *RecordUpsert) SetMetadataFormatID(v int64) *RecordUpsert
- func (u *RecordUpsert) UpdateDatestamp() *RecordUpsert
- func (u *RecordUpsert) UpdateItemID() *RecordUpsert
- func (u *RecordUpsert) UpdateMetadata() *RecordUpsert
- func (u *RecordUpsert) UpdateMetadataFormatID() *RecordUpsert
- type RecordUpsertBulk
- func (u *RecordUpsertBulk) ClearMetadata() *RecordUpsertBulk
- func (u *RecordUpsertBulk) DoNothing() *RecordUpsertBulk
- func (u *RecordUpsertBulk) Exec(ctx context.Context) error
- func (u *RecordUpsertBulk) ExecX(ctx context.Context)
- func (u *RecordUpsertBulk) Ignore() *RecordUpsertBulk
- func (u *RecordUpsertBulk) SetDatestamp(v time.Time) *RecordUpsertBulk
- func (u *RecordUpsertBulk) SetItemID(v int64) *RecordUpsertBulk
- func (u *RecordUpsertBulk) SetMetadata(v string) *RecordUpsertBulk
- func (u *RecordUpsertBulk) SetMetadataFormatID(v int64) *RecordUpsertBulk
- func (u *RecordUpsertBulk) Update(set func(*RecordUpsert)) *RecordUpsertBulk
- func (u *RecordUpsertBulk) UpdateDatestamp() *RecordUpsertBulk
- func (u *RecordUpsertBulk) UpdateItemID() *RecordUpsertBulk
- func (u *RecordUpsertBulk) UpdateMetadata() *RecordUpsertBulk
- func (u *RecordUpsertBulk) UpdateMetadataFormatID() *RecordUpsertBulk
- func (u *RecordUpsertBulk) UpdateNewValues() *RecordUpsertBulk
- type RecordUpsertOne
- func (u *RecordUpsertOne) ClearMetadata() *RecordUpsertOne
- func (u *RecordUpsertOne) DoNothing() *RecordUpsertOne
- func (u *RecordUpsertOne) Exec(ctx context.Context) error
- func (u *RecordUpsertOne) ExecX(ctx context.Context)
- func (u *RecordUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *RecordUpsertOne) IDX(ctx context.Context) int64
- func (u *RecordUpsertOne) Ignore() *RecordUpsertOne
- func (u *RecordUpsertOne) SetDatestamp(v time.Time) *RecordUpsertOne
- func (u *RecordUpsertOne) SetItemID(v int64) *RecordUpsertOne
- func (u *RecordUpsertOne) SetMetadata(v string) *RecordUpsertOne
- func (u *RecordUpsertOne) SetMetadataFormatID(v int64) *RecordUpsertOne
- func (u *RecordUpsertOne) Update(set func(*RecordUpsert)) *RecordUpsertOne
- func (u *RecordUpsertOne) UpdateDatestamp() *RecordUpsertOne
- func (u *RecordUpsertOne) UpdateItemID() *RecordUpsertOne
- func (u *RecordUpsertOne) UpdateMetadata() *RecordUpsertOne
- func (u *RecordUpsertOne) UpdateMetadataFormatID() *RecordUpsertOne
- func (u *RecordUpsertOne) UpdateNewValues() *RecordUpsertOne
- type Records
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Set
- func (c *Set) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Set) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (s *Set) QueryItems() *ItemQuery
- func (s *Set) String() string
- func (s *Set) Unwrap() *Set
- func (s *Set) Update() *SetUpdateOne
- func (s *Set) Value(name string) (ent.Value, error)
- 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 int64) *SetDeleteOne
- func (c *SetClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *SetClient) Get(ctx context.Context, id int64) (*Set, error)
- func (c *SetClient) GetX(ctx context.Context, id int64) *Set
- func (c *SetClient) Hooks() []Hook
- func (c *SetClient) Intercept(interceptors ...Interceptor)
- func (c *SetClient) Interceptors() []Interceptor
- func (c *SetClient) Query() *SetQuery
- func (c *SetClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *SetClient) QueryItems(s *Set) *ItemQuery
- func (c *SetClient) Update() *SetUpdate
- func (c *SetClient) UpdateOne(s *Set) *SetUpdateOne
- func (c *SetClient) UpdateOneID(id int64) *SetUpdateOne
- func (c *SetClient) Use(hooks ...Hook)
- type SetCreate
- func (sc *SetCreate) AddItemIDs(ids ...int64) *SetCreate
- func (sc *SetCreate) AddItems(i ...*Item) *SetCreate
- func (sc *SetCreate) Exec(ctx context.Context) error
- func (c *SetCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sc *SetCreate) ExecX(ctx context.Context)
- func (sc *SetCreate) Mutation() *SetMutation
- func (sc *SetCreate) OnConflict(opts ...sql.ConflictOption) *SetUpsertOne
- func (sc *SetCreate) OnConflictColumns(columns ...string) *SetUpsertOne
- func (c *SetCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sc *SetCreate) Save(ctx context.Context) (*Set, error)
- func (sc *SetCreate) SaveX(ctx context.Context) *Set
- func (sc *SetCreate) SetDescription(s string) *SetCreate
- func (sc *SetCreate) SetID(i int64) *SetCreate
- func (sc *SetCreate) SetName(s string) *SetCreate
- func (sc *SetCreate) SetNillableDescription(s *string) *SetCreate
- func (sc *SetCreate) SetSpec(s string) *SetCreate
- type SetCreateBulk
- func (scb *SetCreateBulk) Exec(ctx context.Context) error
- func (c *SetCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (scb *SetCreateBulk) ExecX(ctx context.Context)
- func (scb *SetCreateBulk) OnConflict(opts ...sql.ConflictOption) *SetUpsertBulk
- func (scb *SetCreateBulk) OnConflictColumns(columns ...string) *SetUpsertBulk
- func (c *SetCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (scb *SetCreateBulk) Save(ctx context.Context) ([]*Set, error)
- func (scb *SetCreateBulk) SaveX(ctx context.Context) []*Set
- type SetDelete
- func (sd *SetDelete) Exec(ctx context.Context) (int, error)
- func (c *SetDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sd *SetDelete) ExecX(ctx context.Context) int
- func (c *SetDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sd *SetDelete) Where(ps ...predicate.Set) *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) AddItemIDs(ids ...int64)
- 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) ClearDescription()
- func (m *SetMutation) ClearEdge(name string) error
- func (m *SetMutation) ClearField(name string) error
- func (m *SetMutation) ClearItems()
- func (m *SetMutation) ClearedEdges() []string
- func (m *SetMutation) ClearedFields() []string
- func (m SetMutation) Client() *Client
- func (m *SetMutation) Description() (r string, exists bool)
- func (m *SetMutation) DescriptionCleared() bool
- func (m *SetMutation) EdgeCleared(name string) bool
- func (c *SetMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 int64, exists bool)
- func (m *SetMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *SetMutation) ItemsCleared() bool
- func (m *SetMutation) ItemsIDs() (ids []int64)
- func (m *SetMutation) Name() (r string, exists bool)
- func (m *SetMutation) OldDescription(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) OldSpec(ctx context.Context) (v string, err error)
- func (m *SetMutation) Op() Op
- func (c *SetMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *SetMutation) RemoveItemIDs(ids ...int64)
- func (m *SetMutation) RemovedEdges() []string
- func (m *SetMutation) RemovedIDs(name string) []ent.Value
- func (m *SetMutation) RemovedItemsIDs() (ids []int64)
- func (m *SetMutation) ResetDescription()
- func (m *SetMutation) ResetEdge(name string) error
- func (m *SetMutation) ResetField(name string) error
- func (m *SetMutation) ResetItems()
- func (m *SetMutation) ResetName()
- func (m *SetMutation) ResetSpec()
- func (m *SetMutation) SetDescription(s string)
- func (m *SetMutation) SetField(name string, value ent.Value) error
- func (m *SetMutation) SetID(id int64)
- func (m *SetMutation) SetName(s string)
- func (m *SetMutation) SetOp(op Op)
- func (m *SetMutation) SetSpec(s string)
- func (m *SetMutation) Spec() (r string, exists bool)
- 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 (c *SetQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 int64, err error)
- func (sq *SetQuery) FirstIDX(ctx context.Context) int64
- 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 []int64, err error)
- func (sq *SetQuery) IDsX(ctx context.Context) []int64
- 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 int64, err error)
- func (sq *SetQuery) OnlyIDX(ctx context.Context) int64
- func (sq *SetQuery) OnlyX(ctx context.Context) *Set
- func (sq *SetQuery) Order(o ...set.OrderOption) *SetQuery
- func (c *SetQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sq *SetQuery) QueryItems() *ItemQuery
- 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) WithItems(opts ...func(*ItemQuery)) *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 (c SetSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 (c SetSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- 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) AddItemIDs(ids ...int64) *SetUpdate
- func (su *SetUpdate) AddItems(i ...*Item) *SetUpdate
- func (su *SetUpdate) ClearDescription() *SetUpdate
- func (su *SetUpdate) ClearItems() *SetUpdate
- func (su *SetUpdate) Exec(ctx context.Context) error
- func (c *SetUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (su *SetUpdate) ExecX(ctx context.Context)
- func (su *SetUpdate) Mutation() *SetMutation
- func (c *SetUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (su *SetUpdate) RemoveItemIDs(ids ...int64) *SetUpdate
- func (su *SetUpdate) RemoveItems(i ...*Item) *SetUpdate
- func (su *SetUpdate) Save(ctx context.Context) (int, error)
- func (su *SetUpdate) SaveX(ctx context.Context) int
- func (su *SetUpdate) SetDescription(s string) *SetUpdate
- func (su *SetUpdate) SetName(s string) *SetUpdate
- func (su *SetUpdate) SetNillableDescription(s *string) *SetUpdate
- func (su *SetUpdate) SetSpec(s string) *SetUpdate
- func (su *SetUpdate) Where(ps ...predicate.Set) *SetUpdate
- type SetUpdateOne
- func (suo *SetUpdateOne) AddItemIDs(ids ...int64) *SetUpdateOne
- func (suo *SetUpdateOne) AddItems(i ...*Item) *SetUpdateOne
- func (suo *SetUpdateOne) ClearDescription() *SetUpdateOne
- func (suo *SetUpdateOne) ClearItems() *SetUpdateOne
- func (suo *SetUpdateOne) Exec(ctx context.Context) error
- func (c *SetUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (suo *SetUpdateOne) ExecX(ctx context.Context)
- func (suo *SetUpdateOne) Mutation() *SetMutation
- func (c *SetUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (suo *SetUpdateOne) RemoveItemIDs(ids ...int64) *SetUpdateOne
- func (suo *SetUpdateOne) RemoveItems(i ...*Item) *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) SetDescription(s string) *SetUpdateOne
- func (suo *SetUpdateOne) SetName(s string) *SetUpdateOne
- func (suo *SetUpdateOne) SetNillableDescription(s *string) *SetUpdateOne
- func (suo *SetUpdateOne) SetSpec(s string) *SetUpdateOne
- func (suo *SetUpdateOne) Where(ps ...predicate.Set) *SetUpdateOne
- type SetUpsert
- func (u *SetUpsert) ClearDescription() *SetUpsert
- func (u *SetUpsert) SetDescription(v string) *SetUpsert
- func (u *SetUpsert) SetName(v string) *SetUpsert
- func (u *SetUpsert) SetSpec(v string) *SetUpsert
- func (u *SetUpsert) UpdateDescription() *SetUpsert
- func (u *SetUpsert) UpdateName() *SetUpsert
- func (u *SetUpsert) UpdateSpec() *SetUpsert
- type SetUpsertBulk
- func (u *SetUpsertBulk) ClearDescription() *SetUpsertBulk
- func (u *SetUpsertBulk) DoNothing() *SetUpsertBulk
- func (u *SetUpsertBulk) Exec(ctx context.Context) error
- func (u *SetUpsertBulk) ExecX(ctx context.Context)
- func (u *SetUpsertBulk) Ignore() *SetUpsertBulk
- func (u *SetUpsertBulk) SetDescription(v string) *SetUpsertBulk
- func (u *SetUpsertBulk) SetName(v string) *SetUpsertBulk
- func (u *SetUpsertBulk) SetSpec(v string) *SetUpsertBulk
- func (u *SetUpsertBulk) Update(set func(*SetUpsert)) *SetUpsertBulk
- func (u *SetUpsertBulk) UpdateDescription() *SetUpsertBulk
- func (u *SetUpsertBulk) UpdateName() *SetUpsertBulk
- func (u *SetUpsertBulk) UpdateNewValues() *SetUpsertBulk
- func (u *SetUpsertBulk) UpdateSpec() *SetUpsertBulk
- type SetUpsertOne
- func (u *SetUpsertOne) ClearDescription() *SetUpsertOne
- func (u *SetUpsertOne) DoNothing() *SetUpsertOne
- func (u *SetUpsertOne) Exec(ctx context.Context) error
- func (u *SetUpsertOne) ExecX(ctx context.Context)
- func (u *SetUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *SetUpsertOne) IDX(ctx context.Context) int64
- func (u *SetUpsertOne) Ignore() *SetUpsertOne
- func (u *SetUpsertOne) SetDescription(v string) *SetUpsertOne
- func (u *SetUpsertOne) SetName(v string) *SetUpsertOne
- func (u *SetUpsertOne) SetSpec(v string) *SetUpsertOne
- func (u *SetUpsertOne) Update(set func(*SetUpsert)) *SetUpsertOne
- func (u *SetUpsertOne) UpdateDescription() *SetUpsertOne
- func (u *SetUpsertOne) UpdateName() *SetUpsertOne
- func (u *SetUpsertOne) UpdateNewValues() *SetUpsertOne
- func (u *SetUpsertOne) UpdateSpec() *SetUpsertOne
- type Sets
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- 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. TypeItem = "Item" TypeMetadataFormat = "MetadataFormat" TypeRecord = "Record" TypeSet = "Set" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Item is the client for interacting with the Item builders. Item *ItemClient // MetadataFormat is the client for interacting with the MetadataFormat builders. MetadataFormat *MetadataFormatClient // Record is the client for interacting with the Record builders. Record *RecordClient // 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(). Item. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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(...)`.
func (*Client) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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 Item ¶
type Item struct { // ID of the ent. ID int64 `json:"id,omitempty"` // Identifier holds the value of the "identifier" field. Identifier string `json:"identifier,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ItemQuery when eager-loading is set. Edges ItemEdges `json:"edges"` // contains filtered or unexported fields }
Item is the model entity for the Item schema.
func (*Item) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Item) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Item) QueryRecords ¶
func (i *Item) QueryRecords() *RecordQuery
QueryRecords queries the "records" edge of the Item entity.
func (*Item) Unwrap ¶
Unwrap unwraps the Item 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 (*Item) Update ¶
func (i *Item) Update() *ItemUpdateOne
Update returns a builder for updating this Item. Note that you need to call Item.Unwrap() before calling this method if this Item was returned from a transaction, and the transaction was committed or rolled back.
type ItemClient ¶
type ItemClient struct {
// contains filtered or unexported fields
}
ItemClient is a client for the Item schema.
func NewItemClient ¶
func NewItemClient(c config) *ItemClient
NewItemClient returns a client for the Item from the given config.
func (*ItemClient) Create ¶
func (c *ItemClient) Create() *ItemCreate
Create returns a builder for creating a Item entity.
func (*ItemClient) CreateBulk ¶
func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
CreateBulk returns a builder for creating a bulk of Item entities.
func (*ItemClient) Delete ¶
func (c *ItemClient) Delete() *ItemDelete
Delete returns a delete builder for Item.
func (*ItemClient) DeleteOne ¶
func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ItemClient) DeleteOneID ¶
func (c *ItemClient) DeleteOneID(id int64) *ItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ItemClient) ExecContext ¶
func (c *ItemClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ItemClient) GetX ¶
func (c *ItemClient) GetX(ctx context.Context, id int64) *Item
GetX is like Get, but panics if an error occurs.
func (*ItemClient) Intercept ¶
func (c *ItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `item.Intercept(f(g(h())))`.
func (*ItemClient) Interceptors ¶
func (c *ItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ItemClient) Query ¶
func (c *ItemClient) Query() *ItemQuery
Query returns a query builder for Item.
func (*ItemClient) QueryContext ¶
func (c *ItemClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ItemClient) QueryRecords ¶
func (c *ItemClient) QueryRecords(i *Item) *RecordQuery
QueryRecords queries the records edge of a Item.
func (*ItemClient) QuerySets ¶
func (c *ItemClient) QuerySets(i *Item) *SetQuery
QuerySets queries the sets edge of a Item.
func (*ItemClient) Update ¶
func (c *ItemClient) Update() *ItemUpdate
Update returns an update builder for Item.
func (*ItemClient) UpdateOne ¶
func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ItemClient) UpdateOneID ¶
func (c *ItemClient) UpdateOneID(id int64) *ItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ItemClient) Use ¶
func (c *ItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `item.Hooks(f(g(h())))`.
type ItemCreate ¶
type ItemCreate struct {
// contains filtered or unexported fields
}
ItemCreate is the builder for creating a Item entity.
func (*ItemCreate) AddRecordIDs ¶
func (ic *ItemCreate) AddRecordIDs(ids ...int64) *ItemCreate
AddRecordIDs adds the "records" edge to the Record entity by IDs.
func (*ItemCreate) AddRecords ¶
func (ic *ItemCreate) AddRecords(r ...*Record) *ItemCreate
AddRecords adds the "records" edges to the Record entity.
func (*ItemCreate) AddSetIDs ¶
func (ic *ItemCreate) AddSetIDs(ids ...int64) *ItemCreate
AddSetIDs adds the "sets" edge to the Set entity by IDs.
func (*ItemCreate) AddSets ¶
func (ic *ItemCreate) AddSets(s ...*Set) *ItemCreate
AddSets adds the "sets" edges to the Set entity.
func (*ItemCreate) Exec ¶
func (ic *ItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreate) ExecContext ¶
func (c *ItemCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ItemCreate) ExecX ¶
func (ic *ItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemCreate) Mutation ¶
func (ic *ItemCreate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemCreate) OnConflict ¶
func (ic *ItemCreate) OnConflict(opts ...sql.ConflictOption) *ItemUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Item.Create(). SetIdentifier(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ItemUpsert) { SetIdentifier(v+v). }). Exec(ctx)
func (*ItemCreate) OnConflictColumns ¶
func (ic *ItemCreate) OnConflictColumns(columns ...string) *ItemUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Item.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ItemCreate) QueryContext ¶
func (c *ItemCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ItemCreate) Save ¶
func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
Save creates the Item in the database.
func (*ItemCreate) SaveX ¶
func (ic *ItemCreate) SaveX(ctx context.Context) *Item
SaveX calls Save and panics if Save returns an error.
func (*ItemCreate) SetID ¶
func (ic *ItemCreate) SetID(i int64) *ItemCreate
SetID sets the "id" field.
func (*ItemCreate) SetIdentifier ¶
func (ic *ItemCreate) SetIdentifier(s string) *ItemCreate
SetIdentifier sets the "identifier" field.
type ItemCreateBulk ¶
type ItemCreateBulk struct {
// contains filtered or unexported fields
}
ItemCreateBulk is the builder for creating many Item entities in bulk.
func (*ItemCreateBulk) Exec ¶
func (icb *ItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreateBulk) ExecContext ¶
func (c *ItemCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ItemCreateBulk) ExecX ¶
func (icb *ItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemCreateBulk) OnConflict ¶
func (icb *ItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *ItemUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Item.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ItemUpsert) { SetIdentifier(v+v). }). Exec(ctx)
func (*ItemCreateBulk) OnConflictColumns ¶
func (icb *ItemCreateBulk) OnConflictColumns(columns ...string) *ItemUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Item.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ItemCreateBulk) QueryContext ¶
func (c *ItemCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type ItemDelete ¶
type ItemDelete struct {
// contains filtered or unexported fields
}
ItemDelete is the builder for deleting a Item entity.
func (*ItemDelete) Exec ¶
func (id *ItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ItemDelete) ExecContext ¶
func (c *ItemDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ItemDelete) ExecX ¶
func (id *ItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ItemDelete) QueryContext ¶
func (c *ItemDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ItemDelete) Where ¶
func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete
Where appends a list predicates to the ItemDelete builder.
type ItemDeleteOne ¶
type ItemDeleteOne struct {
// contains filtered or unexported fields
}
ItemDeleteOne is the builder for deleting a single Item entity.
func (*ItemDeleteOne) Exec ¶
func (ido *ItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ItemDeleteOne) ExecX ¶
func (ido *ItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemDeleteOne) Where ¶
func (ido *ItemDeleteOne) Where(ps ...predicate.Item) *ItemDeleteOne
Where appends a list predicates to the ItemDelete builder.
type ItemEdges ¶
type ItemEdges struct { // Records holds the value of the records edge. Records []*Record `json:"records,omitempty"` // Sets holds the value of the sets edge. Sets []*Set `json:"sets,omitempty"` // contains filtered or unexported fields }
ItemEdges holds the relations/edges for other nodes in the graph.
func (ItemEdges) RecordsOrErr ¶
RecordsOrErr returns the Records value or an error if the edge was not loaded in eager-loading.
type ItemGroupBy ¶
type ItemGroupBy struct {
// contains filtered or unexported fields
}
ItemGroupBy is the group-by builder for Item entities.
func (*ItemGroupBy) Aggregate ¶
func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Scan ¶
func (igb *ItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemMutation ¶
type ItemMutation struct {
// contains filtered or unexported fields
}
ItemMutation represents an operation that mutates the Item nodes in the graph.
func (*ItemMutation) AddField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddRecordIDs ¶
func (m *ItemMutation) AddRecordIDs(ids ...int64)
AddRecordIDs adds the "records" edge to the Record entity by ids.
func (*ItemMutation) AddSetIDs ¶
func (m *ItemMutation) AddSetIDs(ids ...int64)
AddSetIDs adds the "sets" edge to the Set entity by ids.
func (*ItemMutation) AddedEdges ¶
func (m *ItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ItemMutation) AddedField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddedFields ¶
func (m *ItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ItemMutation) AddedIDs ¶
func (m *ItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ItemMutation) ClearEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearField ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearRecords ¶
func (m *ItemMutation) ClearRecords()
ClearRecords clears the "records" edge to the Record entity.
func (*ItemMutation) ClearSets ¶
func (m *ItemMutation) ClearSets()
ClearSets clears the "sets" edge to the Set entity.
func (*ItemMutation) ClearedEdges ¶
func (m *ItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ItemMutation) ClearedFields ¶
func (m *ItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ItemMutation) Client ¶
func (m ItemMutation) 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 (*ItemMutation) EdgeCleared ¶
func (m *ItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ItemMutation) ExecContext ¶
func (c *ItemMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ItemMutation) Field ¶
func (m *ItemMutation) 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 (*ItemMutation) FieldCleared ¶
func (m *ItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ItemMutation) Fields ¶
func (m *ItemMutation) 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 (*ItemMutation) ID ¶
func (m *ItemMutation) ID() (id int64, 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 (*ItemMutation) IDs ¶
func (m *ItemMutation) IDs(ctx context.Context) ([]int64, 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 (*ItemMutation) Identifier ¶
func (m *ItemMutation) Identifier() (r string, exists bool)
Identifier returns the value of the "identifier" field in the mutation.
func (*ItemMutation) 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 (*ItemMutation) OldIdentifier ¶
func (m *ItemMutation) OldIdentifier(ctx context.Context) (v string, err error)
OldIdentifier returns the old "identifier" field's value of the Item entity. If the Item 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 (*ItemMutation) QueryContext ¶
func (c *ItemMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ItemMutation) RecordsCleared ¶
func (m *ItemMutation) RecordsCleared() bool
RecordsCleared reports if the "records" edge to the Record entity was cleared.
func (*ItemMutation) RecordsIDs ¶
func (m *ItemMutation) RecordsIDs() (ids []int64)
RecordsIDs returns the "records" edge IDs in the mutation.
func (*ItemMutation) RemoveRecordIDs ¶
func (m *ItemMutation) RemoveRecordIDs(ids ...int64)
RemoveRecordIDs removes the "records" edge to the Record entity by IDs.
func (*ItemMutation) RemoveSetIDs ¶
func (m *ItemMutation) RemoveSetIDs(ids ...int64)
RemoveSetIDs removes the "sets" edge to the Set entity by IDs.
func (*ItemMutation) RemovedEdges ¶
func (m *ItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ItemMutation) RemovedIDs ¶
func (m *ItemMutation) 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 (*ItemMutation) RemovedRecordsIDs ¶
func (m *ItemMutation) RemovedRecordsIDs() (ids []int64)
RemovedRecords returns the removed IDs of the "records" edge to the Record entity.
func (*ItemMutation) RemovedSetsIDs ¶
func (m *ItemMutation) RemovedSetsIDs() (ids []int64)
RemovedSets returns the removed IDs of the "sets" edge to the Set entity.
func (*ItemMutation) ResetEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetField ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetIdentifier ¶
func (m *ItemMutation) ResetIdentifier()
ResetIdentifier resets all changes to the "identifier" field.
func (*ItemMutation) ResetRecords ¶
func (m *ItemMutation) ResetRecords()
ResetRecords resets all changes to the "records" edge.
func (*ItemMutation) ResetSets ¶
func (m *ItemMutation) ResetSets()
ResetSets resets all changes to the "sets" edge.
func (*ItemMutation) SetField ¶
func (m *ItemMutation) 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 (*ItemMutation) SetID ¶
func (m *ItemMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Item entities.
func (*ItemMutation) SetIdentifier ¶
func (m *ItemMutation) SetIdentifier(s string)
SetIdentifier sets the "identifier" field.
func (*ItemMutation) SetOp ¶
func (m *ItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ItemMutation) SetsCleared ¶
func (m *ItemMutation) SetsCleared() bool
SetsCleared reports if the "sets" edge to the Set entity was cleared.
func (*ItemMutation) SetsIDs ¶
func (m *ItemMutation) SetsIDs() (ids []int64)
SetsIDs returns the "sets" edge IDs in the mutation.
func (ItemMutation) Tx ¶
func (m ItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ItemMutation) Type ¶
func (m *ItemMutation) Type() string
Type returns the node type of this mutation (Item).
func (*ItemMutation) Where ¶
func (m *ItemMutation) Where(ps ...predicate.Item)
Where appends a list predicates to the ItemMutation builder.
func (*ItemMutation) WhereP ¶
func (m *ItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ItemQuery ¶
type ItemQuery struct {
// contains filtered or unexported fields
}
ItemQuery is the builder for querying Item entities.
func (*ItemQuery) Aggregate ¶
func (iq *ItemQuery) Aggregate(fns ...AggregateFunc) *ItemSelect
Aggregate returns a ItemSelect configured with the given aggregations.
func (*ItemQuery) Clone ¶
Clone returns a duplicate of the ItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ItemQuery) ExecContext ¶
func (c *ItemQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ItemQuery) First ¶
First returns the first Item entity from the query. Returns a *NotFoundError when no Item was found.
func (*ItemQuery) FirstID ¶
FirstID returns the first Item ID from the query. Returns a *NotFoundError when no Item ID was found.
func (*ItemQuery) GroupBy ¶
func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
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 { Identifier string `json:"identifier,omitempty"` Count int `json:"count,omitempty"` } client.Item.Query(). GroupBy(item.FieldIdentifier). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ItemQuery) Only ¶
Only returns a single Item entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Item entity is found. Returns a *NotFoundError when no Item entities are found.
func (*ItemQuery) OnlyID ¶
OnlyID is like Only, but returns the only Item ID in the query. Returns a *NotSingularError when more than one Item ID is found. Returns a *NotFoundError when no entities are found.
func (*ItemQuery) Order ¶
func (iq *ItemQuery) Order(o ...item.OrderOption) *ItemQuery
Order specifies how the records should be ordered.
func (*ItemQuery) QueryContext ¶
func (c *ItemQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ItemQuery) QueryRecords ¶
func (iq *ItemQuery) QueryRecords() *RecordQuery
QueryRecords chains the current query on the "records" edge.
func (*ItemQuery) Select ¶
func (iq *ItemQuery) Select(fields ...string) *ItemSelect
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 { Identifier string `json:"identifier,omitempty"` } client.Item.Query(). Select(item.FieldIdentifier). Scan(ctx, &v)
func (*ItemQuery) 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 (*ItemQuery) WithRecords ¶
func (iq *ItemQuery) WithRecords(opts ...func(*RecordQuery)) *ItemQuery
WithRecords tells the query-builder to eager-load the nodes that are connected to the "records" edge. The optional arguments are used to configure the query builder of the edge.
type ItemSelect ¶
type ItemSelect struct { *ItemQuery // contains filtered or unexported fields }
ItemSelect is the builder for selecting fields of Item entities.
func (*ItemSelect) Aggregate ¶
func (is *ItemSelect) Aggregate(fns ...AggregateFunc) *ItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (ItemSelect) ExecContext ¶
func (c ItemSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (ItemSelect) QueryContext ¶
func (c ItemSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ItemSelect) Scan ¶
func (is *ItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemUpdate ¶
type ItemUpdate struct {
// contains filtered or unexported fields
}
ItemUpdate is the builder for updating Item entities.
func (*ItemUpdate) AddRecordIDs ¶
func (iu *ItemUpdate) AddRecordIDs(ids ...int64) *ItemUpdate
AddRecordIDs adds the "records" edge to the Record entity by IDs.
func (*ItemUpdate) AddRecords ¶
func (iu *ItemUpdate) AddRecords(r ...*Record) *ItemUpdate
AddRecords adds the "records" edges to the Record entity.
func (*ItemUpdate) AddSetIDs ¶
func (iu *ItemUpdate) AddSetIDs(ids ...int64) *ItemUpdate
AddSetIDs adds the "sets" edge to the Set entity by IDs.
func (*ItemUpdate) AddSets ¶
func (iu *ItemUpdate) AddSets(s ...*Set) *ItemUpdate
AddSets adds the "sets" edges to the Set entity.
func (*ItemUpdate) ClearRecords ¶
func (iu *ItemUpdate) ClearRecords() *ItemUpdate
ClearRecords clears all "records" edges to the Record entity.
func (*ItemUpdate) ClearSets ¶
func (iu *ItemUpdate) ClearSets() *ItemUpdate
ClearSets clears all "sets" edges to the Set entity.
func (*ItemUpdate) Exec ¶
func (iu *ItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemUpdate) ExecContext ¶
func (c *ItemUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ItemUpdate) ExecX ¶
func (iu *ItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdate) Mutation ¶
func (iu *ItemUpdate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdate) QueryContext ¶
func (c *ItemUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ItemUpdate) RemoveRecordIDs ¶
func (iu *ItemUpdate) RemoveRecordIDs(ids ...int64) *ItemUpdate
RemoveRecordIDs removes the "records" edge to Record entities by IDs.
func (*ItemUpdate) RemoveRecords ¶
func (iu *ItemUpdate) RemoveRecords(r ...*Record) *ItemUpdate
RemoveRecords removes "records" edges to Record entities.
func (*ItemUpdate) RemoveSetIDs ¶
func (iu *ItemUpdate) RemoveSetIDs(ids ...int64) *ItemUpdate
RemoveSetIDs removes the "sets" edge to Set entities by IDs.
func (*ItemUpdate) RemoveSets ¶
func (iu *ItemUpdate) RemoveSets(s ...*Set) *ItemUpdate
RemoveSets removes "sets" edges to Set entities.
func (*ItemUpdate) Save ¶
func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ItemUpdate) SaveX ¶
func (iu *ItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdate) SetIdentifier ¶
func (iu *ItemUpdate) SetIdentifier(s string) *ItemUpdate
SetIdentifier sets the "identifier" field.
func (*ItemUpdate) Where ¶
func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
Where appends a list predicates to the ItemUpdate builder.
type ItemUpdateOne ¶
type ItemUpdateOne struct {
// contains filtered or unexported fields
}
ItemUpdateOne is the builder for updating a single Item entity.
func (*ItemUpdateOne) AddRecordIDs ¶
func (iuo *ItemUpdateOne) AddRecordIDs(ids ...int64) *ItemUpdateOne
AddRecordIDs adds the "records" edge to the Record entity by IDs.
func (*ItemUpdateOne) AddRecords ¶
func (iuo *ItemUpdateOne) AddRecords(r ...*Record) *ItemUpdateOne
AddRecords adds the "records" edges to the Record entity.
func (*ItemUpdateOne) AddSetIDs ¶
func (iuo *ItemUpdateOne) AddSetIDs(ids ...int64) *ItemUpdateOne
AddSetIDs adds the "sets" edge to the Set entity by IDs.
func (*ItemUpdateOne) AddSets ¶
func (iuo *ItemUpdateOne) AddSets(s ...*Set) *ItemUpdateOne
AddSets adds the "sets" edges to the Set entity.
func (*ItemUpdateOne) ClearRecords ¶
func (iuo *ItemUpdateOne) ClearRecords() *ItemUpdateOne
ClearRecords clears all "records" edges to the Record entity.
func (*ItemUpdateOne) ClearSets ¶
func (iuo *ItemUpdateOne) ClearSets() *ItemUpdateOne
ClearSets clears all "sets" edges to the Set entity.
func (*ItemUpdateOne) Exec ¶
func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ItemUpdateOne) ExecContext ¶
func (c *ItemUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ItemUpdateOne) ExecX ¶
func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdateOne) Mutation ¶
func (iuo *ItemUpdateOne) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdateOne) QueryContext ¶
func (c *ItemUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ItemUpdateOne) RemoveRecordIDs ¶
func (iuo *ItemUpdateOne) RemoveRecordIDs(ids ...int64) *ItemUpdateOne
RemoveRecordIDs removes the "records" edge to Record entities by IDs.
func (*ItemUpdateOne) RemoveRecords ¶
func (iuo *ItemUpdateOne) RemoveRecords(r ...*Record) *ItemUpdateOne
RemoveRecords removes "records" edges to Record entities.
func (*ItemUpdateOne) RemoveSetIDs ¶
func (iuo *ItemUpdateOne) RemoveSetIDs(ids ...int64) *ItemUpdateOne
RemoveSetIDs removes the "sets" edge to Set entities by IDs.
func (*ItemUpdateOne) RemoveSets ¶
func (iuo *ItemUpdateOne) RemoveSets(s ...*Set) *ItemUpdateOne
RemoveSets removes "sets" edges to Set entities.
func (*ItemUpdateOne) Save ¶
func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
Save executes the query and returns the updated Item entity.
func (*ItemUpdateOne) SaveX ¶
func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdateOne) Select ¶
func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ItemUpdateOne) SetIdentifier ¶
func (iuo *ItemUpdateOne) SetIdentifier(s string) *ItemUpdateOne
SetIdentifier sets the "identifier" field.
func (*ItemUpdateOne) Where ¶
func (iuo *ItemUpdateOne) Where(ps ...predicate.Item) *ItemUpdateOne
Where appends a list predicates to the ItemUpdate builder.
type ItemUpsert ¶
ItemUpsert is the "OnConflict" setter.
func (*ItemUpsert) SetIdentifier ¶
func (u *ItemUpsert) SetIdentifier(v string) *ItemUpsert
SetIdentifier sets the "identifier" field.
func (*ItemUpsert) UpdateIdentifier ¶
func (u *ItemUpsert) UpdateIdentifier() *ItemUpsert
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
type ItemUpsertBulk ¶
type ItemUpsertBulk struct {
// contains filtered or unexported fields
}
ItemUpsertBulk is the builder for "upsert"-ing a bulk of Item nodes.
func (*ItemUpsertBulk) DoNothing ¶
func (u *ItemUpsertBulk) DoNothing() *ItemUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ItemUpsertBulk) Exec ¶
func (u *ItemUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemUpsertBulk) ExecX ¶
func (u *ItemUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpsertBulk) Ignore ¶
func (u *ItemUpsertBulk) Ignore() *ItemUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Item.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ItemUpsertBulk) SetIdentifier ¶
func (u *ItemUpsertBulk) SetIdentifier(v string) *ItemUpsertBulk
SetIdentifier sets the "identifier" field.
func (*ItemUpsertBulk) Update ¶
func (u *ItemUpsertBulk) Update(set func(*ItemUpsert)) *ItemUpsertBulk
Update allows overriding fields `UPDATE` values. See the ItemCreateBulk.OnConflict documentation for more info.
func (*ItemUpsertBulk) UpdateIdentifier ¶
func (u *ItemUpsertBulk) UpdateIdentifier() *ItemUpsertBulk
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*ItemUpsertBulk) UpdateNewValues ¶
func (u *ItemUpsertBulk) UpdateNewValues() *ItemUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Item.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(item.FieldID) }), ). Exec(ctx)
type ItemUpsertOne ¶
type ItemUpsertOne struct {
// contains filtered or unexported fields
}
ItemUpsertOne is the builder for "upsert"-ing
one Item node.
func (*ItemUpsertOne) DoNothing ¶
func (u *ItemUpsertOne) DoNothing() *ItemUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ItemUpsertOne) Exec ¶
func (u *ItemUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemUpsertOne) ExecX ¶
func (u *ItemUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpsertOne) ID ¶
func (u *ItemUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ItemUpsertOne) IDX ¶
func (u *ItemUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*ItemUpsertOne) Ignore ¶
func (u *ItemUpsertOne) Ignore() *ItemUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Item.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ItemUpsertOne) SetIdentifier ¶
func (u *ItemUpsertOne) SetIdentifier(v string) *ItemUpsertOne
SetIdentifier sets the "identifier" field.
func (*ItemUpsertOne) Update ¶
func (u *ItemUpsertOne) Update(set func(*ItemUpsert)) *ItemUpsertOne
Update allows overriding fields `UPDATE` values. See the ItemCreate.OnConflict documentation for more info.
func (*ItemUpsertOne) UpdateIdentifier ¶
func (u *ItemUpsertOne) UpdateIdentifier() *ItemUpsertOne
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*ItemUpsertOne) UpdateNewValues ¶
func (u *ItemUpsertOne) UpdateNewValues() *ItemUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Item.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(item.FieldID) }), ). Exec(ctx)
type MetadataFormat ¶
type MetadataFormat struct { // ID of the ent. ID int64 `json:"id,omitempty"` // Prefix holds the value of the "prefix" field. Prefix string `json:"prefix,omitempty"` // Schema holds the value of the "schema" field. Schema string `json:"schema,omitempty"` // Namespace holds the value of the "namespace" field. Namespace string `json:"namespace,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MetadataFormatQuery when eager-loading is set. Edges MetadataFormatEdges `json:"edges"` // contains filtered or unexported fields }
MetadataFormat is the model entity for the MetadataFormat schema.
func (*MetadataFormat) ExecContext ¶
func (c *MetadataFormat) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormat) QueryContext ¶
func (c *MetadataFormat) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormat) QueryRecords ¶
func (mf *MetadataFormat) QueryRecords() *RecordQuery
QueryRecords queries the "records" edge of the MetadataFormat entity.
func (*MetadataFormat) String ¶
func (mf *MetadataFormat) String() string
String implements the fmt.Stringer.
func (*MetadataFormat) Unwrap ¶
func (mf *MetadataFormat) Unwrap() *MetadataFormat
Unwrap unwraps the MetadataFormat 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 (*MetadataFormat) Update ¶
func (mf *MetadataFormat) Update() *MetadataFormatUpdateOne
Update returns a builder for updating this MetadataFormat. Note that you need to call MetadataFormat.Unwrap() before calling this method if this MetadataFormat was returned from a transaction, and the transaction was committed or rolled back.
type MetadataFormatClient ¶
type MetadataFormatClient struct {
// contains filtered or unexported fields
}
MetadataFormatClient is a client for the MetadataFormat schema.
func NewMetadataFormatClient ¶
func NewMetadataFormatClient(c config) *MetadataFormatClient
NewMetadataFormatClient returns a client for the MetadataFormat from the given config.
func (*MetadataFormatClient) Create ¶
func (c *MetadataFormatClient) Create() *MetadataFormatCreate
Create returns a builder for creating a MetadataFormat entity.
func (*MetadataFormatClient) CreateBulk ¶
func (c *MetadataFormatClient) CreateBulk(builders ...*MetadataFormatCreate) *MetadataFormatCreateBulk
CreateBulk returns a builder for creating a bulk of MetadataFormat entities.
func (*MetadataFormatClient) Delete ¶
func (c *MetadataFormatClient) Delete() *MetadataFormatDelete
Delete returns a delete builder for MetadataFormat.
func (*MetadataFormatClient) DeleteOne ¶
func (c *MetadataFormatClient) DeleteOne(mf *MetadataFormat) *MetadataFormatDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MetadataFormatClient) DeleteOneID ¶
func (c *MetadataFormatClient) DeleteOneID(id int64) *MetadataFormatDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MetadataFormatClient) ExecContext ¶
func (c *MetadataFormatClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormatClient) Get ¶
func (c *MetadataFormatClient) Get(ctx context.Context, id int64) (*MetadataFormat, error)
Get returns a MetadataFormat entity by its id.
func (*MetadataFormatClient) GetX ¶
func (c *MetadataFormatClient) GetX(ctx context.Context, id int64) *MetadataFormat
GetX is like Get, but panics if an error occurs.
func (*MetadataFormatClient) Hooks ¶
func (c *MetadataFormatClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MetadataFormatClient) Intercept ¶
func (c *MetadataFormatClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `metadataformat.Intercept(f(g(h())))`.
func (*MetadataFormatClient) Interceptors ¶
func (c *MetadataFormatClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MetadataFormatClient) Query ¶
func (c *MetadataFormatClient) Query() *MetadataFormatQuery
Query returns a query builder for MetadataFormat.
func (*MetadataFormatClient) QueryContext ¶
func (c *MetadataFormatClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormatClient) QueryRecords ¶
func (c *MetadataFormatClient) QueryRecords(mf *MetadataFormat) *RecordQuery
QueryRecords queries the records edge of a MetadataFormat.
func (*MetadataFormatClient) Update ¶
func (c *MetadataFormatClient) Update() *MetadataFormatUpdate
Update returns an update builder for MetadataFormat.
func (*MetadataFormatClient) UpdateOne ¶
func (c *MetadataFormatClient) UpdateOne(mf *MetadataFormat) *MetadataFormatUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MetadataFormatClient) UpdateOneID ¶
func (c *MetadataFormatClient) UpdateOneID(id int64) *MetadataFormatUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MetadataFormatClient) Use ¶
func (c *MetadataFormatClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `metadataformat.Hooks(f(g(h())))`.
type MetadataFormatCreate ¶
type MetadataFormatCreate struct {
// contains filtered or unexported fields
}
MetadataFormatCreate is the builder for creating a MetadataFormat entity.
func (*MetadataFormatCreate) AddRecordIDs ¶
func (mfc *MetadataFormatCreate) AddRecordIDs(ids ...int64) *MetadataFormatCreate
AddRecordIDs adds the "records" edge to the Record entity by IDs.
func (*MetadataFormatCreate) AddRecords ¶
func (mfc *MetadataFormatCreate) AddRecords(r ...*Record) *MetadataFormatCreate
AddRecords adds the "records" edges to the Record entity.
func (*MetadataFormatCreate) Exec ¶
func (mfc *MetadataFormatCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataFormatCreate) ExecContext ¶
func (c *MetadataFormatCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormatCreate) ExecX ¶
func (mfc *MetadataFormatCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataFormatCreate) Mutation ¶
func (mfc *MetadataFormatCreate) Mutation() *MetadataFormatMutation
Mutation returns the MetadataFormatMutation object of the builder.
func (*MetadataFormatCreate) OnConflict ¶
func (mfc *MetadataFormatCreate) OnConflict(opts ...sql.ConflictOption) *MetadataFormatUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.MetadataFormat.Create(). SetPrefix(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.MetadataFormatUpsert) { SetPrefix(v+v). }). Exec(ctx)
func (*MetadataFormatCreate) OnConflictColumns ¶
func (mfc *MetadataFormatCreate) OnConflictColumns(columns ...string) *MetadataFormatUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.MetadataFormat.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MetadataFormatCreate) QueryContext ¶
func (c *MetadataFormatCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormatCreate) Save ¶
func (mfc *MetadataFormatCreate) Save(ctx context.Context) (*MetadataFormat, error)
Save creates the MetadataFormat in the database.
func (*MetadataFormatCreate) SaveX ¶
func (mfc *MetadataFormatCreate) SaveX(ctx context.Context) *MetadataFormat
SaveX calls Save and panics if Save returns an error.
func (*MetadataFormatCreate) SetID ¶
func (mfc *MetadataFormatCreate) SetID(i int64) *MetadataFormatCreate
SetID sets the "id" field.
func (*MetadataFormatCreate) SetNamespace ¶
func (mfc *MetadataFormatCreate) SetNamespace(s string) *MetadataFormatCreate
SetNamespace sets the "namespace" field.
func (*MetadataFormatCreate) SetPrefix ¶
func (mfc *MetadataFormatCreate) SetPrefix(s string) *MetadataFormatCreate
SetPrefix sets the "prefix" field.
func (*MetadataFormatCreate) SetSchema ¶
func (mfc *MetadataFormatCreate) SetSchema(s string) *MetadataFormatCreate
SetSchema sets the "schema" field.
type MetadataFormatCreateBulk ¶
type MetadataFormatCreateBulk struct {
// contains filtered or unexported fields
}
MetadataFormatCreateBulk is the builder for creating many MetadataFormat entities in bulk.
func (*MetadataFormatCreateBulk) Exec ¶
func (mfcb *MetadataFormatCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataFormatCreateBulk) ExecContext ¶
func (c *MetadataFormatCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormatCreateBulk) ExecX ¶
func (mfcb *MetadataFormatCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataFormatCreateBulk) OnConflict ¶
func (mfcb *MetadataFormatCreateBulk) OnConflict(opts ...sql.ConflictOption) *MetadataFormatUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.MetadataFormat.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.MetadataFormatUpsert) { SetPrefix(v+v). }). Exec(ctx)
func (*MetadataFormatCreateBulk) OnConflictColumns ¶
func (mfcb *MetadataFormatCreateBulk) OnConflictColumns(columns ...string) *MetadataFormatUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.MetadataFormat.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MetadataFormatCreateBulk) QueryContext ¶
func (c *MetadataFormatCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormatCreateBulk) Save ¶
func (mfcb *MetadataFormatCreateBulk) Save(ctx context.Context) ([]*MetadataFormat, error)
Save creates the MetadataFormat entities in the database.
func (*MetadataFormatCreateBulk) SaveX ¶
func (mfcb *MetadataFormatCreateBulk) SaveX(ctx context.Context) []*MetadataFormat
SaveX is like Save, but panics if an error occurs.
type MetadataFormatDelete ¶
type MetadataFormatDelete struct {
// contains filtered or unexported fields
}
MetadataFormatDelete is the builder for deleting a MetadataFormat entity.
func (*MetadataFormatDelete) Exec ¶
func (mfd *MetadataFormatDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MetadataFormatDelete) ExecContext ¶
func (c *MetadataFormatDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormatDelete) ExecX ¶
func (mfd *MetadataFormatDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MetadataFormatDelete) QueryContext ¶
func (c *MetadataFormatDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormatDelete) Where ¶
func (mfd *MetadataFormatDelete) Where(ps ...predicate.MetadataFormat) *MetadataFormatDelete
Where appends a list predicates to the MetadataFormatDelete builder.
type MetadataFormatDeleteOne ¶
type MetadataFormatDeleteOne struct {
// contains filtered or unexported fields
}
MetadataFormatDeleteOne is the builder for deleting a single MetadataFormat entity.
func (*MetadataFormatDeleteOne) Exec ¶
func (mfdo *MetadataFormatDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MetadataFormatDeleteOne) ExecX ¶
func (mfdo *MetadataFormatDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataFormatDeleteOne) Where ¶
func (mfdo *MetadataFormatDeleteOne) Where(ps ...predicate.MetadataFormat) *MetadataFormatDeleteOne
Where appends a list predicates to the MetadataFormatDelete builder.
type MetadataFormatEdges ¶
type MetadataFormatEdges struct { // Records holds the value of the records edge. Records []*Record `json:"records,omitempty"` // contains filtered or unexported fields }
MetadataFormatEdges holds the relations/edges for other nodes in the graph.
func (MetadataFormatEdges) RecordsOrErr ¶
func (e MetadataFormatEdges) RecordsOrErr() ([]*Record, error)
RecordsOrErr returns the Records value or an error if the edge was not loaded in eager-loading.
type MetadataFormatGroupBy ¶
type MetadataFormatGroupBy struct {
// contains filtered or unexported fields
}
MetadataFormatGroupBy is the group-by builder for MetadataFormat entities.
func (*MetadataFormatGroupBy) Aggregate ¶
func (mfgb *MetadataFormatGroupBy) Aggregate(fns ...AggregateFunc) *MetadataFormatGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MetadataFormatGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MetadataFormatGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MetadataFormatGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MetadataFormatGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MetadataFormatGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MetadataFormatGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MetadataFormatGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MetadataFormatGroupBy) Scan ¶
func (mfgb *MetadataFormatGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MetadataFormatGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MetadataFormatMutation ¶
type MetadataFormatMutation struct {
// contains filtered or unexported fields
}
MetadataFormatMutation represents an operation that mutates the MetadataFormat nodes in the graph.
func (*MetadataFormatMutation) AddField ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) AddRecordIDs ¶
func (m *MetadataFormatMutation) AddRecordIDs(ids ...int64)
AddRecordIDs adds the "records" edge to the Record entity by ids.
func (*MetadataFormatMutation) AddedEdges ¶
func (m *MetadataFormatMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MetadataFormatMutation) AddedField ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) AddedFields ¶
func (m *MetadataFormatMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MetadataFormatMutation) AddedIDs ¶
func (m *MetadataFormatMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MetadataFormatMutation) ClearEdge ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) ClearField ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) ClearRecords ¶
func (m *MetadataFormatMutation) ClearRecords()
ClearRecords clears the "records" edge to the Record entity.
func (*MetadataFormatMutation) ClearedEdges ¶
func (m *MetadataFormatMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MetadataFormatMutation) ClearedFields ¶
func (m *MetadataFormatMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MetadataFormatMutation) Client ¶
func (m MetadataFormatMutation) 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 (*MetadataFormatMutation) EdgeCleared ¶
func (m *MetadataFormatMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MetadataFormatMutation) ExecContext ¶
func (c *MetadataFormatMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormatMutation) Field ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) FieldCleared ¶
func (m *MetadataFormatMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MetadataFormatMutation) Fields ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) ID ¶
func (m *MetadataFormatMutation) ID() (id int64, 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 (*MetadataFormatMutation) IDs ¶
func (m *MetadataFormatMutation) IDs(ctx context.Context) ([]int64, 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 (*MetadataFormatMutation) Namespace ¶
func (m *MetadataFormatMutation) Namespace() (r string, exists bool)
Namespace returns the value of the "namespace" field in the mutation.
func (*MetadataFormatMutation) 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 (*MetadataFormatMutation) OldNamespace ¶
func (m *MetadataFormatMutation) OldNamespace(ctx context.Context) (v string, err error)
OldNamespace returns the old "namespace" field's value of the MetadataFormat entity. If the MetadataFormat 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 (*MetadataFormatMutation) OldPrefix ¶
func (m *MetadataFormatMutation) OldPrefix(ctx context.Context) (v string, err error)
OldPrefix returns the old "prefix" field's value of the MetadataFormat entity. If the MetadataFormat 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 (*MetadataFormatMutation) OldSchema ¶
func (m *MetadataFormatMutation) OldSchema(ctx context.Context) (v string, err error)
OldSchema returns the old "schema" field's value of the MetadataFormat entity. If the MetadataFormat 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 (*MetadataFormatMutation) Op ¶
func (m *MetadataFormatMutation) Op() Op
Op returns the operation name.
func (*MetadataFormatMutation) Prefix ¶
func (m *MetadataFormatMutation) Prefix() (r string, exists bool)
Prefix returns the value of the "prefix" field in the mutation.
func (*MetadataFormatMutation) QueryContext ¶
func (c *MetadataFormatMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormatMutation) RecordsCleared ¶
func (m *MetadataFormatMutation) RecordsCleared() bool
RecordsCleared reports if the "records" edge to the Record entity was cleared.
func (*MetadataFormatMutation) RecordsIDs ¶
func (m *MetadataFormatMutation) RecordsIDs() (ids []int64)
RecordsIDs returns the "records" edge IDs in the mutation.
func (*MetadataFormatMutation) RemoveRecordIDs ¶
func (m *MetadataFormatMutation) RemoveRecordIDs(ids ...int64)
RemoveRecordIDs removes the "records" edge to the Record entity by IDs.
func (*MetadataFormatMutation) RemovedEdges ¶
func (m *MetadataFormatMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MetadataFormatMutation) RemovedIDs ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) RemovedRecordsIDs ¶
func (m *MetadataFormatMutation) RemovedRecordsIDs() (ids []int64)
RemovedRecords returns the removed IDs of the "records" edge to the Record entity.
func (*MetadataFormatMutation) ResetEdge ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) ResetField ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) ResetNamespace ¶
func (m *MetadataFormatMutation) ResetNamespace()
ResetNamespace resets all changes to the "namespace" field.
func (*MetadataFormatMutation) ResetPrefix ¶
func (m *MetadataFormatMutation) ResetPrefix()
ResetPrefix resets all changes to the "prefix" field.
func (*MetadataFormatMutation) ResetRecords ¶
func (m *MetadataFormatMutation) ResetRecords()
ResetRecords resets all changes to the "records" edge.
func (*MetadataFormatMutation) ResetSchema ¶
func (m *MetadataFormatMutation) ResetSchema()
ResetSchema resets all changes to the "schema" field.
func (*MetadataFormatMutation) Schema ¶
func (m *MetadataFormatMutation) Schema() (r string, exists bool)
Schema returns the value of the "schema" field in the mutation.
func (*MetadataFormatMutation) SetField ¶
func (m *MetadataFormatMutation) 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 (*MetadataFormatMutation) SetID ¶
func (m *MetadataFormatMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of MetadataFormat entities.
func (*MetadataFormatMutation) SetNamespace ¶
func (m *MetadataFormatMutation) SetNamespace(s string)
SetNamespace sets the "namespace" field.
func (*MetadataFormatMutation) SetOp ¶
func (m *MetadataFormatMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MetadataFormatMutation) SetPrefix ¶
func (m *MetadataFormatMutation) SetPrefix(s string)
SetPrefix sets the "prefix" field.
func (*MetadataFormatMutation) SetSchema ¶
func (m *MetadataFormatMutation) SetSchema(s string)
SetSchema sets the "schema" field.
func (MetadataFormatMutation) Tx ¶
func (m MetadataFormatMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MetadataFormatMutation) Type ¶
func (m *MetadataFormatMutation) Type() string
Type returns the node type of this mutation (MetadataFormat).
func (*MetadataFormatMutation) Where ¶
func (m *MetadataFormatMutation) Where(ps ...predicate.MetadataFormat)
Where appends a list predicates to the MetadataFormatMutation builder.
func (*MetadataFormatMutation) WhereP ¶
func (m *MetadataFormatMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MetadataFormatMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MetadataFormatQuery ¶
type MetadataFormatQuery struct {
// contains filtered or unexported fields
}
MetadataFormatQuery is the builder for querying MetadataFormat entities.
func (*MetadataFormatQuery) Aggregate ¶
func (mfq *MetadataFormatQuery) Aggregate(fns ...AggregateFunc) *MetadataFormatSelect
Aggregate returns a MetadataFormatSelect configured with the given aggregations.
func (*MetadataFormatQuery) All ¶
func (mfq *MetadataFormatQuery) All(ctx context.Context) ([]*MetadataFormat, error)
All executes the query and returns a list of MetadataFormats.
func (*MetadataFormatQuery) AllX ¶
func (mfq *MetadataFormatQuery) AllX(ctx context.Context) []*MetadataFormat
AllX is like All, but panics if an error occurs.
func (*MetadataFormatQuery) Clone ¶
func (mfq *MetadataFormatQuery) Clone() *MetadataFormatQuery
Clone returns a duplicate of the MetadataFormatQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MetadataFormatQuery) Count ¶
func (mfq *MetadataFormatQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MetadataFormatQuery) CountX ¶
func (mfq *MetadataFormatQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MetadataFormatQuery) ExecContext ¶
func (c *MetadataFormatQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormatQuery) Exist ¶
func (mfq *MetadataFormatQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MetadataFormatQuery) ExistX ¶
func (mfq *MetadataFormatQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MetadataFormatQuery) First ¶
func (mfq *MetadataFormatQuery) First(ctx context.Context) (*MetadataFormat, error)
First returns the first MetadataFormat entity from the query. Returns a *NotFoundError when no MetadataFormat was found.
func (*MetadataFormatQuery) FirstID ¶
func (mfq *MetadataFormatQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first MetadataFormat ID from the query. Returns a *NotFoundError when no MetadataFormat ID was found.
func (*MetadataFormatQuery) FirstIDX ¶
func (mfq *MetadataFormatQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*MetadataFormatQuery) FirstX ¶
func (mfq *MetadataFormatQuery) FirstX(ctx context.Context) *MetadataFormat
FirstX is like First, but panics if an error occurs.
func (*MetadataFormatQuery) GroupBy ¶
func (mfq *MetadataFormatQuery) GroupBy(field string, fields ...string) *MetadataFormatGroupBy
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 { Prefix string `json:"prefix,omitempty"` Count int `json:"count,omitempty"` } client.MetadataFormat.Query(). GroupBy(metadataformat.FieldPrefix). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MetadataFormatQuery) IDs ¶
func (mfq *MetadataFormatQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of MetadataFormat IDs.
func (*MetadataFormatQuery) IDsX ¶
func (mfq *MetadataFormatQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*MetadataFormatQuery) Limit ¶
func (mfq *MetadataFormatQuery) Limit(limit int) *MetadataFormatQuery
Limit the number of records to be returned by this query.
func (*MetadataFormatQuery) Offset ¶
func (mfq *MetadataFormatQuery) Offset(offset int) *MetadataFormatQuery
Offset to start from.
func (*MetadataFormatQuery) Only ¶
func (mfq *MetadataFormatQuery) Only(ctx context.Context) (*MetadataFormat, error)
Only returns a single MetadataFormat entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MetadataFormat entity is found. Returns a *NotFoundError when no MetadataFormat entities are found.
func (*MetadataFormatQuery) OnlyID ¶
func (mfq *MetadataFormatQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only MetadataFormat ID in the query. Returns a *NotSingularError when more than one MetadataFormat ID is found. Returns a *NotFoundError when no entities are found.
func (*MetadataFormatQuery) OnlyIDX ¶
func (mfq *MetadataFormatQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MetadataFormatQuery) OnlyX ¶
func (mfq *MetadataFormatQuery) OnlyX(ctx context.Context) *MetadataFormat
OnlyX is like Only, but panics if an error occurs.
func (*MetadataFormatQuery) Order ¶
func (mfq *MetadataFormatQuery) Order(o ...metadataformat.OrderOption) *MetadataFormatQuery
Order specifies how the records should be ordered.
func (*MetadataFormatQuery) QueryContext ¶
func (c *MetadataFormatQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormatQuery) QueryRecords ¶
func (mfq *MetadataFormatQuery) QueryRecords() *RecordQuery
QueryRecords chains the current query on the "records" edge.
func (*MetadataFormatQuery) Select ¶
func (mfq *MetadataFormatQuery) Select(fields ...string) *MetadataFormatSelect
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 { Prefix string `json:"prefix,omitempty"` } client.MetadataFormat.Query(). Select(metadataformat.FieldPrefix). Scan(ctx, &v)
func (*MetadataFormatQuery) Unique ¶
func (mfq *MetadataFormatQuery) Unique(unique bool) *MetadataFormatQuery
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 (*MetadataFormatQuery) Where ¶
func (mfq *MetadataFormatQuery) Where(ps ...predicate.MetadataFormat) *MetadataFormatQuery
Where adds a new predicate for the MetadataFormatQuery builder.
func (*MetadataFormatQuery) WithRecords ¶
func (mfq *MetadataFormatQuery) WithRecords(opts ...func(*RecordQuery)) *MetadataFormatQuery
WithRecords tells the query-builder to eager-load the nodes that are connected to the "records" edge. The optional arguments are used to configure the query builder of the edge.
type MetadataFormatSelect ¶
type MetadataFormatSelect struct { *MetadataFormatQuery // contains filtered or unexported fields }
MetadataFormatSelect is the builder for selecting fields of MetadataFormat entities.
func (*MetadataFormatSelect) Aggregate ¶
func (mfs *MetadataFormatSelect) Aggregate(fns ...AggregateFunc) *MetadataFormatSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MetadataFormatSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MetadataFormatSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (MetadataFormatSelect) ExecContext ¶
func (c MetadataFormatSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormatSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MetadataFormatSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MetadataFormatSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MetadataFormatSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (MetadataFormatSelect) QueryContext ¶
func (c MetadataFormatSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormatSelect) Scan ¶
func (mfs *MetadataFormatSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MetadataFormatSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MetadataFormatUpdate ¶
type MetadataFormatUpdate struct {
// contains filtered or unexported fields
}
MetadataFormatUpdate is the builder for updating MetadataFormat entities.
func (*MetadataFormatUpdate) AddRecordIDs ¶
func (mfu *MetadataFormatUpdate) AddRecordIDs(ids ...int64) *MetadataFormatUpdate
AddRecordIDs adds the "records" edge to the Record entity by IDs.
func (*MetadataFormatUpdate) AddRecords ¶
func (mfu *MetadataFormatUpdate) AddRecords(r ...*Record) *MetadataFormatUpdate
AddRecords adds the "records" edges to the Record entity.
func (*MetadataFormatUpdate) ClearRecords ¶
func (mfu *MetadataFormatUpdate) ClearRecords() *MetadataFormatUpdate
ClearRecords clears all "records" edges to the Record entity.
func (*MetadataFormatUpdate) Exec ¶
func (mfu *MetadataFormatUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataFormatUpdate) ExecContext ¶
func (c *MetadataFormatUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormatUpdate) ExecX ¶
func (mfu *MetadataFormatUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataFormatUpdate) Mutation ¶
func (mfu *MetadataFormatUpdate) Mutation() *MetadataFormatMutation
Mutation returns the MetadataFormatMutation object of the builder.
func (*MetadataFormatUpdate) QueryContext ¶
func (c *MetadataFormatUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormatUpdate) RemoveRecordIDs ¶
func (mfu *MetadataFormatUpdate) RemoveRecordIDs(ids ...int64) *MetadataFormatUpdate
RemoveRecordIDs removes the "records" edge to Record entities by IDs.
func (*MetadataFormatUpdate) RemoveRecords ¶
func (mfu *MetadataFormatUpdate) RemoveRecords(r ...*Record) *MetadataFormatUpdate
RemoveRecords removes "records" edges to Record entities.
func (*MetadataFormatUpdate) Save ¶
func (mfu *MetadataFormatUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MetadataFormatUpdate) SaveX ¶
func (mfu *MetadataFormatUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MetadataFormatUpdate) SetNamespace ¶
func (mfu *MetadataFormatUpdate) SetNamespace(s string) *MetadataFormatUpdate
SetNamespace sets the "namespace" field.
func (*MetadataFormatUpdate) SetPrefix ¶
func (mfu *MetadataFormatUpdate) SetPrefix(s string) *MetadataFormatUpdate
SetPrefix sets the "prefix" field.
func (*MetadataFormatUpdate) SetSchema ¶
func (mfu *MetadataFormatUpdate) SetSchema(s string) *MetadataFormatUpdate
SetSchema sets the "schema" field.
func (*MetadataFormatUpdate) Where ¶
func (mfu *MetadataFormatUpdate) Where(ps ...predicate.MetadataFormat) *MetadataFormatUpdate
Where appends a list predicates to the MetadataFormatUpdate builder.
type MetadataFormatUpdateOne ¶
type MetadataFormatUpdateOne struct {
// contains filtered or unexported fields
}
MetadataFormatUpdateOne is the builder for updating a single MetadataFormat entity.
func (*MetadataFormatUpdateOne) AddRecordIDs ¶
func (mfuo *MetadataFormatUpdateOne) AddRecordIDs(ids ...int64) *MetadataFormatUpdateOne
AddRecordIDs adds the "records" edge to the Record entity by IDs.
func (*MetadataFormatUpdateOne) AddRecords ¶
func (mfuo *MetadataFormatUpdateOne) AddRecords(r ...*Record) *MetadataFormatUpdateOne
AddRecords adds the "records" edges to the Record entity.
func (*MetadataFormatUpdateOne) ClearRecords ¶
func (mfuo *MetadataFormatUpdateOne) ClearRecords() *MetadataFormatUpdateOne
ClearRecords clears all "records" edges to the Record entity.
func (*MetadataFormatUpdateOne) Exec ¶
func (mfuo *MetadataFormatUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MetadataFormatUpdateOne) ExecContext ¶
func (c *MetadataFormatUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MetadataFormatUpdateOne) ExecX ¶
func (mfuo *MetadataFormatUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataFormatUpdateOne) Mutation ¶
func (mfuo *MetadataFormatUpdateOne) Mutation() *MetadataFormatMutation
Mutation returns the MetadataFormatMutation object of the builder.
func (*MetadataFormatUpdateOne) QueryContext ¶
func (c *MetadataFormatUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MetadataFormatUpdateOne) RemoveRecordIDs ¶
func (mfuo *MetadataFormatUpdateOne) RemoveRecordIDs(ids ...int64) *MetadataFormatUpdateOne
RemoveRecordIDs removes the "records" edge to Record entities by IDs.
func (*MetadataFormatUpdateOne) RemoveRecords ¶
func (mfuo *MetadataFormatUpdateOne) RemoveRecords(r ...*Record) *MetadataFormatUpdateOne
RemoveRecords removes "records" edges to Record entities.
func (*MetadataFormatUpdateOne) Save ¶
func (mfuo *MetadataFormatUpdateOne) Save(ctx context.Context) (*MetadataFormat, error)
Save executes the query and returns the updated MetadataFormat entity.
func (*MetadataFormatUpdateOne) SaveX ¶
func (mfuo *MetadataFormatUpdateOne) SaveX(ctx context.Context) *MetadataFormat
SaveX is like Save, but panics if an error occurs.
func (*MetadataFormatUpdateOne) Select ¶
func (mfuo *MetadataFormatUpdateOne) Select(field string, fields ...string) *MetadataFormatUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MetadataFormatUpdateOne) SetNamespace ¶
func (mfuo *MetadataFormatUpdateOne) SetNamespace(s string) *MetadataFormatUpdateOne
SetNamespace sets the "namespace" field.
func (*MetadataFormatUpdateOne) SetPrefix ¶
func (mfuo *MetadataFormatUpdateOne) SetPrefix(s string) *MetadataFormatUpdateOne
SetPrefix sets the "prefix" field.
func (*MetadataFormatUpdateOne) SetSchema ¶
func (mfuo *MetadataFormatUpdateOne) SetSchema(s string) *MetadataFormatUpdateOne
SetSchema sets the "schema" field.
func (*MetadataFormatUpdateOne) Where ¶
func (mfuo *MetadataFormatUpdateOne) Where(ps ...predicate.MetadataFormat) *MetadataFormatUpdateOne
Where appends a list predicates to the MetadataFormatUpdate builder.
type MetadataFormatUpsert ¶
MetadataFormatUpsert is the "OnConflict" setter.
func (*MetadataFormatUpsert) SetNamespace ¶
func (u *MetadataFormatUpsert) SetNamespace(v string) *MetadataFormatUpsert
SetNamespace sets the "namespace" field.
func (*MetadataFormatUpsert) SetPrefix ¶
func (u *MetadataFormatUpsert) SetPrefix(v string) *MetadataFormatUpsert
SetPrefix sets the "prefix" field.
func (*MetadataFormatUpsert) SetSchema ¶
func (u *MetadataFormatUpsert) SetSchema(v string) *MetadataFormatUpsert
SetSchema sets the "schema" field.
func (*MetadataFormatUpsert) UpdateNamespace ¶
func (u *MetadataFormatUpsert) UpdateNamespace() *MetadataFormatUpsert
UpdateNamespace sets the "namespace" field to the value that was provided on create.
func (*MetadataFormatUpsert) UpdatePrefix ¶
func (u *MetadataFormatUpsert) UpdatePrefix() *MetadataFormatUpsert
UpdatePrefix sets the "prefix" field to the value that was provided on create.
func (*MetadataFormatUpsert) UpdateSchema ¶
func (u *MetadataFormatUpsert) UpdateSchema() *MetadataFormatUpsert
UpdateSchema sets the "schema" field to the value that was provided on create.
type MetadataFormatUpsertBulk ¶
type MetadataFormatUpsertBulk struct {
// contains filtered or unexported fields
}
MetadataFormatUpsertBulk is the builder for "upsert"-ing a bulk of MetadataFormat nodes.
func (*MetadataFormatUpsertBulk) DoNothing ¶
func (u *MetadataFormatUpsertBulk) DoNothing() *MetadataFormatUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MetadataFormatUpsertBulk) Exec ¶
func (u *MetadataFormatUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataFormatUpsertBulk) ExecX ¶
func (u *MetadataFormatUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataFormatUpsertBulk) Ignore ¶
func (u *MetadataFormatUpsertBulk) Ignore() *MetadataFormatUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.MetadataFormat.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MetadataFormatUpsertBulk) SetNamespace ¶
func (u *MetadataFormatUpsertBulk) SetNamespace(v string) *MetadataFormatUpsertBulk
SetNamespace sets the "namespace" field.
func (*MetadataFormatUpsertBulk) SetPrefix ¶
func (u *MetadataFormatUpsertBulk) SetPrefix(v string) *MetadataFormatUpsertBulk
SetPrefix sets the "prefix" field.
func (*MetadataFormatUpsertBulk) SetSchema ¶
func (u *MetadataFormatUpsertBulk) SetSchema(v string) *MetadataFormatUpsertBulk
SetSchema sets the "schema" field.
func (*MetadataFormatUpsertBulk) Update ¶
func (u *MetadataFormatUpsertBulk) Update(set func(*MetadataFormatUpsert)) *MetadataFormatUpsertBulk
Update allows overriding fields `UPDATE` values. See the MetadataFormatCreateBulk.OnConflict documentation for more info.
func (*MetadataFormatUpsertBulk) UpdateNamespace ¶
func (u *MetadataFormatUpsertBulk) UpdateNamespace() *MetadataFormatUpsertBulk
UpdateNamespace sets the "namespace" field to the value that was provided on create.
func (*MetadataFormatUpsertBulk) UpdateNewValues ¶
func (u *MetadataFormatUpsertBulk) UpdateNewValues() *MetadataFormatUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.MetadataFormat.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(metadataformat.FieldID) }), ). Exec(ctx)
func (*MetadataFormatUpsertBulk) UpdatePrefix ¶
func (u *MetadataFormatUpsertBulk) UpdatePrefix() *MetadataFormatUpsertBulk
UpdatePrefix sets the "prefix" field to the value that was provided on create.
func (*MetadataFormatUpsertBulk) UpdateSchema ¶
func (u *MetadataFormatUpsertBulk) UpdateSchema() *MetadataFormatUpsertBulk
UpdateSchema sets the "schema" field to the value that was provided on create.
type MetadataFormatUpsertOne ¶
type MetadataFormatUpsertOne struct {
// contains filtered or unexported fields
}
MetadataFormatUpsertOne is the builder for "upsert"-ing
one MetadataFormat node.
func (*MetadataFormatUpsertOne) DoNothing ¶
func (u *MetadataFormatUpsertOne) DoNothing() *MetadataFormatUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MetadataFormatUpsertOne) Exec ¶
func (u *MetadataFormatUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataFormatUpsertOne) ExecX ¶
func (u *MetadataFormatUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataFormatUpsertOne) ID ¶
func (u *MetadataFormatUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*MetadataFormatUpsertOne) IDX ¶
func (u *MetadataFormatUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*MetadataFormatUpsertOne) Ignore ¶
func (u *MetadataFormatUpsertOne) Ignore() *MetadataFormatUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.MetadataFormat.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MetadataFormatUpsertOne) SetNamespace ¶
func (u *MetadataFormatUpsertOne) SetNamespace(v string) *MetadataFormatUpsertOne
SetNamespace sets the "namespace" field.
func (*MetadataFormatUpsertOne) SetPrefix ¶
func (u *MetadataFormatUpsertOne) SetPrefix(v string) *MetadataFormatUpsertOne
SetPrefix sets the "prefix" field.
func (*MetadataFormatUpsertOne) SetSchema ¶
func (u *MetadataFormatUpsertOne) SetSchema(v string) *MetadataFormatUpsertOne
SetSchema sets the "schema" field.
func (*MetadataFormatUpsertOne) Update ¶
func (u *MetadataFormatUpsertOne) Update(set func(*MetadataFormatUpsert)) *MetadataFormatUpsertOne
Update allows overriding fields `UPDATE` values. See the MetadataFormatCreate.OnConflict documentation for more info.
func (*MetadataFormatUpsertOne) UpdateNamespace ¶
func (u *MetadataFormatUpsertOne) UpdateNamespace() *MetadataFormatUpsertOne
UpdateNamespace sets the "namespace" field to the value that was provided on create.
func (*MetadataFormatUpsertOne) UpdateNewValues ¶
func (u *MetadataFormatUpsertOne) UpdateNewValues() *MetadataFormatUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.MetadataFormat.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(metadataformat.FieldID) }), ). Exec(ctx)
func (*MetadataFormatUpsertOne) UpdatePrefix ¶
func (u *MetadataFormatUpsertOne) UpdatePrefix() *MetadataFormatUpsertOne
UpdatePrefix sets the "prefix" field to the value that was provided on create.
func (*MetadataFormatUpsertOne) UpdateSchema ¶
func (u *MetadataFormatUpsertOne) UpdateSchema() *MetadataFormatUpsertOne
UpdateSchema sets the "schema" field to the value that was provided on create.
type MetadataFormats ¶
type MetadataFormats []*MetadataFormat
MetadataFormats is a parsable slice of MetadataFormat.
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 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 Record ¶
type Record struct { // ID of the ent. ID int64 `json:"id,omitempty"` // MetadataFormatID holds the value of the "metadata_format_id" field. MetadataFormatID int64 `json:"metadata_format_id,omitempty"` // ItemID holds the value of the "item_id" field. ItemID int64 `json:"item_id,omitempty"` // A record with NULL metadata is considered deleted. Metadata *string `json:"metadata,omitempty"` // Datestamp holds the value of the "datestamp" field. Datestamp time.Time `json:"datestamp,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RecordQuery when eager-loading is set. Edges RecordEdges `json:"edges"` // contains filtered or unexported fields }
Record is the model entity for the Record schema.
func (*Record) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Record) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Record) QueryMetadataFormat ¶
func (r *Record) QueryMetadataFormat() *MetadataFormatQuery
QueryMetadataFormat queries the "metadata_format" edge of the Record entity.
func (*Record) Unwrap ¶
Unwrap unwraps the Record 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 (*Record) Update ¶
func (r *Record) Update() *RecordUpdateOne
Update returns a builder for updating this Record. Note that you need to call Record.Unwrap() before calling this method if this Record was returned from a transaction, and the transaction was committed or rolled back.
type RecordClient ¶
type RecordClient struct {
// contains filtered or unexported fields
}
RecordClient is a client for the Record schema.
func NewRecordClient ¶
func NewRecordClient(c config) *RecordClient
NewRecordClient returns a client for the Record from the given config.
func (*RecordClient) Create ¶
func (c *RecordClient) Create() *RecordCreate
Create returns a builder for creating a Record entity.
func (*RecordClient) CreateBulk ¶
func (c *RecordClient) CreateBulk(builders ...*RecordCreate) *RecordCreateBulk
CreateBulk returns a builder for creating a bulk of Record entities.
func (*RecordClient) Delete ¶
func (c *RecordClient) Delete() *RecordDelete
Delete returns a delete builder for Record.
func (*RecordClient) DeleteOne ¶
func (c *RecordClient) DeleteOne(r *Record) *RecordDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RecordClient) DeleteOneID ¶
func (c *RecordClient) DeleteOneID(id int64) *RecordDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RecordClient) ExecContext ¶
func (c *RecordClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RecordClient) GetX ¶
func (c *RecordClient) GetX(ctx context.Context, id int64) *Record
GetX is like Get, but panics if an error occurs.
func (*RecordClient) Intercept ¶
func (c *RecordClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `record.Intercept(f(g(h())))`.
func (*RecordClient) Interceptors ¶
func (c *RecordClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RecordClient) Query ¶
func (c *RecordClient) Query() *RecordQuery
Query returns a query builder for Record.
func (*RecordClient) QueryContext ¶
func (c *RecordClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RecordClient) QueryItem ¶
func (c *RecordClient) QueryItem(r *Record) *ItemQuery
QueryItem queries the item edge of a Record.
func (*RecordClient) QueryMetadataFormat ¶
func (c *RecordClient) QueryMetadataFormat(r *Record) *MetadataFormatQuery
QueryMetadataFormat queries the metadata_format edge of a Record.
func (*RecordClient) Update ¶
func (c *RecordClient) Update() *RecordUpdate
Update returns an update builder for Record.
func (*RecordClient) UpdateOne ¶
func (c *RecordClient) UpdateOne(r *Record) *RecordUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RecordClient) UpdateOneID ¶
func (c *RecordClient) UpdateOneID(id int64) *RecordUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RecordClient) Use ¶
func (c *RecordClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `record.Hooks(f(g(h())))`.
type RecordCreate ¶
type RecordCreate struct {
// contains filtered or unexported fields
}
RecordCreate is the builder for creating a Record entity.
func (*RecordCreate) Exec ¶
func (rc *RecordCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RecordCreate) ExecContext ¶
func (c *RecordCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RecordCreate) ExecX ¶
func (rc *RecordCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordCreate) Mutation ¶
func (rc *RecordCreate) Mutation() *RecordMutation
Mutation returns the RecordMutation object of the builder.
func (*RecordCreate) OnConflict ¶
func (rc *RecordCreate) OnConflict(opts ...sql.ConflictOption) *RecordUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Record.Create(). SetMetadataFormatID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RecordUpsert) { SetMetadataFormatID(v+v). }). Exec(ctx)
func (*RecordCreate) OnConflictColumns ¶
func (rc *RecordCreate) OnConflictColumns(columns ...string) *RecordUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Record.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RecordCreate) QueryContext ¶
func (c *RecordCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RecordCreate) Save ¶
func (rc *RecordCreate) Save(ctx context.Context) (*Record, error)
Save creates the Record in the database.
func (*RecordCreate) SaveX ¶
func (rc *RecordCreate) SaveX(ctx context.Context) *Record
SaveX calls Save and panics if Save returns an error.
func (*RecordCreate) SetDatestamp ¶
func (rc *RecordCreate) SetDatestamp(t time.Time) *RecordCreate
SetDatestamp sets the "datestamp" field.
func (*RecordCreate) SetID ¶
func (rc *RecordCreate) SetID(i int64) *RecordCreate
SetID sets the "id" field.
func (*RecordCreate) SetItem ¶
func (rc *RecordCreate) SetItem(i *Item) *RecordCreate
SetItem sets the "item" edge to the Item entity.
func (*RecordCreate) SetItemID ¶
func (rc *RecordCreate) SetItemID(i int64) *RecordCreate
SetItemID sets the "item_id" field.
func (*RecordCreate) SetMetadata ¶
func (rc *RecordCreate) SetMetadata(s string) *RecordCreate
SetMetadata sets the "metadata" field.
func (*RecordCreate) SetMetadataFormat ¶
func (rc *RecordCreate) SetMetadataFormat(m *MetadataFormat) *RecordCreate
SetMetadataFormat sets the "metadata_format" edge to the MetadataFormat entity.
func (*RecordCreate) SetMetadataFormatID ¶
func (rc *RecordCreate) SetMetadataFormatID(i int64) *RecordCreate
SetMetadataFormatID sets the "metadata_format_id" field.
func (*RecordCreate) SetNillableDatestamp ¶
func (rc *RecordCreate) SetNillableDatestamp(t *time.Time) *RecordCreate
SetNillableDatestamp sets the "datestamp" field if the given value is not nil.
func (*RecordCreate) SetNillableMetadata ¶
func (rc *RecordCreate) SetNillableMetadata(s *string) *RecordCreate
SetNillableMetadata sets the "metadata" field if the given value is not nil.
type RecordCreateBulk ¶
type RecordCreateBulk struct {
// contains filtered or unexported fields
}
RecordCreateBulk is the builder for creating many Record entities in bulk.
func (*RecordCreateBulk) Exec ¶
func (rcb *RecordCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RecordCreateBulk) ExecContext ¶
func (c *RecordCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RecordCreateBulk) ExecX ¶
func (rcb *RecordCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordCreateBulk) OnConflict ¶
func (rcb *RecordCreateBulk) OnConflict(opts ...sql.ConflictOption) *RecordUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Record.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RecordUpsert) { SetMetadataFormatID(v+v). }). Exec(ctx)
func (*RecordCreateBulk) OnConflictColumns ¶
func (rcb *RecordCreateBulk) OnConflictColumns(columns ...string) *RecordUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Record.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RecordCreateBulk) QueryContext ¶
func (c *RecordCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type RecordDelete ¶
type RecordDelete struct {
// contains filtered or unexported fields
}
RecordDelete is the builder for deleting a Record entity.
func (*RecordDelete) Exec ¶
func (rd *RecordDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RecordDelete) ExecContext ¶
func (c *RecordDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RecordDelete) ExecX ¶
func (rd *RecordDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RecordDelete) QueryContext ¶
func (c *RecordDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RecordDelete) Where ¶
func (rd *RecordDelete) Where(ps ...predicate.Record) *RecordDelete
Where appends a list predicates to the RecordDelete builder.
type RecordDeleteOne ¶
type RecordDeleteOne struct {
// contains filtered or unexported fields
}
RecordDeleteOne is the builder for deleting a single Record entity.
func (*RecordDeleteOne) Exec ¶
func (rdo *RecordDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RecordDeleteOne) ExecX ¶
func (rdo *RecordDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordDeleteOne) Where ¶
func (rdo *RecordDeleteOne) Where(ps ...predicate.Record) *RecordDeleteOne
Where appends a list predicates to the RecordDelete builder.
type RecordEdges ¶
type RecordEdges struct { // MetadataFormat holds the value of the metadata_format edge. MetadataFormat *MetadataFormat `json:"metadata_format,omitempty"` // Item holds the value of the item edge. Item *Item `json:"item,omitempty"` // contains filtered or unexported fields }
RecordEdges holds the relations/edges for other nodes in the graph.
func (RecordEdges) ItemOrErr ¶
func (e RecordEdges) ItemOrErr() (*Item, error)
ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RecordEdges) MetadataFormatOrErr ¶
func (e RecordEdges) MetadataFormatOrErr() (*MetadataFormat, error)
MetadataFormatOrErr returns the MetadataFormat value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RecordGroupBy ¶
type RecordGroupBy struct {
// contains filtered or unexported fields
}
RecordGroupBy is the group-by builder for Record entities.
func (*RecordGroupBy) Aggregate ¶
func (rgb *RecordGroupBy) Aggregate(fns ...AggregateFunc) *RecordGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RecordGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Scan ¶
func (rgb *RecordGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RecordGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RecordMutation ¶
type RecordMutation struct {
// contains filtered or unexported fields
}
RecordMutation represents an operation that mutates the Record nodes in the graph.
func (*RecordMutation) AddField ¶
func (m *RecordMutation) 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 (*RecordMutation) AddedEdges ¶
func (m *RecordMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RecordMutation) AddedField ¶
func (m *RecordMutation) 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 (*RecordMutation) AddedFields ¶
func (m *RecordMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RecordMutation) AddedIDs ¶
func (m *RecordMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RecordMutation) ClearEdge ¶
func (m *RecordMutation) 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 (*RecordMutation) ClearField ¶
func (m *RecordMutation) 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 (*RecordMutation) ClearItem ¶
func (m *RecordMutation) ClearItem()
ClearItem clears the "item" edge to the Item entity.
func (*RecordMutation) ClearMetadata ¶
func (m *RecordMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*RecordMutation) ClearMetadataFormat ¶
func (m *RecordMutation) ClearMetadataFormat()
ClearMetadataFormat clears the "metadata_format" edge to the MetadataFormat entity.
func (*RecordMutation) ClearedEdges ¶
func (m *RecordMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RecordMutation) ClearedFields ¶
func (m *RecordMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RecordMutation) Client ¶
func (m RecordMutation) 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 (*RecordMutation) Datestamp ¶
func (m *RecordMutation) Datestamp() (r time.Time, exists bool)
Datestamp returns the value of the "datestamp" field in the mutation.
func (*RecordMutation) EdgeCleared ¶
func (m *RecordMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RecordMutation) ExecContext ¶
func (c *RecordMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RecordMutation) Field ¶
func (m *RecordMutation) 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 (*RecordMutation) FieldCleared ¶
func (m *RecordMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RecordMutation) Fields ¶
func (m *RecordMutation) 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 (*RecordMutation) ID ¶
func (m *RecordMutation) ID() (id int64, 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 (*RecordMutation) IDs ¶
func (m *RecordMutation) IDs(ctx context.Context) ([]int64, 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 (*RecordMutation) ItemCleared ¶
func (m *RecordMutation) ItemCleared() bool
ItemCleared reports if the "item" edge to the Item entity was cleared.
func (*RecordMutation) ItemID ¶
func (m *RecordMutation) ItemID() (r int64, exists bool)
ItemID returns the value of the "item_id" field in the mutation.
func (*RecordMutation) ItemIDs ¶
func (m *RecordMutation) ItemIDs() (ids []int64)
ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.
func (*RecordMutation) Metadata ¶
func (m *RecordMutation) Metadata() (r string, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*RecordMutation) MetadataCleared ¶
func (m *RecordMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*RecordMutation) MetadataFormatCleared ¶
func (m *RecordMutation) MetadataFormatCleared() bool
MetadataFormatCleared reports if the "metadata_format" edge to the MetadataFormat entity was cleared.
func (*RecordMutation) MetadataFormatID ¶
func (m *RecordMutation) MetadataFormatID() (r int64, exists bool)
MetadataFormatID returns the value of the "metadata_format_id" field in the mutation.
func (*RecordMutation) MetadataFormatIDs ¶
func (m *RecordMutation) MetadataFormatIDs() (ids []int64)
MetadataFormatIDs returns the "metadata_format" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MetadataFormatID instead. It exists only for internal usage by the builders.
func (*RecordMutation) OldDatestamp ¶
OldDatestamp returns the old "datestamp" field's value of the Record entity. If the Record 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 (*RecordMutation) 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 (*RecordMutation) OldItemID ¶
func (m *RecordMutation) OldItemID(ctx context.Context) (v int64, err error)
OldItemID returns the old "item_id" field's value of the Record entity. If the Record 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 (*RecordMutation) OldMetadata ¶
func (m *RecordMutation) OldMetadata(ctx context.Context) (v *string, err error)
OldMetadata returns the old "metadata" field's value of the Record entity. If the Record 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 (*RecordMutation) OldMetadataFormatID ¶
func (m *RecordMutation) OldMetadataFormatID(ctx context.Context) (v int64, err error)
OldMetadataFormatID returns the old "metadata_format_id" field's value of the Record entity. If the Record 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 (*RecordMutation) QueryContext ¶
func (c *RecordMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RecordMutation) RemovedEdges ¶
func (m *RecordMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RecordMutation) RemovedIDs ¶
func (m *RecordMutation) 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 (*RecordMutation) ResetDatestamp ¶
func (m *RecordMutation) ResetDatestamp()
ResetDatestamp resets all changes to the "datestamp" field.
func (*RecordMutation) ResetEdge ¶
func (m *RecordMutation) 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 (*RecordMutation) ResetField ¶
func (m *RecordMutation) 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 (*RecordMutation) ResetItem ¶
func (m *RecordMutation) ResetItem()
ResetItem resets all changes to the "item" edge.
func (*RecordMutation) ResetItemID ¶
func (m *RecordMutation) ResetItemID()
ResetItemID resets all changes to the "item_id" field.
func (*RecordMutation) ResetMetadata ¶
func (m *RecordMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*RecordMutation) ResetMetadataFormat ¶
func (m *RecordMutation) ResetMetadataFormat()
ResetMetadataFormat resets all changes to the "metadata_format" edge.
func (*RecordMutation) ResetMetadataFormatID ¶
func (m *RecordMutation) ResetMetadataFormatID()
ResetMetadataFormatID resets all changes to the "metadata_format_id" field.
func (*RecordMutation) SetDatestamp ¶
func (m *RecordMutation) SetDatestamp(t time.Time)
SetDatestamp sets the "datestamp" field.
func (*RecordMutation) SetField ¶
func (m *RecordMutation) 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 (*RecordMutation) SetID ¶
func (m *RecordMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Record entities.
func (*RecordMutation) SetItemID ¶
func (m *RecordMutation) SetItemID(i int64)
SetItemID sets the "item_id" field.
func (*RecordMutation) SetMetadata ¶
func (m *RecordMutation) SetMetadata(s string)
SetMetadata sets the "metadata" field.
func (*RecordMutation) SetMetadataFormatID ¶
func (m *RecordMutation) SetMetadataFormatID(i int64)
SetMetadataFormatID sets the "metadata_format_id" field.
func (*RecordMutation) SetOp ¶
func (m *RecordMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (RecordMutation) Tx ¶
func (m RecordMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RecordMutation) Type ¶
func (m *RecordMutation) Type() string
Type returns the node type of this mutation (Record).
func (*RecordMutation) Where ¶
func (m *RecordMutation) Where(ps ...predicate.Record)
Where appends a list predicates to the RecordMutation builder.
func (*RecordMutation) WhereP ¶
func (m *RecordMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RecordMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RecordQuery ¶
type RecordQuery struct {
// contains filtered or unexported fields
}
RecordQuery is the builder for querying Record entities.
func (*RecordQuery) Aggregate ¶
func (rq *RecordQuery) Aggregate(fns ...AggregateFunc) *RecordSelect
Aggregate returns a RecordSelect configured with the given aggregations.
func (*RecordQuery) All ¶
func (rq *RecordQuery) All(ctx context.Context) ([]*Record, error)
All executes the query and returns a list of Records.
func (*RecordQuery) AllX ¶
func (rq *RecordQuery) AllX(ctx context.Context) []*Record
AllX is like All, but panics if an error occurs.
func (*RecordQuery) Clone ¶
func (rq *RecordQuery) Clone() *RecordQuery
Clone returns a duplicate of the RecordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RecordQuery) Count ¶
func (rq *RecordQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RecordQuery) CountX ¶
func (rq *RecordQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RecordQuery) ExecContext ¶
func (c *RecordQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RecordQuery) Exist ¶
func (rq *RecordQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RecordQuery) ExistX ¶
func (rq *RecordQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RecordQuery) First ¶
func (rq *RecordQuery) First(ctx context.Context) (*Record, error)
First returns the first Record entity from the query. Returns a *NotFoundError when no Record was found.
func (*RecordQuery) FirstID ¶
func (rq *RecordQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Record ID from the query. Returns a *NotFoundError when no Record ID was found.
func (*RecordQuery) FirstIDX ¶
func (rq *RecordQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*RecordQuery) FirstX ¶
func (rq *RecordQuery) FirstX(ctx context.Context) *Record
FirstX is like First, but panics if an error occurs.
func (*RecordQuery) GroupBy ¶
func (rq *RecordQuery) GroupBy(field string, fields ...string) *RecordGroupBy
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 { MetadataFormatID int64 `json:"metadata_format_id,omitempty"` Count int `json:"count,omitempty"` } client.Record.Query(). GroupBy(record.FieldMetadataFormatID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RecordQuery) IDs ¶
func (rq *RecordQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of Record IDs.
func (*RecordQuery) IDsX ¶
func (rq *RecordQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*RecordQuery) Limit ¶
func (rq *RecordQuery) Limit(limit int) *RecordQuery
Limit the number of records to be returned by this query.
func (*RecordQuery) Offset ¶
func (rq *RecordQuery) Offset(offset int) *RecordQuery
Offset to start from.
func (*RecordQuery) Only ¶
func (rq *RecordQuery) Only(ctx context.Context) (*Record, error)
Only returns a single Record entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Record entity is found. Returns a *NotFoundError when no Record entities are found.
func (*RecordQuery) OnlyID ¶
func (rq *RecordQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Record ID in the query. Returns a *NotSingularError when more than one Record ID is found. Returns a *NotFoundError when no entities are found.
func (*RecordQuery) OnlyIDX ¶
func (rq *RecordQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RecordQuery) OnlyX ¶
func (rq *RecordQuery) OnlyX(ctx context.Context) *Record
OnlyX is like Only, but panics if an error occurs.
func (*RecordQuery) Order ¶
func (rq *RecordQuery) Order(o ...record.OrderOption) *RecordQuery
Order specifies how the records should be ordered.
func (*RecordQuery) QueryContext ¶
func (c *RecordQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RecordQuery) QueryItem ¶
func (rq *RecordQuery) QueryItem() *ItemQuery
QueryItem chains the current query on the "item" edge.
func (*RecordQuery) QueryMetadataFormat ¶
func (rq *RecordQuery) QueryMetadataFormat() *MetadataFormatQuery
QueryMetadataFormat chains the current query on the "metadata_format" edge.
func (*RecordQuery) Select ¶
func (rq *RecordQuery) Select(fields ...string) *RecordSelect
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 { MetadataFormatID int64 `json:"metadata_format_id,omitempty"` } client.Record.Query(). Select(record.FieldMetadataFormatID). Scan(ctx, &v)
func (*RecordQuery) Unique ¶
func (rq *RecordQuery) Unique(unique bool) *RecordQuery
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 (*RecordQuery) Where ¶
func (rq *RecordQuery) Where(ps ...predicate.Record) *RecordQuery
Where adds a new predicate for the RecordQuery builder.
func (*RecordQuery) WithItem ¶
func (rq *RecordQuery) WithItem(opts ...func(*ItemQuery)) *RecordQuery
WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.
func (*RecordQuery) WithMetadataFormat ¶
func (rq *RecordQuery) WithMetadataFormat(opts ...func(*MetadataFormatQuery)) *RecordQuery
WithMetadataFormat tells the query-builder to eager-load the nodes that are connected to the "metadata_format" edge. The optional arguments are used to configure the query builder of the edge.
type RecordSelect ¶
type RecordSelect struct { *RecordQuery // contains filtered or unexported fields }
RecordSelect is the builder for selecting fields of Record entities.
func (*RecordSelect) Aggregate ¶
func (rs *RecordSelect) Aggregate(fns ...AggregateFunc) *RecordSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RecordSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (RecordSelect) ExecContext ¶
func (c RecordSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RecordSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (RecordSelect) QueryContext ¶
func (c RecordSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RecordSelect) Scan ¶
func (rs *RecordSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RecordSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RecordUpdate ¶
type RecordUpdate struct {
// contains filtered or unexported fields
}
RecordUpdate is the builder for updating Record entities.
func (*RecordUpdate) ClearItem ¶
func (ru *RecordUpdate) ClearItem() *RecordUpdate
ClearItem clears the "item" edge to the Item entity.
func (*RecordUpdate) ClearMetadata ¶
func (ru *RecordUpdate) ClearMetadata() *RecordUpdate
ClearMetadata clears the value of the "metadata" field.
func (*RecordUpdate) ClearMetadataFormat ¶
func (ru *RecordUpdate) ClearMetadataFormat() *RecordUpdate
ClearMetadataFormat clears the "metadata_format" edge to the MetadataFormat entity.
func (*RecordUpdate) Exec ¶
func (ru *RecordUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RecordUpdate) ExecContext ¶
func (c *RecordUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RecordUpdate) ExecX ¶
func (ru *RecordUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordUpdate) Mutation ¶
func (ru *RecordUpdate) Mutation() *RecordMutation
Mutation returns the RecordMutation object of the builder.
func (*RecordUpdate) QueryContext ¶
func (c *RecordUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RecordUpdate) Save ¶
func (ru *RecordUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RecordUpdate) SaveX ¶
func (ru *RecordUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RecordUpdate) SetDatestamp ¶
func (ru *RecordUpdate) SetDatestamp(t time.Time) *RecordUpdate
SetDatestamp sets the "datestamp" field.
func (*RecordUpdate) SetItem ¶
func (ru *RecordUpdate) SetItem(i *Item) *RecordUpdate
SetItem sets the "item" edge to the Item entity.
func (*RecordUpdate) SetItemID ¶
func (ru *RecordUpdate) SetItemID(i int64) *RecordUpdate
SetItemID sets the "item_id" field.
func (*RecordUpdate) SetMetadata ¶
func (ru *RecordUpdate) SetMetadata(s string) *RecordUpdate
SetMetadata sets the "metadata" field.
func (*RecordUpdate) SetMetadataFormat ¶
func (ru *RecordUpdate) SetMetadataFormat(m *MetadataFormat) *RecordUpdate
SetMetadataFormat sets the "metadata_format" edge to the MetadataFormat entity.
func (*RecordUpdate) SetMetadataFormatID ¶
func (ru *RecordUpdate) SetMetadataFormatID(i int64) *RecordUpdate
SetMetadataFormatID sets the "metadata_format_id" field.
func (*RecordUpdate) SetNillableDatestamp ¶
func (ru *RecordUpdate) SetNillableDatestamp(t *time.Time) *RecordUpdate
SetNillableDatestamp sets the "datestamp" field if the given value is not nil.
func (*RecordUpdate) SetNillableMetadata ¶
func (ru *RecordUpdate) SetNillableMetadata(s *string) *RecordUpdate
SetNillableMetadata sets the "metadata" field if the given value is not nil.
func (*RecordUpdate) Where ¶
func (ru *RecordUpdate) Where(ps ...predicate.Record) *RecordUpdate
Where appends a list predicates to the RecordUpdate builder.
type RecordUpdateOne ¶
type RecordUpdateOne struct {
// contains filtered or unexported fields
}
RecordUpdateOne is the builder for updating a single Record entity.
func (*RecordUpdateOne) ClearItem ¶
func (ruo *RecordUpdateOne) ClearItem() *RecordUpdateOne
ClearItem clears the "item" edge to the Item entity.
func (*RecordUpdateOne) ClearMetadata ¶
func (ruo *RecordUpdateOne) ClearMetadata() *RecordUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*RecordUpdateOne) ClearMetadataFormat ¶
func (ruo *RecordUpdateOne) ClearMetadataFormat() *RecordUpdateOne
ClearMetadataFormat clears the "metadata_format" edge to the MetadataFormat entity.
func (*RecordUpdateOne) Exec ¶
func (ruo *RecordUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RecordUpdateOne) ExecContext ¶
func (c *RecordUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RecordUpdateOne) ExecX ¶
func (ruo *RecordUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordUpdateOne) Mutation ¶
func (ruo *RecordUpdateOne) Mutation() *RecordMutation
Mutation returns the RecordMutation object of the builder.
func (*RecordUpdateOne) QueryContext ¶
func (c *RecordUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RecordUpdateOne) Save ¶
func (ruo *RecordUpdateOne) Save(ctx context.Context) (*Record, error)
Save executes the query and returns the updated Record entity.
func (*RecordUpdateOne) SaveX ¶
func (ruo *RecordUpdateOne) SaveX(ctx context.Context) *Record
SaveX is like Save, but panics if an error occurs.
func (*RecordUpdateOne) Select ¶
func (ruo *RecordUpdateOne) Select(field string, fields ...string) *RecordUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RecordUpdateOne) SetDatestamp ¶
func (ruo *RecordUpdateOne) SetDatestamp(t time.Time) *RecordUpdateOne
SetDatestamp sets the "datestamp" field.
func (*RecordUpdateOne) SetItem ¶
func (ruo *RecordUpdateOne) SetItem(i *Item) *RecordUpdateOne
SetItem sets the "item" edge to the Item entity.
func (*RecordUpdateOne) SetItemID ¶
func (ruo *RecordUpdateOne) SetItemID(i int64) *RecordUpdateOne
SetItemID sets the "item_id" field.
func (*RecordUpdateOne) SetMetadata ¶
func (ruo *RecordUpdateOne) SetMetadata(s string) *RecordUpdateOne
SetMetadata sets the "metadata" field.
func (*RecordUpdateOne) SetMetadataFormat ¶
func (ruo *RecordUpdateOne) SetMetadataFormat(m *MetadataFormat) *RecordUpdateOne
SetMetadataFormat sets the "metadata_format" edge to the MetadataFormat entity.
func (*RecordUpdateOne) SetMetadataFormatID ¶
func (ruo *RecordUpdateOne) SetMetadataFormatID(i int64) *RecordUpdateOne
SetMetadataFormatID sets the "metadata_format_id" field.
func (*RecordUpdateOne) SetNillableDatestamp ¶
func (ruo *RecordUpdateOne) SetNillableDatestamp(t *time.Time) *RecordUpdateOne
SetNillableDatestamp sets the "datestamp" field if the given value is not nil.
func (*RecordUpdateOne) SetNillableMetadata ¶
func (ruo *RecordUpdateOne) SetNillableMetadata(s *string) *RecordUpdateOne
SetNillableMetadata sets the "metadata" field if the given value is not nil.
func (*RecordUpdateOne) Where ¶
func (ruo *RecordUpdateOne) Where(ps ...predicate.Record) *RecordUpdateOne
Where appends a list predicates to the RecordUpdate builder.
type RecordUpsert ¶
RecordUpsert is the "OnConflict" setter.
func (*RecordUpsert) ClearMetadata ¶
func (u *RecordUpsert) ClearMetadata() *RecordUpsert
ClearMetadata clears the value of the "metadata" field.
func (*RecordUpsert) SetDatestamp ¶
func (u *RecordUpsert) SetDatestamp(v time.Time) *RecordUpsert
SetDatestamp sets the "datestamp" field.
func (*RecordUpsert) SetItemID ¶
func (u *RecordUpsert) SetItemID(v int64) *RecordUpsert
SetItemID sets the "item_id" field.
func (*RecordUpsert) SetMetadata ¶
func (u *RecordUpsert) SetMetadata(v string) *RecordUpsert
SetMetadata sets the "metadata" field.
func (*RecordUpsert) SetMetadataFormatID ¶
func (u *RecordUpsert) SetMetadataFormatID(v int64) *RecordUpsert
SetMetadataFormatID sets the "metadata_format_id" field.
func (*RecordUpsert) UpdateDatestamp ¶
func (u *RecordUpsert) UpdateDatestamp() *RecordUpsert
UpdateDatestamp sets the "datestamp" field to the value that was provided on create.
func (*RecordUpsert) UpdateItemID ¶
func (u *RecordUpsert) UpdateItemID() *RecordUpsert
UpdateItemID sets the "item_id" field to the value that was provided on create.
func (*RecordUpsert) UpdateMetadata ¶
func (u *RecordUpsert) UpdateMetadata() *RecordUpsert
UpdateMetadata sets the "metadata" field to the value that was provided on create.
func (*RecordUpsert) UpdateMetadataFormatID ¶
func (u *RecordUpsert) UpdateMetadataFormatID() *RecordUpsert
UpdateMetadataFormatID sets the "metadata_format_id" field to the value that was provided on create.
type RecordUpsertBulk ¶
type RecordUpsertBulk struct {
// contains filtered or unexported fields
}
RecordUpsertBulk is the builder for "upsert"-ing a bulk of Record nodes.
func (*RecordUpsertBulk) ClearMetadata ¶
func (u *RecordUpsertBulk) ClearMetadata() *RecordUpsertBulk
ClearMetadata clears the value of the "metadata" field.
func (*RecordUpsertBulk) DoNothing ¶
func (u *RecordUpsertBulk) DoNothing() *RecordUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RecordUpsertBulk) Exec ¶
func (u *RecordUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RecordUpsertBulk) ExecX ¶
func (u *RecordUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordUpsertBulk) Ignore ¶
func (u *RecordUpsertBulk) Ignore() *RecordUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Record.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RecordUpsertBulk) SetDatestamp ¶
func (u *RecordUpsertBulk) SetDatestamp(v time.Time) *RecordUpsertBulk
SetDatestamp sets the "datestamp" field.
func (*RecordUpsertBulk) SetItemID ¶
func (u *RecordUpsertBulk) SetItemID(v int64) *RecordUpsertBulk
SetItemID sets the "item_id" field.
func (*RecordUpsertBulk) SetMetadata ¶
func (u *RecordUpsertBulk) SetMetadata(v string) *RecordUpsertBulk
SetMetadata sets the "metadata" field.
func (*RecordUpsertBulk) SetMetadataFormatID ¶
func (u *RecordUpsertBulk) SetMetadataFormatID(v int64) *RecordUpsertBulk
SetMetadataFormatID sets the "metadata_format_id" field.
func (*RecordUpsertBulk) Update ¶
func (u *RecordUpsertBulk) Update(set func(*RecordUpsert)) *RecordUpsertBulk
Update allows overriding fields `UPDATE` values. See the RecordCreateBulk.OnConflict documentation for more info.
func (*RecordUpsertBulk) UpdateDatestamp ¶
func (u *RecordUpsertBulk) UpdateDatestamp() *RecordUpsertBulk
UpdateDatestamp sets the "datestamp" field to the value that was provided on create.
func (*RecordUpsertBulk) UpdateItemID ¶
func (u *RecordUpsertBulk) UpdateItemID() *RecordUpsertBulk
UpdateItemID sets the "item_id" field to the value that was provided on create.
func (*RecordUpsertBulk) UpdateMetadata ¶
func (u *RecordUpsertBulk) UpdateMetadata() *RecordUpsertBulk
UpdateMetadata sets the "metadata" field to the value that was provided on create.
func (*RecordUpsertBulk) UpdateMetadataFormatID ¶
func (u *RecordUpsertBulk) UpdateMetadataFormatID() *RecordUpsertBulk
UpdateMetadataFormatID sets the "metadata_format_id" field to the value that was provided on create.
func (*RecordUpsertBulk) UpdateNewValues ¶
func (u *RecordUpsertBulk) UpdateNewValues() *RecordUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Record.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(record.FieldID) }), ). Exec(ctx)
type RecordUpsertOne ¶
type RecordUpsertOne struct {
// contains filtered or unexported fields
}
RecordUpsertOne is the builder for "upsert"-ing
one Record node.
func (*RecordUpsertOne) ClearMetadata ¶
func (u *RecordUpsertOne) ClearMetadata() *RecordUpsertOne
ClearMetadata clears the value of the "metadata" field.
func (*RecordUpsertOne) DoNothing ¶
func (u *RecordUpsertOne) DoNothing() *RecordUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RecordUpsertOne) Exec ¶
func (u *RecordUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*RecordUpsertOne) ExecX ¶
func (u *RecordUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordUpsertOne) ID ¶
func (u *RecordUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*RecordUpsertOne) IDX ¶
func (u *RecordUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*RecordUpsertOne) Ignore ¶
func (u *RecordUpsertOne) Ignore() *RecordUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Record.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RecordUpsertOne) SetDatestamp ¶
func (u *RecordUpsertOne) SetDatestamp(v time.Time) *RecordUpsertOne
SetDatestamp sets the "datestamp" field.
func (*RecordUpsertOne) SetItemID ¶
func (u *RecordUpsertOne) SetItemID(v int64) *RecordUpsertOne
SetItemID sets the "item_id" field.
func (*RecordUpsertOne) SetMetadata ¶
func (u *RecordUpsertOne) SetMetadata(v string) *RecordUpsertOne
SetMetadata sets the "metadata" field.
func (*RecordUpsertOne) SetMetadataFormatID ¶
func (u *RecordUpsertOne) SetMetadataFormatID(v int64) *RecordUpsertOne
SetMetadataFormatID sets the "metadata_format_id" field.
func (*RecordUpsertOne) Update ¶
func (u *RecordUpsertOne) Update(set func(*RecordUpsert)) *RecordUpsertOne
Update allows overriding fields `UPDATE` values. See the RecordCreate.OnConflict documentation for more info.
func (*RecordUpsertOne) UpdateDatestamp ¶
func (u *RecordUpsertOne) UpdateDatestamp() *RecordUpsertOne
UpdateDatestamp sets the "datestamp" field to the value that was provided on create.
func (*RecordUpsertOne) UpdateItemID ¶
func (u *RecordUpsertOne) UpdateItemID() *RecordUpsertOne
UpdateItemID sets the "item_id" field to the value that was provided on create.
func (*RecordUpsertOne) UpdateMetadata ¶
func (u *RecordUpsertOne) UpdateMetadata() *RecordUpsertOne
UpdateMetadata sets the "metadata" field to the value that was provided on create.
func (*RecordUpsertOne) UpdateMetadataFormatID ¶
func (u *RecordUpsertOne) UpdateMetadataFormatID() *RecordUpsertOne
UpdateMetadataFormatID sets the "metadata_format_id" field to the value that was provided on create.
func (*RecordUpsertOne) UpdateNewValues ¶
func (u *RecordUpsertOne) UpdateNewValues() *RecordUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Record.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(record.FieldID) }), ). Exec(ctx)
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 Set ¶
type Set struct { // ID of the ent. ID int64 `json:"id,omitempty"` // Spec holds the value of the "spec" field. Spec string `json:"spec,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,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) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Set) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Set) QueryItems ¶
QueryItems queries the "items" 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 int64) *SetDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SetClient) ExecContext ¶
func (c *SetClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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) QueryContext ¶
func (c *SetClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SetClient) QueryItems ¶
QueryItems queries the items 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 int64) *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) AddItemIDs ¶
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*SetCreate) ExecContext ¶
func (c *SetCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SetCreate) Mutation ¶
func (sc *SetCreate) Mutation() *SetMutation
Mutation returns the SetMutation object of the builder.
func (*SetCreate) OnConflict ¶
func (sc *SetCreate) OnConflict(opts ...sql.ConflictOption) *SetUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Set.Create(). SetSpec(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.SetUpsert) { SetSpec(v+v). }). Exec(ctx)
func (*SetCreate) OnConflictColumns ¶
func (sc *SetCreate) OnConflictColumns(columns ...string) *SetUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Set.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SetCreate) QueryContext ¶
func (c *SetCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SetCreate) SetDescription ¶
SetDescription sets the "description" field.
func (*SetCreate) SetNillableDescription ¶
SetNillableDescription sets the "description" field if the given value is not nil.
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) ExecContext ¶
func (c *SetCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SetCreateBulk) ExecX ¶
func (scb *SetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SetCreateBulk) OnConflict ¶
func (scb *SetCreateBulk) OnConflict(opts ...sql.ConflictOption) *SetUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Set.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.SetUpsert) { SetSpec(v+v). }). Exec(ctx)
func (*SetCreateBulk) OnConflictColumns ¶
func (scb *SetCreateBulk) OnConflictColumns(columns ...string) *SetUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Set.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SetCreateBulk) QueryContext ¶
func (c *SetCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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.
func (*SetDelete) ExecContext ¶
func (c *SetDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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 { // Items holds the value of the items edge. Items []*Item `json:"items,omitempty"` // contains filtered or unexported fields }
SetEdges holds the relations/edges for other nodes in the graph.
func (SetEdges) ItemsOrErr ¶
ItemsOrErr returns the Items 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) AddItemIDs ¶
func (m *SetMutation) AddItemIDs(ids ...int64)
AddItemIDs adds the "items" edge to the Item 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) ClearDescription ¶
func (m *SetMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
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) ClearItems ¶
func (m *SetMutation) ClearItems()
ClearItems clears the "items" edge to the Item 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) Description ¶
func (m *SetMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*SetMutation) DescriptionCleared ¶
func (m *SetMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this 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) ExecContext ¶
func (c *SetMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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 int64, 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) ([]int64, 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) ItemsCleared ¶
func (m *SetMutation) ItemsCleared() bool
ItemsCleared reports if the "items" edge to the Item entity was cleared.
func (*SetMutation) ItemsIDs ¶
func (m *SetMutation) ItemsIDs() (ids []int64)
ItemsIDs returns the "items" edge IDs in 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) OldDescription ¶
func (m *SetMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" 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) OldSpec ¶
func (m *SetMutation) OldSpec(ctx context.Context) (v string, err error)
OldSpec returns the old "spec" 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) QueryContext ¶
func (c *SetMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SetMutation) RemoveItemIDs ¶
func (m *SetMutation) RemoveItemIDs(ids ...int64)
RemoveItemIDs removes the "items" edge to the Item 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) RemovedItemsIDs ¶
func (m *SetMutation) RemovedItemsIDs() (ids []int64)
RemovedItems returns the removed IDs of the "items" edge to the Item entity.
func (*SetMutation) ResetDescription ¶
func (m *SetMutation) ResetDescription()
ResetDescription resets all changes to the "description" 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) ResetItems ¶
func (m *SetMutation) ResetItems()
ResetItems resets all changes to the "items" edge.
func (*SetMutation) ResetName ¶
func (m *SetMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SetMutation) ResetSpec ¶
func (m *SetMutation) ResetSpec()
ResetSpec resets all changes to the "spec" field.
func (*SetMutation) SetDescription ¶
func (m *SetMutation) SetDescription(s string)
SetDescription sets the "description" 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) SetID ¶
func (m *SetMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Set entities.
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) SetSpec ¶
func (m *SetMutation) SetSpec(s string)
SetSpec sets the "spec" field.
func (*SetMutation) Spec ¶
func (m *SetMutation) Spec() (r string, exists bool)
Spec returns the value of the "spec" field in the mutation.
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) ExecContext ¶
func (c *SetQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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 { Spec string `json:"spec,omitempty"` Count int `json:"count,omitempty"` } client.Set.Query(). GroupBy(set.FieldSpec). Aggregate(ent.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) QueryContext ¶
func (c *SetQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SetQuery) QueryItems ¶
QueryItems chains the current query on the "items" 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 { Spec string `json:"spec,omitempty"` } client.Set.Query(). Select(set.FieldSpec). 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.
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) ExecContext ¶
func (c SetSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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) QueryContext ¶
func (c SetSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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) AddItemIDs ¶
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*SetUpdate) ClearDescription ¶
ClearDescription clears the value of the "description" field.
func (*SetUpdate) ClearItems ¶
ClearItems clears all "items" edges to the Item entity.
func (*SetUpdate) ExecContext ¶
func (c *SetUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SetUpdate) Mutation ¶
func (su *SetUpdate) Mutation() *SetMutation
Mutation returns the SetMutation object of the builder.
func (*SetUpdate) QueryContext ¶
func (c *SetUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SetUpdate) RemoveItemIDs ¶
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*SetUpdate) RemoveItems ¶
RemoveItems removes "items" edges to Item entities.
func (*SetUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*SetUpdate) SetDescription ¶
SetDescription sets the "description" field.
func (*SetUpdate) SetNillableDescription ¶
SetNillableDescription sets the "description" 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) AddItemIDs ¶
func (suo *SetUpdateOne) AddItemIDs(ids ...int64) *SetUpdateOne
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*SetUpdateOne) AddItems ¶
func (suo *SetUpdateOne) AddItems(i ...*Item) *SetUpdateOne
AddItems adds the "items" edges to the Item entity.
func (*SetUpdateOne) ClearDescription ¶
func (suo *SetUpdateOne) ClearDescription() *SetUpdateOne
ClearDescription clears the value of the "description" field.
func (*SetUpdateOne) ClearItems ¶
func (suo *SetUpdateOne) ClearItems() *SetUpdateOne
ClearItems clears all "items" edges to the Item entity.
func (*SetUpdateOne) Exec ¶
func (suo *SetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SetUpdateOne) ExecContext ¶
func (c *SetUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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) QueryContext ¶
func (c *SetUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SetUpdateOne) RemoveItemIDs ¶
func (suo *SetUpdateOne) RemoveItemIDs(ids ...int64) *SetUpdateOne
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*SetUpdateOne) RemoveItems ¶
func (suo *SetUpdateOne) RemoveItems(i ...*Item) *SetUpdateOne
RemoveItems removes "items" edges to Item 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) SetDescription ¶
func (suo *SetUpdateOne) SetDescription(s string) *SetUpdateOne
SetDescription sets the "description" field.
func (*SetUpdateOne) SetName ¶
func (suo *SetUpdateOne) SetName(s string) *SetUpdateOne
SetName sets the "name" field.
func (*SetUpdateOne) SetNillableDescription ¶
func (suo *SetUpdateOne) SetNillableDescription(s *string) *SetUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*SetUpdateOne) SetSpec ¶
func (suo *SetUpdateOne) SetSpec(s string) *SetUpdateOne
SetSpec sets the "spec" field.
func (*SetUpdateOne) Where ¶
func (suo *SetUpdateOne) Where(ps ...predicate.Set) *SetUpdateOne
Where appends a list predicates to the SetUpdate builder.
type SetUpsert ¶
SetUpsert is the "OnConflict" setter.
func (*SetUpsert) ClearDescription ¶
ClearDescription clears the value of the "description" field.
func (*SetUpsert) SetDescription ¶
SetDescription sets the "description" field.
func (*SetUpsert) UpdateDescription ¶
UpdateDescription sets the "description" field to the value that was provided on create.
func (*SetUpsert) UpdateName ¶
UpdateName sets the "name" field to the value that was provided on create.
func (*SetUpsert) UpdateSpec ¶
UpdateSpec sets the "spec" field to the value that was provided on create.
type SetUpsertBulk ¶
type SetUpsertBulk struct {
// contains filtered or unexported fields
}
SetUpsertBulk is the builder for "upsert"-ing a bulk of Set nodes.
func (*SetUpsertBulk) ClearDescription ¶
func (u *SetUpsertBulk) ClearDescription() *SetUpsertBulk
ClearDescription clears the value of the "description" field.
func (*SetUpsertBulk) DoNothing ¶
func (u *SetUpsertBulk) DoNothing() *SetUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SetUpsertBulk) Exec ¶
func (u *SetUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SetUpsertBulk) ExecX ¶
func (u *SetUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SetUpsertBulk) Ignore ¶
func (u *SetUpsertBulk) Ignore() *SetUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Set.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*SetUpsertBulk) SetDescription ¶
func (u *SetUpsertBulk) SetDescription(v string) *SetUpsertBulk
SetDescription sets the "description" field.
func (*SetUpsertBulk) SetName ¶
func (u *SetUpsertBulk) SetName(v string) *SetUpsertBulk
SetName sets the "name" field.
func (*SetUpsertBulk) SetSpec ¶
func (u *SetUpsertBulk) SetSpec(v string) *SetUpsertBulk
SetSpec sets the "spec" field.
func (*SetUpsertBulk) Update ¶
func (u *SetUpsertBulk) Update(set func(*SetUpsert)) *SetUpsertBulk
Update allows overriding fields `UPDATE` values. See the SetCreateBulk.OnConflict documentation for more info.
func (*SetUpsertBulk) UpdateDescription ¶
func (u *SetUpsertBulk) UpdateDescription() *SetUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*SetUpsertBulk) UpdateName ¶
func (u *SetUpsertBulk) UpdateName() *SetUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*SetUpsertBulk) UpdateNewValues ¶
func (u *SetUpsertBulk) UpdateNewValues() *SetUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Set.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(set.FieldID) }), ). Exec(ctx)
func (*SetUpsertBulk) UpdateSpec ¶
func (u *SetUpsertBulk) UpdateSpec() *SetUpsertBulk
UpdateSpec sets the "spec" field to the value that was provided on create.
type SetUpsertOne ¶
type SetUpsertOne struct {
// contains filtered or unexported fields
}
SetUpsertOne is the builder for "upsert"-ing
one Set node.
func (*SetUpsertOne) ClearDescription ¶
func (u *SetUpsertOne) ClearDescription() *SetUpsertOne
ClearDescription clears the value of the "description" field.
func (*SetUpsertOne) DoNothing ¶
func (u *SetUpsertOne) DoNothing() *SetUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SetUpsertOne) Exec ¶
func (u *SetUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*SetUpsertOne) ExecX ¶
func (u *SetUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SetUpsertOne) ID ¶
func (u *SetUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*SetUpsertOne) IDX ¶
func (u *SetUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*SetUpsertOne) Ignore ¶
func (u *SetUpsertOne) Ignore() *SetUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Set.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*SetUpsertOne) SetDescription ¶
func (u *SetUpsertOne) SetDescription(v string) *SetUpsertOne
SetDescription sets the "description" field.
func (*SetUpsertOne) SetName ¶
func (u *SetUpsertOne) SetName(v string) *SetUpsertOne
SetName sets the "name" field.
func (*SetUpsertOne) SetSpec ¶
func (u *SetUpsertOne) SetSpec(v string) *SetUpsertOne
SetSpec sets the "spec" field.
func (*SetUpsertOne) Update ¶
func (u *SetUpsertOne) Update(set func(*SetUpsert)) *SetUpsertOne
Update allows overriding fields `UPDATE` values. See the SetCreate.OnConflict documentation for more info.
func (*SetUpsertOne) UpdateDescription ¶
func (u *SetUpsertOne) UpdateDescription() *SetUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*SetUpsertOne) UpdateName ¶
func (u *SetUpsertOne) UpdateName() *SetUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*SetUpsertOne) UpdateNewValues ¶
func (u *SetUpsertOne) UpdateNewValues() *SetUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Set.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(set.FieldID) }), ). Exec(ctx)
func (*SetUpsertOne) UpdateSpec ¶
func (u *SetUpsertOne) UpdateSpec() *SetUpsertOne
UpdateSpec sets the "spec" field to the value that was provided on create.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Item is the client for interacting with the Item builders. Item *ItemClient // MetadataFormat is the client for interacting with the MetadataFormat builders. MetadataFormat *MetadataFormatClient // Record is the client for interacting with the Record builders. Record *RecordClient // 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) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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 ¶
- client.go
- ent.go
- generate.go
- item.go
- item_create.go
- item_delete.go
- item_query.go
- item_update.go
- metadataformat.go
- metadataformat_create.go
- metadataformat_delete.go
- metadataformat_query.go
- metadataformat_update.go
- mutation.go
- record.go
- record_create.go
- record_delete.go
- record_query.go
- record_update.go
- runtime.go
- set.go
- set_create.go
- set_delete.go
- set_query.go
- set_update.go
- tx.go