Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- func Rollback(tx *Tx, err error) error
- func WithTx(ctx context.Context, client *Client, fn func(tx *Tx) error) error
- 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) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Dataset
- type DatasetClient
- func (c *DatasetClient) Create() *DatasetCreate
- func (c *DatasetClient) CreateBulk(builders ...*DatasetCreate) *DatasetCreateBulk
- func (c *DatasetClient) Delete() *DatasetDelete
- func (c *DatasetClient) DeleteOne(d *Dataset) *DatasetDeleteOne
- func (c *DatasetClient) DeleteOneID(id int) *DatasetDeleteOne
- func (c *DatasetClient) Get(ctx context.Context, id int) (*Dataset, error)
- func (c *DatasetClient) GetX(ctx context.Context, id int) *Dataset
- func (c *DatasetClient) Hooks() []Hook
- func (c *DatasetClient) Intercept(interceptors ...Interceptor)
- func (c *DatasetClient) Interceptors() []Interceptor
- func (c *DatasetClient) MapCreateBulk(slice any, setFunc func(*DatasetCreate, int)) *DatasetCreateBulk
- func (c *DatasetClient) Query() *DatasetQuery
- func (c *DatasetClient) Update() *DatasetUpdate
- func (c *DatasetClient) UpdateOne(d *Dataset) *DatasetUpdateOne
- func (c *DatasetClient) UpdateOneID(id int) *DatasetUpdateOne
- func (c *DatasetClient) Use(hooks ...Hook)
- type DatasetCreate
- func (dc *DatasetCreate) Exec(ctx context.Context) error
- func (dc *DatasetCreate) ExecX(ctx context.Context)
- func (dc *DatasetCreate) Mutation() *DatasetMutation
- func (dc *DatasetCreate) OnConflict(opts ...sql.ConflictOption) *DatasetUpsertOne
- func (dc *DatasetCreate) OnConflictColumns(columns ...string) *DatasetUpsertOne
- func (dc *DatasetCreate) Save(ctx context.Context) (*Dataset, error)
- func (dc *DatasetCreate) SaveX(ctx context.Context) *Dataset
- func (dc *DatasetCreate) SetCreatedAt(t time.Time) *DatasetCreate
- func (dc *DatasetCreate) SetDescription(s string) *DatasetCreate
- func (dc *DatasetCreate) SetIndexer(si schema.CSVIndexer) *DatasetCreate
- func (dc *DatasetCreate) SetName(s string) *DatasetCreate
- func (dc *DatasetCreate) SetNanoid(s string) *DatasetCreate
- func (dc *DatasetCreate) SetNillableCreatedAt(t *time.Time) *DatasetCreate
- func (dc *DatasetCreate) SetNillableDescription(s *string) *DatasetCreate
- func (dc *DatasetCreate) SetNillableIndexer(si *schema.CSVIndexer) *DatasetCreate
- func (dc *DatasetCreate) SetNillableNanoid(s *string) *DatasetCreate
- func (dc *DatasetCreate) SetNillablePath(s *string) *DatasetCreate
- func (dc *DatasetCreate) SetNillableUpdatedAt(t *time.Time) *DatasetCreate
- func (dc *DatasetCreate) SetPath(s string) *DatasetCreate
- func (dc *DatasetCreate) SetType(d dataset.Type) *DatasetCreate
- func (dc *DatasetCreate) SetUpdatedAt(t time.Time) *DatasetCreate
- func (dc *DatasetCreate) SetValues(s []string) *DatasetCreate
- type DatasetCreateBulk
- func (dcb *DatasetCreateBulk) Exec(ctx context.Context) error
- func (dcb *DatasetCreateBulk) ExecX(ctx context.Context)
- func (dcb *DatasetCreateBulk) OnConflict(opts ...sql.ConflictOption) *DatasetUpsertBulk
- func (dcb *DatasetCreateBulk) OnConflictColumns(columns ...string) *DatasetUpsertBulk
- func (dcb *DatasetCreateBulk) Save(ctx context.Context) ([]*Dataset, error)
- func (dcb *DatasetCreateBulk) SaveX(ctx context.Context) []*Dataset
- type DatasetDelete
- type DatasetDeleteOne
- type DatasetGroupBy
- func (dgb *DatasetGroupBy) Aggregate(fns ...AggregateFunc) *DatasetGroupBy
- func (s *DatasetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DatasetGroupBy) BoolX(ctx context.Context) bool
- func (s *DatasetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DatasetGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DatasetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DatasetGroupBy) Float64X(ctx context.Context) float64
- func (s *DatasetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DatasetGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DatasetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DatasetGroupBy) IntX(ctx context.Context) int
- func (s *DatasetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DatasetGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DatasetGroupBy) Scan(ctx context.Context, v any) error
- func (s *DatasetGroupBy) ScanX(ctx context.Context, v any)
- func (s *DatasetGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DatasetGroupBy) StringX(ctx context.Context) string
- func (s *DatasetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DatasetGroupBy) StringsX(ctx context.Context) []string
- type DatasetMutation
- func (m *DatasetMutation) AddField(name string, value ent.Value) error
- func (m *DatasetMutation) AddedEdges() []string
- func (m *DatasetMutation) AddedField(name string) (ent.Value, bool)
- func (m *DatasetMutation) AddedFields() []string
- func (m *DatasetMutation) AddedIDs(name string) []ent.Value
- func (m *DatasetMutation) AppendValues(s []string)
- func (m *DatasetMutation) AppendedValues() ([]string, bool)
- func (m *DatasetMutation) ClearCreatedAt()
- func (m *DatasetMutation) ClearEdge(name string) error
- func (m *DatasetMutation) ClearField(name string) error
- func (m *DatasetMutation) ClearIndexer()
- func (m *DatasetMutation) ClearNanoid()
- func (m *DatasetMutation) ClearPath()
- func (m *DatasetMutation) ClearUpdatedAt()
- func (m *DatasetMutation) ClearValues()
- func (m *DatasetMutation) ClearedEdges() []string
- func (m *DatasetMutation) ClearedFields() []string
- func (m DatasetMutation) Client() *Client
- func (m *DatasetMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DatasetMutation) CreatedAtCleared() bool
- func (m *DatasetMutation) Description() (r string, exists bool)
- func (m *DatasetMutation) EdgeCleared(name string) bool
- func (m *DatasetMutation) Field(name string) (ent.Value, bool)
- func (m *DatasetMutation) FieldCleared(name string) bool
- func (m *DatasetMutation) Fields() []string
- func (m *DatasetMutation) GetType() (r dataset.Type, exists bool)
- func (m *DatasetMutation) ID() (id int, exists bool)
- func (m *DatasetMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DatasetMutation) Indexer() (r schema.CSVIndexer, exists bool)
- func (m *DatasetMutation) IndexerCleared() bool
- func (m *DatasetMutation) Name() (r string, exists bool)
- func (m *DatasetMutation) Nanoid() (r string, exists bool)
- func (m *DatasetMutation) NanoidCleared() bool
- func (m *DatasetMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DatasetMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *DatasetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DatasetMutation) OldIndexer(ctx context.Context) (v schema.CSVIndexer, err error)
- func (m *DatasetMutation) OldName(ctx context.Context) (v string, err error)
- func (m *DatasetMutation) OldNanoid(ctx context.Context) (v string, err error)
- func (m *DatasetMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *DatasetMutation) OldType(ctx context.Context) (v dataset.Type, err error)
- func (m *DatasetMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DatasetMutation) OldValues(ctx context.Context) (v []string, err error)
- func (m *DatasetMutation) Op() Op
- func (m *DatasetMutation) Path() (r string, exists bool)
- func (m *DatasetMutation) PathCleared() bool
- func (m *DatasetMutation) RemovedEdges() []string
- func (m *DatasetMutation) RemovedIDs(name string) []ent.Value
- func (m *DatasetMutation) ResetCreatedAt()
- func (m *DatasetMutation) ResetDescription()
- func (m *DatasetMutation) ResetEdge(name string) error
- func (m *DatasetMutation) ResetField(name string) error
- func (m *DatasetMutation) ResetIndexer()
- func (m *DatasetMutation) ResetName()
- func (m *DatasetMutation) ResetNanoid()
- func (m *DatasetMutation) ResetPath()
- func (m *DatasetMutation) ResetType()
- func (m *DatasetMutation) ResetUpdatedAt()
- func (m *DatasetMutation) ResetValues()
- func (m *DatasetMutation) SetCreatedAt(t time.Time)
- func (m *DatasetMutation) SetDescription(s string)
- func (m *DatasetMutation) SetField(name string, value ent.Value) error
- func (m *DatasetMutation) SetIndexer(si schema.CSVIndexer)
- func (m *DatasetMutation) SetName(s string)
- func (m *DatasetMutation) SetNanoid(s string)
- func (m *DatasetMutation) SetOp(op Op)
- func (m *DatasetMutation) SetPath(s string)
- func (m *DatasetMutation) SetType(d dataset.Type)
- func (m *DatasetMutation) SetUpdatedAt(t time.Time)
- func (m *DatasetMutation) SetValues(s []string)
- func (m DatasetMutation) Tx() (*Tx, error)
- func (m *DatasetMutation) Type() string
- func (m *DatasetMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DatasetMutation) UpdatedAtCleared() bool
- func (m *DatasetMutation) Values() (r []string, exists bool)
- func (m *DatasetMutation) ValuesCleared() bool
- func (m *DatasetMutation) Where(ps ...predicate.Dataset)
- func (m *DatasetMutation) WhereP(ps ...func(*sql.Selector))
- type DatasetQuery
- func (dq *DatasetQuery) Aggregate(fns ...AggregateFunc) *DatasetSelect
- func (dq *DatasetQuery) All(ctx context.Context) ([]*Dataset, error)
- func (dq *DatasetQuery) AllX(ctx context.Context) []*Dataset
- func (dq *DatasetQuery) Clone() *DatasetQuery
- func (dq *DatasetQuery) Count(ctx context.Context) (int, error)
- func (dq *DatasetQuery) CountX(ctx context.Context) int
- func (dq *DatasetQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DatasetQuery) ExistX(ctx context.Context) bool
- func (dq *DatasetQuery) First(ctx context.Context) (*Dataset, error)
- func (dq *DatasetQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DatasetQuery) FirstIDX(ctx context.Context) int
- func (dq *DatasetQuery) FirstX(ctx context.Context) *Dataset
- func (dq *DatasetQuery) ForShare(opts ...sql.LockOption) *DatasetQuery
- func (dq *DatasetQuery) ForUpdate(opts ...sql.LockOption) *DatasetQuery
- func (dq *DatasetQuery) GroupBy(field string, fields ...string) *DatasetGroupBy
- func (dq *DatasetQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dq *DatasetQuery) IDsX(ctx context.Context) []int
- func (dq *DatasetQuery) Limit(limit int) *DatasetQuery
- func (dq *DatasetQuery) Modify(modifiers ...func(s *sql.Selector)) *DatasetSelect
- func (dq *DatasetQuery) Offset(offset int) *DatasetQuery
- func (dq *DatasetQuery) Only(ctx context.Context) (*Dataset, error)
- func (dq *DatasetQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DatasetQuery) OnlyIDX(ctx context.Context) int
- func (dq *DatasetQuery) OnlyX(ctx context.Context) *Dataset
- func (dq *DatasetQuery) Order(o ...dataset.OrderOption) *DatasetQuery
- func (dq *DatasetQuery) Select(fields ...string) *DatasetSelect
- func (dq *DatasetQuery) Unique(unique bool) *DatasetQuery
- func (dq *DatasetQuery) Where(ps ...predicate.Dataset) *DatasetQuery
- type DatasetSelect
- func (ds *DatasetSelect) Aggregate(fns ...AggregateFunc) *DatasetSelect
- func (s *DatasetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DatasetSelect) BoolX(ctx context.Context) bool
- func (s *DatasetSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DatasetSelect) BoolsX(ctx context.Context) []bool
- func (s *DatasetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DatasetSelect) Float64X(ctx context.Context) float64
- func (s *DatasetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DatasetSelect) Float64sX(ctx context.Context) []float64
- func (s *DatasetSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DatasetSelect) IntX(ctx context.Context) int
- func (s *DatasetSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DatasetSelect) IntsX(ctx context.Context) []int
- func (ds *DatasetSelect) Modify(modifiers ...func(s *sql.Selector)) *DatasetSelect
- func (ds *DatasetSelect) Scan(ctx context.Context, v any) error
- func (s *DatasetSelect) ScanX(ctx context.Context, v any)
- func (s *DatasetSelect) String(ctx context.Context) (_ string, err error)
- func (s *DatasetSelect) StringX(ctx context.Context) string
- func (s *DatasetSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DatasetSelect) StringsX(ctx context.Context) []string
- type DatasetUpdate
- func (du *DatasetUpdate) AppendValues(s []string) *DatasetUpdate
- func (du *DatasetUpdate) ClearIndexer() *DatasetUpdate
- func (du *DatasetUpdate) ClearNanoid() *DatasetUpdate
- func (du *DatasetUpdate) ClearPath() *DatasetUpdate
- func (du *DatasetUpdate) ClearUpdatedAt() *DatasetUpdate
- func (du *DatasetUpdate) ClearValues() *DatasetUpdate
- func (du *DatasetUpdate) Exec(ctx context.Context) error
- func (du *DatasetUpdate) ExecX(ctx context.Context)
- func (du *DatasetUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DatasetUpdate
- func (du *DatasetUpdate) Mutation() *DatasetMutation
- func (du *DatasetUpdate) Save(ctx context.Context) (int, error)
- func (du *DatasetUpdate) SaveX(ctx context.Context) int
- func (du *DatasetUpdate) SetDescription(s string) *DatasetUpdate
- func (du *DatasetUpdate) SetIndexer(si schema.CSVIndexer) *DatasetUpdate
- func (du *DatasetUpdate) SetName(s string) *DatasetUpdate
- func (du *DatasetUpdate) SetNanoid(s string) *DatasetUpdate
- func (du *DatasetUpdate) SetNillableDescription(s *string) *DatasetUpdate
- func (du *DatasetUpdate) SetNillableIndexer(si *schema.CSVIndexer) *DatasetUpdate
- func (du *DatasetUpdate) SetNillableName(s *string) *DatasetUpdate
- func (du *DatasetUpdate) SetNillableNanoid(s *string) *DatasetUpdate
- func (du *DatasetUpdate) SetNillablePath(s *string) *DatasetUpdate
- func (du *DatasetUpdate) SetNillableType(d *dataset.Type) *DatasetUpdate
- func (du *DatasetUpdate) SetPath(s string) *DatasetUpdate
- func (du *DatasetUpdate) SetType(d dataset.Type) *DatasetUpdate
- func (du *DatasetUpdate) SetUpdatedAt(t time.Time) *DatasetUpdate
- func (du *DatasetUpdate) SetValues(s []string) *DatasetUpdate
- func (du *DatasetUpdate) Where(ps ...predicate.Dataset) *DatasetUpdate
- type DatasetUpdateOne
- func (duo *DatasetUpdateOne) AppendValues(s []string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearIndexer() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearNanoid() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearPath() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearUpdatedAt() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearValues() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) Exec(ctx context.Context) error
- func (duo *DatasetUpdateOne) ExecX(ctx context.Context)
- func (duo *DatasetUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) Mutation() *DatasetMutation
- func (duo *DatasetUpdateOne) Save(ctx context.Context) (*Dataset, error)
- func (duo *DatasetUpdateOne) SaveX(ctx context.Context) *Dataset
- func (duo *DatasetUpdateOne) Select(field string, fields ...string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetDescription(s string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetIndexer(si schema.CSVIndexer) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetName(s string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNanoid(s string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillableDescription(s *string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillableIndexer(si *schema.CSVIndexer) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillableName(s *string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillableNanoid(s *string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillablePath(s *string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillableType(d *dataset.Type) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetPath(s string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetType(d dataset.Type) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetUpdatedAt(t time.Time) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetValues(s []string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) Where(ps ...predicate.Dataset) *DatasetUpdateOne
- type DatasetUpsert
- func (u *DatasetUpsert) ClearIndexer() *DatasetUpsert
- func (u *DatasetUpsert) ClearNanoid() *DatasetUpsert
- func (u *DatasetUpsert) ClearPath() *DatasetUpsert
- func (u *DatasetUpsert) ClearUpdatedAt() *DatasetUpsert
- func (u *DatasetUpsert) ClearValues() *DatasetUpsert
- func (u *DatasetUpsert) SetDescription(v string) *DatasetUpsert
- func (u *DatasetUpsert) SetIndexer(v schema.CSVIndexer) *DatasetUpsert
- func (u *DatasetUpsert) SetName(v string) *DatasetUpsert
- func (u *DatasetUpsert) SetNanoid(v string) *DatasetUpsert
- func (u *DatasetUpsert) SetPath(v string) *DatasetUpsert
- func (u *DatasetUpsert) SetType(v dataset.Type) *DatasetUpsert
- func (u *DatasetUpsert) SetUpdatedAt(v time.Time) *DatasetUpsert
- func (u *DatasetUpsert) SetValues(v []string) *DatasetUpsert
- func (u *DatasetUpsert) UpdateDescription() *DatasetUpsert
- func (u *DatasetUpsert) UpdateIndexer() *DatasetUpsert
- func (u *DatasetUpsert) UpdateName() *DatasetUpsert
- func (u *DatasetUpsert) UpdateNanoid() *DatasetUpsert
- func (u *DatasetUpsert) UpdatePath() *DatasetUpsert
- func (u *DatasetUpsert) UpdateType() *DatasetUpsert
- func (u *DatasetUpsert) UpdateUpdatedAt() *DatasetUpsert
- func (u *DatasetUpsert) UpdateValues() *DatasetUpsert
- type DatasetUpsertBulk
- func (u *DatasetUpsertBulk) ClearIndexer() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) ClearNanoid() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) ClearPath() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) ClearUpdatedAt() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) ClearValues() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) DoNothing() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) Exec(ctx context.Context) error
- func (u *DatasetUpsertBulk) ExecX(ctx context.Context)
- func (u *DatasetUpsertBulk) Ignore() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) SetDescription(v string) *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) SetIndexer(v schema.CSVIndexer) *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) SetName(v string) *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) SetNanoid(v string) *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) SetPath(v string) *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) SetType(v dataset.Type) *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) SetUpdatedAt(v time.Time) *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) SetValues(v []string) *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) Update(set func(*DatasetUpsert)) *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) UpdateDescription() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) UpdateIndexer() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) UpdateName() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) UpdateNanoid() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) UpdateNewValues() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) UpdatePath() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) UpdateType() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) UpdateUpdatedAt() *DatasetUpsertBulk
- func (u *DatasetUpsertBulk) UpdateValues() *DatasetUpsertBulk
- type DatasetUpsertOne
- func (u *DatasetUpsertOne) ClearIndexer() *DatasetUpsertOne
- func (u *DatasetUpsertOne) ClearNanoid() *DatasetUpsertOne
- func (u *DatasetUpsertOne) ClearPath() *DatasetUpsertOne
- func (u *DatasetUpsertOne) ClearUpdatedAt() *DatasetUpsertOne
- func (u *DatasetUpsertOne) ClearValues() *DatasetUpsertOne
- func (u *DatasetUpsertOne) DoNothing() *DatasetUpsertOne
- func (u *DatasetUpsertOne) Exec(ctx context.Context) error
- func (u *DatasetUpsertOne) ExecX(ctx context.Context)
- func (u *DatasetUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *DatasetUpsertOne) IDX(ctx context.Context) int
- func (u *DatasetUpsertOne) Ignore() *DatasetUpsertOne
- func (u *DatasetUpsertOne) SetDescription(v string) *DatasetUpsertOne
- func (u *DatasetUpsertOne) SetIndexer(v schema.CSVIndexer) *DatasetUpsertOne
- func (u *DatasetUpsertOne) SetName(v string) *DatasetUpsertOne
- func (u *DatasetUpsertOne) SetNanoid(v string) *DatasetUpsertOne
- func (u *DatasetUpsertOne) SetPath(v string) *DatasetUpsertOne
- func (u *DatasetUpsertOne) SetType(v dataset.Type) *DatasetUpsertOne
- func (u *DatasetUpsertOne) SetUpdatedAt(v time.Time) *DatasetUpsertOne
- func (u *DatasetUpsertOne) SetValues(v []string) *DatasetUpsertOne
- func (u *DatasetUpsertOne) Update(set func(*DatasetUpsert)) *DatasetUpsertOne
- func (u *DatasetUpsertOne) UpdateDescription() *DatasetUpsertOne
- func (u *DatasetUpsertOne) UpdateIndexer() *DatasetUpsertOne
- func (u *DatasetUpsertOne) UpdateName() *DatasetUpsertOne
- func (u *DatasetUpsertOne) UpdateNanoid() *DatasetUpsertOne
- func (u *DatasetUpsertOne) UpdateNewValues() *DatasetUpsertOne
- func (u *DatasetUpsertOne) UpdatePath() *DatasetUpsertOne
- func (u *DatasetUpsertOne) UpdateType() *DatasetUpsertOne
- func (u *DatasetUpsertOne) UpdateUpdatedAt() *DatasetUpsertOne
- func (u *DatasetUpsertOne) UpdateValues() *DatasetUpsertOne
- type Datasets
- type Hook
- type InterceptFunc
- type Interceptor
- type Model
- type ModelClient
- func (c *ModelClient) Create() *ModelCreate
- func (c *ModelClient) CreateBulk(builders ...*ModelCreate) *ModelCreateBulk
- func (c *ModelClient) Delete() *ModelDelete
- func (c *ModelClient) DeleteOne(m *Model) *ModelDeleteOne
- func (c *ModelClient) DeleteOneID(id int) *ModelDeleteOne
- func (c *ModelClient) Get(ctx context.Context, id int) (*Model, error)
- func (c *ModelClient) GetX(ctx context.Context, id int) *Model
- func (c *ModelClient) Hooks() []Hook
- func (c *ModelClient) Intercept(interceptors ...Interceptor)
- func (c *ModelClient) Interceptors() []Interceptor
- func (c *ModelClient) MapCreateBulk(slice any, setFunc func(*ModelCreate, int)) *ModelCreateBulk
- func (c *ModelClient) Query() *ModelQuery
- func (c *ModelClient) QueryProvider(m *Model) *ProviderQuery
- func (c *ModelClient) Update() *ModelUpdate
- func (c *ModelClient) UpdateOne(m *Model) *ModelUpdateOne
- func (c *ModelClient) UpdateOneID(id int) *ModelUpdateOne
- func (c *ModelClient) Use(hooks ...Hook)
- type ModelCreate
- func (mc *ModelCreate) Exec(ctx context.Context) error
- func (mc *ModelCreate) ExecX(ctx context.Context)
- func (mc *ModelCreate) Mutation() *ModelMutation
- func (mc *ModelCreate) OnConflict(opts ...sql.ConflictOption) *ModelUpsertOne
- func (mc *ModelCreate) OnConflictColumns(columns ...string) *ModelUpsertOne
- func (mc *ModelCreate) Save(ctx context.Context) (*Model, error)
- func (mc *ModelCreate) SaveX(ctx context.Context) *Model
- func (mc *ModelCreate) SetAlias(s string) *ModelCreate
- func (mc *ModelCreate) SetCreatedAt(t time.Time) *ModelCreate
- func (mc *ModelCreate) SetDefault(b bool) *ModelCreate
- func (mc *ModelCreate) SetImage(b bool) *ModelCreate
- func (mc *ModelCreate) SetMaxTokens(i int) *ModelCreate
- func (mc *ModelCreate) SetModel(s string) *ModelCreate
- func (mc *ModelCreate) SetNillableAlias(s *string) *ModelCreate
- func (mc *ModelCreate) SetNillableCreatedAt(t *time.Time) *ModelCreate
- func (mc *ModelCreate) SetNillableDefault(b *bool) *ModelCreate
- func (mc *ModelCreate) SetNillableImage(b *bool) *ModelCreate
- func (mc *ModelCreate) SetNillableMaxTokens(i *int) *ModelCreate
- func (mc *ModelCreate) SetNillableProviderID(id *int) *ModelCreate
- func (mc *ModelCreate) SetNillableRpm(i *int) *ModelCreate
- func (mc *ModelCreate) SetNillableUpdatedAt(t *time.Time) *ModelCreate
- func (mc *ModelCreate) SetProvider(p *Provider) *ModelCreate
- func (mc *ModelCreate) SetProviderID(id int) *ModelCreate
- func (mc *ModelCreate) SetRpm(i int) *ModelCreate
- func (mc *ModelCreate) SetUpdatedAt(t time.Time) *ModelCreate
- type ModelCreateBulk
- func (mcb *ModelCreateBulk) Exec(ctx context.Context) error
- func (mcb *ModelCreateBulk) ExecX(ctx context.Context)
- func (mcb *ModelCreateBulk) OnConflict(opts ...sql.ConflictOption) *ModelUpsertBulk
- func (mcb *ModelCreateBulk) OnConflictColumns(columns ...string) *ModelUpsertBulk
- func (mcb *ModelCreateBulk) Save(ctx context.Context) ([]*Model, error)
- func (mcb *ModelCreateBulk) SaveX(ctx context.Context) []*Model
- type ModelDelete
- type ModelDeleteOne
- type ModelEdges
- type ModelGroupBy
- func (mgb *ModelGroupBy) Aggregate(fns ...AggregateFunc) *ModelGroupBy
- func (s *ModelGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ModelGroupBy) BoolX(ctx context.Context) bool
- func (s *ModelGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ModelGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ModelGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ModelGroupBy) Float64X(ctx context.Context) float64
- func (s *ModelGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ModelGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ModelGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ModelGroupBy) IntX(ctx context.Context) int
- func (s *ModelGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ModelGroupBy) IntsX(ctx context.Context) []int
- func (mgb *ModelGroupBy) Scan(ctx context.Context, v any) error
- func (s *ModelGroupBy) ScanX(ctx context.Context, v any)
- func (s *ModelGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ModelGroupBy) StringX(ctx context.Context) string
- func (s *ModelGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ModelGroupBy) StringsX(ctx context.Context) []string
- type ModelMutation
- func (m *ModelMutation) AddField(name string, value ent.Value) error
- func (m *ModelMutation) AddMaxTokens(i int)
- func (m *ModelMutation) AddRpm(i int)
- func (m *ModelMutation) AddedEdges() []string
- func (m *ModelMutation) AddedField(name string) (ent.Value, bool)
- func (m *ModelMutation) AddedFields() []string
- func (m *ModelMutation) AddedIDs(name string) []ent.Value
- func (m *ModelMutation) AddedMaxTokens() (r int, exists bool)
- func (m *ModelMutation) AddedRpm() (r int, exists bool)
- func (m *ModelMutation) Alias() (r string, exists bool)
- func (m *ModelMutation) AliasCleared() bool
- func (m *ModelMutation) ClearAlias()
- func (m *ModelMutation) ClearCreatedAt()
- func (m *ModelMutation) ClearEdge(name string) error
- func (m *ModelMutation) ClearField(name string) error
- func (m *ModelMutation) ClearMaxTokens()
- func (m *ModelMutation) ClearProvider()
- func (m *ModelMutation) ClearRpm()
- func (m *ModelMutation) ClearUpdatedAt()
- func (m *ModelMutation) ClearedEdges() []string
- func (m *ModelMutation) ClearedFields() []string
- func (m ModelMutation) Client() *Client
- func (m *ModelMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ModelMutation) CreatedAtCleared() bool
- func (m *ModelMutation) Default() (r bool, exists bool)
- func (m *ModelMutation) EdgeCleared(name string) bool
- func (m *ModelMutation) Field(name string) (ent.Value, bool)
- func (m *ModelMutation) FieldCleared(name string) bool
- func (m *ModelMutation) Fields() []string
- func (m *ModelMutation) ID() (id int, exists bool)
- func (m *ModelMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ModelMutation) Image() (r bool, exists bool)
- func (m *ModelMutation) MaxTokens() (r int, exists bool)
- func (m *ModelMutation) MaxTokensCleared() bool
- func (m *ModelMutation) Model() (r string, exists bool)
- func (m *ModelMutation) OldAlias(ctx context.Context) (v string, err error)
- func (m *ModelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ModelMutation) OldDefault(ctx context.Context) (v bool, err error)
- func (m *ModelMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ModelMutation) OldImage(ctx context.Context) (v bool, err error)
- func (m *ModelMutation) OldMaxTokens(ctx context.Context) (v int, err error)
- func (m *ModelMutation) OldModel(ctx context.Context) (v string, err error)
- func (m *ModelMutation) OldRpm(ctx context.Context) (v int, err error)
- func (m *ModelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ModelMutation) Op() Op
- func (m *ModelMutation) ProviderCleared() bool
- func (m *ModelMutation) ProviderID() (id int, exists bool)
- func (m *ModelMutation) ProviderIDs() (ids []int)
- func (m *ModelMutation) RemovedEdges() []string
- func (m *ModelMutation) RemovedIDs(name string) []ent.Value
- func (m *ModelMutation) ResetAlias()
- func (m *ModelMutation) ResetCreatedAt()
- func (m *ModelMutation) ResetDefault()
- func (m *ModelMutation) ResetEdge(name string) error
- func (m *ModelMutation) ResetField(name string) error
- func (m *ModelMutation) ResetImage()
- func (m *ModelMutation) ResetMaxTokens()
- func (m *ModelMutation) ResetModel()
- func (m *ModelMutation) ResetProvider()
- func (m *ModelMutation) ResetRpm()
- func (m *ModelMutation) ResetUpdatedAt()
- func (m *ModelMutation) Rpm() (r int, exists bool)
- func (m *ModelMutation) RpmCleared() bool
- func (m *ModelMutation) SetAlias(s string)
- func (m *ModelMutation) SetCreatedAt(t time.Time)
- func (m *ModelMutation) SetDefault(b bool)
- func (m *ModelMutation) SetField(name string, value ent.Value) error
- func (m *ModelMutation) SetImage(b bool)
- func (m *ModelMutation) SetMaxTokens(i int)
- func (m *ModelMutation) SetModel(s string)
- func (m *ModelMutation) SetOp(op Op)
- func (m *ModelMutation) SetProviderID(id int)
- func (m *ModelMutation) SetRpm(i int)
- func (m *ModelMutation) SetUpdatedAt(t time.Time)
- func (m ModelMutation) Tx() (*Tx, error)
- func (m *ModelMutation) Type() string
- func (m *ModelMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ModelMutation) UpdatedAtCleared() bool
- func (m *ModelMutation) Where(ps ...predicate.Model)
- func (m *ModelMutation) WhereP(ps ...func(*sql.Selector))
- type ModelQuery
- func (mq *ModelQuery) Aggregate(fns ...AggregateFunc) *ModelSelect
- func (mq *ModelQuery) All(ctx context.Context) ([]*Model, error)
- func (mq *ModelQuery) AllX(ctx context.Context) []*Model
- func (mq *ModelQuery) Clone() *ModelQuery
- func (mq *ModelQuery) Count(ctx context.Context) (int, error)
- func (mq *ModelQuery) CountX(ctx context.Context) int
- func (mq *ModelQuery) Exist(ctx context.Context) (bool, error)
- func (mq *ModelQuery) ExistX(ctx context.Context) bool
- func (mq *ModelQuery) First(ctx context.Context) (*Model, error)
- func (mq *ModelQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *ModelQuery) FirstIDX(ctx context.Context) int
- func (mq *ModelQuery) FirstX(ctx context.Context) *Model
- func (mq *ModelQuery) ForShare(opts ...sql.LockOption) *ModelQuery
- func (mq *ModelQuery) ForUpdate(opts ...sql.LockOption) *ModelQuery
- func (mq *ModelQuery) GroupBy(field string, fields ...string) *ModelGroupBy
- func (mq *ModelQuery) IDs(ctx context.Context) (ids []int, err error)
- func (mq *ModelQuery) IDsX(ctx context.Context) []int
- func (mq *ModelQuery) Limit(limit int) *ModelQuery
- func (mq *ModelQuery) Modify(modifiers ...func(s *sql.Selector)) *ModelSelect
- func (mq *ModelQuery) Offset(offset int) *ModelQuery
- func (mq *ModelQuery) Only(ctx context.Context) (*Model, error)
- func (mq *ModelQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *ModelQuery) OnlyIDX(ctx context.Context) int
- func (mq *ModelQuery) OnlyX(ctx context.Context) *Model
- func (mq *ModelQuery) Order(o ...model.OrderOption) *ModelQuery
- func (mq *ModelQuery) QueryProvider() *ProviderQuery
- func (mq *ModelQuery) Select(fields ...string) *ModelSelect
- func (mq *ModelQuery) Unique(unique bool) *ModelQuery
- func (mq *ModelQuery) Where(ps ...predicate.Model) *ModelQuery
- func (mq *ModelQuery) WithProvider(opts ...func(*ProviderQuery)) *ModelQuery
- type ModelSelect
- func (ms *ModelSelect) Aggregate(fns ...AggregateFunc) *ModelSelect
- func (s *ModelSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ModelSelect) BoolX(ctx context.Context) bool
- func (s *ModelSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ModelSelect) BoolsX(ctx context.Context) []bool
- func (s *ModelSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ModelSelect) Float64X(ctx context.Context) float64
- func (s *ModelSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ModelSelect) Float64sX(ctx context.Context) []float64
- func (s *ModelSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ModelSelect) IntX(ctx context.Context) int
- func (s *ModelSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ModelSelect) IntsX(ctx context.Context) []int
- func (ms *ModelSelect) Modify(modifiers ...func(s *sql.Selector)) *ModelSelect
- func (ms *ModelSelect) Scan(ctx context.Context, v any) error
- func (s *ModelSelect) ScanX(ctx context.Context, v any)
- func (s *ModelSelect) String(ctx context.Context) (_ string, err error)
- func (s *ModelSelect) StringX(ctx context.Context) string
- func (s *ModelSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ModelSelect) StringsX(ctx context.Context) []string
- type ModelUpdate
- func (mu *ModelUpdate) AddMaxTokens(i int) *ModelUpdate
- func (mu *ModelUpdate) AddRpm(i int) *ModelUpdate
- func (mu *ModelUpdate) ClearAlias() *ModelUpdate
- func (mu *ModelUpdate) ClearMaxTokens() *ModelUpdate
- func (mu *ModelUpdate) ClearProvider() *ModelUpdate
- func (mu *ModelUpdate) ClearRpm() *ModelUpdate
- func (mu *ModelUpdate) ClearUpdatedAt() *ModelUpdate
- func (mu *ModelUpdate) Exec(ctx context.Context) error
- func (mu *ModelUpdate) ExecX(ctx context.Context)
- func (mu *ModelUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ModelUpdate
- func (mu *ModelUpdate) Mutation() *ModelMutation
- func (mu *ModelUpdate) Save(ctx context.Context) (int, error)
- func (mu *ModelUpdate) SaveX(ctx context.Context) int
- func (mu *ModelUpdate) SetAlias(s string) *ModelUpdate
- func (mu *ModelUpdate) SetDefault(b bool) *ModelUpdate
- func (mu *ModelUpdate) SetImage(b bool) *ModelUpdate
- func (mu *ModelUpdate) SetMaxTokens(i int) *ModelUpdate
- func (mu *ModelUpdate) SetModel(s string) *ModelUpdate
- func (mu *ModelUpdate) SetNillableAlias(s *string) *ModelUpdate
- func (mu *ModelUpdate) SetNillableDefault(b *bool) *ModelUpdate
- func (mu *ModelUpdate) SetNillableImage(b *bool) *ModelUpdate
- func (mu *ModelUpdate) SetNillableMaxTokens(i *int) *ModelUpdate
- func (mu *ModelUpdate) SetNillableModel(s *string) *ModelUpdate
- func (mu *ModelUpdate) SetNillableProviderID(id *int) *ModelUpdate
- func (mu *ModelUpdate) SetNillableRpm(i *int) *ModelUpdate
- func (mu *ModelUpdate) SetProvider(p *Provider) *ModelUpdate
- func (mu *ModelUpdate) SetProviderID(id int) *ModelUpdate
- func (mu *ModelUpdate) SetRpm(i int) *ModelUpdate
- func (mu *ModelUpdate) SetUpdatedAt(t time.Time) *ModelUpdate
- func (mu *ModelUpdate) Where(ps ...predicate.Model) *ModelUpdate
- type ModelUpdateOne
- func (muo *ModelUpdateOne) AddMaxTokens(i int) *ModelUpdateOne
- func (muo *ModelUpdateOne) AddRpm(i int) *ModelUpdateOne
- func (muo *ModelUpdateOne) ClearAlias() *ModelUpdateOne
- func (muo *ModelUpdateOne) ClearMaxTokens() *ModelUpdateOne
- func (muo *ModelUpdateOne) ClearProvider() *ModelUpdateOne
- func (muo *ModelUpdateOne) ClearRpm() *ModelUpdateOne
- func (muo *ModelUpdateOne) ClearUpdatedAt() *ModelUpdateOne
- func (muo *ModelUpdateOne) Exec(ctx context.Context) error
- func (muo *ModelUpdateOne) ExecX(ctx context.Context)
- func (muo *ModelUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ModelUpdateOne
- func (muo *ModelUpdateOne) Mutation() *ModelMutation
- func (muo *ModelUpdateOne) Save(ctx context.Context) (*Model, error)
- func (muo *ModelUpdateOne) SaveX(ctx context.Context) *Model
- func (muo *ModelUpdateOne) Select(field string, fields ...string) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetAlias(s string) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetDefault(b bool) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetImage(b bool) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetMaxTokens(i int) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetModel(s string) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetNillableAlias(s *string) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetNillableDefault(b *bool) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetNillableImage(b *bool) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetNillableMaxTokens(i *int) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetNillableModel(s *string) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetNillableProviderID(id *int) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetNillableRpm(i *int) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetProvider(p *Provider) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetProviderID(id int) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetRpm(i int) *ModelUpdateOne
- func (muo *ModelUpdateOne) SetUpdatedAt(t time.Time) *ModelUpdateOne
- func (muo *ModelUpdateOne) Where(ps ...predicate.Model) *ModelUpdateOne
- type ModelUpsert
- func (u *ModelUpsert) AddMaxTokens(v int) *ModelUpsert
- func (u *ModelUpsert) AddRpm(v int) *ModelUpsert
- func (u *ModelUpsert) ClearAlias() *ModelUpsert
- func (u *ModelUpsert) ClearMaxTokens() *ModelUpsert
- func (u *ModelUpsert) ClearRpm() *ModelUpsert
- func (u *ModelUpsert) ClearUpdatedAt() *ModelUpsert
- func (u *ModelUpsert) SetAlias(v string) *ModelUpsert
- func (u *ModelUpsert) SetDefault(v bool) *ModelUpsert
- func (u *ModelUpsert) SetImage(v bool) *ModelUpsert
- func (u *ModelUpsert) SetMaxTokens(v int) *ModelUpsert
- func (u *ModelUpsert) SetModel(v string) *ModelUpsert
- func (u *ModelUpsert) SetRpm(v int) *ModelUpsert
- func (u *ModelUpsert) SetUpdatedAt(v time.Time) *ModelUpsert
- func (u *ModelUpsert) UpdateAlias() *ModelUpsert
- func (u *ModelUpsert) UpdateDefault() *ModelUpsert
- func (u *ModelUpsert) UpdateImage() *ModelUpsert
- func (u *ModelUpsert) UpdateMaxTokens() *ModelUpsert
- func (u *ModelUpsert) UpdateModel() *ModelUpsert
- func (u *ModelUpsert) UpdateRpm() *ModelUpsert
- func (u *ModelUpsert) UpdateUpdatedAt() *ModelUpsert
- type ModelUpsertBulk
- func (u *ModelUpsertBulk) AddMaxTokens(v int) *ModelUpsertBulk
- func (u *ModelUpsertBulk) AddRpm(v int) *ModelUpsertBulk
- func (u *ModelUpsertBulk) ClearAlias() *ModelUpsertBulk
- func (u *ModelUpsertBulk) ClearMaxTokens() *ModelUpsertBulk
- func (u *ModelUpsertBulk) ClearRpm() *ModelUpsertBulk
- func (u *ModelUpsertBulk) ClearUpdatedAt() *ModelUpsertBulk
- func (u *ModelUpsertBulk) DoNothing() *ModelUpsertBulk
- func (u *ModelUpsertBulk) Exec(ctx context.Context) error
- func (u *ModelUpsertBulk) ExecX(ctx context.Context)
- func (u *ModelUpsertBulk) Ignore() *ModelUpsertBulk
- func (u *ModelUpsertBulk) SetAlias(v string) *ModelUpsertBulk
- func (u *ModelUpsertBulk) SetDefault(v bool) *ModelUpsertBulk
- func (u *ModelUpsertBulk) SetImage(v bool) *ModelUpsertBulk
- func (u *ModelUpsertBulk) SetMaxTokens(v int) *ModelUpsertBulk
- func (u *ModelUpsertBulk) SetModel(v string) *ModelUpsertBulk
- func (u *ModelUpsertBulk) SetRpm(v int) *ModelUpsertBulk
- func (u *ModelUpsertBulk) SetUpdatedAt(v time.Time) *ModelUpsertBulk
- func (u *ModelUpsertBulk) Update(set func(*ModelUpsert)) *ModelUpsertBulk
- func (u *ModelUpsertBulk) UpdateAlias() *ModelUpsertBulk
- func (u *ModelUpsertBulk) UpdateDefault() *ModelUpsertBulk
- func (u *ModelUpsertBulk) UpdateImage() *ModelUpsertBulk
- func (u *ModelUpsertBulk) UpdateMaxTokens() *ModelUpsertBulk
- func (u *ModelUpsertBulk) UpdateModel() *ModelUpsertBulk
- func (u *ModelUpsertBulk) UpdateNewValues() *ModelUpsertBulk
- func (u *ModelUpsertBulk) UpdateRpm() *ModelUpsertBulk
- func (u *ModelUpsertBulk) UpdateUpdatedAt() *ModelUpsertBulk
- type ModelUpsertOne
- func (u *ModelUpsertOne) AddMaxTokens(v int) *ModelUpsertOne
- func (u *ModelUpsertOne) AddRpm(v int) *ModelUpsertOne
- func (u *ModelUpsertOne) ClearAlias() *ModelUpsertOne
- func (u *ModelUpsertOne) ClearMaxTokens() *ModelUpsertOne
- func (u *ModelUpsertOne) ClearRpm() *ModelUpsertOne
- func (u *ModelUpsertOne) ClearUpdatedAt() *ModelUpsertOne
- func (u *ModelUpsertOne) DoNothing() *ModelUpsertOne
- func (u *ModelUpsertOne) Exec(ctx context.Context) error
- func (u *ModelUpsertOne) ExecX(ctx context.Context)
- func (u *ModelUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *ModelUpsertOne) IDX(ctx context.Context) int
- func (u *ModelUpsertOne) Ignore() *ModelUpsertOne
- func (u *ModelUpsertOne) SetAlias(v string) *ModelUpsertOne
- func (u *ModelUpsertOne) SetDefault(v bool) *ModelUpsertOne
- func (u *ModelUpsertOne) SetImage(v bool) *ModelUpsertOne
- func (u *ModelUpsertOne) SetMaxTokens(v int) *ModelUpsertOne
- func (u *ModelUpsertOne) SetModel(v string) *ModelUpsertOne
- func (u *ModelUpsertOne) SetRpm(v int) *ModelUpsertOne
- func (u *ModelUpsertOne) SetUpdatedAt(v time.Time) *ModelUpsertOne
- func (u *ModelUpsertOne) Update(set func(*ModelUpsert)) *ModelUpsertOne
- func (u *ModelUpsertOne) UpdateAlias() *ModelUpsertOne
- func (u *ModelUpsertOne) UpdateDefault() *ModelUpsertOne
- func (u *ModelUpsertOne) UpdateImage() *ModelUpsertOne
- func (u *ModelUpsertOne) UpdateMaxTokens() *ModelUpsertOne
- func (u *ModelUpsertOne) UpdateModel() *ModelUpsertOne
- func (u *ModelUpsertOne) UpdateNewValues() *ModelUpsertOne
- func (u *ModelUpsertOne) UpdateRpm() *ModelUpsertOne
- func (u *ModelUpsertOne) UpdateUpdatedAt() *ModelUpsertOne
- type Models
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Provider
- type ProviderClient
- func (c *ProviderClient) Create() *ProviderCreate
- func (c *ProviderClient) CreateBulk(builders ...*ProviderCreate) *ProviderCreateBulk
- func (c *ProviderClient) Delete() *ProviderDelete
- func (c *ProviderClient) DeleteOne(pr *Provider) *ProviderDeleteOne
- func (c *ProviderClient) DeleteOneID(id int) *ProviderDeleteOne
- func (c *ProviderClient) Get(ctx context.Context, id int) (*Provider, error)
- func (c *ProviderClient) GetX(ctx context.Context, id int) *Provider
- func (c *ProviderClient) Hooks() []Hook
- func (c *ProviderClient) Intercept(interceptors ...Interceptor)
- func (c *ProviderClient) Interceptors() []Interceptor
- func (c *ProviderClient) MapCreateBulk(slice any, setFunc func(*ProviderCreate, int)) *ProviderCreateBulk
- func (c *ProviderClient) Query() *ProviderQuery
- func (c *ProviderClient) QueryModels(pr *Provider) *ModelQuery
- func (c *ProviderClient) Update() *ProviderUpdate
- func (c *ProviderClient) UpdateOne(pr *Provider) *ProviderUpdateOne
- func (c *ProviderClient) UpdateOneID(id int) *ProviderUpdateOne
- func (c *ProviderClient) Use(hooks ...Hook)
- type ProviderCreate
- func (pc *ProviderCreate) AddModelIDs(ids ...int) *ProviderCreate
- func (pc *ProviderCreate) AddModels(m ...*Model) *ProviderCreate
- func (pc *ProviderCreate) Exec(ctx context.Context) error
- func (pc *ProviderCreate) ExecX(ctx context.Context)
- func (pc *ProviderCreate) Mutation() *ProviderMutation
- func (pc *ProviderCreate) OnConflict(opts ...sql.ConflictOption) *ProviderUpsertOne
- func (pc *ProviderCreate) OnConflictColumns(columns ...string) *ProviderUpsertOne
- func (pc *ProviderCreate) Save(ctx context.Context) (*Provider, error)
- func (pc *ProviderCreate) SaveX(ctx context.Context) *Provider
- func (pc *ProviderCreate) SetBaseURL(s string) *ProviderCreate
- func (pc *ProviderCreate) SetCreatedAt(t time.Time) *ProviderCreate
- func (pc *ProviderCreate) SetEnabled(b bool) *ProviderCreate
- func (pc *ProviderCreate) SetKey(s string) *ProviderCreate
- func (pc *ProviderCreate) SetName(s string) *ProviderCreate
- func (pc *ProviderCreate) SetNillableBaseURL(s *string) *ProviderCreate
- func (pc *ProviderCreate) SetNillableCreatedAt(t *time.Time) *ProviderCreate
- func (pc *ProviderCreate) SetNillableEnabled(b *bool) *ProviderCreate
- func (pc *ProviderCreate) SetNillableKey(s *string) *ProviderCreate
- func (pc *ProviderCreate) SetNillableUpdatedAt(t *time.Time) *ProviderCreate
- func (pc *ProviderCreate) SetType(s string) *ProviderCreate
- func (pc *ProviderCreate) SetUpdatedAt(t time.Time) *ProviderCreate
- type ProviderCreateBulk
- func (pcb *ProviderCreateBulk) Exec(ctx context.Context) error
- func (pcb *ProviderCreateBulk) ExecX(ctx context.Context)
- func (pcb *ProviderCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProviderUpsertBulk
- func (pcb *ProviderCreateBulk) OnConflictColumns(columns ...string) *ProviderUpsertBulk
- func (pcb *ProviderCreateBulk) Save(ctx context.Context) ([]*Provider, error)
- func (pcb *ProviderCreateBulk) SaveX(ctx context.Context) []*Provider
- type ProviderDelete
- type ProviderDeleteOne
- type ProviderEdges
- type ProviderGroupBy
- func (pgb *ProviderGroupBy) Aggregate(fns ...AggregateFunc) *ProviderGroupBy
- func (s *ProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProviderGroupBy) BoolX(ctx context.Context) bool
- func (s *ProviderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProviderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProviderGroupBy) Float64X(ctx context.Context) float64
- func (s *ProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProviderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProviderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProviderGroupBy) IntX(ctx context.Context) int
- func (s *ProviderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProviderGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProviderGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProviderGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProviderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProviderGroupBy) StringX(ctx context.Context) string
- func (s *ProviderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProviderGroupBy) StringsX(ctx context.Context) []string
- type ProviderMutation
- func (m *ProviderMutation) AddField(name string, value ent.Value) error
- func (m *ProviderMutation) AddModelIDs(ids ...int)
- func (m *ProviderMutation) AddedEdges() []string
- func (m *ProviderMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProviderMutation) AddedFields() []string
- func (m *ProviderMutation) AddedIDs(name string) []ent.Value
- func (m *ProviderMutation) BaseURL() (r string, exists bool)
- func (m *ProviderMutation) BaseURLCleared() bool
- func (m *ProviderMutation) ClearBaseURL()
- func (m *ProviderMutation) ClearCreatedAt()
- func (m *ProviderMutation) ClearEdge(name string) error
- func (m *ProviderMutation) ClearField(name string) error
- func (m *ProviderMutation) ClearKey()
- func (m *ProviderMutation) ClearModels()
- func (m *ProviderMutation) ClearUpdatedAt()
- func (m *ProviderMutation) ClearedEdges() []string
- func (m *ProviderMutation) ClearedFields() []string
- func (m ProviderMutation) Client() *Client
- func (m *ProviderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProviderMutation) CreatedAtCleared() bool
- func (m *ProviderMutation) EdgeCleared(name string) bool
- func (m *ProviderMutation) Enabled() (r bool, exists bool)
- func (m *ProviderMutation) Field(name string) (ent.Value, bool)
- func (m *ProviderMutation) FieldCleared(name string) bool
- func (m *ProviderMutation) Fields() []string
- func (m *ProviderMutation) GetType() (r string, exists bool)
- func (m *ProviderMutation) ID() (id int, exists bool)
- func (m *ProviderMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ProviderMutation) Key() (r string, exists bool)
- func (m *ProviderMutation) KeyCleared() bool
- func (m *ProviderMutation) ModelsCleared() bool
- func (m *ProviderMutation) ModelsIDs() (ids []int)
- func (m *ProviderMutation) Name() (r string, exists bool)
- func (m *ProviderMutation) OldBaseURL(ctx context.Context) (v string, err error)
- func (m *ProviderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProviderMutation) OldEnabled(ctx context.Context) (v bool, err error)
- func (m *ProviderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProviderMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *ProviderMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProviderMutation) OldType(ctx context.Context) (v string, err error)
- func (m *ProviderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProviderMutation) Op() Op
- func (m *ProviderMutation) RemoveModelIDs(ids ...int)
- func (m *ProviderMutation) RemovedEdges() []string
- func (m *ProviderMutation) RemovedIDs(name string) []ent.Value
- func (m *ProviderMutation) RemovedModelsIDs() (ids []int)
- func (m *ProviderMutation) ResetBaseURL()
- func (m *ProviderMutation) ResetCreatedAt()
- func (m *ProviderMutation) ResetEdge(name string) error
- func (m *ProviderMutation) ResetEnabled()
- func (m *ProviderMutation) ResetField(name string) error
- func (m *ProviderMutation) ResetKey()
- func (m *ProviderMutation) ResetModels()
- func (m *ProviderMutation) ResetName()
- func (m *ProviderMutation) ResetType()
- func (m *ProviderMutation) ResetUpdatedAt()
- func (m *ProviderMutation) SetBaseURL(s string)
- func (m *ProviderMutation) SetCreatedAt(t time.Time)
- func (m *ProviderMutation) SetEnabled(b bool)
- func (m *ProviderMutation) SetField(name string, value ent.Value) error
- func (m *ProviderMutation) SetKey(s string)
- func (m *ProviderMutation) SetName(s string)
- func (m *ProviderMutation) SetOp(op Op)
- func (m *ProviderMutation) SetType(s string)
- func (m *ProviderMutation) SetUpdatedAt(t time.Time)
- func (m ProviderMutation) Tx() (*Tx, error)
- func (m *ProviderMutation) Type() string
- func (m *ProviderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProviderMutation) UpdatedAtCleared() bool
- func (m *ProviderMutation) Where(ps ...predicate.Provider)
- func (m *ProviderMutation) WhereP(ps ...func(*sql.Selector))
- type ProviderQuery
- func (pq *ProviderQuery) Aggregate(fns ...AggregateFunc) *ProviderSelect
- func (pq *ProviderQuery) All(ctx context.Context) ([]*Provider, error)
- func (pq *ProviderQuery) AllX(ctx context.Context) []*Provider
- func (pq *ProviderQuery) Clone() *ProviderQuery
- func (pq *ProviderQuery) Count(ctx context.Context) (int, error)
- func (pq *ProviderQuery) CountX(ctx context.Context) int
- func (pq *ProviderQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProviderQuery) ExistX(ctx context.Context) bool
- func (pq *ProviderQuery) First(ctx context.Context) (*Provider, error)
- func (pq *ProviderQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *ProviderQuery) FirstIDX(ctx context.Context) int
- func (pq *ProviderQuery) FirstX(ctx context.Context) *Provider
- func (pq *ProviderQuery) ForShare(opts ...sql.LockOption) *ProviderQuery
- func (pq *ProviderQuery) ForUpdate(opts ...sql.LockOption) *ProviderQuery
- func (pq *ProviderQuery) GroupBy(field string, fields ...string) *ProviderGroupBy
- func (pq *ProviderQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *ProviderQuery) IDsX(ctx context.Context) []int
- func (pq *ProviderQuery) Limit(limit int) *ProviderQuery
- func (pq *ProviderQuery) Modify(modifiers ...func(s *sql.Selector)) *ProviderSelect
- func (pq *ProviderQuery) Offset(offset int) *ProviderQuery
- func (pq *ProviderQuery) Only(ctx context.Context) (*Provider, error)
- func (pq *ProviderQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *ProviderQuery) OnlyIDX(ctx context.Context) int
- func (pq *ProviderQuery) OnlyX(ctx context.Context) *Provider
- func (pq *ProviderQuery) Order(o ...provider.OrderOption) *ProviderQuery
- func (pq *ProviderQuery) QueryModels() *ModelQuery
- func (pq *ProviderQuery) Select(fields ...string) *ProviderSelect
- func (pq *ProviderQuery) Unique(unique bool) *ProviderQuery
- func (pq *ProviderQuery) Where(ps ...predicate.Provider) *ProviderQuery
- func (pq *ProviderQuery) WithModels(opts ...func(*ModelQuery)) *ProviderQuery
- type ProviderSelect
- func (ps *ProviderSelect) Aggregate(fns ...AggregateFunc) *ProviderSelect
- func (s *ProviderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProviderSelect) BoolX(ctx context.Context) bool
- func (s *ProviderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProviderSelect) BoolsX(ctx context.Context) []bool
- func (s *ProviderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProviderSelect) Float64X(ctx context.Context) float64
- func (s *ProviderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProviderSelect) Float64sX(ctx context.Context) []float64
- func (s *ProviderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProviderSelect) IntX(ctx context.Context) int
- func (s *ProviderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProviderSelect) IntsX(ctx context.Context) []int
- func (ps *ProviderSelect) Modify(modifiers ...func(s *sql.Selector)) *ProviderSelect
- func (ps *ProviderSelect) Scan(ctx context.Context, v any) error
- func (s *ProviderSelect) ScanX(ctx context.Context, v any)
- func (s *ProviderSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProviderSelect) StringX(ctx context.Context) string
- func (s *ProviderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProviderSelect) StringsX(ctx context.Context) []string
- type ProviderUpdate
- func (pu *ProviderUpdate) AddModelIDs(ids ...int) *ProviderUpdate
- func (pu *ProviderUpdate) AddModels(m ...*Model) *ProviderUpdate
- func (pu *ProviderUpdate) ClearBaseURL() *ProviderUpdate
- func (pu *ProviderUpdate) ClearKey() *ProviderUpdate
- func (pu *ProviderUpdate) ClearModels() *ProviderUpdate
- func (pu *ProviderUpdate) ClearUpdatedAt() *ProviderUpdate
- func (pu *ProviderUpdate) Exec(ctx context.Context) error
- func (pu *ProviderUpdate) ExecX(ctx context.Context)
- func (pu *ProviderUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProviderUpdate
- func (pu *ProviderUpdate) Mutation() *ProviderMutation
- func (pu *ProviderUpdate) RemoveModelIDs(ids ...int) *ProviderUpdate
- func (pu *ProviderUpdate) RemoveModels(m ...*Model) *ProviderUpdate
- func (pu *ProviderUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProviderUpdate) SaveX(ctx context.Context) int
- func (pu *ProviderUpdate) SetBaseURL(s string) *ProviderUpdate
- func (pu *ProviderUpdate) SetEnabled(b bool) *ProviderUpdate
- func (pu *ProviderUpdate) SetKey(s string) *ProviderUpdate
- func (pu *ProviderUpdate) SetName(s string) *ProviderUpdate
- func (pu *ProviderUpdate) SetNillableBaseURL(s *string) *ProviderUpdate
- func (pu *ProviderUpdate) SetNillableEnabled(b *bool) *ProviderUpdate
- func (pu *ProviderUpdate) SetNillableKey(s *string) *ProviderUpdate
- func (pu *ProviderUpdate) SetNillableName(s *string) *ProviderUpdate
- func (pu *ProviderUpdate) SetNillableType(s *string) *ProviderUpdate
- func (pu *ProviderUpdate) SetType(s string) *ProviderUpdate
- func (pu *ProviderUpdate) SetUpdatedAt(t time.Time) *ProviderUpdate
- func (pu *ProviderUpdate) Where(ps ...predicate.Provider) *ProviderUpdate
- type ProviderUpdateOne
- func (puo *ProviderUpdateOne) AddModelIDs(ids ...int) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) AddModels(m ...*Model) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) ClearBaseURL() *ProviderUpdateOne
- func (puo *ProviderUpdateOne) ClearKey() *ProviderUpdateOne
- func (puo *ProviderUpdateOne) ClearModels() *ProviderUpdateOne
- func (puo *ProviderUpdateOne) ClearUpdatedAt() *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Exec(ctx context.Context) error
- func (puo *ProviderUpdateOne) ExecX(ctx context.Context)
- func (puo *ProviderUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Mutation() *ProviderMutation
- func (puo *ProviderUpdateOne) RemoveModelIDs(ids ...int) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) RemoveModels(m ...*Model) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Save(ctx context.Context) (*Provider, error)
- func (puo *ProviderUpdateOne) SaveX(ctx context.Context) *Provider
- func (puo *ProviderUpdateOne) Select(field string, fields ...string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetBaseURL(s string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetEnabled(b bool) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetKey(s string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetName(s string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetNillableBaseURL(s *string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetNillableEnabled(b *bool) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetNillableKey(s *string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetNillableName(s *string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetNillableType(s *string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetType(s string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetUpdatedAt(t time.Time) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Where(ps ...predicate.Provider) *ProviderUpdateOne
- type ProviderUpsert
- func (u *ProviderUpsert) ClearBaseURL() *ProviderUpsert
- func (u *ProviderUpsert) ClearKey() *ProviderUpsert
- func (u *ProviderUpsert) ClearUpdatedAt() *ProviderUpsert
- func (u *ProviderUpsert) SetBaseURL(v string) *ProviderUpsert
- func (u *ProviderUpsert) SetEnabled(v bool) *ProviderUpsert
- func (u *ProviderUpsert) SetKey(v string) *ProviderUpsert
- func (u *ProviderUpsert) SetName(v string) *ProviderUpsert
- func (u *ProviderUpsert) SetType(v string) *ProviderUpsert
- func (u *ProviderUpsert) SetUpdatedAt(v time.Time) *ProviderUpsert
- func (u *ProviderUpsert) UpdateBaseURL() *ProviderUpsert
- func (u *ProviderUpsert) UpdateEnabled() *ProviderUpsert
- func (u *ProviderUpsert) UpdateKey() *ProviderUpsert
- func (u *ProviderUpsert) UpdateName() *ProviderUpsert
- func (u *ProviderUpsert) UpdateType() *ProviderUpsert
- func (u *ProviderUpsert) UpdateUpdatedAt() *ProviderUpsert
- type ProviderUpsertBulk
- func (u *ProviderUpsertBulk) ClearBaseURL() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) ClearKey() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) ClearUpdatedAt() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) DoNothing() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) Exec(ctx context.Context) error
- func (u *ProviderUpsertBulk) ExecX(ctx context.Context)
- func (u *ProviderUpsertBulk) Ignore() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) SetBaseURL(v string) *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) SetEnabled(v bool) *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) SetKey(v string) *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) SetName(v string) *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) SetType(v string) *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) SetUpdatedAt(v time.Time) *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) Update(set func(*ProviderUpsert)) *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) UpdateBaseURL() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) UpdateEnabled() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) UpdateKey() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) UpdateName() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) UpdateNewValues() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) UpdateType() *ProviderUpsertBulk
- func (u *ProviderUpsertBulk) UpdateUpdatedAt() *ProviderUpsertBulk
- type ProviderUpsertOne
- func (u *ProviderUpsertOne) ClearBaseURL() *ProviderUpsertOne
- func (u *ProviderUpsertOne) ClearKey() *ProviderUpsertOne
- func (u *ProviderUpsertOne) ClearUpdatedAt() *ProviderUpsertOne
- func (u *ProviderUpsertOne) DoNothing() *ProviderUpsertOne
- func (u *ProviderUpsertOne) Exec(ctx context.Context) error
- func (u *ProviderUpsertOne) ExecX(ctx context.Context)
- func (u *ProviderUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *ProviderUpsertOne) IDX(ctx context.Context) int
- func (u *ProviderUpsertOne) Ignore() *ProviderUpsertOne
- func (u *ProviderUpsertOne) SetBaseURL(v string) *ProviderUpsertOne
- func (u *ProviderUpsertOne) SetEnabled(v bool) *ProviderUpsertOne
- func (u *ProviderUpsertOne) SetKey(v string) *ProviderUpsertOne
- func (u *ProviderUpsertOne) SetName(v string) *ProviderUpsertOne
- func (u *ProviderUpsertOne) SetType(v string) *ProviderUpsertOne
- func (u *ProviderUpsertOne) SetUpdatedAt(v time.Time) *ProviderUpsertOne
- func (u *ProviderUpsertOne) Update(set func(*ProviderUpsert)) *ProviderUpsertOne
- func (u *ProviderUpsertOne) UpdateBaseURL() *ProviderUpsertOne
- func (u *ProviderUpsertOne) UpdateEnabled() *ProviderUpsertOne
- func (u *ProviderUpsertOne) UpdateKey() *ProviderUpsertOne
- func (u *ProviderUpsertOne) UpdateName() *ProviderUpsertOne
- func (u *ProviderUpsertOne) UpdateNewValues() *ProviderUpsertOne
- func (u *ProviderUpsertOne) UpdateType() *ProviderUpsertOne
- func (u *ProviderUpsertOne) UpdateUpdatedAt() *ProviderUpsertOne
- type Providers
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TableColumn
- type TableColumnClient
- func (c *TableColumnClient) Create() *TableColumnCreate
- func (c *TableColumnClient) CreateBulk(builders ...*TableColumnCreate) *TableColumnCreateBulk
- func (c *TableColumnClient) Delete() *TableColumnDelete
- func (c *TableColumnClient) DeleteOne(tc *TableColumn) *TableColumnDeleteOne
- func (c *TableColumnClient) DeleteOneID(id int) *TableColumnDeleteOne
- func (c *TableColumnClient) Get(ctx context.Context, id int) (*TableColumn, error)
- func (c *TableColumnClient) GetX(ctx context.Context, id int) *TableColumn
- func (c *TableColumnClient) Hooks() []Hook
- func (c *TableColumnClient) Intercept(interceptors ...Interceptor)
- func (c *TableColumnClient) Interceptors() []Interceptor
- func (c *TableColumnClient) MapCreateBulk(slice any, setFunc func(*TableColumnCreate, int)) *TableColumnCreateBulk
- func (c *TableColumnClient) Query() *TableColumnQuery
- func (c *TableColumnClient) QueryTablemeta(tc *TableColumn) *TableMetaQuery
- func (c *TableColumnClient) Update() *TableColumnUpdate
- func (c *TableColumnClient) UpdateOne(tc *TableColumn) *TableColumnUpdateOne
- func (c *TableColumnClient) UpdateOneID(id int) *TableColumnUpdateOne
- func (c *TableColumnClient) Use(hooks ...Hook)
- type TableColumnCreate
- func (tcc *TableColumnCreate) Exec(ctx context.Context) error
- func (tcc *TableColumnCreate) ExecX(ctx context.Context)
- func (tcc *TableColumnCreate) Mutation() *TableColumnMutation
- func (tcc *TableColumnCreate) OnConflict(opts ...sql.ConflictOption) *TableColumnUpsertOne
- func (tcc *TableColumnCreate) OnConflictColumns(columns ...string) *TableColumnUpsertOne
- func (tcc *TableColumnCreate) Save(ctx context.Context) (*TableColumn, error)
- func (tcc *TableColumnCreate) SaveX(ctx context.Context) *TableColumn
- func (tcc *TableColumnCreate) SetContextLength(i int) *TableColumnCreate
- func (tcc *TableColumnCreate) SetCreatedAt(t time.Time) *TableColumnCreate
- func (tcc *TableColumnCreate) SetDescription(s string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetFillMode(tm tablecolumn.FillMode) *TableColumnCreate
- func (tcc *TableColumnCreate) SetLinkedColumn(s string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetLinkedContextColumns(s []string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetName(s string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNanoid(s string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableContextLength(i *int) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableCreatedAt(t *time.Time) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableDescription(s *string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableLinkedColumn(s *string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableNanoid(s *string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableRandom(b *bool) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableRepeat(i *int) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableReplacement(b *bool) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableSource(s *string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableSourceID(s *string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableSourceType(tt *tablecolumn.SourceType) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableUpdatedAt(t *time.Time) *TableColumnCreate
- func (tcc *TableColumnCreate) SetOptions(s []string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetRandom(b bool) *TableColumnCreate
- func (tcc *TableColumnCreate) SetRepeat(i int) *TableColumnCreate
- func (tcc *TableColumnCreate) SetReplacement(b bool) *TableColumnCreate
- func (tcc *TableColumnCreate) SetSource(s string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetSourceID(s string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetSourceType(tt tablecolumn.SourceType) *TableColumnCreate
- func (tcc *TableColumnCreate) SetTableID(i int) *TableColumnCreate
- func (tcc *TableColumnCreate) SetTablemeta(t *TableMeta) *TableColumnCreate
- func (tcc *TableColumnCreate) SetTablemetaID(id int) *TableColumnCreate
- func (tcc *TableColumnCreate) SetType(t tablecolumn.Type) *TableColumnCreate
- func (tcc *TableColumnCreate) SetUpdatedAt(t time.Time) *TableColumnCreate
- type TableColumnCreateBulk
- func (tccb *TableColumnCreateBulk) Exec(ctx context.Context) error
- func (tccb *TableColumnCreateBulk) ExecX(ctx context.Context)
- func (tccb *TableColumnCreateBulk) OnConflict(opts ...sql.ConflictOption) *TableColumnUpsertBulk
- func (tccb *TableColumnCreateBulk) OnConflictColumns(columns ...string) *TableColumnUpsertBulk
- func (tccb *TableColumnCreateBulk) Save(ctx context.Context) ([]*TableColumn, error)
- func (tccb *TableColumnCreateBulk) SaveX(ctx context.Context) []*TableColumn
- type TableColumnDelete
- type TableColumnDeleteOne
- type TableColumnEdges
- type TableColumnGroupBy
- func (tcgb *TableColumnGroupBy) Aggregate(fns ...AggregateFunc) *TableColumnGroupBy
- func (s *TableColumnGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TableColumnGroupBy) BoolX(ctx context.Context) bool
- func (s *TableColumnGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TableColumnGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TableColumnGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TableColumnGroupBy) Float64X(ctx context.Context) float64
- func (s *TableColumnGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TableColumnGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TableColumnGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TableColumnGroupBy) IntX(ctx context.Context) int
- func (s *TableColumnGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TableColumnGroupBy) IntsX(ctx context.Context) []int
- func (tcgb *TableColumnGroupBy) Scan(ctx context.Context, v any) error
- func (s *TableColumnGroupBy) ScanX(ctx context.Context, v any)
- func (s *TableColumnGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TableColumnGroupBy) StringX(ctx context.Context) string
- func (s *TableColumnGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TableColumnGroupBy) StringsX(ctx context.Context) []string
- type TableColumnMutation
- func (m *TableColumnMutation) AddContextLength(i int)
- func (m *TableColumnMutation) AddField(name string, value ent.Value) error
- func (m *TableColumnMutation) AddRepeat(i int)
- func (m *TableColumnMutation) AddedContextLength() (r int, exists bool)
- func (m *TableColumnMutation) AddedEdges() []string
- func (m *TableColumnMutation) AddedField(name string) (ent.Value, bool)
- func (m *TableColumnMutation) AddedFields() []string
- func (m *TableColumnMutation) AddedIDs(name string) []ent.Value
- func (m *TableColumnMutation) AddedRepeat() (r int, exists bool)
- func (m *TableColumnMutation) AppendLinkedContextColumns(s []string)
- func (m *TableColumnMutation) AppendOptions(s []string)
- func (m *TableColumnMutation) AppendedLinkedContextColumns() ([]string, bool)
- func (m *TableColumnMutation) AppendedOptions() ([]string, bool)
- func (m *TableColumnMutation) ClearCreatedAt()
- func (m *TableColumnMutation) ClearDescription()
- func (m *TableColumnMutation) ClearEdge(name string) error
- func (m *TableColumnMutation) ClearField(name string) error
- func (m *TableColumnMutation) ClearNanoid()
- func (m *TableColumnMutation) ClearOptions()
- func (m *TableColumnMutation) ClearSource()
- func (m *TableColumnMutation) ClearSourceID()
- func (m *TableColumnMutation) ClearSourceType()
- func (m *TableColumnMutation) ClearTablemeta()
- func (m *TableColumnMutation) ClearUpdatedAt()
- func (m *TableColumnMutation) ClearedEdges() []string
- func (m *TableColumnMutation) ClearedFields() []string
- func (m TableColumnMutation) Client() *Client
- func (m *TableColumnMutation) ContextLength() (r int, exists bool)
- func (m *TableColumnMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TableColumnMutation) CreatedAtCleared() bool
- func (m *TableColumnMutation) Description() (r string, exists bool)
- func (m *TableColumnMutation) DescriptionCleared() bool
- func (m *TableColumnMutation) EdgeCleared(name string) bool
- func (m *TableColumnMutation) Field(name string) (ent.Value, bool)
- func (m *TableColumnMutation) FieldCleared(name string) bool
- func (m *TableColumnMutation) Fields() []string
- func (m *TableColumnMutation) FillMode() (r tablecolumn.FillMode, exists bool)
- func (m *TableColumnMutation) GetType() (r tablecolumn.Type, exists bool)
- func (m *TableColumnMutation) ID() (id int, exists bool)
- func (m *TableColumnMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TableColumnMutation) LinkedColumn() (r string, exists bool)
- func (m *TableColumnMutation) LinkedContextColumns() (r []string, exists bool)
- func (m *TableColumnMutation) Name() (r string, exists bool)
- func (m *TableColumnMutation) Nanoid() (r string, exists bool)
- func (m *TableColumnMutation) NanoidCleared() bool
- func (m *TableColumnMutation) OldContextLength(ctx context.Context) (v int, err error)
- func (m *TableColumnMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TableColumnMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *TableColumnMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TableColumnMutation) OldFillMode(ctx context.Context) (v tablecolumn.FillMode, err error)
- func (m *TableColumnMutation) OldLinkedColumn(ctx context.Context) (v string, err error)
- func (m *TableColumnMutation) OldLinkedContextColumns(ctx context.Context) (v []string, err error)
- func (m *TableColumnMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TableColumnMutation) OldNanoid(ctx context.Context) (v string, err error)
- func (m *TableColumnMutation) OldOptions(ctx context.Context) (v []string, err error)
- func (m *TableColumnMutation) OldRandom(ctx context.Context) (v bool, err error)
- func (m *TableColumnMutation) OldRepeat(ctx context.Context) (v int, err error)
- func (m *TableColumnMutation) OldReplacement(ctx context.Context) (v bool, err error)
- func (m *TableColumnMutation) OldSource(ctx context.Context) (v string, err error)
- func (m *TableColumnMutation) OldSourceID(ctx context.Context) (v string, err error)
- func (m *TableColumnMutation) OldSourceType(ctx context.Context) (v tablecolumn.SourceType, err error)
- func (m *TableColumnMutation) OldTableID(ctx context.Context) (v int, err error)
- func (m *TableColumnMutation) OldType(ctx context.Context) (v tablecolumn.Type, err error)
- func (m *TableColumnMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TableColumnMutation) Op() Op
- func (m *TableColumnMutation) Options() (r []string, exists bool)
- func (m *TableColumnMutation) OptionsCleared() bool
- func (m *TableColumnMutation) Random() (r bool, exists bool)
- func (m *TableColumnMutation) RemovedEdges() []string
- func (m *TableColumnMutation) RemovedIDs(name string) []ent.Value
- func (m *TableColumnMutation) Repeat() (r int, exists bool)
- func (m *TableColumnMutation) Replacement() (r bool, exists bool)
- func (m *TableColumnMutation) ResetContextLength()
- func (m *TableColumnMutation) ResetCreatedAt()
- func (m *TableColumnMutation) ResetDescription()
- func (m *TableColumnMutation) ResetEdge(name string) error
- func (m *TableColumnMutation) ResetField(name string) error
- func (m *TableColumnMutation) ResetFillMode()
- func (m *TableColumnMutation) ResetLinkedColumn()
- func (m *TableColumnMutation) ResetLinkedContextColumns()
- func (m *TableColumnMutation) ResetName()
- func (m *TableColumnMutation) ResetNanoid()
- func (m *TableColumnMutation) ResetOptions()
- func (m *TableColumnMutation) ResetRandom()
- func (m *TableColumnMutation) ResetRepeat()
- func (m *TableColumnMutation) ResetReplacement()
- func (m *TableColumnMutation) ResetSource()
- func (m *TableColumnMutation) ResetSourceID()
- func (m *TableColumnMutation) ResetSourceType()
- func (m *TableColumnMutation) ResetTableID()
- func (m *TableColumnMutation) ResetTablemeta()
- func (m *TableColumnMutation) ResetType()
- func (m *TableColumnMutation) ResetUpdatedAt()
- func (m *TableColumnMutation) SetContextLength(i int)
- func (m *TableColumnMutation) SetCreatedAt(t time.Time)
- func (m *TableColumnMutation) SetDescription(s string)
- func (m *TableColumnMutation) SetField(name string, value ent.Value) error
- func (m *TableColumnMutation) SetFillMode(tm tablecolumn.FillMode)
- func (m *TableColumnMutation) SetLinkedColumn(s string)
- func (m *TableColumnMutation) SetLinkedContextColumns(s []string)
- func (m *TableColumnMutation) SetName(s string)
- func (m *TableColumnMutation) SetNanoid(s string)
- func (m *TableColumnMutation) SetOp(op Op)
- func (m *TableColumnMutation) SetOptions(s []string)
- func (m *TableColumnMutation) SetRandom(b bool)
- func (m *TableColumnMutation) SetRepeat(i int)
- func (m *TableColumnMutation) SetReplacement(b bool)
- func (m *TableColumnMutation) SetSource(s string)
- func (m *TableColumnMutation) SetSourceID(s string)
- func (m *TableColumnMutation) SetSourceType(tt tablecolumn.SourceType)
- func (m *TableColumnMutation) SetTableID(i int)
- func (m *TableColumnMutation) SetTablemetaID(id int)
- func (m *TableColumnMutation) SetType(t tablecolumn.Type)
- func (m *TableColumnMutation) SetUpdatedAt(t time.Time)
- func (m *TableColumnMutation) Source() (r string, exists bool)
- func (m *TableColumnMutation) SourceCleared() bool
- func (m *TableColumnMutation) SourceID() (r string, exists bool)
- func (m *TableColumnMutation) SourceIDCleared() bool
- func (m *TableColumnMutation) SourceType() (r tablecolumn.SourceType, exists bool)
- func (m *TableColumnMutation) SourceTypeCleared() bool
- func (m *TableColumnMutation) TableID() (r int, exists bool)
- func (m *TableColumnMutation) TablemetaCleared() bool
- func (m *TableColumnMutation) TablemetaID() (id int, exists bool)
- func (m *TableColumnMutation) TablemetaIDs() (ids []int)
- func (m TableColumnMutation) Tx() (*Tx, error)
- func (m *TableColumnMutation) Type() string
- func (m *TableColumnMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *TableColumnMutation) UpdatedAtCleared() bool
- func (m *TableColumnMutation) Where(ps ...predicate.TableColumn)
- func (m *TableColumnMutation) WhereP(ps ...func(*sql.Selector))
- type TableColumnQuery
- func (tcq *TableColumnQuery) Aggregate(fns ...AggregateFunc) *TableColumnSelect
- func (tcq *TableColumnQuery) All(ctx context.Context) ([]*TableColumn, error)
- func (tcq *TableColumnQuery) AllX(ctx context.Context) []*TableColumn
- func (tcq *TableColumnQuery) Clone() *TableColumnQuery
- func (tcq *TableColumnQuery) Count(ctx context.Context) (int, error)
- func (tcq *TableColumnQuery) CountX(ctx context.Context) int
- func (tcq *TableColumnQuery) Exist(ctx context.Context) (bool, error)
- func (tcq *TableColumnQuery) ExistX(ctx context.Context) bool
- func (tcq *TableColumnQuery) First(ctx context.Context) (*TableColumn, error)
- func (tcq *TableColumnQuery) FirstID(ctx context.Context) (id int, err error)
- func (tcq *TableColumnQuery) FirstIDX(ctx context.Context) int
- func (tcq *TableColumnQuery) FirstX(ctx context.Context) *TableColumn
- func (tcq *TableColumnQuery) ForShare(opts ...sql.LockOption) *TableColumnQuery
- func (tcq *TableColumnQuery) ForUpdate(opts ...sql.LockOption) *TableColumnQuery
- func (tcq *TableColumnQuery) GroupBy(field string, fields ...string) *TableColumnGroupBy
- func (tcq *TableColumnQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tcq *TableColumnQuery) IDsX(ctx context.Context) []int
- func (tcq *TableColumnQuery) Limit(limit int) *TableColumnQuery
- func (tcq *TableColumnQuery) Modify(modifiers ...func(s *sql.Selector)) *TableColumnSelect
- func (tcq *TableColumnQuery) Offset(offset int) *TableColumnQuery
- func (tcq *TableColumnQuery) Only(ctx context.Context) (*TableColumn, error)
- func (tcq *TableColumnQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tcq *TableColumnQuery) OnlyIDX(ctx context.Context) int
- func (tcq *TableColumnQuery) OnlyX(ctx context.Context) *TableColumn
- func (tcq *TableColumnQuery) Order(o ...tablecolumn.OrderOption) *TableColumnQuery
- func (tcq *TableColumnQuery) QueryTablemeta() *TableMetaQuery
- func (tcq *TableColumnQuery) Select(fields ...string) *TableColumnSelect
- func (tcq *TableColumnQuery) Unique(unique bool) *TableColumnQuery
- func (tcq *TableColumnQuery) Where(ps ...predicate.TableColumn) *TableColumnQuery
- func (tcq *TableColumnQuery) WithTablemeta(opts ...func(*TableMetaQuery)) *TableColumnQuery
- type TableColumnSelect
- func (tcs *TableColumnSelect) Aggregate(fns ...AggregateFunc) *TableColumnSelect
- func (s *TableColumnSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TableColumnSelect) BoolX(ctx context.Context) bool
- func (s *TableColumnSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TableColumnSelect) BoolsX(ctx context.Context) []bool
- func (s *TableColumnSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TableColumnSelect) Float64X(ctx context.Context) float64
- func (s *TableColumnSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TableColumnSelect) Float64sX(ctx context.Context) []float64
- func (s *TableColumnSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TableColumnSelect) IntX(ctx context.Context) int
- func (s *TableColumnSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TableColumnSelect) IntsX(ctx context.Context) []int
- func (tcs *TableColumnSelect) Modify(modifiers ...func(s *sql.Selector)) *TableColumnSelect
- func (tcs *TableColumnSelect) Scan(ctx context.Context, v any) error
- func (s *TableColumnSelect) ScanX(ctx context.Context, v any)
- func (s *TableColumnSelect) String(ctx context.Context) (_ string, err error)
- func (s *TableColumnSelect) StringX(ctx context.Context) string
- func (s *TableColumnSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TableColumnSelect) StringsX(ctx context.Context) []string
- type TableColumnUpdate
- func (tcu *TableColumnUpdate) AddContextLength(i int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) AddRepeat(i int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) AppendLinkedContextColumns(s []string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) AppendOptions(s []string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearDescription() *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearNanoid() *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearOptions() *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearSource() *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearSourceID() *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearSourceType() *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearTablemeta() *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearUpdatedAt() *TableColumnUpdate
- func (tcu *TableColumnUpdate) Exec(ctx context.Context) error
- func (tcu *TableColumnUpdate) ExecX(ctx context.Context)
- func (tcu *TableColumnUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableColumnUpdate
- func (tcu *TableColumnUpdate) Mutation() *TableColumnMutation
- func (tcu *TableColumnUpdate) Save(ctx context.Context) (int, error)
- func (tcu *TableColumnUpdate) SaveX(ctx context.Context) int
- func (tcu *TableColumnUpdate) SetContextLength(i int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetDescription(s string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetFillMode(tm tablecolumn.FillMode) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetLinkedColumn(s string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetLinkedContextColumns(s []string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetName(s string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNanoid(s string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableContextLength(i *int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableDescription(s *string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableFillMode(tm *tablecolumn.FillMode) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableLinkedColumn(s *string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableName(s *string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableNanoid(s *string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableRandom(b *bool) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableRepeat(i *int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableReplacement(b *bool) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableSource(s *string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableSourceID(s *string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableSourceType(tt *tablecolumn.SourceType) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableTableID(i *int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableType(t *tablecolumn.Type) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetOptions(s []string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetRandom(b bool) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetRepeat(i int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetReplacement(b bool) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetSource(s string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetSourceID(s string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetSourceType(tt tablecolumn.SourceType) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetTableID(i int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetTablemeta(t *TableMeta) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetTablemetaID(id int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetType(t tablecolumn.Type) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetUpdatedAt(t time.Time) *TableColumnUpdate
- func (tcu *TableColumnUpdate) Where(ps ...predicate.TableColumn) *TableColumnUpdate
- type TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) AddContextLength(i int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) AddRepeat(i int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) AppendLinkedContextColumns(s []string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) AppendOptions(s []string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearDescription() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearNanoid() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearOptions() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearSource() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearSourceID() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearSourceType() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearTablemeta() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearUpdatedAt() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) Exec(ctx context.Context) error
- func (tcuo *TableColumnUpdateOne) ExecX(ctx context.Context)
- func (tcuo *TableColumnUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) Mutation() *TableColumnMutation
- func (tcuo *TableColumnUpdateOne) Save(ctx context.Context) (*TableColumn, error)
- func (tcuo *TableColumnUpdateOne) SaveX(ctx context.Context) *TableColumn
- func (tcuo *TableColumnUpdateOne) Select(field string, fields ...string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetContextLength(i int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetDescription(s string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetFillMode(tm tablecolumn.FillMode) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetLinkedColumn(s string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetLinkedContextColumns(s []string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetName(s string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNanoid(s string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableContextLength(i *int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableDescription(s *string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableFillMode(tm *tablecolumn.FillMode) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableLinkedColumn(s *string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableName(s *string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableNanoid(s *string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableRandom(b *bool) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableRepeat(i *int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableReplacement(b *bool) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableSource(s *string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableSourceID(s *string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableSourceType(tt *tablecolumn.SourceType) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableTableID(i *int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableType(t *tablecolumn.Type) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetOptions(s []string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetRandom(b bool) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetRepeat(i int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetReplacement(b bool) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetSource(s string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetSourceID(s string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetSourceType(tt tablecolumn.SourceType) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetTableID(i int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetTablemeta(t *TableMeta) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetTablemetaID(id int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetType(t tablecolumn.Type) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetUpdatedAt(t time.Time) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) Where(ps ...predicate.TableColumn) *TableColumnUpdateOne
- type TableColumnUpsert
- func (u *TableColumnUpsert) AddContextLength(v int) *TableColumnUpsert
- func (u *TableColumnUpsert) AddRepeat(v int) *TableColumnUpsert
- func (u *TableColumnUpsert) ClearDescription() *TableColumnUpsert
- func (u *TableColumnUpsert) ClearNanoid() *TableColumnUpsert
- func (u *TableColumnUpsert) ClearOptions() *TableColumnUpsert
- func (u *TableColumnUpsert) ClearSource() *TableColumnUpsert
- func (u *TableColumnUpsert) ClearSourceID() *TableColumnUpsert
- func (u *TableColumnUpsert) ClearSourceType() *TableColumnUpsert
- func (u *TableColumnUpsert) ClearUpdatedAt() *TableColumnUpsert
- func (u *TableColumnUpsert) SetContextLength(v int) *TableColumnUpsert
- func (u *TableColumnUpsert) SetDescription(v string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetFillMode(v tablecolumn.FillMode) *TableColumnUpsert
- func (u *TableColumnUpsert) SetLinkedColumn(v string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetLinkedContextColumns(v []string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetName(v string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetNanoid(v string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetOptions(v []string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetRandom(v bool) *TableColumnUpsert
- func (u *TableColumnUpsert) SetRepeat(v int) *TableColumnUpsert
- func (u *TableColumnUpsert) SetReplacement(v bool) *TableColumnUpsert
- func (u *TableColumnUpsert) SetSource(v string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetSourceID(v string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetSourceType(v tablecolumn.SourceType) *TableColumnUpsert
- func (u *TableColumnUpsert) SetTableID(v int) *TableColumnUpsert
- func (u *TableColumnUpsert) SetType(v tablecolumn.Type) *TableColumnUpsert
- func (u *TableColumnUpsert) SetUpdatedAt(v time.Time) *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateContextLength() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateDescription() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateFillMode() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateLinkedColumn() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateLinkedContextColumns() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateName() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateNanoid() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateOptions() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateRandom() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateRepeat() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateReplacement() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateSource() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateSourceID() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateSourceType() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateTableID() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateType() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateUpdatedAt() *TableColumnUpsert
- type TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) AddContextLength(v int) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) AddRepeat(v int) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) ClearDescription() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) ClearNanoid() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) ClearOptions() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) ClearSource() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) ClearSourceID() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) ClearSourceType() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) ClearUpdatedAt() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) DoNothing() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) Exec(ctx context.Context) error
- func (u *TableColumnUpsertBulk) ExecX(ctx context.Context)
- func (u *TableColumnUpsertBulk) Ignore() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetContextLength(v int) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetDescription(v string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetFillMode(v tablecolumn.FillMode) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetLinkedColumn(v string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetLinkedContextColumns(v []string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetName(v string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetNanoid(v string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetOptions(v []string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetRandom(v bool) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetRepeat(v int) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetReplacement(v bool) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetSource(v string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetSourceID(v string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetSourceType(v tablecolumn.SourceType) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetTableID(v int) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetType(v tablecolumn.Type) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetUpdatedAt(v time.Time) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) Update(set func(*TableColumnUpsert)) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateContextLength() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateDescription() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateFillMode() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateLinkedColumn() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateLinkedContextColumns() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateName() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateNanoid() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateNewValues() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateOptions() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateRandom() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateRepeat() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateReplacement() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateSource() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateSourceID() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateSourceType() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateTableID() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateType() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateUpdatedAt() *TableColumnUpsertBulk
- type TableColumnUpsertOne
- func (u *TableColumnUpsertOne) AddContextLength(v int) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) AddRepeat(v int) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) ClearDescription() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) ClearNanoid() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) ClearOptions() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) ClearSource() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) ClearSourceID() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) ClearSourceType() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) ClearUpdatedAt() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) DoNothing() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) Exec(ctx context.Context) error
- func (u *TableColumnUpsertOne) ExecX(ctx context.Context)
- func (u *TableColumnUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *TableColumnUpsertOne) IDX(ctx context.Context) int
- func (u *TableColumnUpsertOne) Ignore() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetContextLength(v int) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetDescription(v string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetFillMode(v tablecolumn.FillMode) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetLinkedColumn(v string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetLinkedContextColumns(v []string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetName(v string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetNanoid(v string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetOptions(v []string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetRandom(v bool) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetRepeat(v int) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetReplacement(v bool) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetSource(v string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetSourceID(v string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetSourceType(v tablecolumn.SourceType) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetTableID(v int) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetType(v tablecolumn.Type) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetUpdatedAt(v time.Time) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) Update(set func(*TableColumnUpsert)) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateContextLength() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateDescription() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateFillMode() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateLinkedColumn() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateLinkedContextColumns() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateName() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateNanoid() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateNewValues() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateOptions() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateRandom() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateRepeat() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateReplacement() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateSource() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateSourceID() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateSourceType() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateTableID() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateType() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateUpdatedAt() *TableColumnUpsertOne
- type TableColumns
- type TableMeta
- type TableMetaClient
- func (c *TableMetaClient) Create() *TableMetaCreate
- func (c *TableMetaClient) CreateBulk(builders ...*TableMetaCreate) *TableMetaCreateBulk
- func (c *TableMetaClient) Delete() *TableMetaDelete
- func (c *TableMetaClient) DeleteOne(tm *TableMeta) *TableMetaDeleteOne
- func (c *TableMetaClient) DeleteOneID(id int) *TableMetaDeleteOne
- func (c *TableMetaClient) Get(ctx context.Context, id int) (*TableMeta, error)
- func (c *TableMetaClient) GetX(ctx context.Context, id int) *TableMeta
- func (c *TableMetaClient) Hooks() []Hook
- func (c *TableMetaClient) Intercept(interceptors ...Interceptor)
- func (c *TableMetaClient) Interceptors() []Interceptor
- func (c *TableMetaClient) MapCreateBulk(slice any, setFunc func(*TableMetaCreate, int)) *TableMetaCreateBulk
- func (c *TableMetaClient) Query() *TableMetaQuery
- func (c *TableMetaClient) QueryColumns(tm *TableMeta) *TableColumnQuery
- func (c *TableMetaClient) QueryRows(tm *TableMeta) *TableRowQuery
- func (c *TableMetaClient) Update() *TableMetaUpdate
- func (c *TableMetaClient) UpdateOne(tm *TableMeta) *TableMetaUpdateOne
- func (c *TableMetaClient) UpdateOneID(id int) *TableMetaUpdateOne
- func (c *TableMetaClient) Use(hooks ...Hook)
- type TableMetaCreate
- func (tmc *TableMetaCreate) AddColumnIDs(ids ...int) *TableMetaCreate
- func (tmc *TableMetaCreate) AddColumns(t ...*TableColumn) *TableMetaCreate
- func (tmc *TableMetaCreate) AddRowIDs(ids ...int) *TableMetaCreate
- func (tmc *TableMetaCreate) AddRows(t ...*TableRow) *TableMetaCreate
- func (tmc *TableMetaCreate) Exec(ctx context.Context) error
- func (tmc *TableMetaCreate) ExecX(ctx context.Context)
- func (tmc *TableMetaCreate) Mutation() *TableMetaMutation
- func (tmc *TableMetaCreate) OnConflict(opts ...sql.ConflictOption) *TableMetaUpsertOne
- func (tmc *TableMetaCreate) OnConflictColumns(columns ...string) *TableMetaUpsertOne
- func (tmc *TableMetaCreate) Save(ctx context.Context) (*TableMeta, error)
- func (tmc *TableMetaCreate) SaveX(ctx context.Context) *TableMeta
- func (tmc *TableMetaCreate) SetCreatedAt(t time.Time) *TableMetaCreate
- func (tmc *TableMetaCreate) SetDescription(s string) *TableMetaCreate
- func (tmc *TableMetaCreate) SetModel(s string) *TableMetaCreate
- func (tmc *TableMetaCreate) SetName(s string) *TableMetaCreate
- func (tmc *TableMetaCreate) SetNanoid(s string) *TableMetaCreate
- func (tmc *TableMetaCreate) SetNillableCreatedAt(t *time.Time) *TableMetaCreate
- func (tmc *TableMetaCreate) SetNillableDescription(s *string) *TableMetaCreate
- func (tmc *TableMetaCreate) SetNillableModel(s *string) *TableMetaCreate
- func (tmc *TableMetaCreate) SetNillableNanoid(s *string) *TableMetaCreate
- func (tmc *TableMetaCreate) SetNillableUpdatedAt(t *time.Time) *TableMetaCreate
- func (tmc *TableMetaCreate) SetUpdatedAt(t time.Time) *TableMetaCreate
- type TableMetaCreateBulk
- func (tmcb *TableMetaCreateBulk) Exec(ctx context.Context) error
- func (tmcb *TableMetaCreateBulk) ExecX(ctx context.Context)
- func (tmcb *TableMetaCreateBulk) OnConflict(opts ...sql.ConflictOption) *TableMetaUpsertBulk
- func (tmcb *TableMetaCreateBulk) OnConflictColumns(columns ...string) *TableMetaUpsertBulk
- func (tmcb *TableMetaCreateBulk) Save(ctx context.Context) ([]*TableMeta, error)
- func (tmcb *TableMetaCreateBulk) SaveX(ctx context.Context) []*TableMeta
- type TableMetaDelete
- type TableMetaDeleteOne
- type TableMetaEdges
- type TableMetaGroupBy
- func (tmgb *TableMetaGroupBy) Aggregate(fns ...AggregateFunc) *TableMetaGroupBy
- func (s *TableMetaGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TableMetaGroupBy) BoolX(ctx context.Context) bool
- func (s *TableMetaGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TableMetaGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TableMetaGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TableMetaGroupBy) Float64X(ctx context.Context) float64
- func (s *TableMetaGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TableMetaGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TableMetaGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TableMetaGroupBy) IntX(ctx context.Context) int
- func (s *TableMetaGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TableMetaGroupBy) IntsX(ctx context.Context) []int
- func (tmgb *TableMetaGroupBy) Scan(ctx context.Context, v any) error
- func (s *TableMetaGroupBy) ScanX(ctx context.Context, v any)
- func (s *TableMetaGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TableMetaGroupBy) StringX(ctx context.Context) string
- func (s *TableMetaGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TableMetaGroupBy) StringsX(ctx context.Context) []string
- type TableMetaMutation
- func (m *TableMetaMutation) AddColumnIDs(ids ...int)
- func (m *TableMetaMutation) AddField(name string, value ent.Value) error
- func (m *TableMetaMutation) AddRowIDs(ids ...int)
- func (m *TableMetaMutation) AddedEdges() []string
- func (m *TableMetaMutation) AddedField(name string) (ent.Value, bool)
- func (m *TableMetaMutation) AddedFields() []string
- func (m *TableMetaMutation) AddedIDs(name string) []ent.Value
- func (m *TableMetaMutation) ClearColumns()
- func (m *TableMetaMutation) ClearCreatedAt()
- func (m *TableMetaMutation) ClearEdge(name string) error
- func (m *TableMetaMutation) ClearField(name string) error
- func (m *TableMetaMutation) ClearNanoid()
- func (m *TableMetaMutation) ClearRows()
- func (m *TableMetaMutation) ClearUpdatedAt()
- func (m *TableMetaMutation) ClearedEdges() []string
- func (m *TableMetaMutation) ClearedFields() []string
- func (m TableMetaMutation) Client() *Client
- func (m *TableMetaMutation) ColumnsCleared() bool
- func (m *TableMetaMutation) ColumnsIDs() (ids []int)
- func (m *TableMetaMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TableMetaMutation) CreatedAtCleared() bool
- func (m *TableMetaMutation) Description() (r string, exists bool)
- func (m *TableMetaMutation) EdgeCleared(name string) bool
- func (m *TableMetaMutation) Field(name string) (ent.Value, bool)
- func (m *TableMetaMutation) FieldCleared(name string) bool
- func (m *TableMetaMutation) Fields() []string
- func (m *TableMetaMutation) ID() (id int, exists bool)
- func (m *TableMetaMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TableMetaMutation) Model() (r string, exists bool)
- func (m *TableMetaMutation) Name() (r string, exists bool)
- func (m *TableMetaMutation) Nanoid() (r string, exists bool)
- func (m *TableMetaMutation) NanoidCleared() bool
- func (m *TableMetaMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TableMetaMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *TableMetaMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TableMetaMutation) OldModel(ctx context.Context) (v string, err error)
- func (m *TableMetaMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TableMetaMutation) OldNanoid(ctx context.Context) (v string, err error)
- func (m *TableMetaMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TableMetaMutation) Op() Op
- func (m *TableMetaMutation) RemoveColumnIDs(ids ...int)
- func (m *TableMetaMutation) RemoveRowIDs(ids ...int)
- func (m *TableMetaMutation) RemovedColumnsIDs() (ids []int)
- func (m *TableMetaMutation) RemovedEdges() []string
- func (m *TableMetaMutation) RemovedIDs(name string) []ent.Value
- func (m *TableMetaMutation) RemovedRowsIDs() (ids []int)
- func (m *TableMetaMutation) ResetColumns()
- func (m *TableMetaMutation) ResetCreatedAt()
- func (m *TableMetaMutation) ResetDescription()
- func (m *TableMetaMutation) ResetEdge(name string) error
- func (m *TableMetaMutation) ResetField(name string) error
- func (m *TableMetaMutation) ResetModel()
- func (m *TableMetaMutation) ResetName()
- func (m *TableMetaMutation) ResetNanoid()
- func (m *TableMetaMutation) ResetRows()
- func (m *TableMetaMutation) ResetUpdatedAt()
- func (m *TableMetaMutation) RowsCleared() bool
- func (m *TableMetaMutation) RowsIDs() (ids []int)
- func (m *TableMetaMutation) SetCreatedAt(t time.Time)
- func (m *TableMetaMutation) SetDescription(s string)
- func (m *TableMetaMutation) SetField(name string, value ent.Value) error
- func (m *TableMetaMutation) SetModel(s string)
- func (m *TableMetaMutation) SetName(s string)
- func (m *TableMetaMutation) SetNanoid(s string)
- func (m *TableMetaMutation) SetOp(op Op)
- func (m *TableMetaMutation) SetUpdatedAt(t time.Time)
- func (m TableMetaMutation) Tx() (*Tx, error)
- func (m *TableMetaMutation) Type() string
- func (m *TableMetaMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *TableMetaMutation) UpdatedAtCleared() bool
- func (m *TableMetaMutation) Where(ps ...predicate.TableMeta)
- func (m *TableMetaMutation) WhereP(ps ...func(*sql.Selector))
- type TableMetaQuery
- func (tmq *TableMetaQuery) Aggregate(fns ...AggregateFunc) *TableMetaSelect
- func (tmq *TableMetaQuery) All(ctx context.Context) ([]*TableMeta, error)
- func (tmq *TableMetaQuery) AllX(ctx context.Context) []*TableMeta
- func (tmq *TableMetaQuery) Clone() *TableMetaQuery
- func (tmq *TableMetaQuery) Count(ctx context.Context) (int, error)
- func (tmq *TableMetaQuery) CountX(ctx context.Context) int
- func (tmq *TableMetaQuery) Exist(ctx context.Context) (bool, error)
- func (tmq *TableMetaQuery) ExistX(ctx context.Context) bool
- func (tmq *TableMetaQuery) First(ctx context.Context) (*TableMeta, error)
- func (tmq *TableMetaQuery) FirstID(ctx context.Context) (id int, err error)
- func (tmq *TableMetaQuery) FirstIDX(ctx context.Context) int
- func (tmq *TableMetaQuery) FirstX(ctx context.Context) *TableMeta
- func (tmq *TableMetaQuery) ForShare(opts ...sql.LockOption) *TableMetaQuery
- func (tmq *TableMetaQuery) ForUpdate(opts ...sql.LockOption) *TableMetaQuery
- func (tmq *TableMetaQuery) GroupBy(field string, fields ...string) *TableMetaGroupBy
- func (tmq *TableMetaQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tmq *TableMetaQuery) IDsX(ctx context.Context) []int
- func (tmq *TableMetaQuery) Limit(limit int) *TableMetaQuery
- func (tmq *TableMetaQuery) Modify(modifiers ...func(s *sql.Selector)) *TableMetaSelect
- func (tmq *TableMetaQuery) Offset(offset int) *TableMetaQuery
- func (tmq *TableMetaQuery) Only(ctx context.Context) (*TableMeta, error)
- func (tmq *TableMetaQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tmq *TableMetaQuery) OnlyIDX(ctx context.Context) int
- func (tmq *TableMetaQuery) OnlyX(ctx context.Context) *TableMeta
- func (tmq *TableMetaQuery) Order(o ...tablemeta.OrderOption) *TableMetaQuery
- func (tmq *TableMetaQuery) QueryColumns() *TableColumnQuery
- func (tmq *TableMetaQuery) QueryRows() *TableRowQuery
- func (tmq *TableMetaQuery) Select(fields ...string) *TableMetaSelect
- func (tmq *TableMetaQuery) Unique(unique bool) *TableMetaQuery
- func (tmq *TableMetaQuery) Where(ps ...predicate.TableMeta) *TableMetaQuery
- func (tmq *TableMetaQuery) WithColumns(opts ...func(*TableColumnQuery)) *TableMetaQuery
- func (tmq *TableMetaQuery) WithRows(opts ...func(*TableRowQuery)) *TableMetaQuery
- type TableMetaSelect
- func (tms *TableMetaSelect) Aggregate(fns ...AggregateFunc) *TableMetaSelect
- func (s *TableMetaSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TableMetaSelect) BoolX(ctx context.Context) bool
- func (s *TableMetaSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TableMetaSelect) BoolsX(ctx context.Context) []bool
- func (s *TableMetaSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TableMetaSelect) Float64X(ctx context.Context) float64
- func (s *TableMetaSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TableMetaSelect) Float64sX(ctx context.Context) []float64
- func (s *TableMetaSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TableMetaSelect) IntX(ctx context.Context) int
- func (s *TableMetaSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TableMetaSelect) IntsX(ctx context.Context) []int
- func (tms *TableMetaSelect) Modify(modifiers ...func(s *sql.Selector)) *TableMetaSelect
- func (tms *TableMetaSelect) Scan(ctx context.Context, v any) error
- func (s *TableMetaSelect) ScanX(ctx context.Context, v any)
- func (s *TableMetaSelect) String(ctx context.Context) (_ string, err error)
- func (s *TableMetaSelect) StringX(ctx context.Context) string
- func (s *TableMetaSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TableMetaSelect) StringsX(ctx context.Context) []string
- type TableMetaSlice
- type TableMetaUpdate
- func (tmu *TableMetaUpdate) AddColumnIDs(ids ...int) *TableMetaUpdate
- func (tmu *TableMetaUpdate) AddColumns(t ...*TableColumn) *TableMetaUpdate
- func (tmu *TableMetaUpdate) AddRowIDs(ids ...int) *TableMetaUpdate
- func (tmu *TableMetaUpdate) AddRows(t ...*TableRow) *TableMetaUpdate
- func (tmu *TableMetaUpdate) ClearColumns() *TableMetaUpdate
- func (tmu *TableMetaUpdate) ClearNanoid() *TableMetaUpdate
- func (tmu *TableMetaUpdate) ClearRows() *TableMetaUpdate
- func (tmu *TableMetaUpdate) ClearUpdatedAt() *TableMetaUpdate
- func (tmu *TableMetaUpdate) Exec(ctx context.Context) error
- func (tmu *TableMetaUpdate) ExecX(ctx context.Context)
- func (tmu *TableMetaUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableMetaUpdate
- func (tmu *TableMetaUpdate) Mutation() *TableMetaMutation
- func (tmu *TableMetaUpdate) RemoveColumnIDs(ids ...int) *TableMetaUpdate
- func (tmu *TableMetaUpdate) RemoveColumns(t ...*TableColumn) *TableMetaUpdate
- func (tmu *TableMetaUpdate) RemoveRowIDs(ids ...int) *TableMetaUpdate
- func (tmu *TableMetaUpdate) RemoveRows(t ...*TableRow) *TableMetaUpdate
- func (tmu *TableMetaUpdate) Save(ctx context.Context) (int, error)
- func (tmu *TableMetaUpdate) SaveX(ctx context.Context) int
- func (tmu *TableMetaUpdate) SetDescription(s string) *TableMetaUpdate
- func (tmu *TableMetaUpdate) SetModel(s string) *TableMetaUpdate
- func (tmu *TableMetaUpdate) SetName(s string) *TableMetaUpdate
- func (tmu *TableMetaUpdate) SetNanoid(s string) *TableMetaUpdate
- func (tmu *TableMetaUpdate) SetNillableDescription(s *string) *TableMetaUpdate
- func (tmu *TableMetaUpdate) SetNillableModel(s *string) *TableMetaUpdate
- func (tmu *TableMetaUpdate) SetNillableName(s *string) *TableMetaUpdate
- func (tmu *TableMetaUpdate) SetNillableNanoid(s *string) *TableMetaUpdate
- func (tmu *TableMetaUpdate) SetUpdatedAt(t time.Time) *TableMetaUpdate
- func (tmu *TableMetaUpdate) Where(ps ...predicate.TableMeta) *TableMetaUpdate
- type TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) AddColumnIDs(ids ...int) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) AddColumns(t ...*TableColumn) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) AddRowIDs(ids ...int) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) AddRows(t ...*TableRow) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) ClearColumns() *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) ClearNanoid() *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) ClearRows() *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) ClearUpdatedAt() *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) Exec(ctx context.Context) error
- func (tmuo *TableMetaUpdateOne) ExecX(ctx context.Context)
- func (tmuo *TableMetaUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) Mutation() *TableMetaMutation
- func (tmuo *TableMetaUpdateOne) RemoveColumnIDs(ids ...int) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) RemoveColumns(t ...*TableColumn) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) RemoveRowIDs(ids ...int) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) RemoveRows(t ...*TableRow) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) Save(ctx context.Context) (*TableMeta, error)
- func (tmuo *TableMetaUpdateOne) SaveX(ctx context.Context) *TableMeta
- func (tmuo *TableMetaUpdateOne) Select(field string, fields ...string) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) SetDescription(s string) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) SetModel(s string) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) SetName(s string) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) SetNanoid(s string) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) SetNillableDescription(s *string) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) SetNillableModel(s *string) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) SetNillableName(s *string) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) SetNillableNanoid(s *string) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) SetUpdatedAt(t time.Time) *TableMetaUpdateOne
- func (tmuo *TableMetaUpdateOne) Where(ps ...predicate.TableMeta) *TableMetaUpdateOne
- type TableMetaUpsert
- func (u *TableMetaUpsert) ClearNanoid() *TableMetaUpsert
- func (u *TableMetaUpsert) ClearUpdatedAt() *TableMetaUpsert
- func (u *TableMetaUpsert) SetDescription(v string) *TableMetaUpsert
- func (u *TableMetaUpsert) SetModel(v string) *TableMetaUpsert
- func (u *TableMetaUpsert) SetName(v string) *TableMetaUpsert
- func (u *TableMetaUpsert) SetNanoid(v string) *TableMetaUpsert
- func (u *TableMetaUpsert) SetUpdatedAt(v time.Time) *TableMetaUpsert
- func (u *TableMetaUpsert) UpdateDescription() *TableMetaUpsert
- func (u *TableMetaUpsert) UpdateModel() *TableMetaUpsert
- func (u *TableMetaUpsert) UpdateName() *TableMetaUpsert
- func (u *TableMetaUpsert) UpdateNanoid() *TableMetaUpsert
- func (u *TableMetaUpsert) UpdateUpdatedAt() *TableMetaUpsert
- type TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) ClearNanoid() *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) ClearUpdatedAt() *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) DoNothing() *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) Exec(ctx context.Context) error
- func (u *TableMetaUpsertBulk) ExecX(ctx context.Context)
- func (u *TableMetaUpsertBulk) Ignore() *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) SetDescription(v string) *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) SetModel(v string) *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) SetName(v string) *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) SetNanoid(v string) *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) SetUpdatedAt(v time.Time) *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) Update(set func(*TableMetaUpsert)) *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) UpdateDescription() *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) UpdateModel() *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) UpdateName() *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) UpdateNanoid() *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) UpdateNewValues() *TableMetaUpsertBulk
- func (u *TableMetaUpsertBulk) UpdateUpdatedAt() *TableMetaUpsertBulk
- type TableMetaUpsertOne
- func (u *TableMetaUpsertOne) ClearNanoid() *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) ClearUpdatedAt() *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) DoNothing() *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) Exec(ctx context.Context) error
- func (u *TableMetaUpsertOne) ExecX(ctx context.Context)
- func (u *TableMetaUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *TableMetaUpsertOne) IDX(ctx context.Context) int
- func (u *TableMetaUpsertOne) Ignore() *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) SetDescription(v string) *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) SetModel(v string) *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) SetName(v string) *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) SetNanoid(v string) *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) SetUpdatedAt(v time.Time) *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) Update(set func(*TableMetaUpsert)) *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) UpdateDescription() *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) UpdateModel() *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) UpdateName() *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) UpdateNanoid() *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) UpdateNewValues() *TableMetaUpsertOne
- func (u *TableMetaUpsertOne) UpdateUpdatedAt() *TableMetaUpsertOne
- type TableRow
- type TableRowClient
- func (c *TableRowClient) Create() *TableRowCreate
- func (c *TableRowClient) CreateBulk(builders ...*TableRowCreate) *TableRowCreateBulk
- func (c *TableRowClient) Delete() *TableRowDelete
- func (c *TableRowClient) DeleteOne(tr *TableRow) *TableRowDeleteOne
- func (c *TableRowClient) DeleteOneID(id int) *TableRowDeleteOne
- func (c *TableRowClient) Get(ctx context.Context, id int) (*TableRow, error)
- func (c *TableRowClient) GetX(ctx context.Context, id int) *TableRow
- func (c *TableRowClient) Hooks() []Hook
- func (c *TableRowClient) Intercept(interceptors ...Interceptor)
- func (c *TableRowClient) Interceptors() []Interceptor
- func (c *TableRowClient) MapCreateBulk(slice any, setFunc func(*TableRowCreate, int)) *TableRowCreateBulk
- func (c *TableRowClient) Query() *TableRowQuery
- func (c *TableRowClient) QueryTablemeta(tr *TableRow) *TableMetaQuery
- func (c *TableRowClient) Update() *TableRowUpdate
- func (c *TableRowClient) UpdateOne(tr *TableRow) *TableRowUpdateOne
- func (c *TableRowClient) UpdateOneID(id int) *TableRowUpdateOne
- func (c *TableRowClient) Use(hooks ...Hook)
- type TableRowCreate
- func (trc *TableRowCreate) Exec(ctx context.Context) error
- func (trc *TableRowCreate) ExecX(ctx context.Context)
- func (trc *TableRowCreate) Mutation() *TableRowMutation
- func (trc *TableRowCreate) OnConflict(opts ...sql.ConflictOption) *TableRowUpsertOne
- func (trc *TableRowCreate) OnConflictColumns(columns ...string) *TableRowUpsertOne
- func (trc *TableRowCreate) Save(ctx context.Context) (*TableRow, error)
- func (trc *TableRowCreate) SaveX(ctx context.Context) *TableRow
- func (trc *TableRowCreate) SetCells(sv []*schema.CellValue) *TableRowCreate
- func (trc *TableRowCreate) SetCreatedAt(t time.Time) *TableRowCreate
- func (trc *TableRowCreate) SetNanoid(s string) *TableRowCreate
- func (trc *TableRowCreate) SetNillableCreatedAt(t *time.Time) *TableRowCreate
- func (trc *TableRowCreate) SetNillableNanoid(s *string) *TableRowCreate
- func (trc *TableRowCreate) SetNillableUpdatedAt(t *time.Time) *TableRowCreate
- func (trc *TableRowCreate) SetTablemeta(t *TableMeta) *TableRowCreate
- func (trc *TableRowCreate) SetTablemetaID(id int) *TableRowCreate
- func (trc *TableRowCreate) SetUpdatedAt(t time.Time) *TableRowCreate
- type TableRowCreateBulk
- func (trcb *TableRowCreateBulk) Exec(ctx context.Context) error
- func (trcb *TableRowCreateBulk) ExecX(ctx context.Context)
- func (trcb *TableRowCreateBulk) OnConflict(opts ...sql.ConflictOption) *TableRowUpsertBulk
- func (trcb *TableRowCreateBulk) OnConflictColumns(columns ...string) *TableRowUpsertBulk
- func (trcb *TableRowCreateBulk) Save(ctx context.Context) ([]*TableRow, error)
- func (trcb *TableRowCreateBulk) SaveX(ctx context.Context) []*TableRow
- type TableRowDelete
- type TableRowDeleteOne
- type TableRowEdges
- type TableRowGroupBy
- func (trgb *TableRowGroupBy) Aggregate(fns ...AggregateFunc) *TableRowGroupBy
- func (s *TableRowGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TableRowGroupBy) BoolX(ctx context.Context) bool
- func (s *TableRowGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TableRowGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TableRowGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TableRowGroupBy) Float64X(ctx context.Context) float64
- func (s *TableRowGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TableRowGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TableRowGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TableRowGroupBy) IntX(ctx context.Context) int
- func (s *TableRowGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TableRowGroupBy) IntsX(ctx context.Context) []int
- func (trgb *TableRowGroupBy) Scan(ctx context.Context, v any) error
- func (s *TableRowGroupBy) ScanX(ctx context.Context, v any)
- func (s *TableRowGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TableRowGroupBy) StringX(ctx context.Context) string
- func (s *TableRowGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TableRowGroupBy) StringsX(ctx context.Context) []string
- type TableRowMutation
- func (m *TableRowMutation) AddField(name string, value ent.Value) error
- func (m *TableRowMutation) AddedEdges() []string
- func (m *TableRowMutation) AddedField(name string) (ent.Value, bool)
- func (m *TableRowMutation) AddedFields() []string
- func (m *TableRowMutation) AddedIDs(name string) []ent.Value
- func (m *TableRowMutation) AppendCells(sv []*schema.CellValue)
- func (m *TableRowMutation) AppendedCells() ([]*schema.CellValue, bool)
- func (m *TableRowMutation) Cells() (r []*schema.CellValue, exists bool)
- func (m *TableRowMutation) CellsCleared() bool
- func (m *TableRowMutation) ClearCells()
- func (m *TableRowMutation) ClearCreatedAt()
- func (m *TableRowMutation) ClearEdge(name string) error
- func (m *TableRowMutation) ClearField(name string) error
- func (m *TableRowMutation) ClearNanoid()
- func (m *TableRowMutation) ClearTablemeta()
- func (m *TableRowMutation) ClearUpdatedAt()
- func (m *TableRowMutation) ClearedEdges() []string
- func (m *TableRowMutation) ClearedFields() []string
- func (m TableRowMutation) Client() *Client
- func (m *TableRowMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TableRowMutation) CreatedAtCleared() bool
- func (m *TableRowMutation) EdgeCleared(name string) bool
- func (m *TableRowMutation) Field(name string) (ent.Value, bool)
- func (m *TableRowMutation) FieldCleared(name string) bool
- func (m *TableRowMutation) Fields() []string
- func (m *TableRowMutation) ID() (id int, exists bool)
- func (m *TableRowMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TableRowMutation) Nanoid() (r string, exists bool)
- func (m *TableRowMutation) NanoidCleared() bool
- func (m *TableRowMutation) OldCells(ctx context.Context) (v []*schema.CellValue, err error)
- func (m *TableRowMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TableRowMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TableRowMutation) OldNanoid(ctx context.Context) (v string, err error)
- func (m *TableRowMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TableRowMutation) Op() Op
- func (m *TableRowMutation) RemovedEdges() []string
- func (m *TableRowMutation) RemovedIDs(name string) []ent.Value
- func (m *TableRowMutation) ResetCells()
- func (m *TableRowMutation) ResetCreatedAt()
- func (m *TableRowMutation) ResetEdge(name string) error
- func (m *TableRowMutation) ResetField(name string) error
- func (m *TableRowMutation) ResetNanoid()
- func (m *TableRowMutation) ResetTablemeta()
- func (m *TableRowMutation) ResetUpdatedAt()
- func (m *TableRowMutation) SetCells(sv []*schema.CellValue)
- func (m *TableRowMutation) SetCreatedAt(t time.Time)
- func (m *TableRowMutation) SetField(name string, value ent.Value) error
- func (m *TableRowMutation) SetNanoid(s string)
- func (m *TableRowMutation) SetOp(op Op)
- func (m *TableRowMutation) SetTablemetaID(id int)
- func (m *TableRowMutation) SetUpdatedAt(t time.Time)
- func (m *TableRowMutation) TablemetaCleared() bool
- func (m *TableRowMutation) TablemetaID() (id int, exists bool)
- func (m *TableRowMutation) TablemetaIDs() (ids []int)
- func (m TableRowMutation) Tx() (*Tx, error)
- func (m *TableRowMutation) Type() string
- func (m *TableRowMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *TableRowMutation) UpdatedAtCleared() bool
- func (m *TableRowMutation) Where(ps ...predicate.TableRow)
- func (m *TableRowMutation) WhereP(ps ...func(*sql.Selector))
- type TableRowQuery
- func (trq *TableRowQuery) Aggregate(fns ...AggregateFunc) *TableRowSelect
- func (trq *TableRowQuery) All(ctx context.Context) ([]*TableRow, error)
- func (trq *TableRowQuery) AllX(ctx context.Context) []*TableRow
- func (trq *TableRowQuery) Clone() *TableRowQuery
- func (trq *TableRowQuery) Count(ctx context.Context) (int, error)
- func (trq *TableRowQuery) CountX(ctx context.Context) int
- func (trq *TableRowQuery) Exist(ctx context.Context) (bool, error)
- func (trq *TableRowQuery) ExistX(ctx context.Context) bool
- func (trq *TableRowQuery) First(ctx context.Context) (*TableRow, error)
- func (trq *TableRowQuery) FirstID(ctx context.Context) (id int, err error)
- func (trq *TableRowQuery) FirstIDX(ctx context.Context) int
- func (trq *TableRowQuery) FirstX(ctx context.Context) *TableRow
- func (trq *TableRowQuery) ForShare(opts ...sql.LockOption) *TableRowQuery
- func (trq *TableRowQuery) ForUpdate(opts ...sql.LockOption) *TableRowQuery
- func (trq *TableRowQuery) GroupBy(field string, fields ...string) *TableRowGroupBy
- func (trq *TableRowQuery) IDs(ctx context.Context) (ids []int, err error)
- func (trq *TableRowQuery) IDsX(ctx context.Context) []int
- func (trq *TableRowQuery) Limit(limit int) *TableRowQuery
- func (trq *TableRowQuery) Modify(modifiers ...func(s *sql.Selector)) *TableRowSelect
- func (trq *TableRowQuery) Offset(offset int) *TableRowQuery
- func (trq *TableRowQuery) Only(ctx context.Context) (*TableRow, error)
- func (trq *TableRowQuery) OnlyID(ctx context.Context) (id int, err error)
- func (trq *TableRowQuery) OnlyIDX(ctx context.Context) int
- func (trq *TableRowQuery) OnlyX(ctx context.Context) *TableRow
- func (trq *TableRowQuery) Order(o ...tablerow.OrderOption) *TableRowQuery
- func (trq *TableRowQuery) QueryTablemeta() *TableMetaQuery
- func (trq *TableRowQuery) Select(fields ...string) *TableRowSelect
- func (trq *TableRowQuery) Unique(unique bool) *TableRowQuery
- func (trq *TableRowQuery) Where(ps ...predicate.TableRow) *TableRowQuery
- func (trq *TableRowQuery) WithTablemeta(opts ...func(*TableMetaQuery)) *TableRowQuery
- type TableRowSelect
- func (trs *TableRowSelect) Aggregate(fns ...AggregateFunc) *TableRowSelect
- func (s *TableRowSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TableRowSelect) BoolX(ctx context.Context) bool
- func (s *TableRowSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TableRowSelect) BoolsX(ctx context.Context) []bool
- func (s *TableRowSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TableRowSelect) Float64X(ctx context.Context) float64
- func (s *TableRowSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TableRowSelect) Float64sX(ctx context.Context) []float64
- func (s *TableRowSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TableRowSelect) IntX(ctx context.Context) int
- func (s *TableRowSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TableRowSelect) IntsX(ctx context.Context) []int
- func (trs *TableRowSelect) Modify(modifiers ...func(s *sql.Selector)) *TableRowSelect
- func (trs *TableRowSelect) Scan(ctx context.Context, v any) error
- func (s *TableRowSelect) ScanX(ctx context.Context, v any)
- func (s *TableRowSelect) String(ctx context.Context) (_ string, err error)
- func (s *TableRowSelect) StringX(ctx context.Context) string
- func (s *TableRowSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TableRowSelect) StringsX(ctx context.Context) []string
- type TableRowUpdate
- func (tru *TableRowUpdate) AppendCells(sv []*schema.CellValue) *TableRowUpdate
- func (tru *TableRowUpdate) ClearCells() *TableRowUpdate
- func (tru *TableRowUpdate) ClearNanoid() *TableRowUpdate
- func (tru *TableRowUpdate) ClearTablemeta() *TableRowUpdate
- func (tru *TableRowUpdate) ClearUpdatedAt() *TableRowUpdate
- func (tru *TableRowUpdate) Exec(ctx context.Context) error
- func (tru *TableRowUpdate) ExecX(ctx context.Context)
- func (tru *TableRowUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableRowUpdate
- func (tru *TableRowUpdate) Mutation() *TableRowMutation
- func (tru *TableRowUpdate) Save(ctx context.Context) (int, error)
- func (tru *TableRowUpdate) SaveX(ctx context.Context) int
- func (tru *TableRowUpdate) SetCells(sv []*schema.CellValue) *TableRowUpdate
- func (tru *TableRowUpdate) SetNanoid(s string) *TableRowUpdate
- func (tru *TableRowUpdate) SetNillableNanoid(s *string) *TableRowUpdate
- func (tru *TableRowUpdate) SetTablemeta(t *TableMeta) *TableRowUpdate
- func (tru *TableRowUpdate) SetTablemetaID(id int) *TableRowUpdate
- func (tru *TableRowUpdate) SetUpdatedAt(t time.Time) *TableRowUpdate
- func (tru *TableRowUpdate) Where(ps ...predicate.TableRow) *TableRowUpdate
- type TableRowUpdateOne
- func (truo *TableRowUpdateOne) AppendCells(sv []*schema.CellValue) *TableRowUpdateOne
- func (truo *TableRowUpdateOne) ClearCells() *TableRowUpdateOne
- func (truo *TableRowUpdateOne) ClearNanoid() *TableRowUpdateOne
- func (truo *TableRowUpdateOne) ClearTablemeta() *TableRowUpdateOne
- func (truo *TableRowUpdateOne) ClearUpdatedAt() *TableRowUpdateOne
- func (truo *TableRowUpdateOne) Exec(ctx context.Context) error
- func (truo *TableRowUpdateOne) ExecX(ctx context.Context)
- func (truo *TableRowUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableRowUpdateOne
- func (truo *TableRowUpdateOne) Mutation() *TableRowMutation
- func (truo *TableRowUpdateOne) Save(ctx context.Context) (*TableRow, error)
- func (truo *TableRowUpdateOne) SaveX(ctx context.Context) *TableRow
- func (truo *TableRowUpdateOne) Select(field string, fields ...string) *TableRowUpdateOne
- func (truo *TableRowUpdateOne) SetCells(sv []*schema.CellValue) *TableRowUpdateOne
- func (truo *TableRowUpdateOne) SetNanoid(s string) *TableRowUpdateOne
- func (truo *TableRowUpdateOne) SetNillableNanoid(s *string) *TableRowUpdateOne
- func (truo *TableRowUpdateOne) SetTablemeta(t *TableMeta) *TableRowUpdateOne
- func (truo *TableRowUpdateOne) SetTablemetaID(id int) *TableRowUpdateOne
- func (truo *TableRowUpdateOne) SetUpdatedAt(t time.Time) *TableRowUpdateOne
- func (truo *TableRowUpdateOne) Where(ps ...predicate.TableRow) *TableRowUpdateOne
- type TableRowUpsert
- func (u *TableRowUpsert) ClearCells() *TableRowUpsert
- func (u *TableRowUpsert) ClearNanoid() *TableRowUpsert
- func (u *TableRowUpsert) ClearUpdatedAt() *TableRowUpsert
- func (u *TableRowUpsert) SetCells(v []*schema.CellValue) *TableRowUpsert
- func (u *TableRowUpsert) SetNanoid(v string) *TableRowUpsert
- func (u *TableRowUpsert) SetUpdatedAt(v time.Time) *TableRowUpsert
- func (u *TableRowUpsert) UpdateCells() *TableRowUpsert
- func (u *TableRowUpsert) UpdateNanoid() *TableRowUpsert
- func (u *TableRowUpsert) UpdateUpdatedAt() *TableRowUpsert
- type TableRowUpsertBulk
- func (u *TableRowUpsertBulk) ClearCells() *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) ClearNanoid() *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) ClearUpdatedAt() *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) DoNothing() *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) Exec(ctx context.Context) error
- func (u *TableRowUpsertBulk) ExecX(ctx context.Context)
- func (u *TableRowUpsertBulk) Ignore() *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) SetCells(v []*schema.CellValue) *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) SetNanoid(v string) *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) SetUpdatedAt(v time.Time) *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) Update(set func(*TableRowUpsert)) *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) UpdateCells() *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) UpdateNanoid() *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) UpdateNewValues() *TableRowUpsertBulk
- func (u *TableRowUpsertBulk) UpdateUpdatedAt() *TableRowUpsertBulk
- type TableRowUpsertOne
- func (u *TableRowUpsertOne) ClearCells() *TableRowUpsertOne
- func (u *TableRowUpsertOne) ClearNanoid() *TableRowUpsertOne
- func (u *TableRowUpsertOne) ClearUpdatedAt() *TableRowUpsertOne
- func (u *TableRowUpsertOne) DoNothing() *TableRowUpsertOne
- func (u *TableRowUpsertOne) Exec(ctx context.Context) error
- func (u *TableRowUpsertOne) ExecX(ctx context.Context)
- func (u *TableRowUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *TableRowUpsertOne) IDX(ctx context.Context) int
- func (u *TableRowUpsertOne) Ignore() *TableRowUpsertOne
- func (u *TableRowUpsertOne) SetCells(v []*schema.CellValue) *TableRowUpsertOne
- func (u *TableRowUpsertOne) SetNanoid(v string) *TableRowUpsertOne
- func (u *TableRowUpsertOne) SetUpdatedAt(v time.Time) *TableRowUpsertOne
- func (u *TableRowUpsertOne) Update(set func(*TableRowUpsert)) *TableRowUpsertOne
- func (u *TableRowUpsertOne) UpdateCells() *TableRowUpsertOne
- func (u *TableRowUpsertOne) UpdateNanoid() *TableRowUpsertOne
- func (u *TableRowUpsertOne) UpdateNewValues() *TableRowUpsertOne
- func (u *TableRowUpsertOne) UpdateUpdatedAt() *TableRowUpsertOne
- type TableRows
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
- type Workflow
- type WorkflowClient
- func (c *WorkflowClient) Create() *WorkflowCreate
- func (c *WorkflowClient) CreateBulk(builders ...*WorkflowCreate) *WorkflowCreateBulk
- func (c *WorkflowClient) Delete() *WorkflowDelete
- func (c *WorkflowClient) DeleteOne(w *Workflow) *WorkflowDeleteOne
- func (c *WorkflowClient) DeleteOneID(id int) *WorkflowDeleteOne
- func (c *WorkflowClient) Get(ctx context.Context, id int) (*Workflow, error)
- func (c *WorkflowClient) GetX(ctx context.Context, id int) *Workflow
- func (c *WorkflowClient) Hooks() []Hook
- func (c *WorkflowClient) Intercept(interceptors ...Interceptor)
- func (c *WorkflowClient) Interceptors() []Interceptor
- func (c *WorkflowClient) MapCreateBulk(slice any, setFunc func(*WorkflowCreate, int)) *WorkflowCreateBulk
- func (c *WorkflowClient) Query() *WorkflowQuery
- func (c *WorkflowClient) Update() *WorkflowUpdate
- func (c *WorkflowClient) UpdateOne(w *Workflow) *WorkflowUpdateOne
- func (c *WorkflowClient) UpdateOneID(id int) *WorkflowUpdateOne
- func (c *WorkflowClient) Use(hooks ...Hook)
- type WorkflowCreate
- func (wc *WorkflowCreate) Exec(ctx context.Context) error
- func (wc *WorkflowCreate) ExecX(ctx context.Context)
- func (wc *WorkflowCreate) Mutation() *WorkflowMutation
- func (wc *WorkflowCreate) OnConflict(opts ...sql.ConflictOption) *WorkflowUpsertOne
- func (wc *WorkflowCreate) OnConflictColumns(columns ...string) *WorkflowUpsertOne
- func (wc *WorkflowCreate) Save(ctx context.Context) (*Workflow, error)
- func (wc *WorkflowCreate) SaveX(ctx context.Context) *Workflow
- func (wc *WorkflowCreate) SetCreatedAt(t time.Time) *WorkflowCreate
- func (wc *WorkflowCreate) SetDescription(s string) *WorkflowCreate
- func (wc *WorkflowCreate) SetName(s string) *WorkflowCreate
- func (wc *WorkflowCreate) SetNanoid(s string) *WorkflowCreate
- func (wc *WorkflowCreate) SetNillableCreatedAt(t *time.Time) *WorkflowCreate
- func (wc *WorkflowCreate) SetNillableDescription(s *string) *WorkflowCreate
- func (wc *WorkflowCreate) SetNillableNanoid(s *string) *WorkflowCreate
- func (wc *WorkflowCreate) SetNillableUpdatedAt(t *time.Time) *WorkflowCreate
- func (wc *WorkflowCreate) SetSteps(ss []schema.WorkflowStep) *WorkflowCreate
- func (wc *WorkflowCreate) SetUpdatedAt(t time.Time) *WorkflowCreate
- func (wc *WorkflowCreate) SetVariables(sv []schema.WorkflowVariable) *WorkflowCreate
- type WorkflowCreateBulk
- func (wcb *WorkflowCreateBulk) Exec(ctx context.Context) error
- func (wcb *WorkflowCreateBulk) ExecX(ctx context.Context)
- func (wcb *WorkflowCreateBulk) OnConflict(opts ...sql.ConflictOption) *WorkflowUpsertBulk
- func (wcb *WorkflowCreateBulk) OnConflictColumns(columns ...string) *WorkflowUpsertBulk
- func (wcb *WorkflowCreateBulk) Save(ctx context.Context) ([]*Workflow, error)
- func (wcb *WorkflowCreateBulk) SaveX(ctx context.Context) []*Workflow
- type WorkflowDelete
- type WorkflowDeleteOne
- type WorkflowGroupBy
- func (wgb *WorkflowGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowGroupBy
- func (s *WorkflowGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowGroupBy) BoolX(ctx context.Context) bool
- func (s *WorkflowGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WorkflowGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowGroupBy) Float64X(ctx context.Context) float64
- func (s *WorkflowGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WorkflowGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowGroupBy) IntX(ctx context.Context) int
- func (s *WorkflowGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowGroupBy) IntsX(ctx context.Context) []int
- func (wgb *WorkflowGroupBy) Scan(ctx context.Context, v any) error
- func (s *WorkflowGroupBy) ScanX(ctx context.Context, v any)
- func (s *WorkflowGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowGroupBy) StringX(ctx context.Context) string
- func (s *WorkflowGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowGroupBy) StringsX(ctx context.Context) []string
- type WorkflowMutation
- func (m *WorkflowMutation) AddField(name string, value ent.Value) error
- func (m *WorkflowMutation) AddedEdges() []string
- func (m *WorkflowMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkflowMutation) AddedFields() []string
- func (m *WorkflowMutation) AddedIDs(name string) []ent.Value
- func (m *WorkflowMutation) AppendSteps(ss []schema.WorkflowStep)
- func (m *WorkflowMutation) AppendVariables(sv []schema.WorkflowVariable)
- func (m *WorkflowMutation) AppendedSteps() ([]schema.WorkflowStep, bool)
- func (m *WorkflowMutation) AppendedVariables() ([]schema.WorkflowVariable, bool)
- func (m *WorkflowMutation) ClearCreatedAt()
- func (m *WorkflowMutation) ClearDescription()
- func (m *WorkflowMutation) ClearEdge(name string) error
- func (m *WorkflowMutation) ClearField(name string) error
- func (m *WorkflowMutation) ClearNanoid()
- func (m *WorkflowMutation) ClearUpdatedAt()
- func (m *WorkflowMutation) ClearedEdges() []string
- func (m *WorkflowMutation) ClearedFields() []string
- func (m WorkflowMutation) Client() *Client
- func (m *WorkflowMutation) CreatedAt() (r time.Time, exists bool)
- func (m *WorkflowMutation) CreatedAtCleared() bool
- func (m *WorkflowMutation) Description() (r string, exists bool)
- func (m *WorkflowMutation) DescriptionCleared() bool
- func (m *WorkflowMutation) EdgeCleared(name string) bool
- func (m *WorkflowMutation) Field(name string) (ent.Value, bool)
- func (m *WorkflowMutation) FieldCleared(name string) bool
- func (m *WorkflowMutation) Fields() []string
- func (m *WorkflowMutation) ID() (id int, exists bool)
- func (m *WorkflowMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WorkflowMutation) Name() (r string, exists bool)
- func (m *WorkflowMutation) Nanoid() (r string, exists bool)
- func (m *WorkflowMutation) NanoidCleared() bool
- func (m *WorkflowMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *WorkflowMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *WorkflowMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkflowMutation) OldName(ctx context.Context) (v string, err error)
- func (m *WorkflowMutation) OldNanoid(ctx context.Context) (v string, err error)
- func (m *WorkflowMutation) OldSteps(ctx context.Context) (v []schema.WorkflowStep, err error)
- func (m *WorkflowMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *WorkflowMutation) OldVariables(ctx context.Context) (v []schema.WorkflowVariable, err error)
- func (m *WorkflowMutation) Op() Op
- func (m *WorkflowMutation) RemovedEdges() []string
- func (m *WorkflowMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkflowMutation) ResetCreatedAt()
- func (m *WorkflowMutation) ResetDescription()
- func (m *WorkflowMutation) ResetEdge(name string) error
- func (m *WorkflowMutation) ResetField(name string) error
- func (m *WorkflowMutation) ResetName()
- func (m *WorkflowMutation) ResetNanoid()
- func (m *WorkflowMutation) ResetSteps()
- func (m *WorkflowMutation) ResetUpdatedAt()
- func (m *WorkflowMutation) ResetVariables()
- func (m *WorkflowMutation) SetCreatedAt(t time.Time)
- func (m *WorkflowMutation) SetDescription(s string)
- func (m *WorkflowMutation) SetField(name string, value ent.Value) error
- func (m *WorkflowMutation) SetName(s string)
- func (m *WorkflowMutation) SetNanoid(s string)
- func (m *WorkflowMutation) SetOp(op Op)
- func (m *WorkflowMutation) SetSteps(ss []schema.WorkflowStep)
- func (m *WorkflowMutation) SetUpdatedAt(t time.Time)
- func (m *WorkflowMutation) SetVariables(sv []schema.WorkflowVariable)
- func (m *WorkflowMutation) Steps() (r []schema.WorkflowStep, exists bool)
- func (m WorkflowMutation) Tx() (*Tx, error)
- func (m *WorkflowMutation) Type() string
- func (m *WorkflowMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *WorkflowMutation) UpdatedAtCleared() bool
- func (m *WorkflowMutation) Variables() (r []schema.WorkflowVariable, exists bool)
- func (m *WorkflowMutation) Where(ps ...predicate.Workflow)
- func (m *WorkflowMutation) WhereP(ps ...func(*sql.Selector))
- type WorkflowQuery
- func (wq *WorkflowQuery) Aggregate(fns ...AggregateFunc) *WorkflowSelect
- func (wq *WorkflowQuery) All(ctx context.Context) ([]*Workflow, error)
- func (wq *WorkflowQuery) AllX(ctx context.Context) []*Workflow
- func (wq *WorkflowQuery) Clone() *WorkflowQuery
- func (wq *WorkflowQuery) Count(ctx context.Context) (int, error)
- func (wq *WorkflowQuery) CountX(ctx context.Context) int
- func (wq *WorkflowQuery) Exist(ctx context.Context) (bool, error)
- func (wq *WorkflowQuery) ExistX(ctx context.Context) bool
- func (wq *WorkflowQuery) First(ctx context.Context) (*Workflow, error)
- func (wq *WorkflowQuery) FirstID(ctx context.Context) (id int, err error)
- func (wq *WorkflowQuery) FirstIDX(ctx context.Context) int
- func (wq *WorkflowQuery) FirstX(ctx context.Context) *Workflow
- func (wq *WorkflowQuery) ForShare(opts ...sql.LockOption) *WorkflowQuery
- func (wq *WorkflowQuery) ForUpdate(opts ...sql.LockOption) *WorkflowQuery
- func (wq *WorkflowQuery) GroupBy(field string, fields ...string) *WorkflowGroupBy
- func (wq *WorkflowQuery) IDs(ctx context.Context) (ids []int, err error)
- func (wq *WorkflowQuery) IDsX(ctx context.Context) []int
- func (wq *WorkflowQuery) Limit(limit int) *WorkflowQuery
- func (wq *WorkflowQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowSelect
- func (wq *WorkflowQuery) Offset(offset int) *WorkflowQuery
- func (wq *WorkflowQuery) Only(ctx context.Context) (*Workflow, error)
- func (wq *WorkflowQuery) OnlyID(ctx context.Context) (id int, err error)
- func (wq *WorkflowQuery) OnlyIDX(ctx context.Context) int
- func (wq *WorkflowQuery) OnlyX(ctx context.Context) *Workflow
- func (wq *WorkflowQuery) Order(o ...workflow.OrderOption) *WorkflowQuery
- func (wq *WorkflowQuery) Select(fields ...string) *WorkflowSelect
- func (wq *WorkflowQuery) Unique(unique bool) *WorkflowQuery
- func (wq *WorkflowQuery) Where(ps ...predicate.Workflow) *WorkflowQuery
- type WorkflowSelect
- func (ws *WorkflowSelect) Aggregate(fns ...AggregateFunc) *WorkflowSelect
- func (s *WorkflowSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowSelect) BoolX(ctx context.Context) bool
- func (s *WorkflowSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowSelect) BoolsX(ctx context.Context) []bool
- func (s *WorkflowSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowSelect) Float64X(ctx context.Context) float64
- func (s *WorkflowSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowSelect) Float64sX(ctx context.Context) []float64
- func (s *WorkflowSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowSelect) IntX(ctx context.Context) int
- func (s *WorkflowSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowSelect) IntsX(ctx context.Context) []int
- func (ws *WorkflowSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowSelect
- func (ws *WorkflowSelect) Scan(ctx context.Context, v any) error
- func (s *WorkflowSelect) ScanX(ctx context.Context, v any)
- func (s *WorkflowSelect) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowSelect) StringX(ctx context.Context) string
- func (s *WorkflowSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowSelect) StringsX(ctx context.Context) []string
- type WorkflowUpdate
- func (wu *WorkflowUpdate) AppendSteps(ss []schema.WorkflowStep) *WorkflowUpdate
- func (wu *WorkflowUpdate) AppendVariables(sv []schema.WorkflowVariable) *WorkflowUpdate
- func (wu *WorkflowUpdate) ClearDescription() *WorkflowUpdate
- func (wu *WorkflowUpdate) ClearNanoid() *WorkflowUpdate
- func (wu *WorkflowUpdate) ClearUpdatedAt() *WorkflowUpdate
- func (wu *WorkflowUpdate) Exec(ctx context.Context) error
- func (wu *WorkflowUpdate) ExecX(ctx context.Context)
- func (wu *WorkflowUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowUpdate
- func (wu *WorkflowUpdate) Mutation() *WorkflowMutation
- func (wu *WorkflowUpdate) Save(ctx context.Context) (int, error)
- func (wu *WorkflowUpdate) SaveX(ctx context.Context) int
- func (wu *WorkflowUpdate) SetDescription(s string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetName(s string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetNanoid(s string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetNillableDescription(s *string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetNillableName(s *string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetNillableNanoid(s *string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetSteps(ss []schema.WorkflowStep) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetUpdatedAt(t time.Time) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetVariables(sv []schema.WorkflowVariable) *WorkflowUpdate
- func (wu *WorkflowUpdate) Where(ps ...predicate.Workflow) *WorkflowUpdate
- type WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) AppendSteps(ss []schema.WorkflowStep) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) AppendVariables(sv []schema.WorkflowVariable) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) ClearDescription() *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) ClearNanoid() *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) ClearUpdatedAt() *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) Exec(ctx context.Context) error
- func (wuo *WorkflowUpdateOne) ExecX(ctx context.Context)
- func (wuo *WorkflowUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) Mutation() *WorkflowMutation
- func (wuo *WorkflowUpdateOne) Save(ctx context.Context) (*Workflow, error)
- func (wuo *WorkflowUpdateOne) SaveX(ctx context.Context) *Workflow
- func (wuo *WorkflowUpdateOne) Select(field string, fields ...string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetDescription(s string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetName(s string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetNanoid(s string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetNillableDescription(s *string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetNillableName(s *string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetNillableNanoid(s *string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetSteps(ss []schema.WorkflowStep) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetUpdatedAt(t time.Time) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetVariables(sv []schema.WorkflowVariable) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) Where(ps ...predicate.Workflow) *WorkflowUpdateOne
- type WorkflowUpsert
- func (u *WorkflowUpsert) ClearDescription() *WorkflowUpsert
- func (u *WorkflowUpsert) ClearNanoid() *WorkflowUpsert
- func (u *WorkflowUpsert) ClearUpdatedAt() *WorkflowUpsert
- func (u *WorkflowUpsert) SetDescription(v string) *WorkflowUpsert
- func (u *WorkflowUpsert) SetName(v string) *WorkflowUpsert
- func (u *WorkflowUpsert) SetNanoid(v string) *WorkflowUpsert
- func (u *WorkflowUpsert) SetSteps(v []schema.WorkflowStep) *WorkflowUpsert
- func (u *WorkflowUpsert) SetUpdatedAt(v time.Time) *WorkflowUpsert
- func (u *WorkflowUpsert) SetVariables(v []schema.WorkflowVariable) *WorkflowUpsert
- func (u *WorkflowUpsert) UpdateDescription() *WorkflowUpsert
- func (u *WorkflowUpsert) UpdateName() *WorkflowUpsert
- func (u *WorkflowUpsert) UpdateNanoid() *WorkflowUpsert
- func (u *WorkflowUpsert) UpdateSteps() *WorkflowUpsert
- func (u *WorkflowUpsert) UpdateUpdatedAt() *WorkflowUpsert
- func (u *WorkflowUpsert) UpdateVariables() *WorkflowUpsert
- type WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) ClearDescription() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) ClearNanoid() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) ClearUpdatedAt() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) DoNothing() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) Exec(ctx context.Context) error
- func (u *WorkflowUpsertBulk) ExecX(ctx context.Context)
- func (u *WorkflowUpsertBulk) Ignore() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) SetDescription(v string) *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) SetName(v string) *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) SetNanoid(v string) *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) SetSteps(v []schema.WorkflowStep) *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) SetUpdatedAt(v time.Time) *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) SetVariables(v []schema.WorkflowVariable) *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) Update(set func(*WorkflowUpsert)) *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) UpdateDescription() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) UpdateName() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) UpdateNanoid() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) UpdateNewValues() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) UpdateSteps() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) UpdateUpdatedAt() *WorkflowUpsertBulk
- func (u *WorkflowUpsertBulk) UpdateVariables() *WorkflowUpsertBulk
- type WorkflowUpsertOne
- func (u *WorkflowUpsertOne) ClearDescription() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) ClearNanoid() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) ClearUpdatedAt() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) DoNothing() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) Exec(ctx context.Context) error
- func (u *WorkflowUpsertOne) ExecX(ctx context.Context)
- func (u *WorkflowUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *WorkflowUpsertOne) IDX(ctx context.Context) int
- func (u *WorkflowUpsertOne) Ignore() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) SetDescription(v string) *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) SetName(v string) *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) SetNanoid(v string) *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) SetSteps(v []schema.WorkflowStep) *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) SetUpdatedAt(v time.Time) *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) SetVariables(v []schema.WorkflowVariable) *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) Update(set func(*WorkflowUpsert)) *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) UpdateDescription() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) UpdateName() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) UpdateNanoid() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) UpdateNewValues() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) UpdateSteps() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) UpdateUpdatedAt() *WorkflowUpsertOne
- func (u *WorkflowUpsertOne) UpdateVariables() *WorkflowUpsertOne
- type Workflows
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeDataset = "Dataset" TypeModel = "Model" TypeProvider = "Provider" TypeTableColumn = "TableColumn" TypeTableMeta = "TableMeta" TypeTableRow = "TableRow" TypeWorkflow = "Workflow" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Dataset is the client for interacting with the Dataset builders.
Dataset *DatasetClient
// Model is the client for interacting with the Model builders.
Model *ModelClient
// Provider is the client for interacting with the Provider builders.
Provider *ProviderClient
// TableColumn is the client for interacting with the TableColumn builders.
TableColumn *TableColumnClient
// TableMeta is the client for interacting with the TableMeta builders.
TableMeta *TableMetaClient
// TableRow is the client for interacting with the TableRow builders.
TableRow *TableRowClient
// Workflow is the client for interacting with the Workflow builders.
Workflow *WorkflowClient
// 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(). Dataset. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Commit(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Dataset ¶ added in v0.5.0
type Dataset struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Nanoid holds the value of the "nanoid" field.
Nanoid string `json:"nanoid,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Path holds the value of the "path" field.
Path string `json:"path,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// Type holds the value of the "type" field.
Type dataset.Type `json:"type,omitempty"`
// Indexer holds the value of the "indexer" field.
Indexer schema.CSVIndexer `json:"indexer,omitempty"`
// Values holds the value of the "values" field.
Values []string `json:"values,omitempty"`
// contains filtered or unexported fields
}
Dataset is the model entity for the Dataset schema.
func (*Dataset) Unwrap ¶ added in v0.5.0
Unwrap unwraps the Dataset entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Dataset) Update ¶ added in v0.5.0
func (d *Dataset) Update() *DatasetUpdateOne
Update returns a builder for updating this Dataset. Note that you need to call Dataset.Unwrap() before calling this method if this Dataset was returned from a transaction, and the transaction was committed or rolled back.
type DatasetClient ¶ added in v0.5.0
type DatasetClient struct {
// contains filtered or unexported fields
}
DatasetClient is a client for the Dataset schema.
func NewDatasetClient ¶ added in v0.5.0
func NewDatasetClient(c config) *DatasetClient
NewDatasetClient returns a client for the Dataset from the given config.
func (*DatasetClient) Create ¶ added in v0.5.0
func (c *DatasetClient) Create() *DatasetCreate
Create returns a builder for creating a Dataset entity.
func (*DatasetClient) CreateBulk ¶ added in v0.5.0
func (c *DatasetClient) CreateBulk(builders ...*DatasetCreate) *DatasetCreateBulk
CreateBulk returns a builder for creating a bulk of Dataset entities.
func (*DatasetClient) Delete ¶ added in v0.5.0
func (c *DatasetClient) Delete() *DatasetDelete
Delete returns a delete builder for Dataset.
func (*DatasetClient) DeleteOne ¶ added in v0.5.0
func (c *DatasetClient) DeleteOne(d *Dataset) *DatasetDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DatasetClient) DeleteOneID ¶ added in v0.5.0
func (c *DatasetClient) DeleteOneID(id int) *DatasetDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DatasetClient) GetX ¶ added in v0.5.0
func (c *DatasetClient) GetX(ctx context.Context, id int) *Dataset
GetX is like Get, but panics if an error occurs.
func (*DatasetClient) Hooks ¶ added in v0.5.0
func (c *DatasetClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DatasetClient) Intercept ¶ added in v0.5.0
func (c *DatasetClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `dataset.Intercept(f(g(h())))`.
func (*DatasetClient) Interceptors ¶ added in v0.5.0
func (c *DatasetClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DatasetClient) MapCreateBulk ¶ added in v0.5.0
func (c *DatasetClient) MapCreateBulk(slice any, setFunc func(*DatasetCreate, int)) *DatasetCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*DatasetClient) Query ¶ added in v0.5.0
func (c *DatasetClient) Query() *DatasetQuery
Query returns a query builder for Dataset.
func (*DatasetClient) Update ¶ added in v0.5.0
func (c *DatasetClient) Update() *DatasetUpdate
Update returns an update builder for Dataset.
func (*DatasetClient) UpdateOne ¶ added in v0.5.0
func (c *DatasetClient) UpdateOne(d *Dataset) *DatasetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DatasetClient) UpdateOneID ¶ added in v0.5.0
func (c *DatasetClient) UpdateOneID(id int) *DatasetUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DatasetClient) Use ¶ added in v0.5.0
func (c *DatasetClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dataset.Hooks(f(g(h())))`.
type DatasetCreate ¶ added in v0.5.0
type DatasetCreate struct {
// contains filtered or unexported fields
}
DatasetCreate is the builder for creating a Dataset entity.
func (*DatasetCreate) Exec ¶ added in v0.5.0
func (dc *DatasetCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DatasetCreate) ExecX ¶ added in v0.5.0
func (dc *DatasetCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetCreate) Mutation ¶ added in v0.5.0
func (dc *DatasetCreate) Mutation() *DatasetMutation
Mutation returns the DatasetMutation object of the builder.
func (*DatasetCreate) OnConflict ¶ added in v0.5.0
func (dc *DatasetCreate) OnConflict(opts ...sql.ConflictOption) *DatasetUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Dataset.Create().
SetCreatedAt(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.DatasetUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*DatasetCreate) OnConflictColumns ¶ added in v0.5.0
func (dc *DatasetCreate) OnConflictColumns(columns ...string) *DatasetUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Dataset.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DatasetCreate) Save ¶ added in v0.5.0
func (dc *DatasetCreate) Save(ctx context.Context) (*Dataset, error)
Save creates the Dataset in the database.
func (*DatasetCreate) SaveX ¶ added in v0.5.0
func (dc *DatasetCreate) SaveX(ctx context.Context) *Dataset
SaveX calls Save and panics if Save returns an error.
func (*DatasetCreate) SetCreatedAt ¶ added in v0.5.0
func (dc *DatasetCreate) SetCreatedAt(t time.Time) *DatasetCreate
SetCreatedAt sets the "created_at" field.
func (*DatasetCreate) SetDescription ¶ added in v0.5.0
func (dc *DatasetCreate) SetDescription(s string) *DatasetCreate
SetDescription sets the "description" field.
func (*DatasetCreate) SetIndexer ¶ added in v0.5.0
func (dc *DatasetCreate) SetIndexer(si schema.CSVIndexer) *DatasetCreate
SetIndexer sets the "indexer" field.
func (*DatasetCreate) SetName ¶ added in v0.5.0
func (dc *DatasetCreate) SetName(s string) *DatasetCreate
SetName sets the "name" field.
func (*DatasetCreate) SetNanoid ¶ added in v0.5.0
func (dc *DatasetCreate) SetNanoid(s string) *DatasetCreate
SetNanoid sets the "nanoid" field.
func (*DatasetCreate) SetNillableCreatedAt ¶ added in v0.5.0
func (dc *DatasetCreate) SetNillableCreatedAt(t *time.Time) *DatasetCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DatasetCreate) SetNillableDescription ¶ added in v0.5.0
func (dc *DatasetCreate) SetNillableDescription(s *string) *DatasetCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*DatasetCreate) SetNillableIndexer ¶ added in v0.5.0
func (dc *DatasetCreate) SetNillableIndexer(si *schema.CSVIndexer) *DatasetCreate
SetNillableIndexer sets the "indexer" field if the given value is not nil.
func (*DatasetCreate) SetNillableNanoid ¶ added in v0.5.0
func (dc *DatasetCreate) SetNillableNanoid(s *string) *DatasetCreate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*DatasetCreate) SetNillablePath ¶ added in v0.5.0
func (dc *DatasetCreate) SetNillablePath(s *string) *DatasetCreate
SetNillablePath sets the "path" field if the given value is not nil.
func (*DatasetCreate) SetNillableUpdatedAt ¶ added in v0.5.0
func (dc *DatasetCreate) SetNillableUpdatedAt(t *time.Time) *DatasetCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DatasetCreate) SetPath ¶ added in v0.5.0
func (dc *DatasetCreate) SetPath(s string) *DatasetCreate
SetPath sets the "path" field.
func (*DatasetCreate) SetType ¶ added in v0.5.0
func (dc *DatasetCreate) SetType(d dataset.Type) *DatasetCreate
SetType sets the "type" field.
func (*DatasetCreate) SetUpdatedAt ¶ added in v0.5.0
func (dc *DatasetCreate) SetUpdatedAt(t time.Time) *DatasetCreate
SetUpdatedAt sets the "updated_at" field.
func (*DatasetCreate) SetValues ¶ added in v0.5.0
func (dc *DatasetCreate) SetValues(s []string) *DatasetCreate
SetValues sets the "values" field.
type DatasetCreateBulk ¶ added in v0.5.0
type DatasetCreateBulk struct {
// contains filtered or unexported fields
}
DatasetCreateBulk is the builder for creating many Dataset entities in bulk.
func (*DatasetCreateBulk) Exec ¶ added in v0.5.0
func (dcb *DatasetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DatasetCreateBulk) ExecX ¶ added in v0.5.0
func (dcb *DatasetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetCreateBulk) OnConflict ¶ added in v0.5.0
func (dcb *DatasetCreateBulk) OnConflict(opts ...sql.ConflictOption) *DatasetUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Dataset.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.DatasetUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*DatasetCreateBulk) OnConflictColumns ¶ added in v0.5.0
func (dcb *DatasetCreateBulk) OnConflictColumns(columns ...string) *DatasetUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Dataset.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type DatasetDelete ¶ added in v0.5.0
type DatasetDelete struct {
// contains filtered or unexported fields
}
DatasetDelete is the builder for deleting a Dataset entity.
func (*DatasetDelete) Exec ¶ added in v0.5.0
func (dd *DatasetDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DatasetDelete) ExecX ¶ added in v0.5.0
func (dd *DatasetDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DatasetDelete) Where ¶ added in v0.5.0
func (dd *DatasetDelete) Where(ps ...predicate.Dataset) *DatasetDelete
Where appends a list predicates to the DatasetDelete builder.
type DatasetDeleteOne ¶ added in v0.5.0
type DatasetDeleteOne struct {
// contains filtered or unexported fields
}
DatasetDeleteOne is the builder for deleting a single Dataset entity.
func (*DatasetDeleteOne) Exec ¶ added in v0.5.0
func (ddo *DatasetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DatasetDeleteOne) ExecX ¶ added in v0.5.0
func (ddo *DatasetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetDeleteOne) Where ¶ added in v0.5.0
func (ddo *DatasetDeleteOne) Where(ps ...predicate.Dataset) *DatasetDeleteOne
Where appends a list predicates to the DatasetDelete builder.
type DatasetGroupBy ¶ added in v0.5.0
type DatasetGroupBy struct {
// contains filtered or unexported fields
}
DatasetGroupBy is the group-by builder for Dataset entities.
func (*DatasetGroupBy) Aggregate ¶ added in v0.5.0
func (dgb *DatasetGroupBy) Aggregate(fns ...AggregateFunc) *DatasetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DatasetGroupBy) Bool ¶ added in v0.5.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DatasetGroupBy) Bools ¶ added in v0.5.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DatasetGroupBy) BoolsX ¶ added in v0.5.0
BoolsX is like Bools, but panics if an error occurs.
func (*DatasetGroupBy) Float64 ¶ added in v0.5.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DatasetGroupBy) Float64X ¶ added in v0.5.0
Float64X is like Float64, but panics if an error occurs.
func (*DatasetGroupBy) Float64s ¶ added in v0.5.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DatasetGroupBy) Float64sX ¶ added in v0.5.0
Float64sX is like Float64s, but panics if an error occurs.
func (*DatasetGroupBy) Int ¶ added in v0.5.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DatasetGroupBy) Ints ¶ added in v0.5.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DatasetGroupBy) Scan ¶ added in v0.5.0
func (dgb *DatasetGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DatasetGroupBy) String ¶ added in v0.5.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DatasetGroupBy) StringX ¶ added in v0.5.0
StringX is like String, but panics if an error occurs.
type DatasetMutation ¶ added in v0.5.0
type DatasetMutation struct {
// contains filtered or unexported fields
}
DatasetMutation represents an operation that mutates the Dataset nodes in the graph.
func (*DatasetMutation) AddField ¶ added in v0.5.0
func (m *DatasetMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*DatasetMutation) AddedEdges ¶ added in v0.5.0
func (m *DatasetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DatasetMutation) AddedField ¶ added in v0.5.0
func (m *DatasetMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*DatasetMutation) AddedFields ¶ added in v0.5.0
func (m *DatasetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DatasetMutation) AddedIDs ¶ added in v0.5.0
func (m *DatasetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DatasetMutation) AppendValues ¶ added in v0.5.0
func (m *DatasetMutation) AppendValues(s []string)
AppendValues adds s to the "values" field.
func (*DatasetMutation) AppendedValues ¶ added in v0.5.0
func (m *DatasetMutation) AppendedValues() ([]string, bool)
AppendedValues returns the list of values that were appended to the "values" field in this mutation.
func (*DatasetMutation) ClearCreatedAt ¶ added in v0.5.0
func (m *DatasetMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*DatasetMutation) ClearEdge ¶ added in v0.5.0
func (m *DatasetMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*DatasetMutation) ClearField ¶ added in v0.5.0
func (m *DatasetMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*DatasetMutation) ClearIndexer ¶ added in v0.5.0
func (m *DatasetMutation) ClearIndexer()
ClearIndexer clears the value of the "indexer" field.
func (*DatasetMutation) ClearNanoid ¶ added in v0.5.0
func (m *DatasetMutation) ClearNanoid()
ClearNanoid clears the value of the "nanoid" field.
func (*DatasetMutation) ClearPath ¶ added in v0.5.0
func (m *DatasetMutation) ClearPath()
ClearPath clears the value of the "path" field.
func (*DatasetMutation) ClearUpdatedAt ¶ added in v0.5.0
func (m *DatasetMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DatasetMutation) ClearValues ¶ added in v0.5.0
func (m *DatasetMutation) ClearValues()
ClearValues clears the value of the "values" field.
func (*DatasetMutation) ClearedEdges ¶ added in v0.5.0
func (m *DatasetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DatasetMutation) ClearedFields ¶ added in v0.5.0
func (m *DatasetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DatasetMutation) Client ¶ added in v0.5.0
func (m DatasetMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*DatasetMutation) CreatedAt ¶ added in v0.5.0
func (m *DatasetMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DatasetMutation) CreatedAtCleared ¶ added in v0.5.0
func (m *DatasetMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*DatasetMutation) Description ¶ added in v0.5.0
func (m *DatasetMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*DatasetMutation) EdgeCleared ¶ added in v0.5.0
func (m *DatasetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DatasetMutation) Field ¶ added in v0.5.0
func (m *DatasetMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*DatasetMutation) FieldCleared ¶ added in v0.5.0
func (m *DatasetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DatasetMutation) Fields ¶ added in v0.5.0
func (m *DatasetMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*DatasetMutation) GetType ¶ added in v0.5.0
func (m *DatasetMutation) GetType() (r dataset.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*DatasetMutation) ID ¶ added in v0.5.0
func (m *DatasetMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DatasetMutation) IDs ¶ added in v0.5.0
func (m *DatasetMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DatasetMutation) Indexer ¶ added in v0.5.0
func (m *DatasetMutation) Indexer() (r schema.CSVIndexer, exists bool)
Indexer returns the value of the "indexer" field in the mutation.
func (*DatasetMutation) IndexerCleared ¶ added in v0.5.0
func (m *DatasetMutation) IndexerCleared() bool
IndexerCleared returns if the "indexer" field was cleared in this mutation.
func (*DatasetMutation) Name ¶ added in v0.5.0
func (m *DatasetMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*DatasetMutation) Nanoid ¶ added in v0.5.0
func (m *DatasetMutation) Nanoid() (r string, exists bool)
Nanoid returns the value of the "nanoid" field in the mutation.
func (*DatasetMutation) NanoidCleared ¶ added in v0.5.0
func (m *DatasetMutation) NanoidCleared() bool
NanoidCleared returns if the "nanoid" field was cleared in this mutation.
func (*DatasetMutation) OldCreatedAt ¶ added in v0.5.0
OldCreatedAt returns the old "created_at" field's value of the Dataset entity. If the Dataset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DatasetMutation) OldDescription ¶ added in v0.5.0
func (m *DatasetMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Dataset entity. If the Dataset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DatasetMutation) OldField ¶ added in v0.5.0
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*DatasetMutation) OldIndexer ¶ added in v0.5.0
func (m *DatasetMutation) OldIndexer(ctx context.Context) (v schema.CSVIndexer, err error)
OldIndexer returns the old "indexer" field's value of the Dataset entity. If the Dataset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DatasetMutation) OldName ¶ added in v0.5.0
func (m *DatasetMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Dataset entity. If the Dataset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DatasetMutation) OldNanoid ¶ added in v0.5.0
func (m *DatasetMutation) OldNanoid(ctx context.Context) (v string, err error)
OldNanoid returns the old "nanoid" field's value of the Dataset entity. If the Dataset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DatasetMutation) OldPath ¶ added in v0.5.0
func (m *DatasetMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the Dataset entity. If the Dataset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DatasetMutation) OldType ¶ added in v0.5.0
OldType returns the old "type" field's value of the Dataset entity. If the Dataset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DatasetMutation) OldUpdatedAt ¶ added in v0.5.0
OldUpdatedAt returns the old "updated_at" field's value of the Dataset entity. If the Dataset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DatasetMutation) OldValues ¶ added in v0.5.0
func (m *DatasetMutation) OldValues(ctx context.Context) (v []string, err error)
OldValues returns the old "values" field's value of the Dataset entity. If the Dataset object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DatasetMutation) Op ¶ added in v0.5.0
func (m *DatasetMutation) Op() Op
Op returns the operation name.
func (*DatasetMutation) Path ¶ added in v0.5.0
func (m *DatasetMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*DatasetMutation) PathCleared ¶ added in v0.5.0
func (m *DatasetMutation) PathCleared() bool
PathCleared returns if the "path" field was cleared in this mutation.
func (*DatasetMutation) RemovedEdges ¶ added in v0.5.0
func (m *DatasetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DatasetMutation) RemovedIDs ¶ added in v0.5.0
func (m *DatasetMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*DatasetMutation) ResetCreatedAt ¶ added in v0.5.0
func (m *DatasetMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DatasetMutation) ResetDescription ¶ added in v0.5.0
func (m *DatasetMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*DatasetMutation) ResetEdge ¶ added in v0.5.0
func (m *DatasetMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*DatasetMutation) ResetField ¶ added in v0.5.0
func (m *DatasetMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*DatasetMutation) ResetIndexer ¶ added in v0.5.0
func (m *DatasetMutation) ResetIndexer()
ResetIndexer resets all changes to the "indexer" field.
func (*DatasetMutation) ResetName ¶ added in v0.5.0
func (m *DatasetMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*DatasetMutation) ResetNanoid ¶ added in v0.5.0
func (m *DatasetMutation) ResetNanoid()
ResetNanoid resets all changes to the "nanoid" field.
func (*DatasetMutation) ResetPath ¶ added in v0.5.0
func (m *DatasetMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*DatasetMutation) ResetType ¶ added in v0.5.0
func (m *DatasetMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*DatasetMutation) ResetUpdatedAt ¶ added in v0.5.0
func (m *DatasetMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DatasetMutation) ResetValues ¶ added in v0.5.0
func (m *DatasetMutation) ResetValues()
ResetValues resets all changes to the "values" field.
func (*DatasetMutation) SetCreatedAt ¶ added in v0.5.0
func (m *DatasetMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DatasetMutation) SetDescription ¶ added in v0.5.0
func (m *DatasetMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*DatasetMutation) SetField ¶ added in v0.5.0
func (m *DatasetMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*DatasetMutation) SetIndexer ¶ added in v0.5.0
func (m *DatasetMutation) SetIndexer(si schema.CSVIndexer)
SetIndexer sets the "indexer" field.
func (*DatasetMutation) SetName ¶ added in v0.5.0
func (m *DatasetMutation) SetName(s string)
SetName sets the "name" field.
func (*DatasetMutation) SetNanoid ¶ added in v0.5.0
func (m *DatasetMutation) SetNanoid(s string)
SetNanoid sets the "nanoid" field.
func (*DatasetMutation) SetOp ¶ added in v0.5.0
func (m *DatasetMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DatasetMutation) SetPath ¶ added in v0.5.0
func (m *DatasetMutation) SetPath(s string)
SetPath sets the "path" field.
func (*DatasetMutation) SetType ¶ added in v0.5.0
func (m *DatasetMutation) SetType(d dataset.Type)
SetType sets the "type" field.
func (*DatasetMutation) SetUpdatedAt ¶ added in v0.5.0
func (m *DatasetMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DatasetMutation) SetValues ¶ added in v0.5.0
func (m *DatasetMutation) SetValues(s []string)
SetValues sets the "values" field.
func (DatasetMutation) Tx ¶ added in v0.5.0
func (m DatasetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DatasetMutation) Type ¶ added in v0.5.0
func (m *DatasetMutation) Type() string
Type returns the node type of this mutation (Dataset).
func (*DatasetMutation) UpdatedAt ¶ added in v0.5.0
func (m *DatasetMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DatasetMutation) UpdatedAtCleared ¶ added in v0.5.0
func (m *DatasetMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*DatasetMutation) Values ¶ added in v0.5.0
func (m *DatasetMutation) Values() (r []string, exists bool)
Values returns the value of the "values" field in the mutation.
func (*DatasetMutation) ValuesCleared ¶ added in v0.5.0
func (m *DatasetMutation) ValuesCleared() bool
ValuesCleared returns if the "values" field was cleared in this mutation.
func (*DatasetMutation) Where ¶ added in v0.5.0
func (m *DatasetMutation) Where(ps ...predicate.Dataset)
Where appends a list predicates to the DatasetMutation builder.
func (*DatasetMutation) WhereP ¶ added in v0.5.0
func (m *DatasetMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DatasetMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DatasetQuery ¶ added in v0.5.0
type DatasetQuery struct {
// contains filtered or unexported fields
}
DatasetQuery is the builder for querying Dataset entities.
func (*DatasetQuery) Aggregate ¶ added in v0.5.0
func (dq *DatasetQuery) Aggregate(fns ...AggregateFunc) *DatasetSelect
Aggregate returns a DatasetSelect configured with the given aggregations.
func (*DatasetQuery) All ¶ added in v0.5.0
func (dq *DatasetQuery) All(ctx context.Context) ([]*Dataset, error)
All executes the query and returns a list of Datasets.
func (*DatasetQuery) AllX ¶ added in v0.5.0
func (dq *DatasetQuery) AllX(ctx context.Context) []*Dataset
AllX is like All, but panics if an error occurs.
func (*DatasetQuery) Clone ¶ added in v0.5.0
func (dq *DatasetQuery) Clone() *DatasetQuery
Clone returns a duplicate of the DatasetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DatasetQuery) Count ¶ added in v0.5.0
func (dq *DatasetQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DatasetQuery) CountX ¶ added in v0.5.0
func (dq *DatasetQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DatasetQuery) Exist ¶ added in v0.5.0
func (dq *DatasetQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DatasetQuery) ExistX ¶ added in v0.5.0
func (dq *DatasetQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DatasetQuery) First ¶ added in v0.5.0
func (dq *DatasetQuery) First(ctx context.Context) (*Dataset, error)
First returns the first Dataset entity from the query. Returns a *NotFoundError when no Dataset was found.
func (*DatasetQuery) FirstID ¶ added in v0.5.0
func (dq *DatasetQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Dataset ID from the query. Returns a *NotFoundError when no Dataset ID was found.
func (*DatasetQuery) FirstIDX ¶ added in v0.5.0
func (dq *DatasetQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DatasetQuery) FirstX ¶ added in v0.5.0
func (dq *DatasetQuery) FirstX(ctx context.Context) *Dataset
FirstX is like First, but panics if an error occurs.
func (*DatasetQuery) ForShare ¶ added in v0.5.0
func (dq *DatasetQuery) ForShare(opts ...sql.LockOption) *DatasetQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*DatasetQuery) ForUpdate ¶ added in v0.5.0
func (dq *DatasetQuery) ForUpdate(opts ...sql.LockOption) *DatasetQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*DatasetQuery) GroupBy ¶ added in v0.5.0
func (dq *DatasetQuery) GroupBy(field string, fields ...string) *DatasetGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Dataset.Query().
GroupBy(dataset.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DatasetQuery) IDs ¶ added in v0.5.0
func (dq *DatasetQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Dataset IDs.
func (*DatasetQuery) IDsX ¶ added in v0.5.0
func (dq *DatasetQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DatasetQuery) Limit ¶ added in v0.5.0
func (dq *DatasetQuery) Limit(limit int) *DatasetQuery
Limit the number of records to be returned by this query.
func (*DatasetQuery) Modify ¶ added in v0.5.0
func (dq *DatasetQuery) Modify(modifiers ...func(s *sql.Selector)) *DatasetSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DatasetQuery) Offset ¶ added in v0.5.0
func (dq *DatasetQuery) Offset(offset int) *DatasetQuery
Offset to start from.
func (*DatasetQuery) Only ¶ added in v0.5.0
func (dq *DatasetQuery) Only(ctx context.Context) (*Dataset, error)
Only returns a single Dataset entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Dataset entity is found. Returns a *NotFoundError when no Dataset entities are found.
func (*DatasetQuery) OnlyID ¶ added in v0.5.0
func (dq *DatasetQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Dataset ID in the query. Returns a *NotSingularError when more than one Dataset ID is found. Returns a *NotFoundError when no entities are found.
func (*DatasetQuery) OnlyIDX ¶ added in v0.5.0
func (dq *DatasetQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DatasetQuery) OnlyX ¶ added in v0.5.0
func (dq *DatasetQuery) OnlyX(ctx context.Context) *Dataset
OnlyX is like Only, but panics if an error occurs.
func (*DatasetQuery) Order ¶ added in v0.5.0
func (dq *DatasetQuery) Order(o ...dataset.OrderOption) *DatasetQuery
Order specifies how the records should be ordered.
func (*DatasetQuery) Select ¶ added in v0.5.0
func (dq *DatasetQuery) Select(fields ...string) *DatasetSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Dataset.Query().
Select(dataset.FieldCreatedAt).
Scan(ctx, &v)
func (*DatasetQuery) Unique ¶ added in v0.5.0
func (dq *DatasetQuery) Unique(unique bool) *DatasetQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*DatasetQuery) Where ¶ added in v0.5.0
func (dq *DatasetQuery) Where(ps ...predicate.Dataset) *DatasetQuery
Where adds a new predicate for the DatasetQuery builder.
type DatasetSelect ¶ added in v0.5.0
type DatasetSelect struct {
*DatasetQuery
// contains filtered or unexported fields
}
DatasetSelect is the builder for selecting fields of Dataset entities.
func (*DatasetSelect) Aggregate ¶ added in v0.5.0
func (ds *DatasetSelect) Aggregate(fns ...AggregateFunc) *DatasetSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DatasetSelect) Bool ¶ added in v0.5.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) Bools ¶ added in v0.5.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) Float64 ¶ added in v0.5.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) Float64X ¶ added in v0.5.0
Float64X is like Float64, but panics if an error occurs.
func (*DatasetSelect) Float64s ¶ added in v0.5.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) Float64sX ¶ added in v0.5.0
Float64sX is like Float64s, but panics if an error occurs.
func (*DatasetSelect) Int ¶ added in v0.5.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) Ints ¶ added in v0.5.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) Modify ¶ added in v0.5.0
func (ds *DatasetSelect) Modify(modifiers ...func(s *sql.Selector)) *DatasetSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DatasetSelect) Scan ¶ added in v0.5.0
func (ds *DatasetSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DatasetSelect) String ¶ added in v0.5.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) StringX ¶ added in v0.5.0
StringX is like String, but panics if an error occurs.
type DatasetUpdate ¶ added in v0.5.0
type DatasetUpdate struct {
// contains filtered or unexported fields
}
DatasetUpdate is the builder for updating Dataset entities.
func (*DatasetUpdate) AppendValues ¶ added in v0.5.0
func (du *DatasetUpdate) AppendValues(s []string) *DatasetUpdate
AppendValues appends s to the "values" field.
func (*DatasetUpdate) ClearIndexer ¶ added in v0.5.0
func (du *DatasetUpdate) ClearIndexer() *DatasetUpdate
ClearIndexer clears the value of the "indexer" field.
func (*DatasetUpdate) ClearNanoid ¶ added in v0.5.0
func (du *DatasetUpdate) ClearNanoid() *DatasetUpdate
ClearNanoid clears the value of the "nanoid" field.
func (*DatasetUpdate) ClearPath ¶ added in v0.5.0
func (du *DatasetUpdate) ClearPath() *DatasetUpdate
ClearPath clears the value of the "path" field.
func (*DatasetUpdate) ClearUpdatedAt ¶ added in v0.5.0
func (du *DatasetUpdate) ClearUpdatedAt() *DatasetUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DatasetUpdate) ClearValues ¶ added in v0.5.0
func (du *DatasetUpdate) ClearValues() *DatasetUpdate
ClearValues clears the value of the "values" field.
func (*DatasetUpdate) Exec ¶ added in v0.5.0
func (du *DatasetUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DatasetUpdate) ExecX ¶ added in v0.5.0
func (du *DatasetUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetUpdate) Modify ¶ added in v0.5.0
func (du *DatasetUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DatasetUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DatasetUpdate) Mutation ¶ added in v0.5.0
func (du *DatasetUpdate) Mutation() *DatasetMutation
Mutation returns the DatasetMutation object of the builder.
func (*DatasetUpdate) Save ¶ added in v0.5.0
func (du *DatasetUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DatasetUpdate) SaveX ¶ added in v0.5.0
func (du *DatasetUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DatasetUpdate) SetDescription ¶ added in v0.5.0
func (du *DatasetUpdate) SetDescription(s string) *DatasetUpdate
SetDescription sets the "description" field.
func (*DatasetUpdate) SetIndexer ¶ added in v0.5.0
func (du *DatasetUpdate) SetIndexer(si schema.CSVIndexer) *DatasetUpdate
SetIndexer sets the "indexer" field.
func (*DatasetUpdate) SetName ¶ added in v0.5.0
func (du *DatasetUpdate) SetName(s string) *DatasetUpdate
SetName sets the "name" field.
func (*DatasetUpdate) SetNanoid ¶ added in v0.5.0
func (du *DatasetUpdate) SetNanoid(s string) *DatasetUpdate
SetNanoid sets the "nanoid" field.
func (*DatasetUpdate) SetNillableDescription ¶ added in v0.5.0
func (du *DatasetUpdate) SetNillableDescription(s *string) *DatasetUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*DatasetUpdate) SetNillableIndexer ¶ added in v0.5.0
func (du *DatasetUpdate) SetNillableIndexer(si *schema.CSVIndexer) *DatasetUpdate
SetNillableIndexer sets the "indexer" field if the given value is not nil.
func (*DatasetUpdate) SetNillableName ¶ added in v0.5.0
func (du *DatasetUpdate) SetNillableName(s *string) *DatasetUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*DatasetUpdate) SetNillableNanoid ¶ added in v0.5.0
func (du *DatasetUpdate) SetNillableNanoid(s *string) *DatasetUpdate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*DatasetUpdate) SetNillablePath ¶ added in v0.5.0
func (du *DatasetUpdate) SetNillablePath(s *string) *DatasetUpdate
SetNillablePath sets the "path" field if the given value is not nil.
func (*DatasetUpdate) SetNillableType ¶ added in v0.5.0
func (du *DatasetUpdate) SetNillableType(d *dataset.Type) *DatasetUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*DatasetUpdate) SetPath ¶ added in v0.5.0
func (du *DatasetUpdate) SetPath(s string) *DatasetUpdate
SetPath sets the "path" field.
func (*DatasetUpdate) SetType ¶ added in v0.5.0
func (du *DatasetUpdate) SetType(d dataset.Type) *DatasetUpdate
SetType sets the "type" field.
func (*DatasetUpdate) SetUpdatedAt ¶ added in v0.5.0
func (du *DatasetUpdate) SetUpdatedAt(t time.Time) *DatasetUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DatasetUpdate) SetValues ¶ added in v0.5.0
func (du *DatasetUpdate) SetValues(s []string) *DatasetUpdate
SetValues sets the "values" field.
func (*DatasetUpdate) Where ¶ added in v0.5.0
func (du *DatasetUpdate) Where(ps ...predicate.Dataset) *DatasetUpdate
Where appends a list predicates to the DatasetUpdate builder.
type DatasetUpdateOne ¶ added in v0.5.0
type DatasetUpdateOne struct {
// contains filtered or unexported fields
}
DatasetUpdateOne is the builder for updating a single Dataset entity.
func (*DatasetUpdateOne) AppendValues ¶ added in v0.5.0
func (duo *DatasetUpdateOne) AppendValues(s []string) *DatasetUpdateOne
AppendValues appends s to the "values" field.
func (*DatasetUpdateOne) ClearIndexer ¶ added in v0.5.0
func (duo *DatasetUpdateOne) ClearIndexer() *DatasetUpdateOne
ClearIndexer clears the value of the "indexer" field.
func (*DatasetUpdateOne) ClearNanoid ¶ added in v0.5.0
func (duo *DatasetUpdateOne) ClearNanoid() *DatasetUpdateOne
ClearNanoid clears the value of the "nanoid" field.
func (*DatasetUpdateOne) ClearPath ¶ added in v0.5.0
func (duo *DatasetUpdateOne) ClearPath() *DatasetUpdateOne
ClearPath clears the value of the "path" field.
func (*DatasetUpdateOne) ClearUpdatedAt ¶ added in v0.5.0
func (duo *DatasetUpdateOne) ClearUpdatedAt() *DatasetUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DatasetUpdateOne) ClearValues ¶ added in v0.5.0
func (duo *DatasetUpdateOne) ClearValues() *DatasetUpdateOne
ClearValues clears the value of the "values" field.
func (*DatasetUpdateOne) Exec ¶ added in v0.5.0
func (duo *DatasetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DatasetUpdateOne) ExecX ¶ added in v0.5.0
func (duo *DatasetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetUpdateOne) Modify ¶ added in v0.5.0
func (duo *DatasetUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DatasetUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DatasetUpdateOne) Mutation ¶ added in v0.5.0
func (duo *DatasetUpdateOne) Mutation() *DatasetMutation
Mutation returns the DatasetMutation object of the builder.
func (*DatasetUpdateOne) Save ¶ added in v0.5.0
func (duo *DatasetUpdateOne) Save(ctx context.Context) (*Dataset, error)
Save executes the query and returns the updated Dataset entity.
func (*DatasetUpdateOne) SaveX ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SaveX(ctx context.Context) *Dataset
SaveX is like Save, but panics if an error occurs.
func (*DatasetUpdateOne) Select ¶ added in v0.5.0
func (duo *DatasetUpdateOne) Select(field string, fields ...string) *DatasetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DatasetUpdateOne) SetDescription ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetDescription(s string) *DatasetUpdateOne
SetDescription sets the "description" field.
func (*DatasetUpdateOne) SetIndexer ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetIndexer(si schema.CSVIndexer) *DatasetUpdateOne
SetIndexer sets the "indexer" field.
func (*DatasetUpdateOne) SetName ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetName(s string) *DatasetUpdateOne
SetName sets the "name" field.
func (*DatasetUpdateOne) SetNanoid ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetNanoid(s string) *DatasetUpdateOne
SetNanoid sets the "nanoid" field.
func (*DatasetUpdateOne) SetNillableDescription ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetNillableDescription(s *string) *DatasetUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*DatasetUpdateOne) SetNillableIndexer ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetNillableIndexer(si *schema.CSVIndexer) *DatasetUpdateOne
SetNillableIndexer sets the "indexer" field if the given value is not nil.
func (*DatasetUpdateOne) SetNillableName ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetNillableName(s *string) *DatasetUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*DatasetUpdateOne) SetNillableNanoid ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetNillableNanoid(s *string) *DatasetUpdateOne
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*DatasetUpdateOne) SetNillablePath ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetNillablePath(s *string) *DatasetUpdateOne
SetNillablePath sets the "path" field if the given value is not nil.
func (*DatasetUpdateOne) SetNillableType ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetNillableType(d *dataset.Type) *DatasetUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*DatasetUpdateOne) SetPath ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetPath(s string) *DatasetUpdateOne
SetPath sets the "path" field.
func (*DatasetUpdateOne) SetType ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetType(d dataset.Type) *DatasetUpdateOne
SetType sets the "type" field.
func (*DatasetUpdateOne) SetUpdatedAt ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetUpdatedAt(t time.Time) *DatasetUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DatasetUpdateOne) SetValues ¶ added in v0.5.0
func (duo *DatasetUpdateOne) SetValues(s []string) *DatasetUpdateOne
SetValues sets the "values" field.
func (*DatasetUpdateOne) Where ¶ added in v0.5.0
func (duo *DatasetUpdateOne) Where(ps ...predicate.Dataset) *DatasetUpdateOne
Where appends a list predicates to the DatasetUpdate builder.
type DatasetUpsert ¶ added in v0.5.0
DatasetUpsert is the "OnConflict" setter.
func (*DatasetUpsert) ClearIndexer ¶ added in v0.5.0
func (u *DatasetUpsert) ClearIndexer() *DatasetUpsert
ClearIndexer clears the value of the "indexer" field.
func (*DatasetUpsert) ClearNanoid ¶ added in v0.5.0
func (u *DatasetUpsert) ClearNanoid() *DatasetUpsert
ClearNanoid clears the value of the "nanoid" field.
func (*DatasetUpsert) ClearPath ¶ added in v0.5.0
func (u *DatasetUpsert) ClearPath() *DatasetUpsert
ClearPath clears the value of the "path" field.
func (*DatasetUpsert) ClearUpdatedAt ¶ added in v0.5.0
func (u *DatasetUpsert) ClearUpdatedAt() *DatasetUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DatasetUpsert) ClearValues ¶ added in v0.5.0
func (u *DatasetUpsert) ClearValues() *DatasetUpsert
ClearValues clears the value of the "values" field.
func (*DatasetUpsert) SetDescription ¶ added in v0.5.0
func (u *DatasetUpsert) SetDescription(v string) *DatasetUpsert
SetDescription sets the "description" field.
func (*DatasetUpsert) SetIndexer ¶ added in v0.5.0
func (u *DatasetUpsert) SetIndexer(v schema.CSVIndexer) *DatasetUpsert
SetIndexer sets the "indexer" field.
func (*DatasetUpsert) SetName ¶ added in v0.5.0
func (u *DatasetUpsert) SetName(v string) *DatasetUpsert
SetName sets the "name" field.
func (*DatasetUpsert) SetNanoid ¶ added in v0.5.0
func (u *DatasetUpsert) SetNanoid(v string) *DatasetUpsert
SetNanoid sets the "nanoid" field.
func (*DatasetUpsert) SetPath ¶ added in v0.5.0
func (u *DatasetUpsert) SetPath(v string) *DatasetUpsert
SetPath sets the "path" field.
func (*DatasetUpsert) SetType ¶ added in v0.5.0
func (u *DatasetUpsert) SetType(v dataset.Type) *DatasetUpsert
SetType sets the "type" field.
func (*DatasetUpsert) SetUpdatedAt ¶ added in v0.5.0
func (u *DatasetUpsert) SetUpdatedAt(v time.Time) *DatasetUpsert
SetUpdatedAt sets the "updated_at" field.
func (*DatasetUpsert) SetValues ¶ added in v0.5.0
func (u *DatasetUpsert) SetValues(v []string) *DatasetUpsert
SetValues sets the "values" field.
func (*DatasetUpsert) UpdateDescription ¶ added in v0.5.0
func (u *DatasetUpsert) UpdateDescription() *DatasetUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*DatasetUpsert) UpdateIndexer ¶ added in v0.5.0
func (u *DatasetUpsert) UpdateIndexer() *DatasetUpsert
UpdateIndexer sets the "indexer" field to the value that was provided on create.
func (*DatasetUpsert) UpdateName ¶ added in v0.5.0
func (u *DatasetUpsert) UpdateName() *DatasetUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*DatasetUpsert) UpdateNanoid ¶ added in v0.5.0
func (u *DatasetUpsert) UpdateNanoid() *DatasetUpsert
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*DatasetUpsert) UpdatePath ¶ added in v0.5.0
func (u *DatasetUpsert) UpdatePath() *DatasetUpsert
UpdatePath sets the "path" field to the value that was provided on create.
func (*DatasetUpsert) UpdateType ¶ added in v0.5.0
func (u *DatasetUpsert) UpdateType() *DatasetUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*DatasetUpsert) UpdateUpdatedAt ¶ added in v0.5.0
func (u *DatasetUpsert) UpdateUpdatedAt() *DatasetUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*DatasetUpsert) UpdateValues ¶ added in v0.5.0
func (u *DatasetUpsert) UpdateValues() *DatasetUpsert
UpdateValues sets the "values" field to the value that was provided on create.
type DatasetUpsertBulk ¶ added in v0.5.0
type DatasetUpsertBulk struct {
// contains filtered or unexported fields
}
DatasetUpsertBulk is the builder for "upsert"-ing a bulk of Dataset nodes.
func (*DatasetUpsertBulk) ClearIndexer ¶ added in v0.5.0
func (u *DatasetUpsertBulk) ClearIndexer() *DatasetUpsertBulk
ClearIndexer clears the value of the "indexer" field.
func (*DatasetUpsertBulk) ClearNanoid ¶ added in v0.5.0
func (u *DatasetUpsertBulk) ClearNanoid() *DatasetUpsertBulk
ClearNanoid clears the value of the "nanoid" field.
func (*DatasetUpsertBulk) ClearPath ¶ added in v0.5.0
func (u *DatasetUpsertBulk) ClearPath() *DatasetUpsertBulk
ClearPath clears the value of the "path" field.
func (*DatasetUpsertBulk) ClearUpdatedAt ¶ added in v0.5.0
func (u *DatasetUpsertBulk) ClearUpdatedAt() *DatasetUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DatasetUpsertBulk) ClearValues ¶ added in v0.5.0
func (u *DatasetUpsertBulk) ClearValues() *DatasetUpsertBulk
ClearValues clears the value of the "values" field.
func (*DatasetUpsertBulk) DoNothing ¶ added in v0.5.0
func (u *DatasetUpsertBulk) DoNothing() *DatasetUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DatasetUpsertBulk) Exec ¶ added in v0.5.0
func (u *DatasetUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DatasetUpsertBulk) ExecX ¶ added in v0.5.0
func (u *DatasetUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetUpsertBulk) Ignore ¶ added in v0.5.0
func (u *DatasetUpsertBulk) Ignore() *DatasetUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Dataset.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DatasetUpsertBulk) SetDescription ¶ added in v0.5.0
func (u *DatasetUpsertBulk) SetDescription(v string) *DatasetUpsertBulk
SetDescription sets the "description" field.
func (*DatasetUpsertBulk) SetIndexer ¶ added in v0.5.0
func (u *DatasetUpsertBulk) SetIndexer(v schema.CSVIndexer) *DatasetUpsertBulk
SetIndexer sets the "indexer" field.
func (*DatasetUpsertBulk) SetName ¶ added in v0.5.0
func (u *DatasetUpsertBulk) SetName(v string) *DatasetUpsertBulk
SetName sets the "name" field.
func (*DatasetUpsertBulk) SetNanoid ¶ added in v0.5.0
func (u *DatasetUpsertBulk) SetNanoid(v string) *DatasetUpsertBulk
SetNanoid sets the "nanoid" field.
func (*DatasetUpsertBulk) SetPath ¶ added in v0.5.0
func (u *DatasetUpsertBulk) SetPath(v string) *DatasetUpsertBulk
SetPath sets the "path" field.
func (*DatasetUpsertBulk) SetType ¶ added in v0.5.0
func (u *DatasetUpsertBulk) SetType(v dataset.Type) *DatasetUpsertBulk
SetType sets the "type" field.
func (*DatasetUpsertBulk) SetUpdatedAt ¶ added in v0.5.0
func (u *DatasetUpsertBulk) SetUpdatedAt(v time.Time) *DatasetUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*DatasetUpsertBulk) SetValues ¶ added in v0.5.0
func (u *DatasetUpsertBulk) SetValues(v []string) *DatasetUpsertBulk
SetValues sets the "values" field.
func (*DatasetUpsertBulk) Update ¶ added in v0.5.0
func (u *DatasetUpsertBulk) Update(set func(*DatasetUpsert)) *DatasetUpsertBulk
Update allows overriding fields `UPDATE` values. See the DatasetCreateBulk.OnConflict documentation for more info.
func (*DatasetUpsertBulk) UpdateDescription ¶ added in v0.5.0
func (u *DatasetUpsertBulk) UpdateDescription() *DatasetUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*DatasetUpsertBulk) UpdateIndexer ¶ added in v0.5.0
func (u *DatasetUpsertBulk) UpdateIndexer() *DatasetUpsertBulk
UpdateIndexer sets the "indexer" field to the value that was provided on create.
func (*DatasetUpsertBulk) UpdateName ¶ added in v0.5.0
func (u *DatasetUpsertBulk) UpdateName() *DatasetUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*DatasetUpsertBulk) UpdateNanoid ¶ added in v0.5.0
func (u *DatasetUpsertBulk) UpdateNanoid() *DatasetUpsertBulk
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*DatasetUpsertBulk) UpdateNewValues ¶ added in v0.5.0
func (u *DatasetUpsertBulk) UpdateNewValues() *DatasetUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Dataset.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*DatasetUpsertBulk) UpdatePath ¶ added in v0.5.0
func (u *DatasetUpsertBulk) UpdatePath() *DatasetUpsertBulk
UpdatePath sets the "path" field to the value that was provided on create.
func (*DatasetUpsertBulk) UpdateType ¶ added in v0.5.0
func (u *DatasetUpsertBulk) UpdateType() *DatasetUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*DatasetUpsertBulk) UpdateUpdatedAt ¶ added in v0.5.0
func (u *DatasetUpsertBulk) UpdateUpdatedAt() *DatasetUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*DatasetUpsertBulk) UpdateValues ¶ added in v0.5.0
func (u *DatasetUpsertBulk) UpdateValues() *DatasetUpsertBulk
UpdateValues sets the "values" field to the value that was provided on create.
type DatasetUpsertOne ¶ added in v0.5.0
type DatasetUpsertOne struct {
// contains filtered or unexported fields
}
DatasetUpsertOne is the builder for "upsert"-ing
one Dataset node.
func (*DatasetUpsertOne) ClearIndexer ¶ added in v0.5.0
func (u *DatasetUpsertOne) ClearIndexer() *DatasetUpsertOne
ClearIndexer clears the value of the "indexer" field.
func (*DatasetUpsertOne) ClearNanoid ¶ added in v0.5.0
func (u *DatasetUpsertOne) ClearNanoid() *DatasetUpsertOne
ClearNanoid clears the value of the "nanoid" field.
func (*DatasetUpsertOne) ClearPath ¶ added in v0.5.0
func (u *DatasetUpsertOne) ClearPath() *DatasetUpsertOne
ClearPath clears the value of the "path" field.
func (*DatasetUpsertOne) ClearUpdatedAt ¶ added in v0.5.0
func (u *DatasetUpsertOne) ClearUpdatedAt() *DatasetUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DatasetUpsertOne) ClearValues ¶ added in v0.5.0
func (u *DatasetUpsertOne) ClearValues() *DatasetUpsertOne
ClearValues clears the value of the "values" field.
func (*DatasetUpsertOne) DoNothing ¶ added in v0.5.0
func (u *DatasetUpsertOne) DoNothing() *DatasetUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DatasetUpsertOne) Exec ¶ added in v0.5.0
func (u *DatasetUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*DatasetUpsertOne) ExecX ¶ added in v0.5.0
func (u *DatasetUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetUpsertOne) ID ¶ added in v0.5.0
func (u *DatasetUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*DatasetUpsertOne) IDX ¶ added in v0.5.0
func (u *DatasetUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*DatasetUpsertOne) Ignore ¶ added in v0.5.0
func (u *DatasetUpsertOne) Ignore() *DatasetUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Dataset.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*DatasetUpsertOne) SetDescription ¶ added in v0.5.0
func (u *DatasetUpsertOne) SetDescription(v string) *DatasetUpsertOne
SetDescription sets the "description" field.
func (*DatasetUpsertOne) SetIndexer ¶ added in v0.5.0
func (u *DatasetUpsertOne) SetIndexer(v schema.CSVIndexer) *DatasetUpsertOne
SetIndexer sets the "indexer" field.
func (*DatasetUpsertOne) SetName ¶ added in v0.5.0
func (u *DatasetUpsertOne) SetName(v string) *DatasetUpsertOne
SetName sets the "name" field.
func (*DatasetUpsertOne) SetNanoid ¶ added in v0.5.0
func (u *DatasetUpsertOne) SetNanoid(v string) *DatasetUpsertOne
SetNanoid sets the "nanoid" field.
func (*DatasetUpsertOne) SetPath ¶ added in v0.5.0
func (u *DatasetUpsertOne) SetPath(v string) *DatasetUpsertOne
SetPath sets the "path" field.
func (*DatasetUpsertOne) SetType ¶ added in v0.5.0
func (u *DatasetUpsertOne) SetType(v dataset.Type) *DatasetUpsertOne
SetType sets the "type" field.
func (*DatasetUpsertOne) SetUpdatedAt ¶ added in v0.5.0
func (u *DatasetUpsertOne) SetUpdatedAt(v time.Time) *DatasetUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*DatasetUpsertOne) SetValues ¶ added in v0.5.0
func (u *DatasetUpsertOne) SetValues(v []string) *DatasetUpsertOne
SetValues sets the "values" field.
func (*DatasetUpsertOne) Update ¶ added in v0.5.0
func (u *DatasetUpsertOne) Update(set func(*DatasetUpsert)) *DatasetUpsertOne
Update allows overriding fields `UPDATE` values. See the DatasetCreate.OnConflict documentation for more info.
func (*DatasetUpsertOne) UpdateDescription ¶ added in v0.5.0
func (u *DatasetUpsertOne) UpdateDescription() *DatasetUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*DatasetUpsertOne) UpdateIndexer ¶ added in v0.5.0
func (u *DatasetUpsertOne) UpdateIndexer() *DatasetUpsertOne
UpdateIndexer sets the "indexer" field to the value that was provided on create.
func (*DatasetUpsertOne) UpdateName ¶ added in v0.5.0
func (u *DatasetUpsertOne) UpdateName() *DatasetUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*DatasetUpsertOne) UpdateNanoid ¶ added in v0.5.0
func (u *DatasetUpsertOne) UpdateNanoid() *DatasetUpsertOne
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*DatasetUpsertOne) UpdateNewValues ¶ added in v0.5.0
func (u *DatasetUpsertOne) UpdateNewValues() *DatasetUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Dataset.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*DatasetUpsertOne) UpdatePath ¶ added in v0.5.0
func (u *DatasetUpsertOne) UpdatePath() *DatasetUpsertOne
UpdatePath sets the "path" field to the value that was provided on create.
func (*DatasetUpsertOne) UpdateType ¶ added in v0.5.0
func (u *DatasetUpsertOne) UpdateType() *DatasetUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*DatasetUpsertOne) UpdateUpdatedAt ¶ added in v0.5.0
func (u *DatasetUpsertOne) UpdateUpdatedAt() *DatasetUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*DatasetUpsertOne) UpdateValues ¶ added in v0.5.0
func (u *DatasetUpsertOne) UpdateValues() *DatasetUpsertOne
UpdateValues sets the "values" field to the value that was provided on create.
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 Model ¶ added in v0.3.0
type Model struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Model holds the value of the "model" field.
Model string `json:"model,omitempty"`
// Alias holds the value of the "alias" field.
Alias string `json:"alias,omitempty"`
// Rpm holds the value of the "rpm" field.
Rpm int `json:"rpm,omitempty"`
// MaxTokens holds the value of the "max_tokens" field.
MaxTokens int `json:"max_tokens,omitempty"`
// Default holds the value of the "default" field.
Default bool `json:"default,omitempty"`
// Image holds the value of the "image" field.
Image bool `json:"image,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ModelQuery when eager-loading is set.
Edges ModelEdges `json:"edges"`
// contains filtered or unexported fields
}
Model is the model entity for the Model schema.
func (*Model) QueryProvider ¶ added in v0.3.0
func (m *Model) QueryProvider() *ProviderQuery
QueryProvider queries the "provider" edge of the Model entity.
func (*Model) Unwrap ¶ added in v0.3.0
Unwrap unwraps the Model 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 (*Model) Update ¶ added in v0.3.0
func (m *Model) Update() *ModelUpdateOne
Update returns a builder for updating this Model. Note that you need to call Model.Unwrap() before calling this method if this Model was returned from a transaction, and the transaction was committed or rolled back.
type ModelClient ¶ added in v0.3.0
type ModelClient struct {
// contains filtered or unexported fields
}
ModelClient is a client for the Model schema.
func NewModelClient ¶ added in v0.3.0
func NewModelClient(c config) *ModelClient
NewModelClient returns a client for the Model from the given config.
func (*ModelClient) Create ¶ added in v0.3.0
func (c *ModelClient) Create() *ModelCreate
Create returns a builder for creating a Model entity.
func (*ModelClient) CreateBulk ¶ added in v0.3.0
func (c *ModelClient) CreateBulk(builders ...*ModelCreate) *ModelCreateBulk
CreateBulk returns a builder for creating a bulk of Model entities.
func (*ModelClient) Delete ¶ added in v0.3.0
func (c *ModelClient) Delete() *ModelDelete
Delete returns a delete builder for Model.
func (*ModelClient) DeleteOne ¶ added in v0.3.0
func (c *ModelClient) DeleteOne(m *Model) *ModelDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ModelClient) DeleteOneID ¶ added in v0.3.0
func (c *ModelClient) DeleteOneID(id int) *ModelDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ModelClient) GetX ¶ added in v0.3.0
func (c *ModelClient) GetX(ctx context.Context, id int) *Model
GetX is like Get, but panics if an error occurs.
func (*ModelClient) Hooks ¶ added in v0.3.0
func (c *ModelClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ModelClient) Intercept ¶ added in v0.3.0
func (c *ModelClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `model.Intercept(f(g(h())))`.
func (*ModelClient) Interceptors ¶ added in v0.3.0
func (c *ModelClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ModelClient) MapCreateBulk ¶ added in v0.3.0
func (c *ModelClient) MapCreateBulk(slice any, setFunc func(*ModelCreate, int)) *ModelCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ModelClient) Query ¶ added in v0.3.0
func (c *ModelClient) Query() *ModelQuery
Query returns a query builder for Model.
func (*ModelClient) QueryProvider ¶ added in v0.3.0
func (c *ModelClient) QueryProvider(m *Model) *ProviderQuery
QueryProvider queries the provider edge of a Model.
func (*ModelClient) Update ¶ added in v0.3.0
func (c *ModelClient) Update() *ModelUpdate
Update returns an update builder for Model.
func (*ModelClient) UpdateOne ¶ added in v0.3.0
func (c *ModelClient) UpdateOne(m *Model) *ModelUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ModelClient) UpdateOneID ¶ added in v0.3.0
func (c *ModelClient) UpdateOneID(id int) *ModelUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ModelClient) Use ¶ added in v0.3.0
func (c *ModelClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `model.Hooks(f(g(h())))`.
type ModelCreate ¶ added in v0.3.0
type ModelCreate struct {
// contains filtered or unexported fields
}
ModelCreate is the builder for creating a Model entity.
func (*ModelCreate) Exec ¶ added in v0.3.0
func (mc *ModelCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ModelCreate) ExecX ¶ added in v0.3.0
func (mc *ModelCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ModelCreate) Mutation ¶ added in v0.3.0
func (mc *ModelCreate) Mutation() *ModelMutation
Mutation returns the ModelMutation object of the builder.
func (*ModelCreate) OnConflict ¶ added in v0.3.0
func (mc *ModelCreate) OnConflict(opts ...sql.ConflictOption) *ModelUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Model.Create().
SetCreatedAt(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.ModelUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ModelCreate) OnConflictColumns ¶ added in v0.3.0
func (mc *ModelCreate) OnConflictColumns(columns ...string) *ModelUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Model.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ModelCreate) Save ¶ added in v0.3.0
func (mc *ModelCreate) Save(ctx context.Context) (*Model, error)
Save creates the Model in the database.
func (*ModelCreate) SaveX ¶ added in v0.3.0
func (mc *ModelCreate) SaveX(ctx context.Context) *Model
SaveX calls Save and panics if Save returns an error.
func (*ModelCreate) SetAlias ¶ added in v0.3.0
func (mc *ModelCreate) SetAlias(s string) *ModelCreate
SetAlias sets the "alias" field.
func (*ModelCreate) SetCreatedAt ¶ added in v0.3.0
func (mc *ModelCreate) SetCreatedAt(t time.Time) *ModelCreate
SetCreatedAt sets the "created_at" field.
func (*ModelCreate) SetDefault ¶ added in v0.3.0
func (mc *ModelCreate) SetDefault(b bool) *ModelCreate
SetDefault sets the "default" field.
func (*ModelCreate) SetImage ¶ added in v0.3.0
func (mc *ModelCreate) SetImage(b bool) *ModelCreate
SetImage sets the "image" field.
func (*ModelCreate) SetMaxTokens ¶ added in v0.3.0
func (mc *ModelCreate) SetMaxTokens(i int) *ModelCreate
SetMaxTokens sets the "max_tokens" field.
func (*ModelCreate) SetModel ¶ added in v0.3.0
func (mc *ModelCreate) SetModel(s string) *ModelCreate
SetModel sets the "model" field.
func (*ModelCreate) SetNillableAlias ¶ added in v0.3.0
func (mc *ModelCreate) SetNillableAlias(s *string) *ModelCreate
SetNillableAlias sets the "alias" field if the given value is not nil.
func (*ModelCreate) SetNillableCreatedAt ¶ added in v0.3.0
func (mc *ModelCreate) SetNillableCreatedAt(t *time.Time) *ModelCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ModelCreate) SetNillableDefault ¶ added in v0.3.0
func (mc *ModelCreate) SetNillableDefault(b *bool) *ModelCreate
SetNillableDefault sets the "default" field if the given value is not nil.
func (*ModelCreate) SetNillableImage ¶ added in v0.3.0
func (mc *ModelCreate) SetNillableImage(b *bool) *ModelCreate
SetNillableImage sets the "image" field if the given value is not nil.
func (*ModelCreate) SetNillableMaxTokens ¶ added in v0.3.0
func (mc *ModelCreate) SetNillableMaxTokens(i *int) *ModelCreate
SetNillableMaxTokens sets the "max_tokens" field if the given value is not nil.
func (*ModelCreate) SetNillableProviderID ¶ added in v0.3.0
func (mc *ModelCreate) SetNillableProviderID(id *int) *ModelCreate
SetNillableProviderID sets the "provider" edge to the Provider entity by ID if the given value is not nil.
func (*ModelCreate) SetNillableRpm ¶ added in v0.3.0
func (mc *ModelCreate) SetNillableRpm(i *int) *ModelCreate
SetNillableRpm sets the "rpm" field if the given value is not nil.
func (*ModelCreate) SetNillableUpdatedAt ¶ added in v0.3.0
func (mc *ModelCreate) SetNillableUpdatedAt(t *time.Time) *ModelCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ModelCreate) SetProvider ¶ added in v0.3.0
func (mc *ModelCreate) SetProvider(p *Provider) *ModelCreate
SetProvider sets the "provider" edge to the Provider entity.
func (*ModelCreate) SetProviderID ¶ added in v0.3.0
func (mc *ModelCreate) SetProviderID(id int) *ModelCreate
SetProviderID sets the "provider" edge to the Provider entity by ID.
func (*ModelCreate) SetRpm ¶ added in v0.3.0
func (mc *ModelCreate) SetRpm(i int) *ModelCreate
SetRpm sets the "rpm" field.
func (*ModelCreate) SetUpdatedAt ¶ added in v0.3.0
func (mc *ModelCreate) SetUpdatedAt(t time.Time) *ModelCreate
SetUpdatedAt sets the "updated_at" field.
type ModelCreateBulk ¶ added in v0.3.0
type ModelCreateBulk struct {
// contains filtered or unexported fields
}
ModelCreateBulk is the builder for creating many Model entities in bulk.
func (*ModelCreateBulk) Exec ¶ added in v0.3.0
func (mcb *ModelCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ModelCreateBulk) ExecX ¶ added in v0.3.0
func (mcb *ModelCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ModelCreateBulk) OnConflict ¶ added in v0.3.0
func (mcb *ModelCreateBulk) OnConflict(opts ...sql.ConflictOption) *ModelUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Model.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.ModelUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ModelCreateBulk) OnConflictColumns ¶ added in v0.3.0
func (mcb *ModelCreateBulk) OnConflictColumns(columns ...string) *ModelUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Model.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ModelDelete ¶ added in v0.3.0
type ModelDelete struct {
// contains filtered or unexported fields
}
ModelDelete is the builder for deleting a Model entity.
func (*ModelDelete) Exec ¶ added in v0.3.0
func (md *ModelDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ModelDelete) ExecX ¶ added in v0.3.0
func (md *ModelDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ModelDelete) Where ¶ added in v0.3.0
func (md *ModelDelete) Where(ps ...predicate.Model) *ModelDelete
Where appends a list predicates to the ModelDelete builder.
type ModelDeleteOne ¶ added in v0.3.0
type ModelDeleteOne struct {
// contains filtered or unexported fields
}
ModelDeleteOne is the builder for deleting a single Model entity.
func (*ModelDeleteOne) Exec ¶ added in v0.3.0
func (mdo *ModelDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ModelDeleteOne) ExecX ¶ added in v0.3.0
func (mdo *ModelDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ModelDeleteOne) Where ¶ added in v0.3.0
func (mdo *ModelDeleteOne) Where(ps ...predicate.Model) *ModelDeleteOne
Where appends a list predicates to the ModelDelete builder.
type ModelEdges ¶ added in v0.3.0
type ModelEdges struct {
// Provider holds the value of the provider edge.
Provider *Provider `json:"provider,omitempty"`
// contains filtered or unexported fields
}
ModelEdges holds the relations/edges for other nodes in the graph.
func (ModelEdges) ProviderOrErr ¶ added in v0.3.0
func (e ModelEdges) ProviderOrErr() (*Provider, error)
ProviderOrErr returns the Provider value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ModelGroupBy ¶ added in v0.3.0
type ModelGroupBy struct {
// contains filtered or unexported fields
}
ModelGroupBy is the group-by builder for Model entities.
func (*ModelGroupBy) Aggregate ¶ added in v0.3.0
func (mgb *ModelGroupBy) Aggregate(fns ...AggregateFunc) *ModelGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ModelGroupBy) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ModelGroupBy) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ModelGroupBy) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ModelGroupBy) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*ModelGroupBy) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ModelGroupBy) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*ModelGroupBy) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ModelGroupBy) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ModelGroupBy) Scan ¶ added in v0.3.0
func (mgb *ModelGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ModelGroupBy) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ModelGroupBy) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type ModelMutation ¶ added in v0.3.0
type ModelMutation struct {
// contains filtered or unexported fields
}
ModelMutation represents an operation that mutates the Model nodes in the graph.
func (*ModelMutation) AddField ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) AddMaxTokens ¶ added in v0.3.0
func (m *ModelMutation) AddMaxTokens(i int)
AddMaxTokens adds i to the "max_tokens" field.
func (*ModelMutation) AddRpm ¶ added in v0.3.0
func (m *ModelMutation) AddRpm(i int)
AddRpm adds i to the "rpm" field.
func (*ModelMutation) AddedEdges ¶ added in v0.3.0
func (m *ModelMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ModelMutation) AddedField ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) AddedFields ¶ added in v0.3.0
func (m *ModelMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ModelMutation) AddedIDs ¶ added in v0.3.0
func (m *ModelMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ModelMutation) AddedMaxTokens ¶ added in v0.3.0
func (m *ModelMutation) AddedMaxTokens() (r int, exists bool)
AddedMaxTokens returns the value that was added to the "max_tokens" field in this mutation.
func (*ModelMutation) AddedRpm ¶ added in v0.3.0
func (m *ModelMutation) AddedRpm() (r int, exists bool)
AddedRpm returns the value that was added to the "rpm" field in this mutation.
func (*ModelMutation) Alias ¶ added in v0.3.0
func (m *ModelMutation) Alias() (r string, exists bool)
Alias returns the value of the "alias" field in the mutation.
func (*ModelMutation) AliasCleared ¶ added in v0.3.0
func (m *ModelMutation) AliasCleared() bool
AliasCleared returns if the "alias" field was cleared in this mutation.
func (*ModelMutation) ClearAlias ¶ added in v0.3.0
func (m *ModelMutation) ClearAlias()
ClearAlias clears the value of the "alias" field.
func (*ModelMutation) ClearCreatedAt ¶ added in v0.3.0
func (m *ModelMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*ModelMutation) ClearEdge ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) ClearField ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) ClearMaxTokens ¶ added in v0.3.0
func (m *ModelMutation) ClearMaxTokens()
ClearMaxTokens clears the value of the "max_tokens" field.
func (*ModelMutation) ClearProvider ¶ added in v0.3.0
func (m *ModelMutation) ClearProvider()
ClearProvider clears the "provider" edge to the Provider entity.
func (*ModelMutation) ClearRpm ¶ added in v0.3.0
func (m *ModelMutation) ClearRpm()
ClearRpm clears the value of the "rpm" field.
func (*ModelMutation) ClearUpdatedAt ¶ added in v0.3.0
func (m *ModelMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ModelMutation) ClearedEdges ¶ added in v0.3.0
func (m *ModelMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ModelMutation) ClearedFields ¶ added in v0.3.0
func (m *ModelMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ModelMutation) Client ¶ added in v0.3.0
func (m ModelMutation) 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 (*ModelMutation) CreatedAt ¶ added in v0.3.0
func (m *ModelMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ModelMutation) CreatedAtCleared ¶ added in v0.3.0
func (m *ModelMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*ModelMutation) Default ¶ added in v0.3.0
func (m *ModelMutation) Default() (r bool, exists bool)
Default returns the value of the "default" field in the mutation.
func (*ModelMutation) EdgeCleared ¶ added in v0.3.0
func (m *ModelMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ModelMutation) Field ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) FieldCleared ¶ added in v0.3.0
func (m *ModelMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ModelMutation) Fields ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) ID ¶ added in v0.3.0
func (m *ModelMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ModelMutation) IDs ¶ added in v0.3.0
func (m *ModelMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ModelMutation) Image ¶ added in v0.3.0
func (m *ModelMutation) Image() (r bool, exists bool)
Image returns the value of the "image" field in the mutation.
func (*ModelMutation) MaxTokens ¶ added in v0.3.0
func (m *ModelMutation) MaxTokens() (r int, exists bool)
MaxTokens returns the value of the "max_tokens" field in the mutation.
func (*ModelMutation) MaxTokensCleared ¶ added in v0.3.0
func (m *ModelMutation) MaxTokensCleared() bool
MaxTokensCleared returns if the "max_tokens" field was cleared in this mutation.
func (*ModelMutation) Model ¶ added in v0.3.0
func (m *ModelMutation) Model() (r string, exists bool)
Model returns the value of the "model" field in the mutation.
func (*ModelMutation) OldAlias ¶ added in v0.3.0
func (m *ModelMutation) OldAlias(ctx context.Context) (v string, err error)
OldAlias returns the old "alias" field's value of the Model entity. If the Model 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 (*ModelMutation) OldCreatedAt ¶ added in v0.3.0
OldCreatedAt returns the old "created_at" field's value of the Model entity. If the Model 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 (*ModelMutation) OldDefault ¶ added in v0.3.0
func (m *ModelMutation) OldDefault(ctx context.Context) (v bool, err error)
OldDefault returns the old "default" field's value of the Model entity. If the Model 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 (*ModelMutation) OldField ¶ added in v0.3.0
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ModelMutation) OldImage ¶ added in v0.3.0
func (m *ModelMutation) OldImage(ctx context.Context) (v bool, err error)
OldImage returns the old "image" field's value of the Model entity. If the Model 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 (*ModelMutation) OldMaxTokens ¶ added in v0.3.0
func (m *ModelMutation) OldMaxTokens(ctx context.Context) (v int, err error)
OldMaxTokens returns the old "max_tokens" field's value of the Model entity. If the Model 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 (*ModelMutation) OldModel ¶ added in v0.3.0
func (m *ModelMutation) OldModel(ctx context.Context) (v string, err error)
OldModel returns the old "model" field's value of the Model entity. If the Model 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 (*ModelMutation) OldRpm ¶ added in v0.3.0
func (m *ModelMutation) OldRpm(ctx context.Context) (v int, err error)
OldRpm returns the old "rpm" field's value of the Model entity. If the Model 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 (*ModelMutation) OldUpdatedAt ¶ added in v0.3.0
OldUpdatedAt returns the old "updated_at" field's value of the Model entity. If the Model 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 (*ModelMutation) Op ¶ added in v0.3.0
func (m *ModelMutation) Op() Op
Op returns the operation name.
func (*ModelMutation) ProviderCleared ¶ added in v0.3.0
func (m *ModelMutation) ProviderCleared() bool
ProviderCleared reports if the "provider" edge to the Provider entity was cleared.
func (*ModelMutation) ProviderID ¶ added in v0.3.0
func (m *ModelMutation) ProviderID() (id int, exists bool)
ProviderID returns the "provider" edge ID in the mutation.
func (*ModelMutation) ProviderIDs ¶ added in v0.3.0
func (m *ModelMutation) ProviderIDs() (ids []int)
ProviderIDs returns the "provider" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProviderID instead. It exists only for internal usage by the builders.
func (*ModelMutation) RemovedEdges ¶ added in v0.3.0
func (m *ModelMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ModelMutation) RemovedIDs ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) ResetAlias ¶ added in v0.3.0
func (m *ModelMutation) ResetAlias()
ResetAlias resets all changes to the "alias" field.
func (*ModelMutation) ResetCreatedAt ¶ added in v0.3.0
func (m *ModelMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ModelMutation) ResetDefault ¶ added in v0.3.0
func (m *ModelMutation) ResetDefault()
ResetDefault resets all changes to the "default" field.
func (*ModelMutation) ResetEdge ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) ResetField ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) ResetImage ¶ added in v0.3.0
func (m *ModelMutation) ResetImage()
ResetImage resets all changes to the "image" field.
func (*ModelMutation) ResetMaxTokens ¶ added in v0.3.0
func (m *ModelMutation) ResetMaxTokens()
ResetMaxTokens resets all changes to the "max_tokens" field.
func (*ModelMutation) ResetModel ¶ added in v0.3.0
func (m *ModelMutation) ResetModel()
ResetModel resets all changes to the "model" field.
func (*ModelMutation) ResetProvider ¶ added in v0.3.0
func (m *ModelMutation) ResetProvider()
ResetProvider resets all changes to the "provider" edge.
func (*ModelMutation) ResetRpm ¶ added in v0.3.0
func (m *ModelMutation) ResetRpm()
ResetRpm resets all changes to the "rpm" field.
func (*ModelMutation) ResetUpdatedAt ¶ added in v0.3.0
func (m *ModelMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ModelMutation) Rpm ¶ added in v0.3.0
func (m *ModelMutation) Rpm() (r int, exists bool)
Rpm returns the value of the "rpm" field in the mutation.
func (*ModelMutation) RpmCleared ¶ added in v0.3.0
func (m *ModelMutation) RpmCleared() bool
RpmCleared returns if the "rpm" field was cleared in this mutation.
func (*ModelMutation) SetAlias ¶ added in v0.3.0
func (m *ModelMutation) SetAlias(s string)
SetAlias sets the "alias" field.
func (*ModelMutation) SetCreatedAt ¶ added in v0.3.0
func (m *ModelMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ModelMutation) SetDefault ¶ added in v0.3.0
func (m *ModelMutation) SetDefault(b bool)
SetDefault sets the "default" field.
func (*ModelMutation) SetField ¶ added in v0.3.0
func (m *ModelMutation) 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 (*ModelMutation) SetImage ¶ added in v0.3.0
func (m *ModelMutation) SetImage(b bool)
SetImage sets the "image" field.
func (*ModelMutation) SetMaxTokens ¶ added in v0.3.0
func (m *ModelMutation) SetMaxTokens(i int)
SetMaxTokens sets the "max_tokens" field.
func (*ModelMutation) SetModel ¶ added in v0.3.0
func (m *ModelMutation) SetModel(s string)
SetModel sets the "model" field.
func (*ModelMutation) SetOp ¶ added in v0.3.0
func (m *ModelMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ModelMutation) SetProviderID ¶ added in v0.3.0
func (m *ModelMutation) SetProviderID(id int)
SetProviderID sets the "provider" edge to the Provider entity by id.
func (*ModelMutation) SetRpm ¶ added in v0.3.0
func (m *ModelMutation) SetRpm(i int)
SetRpm sets the "rpm" field.
func (*ModelMutation) SetUpdatedAt ¶ added in v0.3.0
func (m *ModelMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ModelMutation) Tx ¶ added in v0.3.0
func (m ModelMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ModelMutation) Type ¶ added in v0.3.0
func (m *ModelMutation) Type() string
Type returns the node type of this mutation (Model).
func (*ModelMutation) UpdatedAt ¶ added in v0.3.0
func (m *ModelMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ModelMutation) UpdatedAtCleared ¶ added in v0.3.0
func (m *ModelMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*ModelMutation) Where ¶ added in v0.3.0
func (m *ModelMutation) Where(ps ...predicate.Model)
Where appends a list predicates to the ModelMutation builder.
func (*ModelMutation) WhereP ¶ added in v0.3.0
func (m *ModelMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ModelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ModelQuery ¶ added in v0.3.0
type ModelQuery struct {
// contains filtered or unexported fields
}
ModelQuery is the builder for querying Model entities.
func (*ModelQuery) Aggregate ¶ added in v0.3.0
func (mq *ModelQuery) Aggregate(fns ...AggregateFunc) *ModelSelect
Aggregate returns a ModelSelect configured with the given aggregations.
func (*ModelQuery) All ¶ added in v0.3.0
func (mq *ModelQuery) All(ctx context.Context) ([]*Model, error)
All executes the query and returns a list of Models.
func (*ModelQuery) AllX ¶ added in v0.3.0
func (mq *ModelQuery) AllX(ctx context.Context) []*Model
AllX is like All, but panics if an error occurs.
func (*ModelQuery) Clone ¶ added in v0.3.0
func (mq *ModelQuery) Clone() *ModelQuery
Clone returns a duplicate of the ModelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ModelQuery) Count ¶ added in v0.3.0
func (mq *ModelQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ModelQuery) CountX ¶ added in v0.3.0
func (mq *ModelQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ModelQuery) Exist ¶ added in v0.3.0
func (mq *ModelQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ModelQuery) ExistX ¶ added in v0.3.0
func (mq *ModelQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ModelQuery) First ¶ added in v0.3.0
func (mq *ModelQuery) First(ctx context.Context) (*Model, error)
First returns the first Model entity from the query. Returns a *NotFoundError when no Model was found.
func (*ModelQuery) FirstID ¶ added in v0.3.0
func (mq *ModelQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Model ID from the query. Returns a *NotFoundError when no Model ID was found.
func (*ModelQuery) FirstIDX ¶ added in v0.3.0
func (mq *ModelQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ModelQuery) FirstX ¶ added in v0.3.0
func (mq *ModelQuery) FirstX(ctx context.Context) *Model
FirstX is like First, but panics if an error occurs.
func (*ModelQuery) ForShare ¶ added in v0.3.0
func (mq *ModelQuery) ForShare(opts ...sql.LockOption) *ModelQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*ModelQuery) ForUpdate ¶ added in v0.3.0
func (mq *ModelQuery) ForUpdate(opts ...sql.LockOption) *ModelQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*ModelQuery) GroupBy ¶ added in v0.3.0
func (mq *ModelQuery) GroupBy(field string, fields ...string) *ModelGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Model.Query().
GroupBy(model.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ModelQuery) IDs ¶ added in v0.3.0
func (mq *ModelQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Model IDs.
func (*ModelQuery) IDsX ¶ added in v0.3.0
func (mq *ModelQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ModelQuery) Limit ¶ added in v0.3.0
func (mq *ModelQuery) Limit(limit int) *ModelQuery
Limit the number of records to be returned by this query.
func (*ModelQuery) Modify ¶ added in v0.3.0
func (mq *ModelQuery) Modify(modifiers ...func(s *sql.Selector)) *ModelSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ModelQuery) Offset ¶ added in v0.3.0
func (mq *ModelQuery) Offset(offset int) *ModelQuery
Offset to start from.
func (*ModelQuery) Only ¶ added in v0.3.0
func (mq *ModelQuery) Only(ctx context.Context) (*Model, error)
Only returns a single Model entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Model entity is found. Returns a *NotFoundError when no Model entities are found.
func (*ModelQuery) OnlyID ¶ added in v0.3.0
func (mq *ModelQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Model ID in the query. Returns a *NotSingularError when more than one Model ID is found. Returns a *NotFoundError when no entities are found.
func (*ModelQuery) OnlyIDX ¶ added in v0.3.0
func (mq *ModelQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ModelQuery) OnlyX ¶ added in v0.3.0
func (mq *ModelQuery) OnlyX(ctx context.Context) *Model
OnlyX is like Only, but panics if an error occurs.
func (*ModelQuery) Order ¶ added in v0.3.0
func (mq *ModelQuery) Order(o ...model.OrderOption) *ModelQuery
Order specifies how the records should be ordered.
func (*ModelQuery) QueryProvider ¶ added in v0.3.0
func (mq *ModelQuery) QueryProvider() *ProviderQuery
QueryProvider chains the current query on the "provider" edge.
func (*ModelQuery) Select ¶ added in v0.3.0
func (mq *ModelQuery) Select(fields ...string) *ModelSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Model.Query().
Select(model.FieldCreatedAt).
Scan(ctx, &v)
func (*ModelQuery) Unique ¶ added in v0.3.0
func (mq *ModelQuery) Unique(unique bool) *ModelQuery
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 (*ModelQuery) Where ¶ added in v0.3.0
func (mq *ModelQuery) Where(ps ...predicate.Model) *ModelQuery
Where adds a new predicate for the ModelQuery builder.
func (*ModelQuery) WithProvider ¶ added in v0.3.0
func (mq *ModelQuery) WithProvider(opts ...func(*ProviderQuery)) *ModelQuery
WithProvider tells the query-builder to eager-load the nodes that are connected to the "provider" edge. The optional arguments are used to configure the query builder of the edge.
type ModelSelect ¶ added in v0.3.0
type ModelSelect struct {
*ModelQuery
// contains filtered or unexported fields
}
ModelSelect is the builder for selecting fields of Model entities.
func (*ModelSelect) Aggregate ¶ added in v0.3.0
func (ms *ModelSelect) Aggregate(fns ...AggregateFunc) *ModelSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ModelSelect) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ModelSelect) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ModelSelect) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ModelSelect) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*ModelSelect) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ModelSelect) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*ModelSelect) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ModelSelect) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ModelSelect) Modify ¶ added in v0.3.0
func (ms *ModelSelect) Modify(modifiers ...func(s *sql.Selector)) *ModelSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ModelSelect) Scan ¶ added in v0.3.0
func (ms *ModelSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ModelSelect) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ModelSelect) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type ModelUpdate ¶ added in v0.3.0
type ModelUpdate struct {
// contains filtered or unexported fields
}
ModelUpdate is the builder for updating Model entities.
func (*ModelUpdate) AddMaxTokens ¶ added in v0.3.0
func (mu *ModelUpdate) AddMaxTokens(i int) *ModelUpdate
AddMaxTokens adds i to the "max_tokens" field.
func (*ModelUpdate) AddRpm ¶ added in v0.3.0
func (mu *ModelUpdate) AddRpm(i int) *ModelUpdate
AddRpm adds i to the "rpm" field.
func (*ModelUpdate) ClearAlias ¶ added in v0.3.0
func (mu *ModelUpdate) ClearAlias() *ModelUpdate
ClearAlias clears the value of the "alias" field.
func (*ModelUpdate) ClearMaxTokens ¶ added in v0.3.0
func (mu *ModelUpdate) ClearMaxTokens() *ModelUpdate
ClearMaxTokens clears the value of the "max_tokens" field.
func (*ModelUpdate) ClearProvider ¶ added in v0.3.0
func (mu *ModelUpdate) ClearProvider() *ModelUpdate
ClearProvider clears the "provider" edge to the Provider entity.
func (*ModelUpdate) ClearRpm ¶ added in v0.3.0
func (mu *ModelUpdate) ClearRpm() *ModelUpdate
ClearRpm clears the value of the "rpm" field.
func (*ModelUpdate) ClearUpdatedAt ¶ added in v0.3.0
func (mu *ModelUpdate) ClearUpdatedAt() *ModelUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ModelUpdate) Exec ¶ added in v0.3.0
func (mu *ModelUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ModelUpdate) ExecX ¶ added in v0.3.0
func (mu *ModelUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ModelUpdate) Modify ¶ added in v0.3.0
func (mu *ModelUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ModelUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ModelUpdate) Mutation ¶ added in v0.3.0
func (mu *ModelUpdate) Mutation() *ModelMutation
Mutation returns the ModelMutation object of the builder.
func (*ModelUpdate) Save ¶ added in v0.3.0
func (mu *ModelUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ModelUpdate) SaveX ¶ added in v0.3.0
func (mu *ModelUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ModelUpdate) SetAlias ¶ added in v0.3.0
func (mu *ModelUpdate) SetAlias(s string) *ModelUpdate
SetAlias sets the "alias" field.
func (*ModelUpdate) SetDefault ¶ added in v0.3.0
func (mu *ModelUpdate) SetDefault(b bool) *ModelUpdate
SetDefault sets the "default" field.
func (*ModelUpdate) SetImage ¶ added in v0.3.0
func (mu *ModelUpdate) SetImage(b bool) *ModelUpdate
SetImage sets the "image" field.
func (*ModelUpdate) SetMaxTokens ¶ added in v0.3.0
func (mu *ModelUpdate) SetMaxTokens(i int) *ModelUpdate
SetMaxTokens sets the "max_tokens" field.
func (*ModelUpdate) SetModel ¶ added in v0.3.0
func (mu *ModelUpdate) SetModel(s string) *ModelUpdate
SetModel sets the "model" field.
func (*ModelUpdate) SetNillableAlias ¶ added in v0.3.0
func (mu *ModelUpdate) SetNillableAlias(s *string) *ModelUpdate
SetNillableAlias sets the "alias" field if the given value is not nil.
func (*ModelUpdate) SetNillableDefault ¶ added in v0.3.0
func (mu *ModelUpdate) SetNillableDefault(b *bool) *ModelUpdate
SetNillableDefault sets the "default" field if the given value is not nil.
func (*ModelUpdate) SetNillableImage ¶ added in v0.3.0
func (mu *ModelUpdate) SetNillableImage(b *bool) *ModelUpdate
SetNillableImage sets the "image" field if the given value is not nil.
func (*ModelUpdate) SetNillableMaxTokens ¶ added in v0.3.0
func (mu *ModelUpdate) SetNillableMaxTokens(i *int) *ModelUpdate
SetNillableMaxTokens sets the "max_tokens" field if the given value is not nil.
func (*ModelUpdate) SetNillableModel ¶ added in v0.3.0
func (mu *ModelUpdate) SetNillableModel(s *string) *ModelUpdate
SetNillableModel sets the "model" field if the given value is not nil.
func (*ModelUpdate) SetNillableProviderID ¶ added in v0.3.0
func (mu *ModelUpdate) SetNillableProviderID(id *int) *ModelUpdate
SetNillableProviderID sets the "provider" edge to the Provider entity by ID if the given value is not nil.
func (*ModelUpdate) SetNillableRpm ¶ added in v0.3.0
func (mu *ModelUpdate) SetNillableRpm(i *int) *ModelUpdate
SetNillableRpm sets the "rpm" field if the given value is not nil.
func (*ModelUpdate) SetProvider ¶ added in v0.3.0
func (mu *ModelUpdate) SetProvider(p *Provider) *ModelUpdate
SetProvider sets the "provider" edge to the Provider entity.
func (*ModelUpdate) SetProviderID ¶ added in v0.3.0
func (mu *ModelUpdate) SetProviderID(id int) *ModelUpdate
SetProviderID sets the "provider" edge to the Provider entity by ID.
func (*ModelUpdate) SetRpm ¶ added in v0.3.0
func (mu *ModelUpdate) SetRpm(i int) *ModelUpdate
SetRpm sets the "rpm" field.
func (*ModelUpdate) SetUpdatedAt ¶ added in v0.3.0
func (mu *ModelUpdate) SetUpdatedAt(t time.Time) *ModelUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ModelUpdate) Where ¶ added in v0.3.0
func (mu *ModelUpdate) Where(ps ...predicate.Model) *ModelUpdate
Where appends a list predicates to the ModelUpdate builder.
type ModelUpdateOne ¶ added in v0.3.0
type ModelUpdateOne struct {
// contains filtered or unexported fields
}
ModelUpdateOne is the builder for updating a single Model entity.
func (*ModelUpdateOne) AddMaxTokens ¶ added in v0.3.0
func (muo *ModelUpdateOne) AddMaxTokens(i int) *ModelUpdateOne
AddMaxTokens adds i to the "max_tokens" field.
func (*ModelUpdateOne) AddRpm ¶ added in v0.3.0
func (muo *ModelUpdateOne) AddRpm(i int) *ModelUpdateOne
AddRpm adds i to the "rpm" field.
func (*ModelUpdateOne) ClearAlias ¶ added in v0.3.0
func (muo *ModelUpdateOne) ClearAlias() *ModelUpdateOne
ClearAlias clears the value of the "alias" field.
func (*ModelUpdateOne) ClearMaxTokens ¶ added in v0.3.0
func (muo *ModelUpdateOne) ClearMaxTokens() *ModelUpdateOne
ClearMaxTokens clears the value of the "max_tokens" field.
func (*ModelUpdateOne) ClearProvider ¶ added in v0.3.0
func (muo *ModelUpdateOne) ClearProvider() *ModelUpdateOne
ClearProvider clears the "provider" edge to the Provider entity.
func (*ModelUpdateOne) ClearRpm ¶ added in v0.3.0
func (muo *ModelUpdateOne) ClearRpm() *ModelUpdateOne
ClearRpm clears the value of the "rpm" field.
func (*ModelUpdateOne) ClearUpdatedAt ¶ added in v0.3.0
func (muo *ModelUpdateOne) ClearUpdatedAt() *ModelUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ModelUpdateOne) Exec ¶ added in v0.3.0
func (muo *ModelUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ModelUpdateOne) ExecX ¶ added in v0.3.0
func (muo *ModelUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ModelUpdateOne) Modify ¶ added in v0.3.0
func (muo *ModelUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ModelUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ModelUpdateOne) Mutation ¶ added in v0.3.0
func (muo *ModelUpdateOne) Mutation() *ModelMutation
Mutation returns the ModelMutation object of the builder.
func (*ModelUpdateOne) Save ¶ added in v0.3.0
func (muo *ModelUpdateOne) Save(ctx context.Context) (*Model, error)
Save executes the query and returns the updated Model entity.
func (*ModelUpdateOne) SaveX ¶ added in v0.3.0
func (muo *ModelUpdateOne) SaveX(ctx context.Context) *Model
SaveX is like Save, but panics if an error occurs.
func (*ModelUpdateOne) Select ¶ added in v0.3.0
func (muo *ModelUpdateOne) Select(field string, fields ...string) *ModelUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ModelUpdateOne) SetAlias ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetAlias(s string) *ModelUpdateOne
SetAlias sets the "alias" field.
func (*ModelUpdateOne) SetDefault ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetDefault(b bool) *ModelUpdateOne
SetDefault sets the "default" field.
func (*ModelUpdateOne) SetImage ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetImage(b bool) *ModelUpdateOne
SetImage sets the "image" field.
func (*ModelUpdateOne) SetMaxTokens ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetMaxTokens(i int) *ModelUpdateOne
SetMaxTokens sets the "max_tokens" field.
func (*ModelUpdateOne) SetModel ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetModel(s string) *ModelUpdateOne
SetModel sets the "model" field.
func (*ModelUpdateOne) SetNillableAlias ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetNillableAlias(s *string) *ModelUpdateOne
SetNillableAlias sets the "alias" field if the given value is not nil.
func (*ModelUpdateOne) SetNillableDefault ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetNillableDefault(b *bool) *ModelUpdateOne
SetNillableDefault sets the "default" field if the given value is not nil.
func (*ModelUpdateOne) SetNillableImage ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetNillableImage(b *bool) *ModelUpdateOne
SetNillableImage sets the "image" field if the given value is not nil.
func (*ModelUpdateOne) SetNillableMaxTokens ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetNillableMaxTokens(i *int) *ModelUpdateOne
SetNillableMaxTokens sets the "max_tokens" field if the given value is not nil.
func (*ModelUpdateOne) SetNillableModel ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetNillableModel(s *string) *ModelUpdateOne
SetNillableModel sets the "model" field if the given value is not nil.
func (*ModelUpdateOne) SetNillableProviderID ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetNillableProviderID(id *int) *ModelUpdateOne
SetNillableProviderID sets the "provider" edge to the Provider entity by ID if the given value is not nil.
func (*ModelUpdateOne) SetNillableRpm ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetNillableRpm(i *int) *ModelUpdateOne
SetNillableRpm sets the "rpm" field if the given value is not nil.
func (*ModelUpdateOne) SetProvider ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetProvider(p *Provider) *ModelUpdateOne
SetProvider sets the "provider" edge to the Provider entity.
func (*ModelUpdateOne) SetProviderID ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetProviderID(id int) *ModelUpdateOne
SetProviderID sets the "provider" edge to the Provider entity by ID.
func (*ModelUpdateOne) SetRpm ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetRpm(i int) *ModelUpdateOne
SetRpm sets the "rpm" field.
func (*ModelUpdateOne) SetUpdatedAt ¶ added in v0.3.0
func (muo *ModelUpdateOne) SetUpdatedAt(t time.Time) *ModelUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ModelUpdateOne) Where ¶ added in v0.3.0
func (muo *ModelUpdateOne) Where(ps ...predicate.Model) *ModelUpdateOne
Where appends a list predicates to the ModelUpdate builder.
type ModelUpsert ¶ added in v0.3.0
ModelUpsert is the "OnConflict" setter.
func (*ModelUpsert) AddMaxTokens ¶ added in v0.3.0
func (u *ModelUpsert) AddMaxTokens(v int) *ModelUpsert
AddMaxTokens adds v to the "max_tokens" field.
func (*ModelUpsert) AddRpm ¶ added in v0.3.0
func (u *ModelUpsert) AddRpm(v int) *ModelUpsert
AddRpm adds v to the "rpm" field.
func (*ModelUpsert) ClearAlias ¶ added in v0.3.0
func (u *ModelUpsert) ClearAlias() *ModelUpsert
ClearAlias clears the value of the "alias" field.
func (*ModelUpsert) ClearMaxTokens ¶ added in v0.3.0
func (u *ModelUpsert) ClearMaxTokens() *ModelUpsert
ClearMaxTokens clears the value of the "max_tokens" field.
func (*ModelUpsert) ClearRpm ¶ added in v0.3.0
func (u *ModelUpsert) ClearRpm() *ModelUpsert
ClearRpm clears the value of the "rpm" field.
func (*ModelUpsert) ClearUpdatedAt ¶ added in v0.3.0
func (u *ModelUpsert) ClearUpdatedAt() *ModelUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ModelUpsert) SetAlias ¶ added in v0.3.0
func (u *ModelUpsert) SetAlias(v string) *ModelUpsert
SetAlias sets the "alias" field.
func (*ModelUpsert) SetDefault ¶ added in v0.3.0
func (u *ModelUpsert) SetDefault(v bool) *ModelUpsert
SetDefault sets the "default" field.
func (*ModelUpsert) SetImage ¶ added in v0.3.0
func (u *ModelUpsert) SetImage(v bool) *ModelUpsert
SetImage sets the "image" field.
func (*ModelUpsert) SetMaxTokens ¶ added in v0.3.0
func (u *ModelUpsert) SetMaxTokens(v int) *ModelUpsert
SetMaxTokens sets the "max_tokens" field.
func (*ModelUpsert) SetModel ¶ added in v0.3.0
func (u *ModelUpsert) SetModel(v string) *ModelUpsert
SetModel sets the "model" field.
func (*ModelUpsert) SetRpm ¶ added in v0.3.0
func (u *ModelUpsert) SetRpm(v int) *ModelUpsert
SetRpm sets the "rpm" field.
func (*ModelUpsert) SetUpdatedAt ¶ added in v0.3.0
func (u *ModelUpsert) SetUpdatedAt(v time.Time) *ModelUpsert
SetUpdatedAt sets the "updated_at" field.
func (*ModelUpsert) UpdateAlias ¶ added in v0.3.0
func (u *ModelUpsert) UpdateAlias() *ModelUpsert
UpdateAlias sets the "alias" field to the value that was provided on create.
func (*ModelUpsert) UpdateDefault ¶ added in v0.3.0
func (u *ModelUpsert) UpdateDefault() *ModelUpsert
UpdateDefault sets the "default" field to the value that was provided on create.
func (*ModelUpsert) UpdateImage ¶ added in v0.3.0
func (u *ModelUpsert) UpdateImage() *ModelUpsert
UpdateImage sets the "image" field to the value that was provided on create.
func (*ModelUpsert) UpdateMaxTokens ¶ added in v0.3.0
func (u *ModelUpsert) UpdateMaxTokens() *ModelUpsert
UpdateMaxTokens sets the "max_tokens" field to the value that was provided on create.
func (*ModelUpsert) UpdateModel ¶ added in v0.3.0
func (u *ModelUpsert) UpdateModel() *ModelUpsert
UpdateModel sets the "model" field to the value that was provided on create.
func (*ModelUpsert) UpdateRpm ¶ added in v0.3.0
func (u *ModelUpsert) UpdateRpm() *ModelUpsert
UpdateRpm sets the "rpm" field to the value that was provided on create.
func (*ModelUpsert) UpdateUpdatedAt ¶ added in v0.3.0
func (u *ModelUpsert) UpdateUpdatedAt() *ModelUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ModelUpsertBulk ¶ added in v0.3.0
type ModelUpsertBulk struct {
// contains filtered or unexported fields
}
ModelUpsertBulk is the builder for "upsert"-ing a bulk of Model nodes.
func (*ModelUpsertBulk) AddMaxTokens ¶ added in v0.3.0
func (u *ModelUpsertBulk) AddMaxTokens(v int) *ModelUpsertBulk
AddMaxTokens adds v to the "max_tokens" field.
func (*ModelUpsertBulk) AddRpm ¶ added in v0.3.0
func (u *ModelUpsertBulk) AddRpm(v int) *ModelUpsertBulk
AddRpm adds v to the "rpm" field.
func (*ModelUpsertBulk) ClearAlias ¶ added in v0.3.0
func (u *ModelUpsertBulk) ClearAlias() *ModelUpsertBulk
ClearAlias clears the value of the "alias" field.
func (*ModelUpsertBulk) ClearMaxTokens ¶ added in v0.3.0
func (u *ModelUpsertBulk) ClearMaxTokens() *ModelUpsertBulk
ClearMaxTokens clears the value of the "max_tokens" field.
func (*ModelUpsertBulk) ClearRpm ¶ added in v0.3.0
func (u *ModelUpsertBulk) ClearRpm() *ModelUpsertBulk
ClearRpm clears the value of the "rpm" field.
func (*ModelUpsertBulk) ClearUpdatedAt ¶ added in v0.3.0
func (u *ModelUpsertBulk) ClearUpdatedAt() *ModelUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ModelUpsertBulk) DoNothing ¶ added in v0.3.0
func (u *ModelUpsertBulk) DoNothing() *ModelUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ModelUpsertBulk) Exec ¶ added in v0.3.0
func (u *ModelUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ModelUpsertBulk) ExecX ¶ added in v0.3.0
func (u *ModelUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ModelUpsertBulk) Ignore ¶ added in v0.3.0
func (u *ModelUpsertBulk) Ignore() *ModelUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Model.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ModelUpsertBulk) SetAlias ¶ added in v0.3.0
func (u *ModelUpsertBulk) SetAlias(v string) *ModelUpsertBulk
SetAlias sets the "alias" field.
func (*ModelUpsertBulk) SetDefault ¶ added in v0.3.0
func (u *ModelUpsertBulk) SetDefault(v bool) *ModelUpsertBulk
SetDefault sets the "default" field.
func (*ModelUpsertBulk) SetImage ¶ added in v0.3.0
func (u *ModelUpsertBulk) SetImage(v bool) *ModelUpsertBulk
SetImage sets the "image" field.
func (*ModelUpsertBulk) SetMaxTokens ¶ added in v0.3.0
func (u *ModelUpsertBulk) SetMaxTokens(v int) *ModelUpsertBulk
SetMaxTokens sets the "max_tokens" field.
func (*ModelUpsertBulk) SetModel ¶ added in v0.3.0
func (u *ModelUpsertBulk) SetModel(v string) *ModelUpsertBulk
SetModel sets the "model" field.
func (*ModelUpsertBulk) SetRpm ¶ added in v0.3.0
func (u *ModelUpsertBulk) SetRpm(v int) *ModelUpsertBulk
SetRpm sets the "rpm" field.
func (*ModelUpsertBulk) SetUpdatedAt ¶ added in v0.3.0
func (u *ModelUpsertBulk) SetUpdatedAt(v time.Time) *ModelUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*ModelUpsertBulk) Update ¶ added in v0.3.0
func (u *ModelUpsertBulk) Update(set func(*ModelUpsert)) *ModelUpsertBulk
Update allows overriding fields `UPDATE` values. See the ModelCreateBulk.OnConflict documentation for more info.
func (*ModelUpsertBulk) UpdateAlias ¶ added in v0.3.0
func (u *ModelUpsertBulk) UpdateAlias() *ModelUpsertBulk
UpdateAlias sets the "alias" field to the value that was provided on create.
func (*ModelUpsertBulk) UpdateDefault ¶ added in v0.3.0
func (u *ModelUpsertBulk) UpdateDefault() *ModelUpsertBulk
UpdateDefault sets the "default" field to the value that was provided on create.
func (*ModelUpsertBulk) UpdateImage ¶ added in v0.3.0
func (u *ModelUpsertBulk) UpdateImage() *ModelUpsertBulk
UpdateImage sets the "image" field to the value that was provided on create.
func (*ModelUpsertBulk) UpdateMaxTokens ¶ added in v0.3.0
func (u *ModelUpsertBulk) UpdateMaxTokens() *ModelUpsertBulk
UpdateMaxTokens sets the "max_tokens" field to the value that was provided on create.
func (*ModelUpsertBulk) UpdateModel ¶ added in v0.3.0
func (u *ModelUpsertBulk) UpdateModel() *ModelUpsertBulk
UpdateModel sets the "model" field to the value that was provided on create.
func (*ModelUpsertBulk) UpdateNewValues ¶ added in v0.3.0
func (u *ModelUpsertBulk) UpdateNewValues() *ModelUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Model.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ModelUpsertBulk) UpdateRpm ¶ added in v0.3.0
func (u *ModelUpsertBulk) UpdateRpm() *ModelUpsertBulk
UpdateRpm sets the "rpm" field to the value that was provided on create.
func (*ModelUpsertBulk) UpdateUpdatedAt ¶ added in v0.3.0
func (u *ModelUpsertBulk) UpdateUpdatedAt() *ModelUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ModelUpsertOne ¶ added in v0.3.0
type ModelUpsertOne struct {
// contains filtered or unexported fields
}
ModelUpsertOne is the builder for "upsert"-ing
one Model node.
func (*ModelUpsertOne) AddMaxTokens ¶ added in v0.3.0
func (u *ModelUpsertOne) AddMaxTokens(v int) *ModelUpsertOne
AddMaxTokens adds v to the "max_tokens" field.
func (*ModelUpsertOne) AddRpm ¶ added in v0.3.0
func (u *ModelUpsertOne) AddRpm(v int) *ModelUpsertOne
AddRpm adds v to the "rpm" field.
func (*ModelUpsertOne) ClearAlias ¶ added in v0.3.0
func (u *ModelUpsertOne) ClearAlias() *ModelUpsertOne
ClearAlias clears the value of the "alias" field.
func (*ModelUpsertOne) ClearMaxTokens ¶ added in v0.3.0
func (u *ModelUpsertOne) ClearMaxTokens() *ModelUpsertOne
ClearMaxTokens clears the value of the "max_tokens" field.
func (*ModelUpsertOne) ClearRpm ¶ added in v0.3.0
func (u *ModelUpsertOne) ClearRpm() *ModelUpsertOne
ClearRpm clears the value of the "rpm" field.
func (*ModelUpsertOne) ClearUpdatedAt ¶ added in v0.3.0
func (u *ModelUpsertOne) ClearUpdatedAt() *ModelUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ModelUpsertOne) DoNothing ¶ added in v0.3.0
func (u *ModelUpsertOne) DoNothing() *ModelUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ModelUpsertOne) Exec ¶ added in v0.3.0
func (u *ModelUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ModelUpsertOne) ExecX ¶ added in v0.3.0
func (u *ModelUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ModelUpsertOne) ID ¶ added in v0.3.0
func (u *ModelUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ModelUpsertOne) IDX ¶ added in v0.3.0
func (u *ModelUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*ModelUpsertOne) Ignore ¶ added in v0.3.0
func (u *ModelUpsertOne) Ignore() *ModelUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Model.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ModelUpsertOne) SetAlias ¶ added in v0.3.0
func (u *ModelUpsertOne) SetAlias(v string) *ModelUpsertOne
SetAlias sets the "alias" field.
func (*ModelUpsertOne) SetDefault ¶ added in v0.3.0
func (u *ModelUpsertOne) SetDefault(v bool) *ModelUpsertOne
SetDefault sets the "default" field.
func (*ModelUpsertOne) SetImage ¶ added in v0.3.0
func (u *ModelUpsertOne) SetImage(v bool) *ModelUpsertOne
SetImage sets the "image" field.
func (*ModelUpsertOne) SetMaxTokens ¶ added in v0.3.0
func (u *ModelUpsertOne) SetMaxTokens(v int) *ModelUpsertOne
SetMaxTokens sets the "max_tokens" field.
func (*ModelUpsertOne) SetModel ¶ added in v0.3.0
func (u *ModelUpsertOne) SetModel(v string) *ModelUpsertOne
SetModel sets the "model" field.
func (*ModelUpsertOne) SetRpm ¶ added in v0.3.0
func (u *ModelUpsertOne) SetRpm(v int) *ModelUpsertOne
SetRpm sets the "rpm" field.
func (*ModelUpsertOne) SetUpdatedAt ¶ added in v0.3.0
func (u *ModelUpsertOne) SetUpdatedAt(v time.Time) *ModelUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*ModelUpsertOne) Update ¶ added in v0.3.0
func (u *ModelUpsertOne) Update(set func(*ModelUpsert)) *ModelUpsertOne
Update allows overriding fields `UPDATE` values. See the ModelCreate.OnConflict documentation for more info.
func (*ModelUpsertOne) UpdateAlias ¶ added in v0.3.0
func (u *ModelUpsertOne) UpdateAlias() *ModelUpsertOne
UpdateAlias sets the "alias" field to the value that was provided on create.
func (*ModelUpsertOne) UpdateDefault ¶ added in v0.3.0
func (u *ModelUpsertOne) UpdateDefault() *ModelUpsertOne
UpdateDefault sets the "default" field to the value that was provided on create.
func (*ModelUpsertOne) UpdateImage ¶ added in v0.3.0
func (u *ModelUpsertOne) UpdateImage() *ModelUpsertOne
UpdateImage sets the "image" field to the value that was provided on create.
func (*ModelUpsertOne) UpdateMaxTokens ¶ added in v0.3.0
func (u *ModelUpsertOne) UpdateMaxTokens() *ModelUpsertOne
UpdateMaxTokens sets the "max_tokens" field to the value that was provided on create.
func (*ModelUpsertOne) UpdateModel ¶ added in v0.3.0
func (u *ModelUpsertOne) UpdateModel() *ModelUpsertOne
UpdateModel sets the "model" field to the value that was provided on create.
func (*ModelUpsertOne) UpdateNewValues ¶ added in v0.3.0
func (u *ModelUpsertOne) UpdateNewValues() *ModelUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Model.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ModelUpsertOne) UpdateRpm ¶ added in v0.3.0
func (u *ModelUpsertOne) UpdateRpm() *ModelUpsertOne
UpdateRpm sets the "rpm" field to the value that was provided on create.
func (*ModelUpsertOne) UpdateUpdatedAt ¶ added in v0.3.0
func (u *ModelUpsertOne) UpdateUpdatedAt() *ModelUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
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 Provider ¶ added in v0.3.0
type Provider struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// Key holds the value of the "key" field.
Key string `json:"key,omitempty"`
// BaseURL holds the value of the "base_url" field.
BaseURL string `json:"base_url,omitempty"`
// Enabled holds the value of the "enabled" field.
Enabled bool `json:"enabled,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ProviderQuery when eager-loading is set.
Edges ProviderEdges `json:"edges"`
// contains filtered or unexported fields
}
Provider is the model entity for the Provider schema.
func (*Provider) QueryModels ¶ added in v0.3.0
func (pr *Provider) QueryModels() *ModelQuery
QueryModels queries the "models" edge of the Provider entity.
func (*Provider) Unwrap ¶ added in v0.3.0
Unwrap unwraps the Provider 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 (*Provider) Update ¶ added in v0.3.0
func (pr *Provider) Update() *ProviderUpdateOne
Update returns a builder for updating this Provider. Note that you need to call Provider.Unwrap() before calling this method if this Provider was returned from a transaction, and the transaction was committed or rolled back.
type ProviderClient ¶ added in v0.3.0
type ProviderClient struct {
// contains filtered or unexported fields
}
ProviderClient is a client for the Provider schema.
func NewProviderClient ¶ added in v0.3.0
func NewProviderClient(c config) *ProviderClient
NewProviderClient returns a client for the Provider from the given config.
func (*ProviderClient) Create ¶ added in v0.3.0
func (c *ProviderClient) Create() *ProviderCreate
Create returns a builder for creating a Provider entity.
func (*ProviderClient) CreateBulk ¶ added in v0.3.0
func (c *ProviderClient) CreateBulk(builders ...*ProviderCreate) *ProviderCreateBulk
CreateBulk returns a builder for creating a bulk of Provider entities.
func (*ProviderClient) Delete ¶ added in v0.3.0
func (c *ProviderClient) Delete() *ProviderDelete
Delete returns a delete builder for Provider.
func (*ProviderClient) DeleteOne ¶ added in v0.3.0
func (c *ProviderClient) DeleteOne(pr *Provider) *ProviderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProviderClient) DeleteOneID ¶ added in v0.3.0
func (c *ProviderClient) DeleteOneID(id int) *ProviderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProviderClient) GetX ¶ added in v0.3.0
func (c *ProviderClient) GetX(ctx context.Context, id int) *Provider
GetX is like Get, but panics if an error occurs.
func (*ProviderClient) Hooks ¶ added in v0.3.0
func (c *ProviderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProviderClient) Intercept ¶ added in v0.3.0
func (c *ProviderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `provider.Intercept(f(g(h())))`.
func (*ProviderClient) Interceptors ¶ added in v0.3.0
func (c *ProviderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProviderClient) MapCreateBulk ¶ added in v0.3.0
func (c *ProviderClient) MapCreateBulk(slice any, setFunc func(*ProviderCreate, int)) *ProviderCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ProviderClient) Query ¶ added in v0.3.0
func (c *ProviderClient) Query() *ProviderQuery
Query returns a query builder for Provider.
func (*ProviderClient) QueryModels ¶ added in v0.3.0
func (c *ProviderClient) QueryModels(pr *Provider) *ModelQuery
QueryModels queries the models edge of a Provider.
func (*ProviderClient) Update ¶ added in v0.3.0
func (c *ProviderClient) Update() *ProviderUpdate
Update returns an update builder for Provider.
func (*ProviderClient) UpdateOne ¶ added in v0.3.0
func (c *ProviderClient) UpdateOne(pr *Provider) *ProviderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProviderClient) UpdateOneID ¶ added in v0.3.0
func (c *ProviderClient) UpdateOneID(id int) *ProviderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProviderClient) Use ¶ added in v0.3.0
func (c *ProviderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `provider.Hooks(f(g(h())))`.
type ProviderCreate ¶ added in v0.3.0
type ProviderCreate struct {
// contains filtered or unexported fields
}
ProviderCreate is the builder for creating a Provider entity.
func (*ProviderCreate) AddModelIDs ¶ added in v0.3.0
func (pc *ProviderCreate) AddModelIDs(ids ...int) *ProviderCreate
AddModelIDs adds the "models" edge to the Model entity by IDs.
func (*ProviderCreate) AddModels ¶ added in v0.3.0
func (pc *ProviderCreate) AddModels(m ...*Model) *ProviderCreate
AddModels adds the "models" edges to the Model entity.
func (*ProviderCreate) Exec ¶ added in v0.3.0
func (pc *ProviderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderCreate) ExecX ¶ added in v0.3.0
func (pc *ProviderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderCreate) Mutation ¶ added in v0.3.0
func (pc *ProviderCreate) Mutation() *ProviderMutation
Mutation returns the ProviderMutation object of the builder.
func (*ProviderCreate) OnConflict ¶ added in v0.3.0
func (pc *ProviderCreate) OnConflict(opts ...sql.ConflictOption) *ProviderUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Provider.Create().
SetCreatedAt(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.ProviderUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ProviderCreate) OnConflictColumns ¶ added in v0.3.0
func (pc *ProviderCreate) OnConflictColumns(columns ...string) *ProviderUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Provider.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ProviderCreate) Save ¶ added in v0.3.0
func (pc *ProviderCreate) Save(ctx context.Context) (*Provider, error)
Save creates the Provider in the database.
func (*ProviderCreate) SaveX ¶ added in v0.3.0
func (pc *ProviderCreate) SaveX(ctx context.Context) *Provider
SaveX calls Save and panics if Save returns an error.
func (*ProviderCreate) SetBaseURL ¶ added in v0.3.0
func (pc *ProviderCreate) SetBaseURL(s string) *ProviderCreate
SetBaseURL sets the "base_url" field.
func (*ProviderCreate) SetCreatedAt ¶ added in v0.3.0
func (pc *ProviderCreate) SetCreatedAt(t time.Time) *ProviderCreate
SetCreatedAt sets the "created_at" field.
func (*ProviderCreate) SetEnabled ¶ added in v0.4.1
func (pc *ProviderCreate) SetEnabled(b bool) *ProviderCreate
SetEnabled sets the "enabled" field.
func (*ProviderCreate) SetKey ¶ added in v0.3.0
func (pc *ProviderCreate) SetKey(s string) *ProviderCreate
SetKey sets the "key" field.
func (*ProviderCreate) SetName ¶ added in v0.3.0
func (pc *ProviderCreate) SetName(s string) *ProviderCreate
SetName sets the "name" field.
func (*ProviderCreate) SetNillableBaseURL ¶ added in v0.3.0
func (pc *ProviderCreate) SetNillableBaseURL(s *string) *ProviderCreate
SetNillableBaseURL sets the "base_url" field if the given value is not nil.
func (*ProviderCreate) SetNillableCreatedAt ¶ added in v0.3.0
func (pc *ProviderCreate) SetNillableCreatedAt(t *time.Time) *ProviderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProviderCreate) SetNillableEnabled ¶ added in v0.4.1
func (pc *ProviderCreate) SetNillableEnabled(b *bool) *ProviderCreate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*ProviderCreate) SetNillableKey ¶ added in v0.3.0
func (pc *ProviderCreate) SetNillableKey(s *string) *ProviderCreate
SetNillableKey sets the "key" field if the given value is not nil.
func (*ProviderCreate) SetNillableUpdatedAt ¶ added in v0.3.0
func (pc *ProviderCreate) SetNillableUpdatedAt(t *time.Time) *ProviderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProviderCreate) SetType ¶ added in v0.3.0
func (pc *ProviderCreate) SetType(s string) *ProviderCreate
SetType sets the "type" field.
func (*ProviderCreate) SetUpdatedAt ¶ added in v0.3.0
func (pc *ProviderCreate) SetUpdatedAt(t time.Time) *ProviderCreate
SetUpdatedAt sets the "updated_at" field.
type ProviderCreateBulk ¶ added in v0.3.0
type ProviderCreateBulk struct {
// contains filtered or unexported fields
}
ProviderCreateBulk is the builder for creating many Provider entities in bulk.
func (*ProviderCreateBulk) Exec ¶ added in v0.3.0
func (pcb *ProviderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderCreateBulk) ExecX ¶ added in v0.3.0
func (pcb *ProviderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderCreateBulk) OnConflict ¶ added in v0.3.0
func (pcb *ProviderCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProviderUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Provider.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.ProviderUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ProviderCreateBulk) OnConflictColumns ¶ added in v0.3.0
func (pcb *ProviderCreateBulk) OnConflictColumns(columns ...string) *ProviderUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Provider.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ProviderDelete ¶ added in v0.3.0
type ProviderDelete struct {
// contains filtered or unexported fields
}
ProviderDelete is the builder for deleting a Provider entity.
func (*ProviderDelete) Exec ¶ added in v0.3.0
func (pd *ProviderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProviderDelete) ExecX ¶ added in v0.3.0
func (pd *ProviderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProviderDelete) Where ¶ added in v0.3.0
func (pd *ProviderDelete) Where(ps ...predicate.Provider) *ProviderDelete
Where appends a list predicates to the ProviderDelete builder.
type ProviderDeleteOne ¶ added in v0.3.0
type ProviderDeleteOne struct {
// contains filtered or unexported fields
}
ProviderDeleteOne is the builder for deleting a single Provider entity.
func (*ProviderDeleteOne) Exec ¶ added in v0.3.0
func (pdo *ProviderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProviderDeleteOne) ExecX ¶ added in v0.3.0
func (pdo *ProviderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderDeleteOne) Where ¶ added in v0.3.0
func (pdo *ProviderDeleteOne) Where(ps ...predicate.Provider) *ProviderDeleteOne
Where appends a list predicates to the ProviderDelete builder.
type ProviderEdges ¶ added in v0.3.0
type ProviderEdges struct {
// Models holds the value of the models edge.
Models []*Model `json:"models,omitempty"`
// contains filtered or unexported fields
}
ProviderEdges holds the relations/edges for other nodes in the graph.
func (ProviderEdges) ModelsOrErr ¶ added in v0.3.0
func (e ProviderEdges) ModelsOrErr() ([]*Model, error)
ModelsOrErr returns the Models value or an error if the edge was not loaded in eager-loading.
type ProviderGroupBy ¶ added in v0.3.0
type ProviderGroupBy struct {
// contains filtered or unexported fields
}
ProviderGroupBy is the group-by builder for Provider entities.
func (*ProviderGroupBy) Aggregate ¶ added in v0.3.0
func (pgb *ProviderGroupBy) Aggregate(fns ...AggregateFunc) *ProviderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProviderGroupBy) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) BoolsX ¶ added in v0.3.0
BoolsX is like Bools, but panics if an error occurs.
func (*ProviderGroupBy) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*ProviderGroupBy) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*ProviderGroupBy) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Scan ¶ added in v0.3.0
func (pgb *ProviderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProviderGroupBy) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type ProviderMutation ¶ added in v0.3.0
type ProviderMutation struct {
// contains filtered or unexported fields
}
ProviderMutation represents an operation that mutates the Provider nodes in the graph.
func (*ProviderMutation) AddField ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) AddModelIDs ¶ added in v0.3.0
func (m *ProviderMutation) AddModelIDs(ids ...int)
AddModelIDs adds the "models" edge to the Model entity by ids.
func (*ProviderMutation) AddedEdges ¶ added in v0.3.0
func (m *ProviderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProviderMutation) AddedField ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) AddedFields ¶ added in v0.3.0
func (m *ProviderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProviderMutation) AddedIDs ¶ added in v0.3.0
func (m *ProviderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProviderMutation) BaseURL ¶ added in v0.3.0
func (m *ProviderMutation) BaseURL() (r string, exists bool)
BaseURL returns the value of the "base_url" field in the mutation.
func (*ProviderMutation) BaseURLCleared ¶ added in v0.3.0
func (m *ProviderMutation) BaseURLCleared() bool
BaseURLCleared returns if the "base_url" field was cleared in this mutation.
func (*ProviderMutation) ClearBaseURL ¶ added in v0.3.0
func (m *ProviderMutation) ClearBaseURL()
ClearBaseURL clears the value of the "base_url" field.
func (*ProviderMutation) ClearCreatedAt ¶ added in v0.3.0
func (m *ProviderMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*ProviderMutation) ClearEdge ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) ClearField ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) ClearKey ¶ added in v0.3.0
func (m *ProviderMutation) ClearKey()
ClearKey clears the value of the "key" field.
func (*ProviderMutation) ClearModels ¶ added in v0.3.0
func (m *ProviderMutation) ClearModels()
ClearModels clears the "models" edge to the Model entity.
func (*ProviderMutation) ClearUpdatedAt ¶ added in v0.3.0
func (m *ProviderMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ProviderMutation) ClearedEdges ¶ added in v0.3.0
func (m *ProviderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProviderMutation) ClearedFields ¶ added in v0.3.0
func (m *ProviderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProviderMutation) Client ¶ added in v0.3.0
func (m ProviderMutation) 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 (*ProviderMutation) CreatedAt ¶ added in v0.3.0
func (m *ProviderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProviderMutation) CreatedAtCleared ¶ added in v0.3.0
func (m *ProviderMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*ProviderMutation) EdgeCleared ¶ added in v0.3.0
func (m *ProviderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProviderMutation) Enabled ¶ added in v0.4.1
func (m *ProviderMutation) Enabled() (r bool, exists bool)
Enabled returns the value of the "enabled" field in the mutation.
func (*ProviderMutation) Field ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) FieldCleared ¶ added in v0.3.0
func (m *ProviderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProviderMutation) Fields ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) GetType ¶ added in v0.3.0
func (m *ProviderMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*ProviderMutation) ID ¶ added in v0.3.0
func (m *ProviderMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ProviderMutation) IDs ¶ added in v0.3.0
func (m *ProviderMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProviderMutation) Key ¶ added in v0.3.0
func (m *ProviderMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*ProviderMutation) KeyCleared ¶ added in v0.3.0
func (m *ProviderMutation) KeyCleared() bool
KeyCleared returns if the "key" field was cleared in this mutation.
func (*ProviderMutation) ModelsCleared ¶ added in v0.3.0
func (m *ProviderMutation) ModelsCleared() bool
ModelsCleared reports if the "models" edge to the Model entity was cleared.
func (*ProviderMutation) ModelsIDs ¶ added in v0.3.0
func (m *ProviderMutation) ModelsIDs() (ids []int)
ModelsIDs returns the "models" edge IDs in the mutation.
func (*ProviderMutation) Name ¶ added in v0.3.0
func (m *ProviderMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProviderMutation) OldBaseURL ¶ added in v0.3.0
func (m *ProviderMutation) OldBaseURL(ctx context.Context) (v string, err error)
OldBaseURL returns the old "base_url" field's value of the Provider entity. If the Provider 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 (*ProviderMutation) OldCreatedAt ¶ added in v0.3.0
OldCreatedAt returns the old "created_at" field's value of the Provider entity. If the Provider 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 (*ProviderMutation) OldEnabled ¶ added in v0.4.1
func (m *ProviderMutation) OldEnabled(ctx context.Context) (v bool, err error)
OldEnabled returns the old "enabled" field's value of the Provider entity. If the Provider 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 (*ProviderMutation) OldField ¶ added in v0.3.0
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ProviderMutation) OldKey ¶ added in v0.3.0
func (m *ProviderMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the Provider entity. If the Provider 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 (*ProviderMutation) OldName ¶ added in v0.3.0
func (m *ProviderMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Provider entity. If the Provider 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 (*ProviderMutation) OldType ¶ added in v0.3.0
func (m *ProviderMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Provider entity. If the Provider 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 (*ProviderMutation) OldUpdatedAt ¶ added in v0.3.0
OldUpdatedAt returns the old "updated_at" field's value of the Provider entity. If the Provider 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 (*ProviderMutation) Op ¶ added in v0.3.0
func (m *ProviderMutation) Op() Op
Op returns the operation name.
func (*ProviderMutation) RemoveModelIDs ¶ added in v0.3.0
func (m *ProviderMutation) RemoveModelIDs(ids ...int)
RemoveModelIDs removes the "models" edge to the Model entity by IDs.
func (*ProviderMutation) RemovedEdges ¶ added in v0.3.0
func (m *ProviderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProviderMutation) RemovedIDs ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) RemovedModelsIDs ¶ added in v0.3.0
func (m *ProviderMutation) RemovedModelsIDs() (ids []int)
RemovedModels returns the removed IDs of the "models" edge to the Model entity.
func (*ProviderMutation) ResetBaseURL ¶ added in v0.3.0
func (m *ProviderMutation) ResetBaseURL()
ResetBaseURL resets all changes to the "base_url" field.
func (*ProviderMutation) ResetCreatedAt ¶ added in v0.3.0
func (m *ProviderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProviderMutation) ResetEdge ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) ResetEnabled ¶ added in v0.4.1
func (m *ProviderMutation) ResetEnabled()
ResetEnabled resets all changes to the "enabled" field.
func (*ProviderMutation) ResetField ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) ResetKey ¶ added in v0.3.0
func (m *ProviderMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*ProviderMutation) ResetModels ¶ added in v0.3.0
func (m *ProviderMutation) ResetModels()
ResetModels resets all changes to the "models" edge.
func (*ProviderMutation) ResetName ¶ added in v0.3.0
func (m *ProviderMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProviderMutation) ResetType ¶ added in v0.3.0
func (m *ProviderMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*ProviderMutation) ResetUpdatedAt ¶ added in v0.3.0
func (m *ProviderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProviderMutation) SetBaseURL ¶ added in v0.3.0
func (m *ProviderMutation) SetBaseURL(s string)
SetBaseURL sets the "base_url" field.
func (*ProviderMutation) SetCreatedAt ¶ added in v0.3.0
func (m *ProviderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProviderMutation) SetEnabled ¶ added in v0.4.1
func (m *ProviderMutation) SetEnabled(b bool)
SetEnabled sets the "enabled" field.
func (*ProviderMutation) SetField ¶ added in v0.3.0
func (m *ProviderMutation) 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 (*ProviderMutation) SetKey ¶ added in v0.3.0
func (m *ProviderMutation) SetKey(s string)
SetKey sets the "key" field.
func (*ProviderMutation) SetName ¶ added in v0.3.0
func (m *ProviderMutation) SetName(s string)
SetName sets the "name" field.
func (*ProviderMutation) SetOp ¶ added in v0.3.0
func (m *ProviderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProviderMutation) SetType ¶ added in v0.3.0
func (m *ProviderMutation) SetType(s string)
SetType sets the "type" field.
func (*ProviderMutation) SetUpdatedAt ¶ added in v0.3.0
func (m *ProviderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ProviderMutation) Tx ¶ added in v0.3.0
func (m ProviderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProviderMutation) Type ¶ added in v0.3.0
func (m *ProviderMutation) Type() string
Type returns the node type of this mutation (Provider).
func (*ProviderMutation) UpdatedAt ¶ added in v0.3.0
func (m *ProviderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProviderMutation) UpdatedAtCleared ¶ added in v0.3.0
func (m *ProviderMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*ProviderMutation) Where ¶ added in v0.3.0
func (m *ProviderMutation) Where(ps ...predicate.Provider)
Where appends a list predicates to the ProviderMutation builder.
func (*ProviderMutation) WhereP ¶ added in v0.3.0
func (m *ProviderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProviderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProviderQuery ¶ added in v0.3.0
type ProviderQuery struct {
// contains filtered or unexported fields
}
ProviderQuery is the builder for querying Provider entities.
func (*ProviderQuery) Aggregate ¶ added in v0.3.0
func (pq *ProviderQuery) Aggregate(fns ...AggregateFunc) *ProviderSelect
Aggregate returns a ProviderSelect configured with the given aggregations.
func (*ProviderQuery) All ¶ added in v0.3.0
func (pq *ProviderQuery) All(ctx context.Context) ([]*Provider, error)
All executes the query and returns a list of Providers.
func (*ProviderQuery) AllX ¶ added in v0.3.0
func (pq *ProviderQuery) AllX(ctx context.Context) []*Provider
AllX is like All, but panics if an error occurs.
func (*ProviderQuery) Clone ¶ added in v0.3.0
func (pq *ProviderQuery) Clone() *ProviderQuery
Clone returns a duplicate of the ProviderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProviderQuery) Count ¶ added in v0.3.0
func (pq *ProviderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProviderQuery) CountX ¶ added in v0.3.0
func (pq *ProviderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProviderQuery) Exist ¶ added in v0.3.0
func (pq *ProviderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProviderQuery) ExistX ¶ added in v0.3.0
func (pq *ProviderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProviderQuery) First ¶ added in v0.3.0
func (pq *ProviderQuery) First(ctx context.Context) (*Provider, error)
First returns the first Provider entity from the query. Returns a *NotFoundError when no Provider was found.
func (*ProviderQuery) FirstID ¶ added in v0.3.0
func (pq *ProviderQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Provider ID from the query. Returns a *NotFoundError when no Provider ID was found.
func (*ProviderQuery) FirstIDX ¶ added in v0.3.0
func (pq *ProviderQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProviderQuery) FirstX ¶ added in v0.3.0
func (pq *ProviderQuery) FirstX(ctx context.Context) *Provider
FirstX is like First, but panics if an error occurs.
func (*ProviderQuery) ForShare ¶ added in v0.3.0
func (pq *ProviderQuery) ForShare(opts ...sql.LockOption) *ProviderQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*ProviderQuery) ForUpdate ¶ added in v0.3.0
func (pq *ProviderQuery) ForUpdate(opts ...sql.LockOption) *ProviderQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*ProviderQuery) GroupBy ¶ added in v0.3.0
func (pq *ProviderQuery) GroupBy(field string, fields ...string) *ProviderGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Provider.Query().
GroupBy(provider.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ProviderQuery) IDs ¶ added in v0.3.0
func (pq *ProviderQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Provider IDs.
func (*ProviderQuery) IDsX ¶ added in v0.3.0
func (pq *ProviderQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ProviderQuery) Limit ¶ added in v0.3.0
func (pq *ProviderQuery) Limit(limit int) *ProviderQuery
Limit the number of records to be returned by this query.
func (*ProviderQuery) Modify ¶ added in v0.3.0
func (pq *ProviderQuery) Modify(modifiers ...func(s *sql.Selector)) *ProviderSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ProviderQuery) Offset ¶ added in v0.3.0
func (pq *ProviderQuery) Offset(offset int) *ProviderQuery
Offset to start from.
func (*ProviderQuery) Only ¶ added in v0.3.0
func (pq *ProviderQuery) Only(ctx context.Context) (*Provider, error)
Only returns a single Provider entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Provider entity is found. Returns a *NotFoundError when no Provider entities are found.
func (*ProviderQuery) OnlyID ¶ added in v0.3.0
func (pq *ProviderQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Provider ID in the query. Returns a *NotSingularError when more than one Provider ID is found. Returns a *NotFoundError when no entities are found.
func (*ProviderQuery) OnlyIDX ¶ added in v0.3.0
func (pq *ProviderQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProviderQuery) OnlyX ¶ added in v0.3.0
func (pq *ProviderQuery) OnlyX(ctx context.Context) *Provider
OnlyX is like Only, but panics if an error occurs.
func (*ProviderQuery) Order ¶ added in v0.3.0
func (pq *ProviderQuery) Order(o ...provider.OrderOption) *ProviderQuery
Order specifies how the records should be ordered.
func (*ProviderQuery) QueryModels ¶ added in v0.3.0
func (pq *ProviderQuery) QueryModels() *ModelQuery
QueryModels chains the current query on the "models" edge.
func (*ProviderQuery) Select ¶ added in v0.3.0
func (pq *ProviderQuery) Select(fields ...string) *ProviderSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Provider.Query().
Select(provider.FieldCreatedAt).
Scan(ctx, &v)
func (*ProviderQuery) Unique ¶ added in v0.3.0
func (pq *ProviderQuery) Unique(unique bool) *ProviderQuery
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 (*ProviderQuery) Where ¶ added in v0.3.0
func (pq *ProviderQuery) Where(ps ...predicate.Provider) *ProviderQuery
Where adds a new predicate for the ProviderQuery builder.
func (*ProviderQuery) WithModels ¶ added in v0.3.0
func (pq *ProviderQuery) WithModels(opts ...func(*ModelQuery)) *ProviderQuery
WithModels tells the query-builder to eager-load the nodes that are connected to the "models" edge. The optional arguments are used to configure the query builder of the edge.
type ProviderSelect ¶ added in v0.3.0
type ProviderSelect struct {
*ProviderQuery
// contains filtered or unexported fields
}
ProviderSelect is the builder for selecting fields of Provider entities.
func (*ProviderSelect) Aggregate ¶ added in v0.3.0
func (ps *ProviderSelect) Aggregate(fns ...AggregateFunc) *ProviderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProviderSelect) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) BoolsX ¶ added in v0.3.0
BoolsX is like Bools, but panics if an error occurs.
func (*ProviderSelect) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*ProviderSelect) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*ProviderSelect) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Modify ¶ added in v0.3.0
func (ps *ProviderSelect) Modify(modifiers ...func(s *sql.Selector)) *ProviderSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ProviderSelect) Scan ¶ added in v0.3.0
func (ps *ProviderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProviderSelect) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type ProviderUpdate ¶ added in v0.3.0
type ProviderUpdate struct {
// contains filtered or unexported fields
}
ProviderUpdate is the builder for updating Provider entities.
func (*ProviderUpdate) AddModelIDs ¶ added in v0.3.0
func (pu *ProviderUpdate) AddModelIDs(ids ...int) *ProviderUpdate
AddModelIDs adds the "models" edge to the Model entity by IDs.
func (*ProviderUpdate) AddModels ¶ added in v0.3.0
func (pu *ProviderUpdate) AddModels(m ...*Model) *ProviderUpdate
AddModels adds the "models" edges to the Model entity.
func (*ProviderUpdate) ClearBaseURL ¶ added in v0.3.0
func (pu *ProviderUpdate) ClearBaseURL() *ProviderUpdate
ClearBaseURL clears the value of the "base_url" field.
func (*ProviderUpdate) ClearKey ¶ added in v0.3.0
func (pu *ProviderUpdate) ClearKey() *ProviderUpdate
ClearKey clears the value of the "key" field.
func (*ProviderUpdate) ClearModels ¶ added in v0.3.0
func (pu *ProviderUpdate) ClearModels() *ProviderUpdate
ClearModels clears all "models" edges to the Model entity.
func (*ProviderUpdate) ClearUpdatedAt ¶ added in v0.3.0
func (pu *ProviderUpdate) ClearUpdatedAt() *ProviderUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ProviderUpdate) Exec ¶ added in v0.3.0
func (pu *ProviderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderUpdate) ExecX ¶ added in v0.3.0
func (pu *ProviderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderUpdate) Modify ¶ added in v0.3.0
func (pu *ProviderUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProviderUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ProviderUpdate) Mutation ¶ added in v0.3.0
func (pu *ProviderUpdate) Mutation() *ProviderMutation
Mutation returns the ProviderMutation object of the builder.
func (*ProviderUpdate) RemoveModelIDs ¶ added in v0.3.0
func (pu *ProviderUpdate) RemoveModelIDs(ids ...int) *ProviderUpdate
RemoveModelIDs removes the "models" edge to Model entities by IDs.
func (*ProviderUpdate) RemoveModels ¶ added in v0.3.0
func (pu *ProviderUpdate) RemoveModels(m ...*Model) *ProviderUpdate
RemoveModels removes "models" edges to Model entities.
func (*ProviderUpdate) Save ¶ added in v0.3.0
func (pu *ProviderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProviderUpdate) SaveX ¶ added in v0.3.0
func (pu *ProviderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProviderUpdate) SetBaseURL ¶ added in v0.3.0
func (pu *ProviderUpdate) SetBaseURL(s string) *ProviderUpdate
SetBaseURL sets the "base_url" field.
func (*ProviderUpdate) SetEnabled ¶ added in v0.4.1
func (pu *ProviderUpdate) SetEnabled(b bool) *ProviderUpdate
SetEnabled sets the "enabled" field.
func (*ProviderUpdate) SetKey ¶ added in v0.3.0
func (pu *ProviderUpdate) SetKey(s string) *ProviderUpdate
SetKey sets the "key" field.
func (*ProviderUpdate) SetName ¶ added in v0.3.0
func (pu *ProviderUpdate) SetName(s string) *ProviderUpdate
SetName sets the "name" field.
func (*ProviderUpdate) SetNillableBaseURL ¶ added in v0.3.0
func (pu *ProviderUpdate) SetNillableBaseURL(s *string) *ProviderUpdate
SetNillableBaseURL sets the "base_url" field if the given value is not nil.
func (*ProviderUpdate) SetNillableEnabled ¶ added in v0.4.1
func (pu *ProviderUpdate) SetNillableEnabled(b *bool) *ProviderUpdate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*ProviderUpdate) SetNillableKey ¶ added in v0.3.0
func (pu *ProviderUpdate) SetNillableKey(s *string) *ProviderUpdate
SetNillableKey sets the "key" field if the given value is not nil.
func (*ProviderUpdate) SetNillableName ¶ added in v0.3.0
func (pu *ProviderUpdate) SetNillableName(s *string) *ProviderUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ProviderUpdate) SetNillableType ¶ added in v0.3.0
func (pu *ProviderUpdate) SetNillableType(s *string) *ProviderUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*ProviderUpdate) SetType ¶ added in v0.3.0
func (pu *ProviderUpdate) SetType(s string) *ProviderUpdate
SetType sets the "type" field.
func (*ProviderUpdate) SetUpdatedAt ¶ added in v0.3.0
func (pu *ProviderUpdate) SetUpdatedAt(t time.Time) *ProviderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProviderUpdate) Where ¶ added in v0.3.0
func (pu *ProviderUpdate) Where(ps ...predicate.Provider) *ProviderUpdate
Where appends a list predicates to the ProviderUpdate builder.
type ProviderUpdateOne ¶ added in v0.3.0
type ProviderUpdateOne struct {
// contains filtered or unexported fields
}
ProviderUpdateOne is the builder for updating a single Provider entity.
func (*ProviderUpdateOne) AddModelIDs ¶ added in v0.3.0
func (puo *ProviderUpdateOne) AddModelIDs(ids ...int) *ProviderUpdateOne
AddModelIDs adds the "models" edge to the Model entity by IDs.
func (*ProviderUpdateOne) AddModels ¶ added in v0.3.0
func (puo *ProviderUpdateOne) AddModels(m ...*Model) *ProviderUpdateOne
AddModels adds the "models" edges to the Model entity.
func (*ProviderUpdateOne) ClearBaseURL ¶ added in v0.3.0
func (puo *ProviderUpdateOne) ClearBaseURL() *ProviderUpdateOne
ClearBaseURL clears the value of the "base_url" field.
func (*ProviderUpdateOne) ClearKey ¶ added in v0.3.0
func (puo *ProviderUpdateOne) ClearKey() *ProviderUpdateOne
ClearKey clears the value of the "key" field.
func (*ProviderUpdateOne) ClearModels ¶ added in v0.3.0
func (puo *ProviderUpdateOne) ClearModels() *ProviderUpdateOne
ClearModels clears all "models" edges to the Model entity.
func (*ProviderUpdateOne) ClearUpdatedAt ¶ added in v0.3.0
func (puo *ProviderUpdateOne) ClearUpdatedAt() *ProviderUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ProviderUpdateOne) Exec ¶ added in v0.3.0
func (puo *ProviderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProviderUpdateOne) ExecX ¶ added in v0.3.0
func (puo *ProviderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderUpdateOne) Modify ¶ added in v0.3.0
func (puo *ProviderUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProviderUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ProviderUpdateOne) Mutation ¶ added in v0.3.0
func (puo *ProviderUpdateOne) Mutation() *ProviderMutation
Mutation returns the ProviderMutation object of the builder.
func (*ProviderUpdateOne) RemoveModelIDs ¶ added in v0.3.0
func (puo *ProviderUpdateOne) RemoveModelIDs(ids ...int) *ProviderUpdateOne
RemoveModelIDs removes the "models" edge to Model entities by IDs.
func (*ProviderUpdateOne) RemoveModels ¶ added in v0.3.0
func (puo *ProviderUpdateOne) RemoveModels(m ...*Model) *ProviderUpdateOne
RemoveModels removes "models" edges to Model entities.
func (*ProviderUpdateOne) Save ¶ added in v0.3.0
func (puo *ProviderUpdateOne) Save(ctx context.Context) (*Provider, error)
Save executes the query and returns the updated Provider entity.
func (*ProviderUpdateOne) SaveX ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SaveX(ctx context.Context) *Provider
SaveX is like Save, but panics if an error occurs.
func (*ProviderUpdateOne) Select ¶ added in v0.3.0
func (puo *ProviderUpdateOne) Select(field string, fields ...string) *ProviderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProviderUpdateOne) SetBaseURL ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SetBaseURL(s string) *ProviderUpdateOne
SetBaseURL sets the "base_url" field.
func (*ProviderUpdateOne) SetEnabled ¶ added in v0.4.1
func (puo *ProviderUpdateOne) SetEnabled(b bool) *ProviderUpdateOne
SetEnabled sets the "enabled" field.
func (*ProviderUpdateOne) SetKey ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SetKey(s string) *ProviderUpdateOne
SetKey sets the "key" field.
func (*ProviderUpdateOne) SetName ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SetName(s string) *ProviderUpdateOne
SetName sets the "name" field.
func (*ProviderUpdateOne) SetNillableBaseURL ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SetNillableBaseURL(s *string) *ProviderUpdateOne
SetNillableBaseURL sets the "base_url" field if the given value is not nil.
func (*ProviderUpdateOne) SetNillableEnabled ¶ added in v0.4.1
func (puo *ProviderUpdateOne) SetNillableEnabled(b *bool) *ProviderUpdateOne
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*ProviderUpdateOne) SetNillableKey ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SetNillableKey(s *string) *ProviderUpdateOne
SetNillableKey sets the "key" field if the given value is not nil.
func (*ProviderUpdateOne) SetNillableName ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SetNillableName(s *string) *ProviderUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ProviderUpdateOne) SetNillableType ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SetNillableType(s *string) *ProviderUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*ProviderUpdateOne) SetType ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SetType(s string) *ProviderUpdateOne
SetType sets the "type" field.
func (*ProviderUpdateOne) SetUpdatedAt ¶ added in v0.3.0
func (puo *ProviderUpdateOne) SetUpdatedAt(t time.Time) *ProviderUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProviderUpdateOne) Where ¶ added in v0.3.0
func (puo *ProviderUpdateOne) Where(ps ...predicate.Provider) *ProviderUpdateOne
Where appends a list predicates to the ProviderUpdate builder.
type ProviderUpsert ¶ added in v0.3.0
ProviderUpsert is the "OnConflict" setter.
func (*ProviderUpsert) ClearBaseURL ¶ added in v0.3.0
func (u *ProviderUpsert) ClearBaseURL() *ProviderUpsert
ClearBaseURL clears the value of the "base_url" field.
func (*ProviderUpsert) ClearKey ¶ added in v0.3.0
func (u *ProviderUpsert) ClearKey() *ProviderUpsert
ClearKey clears the value of the "key" field.
func (*ProviderUpsert) ClearUpdatedAt ¶ added in v0.3.0
func (u *ProviderUpsert) ClearUpdatedAt() *ProviderUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ProviderUpsert) SetBaseURL ¶ added in v0.3.0
func (u *ProviderUpsert) SetBaseURL(v string) *ProviderUpsert
SetBaseURL sets the "base_url" field.
func (*ProviderUpsert) SetEnabled ¶ added in v0.4.1
func (u *ProviderUpsert) SetEnabled(v bool) *ProviderUpsert
SetEnabled sets the "enabled" field.
func (*ProviderUpsert) SetKey ¶ added in v0.3.0
func (u *ProviderUpsert) SetKey(v string) *ProviderUpsert
SetKey sets the "key" field.
func (*ProviderUpsert) SetName ¶ added in v0.3.0
func (u *ProviderUpsert) SetName(v string) *ProviderUpsert
SetName sets the "name" field.
func (*ProviderUpsert) SetType ¶ added in v0.3.0
func (u *ProviderUpsert) SetType(v string) *ProviderUpsert
SetType sets the "type" field.
func (*ProviderUpsert) SetUpdatedAt ¶ added in v0.3.0
func (u *ProviderUpsert) SetUpdatedAt(v time.Time) *ProviderUpsert
SetUpdatedAt sets the "updated_at" field.
func (*ProviderUpsert) UpdateBaseURL ¶ added in v0.3.0
func (u *ProviderUpsert) UpdateBaseURL() *ProviderUpsert
UpdateBaseURL sets the "base_url" field to the value that was provided on create.
func (*ProviderUpsert) UpdateEnabled ¶ added in v0.4.1
func (u *ProviderUpsert) UpdateEnabled() *ProviderUpsert
UpdateEnabled sets the "enabled" field to the value that was provided on create.
func (*ProviderUpsert) UpdateKey ¶ added in v0.3.0
func (u *ProviderUpsert) UpdateKey() *ProviderUpsert
UpdateKey sets the "key" field to the value that was provided on create.
func (*ProviderUpsert) UpdateName ¶ added in v0.3.0
func (u *ProviderUpsert) UpdateName() *ProviderUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*ProviderUpsert) UpdateType ¶ added in v0.3.0
func (u *ProviderUpsert) UpdateType() *ProviderUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*ProviderUpsert) UpdateUpdatedAt ¶ added in v0.3.0
func (u *ProviderUpsert) UpdateUpdatedAt() *ProviderUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ProviderUpsertBulk ¶ added in v0.3.0
type ProviderUpsertBulk struct {
// contains filtered or unexported fields
}
ProviderUpsertBulk is the builder for "upsert"-ing a bulk of Provider nodes.
func (*ProviderUpsertBulk) ClearBaseURL ¶ added in v0.3.0
func (u *ProviderUpsertBulk) ClearBaseURL() *ProviderUpsertBulk
ClearBaseURL clears the value of the "base_url" field.
func (*ProviderUpsertBulk) ClearKey ¶ added in v0.3.0
func (u *ProviderUpsertBulk) ClearKey() *ProviderUpsertBulk
ClearKey clears the value of the "key" field.
func (*ProviderUpsertBulk) ClearUpdatedAt ¶ added in v0.3.0
func (u *ProviderUpsertBulk) ClearUpdatedAt() *ProviderUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ProviderUpsertBulk) DoNothing ¶ added in v0.3.0
func (u *ProviderUpsertBulk) DoNothing() *ProviderUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ProviderUpsertBulk) Exec ¶ added in v0.3.0
func (u *ProviderUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderUpsertBulk) ExecX ¶ added in v0.3.0
func (u *ProviderUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderUpsertBulk) Ignore ¶ added in v0.3.0
func (u *ProviderUpsertBulk) Ignore() *ProviderUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Provider.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ProviderUpsertBulk) SetBaseURL ¶ added in v0.3.0
func (u *ProviderUpsertBulk) SetBaseURL(v string) *ProviderUpsertBulk
SetBaseURL sets the "base_url" field.
func (*ProviderUpsertBulk) SetEnabled ¶ added in v0.4.1
func (u *ProviderUpsertBulk) SetEnabled(v bool) *ProviderUpsertBulk
SetEnabled sets the "enabled" field.
func (*ProviderUpsertBulk) SetKey ¶ added in v0.3.0
func (u *ProviderUpsertBulk) SetKey(v string) *ProviderUpsertBulk
SetKey sets the "key" field.
func (*ProviderUpsertBulk) SetName ¶ added in v0.3.0
func (u *ProviderUpsertBulk) SetName(v string) *ProviderUpsertBulk
SetName sets the "name" field.
func (*ProviderUpsertBulk) SetType ¶ added in v0.3.0
func (u *ProviderUpsertBulk) SetType(v string) *ProviderUpsertBulk
SetType sets the "type" field.
func (*ProviderUpsertBulk) SetUpdatedAt ¶ added in v0.3.0
func (u *ProviderUpsertBulk) SetUpdatedAt(v time.Time) *ProviderUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*ProviderUpsertBulk) Update ¶ added in v0.3.0
func (u *ProviderUpsertBulk) Update(set func(*ProviderUpsert)) *ProviderUpsertBulk
Update allows overriding fields `UPDATE` values. See the ProviderCreateBulk.OnConflict documentation for more info.
func (*ProviderUpsertBulk) UpdateBaseURL ¶ added in v0.3.0
func (u *ProviderUpsertBulk) UpdateBaseURL() *ProviderUpsertBulk
UpdateBaseURL sets the "base_url" field to the value that was provided on create.
func (*ProviderUpsertBulk) UpdateEnabled ¶ added in v0.4.1
func (u *ProviderUpsertBulk) UpdateEnabled() *ProviderUpsertBulk
UpdateEnabled sets the "enabled" field to the value that was provided on create.
func (*ProviderUpsertBulk) UpdateKey ¶ added in v0.3.0
func (u *ProviderUpsertBulk) UpdateKey() *ProviderUpsertBulk
UpdateKey sets the "key" field to the value that was provided on create.
func (*ProviderUpsertBulk) UpdateName ¶ added in v0.3.0
func (u *ProviderUpsertBulk) UpdateName() *ProviderUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*ProviderUpsertBulk) UpdateNewValues ¶ added in v0.3.0
func (u *ProviderUpsertBulk) UpdateNewValues() *ProviderUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Provider.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ProviderUpsertBulk) UpdateType ¶ added in v0.3.0
func (u *ProviderUpsertBulk) UpdateType() *ProviderUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*ProviderUpsertBulk) UpdateUpdatedAt ¶ added in v0.3.0
func (u *ProviderUpsertBulk) UpdateUpdatedAt() *ProviderUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ProviderUpsertOne ¶ added in v0.3.0
type ProviderUpsertOne struct {
// contains filtered or unexported fields
}
ProviderUpsertOne is the builder for "upsert"-ing
one Provider node.
func (*ProviderUpsertOne) ClearBaseURL ¶ added in v0.3.0
func (u *ProviderUpsertOne) ClearBaseURL() *ProviderUpsertOne
ClearBaseURL clears the value of the "base_url" field.
func (*ProviderUpsertOne) ClearKey ¶ added in v0.3.0
func (u *ProviderUpsertOne) ClearKey() *ProviderUpsertOne
ClearKey clears the value of the "key" field.
func (*ProviderUpsertOne) ClearUpdatedAt ¶ added in v0.3.0
func (u *ProviderUpsertOne) ClearUpdatedAt() *ProviderUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ProviderUpsertOne) DoNothing ¶ added in v0.3.0
func (u *ProviderUpsertOne) DoNothing() *ProviderUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ProviderUpsertOne) Exec ¶ added in v0.3.0
func (u *ProviderUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderUpsertOne) ExecX ¶ added in v0.3.0
func (u *ProviderUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderUpsertOne) ID ¶ added in v0.3.0
func (u *ProviderUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ProviderUpsertOne) IDX ¶ added in v0.3.0
func (u *ProviderUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*ProviderUpsertOne) Ignore ¶ added in v0.3.0
func (u *ProviderUpsertOne) Ignore() *ProviderUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Provider.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ProviderUpsertOne) SetBaseURL ¶ added in v0.3.0
func (u *ProviderUpsertOne) SetBaseURL(v string) *ProviderUpsertOne
SetBaseURL sets the "base_url" field.
func (*ProviderUpsertOne) SetEnabled ¶ added in v0.4.1
func (u *ProviderUpsertOne) SetEnabled(v bool) *ProviderUpsertOne
SetEnabled sets the "enabled" field.
func (*ProviderUpsertOne) SetKey ¶ added in v0.3.0
func (u *ProviderUpsertOne) SetKey(v string) *ProviderUpsertOne
SetKey sets the "key" field.
func (*ProviderUpsertOne) SetName ¶ added in v0.3.0
func (u *ProviderUpsertOne) SetName(v string) *ProviderUpsertOne
SetName sets the "name" field.
func (*ProviderUpsertOne) SetType ¶ added in v0.3.0
func (u *ProviderUpsertOne) SetType(v string) *ProviderUpsertOne
SetType sets the "type" field.
func (*ProviderUpsertOne) SetUpdatedAt ¶ added in v0.3.0
func (u *ProviderUpsertOne) SetUpdatedAt(v time.Time) *ProviderUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*ProviderUpsertOne) Update ¶ added in v0.3.0
func (u *ProviderUpsertOne) Update(set func(*ProviderUpsert)) *ProviderUpsertOne
Update allows overriding fields `UPDATE` values. See the ProviderCreate.OnConflict documentation for more info.
func (*ProviderUpsertOne) UpdateBaseURL ¶ added in v0.3.0
func (u *ProviderUpsertOne) UpdateBaseURL() *ProviderUpsertOne
UpdateBaseURL sets the "base_url" field to the value that was provided on create.
func (*ProviderUpsertOne) UpdateEnabled ¶ added in v0.4.1
func (u *ProviderUpsertOne) UpdateEnabled() *ProviderUpsertOne
UpdateEnabled sets the "enabled" field to the value that was provided on create.
func (*ProviderUpsertOne) UpdateKey ¶ added in v0.3.0
func (u *ProviderUpsertOne) UpdateKey() *ProviderUpsertOne
UpdateKey sets the "key" field to the value that was provided on create.
func (*ProviderUpsertOne) UpdateName ¶ added in v0.3.0
func (u *ProviderUpsertOne) UpdateName() *ProviderUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*ProviderUpsertOne) UpdateNewValues ¶ added in v0.3.0
func (u *ProviderUpsertOne) UpdateNewValues() *ProviderUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Provider.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ProviderUpsertOne) UpdateType ¶ added in v0.3.0
func (u *ProviderUpsertOne) UpdateType() *ProviderUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*ProviderUpsertOne) UpdateUpdatedAt ¶ added in v0.3.0
func (u *ProviderUpsertOne) UpdateUpdatedAt() *ProviderUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type Providers ¶ added in v0.3.0
type Providers []*Provider
Providers is a parsable slice of Provider.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TableColumn ¶
type TableColumn struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Nanoid holds the value of the "nanoid" field.
Nanoid string `json:"nanoid,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"`
// Type holds the value of the "type" field.
Type tablecolumn.Type `json:"type,omitempty"`
// FillMode holds the value of the "fill_mode" field.
FillMode tablecolumn.FillMode `json:"fill_mode,omitempty"`
// Source holds the value of the "source" field.
Source string `json:"source,omitempty"`
// SourceID holds the value of the "source_id" field.
SourceID string `json:"source_id,omitempty"`
// SourceType holds the value of the "source_type" field.
SourceType tablecolumn.SourceType `json:"source_type,omitempty"`
// ContextLength holds the value of the "context_length" field.
ContextLength int `json:"context_length,omitempty"`
// TableID holds the value of the "table_id" field.
TableID int `json:"table_id,omitempty"`
// Random holds the value of the "random" field.
Random bool `json:"random,omitempty"`
// Replacement holds the value of the "replacement" field.
Replacement bool `json:"replacement,omitempty"`
// Repeat holds the value of the "repeat" field.
Repeat int `json:"repeat,omitempty"`
// LinkedColumn holds the value of the "linked_column" field.
LinkedColumn string `json:"linked_column,omitempty"`
// LinkedContextColumns holds the value of the "linked_context_columns" field.
LinkedContextColumns []string `json:"linked_context_columns,omitempty"`
// Options holds the value of the "options" field.
Options []string `json:"options,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the TableColumnQuery when eager-loading is set.
Edges TableColumnEdges `json:"edges"`
// contains filtered or unexported fields
}
TableColumn is the model entity for the TableColumn schema.
func (*TableColumn) QueryTablemeta ¶
func (tc *TableColumn) QueryTablemeta() *TableMetaQuery
QueryTablemeta queries the "tablemeta" edge of the TableColumn entity.
func (*TableColumn) String ¶
func (tc *TableColumn) String() string
String implements the fmt.Stringer.
func (*TableColumn) Unwrap ¶
func (tc *TableColumn) Unwrap() *TableColumn
Unwrap unwraps the TableColumn 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 (*TableColumn) Update ¶
func (tc *TableColumn) Update() *TableColumnUpdateOne
Update returns a builder for updating this TableColumn. Note that you need to call TableColumn.Unwrap() before calling this method if this TableColumn was returned from a transaction, and the transaction was committed or rolled back.
type TableColumnClient ¶
type TableColumnClient struct {
// contains filtered or unexported fields
}
TableColumnClient is a client for the TableColumn schema.
func NewTableColumnClient ¶
func NewTableColumnClient(c config) *TableColumnClient
NewTableColumnClient returns a client for the TableColumn from the given config.
func (*TableColumnClient) Create ¶
func (c *TableColumnClient) Create() *TableColumnCreate
Create returns a builder for creating a TableColumn entity.
func (*TableColumnClient) CreateBulk ¶
func (c *TableColumnClient) CreateBulk(builders ...*TableColumnCreate) *TableColumnCreateBulk
CreateBulk returns a builder for creating a bulk of TableColumn entities.
func (*TableColumnClient) Delete ¶
func (c *TableColumnClient) Delete() *TableColumnDelete
Delete returns a delete builder for TableColumn.
func (*TableColumnClient) DeleteOne ¶
func (c *TableColumnClient) DeleteOne(tc *TableColumn) *TableColumnDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TableColumnClient) DeleteOneID ¶
func (c *TableColumnClient) DeleteOneID(id int) *TableColumnDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TableColumnClient) Get ¶
func (c *TableColumnClient) Get(ctx context.Context, id int) (*TableColumn, error)
Get returns a TableColumn entity by its id.
func (*TableColumnClient) GetX ¶
func (c *TableColumnClient) GetX(ctx context.Context, id int) *TableColumn
GetX is like Get, but panics if an error occurs.
func (*TableColumnClient) Hooks ¶
func (c *TableColumnClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TableColumnClient) Intercept ¶
func (c *TableColumnClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tablecolumn.Intercept(f(g(h())))`.
func (*TableColumnClient) Interceptors ¶
func (c *TableColumnClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TableColumnClient) MapCreateBulk ¶
func (c *TableColumnClient) MapCreateBulk(slice any, setFunc func(*TableColumnCreate, int)) *TableColumnCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TableColumnClient) Query ¶
func (c *TableColumnClient) Query() *TableColumnQuery
Query returns a query builder for TableColumn.
func (*TableColumnClient) QueryTablemeta ¶
func (c *TableColumnClient) QueryTablemeta(tc *TableColumn) *TableMetaQuery
QueryTablemeta queries the tablemeta edge of a TableColumn.
func (*TableColumnClient) Update ¶
func (c *TableColumnClient) Update() *TableColumnUpdate
Update returns an update builder for TableColumn.
func (*TableColumnClient) UpdateOne ¶
func (c *TableColumnClient) UpdateOne(tc *TableColumn) *TableColumnUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TableColumnClient) UpdateOneID ¶
func (c *TableColumnClient) UpdateOneID(id int) *TableColumnUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TableColumnClient) Use ¶
func (c *TableColumnClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tablecolumn.Hooks(f(g(h())))`.
type TableColumnCreate ¶
type TableColumnCreate struct {
// contains filtered or unexported fields
}
TableColumnCreate is the builder for creating a TableColumn entity.
func (*TableColumnCreate) Exec ¶
func (tcc *TableColumnCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TableColumnCreate) ExecX ¶
func (tcc *TableColumnCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableColumnCreate) Mutation ¶
func (tcc *TableColumnCreate) Mutation() *TableColumnMutation
Mutation returns the TableColumnMutation object of the builder.
func (*TableColumnCreate) OnConflict ¶
func (tcc *TableColumnCreate) OnConflict(opts ...sql.ConflictOption) *TableColumnUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TableColumn.Create().
SetCreatedAt(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.TableColumnUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*TableColumnCreate) OnConflictColumns ¶
func (tcc *TableColumnCreate) OnConflictColumns(columns ...string) *TableColumnUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TableColumn.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TableColumnCreate) Save ¶
func (tcc *TableColumnCreate) Save(ctx context.Context) (*TableColumn, error)
Save creates the TableColumn in the database.
func (*TableColumnCreate) SaveX ¶
func (tcc *TableColumnCreate) SaveX(ctx context.Context) *TableColumn
SaveX calls Save and panics if Save returns an error.
func (*TableColumnCreate) SetContextLength ¶
func (tcc *TableColumnCreate) SetContextLength(i int) *TableColumnCreate
SetContextLength sets the "context_length" field.
func (*TableColumnCreate) SetCreatedAt ¶
func (tcc *TableColumnCreate) SetCreatedAt(t time.Time) *TableColumnCreate
SetCreatedAt sets the "created_at" field.
func (*TableColumnCreate) SetDescription ¶
func (tcc *TableColumnCreate) SetDescription(s string) *TableColumnCreate
SetDescription sets the "description" field.
func (*TableColumnCreate) SetFillMode ¶
func (tcc *TableColumnCreate) SetFillMode(tm tablecolumn.FillMode) *TableColumnCreate
SetFillMode sets the "fill_mode" field.
func (*TableColumnCreate) SetLinkedColumn ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetLinkedColumn(s string) *TableColumnCreate
SetLinkedColumn sets the "linked_column" field.
func (*TableColumnCreate) SetLinkedContextColumns ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetLinkedContextColumns(s []string) *TableColumnCreate
SetLinkedContextColumns sets the "linked_context_columns" field.
func (*TableColumnCreate) SetName ¶
func (tcc *TableColumnCreate) SetName(s string) *TableColumnCreate
SetName sets the "name" field.
func (*TableColumnCreate) SetNanoid ¶
func (tcc *TableColumnCreate) SetNanoid(s string) *TableColumnCreate
SetNanoid sets the "nanoid" field.
func (*TableColumnCreate) SetNillableContextLength ¶
func (tcc *TableColumnCreate) SetNillableContextLength(i *int) *TableColumnCreate
SetNillableContextLength sets the "context_length" field if the given value is not nil.
func (*TableColumnCreate) SetNillableCreatedAt ¶
func (tcc *TableColumnCreate) SetNillableCreatedAt(t *time.Time) *TableColumnCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TableColumnCreate) SetNillableDescription ¶
func (tcc *TableColumnCreate) SetNillableDescription(s *string) *TableColumnCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TableColumnCreate) SetNillableLinkedColumn ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetNillableLinkedColumn(s *string) *TableColumnCreate
SetNillableLinkedColumn sets the "linked_column" field if the given value is not nil.
func (*TableColumnCreate) SetNillableNanoid ¶
func (tcc *TableColumnCreate) SetNillableNanoid(s *string) *TableColumnCreate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*TableColumnCreate) SetNillableRandom ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetNillableRandom(b *bool) *TableColumnCreate
SetNillableRandom sets the "random" field if the given value is not nil.
func (*TableColumnCreate) SetNillableRepeat ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetNillableRepeat(i *int) *TableColumnCreate
SetNillableRepeat sets the "repeat" field if the given value is not nil.
func (*TableColumnCreate) SetNillableReplacement ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetNillableReplacement(b *bool) *TableColumnCreate
SetNillableReplacement sets the "replacement" field if the given value is not nil.
func (*TableColumnCreate) SetNillableSource ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetNillableSource(s *string) *TableColumnCreate
SetNillableSource sets the "source" field if the given value is not nil.
func (*TableColumnCreate) SetNillableSourceID ¶ added in v0.5.0
func (tcc *TableColumnCreate) SetNillableSourceID(s *string) *TableColumnCreate
SetNillableSourceID sets the "source_id" field if the given value is not nil.
func (*TableColumnCreate) SetNillableSourceType ¶ added in v0.5.0
func (tcc *TableColumnCreate) SetNillableSourceType(tt *tablecolumn.SourceType) *TableColumnCreate
SetNillableSourceType sets the "source_type" field if the given value is not nil.
func (*TableColumnCreate) SetNillableUpdatedAt ¶
func (tcc *TableColumnCreate) SetNillableUpdatedAt(t *time.Time) *TableColumnCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*TableColumnCreate) SetOptions ¶ added in v0.5.0
func (tcc *TableColumnCreate) SetOptions(s []string) *TableColumnCreate
SetOptions sets the "options" field.
func (*TableColumnCreate) SetRandom ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetRandom(b bool) *TableColumnCreate
SetRandom sets the "random" field.
func (*TableColumnCreate) SetRepeat ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetRepeat(i int) *TableColumnCreate
SetRepeat sets the "repeat" field.
func (*TableColumnCreate) SetReplacement ¶ added in v0.0.8
func (tcc *TableColumnCreate) SetReplacement(b bool) *TableColumnCreate
SetReplacement sets the "replacement" field.
func (*TableColumnCreate) SetSource ¶
func (tcc *TableColumnCreate) SetSource(s string) *TableColumnCreate
SetSource sets the "source" field.
func (*TableColumnCreate) SetSourceID ¶ added in v0.5.0
func (tcc *TableColumnCreate) SetSourceID(s string) *TableColumnCreate
SetSourceID sets the "source_id" field.
func (*TableColumnCreate) SetSourceType ¶ added in v0.5.0
func (tcc *TableColumnCreate) SetSourceType(tt tablecolumn.SourceType) *TableColumnCreate
SetSourceType sets the "source_type" field.
func (*TableColumnCreate) SetTableID ¶
func (tcc *TableColumnCreate) SetTableID(i int) *TableColumnCreate
SetTableID sets the "table_id" field.
func (*TableColumnCreate) SetTablemeta ¶
func (tcc *TableColumnCreate) SetTablemeta(t *TableMeta) *TableColumnCreate
SetTablemeta sets the "tablemeta" edge to the TableMeta entity.
func (*TableColumnCreate) SetTablemetaID ¶
func (tcc *TableColumnCreate) SetTablemetaID(id int) *TableColumnCreate
SetTablemetaID sets the "tablemeta" edge to the TableMeta entity by ID.
func (*TableColumnCreate) SetType ¶
func (tcc *TableColumnCreate) SetType(t tablecolumn.Type) *TableColumnCreate
SetType sets the "type" field.
func (*TableColumnCreate) SetUpdatedAt ¶
func (tcc *TableColumnCreate) SetUpdatedAt(t time.Time) *TableColumnCreate
SetUpdatedAt sets the "updated_at" field.
type TableColumnCreateBulk ¶
type TableColumnCreateBulk struct {
// contains filtered or unexported fields
}
TableColumnCreateBulk is the builder for creating many TableColumn entities in bulk.
func (*TableColumnCreateBulk) Exec ¶
func (tccb *TableColumnCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TableColumnCreateBulk) ExecX ¶
func (tccb *TableColumnCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableColumnCreateBulk) OnConflict ¶
func (tccb *TableColumnCreateBulk) OnConflict(opts ...sql.ConflictOption) *TableColumnUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TableColumn.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.TableColumnUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*TableColumnCreateBulk) OnConflictColumns ¶
func (tccb *TableColumnCreateBulk) OnConflictColumns(columns ...string) *TableColumnUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TableColumn.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TableColumnCreateBulk) Save ¶
func (tccb *TableColumnCreateBulk) Save(ctx context.Context) ([]*TableColumn, error)
Save creates the TableColumn entities in the database.
func (*TableColumnCreateBulk) SaveX ¶
func (tccb *TableColumnCreateBulk) SaveX(ctx context.Context) []*TableColumn
SaveX is like Save, but panics if an error occurs.
type TableColumnDelete ¶
type TableColumnDelete struct {
// contains filtered or unexported fields
}
TableColumnDelete is the builder for deleting a TableColumn entity.
func (*TableColumnDelete) Exec ¶
func (tcd *TableColumnDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TableColumnDelete) ExecX ¶
func (tcd *TableColumnDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TableColumnDelete) Where ¶
func (tcd *TableColumnDelete) Where(ps ...predicate.TableColumn) *TableColumnDelete
Where appends a list predicates to the TableColumnDelete builder.
type TableColumnDeleteOne ¶
type TableColumnDeleteOne struct {
// contains filtered or unexported fields
}
TableColumnDeleteOne is the builder for deleting a single TableColumn entity.
func (*TableColumnDeleteOne) Exec ¶
func (tcdo *TableColumnDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TableColumnDeleteOne) ExecX ¶
func (tcdo *TableColumnDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableColumnDeleteOne) Where ¶
func (tcdo *TableColumnDeleteOne) Where(ps ...predicate.TableColumn) *TableColumnDeleteOne
Where appends a list predicates to the TableColumnDelete builder.
type TableColumnEdges ¶
type TableColumnEdges struct {
// Tablemeta holds the value of the tablemeta edge.
Tablemeta *TableMeta `json:"tablemeta,omitempty"`
// contains filtered or unexported fields
}
TableColumnEdges holds the relations/edges for other nodes in the graph.
func (TableColumnEdges) TablemetaOrErr ¶
func (e TableColumnEdges) TablemetaOrErr() (*TableMeta, error)
TablemetaOrErr returns the Tablemeta value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TableColumnGroupBy ¶
type TableColumnGroupBy struct {
// contains filtered or unexported fields
}
TableColumnGroupBy is the group-by builder for TableColumn entities.
func (*TableColumnGroupBy) Aggregate ¶
func (tcgb *TableColumnGroupBy) Aggregate(fns ...AggregateFunc) *TableColumnGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TableColumnGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TableColumnGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TableColumnGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TableColumnGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TableColumnGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TableColumnGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TableColumnGroupBy) Scan ¶
func (tcgb *TableColumnGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TableColumnGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TableColumnMutation ¶
type TableColumnMutation struct {
// contains filtered or unexported fields
}
TableColumnMutation represents an operation that mutates the TableColumn nodes in the graph.
func (*TableColumnMutation) AddContextLength ¶
func (m *TableColumnMutation) AddContextLength(i int)
AddContextLength adds i to the "context_length" field.
func (*TableColumnMutation) AddField ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) AddRepeat ¶ added in v0.0.8
func (m *TableColumnMutation) AddRepeat(i int)
AddRepeat adds i to the "repeat" field.
func (*TableColumnMutation) AddedContextLength ¶
func (m *TableColumnMutation) AddedContextLength() (r int, exists bool)
AddedContextLength returns the value that was added to the "context_length" field in this mutation.
func (*TableColumnMutation) AddedEdges ¶
func (m *TableColumnMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TableColumnMutation) AddedField ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) AddedFields ¶
func (m *TableColumnMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TableColumnMutation) AddedIDs ¶
func (m *TableColumnMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TableColumnMutation) AddedRepeat ¶ added in v0.0.8
func (m *TableColumnMutation) AddedRepeat() (r int, exists bool)
AddedRepeat returns the value that was added to the "repeat" field in this mutation.
func (*TableColumnMutation) AppendLinkedContextColumns ¶ added in v0.0.8
func (m *TableColumnMutation) AppendLinkedContextColumns(s []string)
AppendLinkedContextColumns adds s to the "linked_context_columns" field.
func (*TableColumnMutation) AppendOptions ¶ added in v0.5.0
func (m *TableColumnMutation) AppendOptions(s []string)
AppendOptions adds s to the "options" field.
func (*TableColumnMutation) AppendedLinkedContextColumns ¶ added in v0.0.8
func (m *TableColumnMutation) AppendedLinkedContextColumns() ([]string, bool)
AppendedLinkedContextColumns returns the list of values that were appended to the "linked_context_columns" field in this mutation.
func (*TableColumnMutation) AppendedOptions ¶ added in v0.5.0
func (m *TableColumnMutation) AppendedOptions() ([]string, bool)
AppendedOptions returns the list of values that were appended to the "options" field in this mutation.
func (*TableColumnMutation) ClearCreatedAt ¶
func (m *TableColumnMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*TableColumnMutation) ClearDescription ¶
func (m *TableColumnMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*TableColumnMutation) ClearEdge ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) ClearField ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) ClearNanoid ¶
func (m *TableColumnMutation) ClearNanoid()
ClearNanoid clears the value of the "nanoid" field.
func (*TableColumnMutation) ClearOptions ¶ added in v0.5.0
func (m *TableColumnMutation) ClearOptions()
ClearOptions clears the value of the "options" field.
func (*TableColumnMutation) ClearSource ¶
func (m *TableColumnMutation) ClearSource()
ClearSource clears the value of the "source" field.
func (*TableColumnMutation) ClearSourceID ¶ added in v0.5.0
func (m *TableColumnMutation) ClearSourceID()
ClearSourceID clears the value of the "source_id" field.
func (*TableColumnMutation) ClearSourceType ¶ added in v0.5.0
func (m *TableColumnMutation) ClearSourceType()
ClearSourceType clears the value of the "source_type" field.
func (*TableColumnMutation) ClearTablemeta ¶
func (m *TableColumnMutation) ClearTablemeta()
ClearTablemeta clears the "tablemeta" edge to the TableMeta entity.
func (*TableColumnMutation) ClearUpdatedAt ¶
func (m *TableColumnMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableColumnMutation) ClearedEdges ¶
func (m *TableColumnMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TableColumnMutation) ClearedFields ¶
func (m *TableColumnMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TableColumnMutation) Client ¶
func (m TableColumnMutation) 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 (*TableColumnMutation) ContextLength ¶
func (m *TableColumnMutation) ContextLength() (r int, exists bool)
ContextLength returns the value of the "context_length" field in the mutation.
func (*TableColumnMutation) CreatedAt ¶
func (m *TableColumnMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TableColumnMutation) CreatedAtCleared ¶
func (m *TableColumnMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*TableColumnMutation) Description ¶
func (m *TableColumnMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*TableColumnMutation) DescriptionCleared ¶
func (m *TableColumnMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*TableColumnMutation) EdgeCleared ¶
func (m *TableColumnMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TableColumnMutation) Field ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) FieldCleared ¶
func (m *TableColumnMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TableColumnMutation) Fields ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) FillMode ¶
func (m *TableColumnMutation) FillMode() (r tablecolumn.FillMode, exists bool)
FillMode returns the value of the "fill_mode" field in the mutation.
func (*TableColumnMutation) GetType ¶
func (m *TableColumnMutation) GetType() (r tablecolumn.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*TableColumnMutation) ID ¶
func (m *TableColumnMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TableColumnMutation) IDs ¶
func (m *TableColumnMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TableColumnMutation) LinkedColumn ¶ added in v0.0.8
func (m *TableColumnMutation) LinkedColumn() (r string, exists bool)
LinkedColumn returns the value of the "linked_column" field in the mutation.
func (*TableColumnMutation) LinkedContextColumns ¶ added in v0.0.8
func (m *TableColumnMutation) LinkedContextColumns() (r []string, exists bool)
LinkedContextColumns returns the value of the "linked_context_columns" field in the mutation.
func (*TableColumnMutation) Name ¶
func (m *TableColumnMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TableColumnMutation) Nanoid ¶
func (m *TableColumnMutation) Nanoid() (r string, exists bool)
Nanoid returns the value of the "nanoid" field in the mutation.
func (*TableColumnMutation) NanoidCleared ¶
func (m *TableColumnMutation) NanoidCleared() bool
NanoidCleared returns if the "nanoid" field was cleared in this mutation.
func (*TableColumnMutation) OldContextLength ¶
func (m *TableColumnMutation) OldContextLength(ctx context.Context) (v int, err error)
OldContextLength returns the old "context_length" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldDescription ¶
func (m *TableColumnMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) 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 (*TableColumnMutation) OldFillMode ¶
func (m *TableColumnMutation) OldFillMode(ctx context.Context) (v tablecolumn.FillMode, err error)
OldFillMode returns the old "fill_mode" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldLinkedColumn ¶ added in v0.0.8
func (m *TableColumnMutation) OldLinkedColumn(ctx context.Context) (v string, err error)
OldLinkedColumn returns the old "linked_column" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldLinkedContextColumns ¶ added in v0.0.8
func (m *TableColumnMutation) OldLinkedContextColumns(ctx context.Context) (v []string, err error)
OldLinkedContextColumns returns the old "linked_context_columns" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldName ¶
func (m *TableColumnMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldNanoid ¶
func (m *TableColumnMutation) OldNanoid(ctx context.Context) (v string, err error)
OldNanoid returns the old "nanoid" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldOptions ¶ added in v0.5.0
func (m *TableColumnMutation) OldOptions(ctx context.Context) (v []string, err error)
OldOptions returns the old "options" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldRandom ¶ added in v0.0.8
func (m *TableColumnMutation) OldRandom(ctx context.Context) (v bool, err error)
OldRandom returns the old "random" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldRepeat ¶ added in v0.0.8
func (m *TableColumnMutation) OldRepeat(ctx context.Context) (v int, err error)
OldRepeat returns the old "repeat" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldReplacement ¶ added in v0.0.8
func (m *TableColumnMutation) OldReplacement(ctx context.Context) (v bool, err error)
OldReplacement returns the old "replacement" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldSource ¶
func (m *TableColumnMutation) OldSource(ctx context.Context) (v string, err error)
OldSource returns the old "source" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldSourceID ¶ added in v0.5.0
func (m *TableColumnMutation) OldSourceID(ctx context.Context) (v string, err error)
OldSourceID returns the old "source_id" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldSourceType ¶ added in v0.5.0
func (m *TableColumnMutation) OldSourceType(ctx context.Context) (v tablecolumn.SourceType, err error)
OldSourceType returns the old "source_type" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldTableID ¶
func (m *TableColumnMutation) OldTableID(ctx context.Context) (v int, err error)
OldTableID returns the old "table_id" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldType ¶
func (m *TableColumnMutation) OldType(ctx context.Context) (v tablecolumn.Type, err error)
OldType returns the old "type" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the TableColumn entity. If the TableColumn 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 (*TableColumnMutation) Op ¶
func (m *TableColumnMutation) Op() Op
Op returns the operation name.
func (*TableColumnMutation) Options ¶ added in v0.5.0
func (m *TableColumnMutation) Options() (r []string, exists bool)
Options returns the value of the "options" field in the mutation.
func (*TableColumnMutation) OptionsCleared ¶ added in v0.5.0
func (m *TableColumnMutation) OptionsCleared() bool
OptionsCleared returns if the "options" field was cleared in this mutation.
func (*TableColumnMutation) Random ¶ added in v0.0.8
func (m *TableColumnMutation) Random() (r bool, exists bool)
Random returns the value of the "random" field in the mutation.
func (*TableColumnMutation) RemovedEdges ¶
func (m *TableColumnMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TableColumnMutation) RemovedIDs ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) Repeat ¶ added in v0.0.8
func (m *TableColumnMutation) Repeat() (r int, exists bool)
Repeat returns the value of the "repeat" field in the mutation.
func (*TableColumnMutation) Replacement ¶ added in v0.0.8
func (m *TableColumnMutation) Replacement() (r bool, exists bool)
Replacement returns the value of the "replacement" field in the mutation.
func (*TableColumnMutation) ResetContextLength ¶
func (m *TableColumnMutation) ResetContextLength()
ResetContextLength resets all changes to the "context_length" field.
func (*TableColumnMutation) ResetCreatedAt ¶
func (m *TableColumnMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TableColumnMutation) ResetDescription ¶
func (m *TableColumnMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*TableColumnMutation) ResetEdge ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) ResetField ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) ResetFillMode ¶
func (m *TableColumnMutation) ResetFillMode()
ResetFillMode resets all changes to the "fill_mode" field.
func (*TableColumnMutation) ResetLinkedColumn ¶ added in v0.0.8
func (m *TableColumnMutation) ResetLinkedColumn()
ResetLinkedColumn resets all changes to the "linked_column" field.
func (*TableColumnMutation) ResetLinkedContextColumns ¶ added in v0.0.8
func (m *TableColumnMutation) ResetLinkedContextColumns()
ResetLinkedContextColumns resets all changes to the "linked_context_columns" field.
func (*TableColumnMutation) ResetName ¶
func (m *TableColumnMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TableColumnMutation) ResetNanoid ¶
func (m *TableColumnMutation) ResetNanoid()
ResetNanoid resets all changes to the "nanoid" field.
func (*TableColumnMutation) ResetOptions ¶ added in v0.5.0
func (m *TableColumnMutation) ResetOptions()
ResetOptions resets all changes to the "options" field.
func (*TableColumnMutation) ResetRandom ¶ added in v0.0.8
func (m *TableColumnMutation) ResetRandom()
ResetRandom resets all changes to the "random" field.
func (*TableColumnMutation) ResetRepeat ¶ added in v0.0.8
func (m *TableColumnMutation) ResetRepeat()
ResetRepeat resets all changes to the "repeat" field.
func (*TableColumnMutation) ResetReplacement ¶ added in v0.0.8
func (m *TableColumnMutation) ResetReplacement()
ResetReplacement resets all changes to the "replacement" field.
func (*TableColumnMutation) ResetSource ¶
func (m *TableColumnMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (*TableColumnMutation) ResetSourceID ¶ added in v0.5.0
func (m *TableColumnMutation) ResetSourceID()
ResetSourceID resets all changes to the "source_id" field.
func (*TableColumnMutation) ResetSourceType ¶ added in v0.5.0
func (m *TableColumnMutation) ResetSourceType()
ResetSourceType resets all changes to the "source_type" field.
func (*TableColumnMutation) ResetTableID ¶
func (m *TableColumnMutation) ResetTableID()
ResetTableID resets all changes to the "table_id" field.
func (*TableColumnMutation) ResetTablemeta ¶
func (m *TableColumnMutation) ResetTablemeta()
ResetTablemeta resets all changes to the "tablemeta" edge.
func (*TableColumnMutation) ResetType ¶
func (m *TableColumnMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*TableColumnMutation) ResetUpdatedAt ¶
func (m *TableColumnMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TableColumnMutation) SetContextLength ¶
func (m *TableColumnMutation) SetContextLength(i int)
SetContextLength sets the "context_length" field.
func (*TableColumnMutation) SetCreatedAt ¶
func (m *TableColumnMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TableColumnMutation) SetDescription ¶
func (m *TableColumnMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*TableColumnMutation) SetField ¶
func (m *TableColumnMutation) 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 (*TableColumnMutation) SetFillMode ¶
func (m *TableColumnMutation) SetFillMode(tm tablecolumn.FillMode)
SetFillMode sets the "fill_mode" field.
func (*TableColumnMutation) SetLinkedColumn ¶ added in v0.0.8
func (m *TableColumnMutation) SetLinkedColumn(s string)
SetLinkedColumn sets the "linked_column" field.
func (*TableColumnMutation) SetLinkedContextColumns ¶ added in v0.0.8
func (m *TableColumnMutation) SetLinkedContextColumns(s []string)
SetLinkedContextColumns sets the "linked_context_columns" field.
func (*TableColumnMutation) SetName ¶
func (m *TableColumnMutation) SetName(s string)
SetName sets the "name" field.
func (*TableColumnMutation) SetNanoid ¶
func (m *TableColumnMutation) SetNanoid(s string)
SetNanoid sets the "nanoid" field.
func (*TableColumnMutation) SetOp ¶
func (m *TableColumnMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TableColumnMutation) SetOptions ¶ added in v0.5.0
func (m *TableColumnMutation) SetOptions(s []string)
SetOptions sets the "options" field.
func (*TableColumnMutation) SetRandom ¶ added in v0.0.8
func (m *TableColumnMutation) SetRandom(b bool)
SetRandom sets the "random" field.
func (*TableColumnMutation) SetRepeat ¶ added in v0.0.8
func (m *TableColumnMutation) SetRepeat(i int)
SetRepeat sets the "repeat" field.
func (*TableColumnMutation) SetReplacement ¶ added in v0.0.8
func (m *TableColumnMutation) SetReplacement(b bool)
SetReplacement sets the "replacement" field.
func (*TableColumnMutation) SetSource ¶
func (m *TableColumnMutation) SetSource(s string)
SetSource sets the "source" field.
func (*TableColumnMutation) SetSourceID ¶ added in v0.5.0
func (m *TableColumnMutation) SetSourceID(s string)
SetSourceID sets the "source_id" field.
func (*TableColumnMutation) SetSourceType ¶ added in v0.5.0
func (m *TableColumnMutation) SetSourceType(tt tablecolumn.SourceType)
SetSourceType sets the "source_type" field.
func (*TableColumnMutation) SetTableID ¶
func (m *TableColumnMutation) SetTableID(i int)
SetTableID sets the "table_id" field.
func (*TableColumnMutation) SetTablemetaID ¶
func (m *TableColumnMutation) SetTablemetaID(id int)
SetTablemetaID sets the "tablemeta" edge to the TableMeta entity by id.
func (*TableColumnMutation) SetType ¶
func (m *TableColumnMutation) SetType(t tablecolumn.Type)
SetType sets the "type" field.
func (*TableColumnMutation) SetUpdatedAt ¶
func (m *TableColumnMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*TableColumnMutation) Source ¶
func (m *TableColumnMutation) Source() (r string, exists bool)
Source returns the value of the "source" field in the mutation.
func (*TableColumnMutation) SourceCleared ¶
func (m *TableColumnMutation) SourceCleared() bool
SourceCleared returns if the "source" field was cleared in this mutation.
func (*TableColumnMutation) SourceID ¶ added in v0.5.0
func (m *TableColumnMutation) SourceID() (r string, exists bool)
SourceID returns the value of the "source_id" field in the mutation.
func (*TableColumnMutation) SourceIDCleared ¶ added in v0.5.0
func (m *TableColumnMutation) SourceIDCleared() bool
SourceIDCleared returns if the "source_id" field was cleared in this mutation.
func (*TableColumnMutation) SourceType ¶ added in v0.5.0
func (m *TableColumnMutation) SourceType() (r tablecolumn.SourceType, exists bool)
SourceType returns the value of the "source_type" field in the mutation.
func (*TableColumnMutation) SourceTypeCleared ¶ added in v0.5.0
func (m *TableColumnMutation) SourceTypeCleared() bool
SourceTypeCleared returns if the "source_type" field was cleared in this mutation.
func (*TableColumnMutation) TableID ¶
func (m *TableColumnMutation) TableID() (r int, exists bool)
TableID returns the value of the "table_id" field in the mutation.
func (*TableColumnMutation) TablemetaCleared ¶
func (m *TableColumnMutation) TablemetaCleared() bool
TablemetaCleared reports if the "tablemeta" edge to the TableMeta entity was cleared.
func (*TableColumnMutation) TablemetaID ¶
func (m *TableColumnMutation) TablemetaID() (id int, exists bool)
TablemetaID returns the "tablemeta" edge ID in the mutation.
func (*TableColumnMutation) TablemetaIDs ¶
func (m *TableColumnMutation) TablemetaIDs() (ids []int)
TablemetaIDs returns the "tablemeta" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TablemetaID instead. It exists only for internal usage by the builders.
func (TableColumnMutation) Tx ¶
func (m TableColumnMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TableColumnMutation) Type ¶
func (m *TableColumnMutation) Type() string
Type returns the node type of this mutation (TableColumn).
func (*TableColumnMutation) UpdatedAt ¶
func (m *TableColumnMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*TableColumnMutation) UpdatedAtCleared ¶
func (m *TableColumnMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*TableColumnMutation) Where ¶
func (m *TableColumnMutation) Where(ps ...predicate.TableColumn)
Where appends a list predicates to the TableColumnMutation builder.
func (*TableColumnMutation) WhereP ¶
func (m *TableColumnMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TableColumnMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TableColumnQuery ¶
type TableColumnQuery struct {
// contains filtered or unexported fields
}
TableColumnQuery is the builder for querying TableColumn entities.
func (*TableColumnQuery) Aggregate ¶
func (tcq *TableColumnQuery) Aggregate(fns ...AggregateFunc) *TableColumnSelect
Aggregate returns a TableColumnSelect configured with the given aggregations.
func (*TableColumnQuery) All ¶
func (tcq *TableColumnQuery) All(ctx context.Context) ([]*TableColumn, error)
All executes the query and returns a list of TableColumns.
func (*TableColumnQuery) AllX ¶
func (tcq *TableColumnQuery) AllX(ctx context.Context) []*TableColumn
AllX is like All, but panics if an error occurs.
func (*TableColumnQuery) Clone ¶
func (tcq *TableColumnQuery) Clone() *TableColumnQuery
Clone returns a duplicate of the TableColumnQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TableColumnQuery) Count ¶
func (tcq *TableColumnQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TableColumnQuery) CountX ¶
func (tcq *TableColumnQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TableColumnQuery) Exist ¶
func (tcq *TableColumnQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TableColumnQuery) ExistX ¶
func (tcq *TableColumnQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TableColumnQuery) First ¶
func (tcq *TableColumnQuery) First(ctx context.Context) (*TableColumn, error)
First returns the first TableColumn entity from the query. Returns a *NotFoundError when no TableColumn was found.
func (*TableColumnQuery) FirstID ¶
func (tcq *TableColumnQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TableColumn ID from the query. Returns a *NotFoundError when no TableColumn ID was found.
func (*TableColumnQuery) FirstIDX ¶
func (tcq *TableColumnQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TableColumnQuery) FirstX ¶
func (tcq *TableColumnQuery) FirstX(ctx context.Context) *TableColumn
FirstX is like First, but panics if an error occurs.
func (*TableColumnQuery) ForShare ¶
func (tcq *TableColumnQuery) ForShare(opts ...sql.LockOption) *TableColumnQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*TableColumnQuery) ForUpdate ¶
func (tcq *TableColumnQuery) ForUpdate(opts ...sql.LockOption) *TableColumnQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*TableColumnQuery) GroupBy ¶
func (tcq *TableColumnQuery) GroupBy(field string, fields ...string) *TableColumnGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.TableColumn.Query().
GroupBy(tablecolumn.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*TableColumnQuery) IDs ¶
func (tcq *TableColumnQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of TableColumn IDs.
func (*TableColumnQuery) IDsX ¶
func (tcq *TableColumnQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TableColumnQuery) Limit ¶
func (tcq *TableColumnQuery) Limit(limit int) *TableColumnQuery
Limit the number of records to be returned by this query.
func (*TableColumnQuery) Modify ¶
func (tcq *TableColumnQuery) Modify(modifiers ...func(s *sql.Selector)) *TableColumnSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TableColumnQuery) Offset ¶
func (tcq *TableColumnQuery) Offset(offset int) *TableColumnQuery
Offset to start from.
func (*TableColumnQuery) Only ¶
func (tcq *TableColumnQuery) Only(ctx context.Context) (*TableColumn, error)
Only returns a single TableColumn entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TableColumn entity is found. Returns a *NotFoundError when no TableColumn entities are found.
func (*TableColumnQuery) OnlyID ¶
func (tcq *TableColumnQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TableColumn ID in the query. Returns a *NotSingularError when more than one TableColumn ID is found. Returns a *NotFoundError when no entities are found.
func (*TableColumnQuery) OnlyIDX ¶
func (tcq *TableColumnQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TableColumnQuery) OnlyX ¶
func (tcq *TableColumnQuery) OnlyX(ctx context.Context) *TableColumn
OnlyX is like Only, but panics if an error occurs.
func (*TableColumnQuery) Order ¶
func (tcq *TableColumnQuery) Order(o ...tablecolumn.OrderOption) *TableColumnQuery
Order specifies how the records should be ordered.
func (*TableColumnQuery) QueryTablemeta ¶
func (tcq *TableColumnQuery) QueryTablemeta() *TableMetaQuery
QueryTablemeta chains the current query on the "tablemeta" edge.
func (*TableColumnQuery) Select ¶
func (tcq *TableColumnQuery) Select(fields ...string) *TableColumnSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.TableColumn.Query().
Select(tablecolumn.FieldCreatedAt).
Scan(ctx, &v)
func (*TableColumnQuery) Unique ¶
func (tcq *TableColumnQuery) Unique(unique bool) *TableColumnQuery
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 (*TableColumnQuery) Where ¶
func (tcq *TableColumnQuery) Where(ps ...predicate.TableColumn) *TableColumnQuery
Where adds a new predicate for the TableColumnQuery builder.
func (*TableColumnQuery) WithTablemeta ¶
func (tcq *TableColumnQuery) WithTablemeta(opts ...func(*TableMetaQuery)) *TableColumnQuery
WithTablemeta tells the query-builder to eager-load the nodes that are connected to the "tablemeta" edge. The optional arguments are used to configure the query builder of the edge.
type TableColumnSelect ¶
type TableColumnSelect struct {
*TableColumnQuery
// contains filtered or unexported fields
}
TableColumnSelect is the builder for selecting fields of TableColumn entities.
func (*TableColumnSelect) Aggregate ¶
func (tcs *TableColumnSelect) Aggregate(fns ...AggregateFunc) *TableColumnSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TableColumnSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TableColumnSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TableColumnSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TableColumnSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TableColumnSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TableColumnSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TableColumnSelect) Modify ¶
func (tcs *TableColumnSelect) Modify(modifiers ...func(s *sql.Selector)) *TableColumnSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TableColumnSelect) Scan ¶
func (tcs *TableColumnSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TableColumnSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TableColumnUpdate ¶
type TableColumnUpdate struct {
// contains filtered or unexported fields
}
TableColumnUpdate is the builder for updating TableColumn entities.
func (*TableColumnUpdate) AddContextLength ¶
func (tcu *TableColumnUpdate) AddContextLength(i int) *TableColumnUpdate
AddContextLength adds i to the "context_length" field.
func (*TableColumnUpdate) AddRepeat ¶ added in v0.0.8
func (tcu *TableColumnUpdate) AddRepeat(i int) *TableColumnUpdate
AddRepeat adds i to the "repeat" field.
func (*TableColumnUpdate) AppendLinkedContextColumns ¶ added in v0.0.8
func (tcu *TableColumnUpdate) AppendLinkedContextColumns(s []string) *TableColumnUpdate
AppendLinkedContextColumns appends s to the "linked_context_columns" field.
func (*TableColumnUpdate) AppendOptions ¶ added in v0.5.0
func (tcu *TableColumnUpdate) AppendOptions(s []string) *TableColumnUpdate
AppendOptions appends s to the "options" field.
func (*TableColumnUpdate) ClearDescription ¶
func (tcu *TableColumnUpdate) ClearDescription() *TableColumnUpdate
ClearDescription clears the value of the "description" field.
func (*TableColumnUpdate) ClearNanoid ¶
func (tcu *TableColumnUpdate) ClearNanoid() *TableColumnUpdate
ClearNanoid clears the value of the "nanoid" field.
func (*TableColumnUpdate) ClearOptions ¶ added in v0.5.0
func (tcu *TableColumnUpdate) ClearOptions() *TableColumnUpdate
ClearOptions clears the value of the "options" field.
func (*TableColumnUpdate) ClearSource ¶
func (tcu *TableColumnUpdate) ClearSource() *TableColumnUpdate
ClearSource clears the value of the "source" field.
func (*TableColumnUpdate) ClearSourceID ¶ added in v0.5.0
func (tcu *TableColumnUpdate) ClearSourceID() *TableColumnUpdate
ClearSourceID clears the value of the "source_id" field.
func (*TableColumnUpdate) ClearSourceType ¶ added in v0.5.0
func (tcu *TableColumnUpdate) ClearSourceType() *TableColumnUpdate
ClearSourceType clears the value of the "source_type" field.
func (*TableColumnUpdate) ClearTablemeta ¶
func (tcu *TableColumnUpdate) ClearTablemeta() *TableColumnUpdate
ClearTablemeta clears the "tablemeta" edge to the TableMeta entity.
func (*TableColumnUpdate) ClearUpdatedAt ¶
func (tcu *TableColumnUpdate) ClearUpdatedAt() *TableColumnUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableColumnUpdate) Exec ¶
func (tcu *TableColumnUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TableColumnUpdate) ExecX ¶
func (tcu *TableColumnUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableColumnUpdate) Modify ¶
func (tcu *TableColumnUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableColumnUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TableColumnUpdate) Mutation ¶
func (tcu *TableColumnUpdate) Mutation() *TableColumnMutation
Mutation returns the TableColumnMutation object of the builder.
func (*TableColumnUpdate) Save ¶
func (tcu *TableColumnUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TableColumnUpdate) SaveX ¶
func (tcu *TableColumnUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TableColumnUpdate) SetContextLength ¶
func (tcu *TableColumnUpdate) SetContextLength(i int) *TableColumnUpdate
SetContextLength sets the "context_length" field.
func (*TableColumnUpdate) SetDescription ¶
func (tcu *TableColumnUpdate) SetDescription(s string) *TableColumnUpdate
SetDescription sets the "description" field.
func (*TableColumnUpdate) SetFillMode ¶
func (tcu *TableColumnUpdate) SetFillMode(tm tablecolumn.FillMode) *TableColumnUpdate
SetFillMode sets the "fill_mode" field.
func (*TableColumnUpdate) SetLinkedColumn ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetLinkedColumn(s string) *TableColumnUpdate
SetLinkedColumn sets the "linked_column" field.
func (*TableColumnUpdate) SetLinkedContextColumns ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetLinkedContextColumns(s []string) *TableColumnUpdate
SetLinkedContextColumns sets the "linked_context_columns" field.
func (*TableColumnUpdate) SetName ¶
func (tcu *TableColumnUpdate) SetName(s string) *TableColumnUpdate
SetName sets the "name" field.
func (*TableColumnUpdate) SetNanoid ¶
func (tcu *TableColumnUpdate) SetNanoid(s string) *TableColumnUpdate
SetNanoid sets the "nanoid" field.
func (*TableColumnUpdate) SetNillableContextLength ¶
func (tcu *TableColumnUpdate) SetNillableContextLength(i *int) *TableColumnUpdate
SetNillableContextLength sets the "context_length" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableDescription ¶
func (tcu *TableColumnUpdate) SetNillableDescription(s *string) *TableColumnUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableFillMode ¶
func (tcu *TableColumnUpdate) SetNillableFillMode(tm *tablecolumn.FillMode) *TableColumnUpdate
SetNillableFillMode sets the "fill_mode" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableLinkedColumn ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetNillableLinkedColumn(s *string) *TableColumnUpdate
SetNillableLinkedColumn sets the "linked_column" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableName ¶
func (tcu *TableColumnUpdate) SetNillableName(s *string) *TableColumnUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableNanoid ¶
func (tcu *TableColumnUpdate) SetNillableNanoid(s *string) *TableColumnUpdate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableRandom ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetNillableRandom(b *bool) *TableColumnUpdate
SetNillableRandom sets the "random" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableRepeat ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetNillableRepeat(i *int) *TableColumnUpdate
SetNillableRepeat sets the "repeat" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableReplacement ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetNillableReplacement(b *bool) *TableColumnUpdate
SetNillableReplacement sets the "replacement" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableSource ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetNillableSource(s *string) *TableColumnUpdate
SetNillableSource sets the "source" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableSourceID ¶ added in v0.5.0
func (tcu *TableColumnUpdate) SetNillableSourceID(s *string) *TableColumnUpdate
SetNillableSourceID sets the "source_id" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableSourceType ¶ added in v0.5.0
func (tcu *TableColumnUpdate) SetNillableSourceType(tt *tablecolumn.SourceType) *TableColumnUpdate
SetNillableSourceType sets the "source_type" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableTableID ¶
func (tcu *TableColumnUpdate) SetNillableTableID(i *int) *TableColumnUpdate
SetNillableTableID sets the "table_id" field if the given value is not nil.
func (*TableColumnUpdate) SetNillableType ¶
func (tcu *TableColumnUpdate) SetNillableType(t *tablecolumn.Type) *TableColumnUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*TableColumnUpdate) SetOptions ¶ added in v0.5.0
func (tcu *TableColumnUpdate) SetOptions(s []string) *TableColumnUpdate
SetOptions sets the "options" field.
func (*TableColumnUpdate) SetRandom ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetRandom(b bool) *TableColumnUpdate
SetRandom sets the "random" field.
func (*TableColumnUpdate) SetRepeat ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetRepeat(i int) *TableColumnUpdate
SetRepeat sets the "repeat" field.
func (*TableColumnUpdate) SetReplacement ¶ added in v0.0.8
func (tcu *TableColumnUpdate) SetReplacement(b bool) *TableColumnUpdate
SetReplacement sets the "replacement" field.
func (*TableColumnUpdate) SetSource ¶
func (tcu *TableColumnUpdate) SetSource(s string) *TableColumnUpdate
SetSource sets the "source" field.
func (*TableColumnUpdate) SetSourceID ¶ added in v0.5.0
func (tcu *TableColumnUpdate) SetSourceID(s string) *TableColumnUpdate
SetSourceID sets the "source_id" field.
func (*TableColumnUpdate) SetSourceType ¶ added in v0.5.0
func (tcu *TableColumnUpdate) SetSourceType(tt tablecolumn.SourceType) *TableColumnUpdate
SetSourceType sets the "source_type" field.
func (*TableColumnUpdate) SetTableID ¶
func (tcu *TableColumnUpdate) SetTableID(i int) *TableColumnUpdate
SetTableID sets the "table_id" field.
func (*TableColumnUpdate) SetTablemeta ¶
func (tcu *TableColumnUpdate) SetTablemeta(t *TableMeta) *TableColumnUpdate
SetTablemeta sets the "tablemeta" edge to the TableMeta entity.
func (*TableColumnUpdate) SetTablemetaID ¶
func (tcu *TableColumnUpdate) SetTablemetaID(id int) *TableColumnUpdate
SetTablemetaID sets the "tablemeta" edge to the TableMeta entity by ID.
func (*TableColumnUpdate) SetType ¶
func (tcu *TableColumnUpdate) SetType(t tablecolumn.Type) *TableColumnUpdate
SetType sets the "type" field.
func (*TableColumnUpdate) SetUpdatedAt ¶
func (tcu *TableColumnUpdate) SetUpdatedAt(t time.Time) *TableColumnUpdate
SetUpdatedAt sets the "updated_at" field.
func (*TableColumnUpdate) Where ¶
func (tcu *TableColumnUpdate) Where(ps ...predicate.TableColumn) *TableColumnUpdate
Where appends a list predicates to the TableColumnUpdate builder.
type TableColumnUpdateOne ¶
type TableColumnUpdateOne struct {
// contains filtered or unexported fields
}
TableColumnUpdateOne is the builder for updating a single TableColumn entity.
func (*TableColumnUpdateOne) AddContextLength ¶
func (tcuo *TableColumnUpdateOne) AddContextLength(i int) *TableColumnUpdateOne
AddContextLength adds i to the "context_length" field.
func (*TableColumnUpdateOne) AddRepeat ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) AddRepeat(i int) *TableColumnUpdateOne
AddRepeat adds i to the "repeat" field.
func (*TableColumnUpdateOne) AppendLinkedContextColumns ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) AppendLinkedContextColumns(s []string) *TableColumnUpdateOne
AppendLinkedContextColumns appends s to the "linked_context_columns" field.
func (*TableColumnUpdateOne) AppendOptions ¶ added in v0.5.0
func (tcuo *TableColumnUpdateOne) AppendOptions(s []string) *TableColumnUpdateOne
AppendOptions appends s to the "options" field.
func (*TableColumnUpdateOne) ClearDescription ¶
func (tcuo *TableColumnUpdateOne) ClearDescription() *TableColumnUpdateOne
ClearDescription clears the value of the "description" field.
func (*TableColumnUpdateOne) ClearNanoid ¶
func (tcuo *TableColumnUpdateOne) ClearNanoid() *TableColumnUpdateOne
ClearNanoid clears the value of the "nanoid" field.
func (*TableColumnUpdateOne) ClearOptions ¶ added in v0.5.0
func (tcuo *TableColumnUpdateOne) ClearOptions() *TableColumnUpdateOne
ClearOptions clears the value of the "options" field.
func (*TableColumnUpdateOne) ClearSource ¶
func (tcuo *TableColumnUpdateOne) ClearSource() *TableColumnUpdateOne
ClearSource clears the value of the "source" field.
func (*TableColumnUpdateOne) ClearSourceID ¶ added in v0.5.0
func (tcuo *TableColumnUpdateOne) ClearSourceID() *TableColumnUpdateOne
ClearSourceID clears the value of the "source_id" field.
func (*TableColumnUpdateOne) ClearSourceType ¶ added in v0.5.0
func (tcuo *TableColumnUpdateOne) ClearSourceType() *TableColumnUpdateOne
ClearSourceType clears the value of the "source_type" field.
func (*TableColumnUpdateOne) ClearTablemeta ¶
func (tcuo *TableColumnUpdateOne) ClearTablemeta() *TableColumnUpdateOne
ClearTablemeta clears the "tablemeta" edge to the TableMeta entity.
func (*TableColumnUpdateOne) ClearUpdatedAt ¶
func (tcuo *TableColumnUpdateOne) ClearUpdatedAt() *TableColumnUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableColumnUpdateOne) Exec ¶
func (tcuo *TableColumnUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TableColumnUpdateOne) ExecX ¶
func (tcuo *TableColumnUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableColumnUpdateOne) Modify ¶
func (tcuo *TableColumnUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableColumnUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TableColumnUpdateOne) Mutation ¶
func (tcuo *TableColumnUpdateOne) Mutation() *TableColumnMutation
Mutation returns the TableColumnMutation object of the builder.
func (*TableColumnUpdateOne) Save ¶
func (tcuo *TableColumnUpdateOne) Save(ctx context.Context) (*TableColumn, error)
Save executes the query and returns the updated TableColumn entity.
func (*TableColumnUpdateOne) SaveX ¶
func (tcuo *TableColumnUpdateOne) SaveX(ctx context.Context) *TableColumn
SaveX is like Save, but panics if an error occurs.
func (*TableColumnUpdateOne) Select ¶
func (tcuo *TableColumnUpdateOne) Select(field string, fields ...string) *TableColumnUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TableColumnUpdateOne) SetContextLength ¶
func (tcuo *TableColumnUpdateOne) SetContextLength(i int) *TableColumnUpdateOne
SetContextLength sets the "context_length" field.
func (*TableColumnUpdateOne) SetDescription ¶
func (tcuo *TableColumnUpdateOne) SetDescription(s string) *TableColumnUpdateOne
SetDescription sets the "description" field.
func (*TableColumnUpdateOne) SetFillMode ¶
func (tcuo *TableColumnUpdateOne) SetFillMode(tm tablecolumn.FillMode) *TableColumnUpdateOne
SetFillMode sets the "fill_mode" field.
func (*TableColumnUpdateOne) SetLinkedColumn ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetLinkedColumn(s string) *TableColumnUpdateOne
SetLinkedColumn sets the "linked_column" field.
func (*TableColumnUpdateOne) SetLinkedContextColumns ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetLinkedContextColumns(s []string) *TableColumnUpdateOne
SetLinkedContextColumns sets the "linked_context_columns" field.
func (*TableColumnUpdateOne) SetName ¶
func (tcuo *TableColumnUpdateOne) SetName(s string) *TableColumnUpdateOne
SetName sets the "name" field.
func (*TableColumnUpdateOne) SetNanoid ¶
func (tcuo *TableColumnUpdateOne) SetNanoid(s string) *TableColumnUpdateOne
SetNanoid sets the "nanoid" field.
func (*TableColumnUpdateOne) SetNillableContextLength ¶
func (tcuo *TableColumnUpdateOne) SetNillableContextLength(i *int) *TableColumnUpdateOne
SetNillableContextLength sets the "context_length" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableDescription ¶
func (tcuo *TableColumnUpdateOne) SetNillableDescription(s *string) *TableColumnUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableFillMode ¶
func (tcuo *TableColumnUpdateOne) SetNillableFillMode(tm *tablecolumn.FillMode) *TableColumnUpdateOne
SetNillableFillMode sets the "fill_mode" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableLinkedColumn ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetNillableLinkedColumn(s *string) *TableColumnUpdateOne
SetNillableLinkedColumn sets the "linked_column" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableName ¶
func (tcuo *TableColumnUpdateOne) SetNillableName(s *string) *TableColumnUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableNanoid ¶
func (tcuo *TableColumnUpdateOne) SetNillableNanoid(s *string) *TableColumnUpdateOne
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableRandom ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetNillableRandom(b *bool) *TableColumnUpdateOne
SetNillableRandom sets the "random" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableRepeat ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetNillableRepeat(i *int) *TableColumnUpdateOne
SetNillableRepeat sets the "repeat" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableReplacement ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetNillableReplacement(b *bool) *TableColumnUpdateOne
SetNillableReplacement sets the "replacement" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableSource ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetNillableSource(s *string) *TableColumnUpdateOne
SetNillableSource sets the "source" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableSourceID ¶ added in v0.5.0
func (tcuo *TableColumnUpdateOne) SetNillableSourceID(s *string) *TableColumnUpdateOne
SetNillableSourceID sets the "source_id" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableSourceType ¶ added in v0.5.0
func (tcuo *TableColumnUpdateOne) SetNillableSourceType(tt *tablecolumn.SourceType) *TableColumnUpdateOne
SetNillableSourceType sets the "source_type" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableTableID ¶
func (tcuo *TableColumnUpdateOne) SetNillableTableID(i *int) *TableColumnUpdateOne
SetNillableTableID sets the "table_id" field if the given value is not nil.
func (*TableColumnUpdateOne) SetNillableType ¶
func (tcuo *TableColumnUpdateOne) SetNillableType(t *tablecolumn.Type) *TableColumnUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*TableColumnUpdateOne) SetOptions ¶ added in v0.5.0
func (tcuo *TableColumnUpdateOne) SetOptions(s []string) *TableColumnUpdateOne
SetOptions sets the "options" field.
func (*TableColumnUpdateOne) SetRandom ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetRandom(b bool) *TableColumnUpdateOne
SetRandom sets the "random" field.
func (*TableColumnUpdateOne) SetRepeat ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetRepeat(i int) *TableColumnUpdateOne
SetRepeat sets the "repeat" field.
func (*TableColumnUpdateOne) SetReplacement ¶ added in v0.0.8
func (tcuo *TableColumnUpdateOne) SetReplacement(b bool) *TableColumnUpdateOne
SetReplacement sets the "replacement" field.
func (*TableColumnUpdateOne) SetSource ¶
func (tcuo *TableColumnUpdateOne) SetSource(s string) *TableColumnUpdateOne
SetSource sets the "source" field.
func (*TableColumnUpdateOne) SetSourceID ¶ added in v0.5.0
func (tcuo *TableColumnUpdateOne) SetSourceID(s string) *TableColumnUpdateOne
SetSourceID sets the "source_id" field.
func (*TableColumnUpdateOne) SetSourceType ¶ added in v0.5.0
func (tcuo *TableColumnUpdateOne) SetSourceType(tt tablecolumn.SourceType) *TableColumnUpdateOne
SetSourceType sets the "source_type" field.
func (*TableColumnUpdateOne) SetTableID ¶
func (tcuo *TableColumnUpdateOne) SetTableID(i int) *TableColumnUpdateOne
SetTableID sets the "table_id" field.
func (*TableColumnUpdateOne) SetTablemeta ¶
func (tcuo *TableColumnUpdateOne) SetTablemeta(t *TableMeta) *TableColumnUpdateOne
SetTablemeta sets the "tablemeta" edge to the TableMeta entity.
func (*TableColumnUpdateOne) SetTablemetaID ¶
func (tcuo *TableColumnUpdateOne) SetTablemetaID(id int) *TableColumnUpdateOne
SetTablemetaID sets the "tablemeta" edge to the TableMeta entity by ID.
func (*TableColumnUpdateOne) SetType ¶
func (tcuo *TableColumnUpdateOne) SetType(t tablecolumn.Type) *TableColumnUpdateOne
SetType sets the "type" field.
func (*TableColumnUpdateOne) SetUpdatedAt ¶
func (tcuo *TableColumnUpdateOne) SetUpdatedAt(t time.Time) *TableColumnUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TableColumnUpdateOne) Where ¶
func (tcuo *TableColumnUpdateOne) Where(ps ...predicate.TableColumn) *TableColumnUpdateOne
Where appends a list predicates to the TableColumnUpdate builder.
type TableColumnUpsert ¶
TableColumnUpsert is the "OnConflict" setter.
func (*TableColumnUpsert) AddContextLength ¶
func (u *TableColumnUpsert) AddContextLength(v int) *TableColumnUpsert
AddContextLength adds v to the "context_length" field.
func (*TableColumnUpsert) AddRepeat ¶ added in v0.0.8
func (u *TableColumnUpsert) AddRepeat(v int) *TableColumnUpsert
AddRepeat adds v to the "repeat" field.
func (*TableColumnUpsert) ClearDescription ¶
func (u *TableColumnUpsert) ClearDescription() *TableColumnUpsert
ClearDescription clears the value of the "description" field.
func (*TableColumnUpsert) ClearNanoid ¶
func (u *TableColumnUpsert) ClearNanoid() *TableColumnUpsert
ClearNanoid clears the value of the "nanoid" field.
func (*TableColumnUpsert) ClearOptions ¶ added in v0.5.0
func (u *TableColumnUpsert) ClearOptions() *TableColumnUpsert
ClearOptions clears the value of the "options" field.
func (*TableColumnUpsert) ClearSource ¶
func (u *TableColumnUpsert) ClearSource() *TableColumnUpsert
ClearSource clears the value of the "source" field.
func (*TableColumnUpsert) ClearSourceID ¶ added in v0.5.0
func (u *TableColumnUpsert) ClearSourceID() *TableColumnUpsert
ClearSourceID clears the value of the "source_id" field.
func (*TableColumnUpsert) ClearSourceType ¶ added in v0.5.0
func (u *TableColumnUpsert) ClearSourceType() *TableColumnUpsert
ClearSourceType clears the value of the "source_type" field.
func (*TableColumnUpsert) ClearUpdatedAt ¶
func (u *TableColumnUpsert) ClearUpdatedAt() *TableColumnUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableColumnUpsert) SetContextLength ¶
func (u *TableColumnUpsert) SetContextLength(v int) *TableColumnUpsert
SetContextLength sets the "context_length" field.
func (*TableColumnUpsert) SetDescription ¶
func (u *TableColumnUpsert) SetDescription(v string) *TableColumnUpsert
SetDescription sets the "description" field.
func (*TableColumnUpsert) SetFillMode ¶
func (u *TableColumnUpsert) SetFillMode(v tablecolumn.FillMode) *TableColumnUpsert
SetFillMode sets the "fill_mode" field.
func (*TableColumnUpsert) SetLinkedColumn ¶ added in v0.0.8
func (u *TableColumnUpsert) SetLinkedColumn(v string) *TableColumnUpsert
SetLinkedColumn sets the "linked_column" field.
func (*TableColumnUpsert) SetLinkedContextColumns ¶ added in v0.0.8
func (u *TableColumnUpsert) SetLinkedContextColumns(v []string) *TableColumnUpsert
SetLinkedContextColumns sets the "linked_context_columns" field.
func (*TableColumnUpsert) SetName ¶
func (u *TableColumnUpsert) SetName(v string) *TableColumnUpsert
SetName sets the "name" field.
func (*TableColumnUpsert) SetNanoid ¶
func (u *TableColumnUpsert) SetNanoid(v string) *TableColumnUpsert
SetNanoid sets the "nanoid" field.
func (*TableColumnUpsert) SetOptions ¶ added in v0.5.0
func (u *TableColumnUpsert) SetOptions(v []string) *TableColumnUpsert
SetOptions sets the "options" field.
func (*TableColumnUpsert) SetRandom ¶ added in v0.0.8
func (u *TableColumnUpsert) SetRandom(v bool) *TableColumnUpsert
SetRandom sets the "random" field.
func (*TableColumnUpsert) SetRepeat ¶ added in v0.0.8
func (u *TableColumnUpsert) SetRepeat(v int) *TableColumnUpsert
SetRepeat sets the "repeat" field.
func (*TableColumnUpsert) SetReplacement ¶ added in v0.0.8
func (u *TableColumnUpsert) SetReplacement(v bool) *TableColumnUpsert
SetReplacement sets the "replacement" field.
func (*TableColumnUpsert) SetSource ¶
func (u *TableColumnUpsert) SetSource(v string) *TableColumnUpsert
SetSource sets the "source" field.
func (*TableColumnUpsert) SetSourceID ¶ added in v0.5.0
func (u *TableColumnUpsert) SetSourceID(v string) *TableColumnUpsert
SetSourceID sets the "source_id" field.
func (*TableColumnUpsert) SetSourceType ¶ added in v0.5.0
func (u *TableColumnUpsert) SetSourceType(v tablecolumn.SourceType) *TableColumnUpsert
SetSourceType sets the "source_type" field.
func (*TableColumnUpsert) SetTableID ¶
func (u *TableColumnUpsert) SetTableID(v int) *TableColumnUpsert
SetTableID sets the "table_id" field.
func (*TableColumnUpsert) SetType ¶
func (u *TableColumnUpsert) SetType(v tablecolumn.Type) *TableColumnUpsert
SetType sets the "type" field.
func (*TableColumnUpsert) SetUpdatedAt ¶
func (u *TableColumnUpsert) SetUpdatedAt(v time.Time) *TableColumnUpsert
SetUpdatedAt sets the "updated_at" field.
func (*TableColumnUpsert) UpdateContextLength ¶
func (u *TableColumnUpsert) UpdateContextLength() *TableColumnUpsert
UpdateContextLength sets the "context_length" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateDescription ¶
func (u *TableColumnUpsert) UpdateDescription() *TableColumnUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateFillMode ¶
func (u *TableColumnUpsert) UpdateFillMode() *TableColumnUpsert
UpdateFillMode sets the "fill_mode" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateLinkedColumn ¶ added in v0.0.8
func (u *TableColumnUpsert) UpdateLinkedColumn() *TableColumnUpsert
UpdateLinkedColumn sets the "linked_column" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateLinkedContextColumns ¶ added in v0.0.8
func (u *TableColumnUpsert) UpdateLinkedContextColumns() *TableColumnUpsert
UpdateLinkedContextColumns sets the "linked_context_columns" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateName ¶
func (u *TableColumnUpsert) UpdateName() *TableColumnUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateNanoid ¶
func (u *TableColumnUpsert) UpdateNanoid() *TableColumnUpsert
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateOptions ¶ added in v0.5.0
func (u *TableColumnUpsert) UpdateOptions() *TableColumnUpsert
UpdateOptions sets the "options" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateRandom ¶ added in v0.0.8
func (u *TableColumnUpsert) UpdateRandom() *TableColumnUpsert
UpdateRandom sets the "random" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateRepeat ¶ added in v0.0.8
func (u *TableColumnUpsert) UpdateRepeat() *TableColumnUpsert
UpdateRepeat sets the "repeat" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateReplacement ¶ added in v0.0.8
func (u *TableColumnUpsert) UpdateReplacement() *TableColumnUpsert
UpdateReplacement sets the "replacement" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateSource ¶
func (u *TableColumnUpsert) UpdateSource() *TableColumnUpsert
UpdateSource sets the "source" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateSourceID ¶ added in v0.5.0
func (u *TableColumnUpsert) UpdateSourceID() *TableColumnUpsert
UpdateSourceID sets the "source_id" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateSourceType ¶ added in v0.5.0
func (u *TableColumnUpsert) UpdateSourceType() *TableColumnUpsert
UpdateSourceType sets the "source_type" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateTableID ¶
func (u *TableColumnUpsert) UpdateTableID() *TableColumnUpsert
UpdateTableID sets the "table_id" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateType ¶
func (u *TableColumnUpsert) UpdateType() *TableColumnUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*TableColumnUpsert) UpdateUpdatedAt ¶
func (u *TableColumnUpsert) UpdateUpdatedAt() *TableColumnUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TableColumnUpsertBulk ¶
type TableColumnUpsertBulk struct {
// contains filtered or unexported fields
}
TableColumnUpsertBulk is the builder for "upsert"-ing a bulk of TableColumn nodes.
func (*TableColumnUpsertBulk) AddContextLength ¶
func (u *TableColumnUpsertBulk) AddContextLength(v int) *TableColumnUpsertBulk
AddContextLength adds v to the "context_length" field.
func (*TableColumnUpsertBulk) AddRepeat ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) AddRepeat(v int) *TableColumnUpsertBulk
AddRepeat adds v to the "repeat" field.
func (*TableColumnUpsertBulk) ClearDescription ¶
func (u *TableColumnUpsertBulk) ClearDescription() *TableColumnUpsertBulk
ClearDescription clears the value of the "description" field.
func (*TableColumnUpsertBulk) ClearNanoid ¶
func (u *TableColumnUpsertBulk) ClearNanoid() *TableColumnUpsertBulk
ClearNanoid clears the value of the "nanoid" field.
func (*TableColumnUpsertBulk) ClearOptions ¶ added in v0.5.0
func (u *TableColumnUpsertBulk) ClearOptions() *TableColumnUpsertBulk
ClearOptions clears the value of the "options" field.
func (*TableColumnUpsertBulk) ClearSource ¶
func (u *TableColumnUpsertBulk) ClearSource() *TableColumnUpsertBulk
ClearSource clears the value of the "source" field.
func (*TableColumnUpsertBulk) ClearSourceID ¶ added in v0.5.0
func (u *TableColumnUpsertBulk) ClearSourceID() *TableColumnUpsertBulk
ClearSourceID clears the value of the "source_id" field.
func (*TableColumnUpsertBulk) ClearSourceType ¶ added in v0.5.0
func (u *TableColumnUpsertBulk) ClearSourceType() *TableColumnUpsertBulk
ClearSourceType clears the value of the "source_type" field.
func (*TableColumnUpsertBulk) ClearUpdatedAt ¶
func (u *TableColumnUpsertBulk) ClearUpdatedAt() *TableColumnUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableColumnUpsertBulk) DoNothing ¶
func (u *TableColumnUpsertBulk) DoNothing() *TableColumnUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TableColumnUpsertBulk) Exec ¶
func (u *TableColumnUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TableColumnUpsertBulk) ExecX ¶
func (u *TableColumnUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableColumnUpsertBulk) Ignore ¶
func (u *TableColumnUpsertBulk) Ignore() *TableColumnUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TableColumn.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TableColumnUpsertBulk) SetContextLength ¶
func (u *TableColumnUpsertBulk) SetContextLength(v int) *TableColumnUpsertBulk
SetContextLength sets the "context_length" field.
func (*TableColumnUpsertBulk) SetDescription ¶
func (u *TableColumnUpsertBulk) SetDescription(v string) *TableColumnUpsertBulk
SetDescription sets the "description" field.
func (*TableColumnUpsertBulk) SetFillMode ¶
func (u *TableColumnUpsertBulk) SetFillMode(v tablecolumn.FillMode) *TableColumnUpsertBulk
SetFillMode sets the "fill_mode" field.
func (*TableColumnUpsertBulk) SetLinkedColumn ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) SetLinkedColumn(v string) *TableColumnUpsertBulk
SetLinkedColumn sets the "linked_column" field.
func (*TableColumnUpsertBulk) SetLinkedContextColumns ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) SetLinkedContextColumns(v []string) *TableColumnUpsertBulk
SetLinkedContextColumns sets the "linked_context_columns" field.
func (*TableColumnUpsertBulk) SetName ¶
func (u *TableColumnUpsertBulk) SetName(v string) *TableColumnUpsertBulk
SetName sets the "name" field.
func (*TableColumnUpsertBulk) SetNanoid ¶
func (u *TableColumnUpsertBulk) SetNanoid(v string) *TableColumnUpsertBulk
SetNanoid sets the "nanoid" field.
func (*TableColumnUpsertBulk) SetOptions ¶ added in v0.5.0
func (u *TableColumnUpsertBulk) SetOptions(v []string) *TableColumnUpsertBulk
SetOptions sets the "options" field.
func (*TableColumnUpsertBulk) SetRandom ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) SetRandom(v bool) *TableColumnUpsertBulk
SetRandom sets the "random" field.
func (*TableColumnUpsertBulk) SetRepeat ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) SetRepeat(v int) *TableColumnUpsertBulk
SetRepeat sets the "repeat" field.
func (*TableColumnUpsertBulk) SetReplacement ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) SetReplacement(v bool) *TableColumnUpsertBulk
SetReplacement sets the "replacement" field.
func (*TableColumnUpsertBulk) SetSource ¶
func (u *TableColumnUpsertBulk) SetSource(v string) *TableColumnUpsertBulk
SetSource sets the "source" field.
func (*TableColumnUpsertBulk) SetSourceID ¶ added in v0.5.0
func (u *TableColumnUpsertBulk) SetSourceID(v string) *TableColumnUpsertBulk
SetSourceID sets the "source_id" field.
func (*TableColumnUpsertBulk) SetSourceType ¶ added in v0.5.0
func (u *TableColumnUpsertBulk) SetSourceType(v tablecolumn.SourceType) *TableColumnUpsertBulk
SetSourceType sets the "source_type" field.
func (*TableColumnUpsertBulk) SetTableID ¶
func (u *TableColumnUpsertBulk) SetTableID(v int) *TableColumnUpsertBulk
SetTableID sets the "table_id" field.
func (*TableColumnUpsertBulk) SetType ¶
func (u *TableColumnUpsertBulk) SetType(v tablecolumn.Type) *TableColumnUpsertBulk
SetType sets the "type" field.
func (*TableColumnUpsertBulk) SetUpdatedAt ¶
func (u *TableColumnUpsertBulk) SetUpdatedAt(v time.Time) *TableColumnUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*TableColumnUpsertBulk) Update ¶
func (u *TableColumnUpsertBulk) Update(set func(*TableColumnUpsert)) *TableColumnUpsertBulk
Update allows overriding fields `UPDATE` values. See the TableColumnCreateBulk.OnConflict documentation for more info.
func (*TableColumnUpsertBulk) UpdateContextLength ¶
func (u *TableColumnUpsertBulk) UpdateContextLength() *TableColumnUpsertBulk
UpdateContextLength sets the "context_length" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateDescription ¶
func (u *TableColumnUpsertBulk) UpdateDescription() *TableColumnUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateFillMode ¶
func (u *TableColumnUpsertBulk) UpdateFillMode() *TableColumnUpsertBulk
UpdateFillMode sets the "fill_mode" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateLinkedColumn ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) UpdateLinkedColumn() *TableColumnUpsertBulk
UpdateLinkedColumn sets the "linked_column" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateLinkedContextColumns ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) UpdateLinkedContextColumns() *TableColumnUpsertBulk
UpdateLinkedContextColumns sets the "linked_context_columns" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateName ¶
func (u *TableColumnUpsertBulk) UpdateName() *TableColumnUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateNanoid ¶
func (u *TableColumnUpsertBulk) UpdateNanoid() *TableColumnUpsertBulk
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateNewValues ¶
func (u *TableColumnUpsertBulk) UpdateNewValues() *TableColumnUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TableColumn.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TableColumnUpsertBulk) UpdateOptions ¶ added in v0.5.0
func (u *TableColumnUpsertBulk) UpdateOptions() *TableColumnUpsertBulk
UpdateOptions sets the "options" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateRandom ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) UpdateRandom() *TableColumnUpsertBulk
UpdateRandom sets the "random" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateRepeat ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) UpdateRepeat() *TableColumnUpsertBulk
UpdateRepeat sets the "repeat" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateReplacement ¶ added in v0.0.8
func (u *TableColumnUpsertBulk) UpdateReplacement() *TableColumnUpsertBulk
UpdateReplacement sets the "replacement" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateSource ¶
func (u *TableColumnUpsertBulk) UpdateSource() *TableColumnUpsertBulk
UpdateSource sets the "source" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateSourceID ¶ added in v0.5.0
func (u *TableColumnUpsertBulk) UpdateSourceID() *TableColumnUpsertBulk
UpdateSourceID sets the "source_id" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateSourceType ¶ added in v0.5.0
func (u *TableColumnUpsertBulk) UpdateSourceType() *TableColumnUpsertBulk
UpdateSourceType sets the "source_type" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateTableID ¶
func (u *TableColumnUpsertBulk) UpdateTableID() *TableColumnUpsertBulk
UpdateTableID sets the "table_id" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateType ¶
func (u *TableColumnUpsertBulk) UpdateType() *TableColumnUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*TableColumnUpsertBulk) UpdateUpdatedAt ¶
func (u *TableColumnUpsertBulk) UpdateUpdatedAt() *TableColumnUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TableColumnUpsertOne ¶
type TableColumnUpsertOne struct {
// contains filtered or unexported fields
}
TableColumnUpsertOne is the builder for "upsert"-ing
one TableColumn node.
func (*TableColumnUpsertOne) AddContextLength ¶
func (u *TableColumnUpsertOne) AddContextLength(v int) *TableColumnUpsertOne
AddContextLength adds v to the "context_length" field.
func (*TableColumnUpsertOne) AddRepeat ¶ added in v0.0.8
func (u *TableColumnUpsertOne) AddRepeat(v int) *TableColumnUpsertOne
AddRepeat adds v to the "repeat" field.
func (*TableColumnUpsertOne) ClearDescription ¶
func (u *TableColumnUpsertOne) ClearDescription() *TableColumnUpsertOne
ClearDescription clears the value of the "description" field.
func (*TableColumnUpsertOne) ClearNanoid ¶
func (u *TableColumnUpsertOne) ClearNanoid() *TableColumnUpsertOne
ClearNanoid clears the value of the "nanoid" field.
func (*TableColumnUpsertOne) ClearOptions ¶ added in v0.5.0
func (u *TableColumnUpsertOne) ClearOptions() *TableColumnUpsertOne
ClearOptions clears the value of the "options" field.
func (*TableColumnUpsertOne) ClearSource ¶
func (u *TableColumnUpsertOne) ClearSource() *TableColumnUpsertOne
ClearSource clears the value of the "source" field.
func (*TableColumnUpsertOne) ClearSourceID ¶ added in v0.5.0
func (u *TableColumnUpsertOne) ClearSourceID() *TableColumnUpsertOne
ClearSourceID clears the value of the "source_id" field.
func (*TableColumnUpsertOne) ClearSourceType ¶ added in v0.5.0
func (u *TableColumnUpsertOne) ClearSourceType() *TableColumnUpsertOne
ClearSourceType clears the value of the "source_type" field.
func (*TableColumnUpsertOne) ClearUpdatedAt ¶
func (u *TableColumnUpsertOne) ClearUpdatedAt() *TableColumnUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableColumnUpsertOne) DoNothing ¶
func (u *TableColumnUpsertOne) DoNothing() *TableColumnUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TableColumnUpsertOne) Exec ¶
func (u *TableColumnUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TableColumnUpsertOne) ExecX ¶
func (u *TableColumnUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableColumnUpsertOne) ID ¶
func (u *TableColumnUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TableColumnUpsertOne) IDX ¶
func (u *TableColumnUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*TableColumnUpsertOne) Ignore ¶
func (u *TableColumnUpsertOne) Ignore() *TableColumnUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TableColumn.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*TableColumnUpsertOne) SetContextLength ¶
func (u *TableColumnUpsertOne) SetContextLength(v int) *TableColumnUpsertOne
SetContextLength sets the "context_length" field.
func (*TableColumnUpsertOne) SetDescription ¶
func (u *TableColumnUpsertOne) SetDescription(v string) *TableColumnUpsertOne
SetDescription sets the "description" field.
func (*TableColumnUpsertOne) SetFillMode ¶
func (u *TableColumnUpsertOne) SetFillMode(v tablecolumn.FillMode) *TableColumnUpsertOne
SetFillMode sets the "fill_mode" field.
func (*TableColumnUpsertOne) SetLinkedColumn ¶ added in v0.0.8
func (u *TableColumnUpsertOne) SetLinkedColumn(v string) *TableColumnUpsertOne
SetLinkedColumn sets the "linked_column" field.
func (*TableColumnUpsertOne) SetLinkedContextColumns ¶ added in v0.0.8
func (u *TableColumnUpsertOne) SetLinkedContextColumns(v []string) *TableColumnUpsertOne
SetLinkedContextColumns sets the "linked_context_columns" field.
func (*TableColumnUpsertOne) SetName ¶
func (u *TableColumnUpsertOne) SetName(v string) *TableColumnUpsertOne
SetName sets the "name" field.
func (*TableColumnUpsertOne) SetNanoid ¶
func (u *TableColumnUpsertOne) SetNanoid(v string) *TableColumnUpsertOne
SetNanoid sets the "nanoid" field.
func (*TableColumnUpsertOne) SetOptions ¶ added in v0.5.0
func (u *TableColumnUpsertOne) SetOptions(v []string) *TableColumnUpsertOne
SetOptions sets the "options" field.
func (*TableColumnUpsertOne) SetRandom ¶ added in v0.0.8
func (u *TableColumnUpsertOne) SetRandom(v bool) *TableColumnUpsertOne
SetRandom sets the "random" field.
func (*TableColumnUpsertOne) SetRepeat ¶ added in v0.0.8
func (u *TableColumnUpsertOne) SetRepeat(v int) *TableColumnUpsertOne
SetRepeat sets the "repeat" field.
func (*TableColumnUpsertOne) SetReplacement ¶ added in v0.0.8
func (u *TableColumnUpsertOne) SetReplacement(v bool) *TableColumnUpsertOne
SetReplacement sets the "replacement" field.
func (*TableColumnUpsertOne) SetSource ¶
func (u *TableColumnUpsertOne) SetSource(v string) *TableColumnUpsertOne
SetSource sets the "source" field.
func (*TableColumnUpsertOne) SetSourceID ¶ added in v0.5.0
func (u *TableColumnUpsertOne) SetSourceID(v string) *TableColumnUpsertOne
SetSourceID sets the "source_id" field.
func (*TableColumnUpsertOne) SetSourceType ¶ added in v0.5.0
func (u *TableColumnUpsertOne) SetSourceType(v tablecolumn.SourceType) *TableColumnUpsertOne
SetSourceType sets the "source_type" field.
func (*TableColumnUpsertOne) SetTableID ¶
func (u *TableColumnUpsertOne) SetTableID(v int) *TableColumnUpsertOne
SetTableID sets the "table_id" field.
func (*TableColumnUpsertOne) SetType ¶
func (u *TableColumnUpsertOne) SetType(v tablecolumn.Type) *TableColumnUpsertOne
SetType sets the "type" field.
func (*TableColumnUpsertOne) SetUpdatedAt ¶
func (u *TableColumnUpsertOne) SetUpdatedAt(v time.Time) *TableColumnUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*TableColumnUpsertOne) Update ¶
func (u *TableColumnUpsertOne) Update(set func(*TableColumnUpsert)) *TableColumnUpsertOne
Update allows overriding fields `UPDATE` values. See the TableColumnCreate.OnConflict documentation for more info.
func (*TableColumnUpsertOne) UpdateContextLength ¶
func (u *TableColumnUpsertOne) UpdateContextLength() *TableColumnUpsertOne
UpdateContextLength sets the "context_length" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateDescription ¶
func (u *TableColumnUpsertOne) UpdateDescription() *TableColumnUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateFillMode ¶
func (u *TableColumnUpsertOne) UpdateFillMode() *TableColumnUpsertOne
UpdateFillMode sets the "fill_mode" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateLinkedColumn ¶ added in v0.0.8
func (u *TableColumnUpsertOne) UpdateLinkedColumn() *TableColumnUpsertOne
UpdateLinkedColumn sets the "linked_column" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateLinkedContextColumns ¶ added in v0.0.8
func (u *TableColumnUpsertOne) UpdateLinkedContextColumns() *TableColumnUpsertOne
UpdateLinkedContextColumns sets the "linked_context_columns" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateName ¶
func (u *TableColumnUpsertOne) UpdateName() *TableColumnUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateNanoid ¶
func (u *TableColumnUpsertOne) UpdateNanoid() *TableColumnUpsertOne
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateNewValues ¶
func (u *TableColumnUpsertOne) UpdateNewValues() *TableColumnUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TableColumn.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TableColumnUpsertOne) UpdateOptions ¶ added in v0.5.0
func (u *TableColumnUpsertOne) UpdateOptions() *TableColumnUpsertOne
UpdateOptions sets the "options" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateRandom ¶ added in v0.0.8
func (u *TableColumnUpsertOne) UpdateRandom() *TableColumnUpsertOne
UpdateRandom sets the "random" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateRepeat ¶ added in v0.0.8
func (u *TableColumnUpsertOne) UpdateRepeat() *TableColumnUpsertOne
UpdateRepeat sets the "repeat" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateReplacement ¶ added in v0.0.8
func (u *TableColumnUpsertOne) UpdateReplacement() *TableColumnUpsertOne
UpdateReplacement sets the "replacement" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateSource ¶
func (u *TableColumnUpsertOne) UpdateSource() *TableColumnUpsertOne
UpdateSource sets the "source" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateSourceID ¶ added in v0.5.0
func (u *TableColumnUpsertOne) UpdateSourceID() *TableColumnUpsertOne
UpdateSourceID sets the "source_id" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateSourceType ¶ added in v0.5.0
func (u *TableColumnUpsertOne) UpdateSourceType() *TableColumnUpsertOne
UpdateSourceType sets the "source_type" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateTableID ¶
func (u *TableColumnUpsertOne) UpdateTableID() *TableColumnUpsertOne
UpdateTableID sets the "table_id" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateType ¶
func (u *TableColumnUpsertOne) UpdateType() *TableColumnUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*TableColumnUpsertOne) UpdateUpdatedAt ¶
func (u *TableColumnUpsertOne) UpdateUpdatedAt() *TableColumnUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TableColumns ¶
type TableColumns []*TableColumn
TableColumns is a parsable slice of TableColumn.
type TableMeta ¶
type TableMeta struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Nanoid holds the value of the "nanoid" field.
Nanoid string `json:"nanoid,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"`
// Model holds the value of the "model" field.
Model string `json:"model,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the TableMetaQuery when eager-loading is set.
Edges TableMetaEdges `json:"edges"`
// contains filtered or unexported fields
}
TableMeta is the model entity for the TableMeta schema.
func (*TableMeta) QueryColumns ¶
func (tm *TableMeta) QueryColumns() *TableColumnQuery
QueryColumns queries the "columns" edge of the TableMeta entity.
func (*TableMeta) QueryRows ¶
func (tm *TableMeta) QueryRows() *TableRowQuery
QueryRows queries the "rows" edge of the TableMeta entity.
func (*TableMeta) Unwrap ¶
Unwrap unwraps the TableMeta 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 (*TableMeta) Update ¶
func (tm *TableMeta) Update() *TableMetaUpdateOne
Update returns a builder for updating this TableMeta. Note that you need to call TableMeta.Unwrap() before calling this method if this TableMeta was returned from a transaction, and the transaction was committed or rolled back.
type TableMetaClient ¶
type TableMetaClient struct {
// contains filtered or unexported fields
}
TableMetaClient is a client for the TableMeta schema.
func NewTableMetaClient ¶
func NewTableMetaClient(c config) *TableMetaClient
NewTableMetaClient returns a client for the TableMeta from the given config.
func (*TableMetaClient) Create ¶
func (c *TableMetaClient) Create() *TableMetaCreate
Create returns a builder for creating a TableMeta entity.
func (*TableMetaClient) CreateBulk ¶
func (c *TableMetaClient) CreateBulk(builders ...*TableMetaCreate) *TableMetaCreateBulk
CreateBulk returns a builder for creating a bulk of TableMeta entities.
func (*TableMetaClient) Delete ¶
func (c *TableMetaClient) Delete() *TableMetaDelete
Delete returns a delete builder for TableMeta.
func (*TableMetaClient) DeleteOne ¶
func (c *TableMetaClient) DeleteOne(tm *TableMeta) *TableMetaDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TableMetaClient) DeleteOneID ¶
func (c *TableMetaClient) DeleteOneID(id int) *TableMetaDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TableMetaClient) GetX ¶
func (c *TableMetaClient) GetX(ctx context.Context, id int) *TableMeta
GetX is like Get, but panics if an error occurs.
func (*TableMetaClient) Hooks ¶
func (c *TableMetaClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TableMetaClient) Intercept ¶
func (c *TableMetaClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tablemeta.Intercept(f(g(h())))`.
func (*TableMetaClient) Interceptors ¶
func (c *TableMetaClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TableMetaClient) MapCreateBulk ¶
func (c *TableMetaClient) MapCreateBulk(slice any, setFunc func(*TableMetaCreate, int)) *TableMetaCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TableMetaClient) Query ¶
func (c *TableMetaClient) Query() *TableMetaQuery
Query returns a query builder for TableMeta.
func (*TableMetaClient) QueryColumns ¶
func (c *TableMetaClient) QueryColumns(tm *TableMeta) *TableColumnQuery
QueryColumns queries the columns edge of a TableMeta.
func (*TableMetaClient) QueryRows ¶
func (c *TableMetaClient) QueryRows(tm *TableMeta) *TableRowQuery
QueryRows queries the rows edge of a TableMeta.
func (*TableMetaClient) Update ¶
func (c *TableMetaClient) Update() *TableMetaUpdate
Update returns an update builder for TableMeta.
func (*TableMetaClient) UpdateOne ¶
func (c *TableMetaClient) UpdateOne(tm *TableMeta) *TableMetaUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TableMetaClient) UpdateOneID ¶
func (c *TableMetaClient) UpdateOneID(id int) *TableMetaUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TableMetaClient) Use ¶
func (c *TableMetaClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tablemeta.Hooks(f(g(h())))`.
type TableMetaCreate ¶
type TableMetaCreate struct {
// contains filtered or unexported fields
}
TableMetaCreate is the builder for creating a TableMeta entity.
func (*TableMetaCreate) AddColumnIDs ¶
func (tmc *TableMetaCreate) AddColumnIDs(ids ...int) *TableMetaCreate
AddColumnIDs adds the "columns" edge to the TableColumn entity by IDs.
func (*TableMetaCreate) AddColumns ¶
func (tmc *TableMetaCreate) AddColumns(t ...*TableColumn) *TableMetaCreate
AddColumns adds the "columns" edges to the TableColumn entity.
func (*TableMetaCreate) AddRowIDs ¶
func (tmc *TableMetaCreate) AddRowIDs(ids ...int) *TableMetaCreate
AddRowIDs adds the "rows" edge to the TableRow entity by IDs.
func (*TableMetaCreate) AddRows ¶
func (tmc *TableMetaCreate) AddRows(t ...*TableRow) *TableMetaCreate
AddRows adds the "rows" edges to the TableRow entity.
func (*TableMetaCreate) Exec ¶
func (tmc *TableMetaCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TableMetaCreate) ExecX ¶
func (tmc *TableMetaCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableMetaCreate) Mutation ¶
func (tmc *TableMetaCreate) Mutation() *TableMetaMutation
Mutation returns the TableMetaMutation object of the builder.
func (*TableMetaCreate) OnConflict ¶
func (tmc *TableMetaCreate) OnConflict(opts ...sql.ConflictOption) *TableMetaUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TableMeta.Create().
SetCreatedAt(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.TableMetaUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*TableMetaCreate) OnConflictColumns ¶
func (tmc *TableMetaCreate) OnConflictColumns(columns ...string) *TableMetaUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TableMeta.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TableMetaCreate) Save ¶
func (tmc *TableMetaCreate) Save(ctx context.Context) (*TableMeta, error)
Save creates the TableMeta in the database.
func (*TableMetaCreate) SaveX ¶
func (tmc *TableMetaCreate) SaveX(ctx context.Context) *TableMeta
SaveX calls Save and panics if Save returns an error.
func (*TableMetaCreate) SetCreatedAt ¶
func (tmc *TableMetaCreate) SetCreatedAt(t time.Time) *TableMetaCreate
SetCreatedAt sets the "created_at" field.
func (*TableMetaCreate) SetDescription ¶
func (tmc *TableMetaCreate) SetDescription(s string) *TableMetaCreate
SetDescription sets the "description" field.
func (*TableMetaCreate) SetModel ¶
func (tmc *TableMetaCreate) SetModel(s string) *TableMetaCreate
SetModel sets the "model" field.
func (*TableMetaCreate) SetName ¶
func (tmc *TableMetaCreate) SetName(s string) *TableMetaCreate
SetName sets the "name" field.
func (*TableMetaCreate) SetNanoid ¶
func (tmc *TableMetaCreate) SetNanoid(s string) *TableMetaCreate
SetNanoid sets the "nanoid" field.
func (*TableMetaCreate) SetNillableCreatedAt ¶
func (tmc *TableMetaCreate) SetNillableCreatedAt(t *time.Time) *TableMetaCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TableMetaCreate) SetNillableDescription ¶
func (tmc *TableMetaCreate) SetNillableDescription(s *string) *TableMetaCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TableMetaCreate) SetNillableModel ¶
func (tmc *TableMetaCreate) SetNillableModel(s *string) *TableMetaCreate
SetNillableModel sets the "model" field if the given value is not nil.
func (*TableMetaCreate) SetNillableNanoid ¶
func (tmc *TableMetaCreate) SetNillableNanoid(s *string) *TableMetaCreate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*TableMetaCreate) SetNillableUpdatedAt ¶
func (tmc *TableMetaCreate) SetNillableUpdatedAt(t *time.Time) *TableMetaCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*TableMetaCreate) SetUpdatedAt ¶
func (tmc *TableMetaCreate) SetUpdatedAt(t time.Time) *TableMetaCreate
SetUpdatedAt sets the "updated_at" field.
type TableMetaCreateBulk ¶
type TableMetaCreateBulk struct {
// contains filtered or unexported fields
}
TableMetaCreateBulk is the builder for creating many TableMeta entities in bulk.
func (*TableMetaCreateBulk) Exec ¶
func (tmcb *TableMetaCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TableMetaCreateBulk) ExecX ¶
func (tmcb *TableMetaCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableMetaCreateBulk) OnConflict ¶
func (tmcb *TableMetaCreateBulk) OnConflict(opts ...sql.ConflictOption) *TableMetaUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TableMeta.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.TableMetaUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*TableMetaCreateBulk) OnConflictColumns ¶
func (tmcb *TableMetaCreateBulk) OnConflictColumns(columns ...string) *TableMetaUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TableMeta.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TableMetaDelete ¶
type TableMetaDelete struct {
// contains filtered or unexported fields
}
TableMetaDelete is the builder for deleting a TableMeta entity.
func (*TableMetaDelete) Exec ¶
func (tmd *TableMetaDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TableMetaDelete) ExecX ¶
func (tmd *TableMetaDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TableMetaDelete) Where ¶
func (tmd *TableMetaDelete) Where(ps ...predicate.TableMeta) *TableMetaDelete
Where appends a list predicates to the TableMetaDelete builder.
type TableMetaDeleteOne ¶
type TableMetaDeleteOne struct {
// contains filtered or unexported fields
}
TableMetaDeleteOne is the builder for deleting a single TableMeta entity.
func (*TableMetaDeleteOne) Exec ¶
func (tmdo *TableMetaDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TableMetaDeleteOne) ExecX ¶
func (tmdo *TableMetaDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableMetaDeleteOne) Where ¶
func (tmdo *TableMetaDeleteOne) Where(ps ...predicate.TableMeta) *TableMetaDeleteOne
Where appends a list predicates to the TableMetaDelete builder.
type TableMetaEdges ¶
type TableMetaEdges struct {
// Columns holds the value of the columns edge.
Columns []*TableColumn `json:"columns,omitempty"`
// Rows holds the value of the rows edge.
Rows []*TableRow `json:"rows,omitempty"`
// contains filtered or unexported fields
}
TableMetaEdges holds the relations/edges for other nodes in the graph.
func (TableMetaEdges) ColumnsOrErr ¶
func (e TableMetaEdges) ColumnsOrErr() ([]*TableColumn, error)
ColumnsOrErr returns the Columns value or an error if the edge was not loaded in eager-loading.
func (TableMetaEdges) RowsOrErr ¶
func (e TableMetaEdges) RowsOrErr() ([]*TableRow, error)
RowsOrErr returns the Rows value or an error if the edge was not loaded in eager-loading.
type TableMetaGroupBy ¶
type TableMetaGroupBy struct {
// contains filtered or unexported fields
}
TableMetaGroupBy is the group-by builder for TableMeta entities.
func (*TableMetaGroupBy) Aggregate ¶
func (tmgb *TableMetaGroupBy) Aggregate(fns ...AggregateFunc) *TableMetaGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TableMetaGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TableMetaGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TableMetaGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TableMetaGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TableMetaGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TableMetaGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TableMetaGroupBy) Scan ¶
func (tmgb *TableMetaGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TableMetaGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TableMetaMutation ¶
type TableMetaMutation struct {
// contains filtered or unexported fields
}
TableMetaMutation represents an operation that mutates the TableMeta nodes in the graph.
func (*TableMetaMutation) AddColumnIDs ¶
func (m *TableMetaMutation) AddColumnIDs(ids ...int)
AddColumnIDs adds the "columns" edge to the TableColumn entity by ids.
func (*TableMetaMutation) AddField ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) AddRowIDs ¶
func (m *TableMetaMutation) AddRowIDs(ids ...int)
AddRowIDs adds the "rows" edge to the TableRow entity by ids.
func (*TableMetaMutation) AddedEdges ¶
func (m *TableMetaMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TableMetaMutation) AddedField ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) AddedFields ¶
func (m *TableMetaMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TableMetaMutation) AddedIDs ¶
func (m *TableMetaMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TableMetaMutation) ClearColumns ¶
func (m *TableMetaMutation) ClearColumns()
ClearColumns clears the "columns" edge to the TableColumn entity.
func (*TableMetaMutation) ClearCreatedAt ¶
func (m *TableMetaMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*TableMetaMutation) ClearEdge ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) ClearField ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) ClearNanoid ¶
func (m *TableMetaMutation) ClearNanoid()
ClearNanoid clears the value of the "nanoid" field.
func (*TableMetaMutation) ClearRows ¶
func (m *TableMetaMutation) ClearRows()
ClearRows clears the "rows" edge to the TableRow entity.
func (*TableMetaMutation) ClearUpdatedAt ¶
func (m *TableMetaMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableMetaMutation) ClearedEdges ¶
func (m *TableMetaMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TableMetaMutation) ClearedFields ¶
func (m *TableMetaMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TableMetaMutation) Client ¶
func (m TableMetaMutation) 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 (*TableMetaMutation) ColumnsCleared ¶
func (m *TableMetaMutation) ColumnsCleared() bool
ColumnsCleared reports if the "columns" edge to the TableColumn entity was cleared.
func (*TableMetaMutation) ColumnsIDs ¶
func (m *TableMetaMutation) ColumnsIDs() (ids []int)
ColumnsIDs returns the "columns" edge IDs in the mutation.
func (*TableMetaMutation) CreatedAt ¶
func (m *TableMetaMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TableMetaMutation) CreatedAtCleared ¶
func (m *TableMetaMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*TableMetaMutation) Description ¶
func (m *TableMetaMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*TableMetaMutation) EdgeCleared ¶
func (m *TableMetaMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TableMetaMutation) Field ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) FieldCleared ¶
func (m *TableMetaMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TableMetaMutation) Fields ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) ID ¶
func (m *TableMetaMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TableMetaMutation) IDs ¶
func (m *TableMetaMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TableMetaMutation) Model ¶
func (m *TableMetaMutation) Model() (r string, exists bool)
Model returns the value of the "model" field in the mutation.
func (*TableMetaMutation) Name ¶
func (m *TableMetaMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TableMetaMutation) Nanoid ¶
func (m *TableMetaMutation) Nanoid() (r string, exists bool)
Nanoid returns the value of the "nanoid" field in the mutation.
func (*TableMetaMutation) NanoidCleared ¶
func (m *TableMetaMutation) NanoidCleared() bool
NanoidCleared returns if the "nanoid" field was cleared in this mutation.
func (*TableMetaMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the TableMeta entity. If the TableMeta 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 (*TableMetaMutation) OldDescription ¶
func (m *TableMetaMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the TableMeta entity. If the TableMeta 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 (*TableMetaMutation) 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 (*TableMetaMutation) OldModel ¶
func (m *TableMetaMutation) OldModel(ctx context.Context) (v string, err error)
OldModel returns the old "model" field's value of the TableMeta entity. If the TableMeta 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 (*TableMetaMutation) OldName ¶
func (m *TableMetaMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the TableMeta entity. If the TableMeta 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 (*TableMetaMutation) OldNanoid ¶
func (m *TableMetaMutation) OldNanoid(ctx context.Context) (v string, err error)
OldNanoid returns the old "nanoid" field's value of the TableMeta entity. If the TableMeta 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 (*TableMetaMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the TableMeta entity. If the TableMeta 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 (*TableMetaMutation) RemoveColumnIDs ¶
func (m *TableMetaMutation) RemoveColumnIDs(ids ...int)
RemoveColumnIDs removes the "columns" edge to the TableColumn entity by IDs.
func (*TableMetaMutation) RemoveRowIDs ¶
func (m *TableMetaMutation) RemoveRowIDs(ids ...int)
RemoveRowIDs removes the "rows" edge to the TableRow entity by IDs.
func (*TableMetaMutation) RemovedColumnsIDs ¶
func (m *TableMetaMutation) RemovedColumnsIDs() (ids []int)
RemovedColumns returns the removed IDs of the "columns" edge to the TableColumn entity.
func (*TableMetaMutation) RemovedEdges ¶
func (m *TableMetaMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TableMetaMutation) RemovedIDs ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) RemovedRowsIDs ¶
func (m *TableMetaMutation) RemovedRowsIDs() (ids []int)
RemovedRows returns the removed IDs of the "rows" edge to the TableRow entity.
func (*TableMetaMutation) ResetColumns ¶
func (m *TableMetaMutation) ResetColumns()
ResetColumns resets all changes to the "columns" edge.
func (*TableMetaMutation) ResetCreatedAt ¶
func (m *TableMetaMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TableMetaMutation) ResetDescription ¶
func (m *TableMetaMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*TableMetaMutation) ResetEdge ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) ResetField ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) ResetModel ¶
func (m *TableMetaMutation) ResetModel()
ResetModel resets all changes to the "model" field.
func (*TableMetaMutation) ResetName ¶
func (m *TableMetaMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TableMetaMutation) ResetNanoid ¶
func (m *TableMetaMutation) ResetNanoid()
ResetNanoid resets all changes to the "nanoid" field.
func (*TableMetaMutation) ResetRows ¶
func (m *TableMetaMutation) ResetRows()
ResetRows resets all changes to the "rows" edge.
func (*TableMetaMutation) ResetUpdatedAt ¶
func (m *TableMetaMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TableMetaMutation) RowsCleared ¶
func (m *TableMetaMutation) RowsCleared() bool
RowsCleared reports if the "rows" edge to the TableRow entity was cleared.
func (*TableMetaMutation) RowsIDs ¶
func (m *TableMetaMutation) RowsIDs() (ids []int)
RowsIDs returns the "rows" edge IDs in the mutation.
func (*TableMetaMutation) SetCreatedAt ¶
func (m *TableMetaMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TableMetaMutation) SetDescription ¶
func (m *TableMetaMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*TableMetaMutation) SetField ¶
func (m *TableMetaMutation) 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 (*TableMetaMutation) SetModel ¶
func (m *TableMetaMutation) SetModel(s string)
SetModel sets the "model" field.
func (*TableMetaMutation) SetName ¶
func (m *TableMetaMutation) SetName(s string)
SetName sets the "name" field.
func (*TableMetaMutation) SetNanoid ¶
func (m *TableMetaMutation) SetNanoid(s string)
SetNanoid sets the "nanoid" field.
func (*TableMetaMutation) SetOp ¶
func (m *TableMetaMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TableMetaMutation) SetUpdatedAt ¶
func (m *TableMetaMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (TableMetaMutation) Tx ¶
func (m TableMetaMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TableMetaMutation) Type ¶
func (m *TableMetaMutation) Type() string
Type returns the node type of this mutation (TableMeta).
func (*TableMetaMutation) UpdatedAt ¶
func (m *TableMetaMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*TableMetaMutation) UpdatedAtCleared ¶
func (m *TableMetaMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*TableMetaMutation) Where ¶
func (m *TableMetaMutation) Where(ps ...predicate.TableMeta)
Where appends a list predicates to the TableMetaMutation builder.
func (*TableMetaMutation) WhereP ¶
func (m *TableMetaMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TableMetaMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TableMetaQuery ¶
type TableMetaQuery struct {
// contains filtered or unexported fields
}
TableMetaQuery is the builder for querying TableMeta entities.
func (*TableMetaQuery) Aggregate ¶
func (tmq *TableMetaQuery) Aggregate(fns ...AggregateFunc) *TableMetaSelect
Aggregate returns a TableMetaSelect configured with the given aggregations.
func (*TableMetaQuery) All ¶
func (tmq *TableMetaQuery) All(ctx context.Context) ([]*TableMeta, error)
All executes the query and returns a list of TableMetaSlice.
func (*TableMetaQuery) AllX ¶
func (tmq *TableMetaQuery) AllX(ctx context.Context) []*TableMeta
AllX is like All, but panics if an error occurs.
func (*TableMetaQuery) Clone ¶
func (tmq *TableMetaQuery) Clone() *TableMetaQuery
Clone returns a duplicate of the TableMetaQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TableMetaQuery) Count ¶
func (tmq *TableMetaQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TableMetaQuery) CountX ¶
func (tmq *TableMetaQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TableMetaQuery) Exist ¶
func (tmq *TableMetaQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TableMetaQuery) ExistX ¶
func (tmq *TableMetaQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TableMetaQuery) First ¶
func (tmq *TableMetaQuery) First(ctx context.Context) (*TableMeta, error)
First returns the first TableMeta entity from the query. Returns a *NotFoundError when no TableMeta was found.
func (*TableMetaQuery) FirstID ¶
func (tmq *TableMetaQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TableMeta ID from the query. Returns a *NotFoundError when no TableMeta ID was found.
func (*TableMetaQuery) FirstIDX ¶
func (tmq *TableMetaQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TableMetaQuery) FirstX ¶
func (tmq *TableMetaQuery) FirstX(ctx context.Context) *TableMeta
FirstX is like First, but panics if an error occurs.
func (*TableMetaQuery) ForShare ¶
func (tmq *TableMetaQuery) ForShare(opts ...sql.LockOption) *TableMetaQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*TableMetaQuery) ForUpdate ¶
func (tmq *TableMetaQuery) ForUpdate(opts ...sql.LockOption) *TableMetaQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*TableMetaQuery) GroupBy ¶
func (tmq *TableMetaQuery) GroupBy(field string, fields ...string) *TableMetaGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.TableMeta.Query().
GroupBy(tablemeta.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*TableMetaQuery) IDs ¶
func (tmq *TableMetaQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of TableMeta IDs.
func (*TableMetaQuery) IDsX ¶
func (tmq *TableMetaQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TableMetaQuery) Limit ¶
func (tmq *TableMetaQuery) Limit(limit int) *TableMetaQuery
Limit the number of records to be returned by this query.
func (*TableMetaQuery) Modify ¶
func (tmq *TableMetaQuery) Modify(modifiers ...func(s *sql.Selector)) *TableMetaSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TableMetaQuery) Offset ¶
func (tmq *TableMetaQuery) Offset(offset int) *TableMetaQuery
Offset to start from.
func (*TableMetaQuery) Only ¶
func (tmq *TableMetaQuery) Only(ctx context.Context) (*TableMeta, error)
Only returns a single TableMeta entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TableMeta entity is found. Returns a *NotFoundError when no TableMeta entities are found.
func (*TableMetaQuery) OnlyID ¶
func (tmq *TableMetaQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TableMeta ID in the query. Returns a *NotSingularError when more than one TableMeta ID is found. Returns a *NotFoundError when no entities are found.
func (*TableMetaQuery) OnlyIDX ¶
func (tmq *TableMetaQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TableMetaQuery) OnlyX ¶
func (tmq *TableMetaQuery) OnlyX(ctx context.Context) *TableMeta
OnlyX is like Only, but panics if an error occurs.
func (*TableMetaQuery) Order ¶
func (tmq *TableMetaQuery) Order(o ...tablemeta.OrderOption) *TableMetaQuery
Order specifies how the records should be ordered.
func (*TableMetaQuery) QueryColumns ¶
func (tmq *TableMetaQuery) QueryColumns() *TableColumnQuery
QueryColumns chains the current query on the "columns" edge.
func (*TableMetaQuery) QueryRows ¶
func (tmq *TableMetaQuery) QueryRows() *TableRowQuery
QueryRows chains the current query on the "rows" edge.
func (*TableMetaQuery) Select ¶
func (tmq *TableMetaQuery) Select(fields ...string) *TableMetaSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.TableMeta.Query().
Select(tablemeta.FieldCreatedAt).
Scan(ctx, &v)
func (*TableMetaQuery) Unique ¶
func (tmq *TableMetaQuery) Unique(unique bool) *TableMetaQuery
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 (*TableMetaQuery) Where ¶
func (tmq *TableMetaQuery) Where(ps ...predicate.TableMeta) *TableMetaQuery
Where adds a new predicate for the TableMetaQuery builder.
func (*TableMetaQuery) WithColumns ¶
func (tmq *TableMetaQuery) WithColumns(opts ...func(*TableColumnQuery)) *TableMetaQuery
WithColumns tells the query-builder to eager-load the nodes that are connected to the "columns" edge. The optional arguments are used to configure the query builder of the edge.
func (*TableMetaQuery) WithRows ¶
func (tmq *TableMetaQuery) WithRows(opts ...func(*TableRowQuery)) *TableMetaQuery
WithRows tells the query-builder to eager-load the nodes that are connected to the "rows" edge. The optional arguments are used to configure the query builder of the edge.
type TableMetaSelect ¶
type TableMetaSelect struct {
*TableMetaQuery
// contains filtered or unexported fields
}
TableMetaSelect is the builder for selecting fields of TableMeta entities.
func (*TableMetaSelect) Aggregate ¶
func (tms *TableMetaSelect) Aggregate(fns ...AggregateFunc) *TableMetaSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TableMetaSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TableMetaSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TableMetaSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TableMetaSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TableMetaSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TableMetaSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TableMetaSelect) Modify ¶
func (tms *TableMetaSelect) Modify(modifiers ...func(s *sql.Selector)) *TableMetaSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TableMetaSelect) Scan ¶
func (tms *TableMetaSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TableMetaSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TableMetaSlice ¶
type TableMetaSlice []*TableMeta
TableMetaSlice is a parsable slice of TableMeta.
type TableMetaUpdate ¶
type TableMetaUpdate struct {
// contains filtered or unexported fields
}
TableMetaUpdate is the builder for updating TableMeta entities.
func (*TableMetaUpdate) AddColumnIDs ¶
func (tmu *TableMetaUpdate) AddColumnIDs(ids ...int) *TableMetaUpdate
AddColumnIDs adds the "columns" edge to the TableColumn entity by IDs.
func (*TableMetaUpdate) AddColumns ¶
func (tmu *TableMetaUpdate) AddColumns(t ...*TableColumn) *TableMetaUpdate
AddColumns adds the "columns" edges to the TableColumn entity.
func (*TableMetaUpdate) AddRowIDs ¶
func (tmu *TableMetaUpdate) AddRowIDs(ids ...int) *TableMetaUpdate
AddRowIDs adds the "rows" edge to the TableRow entity by IDs.
func (*TableMetaUpdate) AddRows ¶
func (tmu *TableMetaUpdate) AddRows(t ...*TableRow) *TableMetaUpdate
AddRows adds the "rows" edges to the TableRow entity.
func (*TableMetaUpdate) ClearColumns ¶
func (tmu *TableMetaUpdate) ClearColumns() *TableMetaUpdate
ClearColumns clears all "columns" edges to the TableColumn entity.
func (*TableMetaUpdate) ClearNanoid ¶
func (tmu *TableMetaUpdate) ClearNanoid() *TableMetaUpdate
ClearNanoid clears the value of the "nanoid" field.
func (*TableMetaUpdate) ClearRows ¶
func (tmu *TableMetaUpdate) ClearRows() *TableMetaUpdate
ClearRows clears all "rows" edges to the TableRow entity.
func (*TableMetaUpdate) ClearUpdatedAt ¶
func (tmu *TableMetaUpdate) ClearUpdatedAt() *TableMetaUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableMetaUpdate) Exec ¶
func (tmu *TableMetaUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TableMetaUpdate) ExecX ¶
func (tmu *TableMetaUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableMetaUpdate) Modify ¶
func (tmu *TableMetaUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableMetaUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TableMetaUpdate) Mutation ¶
func (tmu *TableMetaUpdate) Mutation() *TableMetaMutation
Mutation returns the TableMetaMutation object of the builder.
func (*TableMetaUpdate) RemoveColumnIDs ¶
func (tmu *TableMetaUpdate) RemoveColumnIDs(ids ...int) *TableMetaUpdate
RemoveColumnIDs removes the "columns" edge to TableColumn entities by IDs.
func (*TableMetaUpdate) RemoveColumns ¶
func (tmu *TableMetaUpdate) RemoveColumns(t ...*TableColumn) *TableMetaUpdate
RemoveColumns removes "columns" edges to TableColumn entities.
func (*TableMetaUpdate) RemoveRowIDs ¶
func (tmu *TableMetaUpdate) RemoveRowIDs(ids ...int) *TableMetaUpdate
RemoveRowIDs removes the "rows" edge to TableRow entities by IDs.
func (*TableMetaUpdate) RemoveRows ¶
func (tmu *TableMetaUpdate) RemoveRows(t ...*TableRow) *TableMetaUpdate
RemoveRows removes "rows" edges to TableRow entities.
func (*TableMetaUpdate) Save ¶
func (tmu *TableMetaUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TableMetaUpdate) SaveX ¶
func (tmu *TableMetaUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TableMetaUpdate) SetDescription ¶
func (tmu *TableMetaUpdate) SetDescription(s string) *TableMetaUpdate
SetDescription sets the "description" field.
func (*TableMetaUpdate) SetModel ¶
func (tmu *TableMetaUpdate) SetModel(s string) *TableMetaUpdate
SetModel sets the "model" field.
func (*TableMetaUpdate) SetName ¶
func (tmu *TableMetaUpdate) SetName(s string) *TableMetaUpdate
SetName sets the "name" field.
func (*TableMetaUpdate) SetNanoid ¶
func (tmu *TableMetaUpdate) SetNanoid(s string) *TableMetaUpdate
SetNanoid sets the "nanoid" field.
func (*TableMetaUpdate) SetNillableDescription ¶
func (tmu *TableMetaUpdate) SetNillableDescription(s *string) *TableMetaUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TableMetaUpdate) SetNillableModel ¶
func (tmu *TableMetaUpdate) SetNillableModel(s *string) *TableMetaUpdate
SetNillableModel sets the "model" field if the given value is not nil.
func (*TableMetaUpdate) SetNillableName ¶
func (tmu *TableMetaUpdate) SetNillableName(s *string) *TableMetaUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*TableMetaUpdate) SetNillableNanoid ¶
func (tmu *TableMetaUpdate) SetNillableNanoid(s *string) *TableMetaUpdate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*TableMetaUpdate) SetUpdatedAt ¶
func (tmu *TableMetaUpdate) SetUpdatedAt(t time.Time) *TableMetaUpdate
SetUpdatedAt sets the "updated_at" field.
func (*TableMetaUpdate) Where ¶
func (tmu *TableMetaUpdate) Where(ps ...predicate.TableMeta) *TableMetaUpdate
Where appends a list predicates to the TableMetaUpdate builder.
type TableMetaUpdateOne ¶
type TableMetaUpdateOne struct {
// contains filtered or unexported fields
}
TableMetaUpdateOne is the builder for updating a single TableMeta entity.
func (*TableMetaUpdateOne) AddColumnIDs ¶
func (tmuo *TableMetaUpdateOne) AddColumnIDs(ids ...int) *TableMetaUpdateOne
AddColumnIDs adds the "columns" edge to the TableColumn entity by IDs.
func (*TableMetaUpdateOne) AddColumns ¶
func (tmuo *TableMetaUpdateOne) AddColumns(t ...*TableColumn) *TableMetaUpdateOne
AddColumns adds the "columns" edges to the TableColumn entity.
func (*TableMetaUpdateOne) AddRowIDs ¶
func (tmuo *TableMetaUpdateOne) AddRowIDs(ids ...int) *TableMetaUpdateOne
AddRowIDs adds the "rows" edge to the TableRow entity by IDs.
func (*TableMetaUpdateOne) AddRows ¶
func (tmuo *TableMetaUpdateOne) AddRows(t ...*TableRow) *TableMetaUpdateOne
AddRows adds the "rows" edges to the TableRow entity.
func (*TableMetaUpdateOne) ClearColumns ¶
func (tmuo *TableMetaUpdateOne) ClearColumns() *TableMetaUpdateOne
ClearColumns clears all "columns" edges to the TableColumn entity.
func (*TableMetaUpdateOne) ClearNanoid ¶
func (tmuo *TableMetaUpdateOne) ClearNanoid() *TableMetaUpdateOne
ClearNanoid clears the value of the "nanoid" field.
func (*TableMetaUpdateOne) ClearRows ¶
func (tmuo *TableMetaUpdateOne) ClearRows() *TableMetaUpdateOne
ClearRows clears all "rows" edges to the TableRow entity.
func (*TableMetaUpdateOne) ClearUpdatedAt ¶
func (tmuo *TableMetaUpdateOne) ClearUpdatedAt() *TableMetaUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableMetaUpdateOne) Exec ¶
func (tmuo *TableMetaUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TableMetaUpdateOne) ExecX ¶
func (tmuo *TableMetaUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableMetaUpdateOne) Modify ¶
func (tmuo *TableMetaUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableMetaUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TableMetaUpdateOne) Mutation ¶
func (tmuo *TableMetaUpdateOne) Mutation() *TableMetaMutation
Mutation returns the TableMetaMutation object of the builder.
func (*TableMetaUpdateOne) RemoveColumnIDs ¶
func (tmuo *TableMetaUpdateOne) RemoveColumnIDs(ids ...int) *TableMetaUpdateOne
RemoveColumnIDs removes the "columns" edge to TableColumn entities by IDs.
func (*TableMetaUpdateOne) RemoveColumns ¶
func (tmuo *TableMetaUpdateOne) RemoveColumns(t ...*TableColumn) *TableMetaUpdateOne
RemoveColumns removes "columns" edges to TableColumn entities.
func (*TableMetaUpdateOne) RemoveRowIDs ¶
func (tmuo *TableMetaUpdateOne) RemoveRowIDs(ids ...int) *TableMetaUpdateOne
RemoveRowIDs removes the "rows" edge to TableRow entities by IDs.
func (*TableMetaUpdateOne) RemoveRows ¶
func (tmuo *TableMetaUpdateOne) RemoveRows(t ...*TableRow) *TableMetaUpdateOne
RemoveRows removes "rows" edges to TableRow entities.
func (*TableMetaUpdateOne) Save ¶
func (tmuo *TableMetaUpdateOne) Save(ctx context.Context) (*TableMeta, error)
Save executes the query and returns the updated TableMeta entity.
func (*TableMetaUpdateOne) SaveX ¶
func (tmuo *TableMetaUpdateOne) SaveX(ctx context.Context) *TableMeta
SaveX is like Save, but panics if an error occurs.
func (*TableMetaUpdateOne) Select ¶
func (tmuo *TableMetaUpdateOne) Select(field string, fields ...string) *TableMetaUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TableMetaUpdateOne) SetDescription ¶
func (tmuo *TableMetaUpdateOne) SetDescription(s string) *TableMetaUpdateOne
SetDescription sets the "description" field.
func (*TableMetaUpdateOne) SetModel ¶
func (tmuo *TableMetaUpdateOne) SetModel(s string) *TableMetaUpdateOne
SetModel sets the "model" field.
func (*TableMetaUpdateOne) SetName ¶
func (tmuo *TableMetaUpdateOne) SetName(s string) *TableMetaUpdateOne
SetName sets the "name" field.
func (*TableMetaUpdateOne) SetNanoid ¶
func (tmuo *TableMetaUpdateOne) SetNanoid(s string) *TableMetaUpdateOne
SetNanoid sets the "nanoid" field.
func (*TableMetaUpdateOne) SetNillableDescription ¶
func (tmuo *TableMetaUpdateOne) SetNillableDescription(s *string) *TableMetaUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TableMetaUpdateOne) SetNillableModel ¶
func (tmuo *TableMetaUpdateOne) SetNillableModel(s *string) *TableMetaUpdateOne
SetNillableModel sets the "model" field if the given value is not nil.
func (*TableMetaUpdateOne) SetNillableName ¶
func (tmuo *TableMetaUpdateOne) SetNillableName(s *string) *TableMetaUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*TableMetaUpdateOne) SetNillableNanoid ¶
func (tmuo *TableMetaUpdateOne) SetNillableNanoid(s *string) *TableMetaUpdateOne
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*TableMetaUpdateOne) SetUpdatedAt ¶
func (tmuo *TableMetaUpdateOne) SetUpdatedAt(t time.Time) *TableMetaUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TableMetaUpdateOne) Where ¶
func (tmuo *TableMetaUpdateOne) Where(ps ...predicate.TableMeta) *TableMetaUpdateOne
Where appends a list predicates to the TableMetaUpdate builder.
type TableMetaUpsert ¶
TableMetaUpsert is the "OnConflict" setter.
func (*TableMetaUpsert) ClearNanoid ¶
func (u *TableMetaUpsert) ClearNanoid() *TableMetaUpsert
ClearNanoid clears the value of the "nanoid" field.
func (*TableMetaUpsert) ClearUpdatedAt ¶
func (u *TableMetaUpsert) ClearUpdatedAt() *TableMetaUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableMetaUpsert) SetDescription ¶
func (u *TableMetaUpsert) SetDescription(v string) *TableMetaUpsert
SetDescription sets the "description" field.
func (*TableMetaUpsert) SetModel ¶
func (u *TableMetaUpsert) SetModel(v string) *TableMetaUpsert
SetModel sets the "model" field.
func (*TableMetaUpsert) SetName ¶
func (u *TableMetaUpsert) SetName(v string) *TableMetaUpsert
SetName sets the "name" field.
func (*TableMetaUpsert) SetNanoid ¶
func (u *TableMetaUpsert) SetNanoid(v string) *TableMetaUpsert
SetNanoid sets the "nanoid" field.
func (*TableMetaUpsert) SetUpdatedAt ¶
func (u *TableMetaUpsert) SetUpdatedAt(v time.Time) *TableMetaUpsert
SetUpdatedAt sets the "updated_at" field.
func (*TableMetaUpsert) UpdateDescription ¶
func (u *TableMetaUpsert) UpdateDescription() *TableMetaUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TableMetaUpsert) UpdateModel ¶
func (u *TableMetaUpsert) UpdateModel() *TableMetaUpsert
UpdateModel sets the "model" field to the value that was provided on create.
func (*TableMetaUpsert) UpdateName ¶
func (u *TableMetaUpsert) UpdateName() *TableMetaUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*TableMetaUpsert) UpdateNanoid ¶
func (u *TableMetaUpsert) UpdateNanoid() *TableMetaUpsert
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*TableMetaUpsert) UpdateUpdatedAt ¶
func (u *TableMetaUpsert) UpdateUpdatedAt() *TableMetaUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TableMetaUpsertBulk ¶
type TableMetaUpsertBulk struct {
// contains filtered or unexported fields
}
TableMetaUpsertBulk is the builder for "upsert"-ing a bulk of TableMeta nodes.
func (*TableMetaUpsertBulk) ClearNanoid ¶
func (u *TableMetaUpsertBulk) ClearNanoid() *TableMetaUpsertBulk
ClearNanoid clears the value of the "nanoid" field.
func (*TableMetaUpsertBulk) ClearUpdatedAt ¶
func (u *TableMetaUpsertBulk) ClearUpdatedAt() *TableMetaUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableMetaUpsertBulk) DoNothing ¶
func (u *TableMetaUpsertBulk) DoNothing() *TableMetaUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TableMetaUpsertBulk) Exec ¶
func (u *TableMetaUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TableMetaUpsertBulk) ExecX ¶
func (u *TableMetaUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableMetaUpsertBulk) Ignore ¶
func (u *TableMetaUpsertBulk) Ignore() *TableMetaUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TableMeta.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TableMetaUpsertBulk) SetDescription ¶
func (u *TableMetaUpsertBulk) SetDescription(v string) *TableMetaUpsertBulk
SetDescription sets the "description" field.
func (*TableMetaUpsertBulk) SetModel ¶
func (u *TableMetaUpsertBulk) SetModel(v string) *TableMetaUpsertBulk
SetModel sets the "model" field.
func (*TableMetaUpsertBulk) SetName ¶
func (u *TableMetaUpsertBulk) SetName(v string) *TableMetaUpsertBulk
SetName sets the "name" field.
func (*TableMetaUpsertBulk) SetNanoid ¶
func (u *TableMetaUpsertBulk) SetNanoid(v string) *TableMetaUpsertBulk
SetNanoid sets the "nanoid" field.
func (*TableMetaUpsertBulk) SetUpdatedAt ¶
func (u *TableMetaUpsertBulk) SetUpdatedAt(v time.Time) *TableMetaUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*TableMetaUpsertBulk) Update ¶
func (u *TableMetaUpsertBulk) Update(set func(*TableMetaUpsert)) *TableMetaUpsertBulk
Update allows overriding fields `UPDATE` values. See the TableMetaCreateBulk.OnConflict documentation for more info.
func (*TableMetaUpsertBulk) UpdateDescription ¶
func (u *TableMetaUpsertBulk) UpdateDescription() *TableMetaUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TableMetaUpsertBulk) UpdateModel ¶
func (u *TableMetaUpsertBulk) UpdateModel() *TableMetaUpsertBulk
UpdateModel sets the "model" field to the value that was provided on create.
func (*TableMetaUpsertBulk) UpdateName ¶
func (u *TableMetaUpsertBulk) UpdateName() *TableMetaUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*TableMetaUpsertBulk) UpdateNanoid ¶
func (u *TableMetaUpsertBulk) UpdateNanoid() *TableMetaUpsertBulk
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*TableMetaUpsertBulk) UpdateNewValues ¶
func (u *TableMetaUpsertBulk) UpdateNewValues() *TableMetaUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TableMeta.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TableMetaUpsertBulk) UpdateUpdatedAt ¶
func (u *TableMetaUpsertBulk) UpdateUpdatedAt() *TableMetaUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TableMetaUpsertOne ¶
type TableMetaUpsertOne struct {
// contains filtered or unexported fields
}
TableMetaUpsertOne is the builder for "upsert"-ing
one TableMeta node.
func (*TableMetaUpsertOne) ClearNanoid ¶
func (u *TableMetaUpsertOne) ClearNanoid() *TableMetaUpsertOne
ClearNanoid clears the value of the "nanoid" field.
func (*TableMetaUpsertOne) ClearUpdatedAt ¶
func (u *TableMetaUpsertOne) ClearUpdatedAt() *TableMetaUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableMetaUpsertOne) DoNothing ¶
func (u *TableMetaUpsertOne) DoNothing() *TableMetaUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TableMetaUpsertOne) Exec ¶
func (u *TableMetaUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TableMetaUpsertOne) ExecX ¶
func (u *TableMetaUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableMetaUpsertOne) ID ¶
func (u *TableMetaUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TableMetaUpsertOne) IDX ¶
func (u *TableMetaUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*TableMetaUpsertOne) Ignore ¶
func (u *TableMetaUpsertOne) Ignore() *TableMetaUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TableMeta.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*TableMetaUpsertOne) SetDescription ¶
func (u *TableMetaUpsertOne) SetDescription(v string) *TableMetaUpsertOne
SetDescription sets the "description" field.
func (*TableMetaUpsertOne) SetModel ¶
func (u *TableMetaUpsertOne) SetModel(v string) *TableMetaUpsertOne
SetModel sets the "model" field.
func (*TableMetaUpsertOne) SetName ¶
func (u *TableMetaUpsertOne) SetName(v string) *TableMetaUpsertOne
SetName sets the "name" field.
func (*TableMetaUpsertOne) SetNanoid ¶
func (u *TableMetaUpsertOne) SetNanoid(v string) *TableMetaUpsertOne
SetNanoid sets the "nanoid" field.
func (*TableMetaUpsertOne) SetUpdatedAt ¶
func (u *TableMetaUpsertOne) SetUpdatedAt(v time.Time) *TableMetaUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*TableMetaUpsertOne) Update ¶
func (u *TableMetaUpsertOne) Update(set func(*TableMetaUpsert)) *TableMetaUpsertOne
Update allows overriding fields `UPDATE` values. See the TableMetaCreate.OnConflict documentation for more info.
func (*TableMetaUpsertOne) UpdateDescription ¶
func (u *TableMetaUpsertOne) UpdateDescription() *TableMetaUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TableMetaUpsertOne) UpdateModel ¶
func (u *TableMetaUpsertOne) UpdateModel() *TableMetaUpsertOne
UpdateModel sets the "model" field to the value that was provided on create.
func (*TableMetaUpsertOne) UpdateName ¶
func (u *TableMetaUpsertOne) UpdateName() *TableMetaUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*TableMetaUpsertOne) UpdateNanoid ¶
func (u *TableMetaUpsertOne) UpdateNanoid() *TableMetaUpsertOne
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*TableMetaUpsertOne) UpdateNewValues ¶
func (u *TableMetaUpsertOne) UpdateNewValues() *TableMetaUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TableMeta.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TableMetaUpsertOne) UpdateUpdatedAt ¶
func (u *TableMetaUpsertOne) UpdateUpdatedAt() *TableMetaUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TableRow ¶
type TableRow struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Nanoid holds the value of the "nanoid" field.
Nanoid string `json:"nanoid,omitempty"`
// Cells holds the value of the "cells" field.
Cells []*schema.CellValue `json:"cells,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the TableRowQuery when eager-loading is set.
Edges TableRowEdges `json:"edges"`
// contains filtered or unexported fields
}
TableRow is the model entity for the TableRow schema.
func (*TableRow) QueryTablemeta ¶
func (tr *TableRow) QueryTablemeta() *TableMetaQuery
QueryTablemeta queries the "tablemeta" edge of the TableRow entity.
func (*TableRow) Unwrap ¶
Unwrap unwraps the TableRow 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 (*TableRow) Update ¶
func (tr *TableRow) Update() *TableRowUpdateOne
Update returns a builder for updating this TableRow. Note that you need to call TableRow.Unwrap() before calling this method if this TableRow was returned from a transaction, and the transaction was committed or rolled back.
type TableRowClient ¶
type TableRowClient struct {
// contains filtered or unexported fields
}
TableRowClient is a client for the TableRow schema.
func NewTableRowClient ¶
func NewTableRowClient(c config) *TableRowClient
NewTableRowClient returns a client for the TableRow from the given config.
func (*TableRowClient) Create ¶
func (c *TableRowClient) Create() *TableRowCreate
Create returns a builder for creating a TableRow entity.
func (*TableRowClient) CreateBulk ¶
func (c *TableRowClient) CreateBulk(builders ...*TableRowCreate) *TableRowCreateBulk
CreateBulk returns a builder for creating a bulk of TableRow entities.
func (*TableRowClient) Delete ¶
func (c *TableRowClient) Delete() *TableRowDelete
Delete returns a delete builder for TableRow.
func (*TableRowClient) DeleteOne ¶
func (c *TableRowClient) DeleteOne(tr *TableRow) *TableRowDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TableRowClient) DeleteOneID ¶
func (c *TableRowClient) DeleteOneID(id int) *TableRowDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TableRowClient) GetX ¶
func (c *TableRowClient) GetX(ctx context.Context, id int) *TableRow
GetX is like Get, but panics if an error occurs.
func (*TableRowClient) Hooks ¶
func (c *TableRowClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TableRowClient) Intercept ¶
func (c *TableRowClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tablerow.Intercept(f(g(h())))`.
func (*TableRowClient) Interceptors ¶
func (c *TableRowClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TableRowClient) MapCreateBulk ¶
func (c *TableRowClient) MapCreateBulk(slice any, setFunc func(*TableRowCreate, int)) *TableRowCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TableRowClient) Query ¶
func (c *TableRowClient) Query() *TableRowQuery
Query returns a query builder for TableRow.
func (*TableRowClient) QueryTablemeta ¶
func (c *TableRowClient) QueryTablemeta(tr *TableRow) *TableMetaQuery
QueryTablemeta queries the tablemeta edge of a TableRow.
func (*TableRowClient) Update ¶
func (c *TableRowClient) Update() *TableRowUpdate
Update returns an update builder for TableRow.
func (*TableRowClient) UpdateOne ¶
func (c *TableRowClient) UpdateOne(tr *TableRow) *TableRowUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TableRowClient) UpdateOneID ¶
func (c *TableRowClient) UpdateOneID(id int) *TableRowUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TableRowClient) Use ¶
func (c *TableRowClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tablerow.Hooks(f(g(h())))`.
type TableRowCreate ¶
type TableRowCreate struct {
// contains filtered or unexported fields
}
TableRowCreate is the builder for creating a TableRow entity.
func (*TableRowCreate) Exec ¶
func (trc *TableRowCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TableRowCreate) ExecX ¶
func (trc *TableRowCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableRowCreate) Mutation ¶
func (trc *TableRowCreate) Mutation() *TableRowMutation
Mutation returns the TableRowMutation object of the builder.
func (*TableRowCreate) OnConflict ¶
func (trc *TableRowCreate) OnConflict(opts ...sql.ConflictOption) *TableRowUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TableRow.Create().
SetCreatedAt(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.TableRowUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*TableRowCreate) OnConflictColumns ¶
func (trc *TableRowCreate) OnConflictColumns(columns ...string) *TableRowUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TableRow.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TableRowCreate) Save ¶
func (trc *TableRowCreate) Save(ctx context.Context) (*TableRow, error)
Save creates the TableRow in the database.
func (*TableRowCreate) SaveX ¶
func (trc *TableRowCreate) SaveX(ctx context.Context) *TableRow
SaveX calls Save and panics if Save returns an error.
func (*TableRowCreate) SetCells ¶
func (trc *TableRowCreate) SetCells(sv []*schema.CellValue) *TableRowCreate
SetCells sets the "cells" field.
func (*TableRowCreate) SetCreatedAt ¶
func (trc *TableRowCreate) SetCreatedAt(t time.Time) *TableRowCreate
SetCreatedAt sets the "created_at" field.
func (*TableRowCreate) SetNanoid ¶
func (trc *TableRowCreate) SetNanoid(s string) *TableRowCreate
SetNanoid sets the "nanoid" field.
func (*TableRowCreate) SetNillableCreatedAt ¶
func (trc *TableRowCreate) SetNillableCreatedAt(t *time.Time) *TableRowCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TableRowCreate) SetNillableNanoid ¶
func (trc *TableRowCreate) SetNillableNanoid(s *string) *TableRowCreate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*TableRowCreate) SetNillableUpdatedAt ¶
func (trc *TableRowCreate) SetNillableUpdatedAt(t *time.Time) *TableRowCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*TableRowCreate) SetTablemeta ¶
func (trc *TableRowCreate) SetTablemeta(t *TableMeta) *TableRowCreate
SetTablemeta sets the "tablemeta" edge to the TableMeta entity.
func (*TableRowCreate) SetTablemetaID ¶
func (trc *TableRowCreate) SetTablemetaID(id int) *TableRowCreate
SetTablemetaID sets the "tablemeta" edge to the TableMeta entity by ID.
func (*TableRowCreate) SetUpdatedAt ¶
func (trc *TableRowCreate) SetUpdatedAt(t time.Time) *TableRowCreate
SetUpdatedAt sets the "updated_at" field.
type TableRowCreateBulk ¶
type TableRowCreateBulk struct {
// contains filtered or unexported fields
}
TableRowCreateBulk is the builder for creating many TableRow entities in bulk.
func (*TableRowCreateBulk) Exec ¶
func (trcb *TableRowCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TableRowCreateBulk) ExecX ¶
func (trcb *TableRowCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableRowCreateBulk) OnConflict ¶
func (trcb *TableRowCreateBulk) OnConflict(opts ...sql.ConflictOption) *TableRowUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TableRow.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.TableRowUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*TableRowCreateBulk) OnConflictColumns ¶
func (trcb *TableRowCreateBulk) OnConflictColumns(columns ...string) *TableRowUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TableRow.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TableRowDelete ¶
type TableRowDelete struct {
// contains filtered or unexported fields
}
TableRowDelete is the builder for deleting a TableRow entity.
func (*TableRowDelete) Exec ¶
func (trd *TableRowDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TableRowDelete) ExecX ¶
func (trd *TableRowDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TableRowDelete) Where ¶
func (trd *TableRowDelete) Where(ps ...predicate.TableRow) *TableRowDelete
Where appends a list predicates to the TableRowDelete builder.
type TableRowDeleteOne ¶
type TableRowDeleteOne struct {
// contains filtered or unexported fields
}
TableRowDeleteOne is the builder for deleting a single TableRow entity.
func (*TableRowDeleteOne) Exec ¶
func (trdo *TableRowDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TableRowDeleteOne) ExecX ¶
func (trdo *TableRowDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableRowDeleteOne) Where ¶
func (trdo *TableRowDeleteOne) Where(ps ...predicate.TableRow) *TableRowDeleteOne
Where appends a list predicates to the TableRowDelete builder.
type TableRowEdges ¶
type TableRowEdges struct {
// Tablemeta holds the value of the tablemeta edge.
Tablemeta *TableMeta `json:"tablemeta,omitempty"`
// contains filtered or unexported fields
}
TableRowEdges holds the relations/edges for other nodes in the graph.
func (TableRowEdges) TablemetaOrErr ¶
func (e TableRowEdges) TablemetaOrErr() (*TableMeta, error)
TablemetaOrErr returns the Tablemeta value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TableRowGroupBy ¶
type TableRowGroupBy struct {
// contains filtered or unexported fields
}
TableRowGroupBy is the group-by builder for TableRow entities.
func (*TableRowGroupBy) Aggregate ¶
func (trgb *TableRowGroupBy) Aggregate(fns ...AggregateFunc) *TableRowGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TableRowGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TableRowGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TableRowGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TableRowGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TableRowGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TableRowGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TableRowGroupBy) Scan ¶
func (trgb *TableRowGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TableRowGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TableRowMutation ¶
type TableRowMutation struct {
// contains filtered or unexported fields
}
TableRowMutation represents an operation that mutates the TableRow nodes in the graph.
func (*TableRowMutation) AddField ¶
func (m *TableRowMutation) 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 (*TableRowMutation) AddedEdges ¶
func (m *TableRowMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TableRowMutation) AddedField ¶
func (m *TableRowMutation) 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 (*TableRowMutation) AddedFields ¶
func (m *TableRowMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TableRowMutation) AddedIDs ¶
func (m *TableRowMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TableRowMutation) AppendCells ¶
func (m *TableRowMutation) AppendCells(sv []*schema.CellValue)
AppendCells adds sv to the "cells" field.
func (*TableRowMutation) AppendedCells ¶
func (m *TableRowMutation) AppendedCells() ([]*schema.CellValue, bool)
AppendedCells returns the list of values that were appended to the "cells" field in this mutation.
func (*TableRowMutation) Cells ¶
func (m *TableRowMutation) Cells() (r []*schema.CellValue, exists bool)
Cells returns the value of the "cells" field in the mutation.
func (*TableRowMutation) CellsCleared ¶
func (m *TableRowMutation) CellsCleared() bool
CellsCleared returns if the "cells" field was cleared in this mutation.
func (*TableRowMutation) ClearCells ¶
func (m *TableRowMutation) ClearCells()
ClearCells clears the value of the "cells" field.
func (*TableRowMutation) ClearCreatedAt ¶
func (m *TableRowMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*TableRowMutation) ClearEdge ¶
func (m *TableRowMutation) 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 (*TableRowMutation) ClearField ¶
func (m *TableRowMutation) 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 (*TableRowMutation) ClearNanoid ¶
func (m *TableRowMutation) ClearNanoid()
ClearNanoid clears the value of the "nanoid" field.
func (*TableRowMutation) ClearTablemeta ¶
func (m *TableRowMutation) ClearTablemeta()
ClearTablemeta clears the "tablemeta" edge to the TableMeta entity.
func (*TableRowMutation) ClearUpdatedAt ¶
func (m *TableRowMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableRowMutation) ClearedEdges ¶
func (m *TableRowMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TableRowMutation) ClearedFields ¶
func (m *TableRowMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TableRowMutation) Client ¶
func (m TableRowMutation) 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 (*TableRowMutation) CreatedAt ¶
func (m *TableRowMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TableRowMutation) CreatedAtCleared ¶
func (m *TableRowMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*TableRowMutation) EdgeCleared ¶
func (m *TableRowMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TableRowMutation) Field ¶
func (m *TableRowMutation) 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 (*TableRowMutation) FieldCleared ¶
func (m *TableRowMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TableRowMutation) Fields ¶
func (m *TableRowMutation) 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 (*TableRowMutation) ID ¶
func (m *TableRowMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TableRowMutation) IDs ¶
func (m *TableRowMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TableRowMutation) Nanoid ¶
func (m *TableRowMutation) Nanoid() (r string, exists bool)
Nanoid returns the value of the "nanoid" field in the mutation.
func (*TableRowMutation) NanoidCleared ¶
func (m *TableRowMutation) NanoidCleared() bool
NanoidCleared returns if the "nanoid" field was cleared in this mutation.
func (*TableRowMutation) OldCells ¶
OldCells returns the old "cells" field's value of the TableRow entity. If the TableRow 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 (*TableRowMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the TableRow entity. If the TableRow 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 (*TableRowMutation) 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 (*TableRowMutation) OldNanoid ¶
func (m *TableRowMutation) OldNanoid(ctx context.Context) (v string, err error)
OldNanoid returns the old "nanoid" field's value of the TableRow entity. If the TableRow 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 (*TableRowMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the TableRow entity. If the TableRow 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 (*TableRowMutation) RemovedEdges ¶
func (m *TableRowMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TableRowMutation) RemovedIDs ¶
func (m *TableRowMutation) 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 (*TableRowMutation) ResetCells ¶
func (m *TableRowMutation) ResetCells()
ResetCells resets all changes to the "cells" field.
func (*TableRowMutation) ResetCreatedAt ¶
func (m *TableRowMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TableRowMutation) ResetEdge ¶
func (m *TableRowMutation) 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 (*TableRowMutation) ResetField ¶
func (m *TableRowMutation) 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 (*TableRowMutation) ResetNanoid ¶
func (m *TableRowMutation) ResetNanoid()
ResetNanoid resets all changes to the "nanoid" field.
func (*TableRowMutation) ResetTablemeta ¶
func (m *TableRowMutation) ResetTablemeta()
ResetTablemeta resets all changes to the "tablemeta" edge.
func (*TableRowMutation) ResetUpdatedAt ¶
func (m *TableRowMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TableRowMutation) SetCells ¶
func (m *TableRowMutation) SetCells(sv []*schema.CellValue)
SetCells sets the "cells" field.
func (*TableRowMutation) SetCreatedAt ¶
func (m *TableRowMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TableRowMutation) SetField ¶
func (m *TableRowMutation) 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 (*TableRowMutation) SetNanoid ¶
func (m *TableRowMutation) SetNanoid(s string)
SetNanoid sets the "nanoid" field.
func (*TableRowMutation) SetOp ¶
func (m *TableRowMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TableRowMutation) SetTablemetaID ¶
func (m *TableRowMutation) SetTablemetaID(id int)
SetTablemetaID sets the "tablemeta" edge to the TableMeta entity by id.
func (*TableRowMutation) SetUpdatedAt ¶
func (m *TableRowMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*TableRowMutation) TablemetaCleared ¶
func (m *TableRowMutation) TablemetaCleared() bool
TablemetaCleared reports if the "tablemeta" edge to the TableMeta entity was cleared.
func (*TableRowMutation) TablemetaID ¶
func (m *TableRowMutation) TablemetaID() (id int, exists bool)
TablemetaID returns the "tablemeta" edge ID in the mutation.
func (*TableRowMutation) TablemetaIDs ¶
func (m *TableRowMutation) TablemetaIDs() (ids []int)
TablemetaIDs returns the "tablemeta" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TablemetaID instead. It exists only for internal usage by the builders.
func (TableRowMutation) Tx ¶
func (m TableRowMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TableRowMutation) Type ¶
func (m *TableRowMutation) Type() string
Type returns the node type of this mutation (TableRow).
func (*TableRowMutation) UpdatedAt ¶
func (m *TableRowMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*TableRowMutation) UpdatedAtCleared ¶
func (m *TableRowMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*TableRowMutation) Where ¶
func (m *TableRowMutation) Where(ps ...predicate.TableRow)
Where appends a list predicates to the TableRowMutation builder.
func (*TableRowMutation) WhereP ¶
func (m *TableRowMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TableRowMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TableRowQuery ¶
type TableRowQuery struct {
// contains filtered or unexported fields
}
TableRowQuery is the builder for querying TableRow entities.
func (*TableRowQuery) Aggregate ¶
func (trq *TableRowQuery) Aggregate(fns ...AggregateFunc) *TableRowSelect
Aggregate returns a TableRowSelect configured with the given aggregations.
func (*TableRowQuery) All ¶
func (trq *TableRowQuery) All(ctx context.Context) ([]*TableRow, error)
All executes the query and returns a list of TableRows.
func (*TableRowQuery) AllX ¶
func (trq *TableRowQuery) AllX(ctx context.Context) []*TableRow
AllX is like All, but panics if an error occurs.
func (*TableRowQuery) Clone ¶
func (trq *TableRowQuery) Clone() *TableRowQuery
Clone returns a duplicate of the TableRowQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TableRowQuery) Count ¶
func (trq *TableRowQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TableRowQuery) CountX ¶
func (trq *TableRowQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TableRowQuery) Exist ¶
func (trq *TableRowQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TableRowQuery) ExistX ¶
func (trq *TableRowQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TableRowQuery) First ¶
func (trq *TableRowQuery) First(ctx context.Context) (*TableRow, error)
First returns the first TableRow entity from the query. Returns a *NotFoundError when no TableRow was found.
func (*TableRowQuery) FirstID ¶
func (trq *TableRowQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TableRow ID from the query. Returns a *NotFoundError when no TableRow ID was found.
func (*TableRowQuery) FirstIDX ¶
func (trq *TableRowQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TableRowQuery) FirstX ¶
func (trq *TableRowQuery) FirstX(ctx context.Context) *TableRow
FirstX is like First, but panics if an error occurs.
func (*TableRowQuery) ForShare ¶
func (trq *TableRowQuery) ForShare(opts ...sql.LockOption) *TableRowQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*TableRowQuery) ForUpdate ¶
func (trq *TableRowQuery) ForUpdate(opts ...sql.LockOption) *TableRowQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*TableRowQuery) GroupBy ¶
func (trq *TableRowQuery) GroupBy(field string, fields ...string) *TableRowGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.TableRow.Query().
GroupBy(tablerow.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*TableRowQuery) IDs ¶
func (trq *TableRowQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of TableRow IDs.
func (*TableRowQuery) IDsX ¶
func (trq *TableRowQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TableRowQuery) Limit ¶
func (trq *TableRowQuery) Limit(limit int) *TableRowQuery
Limit the number of records to be returned by this query.
func (*TableRowQuery) Modify ¶
func (trq *TableRowQuery) Modify(modifiers ...func(s *sql.Selector)) *TableRowSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TableRowQuery) Offset ¶
func (trq *TableRowQuery) Offset(offset int) *TableRowQuery
Offset to start from.
func (*TableRowQuery) Only ¶
func (trq *TableRowQuery) Only(ctx context.Context) (*TableRow, error)
Only returns a single TableRow entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TableRow entity is found. Returns a *NotFoundError when no TableRow entities are found.
func (*TableRowQuery) OnlyID ¶
func (trq *TableRowQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TableRow ID in the query. Returns a *NotSingularError when more than one TableRow ID is found. Returns a *NotFoundError when no entities are found.
func (*TableRowQuery) OnlyIDX ¶
func (trq *TableRowQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TableRowQuery) OnlyX ¶
func (trq *TableRowQuery) OnlyX(ctx context.Context) *TableRow
OnlyX is like Only, but panics if an error occurs.
func (*TableRowQuery) Order ¶
func (trq *TableRowQuery) Order(o ...tablerow.OrderOption) *TableRowQuery
Order specifies how the records should be ordered.
func (*TableRowQuery) QueryTablemeta ¶
func (trq *TableRowQuery) QueryTablemeta() *TableMetaQuery
QueryTablemeta chains the current query on the "tablemeta" edge.
func (*TableRowQuery) Select ¶
func (trq *TableRowQuery) Select(fields ...string) *TableRowSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.TableRow.Query().
Select(tablerow.FieldCreatedAt).
Scan(ctx, &v)
func (*TableRowQuery) Unique ¶
func (trq *TableRowQuery) Unique(unique bool) *TableRowQuery
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 (*TableRowQuery) Where ¶
func (trq *TableRowQuery) Where(ps ...predicate.TableRow) *TableRowQuery
Where adds a new predicate for the TableRowQuery builder.
func (*TableRowQuery) WithTablemeta ¶
func (trq *TableRowQuery) WithTablemeta(opts ...func(*TableMetaQuery)) *TableRowQuery
WithTablemeta tells the query-builder to eager-load the nodes that are connected to the "tablemeta" edge. The optional arguments are used to configure the query builder of the edge.
type TableRowSelect ¶
type TableRowSelect struct {
*TableRowQuery
// contains filtered or unexported fields
}
TableRowSelect is the builder for selecting fields of TableRow entities.
func (*TableRowSelect) Aggregate ¶
func (trs *TableRowSelect) Aggregate(fns ...AggregateFunc) *TableRowSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TableRowSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TableRowSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TableRowSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TableRowSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TableRowSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TableRowSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TableRowSelect) Modify ¶
func (trs *TableRowSelect) Modify(modifiers ...func(s *sql.Selector)) *TableRowSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TableRowSelect) Scan ¶
func (trs *TableRowSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TableRowSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TableRowUpdate ¶
type TableRowUpdate struct {
// contains filtered or unexported fields
}
TableRowUpdate is the builder for updating TableRow entities.
func (*TableRowUpdate) AppendCells ¶
func (tru *TableRowUpdate) AppendCells(sv []*schema.CellValue) *TableRowUpdate
AppendCells appends sv to the "cells" field.
func (*TableRowUpdate) ClearCells ¶
func (tru *TableRowUpdate) ClearCells() *TableRowUpdate
ClearCells clears the value of the "cells" field.
func (*TableRowUpdate) ClearNanoid ¶
func (tru *TableRowUpdate) ClearNanoid() *TableRowUpdate
ClearNanoid clears the value of the "nanoid" field.
func (*TableRowUpdate) ClearTablemeta ¶
func (tru *TableRowUpdate) ClearTablemeta() *TableRowUpdate
ClearTablemeta clears the "tablemeta" edge to the TableMeta entity.
func (*TableRowUpdate) ClearUpdatedAt ¶
func (tru *TableRowUpdate) ClearUpdatedAt() *TableRowUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableRowUpdate) Exec ¶
func (tru *TableRowUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TableRowUpdate) ExecX ¶
func (tru *TableRowUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableRowUpdate) Modify ¶
func (tru *TableRowUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableRowUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TableRowUpdate) Mutation ¶
func (tru *TableRowUpdate) Mutation() *TableRowMutation
Mutation returns the TableRowMutation object of the builder.
func (*TableRowUpdate) Save ¶
func (tru *TableRowUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TableRowUpdate) SaveX ¶
func (tru *TableRowUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TableRowUpdate) SetCells ¶
func (tru *TableRowUpdate) SetCells(sv []*schema.CellValue) *TableRowUpdate
SetCells sets the "cells" field.
func (*TableRowUpdate) SetNanoid ¶
func (tru *TableRowUpdate) SetNanoid(s string) *TableRowUpdate
SetNanoid sets the "nanoid" field.
func (*TableRowUpdate) SetNillableNanoid ¶
func (tru *TableRowUpdate) SetNillableNanoid(s *string) *TableRowUpdate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*TableRowUpdate) SetTablemeta ¶
func (tru *TableRowUpdate) SetTablemeta(t *TableMeta) *TableRowUpdate
SetTablemeta sets the "tablemeta" edge to the TableMeta entity.
func (*TableRowUpdate) SetTablemetaID ¶
func (tru *TableRowUpdate) SetTablemetaID(id int) *TableRowUpdate
SetTablemetaID sets the "tablemeta" edge to the TableMeta entity by ID.
func (*TableRowUpdate) SetUpdatedAt ¶
func (tru *TableRowUpdate) SetUpdatedAt(t time.Time) *TableRowUpdate
SetUpdatedAt sets the "updated_at" field.
func (*TableRowUpdate) Where ¶
func (tru *TableRowUpdate) Where(ps ...predicate.TableRow) *TableRowUpdate
Where appends a list predicates to the TableRowUpdate builder.
type TableRowUpdateOne ¶
type TableRowUpdateOne struct {
// contains filtered or unexported fields
}
TableRowUpdateOne is the builder for updating a single TableRow entity.
func (*TableRowUpdateOne) AppendCells ¶
func (truo *TableRowUpdateOne) AppendCells(sv []*schema.CellValue) *TableRowUpdateOne
AppendCells appends sv to the "cells" field.
func (*TableRowUpdateOne) ClearCells ¶
func (truo *TableRowUpdateOne) ClearCells() *TableRowUpdateOne
ClearCells clears the value of the "cells" field.
func (*TableRowUpdateOne) ClearNanoid ¶
func (truo *TableRowUpdateOne) ClearNanoid() *TableRowUpdateOne
ClearNanoid clears the value of the "nanoid" field.
func (*TableRowUpdateOne) ClearTablemeta ¶
func (truo *TableRowUpdateOne) ClearTablemeta() *TableRowUpdateOne
ClearTablemeta clears the "tablemeta" edge to the TableMeta entity.
func (*TableRowUpdateOne) ClearUpdatedAt ¶
func (truo *TableRowUpdateOne) ClearUpdatedAt() *TableRowUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableRowUpdateOne) Exec ¶
func (truo *TableRowUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TableRowUpdateOne) ExecX ¶
func (truo *TableRowUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableRowUpdateOne) Modify ¶
func (truo *TableRowUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TableRowUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TableRowUpdateOne) Mutation ¶
func (truo *TableRowUpdateOne) Mutation() *TableRowMutation
Mutation returns the TableRowMutation object of the builder.
func (*TableRowUpdateOne) Save ¶
func (truo *TableRowUpdateOne) Save(ctx context.Context) (*TableRow, error)
Save executes the query and returns the updated TableRow entity.
func (*TableRowUpdateOne) SaveX ¶
func (truo *TableRowUpdateOne) SaveX(ctx context.Context) *TableRow
SaveX is like Save, but panics if an error occurs.
func (*TableRowUpdateOne) Select ¶
func (truo *TableRowUpdateOne) Select(field string, fields ...string) *TableRowUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TableRowUpdateOne) SetCells ¶
func (truo *TableRowUpdateOne) SetCells(sv []*schema.CellValue) *TableRowUpdateOne
SetCells sets the "cells" field.
func (*TableRowUpdateOne) SetNanoid ¶
func (truo *TableRowUpdateOne) SetNanoid(s string) *TableRowUpdateOne
SetNanoid sets the "nanoid" field.
func (*TableRowUpdateOne) SetNillableNanoid ¶
func (truo *TableRowUpdateOne) SetNillableNanoid(s *string) *TableRowUpdateOne
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*TableRowUpdateOne) SetTablemeta ¶
func (truo *TableRowUpdateOne) SetTablemeta(t *TableMeta) *TableRowUpdateOne
SetTablemeta sets the "tablemeta" edge to the TableMeta entity.
func (*TableRowUpdateOne) SetTablemetaID ¶
func (truo *TableRowUpdateOne) SetTablemetaID(id int) *TableRowUpdateOne
SetTablemetaID sets the "tablemeta" edge to the TableMeta entity by ID.
func (*TableRowUpdateOne) SetUpdatedAt ¶
func (truo *TableRowUpdateOne) SetUpdatedAt(t time.Time) *TableRowUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TableRowUpdateOne) Where ¶
func (truo *TableRowUpdateOne) Where(ps ...predicate.TableRow) *TableRowUpdateOne
Where appends a list predicates to the TableRowUpdate builder.
type TableRowUpsert ¶
TableRowUpsert is the "OnConflict" setter.
func (*TableRowUpsert) ClearCells ¶
func (u *TableRowUpsert) ClearCells() *TableRowUpsert
ClearCells clears the value of the "cells" field.
func (*TableRowUpsert) ClearNanoid ¶
func (u *TableRowUpsert) ClearNanoid() *TableRowUpsert
ClearNanoid clears the value of the "nanoid" field.
func (*TableRowUpsert) ClearUpdatedAt ¶
func (u *TableRowUpsert) ClearUpdatedAt() *TableRowUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableRowUpsert) SetCells ¶
func (u *TableRowUpsert) SetCells(v []*schema.CellValue) *TableRowUpsert
SetCells sets the "cells" field.
func (*TableRowUpsert) SetNanoid ¶
func (u *TableRowUpsert) SetNanoid(v string) *TableRowUpsert
SetNanoid sets the "nanoid" field.
func (*TableRowUpsert) SetUpdatedAt ¶
func (u *TableRowUpsert) SetUpdatedAt(v time.Time) *TableRowUpsert
SetUpdatedAt sets the "updated_at" field.
func (*TableRowUpsert) UpdateCells ¶
func (u *TableRowUpsert) UpdateCells() *TableRowUpsert
UpdateCells sets the "cells" field to the value that was provided on create.
func (*TableRowUpsert) UpdateNanoid ¶
func (u *TableRowUpsert) UpdateNanoid() *TableRowUpsert
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*TableRowUpsert) UpdateUpdatedAt ¶
func (u *TableRowUpsert) UpdateUpdatedAt() *TableRowUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TableRowUpsertBulk ¶
type TableRowUpsertBulk struct {
// contains filtered or unexported fields
}
TableRowUpsertBulk is the builder for "upsert"-ing a bulk of TableRow nodes.
func (*TableRowUpsertBulk) ClearCells ¶
func (u *TableRowUpsertBulk) ClearCells() *TableRowUpsertBulk
ClearCells clears the value of the "cells" field.
func (*TableRowUpsertBulk) ClearNanoid ¶
func (u *TableRowUpsertBulk) ClearNanoid() *TableRowUpsertBulk
ClearNanoid clears the value of the "nanoid" field.
func (*TableRowUpsertBulk) ClearUpdatedAt ¶
func (u *TableRowUpsertBulk) ClearUpdatedAt() *TableRowUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableRowUpsertBulk) DoNothing ¶
func (u *TableRowUpsertBulk) DoNothing() *TableRowUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TableRowUpsertBulk) Exec ¶
func (u *TableRowUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TableRowUpsertBulk) ExecX ¶
func (u *TableRowUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableRowUpsertBulk) Ignore ¶
func (u *TableRowUpsertBulk) Ignore() *TableRowUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TableRow.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TableRowUpsertBulk) SetCells ¶
func (u *TableRowUpsertBulk) SetCells(v []*schema.CellValue) *TableRowUpsertBulk
SetCells sets the "cells" field.
func (*TableRowUpsertBulk) SetNanoid ¶
func (u *TableRowUpsertBulk) SetNanoid(v string) *TableRowUpsertBulk
SetNanoid sets the "nanoid" field.
func (*TableRowUpsertBulk) SetUpdatedAt ¶
func (u *TableRowUpsertBulk) SetUpdatedAt(v time.Time) *TableRowUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*TableRowUpsertBulk) Update ¶
func (u *TableRowUpsertBulk) Update(set func(*TableRowUpsert)) *TableRowUpsertBulk
Update allows overriding fields `UPDATE` values. See the TableRowCreateBulk.OnConflict documentation for more info.
func (*TableRowUpsertBulk) UpdateCells ¶
func (u *TableRowUpsertBulk) UpdateCells() *TableRowUpsertBulk
UpdateCells sets the "cells" field to the value that was provided on create.
func (*TableRowUpsertBulk) UpdateNanoid ¶
func (u *TableRowUpsertBulk) UpdateNanoid() *TableRowUpsertBulk
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*TableRowUpsertBulk) UpdateNewValues ¶
func (u *TableRowUpsertBulk) UpdateNewValues() *TableRowUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TableRow.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TableRowUpsertBulk) UpdateUpdatedAt ¶
func (u *TableRowUpsertBulk) UpdateUpdatedAt() *TableRowUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TableRowUpsertOne ¶
type TableRowUpsertOne struct {
// contains filtered or unexported fields
}
TableRowUpsertOne is the builder for "upsert"-ing
one TableRow node.
func (*TableRowUpsertOne) ClearCells ¶
func (u *TableRowUpsertOne) ClearCells() *TableRowUpsertOne
ClearCells clears the value of the "cells" field.
func (*TableRowUpsertOne) ClearNanoid ¶
func (u *TableRowUpsertOne) ClearNanoid() *TableRowUpsertOne
ClearNanoid clears the value of the "nanoid" field.
func (*TableRowUpsertOne) ClearUpdatedAt ¶
func (u *TableRowUpsertOne) ClearUpdatedAt() *TableRowUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TableRowUpsertOne) DoNothing ¶
func (u *TableRowUpsertOne) DoNothing() *TableRowUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TableRowUpsertOne) Exec ¶
func (u *TableRowUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TableRowUpsertOne) ExecX ¶
func (u *TableRowUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TableRowUpsertOne) ID ¶
func (u *TableRowUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TableRowUpsertOne) IDX ¶
func (u *TableRowUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*TableRowUpsertOne) Ignore ¶
func (u *TableRowUpsertOne) Ignore() *TableRowUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TableRow.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*TableRowUpsertOne) SetCells ¶
func (u *TableRowUpsertOne) SetCells(v []*schema.CellValue) *TableRowUpsertOne
SetCells sets the "cells" field.
func (*TableRowUpsertOne) SetNanoid ¶
func (u *TableRowUpsertOne) SetNanoid(v string) *TableRowUpsertOne
SetNanoid sets the "nanoid" field.
func (*TableRowUpsertOne) SetUpdatedAt ¶
func (u *TableRowUpsertOne) SetUpdatedAt(v time.Time) *TableRowUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*TableRowUpsertOne) Update ¶
func (u *TableRowUpsertOne) Update(set func(*TableRowUpsert)) *TableRowUpsertOne
Update allows overriding fields `UPDATE` values. See the TableRowCreate.OnConflict documentation for more info.
func (*TableRowUpsertOne) UpdateCells ¶
func (u *TableRowUpsertOne) UpdateCells() *TableRowUpsertOne
UpdateCells sets the "cells" field to the value that was provided on create.
func (*TableRowUpsertOne) UpdateNanoid ¶
func (u *TableRowUpsertOne) UpdateNanoid() *TableRowUpsertOne
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*TableRowUpsertOne) UpdateNewValues ¶
func (u *TableRowUpsertOne) UpdateNewValues() *TableRowUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TableRow.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TableRowUpsertOne) UpdateUpdatedAt ¶
func (u *TableRowUpsertOne) UpdateUpdatedAt() *TableRowUpsertOne
UpdateUpdatedAt sets the "updated_at" 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 {
// Dataset is the client for interacting with the Dataset builders.
Dataset *DatasetClient
// Model is the client for interacting with the Model builders.
Model *ModelClient
// Provider is the client for interacting with the Provider builders.
Provider *ProviderClient
// TableColumn is the client for interacting with the TableColumn builders.
TableColumn *TableColumnClient
// TableMeta is the client for interacting with the TableMeta builders.
TableMeta *TableMetaClient
// TableRow is the client for interacting with the TableRow builders.
TableRow *TableRowClient
// Workflow is the client for interacting with the Workflow builders.
Workflow *WorkflowClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Workflow ¶ added in v0.4.0
type Workflow struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Nanoid holds the value of the "nanoid" field.
Nanoid string `json:"nanoid,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"`
// Variables holds the value of the "variables" field.
Variables []schema.WorkflowVariable `json:"variables,omitempty"`
// Steps holds the value of the "steps" field.
Steps []schema.WorkflowStep `json:"steps,omitempty"`
// contains filtered or unexported fields
}
Workflow is the model entity for the Workflow schema.
func (*Workflow) Unwrap ¶ added in v0.4.0
Unwrap unwraps the Workflow 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 (*Workflow) Update ¶ added in v0.4.0
func (w *Workflow) Update() *WorkflowUpdateOne
Update returns a builder for updating this Workflow. Note that you need to call Workflow.Unwrap() before calling this method if this Workflow was returned from a transaction, and the transaction was committed or rolled back.
type WorkflowClient ¶ added in v0.4.0
type WorkflowClient struct {
// contains filtered or unexported fields
}
WorkflowClient is a client for the Workflow schema.
func NewWorkflowClient ¶ added in v0.4.0
func NewWorkflowClient(c config) *WorkflowClient
NewWorkflowClient returns a client for the Workflow from the given config.
func (*WorkflowClient) Create ¶ added in v0.4.0
func (c *WorkflowClient) Create() *WorkflowCreate
Create returns a builder for creating a Workflow entity.
func (*WorkflowClient) CreateBulk ¶ added in v0.4.0
func (c *WorkflowClient) CreateBulk(builders ...*WorkflowCreate) *WorkflowCreateBulk
CreateBulk returns a builder for creating a bulk of Workflow entities.
func (*WorkflowClient) Delete ¶ added in v0.4.0
func (c *WorkflowClient) Delete() *WorkflowDelete
Delete returns a delete builder for Workflow.
func (*WorkflowClient) DeleteOne ¶ added in v0.4.0
func (c *WorkflowClient) DeleteOne(w *Workflow) *WorkflowDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WorkflowClient) DeleteOneID ¶ added in v0.4.0
func (c *WorkflowClient) DeleteOneID(id int) *WorkflowDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WorkflowClient) GetX ¶ added in v0.4.0
func (c *WorkflowClient) GetX(ctx context.Context, id int) *Workflow
GetX is like Get, but panics if an error occurs.
func (*WorkflowClient) Hooks ¶ added in v0.4.0
func (c *WorkflowClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkflowClient) Intercept ¶ added in v0.4.0
func (c *WorkflowClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflow.Intercept(f(g(h())))`.
func (*WorkflowClient) Interceptors ¶ added in v0.4.0
func (c *WorkflowClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WorkflowClient) MapCreateBulk ¶ added in v0.4.0
func (c *WorkflowClient) MapCreateBulk(slice any, setFunc func(*WorkflowCreate, int)) *WorkflowCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*WorkflowClient) Query ¶ added in v0.4.0
func (c *WorkflowClient) Query() *WorkflowQuery
Query returns a query builder for Workflow.
func (*WorkflowClient) Update ¶ added in v0.4.0
func (c *WorkflowClient) Update() *WorkflowUpdate
Update returns an update builder for Workflow.
func (*WorkflowClient) UpdateOne ¶ added in v0.4.0
func (c *WorkflowClient) UpdateOne(w *Workflow) *WorkflowUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkflowClient) UpdateOneID ¶ added in v0.4.0
func (c *WorkflowClient) UpdateOneID(id int) *WorkflowUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkflowClient) Use ¶ added in v0.4.0
func (c *WorkflowClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflow.Hooks(f(g(h())))`.
type WorkflowCreate ¶ added in v0.4.0
type WorkflowCreate struct {
// contains filtered or unexported fields
}
WorkflowCreate is the builder for creating a Workflow entity.
func (*WorkflowCreate) Exec ¶ added in v0.4.0
func (wc *WorkflowCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowCreate) ExecX ¶ added in v0.4.0
func (wc *WorkflowCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowCreate) Mutation ¶ added in v0.4.0
func (wc *WorkflowCreate) Mutation() *WorkflowMutation
Mutation returns the WorkflowMutation object of the builder.
func (*WorkflowCreate) OnConflict ¶ added in v0.4.0
func (wc *WorkflowCreate) OnConflict(opts ...sql.ConflictOption) *WorkflowUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Workflow.Create().
SetCreatedAt(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.WorkflowUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*WorkflowCreate) OnConflictColumns ¶ added in v0.4.0
func (wc *WorkflowCreate) OnConflictColumns(columns ...string) *WorkflowUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Workflow.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*WorkflowCreate) Save ¶ added in v0.4.0
func (wc *WorkflowCreate) Save(ctx context.Context) (*Workflow, error)
Save creates the Workflow in the database.
func (*WorkflowCreate) SaveX ¶ added in v0.4.0
func (wc *WorkflowCreate) SaveX(ctx context.Context) *Workflow
SaveX calls Save and panics if Save returns an error.
func (*WorkflowCreate) SetCreatedAt ¶ added in v0.4.0
func (wc *WorkflowCreate) SetCreatedAt(t time.Time) *WorkflowCreate
SetCreatedAt sets the "created_at" field.
func (*WorkflowCreate) SetDescription ¶ added in v0.4.0
func (wc *WorkflowCreate) SetDescription(s string) *WorkflowCreate
SetDescription sets the "description" field.
func (*WorkflowCreate) SetName ¶ added in v0.4.0
func (wc *WorkflowCreate) SetName(s string) *WorkflowCreate
SetName sets the "name" field.
func (*WorkflowCreate) SetNanoid ¶ added in v0.4.0
func (wc *WorkflowCreate) SetNanoid(s string) *WorkflowCreate
SetNanoid sets the "nanoid" field.
func (*WorkflowCreate) SetNillableCreatedAt ¶ added in v0.4.0
func (wc *WorkflowCreate) SetNillableCreatedAt(t *time.Time) *WorkflowCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*WorkflowCreate) SetNillableDescription ¶ added in v0.4.0
func (wc *WorkflowCreate) SetNillableDescription(s *string) *WorkflowCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*WorkflowCreate) SetNillableNanoid ¶ added in v0.4.0
func (wc *WorkflowCreate) SetNillableNanoid(s *string) *WorkflowCreate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*WorkflowCreate) SetNillableUpdatedAt ¶ added in v0.4.0
func (wc *WorkflowCreate) SetNillableUpdatedAt(t *time.Time) *WorkflowCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*WorkflowCreate) SetSteps ¶ added in v0.4.0
func (wc *WorkflowCreate) SetSteps(ss []schema.WorkflowStep) *WorkflowCreate
SetSteps sets the "steps" field.
func (*WorkflowCreate) SetUpdatedAt ¶ added in v0.4.0
func (wc *WorkflowCreate) SetUpdatedAt(t time.Time) *WorkflowCreate
SetUpdatedAt sets the "updated_at" field.
func (*WorkflowCreate) SetVariables ¶ added in v0.4.0
func (wc *WorkflowCreate) SetVariables(sv []schema.WorkflowVariable) *WorkflowCreate
SetVariables sets the "variables" field.
type WorkflowCreateBulk ¶ added in v0.4.0
type WorkflowCreateBulk struct {
// contains filtered or unexported fields
}
WorkflowCreateBulk is the builder for creating many Workflow entities in bulk.
func (*WorkflowCreateBulk) Exec ¶ added in v0.4.0
func (wcb *WorkflowCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowCreateBulk) ExecX ¶ added in v0.4.0
func (wcb *WorkflowCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowCreateBulk) OnConflict ¶ added in v0.4.0
func (wcb *WorkflowCreateBulk) OnConflict(opts ...sql.ConflictOption) *WorkflowUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Workflow.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.WorkflowUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*WorkflowCreateBulk) OnConflictColumns ¶ added in v0.4.0
func (wcb *WorkflowCreateBulk) OnConflictColumns(columns ...string) *WorkflowUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Workflow.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type WorkflowDelete ¶ added in v0.4.0
type WorkflowDelete struct {
// contains filtered or unexported fields
}
WorkflowDelete is the builder for deleting a Workflow entity.
func (*WorkflowDelete) Exec ¶ added in v0.4.0
func (wd *WorkflowDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkflowDelete) ExecX ¶ added in v0.4.0
func (wd *WorkflowDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowDelete) Where ¶ added in v0.4.0
func (wd *WorkflowDelete) Where(ps ...predicate.Workflow) *WorkflowDelete
Where appends a list predicates to the WorkflowDelete builder.
type WorkflowDeleteOne ¶ added in v0.4.0
type WorkflowDeleteOne struct {
// contains filtered or unexported fields
}
WorkflowDeleteOne is the builder for deleting a single Workflow entity.
func (*WorkflowDeleteOne) Exec ¶ added in v0.4.0
func (wdo *WorkflowDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkflowDeleteOne) ExecX ¶ added in v0.4.0
func (wdo *WorkflowDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowDeleteOne) Where ¶ added in v0.4.0
func (wdo *WorkflowDeleteOne) Where(ps ...predicate.Workflow) *WorkflowDeleteOne
Where appends a list predicates to the WorkflowDelete builder.
type WorkflowGroupBy ¶ added in v0.4.0
type WorkflowGroupBy struct {
// contains filtered or unexported fields
}
WorkflowGroupBy is the group-by builder for Workflow entities.
func (*WorkflowGroupBy) Aggregate ¶ added in v0.4.0
func (wgb *WorkflowGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkflowGroupBy) Bool ¶ added in v0.4.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Bools ¶ added in v0.4.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) BoolsX ¶ added in v0.4.0
BoolsX is like Bools, but panics if an error occurs.
func (*WorkflowGroupBy) Float64 ¶ added in v0.4.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Float64X ¶ added in v0.4.0
Float64X is like Float64, but panics if an error occurs.
func (*WorkflowGroupBy) Float64s ¶ added in v0.4.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Float64sX ¶ added in v0.4.0
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkflowGroupBy) Int ¶ added in v0.4.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Ints ¶ added in v0.4.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Scan ¶ added in v0.4.0
func (wgb *WorkflowGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowGroupBy) String ¶ added in v0.4.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) StringX ¶ added in v0.4.0
StringX is like String, but panics if an error occurs.
type WorkflowMutation ¶ added in v0.4.0
type WorkflowMutation struct {
// contains filtered or unexported fields
}
WorkflowMutation represents an operation that mutates the Workflow nodes in the graph.
func (*WorkflowMutation) AddField ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) AddedEdges ¶ added in v0.4.0
func (m *WorkflowMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkflowMutation) AddedField ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) AddedFields ¶ added in v0.4.0
func (m *WorkflowMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WorkflowMutation) AddedIDs ¶ added in v0.4.0
func (m *WorkflowMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WorkflowMutation) AppendSteps ¶ added in v0.4.0
func (m *WorkflowMutation) AppendSteps(ss []schema.WorkflowStep)
AppendSteps adds ss to the "steps" field.
func (*WorkflowMutation) AppendVariables ¶ added in v0.4.0
func (m *WorkflowMutation) AppendVariables(sv []schema.WorkflowVariable)
AppendVariables adds sv to the "variables" field.
func (*WorkflowMutation) AppendedSteps ¶ added in v0.4.0
func (m *WorkflowMutation) AppendedSteps() ([]schema.WorkflowStep, bool)
AppendedSteps returns the list of values that were appended to the "steps" field in this mutation.
func (*WorkflowMutation) AppendedVariables ¶ added in v0.4.0
func (m *WorkflowMutation) AppendedVariables() ([]schema.WorkflowVariable, bool)
AppendedVariables returns the list of values that were appended to the "variables" field in this mutation.
func (*WorkflowMutation) ClearCreatedAt ¶ added in v0.4.0
func (m *WorkflowMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*WorkflowMutation) ClearDescription ¶ added in v0.4.0
func (m *WorkflowMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*WorkflowMutation) ClearEdge ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) ClearField ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) ClearNanoid ¶ added in v0.4.0
func (m *WorkflowMutation) ClearNanoid()
ClearNanoid clears the value of the "nanoid" field.
func (*WorkflowMutation) ClearUpdatedAt ¶ added in v0.4.0
func (m *WorkflowMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*WorkflowMutation) ClearedEdges ¶ added in v0.4.0
func (m *WorkflowMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkflowMutation) ClearedFields ¶ added in v0.4.0
func (m *WorkflowMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkflowMutation) Client ¶ added in v0.4.0
func (m WorkflowMutation) 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 (*WorkflowMutation) CreatedAt ¶ added in v0.4.0
func (m *WorkflowMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*WorkflowMutation) CreatedAtCleared ¶ added in v0.4.0
func (m *WorkflowMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*WorkflowMutation) Description ¶ added in v0.4.0
func (m *WorkflowMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*WorkflowMutation) DescriptionCleared ¶ added in v0.4.0
func (m *WorkflowMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*WorkflowMutation) EdgeCleared ¶ added in v0.4.0
func (m *WorkflowMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WorkflowMutation) Field ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) FieldCleared ¶ added in v0.4.0
func (m *WorkflowMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WorkflowMutation) Fields ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) ID ¶ added in v0.4.0
func (m *WorkflowMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*WorkflowMutation) IDs ¶ added in v0.4.0
func (m *WorkflowMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*WorkflowMutation) Name ¶ added in v0.4.0
func (m *WorkflowMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*WorkflowMutation) Nanoid ¶ added in v0.4.0
func (m *WorkflowMutation) Nanoid() (r string, exists bool)
Nanoid returns the value of the "nanoid" field in the mutation.
func (*WorkflowMutation) NanoidCleared ¶ added in v0.4.0
func (m *WorkflowMutation) NanoidCleared() bool
NanoidCleared returns if the "nanoid" field was cleared in this mutation.
func (*WorkflowMutation) OldCreatedAt ¶ added in v0.4.0
OldCreatedAt returns the old "created_at" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldDescription ¶ added in v0.4.0
func (m *WorkflowMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldField ¶ added in v0.4.0
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*WorkflowMutation) OldName ¶ added in v0.4.0
func (m *WorkflowMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldNanoid ¶ added in v0.4.0
func (m *WorkflowMutation) OldNanoid(ctx context.Context) (v string, err error)
OldNanoid returns the old "nanoid" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldSteps ¶ added in v0.4.0
func (m *WorkflowMutation) OldSteps(ctx context.Context) (v []schema.WorkflowStep, err error)
OldSteps returns the old "steps" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldUpdatedAt ¶ added in v0.4.0
OldUpdatedAt returns the old "updated_at" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldVariables ¶ added in v0.4.0
func (m *WorkflowMutation) OldVariables(ctx context.Context) (v []schema.WorkflowVariable, err error)
OldVariables returns the old "variables" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) Op ¶ added in v0.4.0
func (m *WorkflowMutation) Op() Op
Op returns the operation name.
func (*WorkflowMutation) RemovedEdges ¶ added in v0.4.0
func (m *WorkflowMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkflowMutation) RemovedIDs ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) ResetCreatedAt ¶ added in v0.4.0
func (m *WorkflowMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*WorkflowMutation) ResetDescription ¶ added in v0.4.0
func (m *WorkflowMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*WorkflowMutation) ResetEdge ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) ResetField ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) ResetName ¶ added in v0.4.0
func (m *WorkflowMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*WorkflowMutation) ResetNanoid ¶ added in v0.4.0
func (m *WorkflowMutation) ResetNanoid()
ResetNanoid resets all changes to the "nanoid" field.
func (*WorkflowMutation) ResetSteps ¶ added in v0.4.0
func (m *WorkflowMutation) ResetSteps()
ResetSteps resets all changes to the "steps" field.
func (*WorkflowMutation) ResetUpdatedAt ¶ added in v0.4.0
func (m *WorkflowMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*WorkflowMutation) ResetVariables ¶ added in v0.4.0
func (m *WorkflowMutation) ResetVariables()
ResetVariables resets all changes to the "variables" field.
func (*WorkflowMutation) SetCreatedAt ¶ added in v0.4.0
func (m *WorkflowMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*WorkflowMutation) SetDescription ¶ added in v0.4.0
func (m *WorkflowMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*WorkflowMutation) SetField ¶ added in v0.4.0
func (m *WorkflowMutation) 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 (*WorkflowMutation) SetName ¶ added in v0.4.0
func (m *WorkflowMutation) SetName(s string)
SetName sets the "name" field.
func (*WorkflowMutation) SetNanoid ¶ added in v0.4.0
func (m *WorkflowMutation) SetNanoid(s string)
SetNanoid sets the "nanoid" field.
func (*WorkflowMutation) SetOp ¶ added in v0.4.0
func (m *WorkflowMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*WorkflowMutation) SetSteps ¶ added in v0.4.0
func (m *WorkflowMutation) SetSteps(ss []schema.WorkflowStep)
SetSteps sets the "steps" field.
func (*WorkflowMutation) SetUpdatedAt ¶ added in v0.4.0
func (m *WorkflowMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*WorkflowMutation) SetVariables ¶ added in v0.4.0
func (m *WorkflowMutation) SetVariables(sv []schema.WorkflowVariable)
SetVariables sets the "variables" field.
func (*WorkflowMutation) Steps ¶ added in v0.4.0
func (m *WorkflowMutation) Steps() (r []schema.WorkflowStep, exists bool)
Steps returns the value of the "steps" field in the mutation.
func (WorkflowMutation) Tx ¶ added in v0.4.0
func (m WorkflowMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkflowMutation) Type ¶ added in v0.4.0
func (m *WorkflowMutation) Type() string
Type returns the node type of this mutation (Workflow).
func (*WorkflowMutation) UpdatedAt ¶ added in v0.4.0
func (m *WorkflowMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*WorkflowMutation) UpdatedAtCleared ¶ added in v0.4.0
func (m *WorkflowMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*WorkflowMutation) Variables ¶ added in v0.4.0
func (m *WorkflowMutation) Variables() (r []schema.WorkflowVariable, exists bool)
Variables returns the value of the "variables" field in the mutation.
func (*WorkflowMutation) Where ¶ added in v0.4.0
func (m *WorkflowMutation) Where(ps ...predicate.Workflow)
Where appends a list predicates to the WorkflowMutation builder.
func (*WorkflowMutation) WhereP ¶ added in v0.4.0
func (m *WorkflowMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WorkflowMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type WorkflowQuery ¶ added in v0.4.0
type WorkflowQuery struct {
// contains filtered or unexported fields
}
WorkflowQuery is the builder for querying Workflow entities.
func (*WorkflowQuery) Aggregate ¶ added in v0.4.0
func (wq *WorkflowQuery) Aggregate(fns ...AggregateFunc) *WorkflowSelect
Aggregate returns a WorkflowSelect configured with the given aggregations.
func (*WorkflowQuery) All ¶ added in v0.4.0
func (wq *WorkflowQuery) All(ctx context.Context) ([]*Workflow, error)
All executes the query and returns a list of Workflows.
func (*WorkflowQuery) AllX ¶ added in v0.4.0
func (wq *WorkflowQuery) AllX(ctx context.Context) []*Workflow
AllX is like All, but panics if an error occurs.
func (*WorkflowQuery) Clone ¶ added in v0.4.0
func (wq *WorkflowQuery) Clone() *WorkflowQuery
Clone returns a duplicate of the WorkflowQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WorkflowQuery) Count ¶ added in v0.4.0
func (wq *WorkflowQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkflowQuery) CountX ¶ added in v0.4.0
func (wq *WorkflowQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkflowQuery) Exist ¶ added in v0.4.0
func (wq *WorkflowQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkflowQuery) ExistX ¶ added in v0.4.0
func (wq *WorkflowQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkflowQuery) First ¶ added in v0.4.0
func (wq *WorkflowQuery) First(ctx context.Context) (*Workflow, error)
First returns the first Workflow entity from the query. Returns a *NotFoundError when no Workflow was found.
func (*WorkflowQuery) FirstID ¶ added in v0.4.0
func (wq *WorkflowQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Workflow ID from the query. Returns a *NotFoundError when no Workflow ID was found.
func (*WorkflowQuery) FirstIDX ¶ added in v0.4.0
func (wq *WorkflowQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkflowQuery) FirstX ¶ added in v0.4.0
func (wq *WorkflowQuery) FirstX(ctx context.Context) *Workflow
FirstX is like First, but panics if an error occurs.
func (*WorkflowQuery) ForShare ¶ added in v0.4.0
func (wq *WorkflowQuery) ForShare(opts ...sql.LockOption) *WorkflowQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*WorkflowQuery) ForUpdate ¶ added in v0.4.0
func (wq *WorkflowQuery) ForUpdate(opts ...sql.LockOption) *WorkflowQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*WorkflowQuery) GroupBy ¶ added in v0.4.0
func (wq *WorkflowQuery) GroupBy(field string, fields ...string) *WorkflowGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Workflow.Query().
GroupBy(workflow.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*WorkflowQuery) IDs ¶ added in v0.4.0
func (wq *WorkflowQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Workflow IDs.
func (*WorkflowQuery) IDsX ¶ added in v0.4.0
func (wq *WorkflowQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WorkflowQuery) Limit ¶ added in v0.4.0
func (wq *WorkflowQuery) Limit(limit int) *WorkflowQuery
Limit the number of records to be returned by this query.
func (*WorkflowQuery) Modify ¶ added in v0.4.0
func (wq *WorkflowQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*WorkflowQuery) Offset ¶ added in v0.4.0
func (wq *WorkflowQuery) Offset(offset int) *WorkflowQuery
Offset to start from.
func (*WorkflowQuery) Only ¶ added in v0.4.0
func (wq *WorkflowQuery) Only(ctx context.Context) (*Workflow, error)
Only returns a single Workflow entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Workflow entity is found. Returns a *NotFoundError when no Workflow entities are found.
func (*WorkflowQuery) OnlyID ¶ added in v0.4.0
func (wq *WorkflowQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Workflow ID in the query. Returns a *NotSingularError when more than one Workflow ID is found. Returns a *NotFoundError when no entities are found.
func (*WorkflowQuery) OnlyIDX ¶ added in v0.4.0
func (wq *WorkflowQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkflowQuery) OnlyX ¶ added in v0.4.0
func (wq *WorkflowQuery) OnlyX(ctx context.Context) *Workflow
OnlyX is like Only, but panics if an error occurs.
func (*WorkflowQuery) Order ¶ added in v0.4.0
func (wq *WorkflowQuery) Order(o ...workflow.OrderOption) *WorkflowQuery
Order specifies how the records should be ordered.
func (*WorkflowQuery) Select ¶ added in v0.4.0
func (wq *WorkflowQuery) Select(fields ...string) *WorkflowSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Workflow.Query().
Select(workflow.FieldCreatedAt).
Scan(ctx, &v)
func (*WorkflowQuery) Unique ¶ added in v0.4.0
func (wq *WorkflowQuery) Unique(unique bool) *WorkflowQuery
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 (*WorkflowQuery) Where ¶ added in v0.4.0
func (wq *WorkflowQuery) Where(ps ...predicate.Workflow) *WorkflowQuery
Where adds a new predicate for the WorkflowQuery builder.
type WorkflowSelect ¶ added in v0.4.0
type WorkflowSelect struct {
*WorkflowQuery
// contains filtered or unexported fields
}
WorkflowSelect is the builder for selecting fields of Workflow entities.
func (*WorkflowSelect) Aggregate ¶ added in v0.4.0
func (ws *WorkflowSelect) Aggregate(fns ...AggregateFunc) *WorkflowSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WorkflowSelect) Bool ¶ added in v0.4.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) Bools ¶ added in v0.4.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) BoolsX ¶ added in v0.4.0
BoolsX is like Bools, but panics if an error occurs.
func (*WorkflowSelect) Float64 ¶ added in v0.4.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) Float64X ¶ added in v0.4.0
Float64X is like Float64, but panics if an error occurs.
func (*WorkflowSelect) Float64s ¶ added in v0.4.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) Float64sX ¶ added in v0.4.0
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkflowSelect) Int ¶ added in v0.4.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) Ints ¶ added in v0.4.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) Modify ¶ added in v0.4.0
func (ws *WorkflowSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*WorkflowSelect) Scan ¶ added in v0.4.0
func (ws *WorkflowSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowSelect) String ¶ added in v0.4.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) StringX ¶ added in v0.4.0
StringX is like String, but panics if an error occurs.
type WorkflowUpdate ¶ added in v0.4.0
type WorkflowUpdate struct {
// contains filtered or unexported fields
}
WorkflowUpdate is the builder for updating Workflow entities.
func (*WorkflowUpdate) AppendSteps ¶ added in v0.4.0
func (wu *WorkflowUpdate) AppendSteps(ss []schema.WorkflowStep) *WorkflowUpdate
AppendSteps appends ss to the "steps" field.
func (*WorkflowUpdate) AppendVariables ¶ added in v0.4.0
func (wu *WorkflowUpdate) AppendVariables(sv []schema.WorkflowVariable) *WorkflowUpdate
AppendVariables appends sv to the "variables" field.
func (*WorkflowUpdate) ClearDescription ¶ added in v0.4.0
func (wu *WorkflowUpdate) ClearDescription() *WorkflowUpdate
ClearDescription clears the value of the "description" field.
func (*WorkflowUpdate) ClearNanoid ¶ added in v0.4.0
func (wu *WorkflowUpdate) ClearNanoid() *WorkflowUpdate
ClearNanoid clears the value of the "nanoid" field.
func (*WorkflowUpdate) ClearUpdatedAt ¶ added in v0.4.0
func (wu *WorkflowUpdate) ClearUpdatedAt() *WorkflowUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*WorkflowUpdate) Exec ¶ added in v0.4.0
func (wu *WorkflowUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowUpdate) ExecX ¶ added in v0.4.0
func (wu *WorkflowUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowUpdate) Modify ¶ added in v0.4.0
func (wu *WorkflowUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*WorkflowUpdate) Mutation ¶ added in v0.4.0
func (wu *WorkflowUpdate) Mutation() *WorkflowMutation
Mutation returns the WorkflowMutation object of the builder.
func (*WorkflowUpdate) Save ¶ added in v0.4.0
func (wu *WorkflowUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkflowUpdate) SaveX ¶ added in v0.4.0
func (wu *WorkflowUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkflowUpdate) SetDescription ¶ added in v0.4.0
func (wu *WorkflowUpdate) SetDescription(s string) *WorkflowUpdate
SetDescription sets the "description" field.
func (*WorkflowUpdate) SetName ¶ added in v0.4.0
func (wu *WorkflowUpdate) SetName(s string) *WorkflowUpdate
SetName sets the "name" field.
func (*WorkflowUpdate) SetNanoid ¶ added in v0.4.0
func (wu *WorkflowUpdate) SetNanoid(s string) *WorkflowUpdate
SetNanoid sets the "nanoid" field.
func (*WorkflowUpdate) SetNillableDescription ¶ added in v0.4.0
func (wu *WorkflowUpdate) SetNillableDescription(s *string) *WorkflowUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*WorkflowUpdate) SetNillableName ¶ added in v0.4.0
func (wu *WorkflowUpdate) SetNillableName(s *string) *WorkflowUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*WorkflowUpdate) SetNillableNanoid ¶ added in v0.4.0
func (wu *WorkflowUpdate) SetNillableNanoid(s *string) *WorkflowUpdate
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*WorkflowUpdate) SetSteps ¶ added in v0.4.0
func (wu *WorkflowUpdate) SetSteps(ss []schema.WorkflowStep) *WorkflowUpdate
SetSteps sets the "steps" field.
func (*WorkflowUpdate) SetUpdatedAt ¶ added in v0.4.0
func (wu *WorkflowUpdate) SetUpdatedAt(t time.Time) *WorkflowUpdate
SetUpdatedAt sets the "updated_at" field.
func (*WorkflowUpdate) SetVariables ¶ added in v0.4.0
func (wu *WorkflowUpdate) SetVariables(sv []schema.WorkflowVariable) *WorkflowUpdate
SetVariables sets the "variables" field.
func (*WorkflowUpdate) Where ¶ added in v0.4.0
func (wu *WorkflowUpdate) Where(ps ...predicate.Workflow) *WorkflowUpdate
Where appends a list predicates to the WorkflowUpdate builder.
type WorkflowUpdateOne ¶ added in v0.4.0
type WorkflowUpdateOne struct {
// contains filtered or unexported fields
}
WorkflowUpdateOne is the builder for updating a single Workflow entity.
func (*WorkflowUpdateOne) AppendSteps ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) AppendSteps(ss []schema.WorkflowStep) *WorkflowUpdateOne
AppendSteps appends ss to the "steps" field.
func (*WorkflowUpdateOne) AppendVariables ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) AppendVariables(sv []schema.WorkflowVariable) *WorkflowUpdateOne
AppendVariables appends sv to the "variables" field.
func (*WorkflowUpdateOne) ClearDescription ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) ClearDescription() *WorkflowUpdateOne
ClearDescription clears the value of the "description" field.
func (*WorkflowUpdateOne) ClearNanoid ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) ClearNanoid() *WorkflowUpdateOne
ClearNanoid clears the value of the "nanoid" field.
func (*WorkflowUpdateOne) ClearUpdatedAt ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) ClearUpdatedAt() *WorkflowUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*WorkflowUpdateOne) Exec ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkflowUpdateOne) ExecX ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowUpdateOne) Modify ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*WorkflowUpdateOne) Mutation ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) Mutation() *WorkflowMutation
Mutation returns the WorkflowMutation object of the builder.
func (*WorkflowUpdateOne) Save ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) Save(ctx context.Context) (*Workflow, error)
Save executes the query and returns the updated Workflow entity.
func (*WorkflowUpdateOne) SaveX ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SaveX(ctx context.Context) *Workflow
SaveX is like Save, but panics if an error occurs.
func (*WorkflowUpdateOne) Select ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) Select(field string, fields ...string) *WorkflowUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WorkflowUpdateOne) SetDescription ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SetDescription(s string) *WorkflowUpdateOne
SetDescription sets the "description" field.
func (*WorkflowUpdateOne) SetName ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SetName(s string) *WorkflowUpdateOne
SetName sets the "name" field.
func (*WorkflowUpdateOne) SetNanoid ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SetNanoid(s string) *WorkflowUpdateOne
SetNanoid sets the "nanoid" field.
func (*WorkflowUpdateOne) SetNillableDescription ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SetNillableDescription(s *string) *WorkflowUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*WorkflowUpdateOne) SetNillableName ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SetNillableName(s *string) *WorkflowUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*WorkflowUpdateOne) SetNillableNanoid ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SetNillableNanoid(s *string) *WorkflowUpdateOne
SetNillableNanoid sets the "nanoid" field if the given value is not nil.
func (*WorkflowUpdateOne) SetSteps ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SetSteps(ss []schema.WorkflowStep) *WorkflowUpdateOne
SetSteps sets the "steps" field.
func (*WorkflowUpdateOne) SetUpdatedAt ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SetUpdatedAt(t time.Time) *WorkflowUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*WorkflowUpdateOne) SetVariables ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) SetVariables(sv []schema.WorkflowVariable) *WorkflowUpdateOne
SetVariables sets the "variables" field.
func (*WorkflowUpdateOne) Where ¶ added in v0.4.0
func (wuo *WorkflowUpdateOne) Where(ps ...predicate.Workflow) *WorkflowUpdateOne
Where appends a list predicates to the WorkflowUpdate builder.
type WorkflowUpsert ¶ added in v0.4.0
WorkflowUpsert is the "OnConflict" setter.
func (*WorkflowUpsert) ClearDescription ¶ added in v0.4.0
func (u *WorkflowUpsert) ClearDescription() *WorkflowUpsert
ClearDescription clears the value of the "description" field.
func (*WorkflowUpsert) ClearNanoid ¶ added in v0.4.0
func (u *WorkflowUpsert) ClearNanoid() *WorkflowUpsert
ClearNanoid clears the value of the "nanoid" field.
func (*WorkflowUpsert) ClearUpdatedAt ¶ added in v0.4.0
func (u *WorkflowUpsert) ClearUpdatedAt() *WorkflowUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*WorkflowUpsert) SetDescription ¶ added in v0.4.0
func (u *WorkflowUpsert) SetDescription(v string) *WorkflowUpsert
SetDescription sets the "description" field.
func (*WorkflowUpsert) SetName ¶ added in v0.4.0
func (u *WorkflowUpsert) SetName(v string) *WorkflowUpsert
SetName sets the "name" field.
func (*WorkflowUpsert) SetNanoid ¶ added in v0.4.0
func (u *WorkflowUpsert) SetNanoid(v string) *WorkflowUpsert
SetNanoid sets the "nanoid" field.
func (*WorkflowUpsert) SetSteps ¶ added in v0.4.0
func (u *WorkflowUpsert) SetSteps(v []schema.WorkflowStep) *WorkflowUpsert
SetSteps sets the "steps" field.
func (*WorkflowUpsert) SetUpdatedAt ¶ added in v0.4.0
func (u *WorkflowUpsert) SetUpdatedAt(v time.Time) *WorkflowUpsert
SetUpdatedAt sets the "updated_at" field.
func (*WorkflowUpsert) SetVariables ¶ added in v0.4.0
func (u *WorkflowUpsert) SetVariables(v []schema.WorkflowVariable) *WorkflowUpsert
SetVariables sets the "variables" field.
func (*WorkflowUpsert) UpdateDescription ¶ added in v0.4.0
func (u *WorkflowUpsert) UpdateDescription() *WorkflowUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*WorkflowUpsert) UpdateName ¶ added in v0.4.0
func (u *WorkflowUpsert) UpdateName() *WorkflowUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*WorkflowUpsert) UpdateNanoid ¶ added in v0.4.0
func (u *WorkflowUpsert) UpdateNanoid() *WorkflowUpsert
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*WorkflowUpsert) UpdateSteps ¶ added in v0.4.0
func (u *WorkflowUpsert) UpdateSteps() *WorkflowUpsert
UpdateSteps sets the "steps" field to the value that was provided on create.
func (*WorkflowUpsert) UpdateUpdatedAt ¶ added in v0.4.0
func (u *WorkflowUpsert) UpdateUpdatedAt() *WorkflowUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*WorkflowUpsert) UpdateVariables ¶ added in v0.4.0
func (u *WorkflowUpsert) UpdateVariables() *WorkflowUpsert
UpdateVariables sets the "variables" field to the value that was provided on create.
type WorkflowUpsertBulk ¶ added in v0.4.0
type WorkflowUpsertBulk struct {
// contains filtered or unexported fields
}
WorkflowUpsertBulk is the builder for "upsert"-ing a bulk of Workflow nodes.
func (*WorkflowUpsertBulk) ClearDescription ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) ClearDescription() *WorkflowUpsertBulk
ClearDescription clears the value of the "description" field.
func (*WorkflowUpsertBulk) ClearNanoid ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) ClearNanoid() *WorkflowUpsertBulk
ClearNanoid clears the value of the "nanoid" field.
func (*WorkflowUpsertBulk) ClearUpdatedAt ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) ClearUpdatedAt() *WorkflowUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*WorkflowUpsertBulk) DoNothing ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) DoNothing() *WorkflowUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*WorkflowUpsertBulk) Exec ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowUpsertBulk) ExecX ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowUpsertBulk) Ignore ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) Ignore() *WorkflowUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Workflow.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*WorkflowUpsertBulk) SetDescription ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) SetDescription(v string) *WorkflowUpsertBulk
SetDescription sets the "description" field.
func (*WorkflowUpsertBulk) SetName ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) SetName(v string) *WorkflowUpsertBulk
SetName sets the "name" field.
func (*WorkflowUpsertBulk) SetNanoid ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) SetNanoid(v string) *WorkflowUpsertBulk
SetNanoid sets the "nanoid" field.
func (*WorkflowUpsertBulk) SetSteps ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) SetSteps(v []schema.WorkflowStep) *WorkflowUpsertBulk
SetSteps sets the "steps" field.
func (*WorkflowUpsertBulk) SetUpdatedAt ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) SetUpdatedAt(v time.Time) *WorkflowUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*WorkflowUpsertBulk) SetVariables ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) SetVariables(v []schema.WorkflowVariable) *WorkflowUpsertBulk
SetVariables sets the "variables" field.
func (*WorkflowUpsertBulk) Update ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) Update(set func(*WorkflowUpsert)) *WorkflowUpsertBulk
Update allows overriding fields `UPDATE` values. See the WorkflowCreateBulk.OnConflict documentation for more info.
func (*WorkflowUpsertBulk) UpdateDescription ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) UpdateDescription() *WorkflowUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*WorkflowUpsertBulk) UpdateName ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) UpdateName() *WorkflowUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*WorkflowUpsertBulk) UpdateNanoid ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) UpdateNanoid() *WorkflowUpsertBulk
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*WorkflowUpsertBulk) UpdateNewValues ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) UpdateNewValues() *WorkflowUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Workflow.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*WorkflowUpsertBulk) UpdateSteps ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) UpdateSteps() *WorkflowUpsertBulk
UpdateSteps sets the "steps" field to the value that was provided on create.
func (*WorkflowUpsertBulk) UpdateUpdatedAt ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) UpdateUpdatedAt() *WorkflowUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*WorkflowUpsertBulk) UpdateVariables ¶ added in v0.4.0
func (u *WorkflowUpsertBulk) UpdateVariables() *WorkflowUpsertBulk
UpdateVariables sets the "variables" field to the value that was provided on create.
type WorkflowUpsertOne ¶ added in v0.4.0
type WorkflowUpsertOne struct {
// contains filtered or unexported fields
}
WorkflowUpsertOne is the builder for "upsert"-ing
one Workflow node.
func (*WorkflowUpsertOne) ClearDescription ¶ added in v0.4.0
func (u *WorkflowUpsertOne) ClearDescription() *WorkflowUpsertOne
ClearDescription clears the value of the "description" field.
func (*WorkflowUpsertOne) ClearNanoid ¶ added in v0.4.0
func (u *WorkflowUpsertOne) ClearNanoid() *WorkflowUpsertOne
ClearNanoid clears the value of the "nanoid" field.
func (*WorkflowUpsertOne) ClearUpdatedAt ¶ added in v0.4.0
func (u *WorkflowUpsertOne) ClearUpdatedAt() *WorkflowUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*WorkflowUpsertOne) DoNothing ¶ added in v0.4.0
func (u *WorkflowUpsertOne) DoNothing() *WorkflowUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*WorkflowUpsertOne) Exec ¶ added in v0.4.0
func (u *WorkflowUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowUpsertOne) ExecX ¶ added in v0.4.0
func (u *WorkflowUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowUpsertOne) ID ¶ added in v0.4.0
func (u *WorkflowUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*WorkflowUpsertOne) IDX ¶ added in v0.4.0
func (u *WorkflowUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*WorkflowUpsertOne) Ignore ¶ added in v0.4.0
func (u *WorkflowUpsertOne) Ignore() *WorkflowUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Workflow.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*WorkflowUpsertOne) SetDescription ¶ added in v0.4.0
func (u *WorkflowUpsertOne) SetDescription(v string) *WorkflowUpsertOne
SetDescription sets the "description" field.
func (*WorkflowUpsertOne) SetName ¶ added in v0.4.0
func (u *WorkflowUpsertOne) SetName(v string) *WorkflowUpsertOne
SetName sets the "name" field.
func (*WorkflowUpsertOne) SetNanoid ¶ added in v0.4.0
func (u *WorkflowUpsertOne) SetNanoid(v string) *WorkflowUpsertOne
SetNanoid sets the "nanoid" field.
func (*WorkflowUpsertOne) SetSteps ¶ added in v0.4.0
func (u *WorkflowUpsertOne) SetSteps(v []schema.WorkflowStep) *WorkflowUpsertOne
SetSteps sets the "steps" field.
func (*WorkflowUpsertOne) SetUpdatedAt ¶ added in v0.4.0
func (u *WorkflowUpsertOne) SetUpdatedAt(v time.Time) *WorkflowUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*WorkflowUpsertOne) SetVariables ¶ added in v0.4.0
func (u *WorkflowUpsertOne) SetVariables(v []schema.WorkflowVariable) *WorkflowUpsertOne
SetVariables sets the "variables" field.
func (*WorkflowUpsertOne) Update ¶ added in v0.4.0
func (u *WorkflowUpsertOne) Update(set func(*WorkflowUpsert)) *WorkflowUpsertOne
Update allows overriding fields `UPDATE` values. See the WorkflowCreate.OnConflict documentation for more info.
func (*WorkflowUpsertOne) UpdateDescription ¶ added in v0.4.0
func (u *WorkflowUpsertOne) UpdateDescription() *WorkflowUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*WorkflowUpsertOne) UpdateName ¶ added in v0.4.0
func (u *WorkflowUpsertOne) UpdateName() *WorkflowUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*WorkflowUpsertOne) UpdateNanoid ¶ added in v0.4.0
func (u *WorkflowUpsertOne) UpdateNanoid() *WorkflowUpsertOne
UpdateNanoid sets the "nanoid" field to the value that was provided on create.
func (*WorkflowUpsertOne) UpdateNewValues ¶ added in v0.4.0
func (u *WorkflowUpsertOne) UpdateNewValues() *WorkflowUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Workflow.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*WorkflowUpsertOne) UpdateSteps ¶ added in v0.4.0
func (u *WorkflowUpsertOne) UpdateSteps() *WorkflowUpsertOne
UpdateSteps sets the "steps" field to the value that was provided on create.
func (*WorkflowUpsertOne) UpdateUpdatedAt ¶ added in v0.4.0
func (u *WorkflowUpsertOne) UpdateUpdatedAt() *WorkflowUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*WorkflowUpsertOne) UpdateVariables ¶ added in v0.4.0
func (u *WorkflowUpsertOne) UpdateVariables() *WorkflowUpsertOne
UpdateVariables sets the "variables" field to the value that was provided on create.
Source Files
¶
- client.go
- dataset.go
- dataset_create.go
- dataset_delete.go
- dataset_query.go
- dataset_update.go
- ent.go
- generate.go
- model.go
- model_create.go
- model_delete.go
- model_query.go
- model_update.go
- mutation.go
- provider.go
- provider_create.go
- provider_delete.go
- provider_query.go
- provider_update.go
- runtime.go
- tablecolumn.go
- tablecolumn_create.go
- tablecolumn_delete.go
- tablecolumn_query.go
- tablecolumn_update.go
- tablemeta.go
- tablemeta_create.go
- tablemeta_delete.go
- tablemeta_query.go
- tablemeta_update.go
- tablerow.go
- tablerow_create.go
- tablerow_delete.go
- tablerow_query.go
- tablerow_update.go
- tx.go
- tx_wrapper.go
- workflow.go
- workflow_create.go
- workflow_delete.go
- workflow_query.go
- workflow_update.go