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 Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type 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) 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) SetNillableNanoid(s *string) *TableColumnCreate
- func (tcc *TableColumnCreate) SetNillableUpdatedAt(t *time.Time) *TableColumnCreate
- func (tcc *TableColumnCreate) SetSource(jm json.RawMessage) *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) 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) AppendSource(jm json.RawMessage)
- func (m *TableColumnMutation) AppendedSource() (json.RawMessage, 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) ClearSource()
- 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) 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) OldName(ctx context.Context) (v string, err error)
- func (m *TableColumnMutation) OldNanoid(ctx context.Context) (v string, err error)
- func (m *TableColumnMutation) OldSource(ctx context.Context) (v json.RawMessage, 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) RemovedEdges() []string
- func (m *TableColumnMutation) RemovedIDs(name string) []ent.Value
- 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) ResetName()
- func (m *TableColumnMutation) ResetNanoid()
- func (m *TableColumnMutation) ResetSource()
- 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) SetName(s string)
- func (m *TableColumnMutation) SetNanoid(s string)
- func (m *TableColumnMutation) SetOp(op Op)
- func (m *TableColumnMutation) SetSource(jm json.RawMessage)
- 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 json.RawMessage, exists bool)
- func (m *TableColumnMutation) SourceCleared() 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) AppendSource(jm json.RawMessage) *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearDescription() *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearNanoid() *TableColumnUpdate
- func (tcu *TableColumnUpdate) ClearSource() *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) 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) SetNillableName(s *string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableNanoid(s *string) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableTableID(i *int) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetNillableType(t *tablecolumn.Type) *TableColumnUpdate
- func (tcu *TableColumnUpdate) SetSource(jm json.RawMessage) *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) AppendSource(jm json.RawMessage) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearDescription() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearNanoid() *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) ClearSource() *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) 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) SetNillableName(s *string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableNanoid(s *string) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableTableID(i *int) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetNillableType(t *tablecolumn.Type) *TableColumnUpdateOne
- func (tcuo *TableColumnUpdateOne) SetSource(jm json.RawMessage) *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) ClearDescription() *TableColumnUpsert
- func (u *TableColumnUpsert) ClearNanoid() *TableColumnUpsert
- func (u *TableColumnUpsert) ClearSource() *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) SetName(v string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetNanoid(v string) *TableColumnUpsert
- func (u *TableColumnUpsert) SetSource(v json.RawMessage) *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) UpdateName() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateNanoid() *TableColumnUpsert
- func (u *TableColumnUpsert) UpdateSource() *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) ClearDescription() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) ClearNanoid() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) ClearSource() *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) SetName(v string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetNanoid(v string) *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) SetSource(v json.RawMessage) *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) UpdateName() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateNanoid() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateNewValues() *TableColumnUpsertBulk
- func (u *TableColumnUpsertBulk) UpdateSource() *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) ClearDescription() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) ClearNanoid() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) ClearSource() *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) SetName(v string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetNanoid(v string) *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) SetSource(v json.RawMessage) *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) UpdateName() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateNanoid() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateNewValues() *TableColumnUpsertOne
- func (u *TableColumnUpsertOne) UpdateSource() *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
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeTableColumn = "TableColumn" TypeTableMeta = "TableMeta" TypeTableRow = "TableRow" )
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 // 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 // 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(). TableColumn. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type 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 json.RawMessage `json:"source,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"` // 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) 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) SetNillableNanoid ¶
func (tcc *TableColumnCreate) SetNillableNanoid(s *string) *TableColumnCreate
SetNillableNanoid sets the "nanoid" 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) SetSource ¶
func (tcc *TableColumnCreate) SetSource(jm json.RawMessage) *TableColumnCreate
SetSource sets the "source" 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) 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) AppendSource ¶
func (m *TableColumnMutation) AppendSource(jm json.RawMessage)
AppendSource adds jm to the "source" field.
func (*TableColumnMutation) AppendedSource ¶
func (m *TableColumnMutation) AppendedSource() (json.RawMessage, bool)
AppendedSource returns the list of values that were appended to the "source" 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) ClearSource ¶
func (m *TableColumnMutation) ClearSource()
ClearSource clears the value of the "source" 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) 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) 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) OldSource ¶
func (m *TableColumnMutation) OldSource(ctx context.Context) (v json.RawMessage, 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) 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) 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) 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) 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) ResetSource ¶
func (m *TableColumnMutation) ResetSource()
ResetSource resets all changes to the "source" 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) 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) SetSource ¶
func (m *TableColumnMutation) SetSource(jm json.RawMessage)
SetSource sets the "source" 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 json.RawMessage, 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) 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) AppendSource ¶
func (tcu *TableColumnUpdate) AppendSource(jm json.RawMessage) *TableColumnUpdate
AppendSource appends jm to the "source" 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) ClearSource ¶
func (tcu *TableColumnUpdate) ClearSource() *TableColumnUpdate
ClearSource clears the value of the "source" 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) 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) 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) 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) SetSource ¶
func (tcu *TableColumnUpdate) SetSource(jm json.RawMessage) *TableColumnUpdate
SetSource sets the "source" 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) AppendSource ¶
func (tcuo *TableColumnUpdateOne) AppendSource(jm json.RawMessage) *TableColumnUpdateOne
AppendSource appends jm to the "source" 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) ClearSource ¶
func (tcuo *TableColumnUpdateOne) ClearSource() *TableColumnUpdateOne
ClearSource clears the value of the "source" 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) 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) 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) 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) SetSource ¶
func (tcuo *TableColumnUpdateOne) SetSource(jm json.RawMessage) *TableColumnUpdateOne
SetSource sets the "source" 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) 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) ClearSource ¶
func (u *TableColumnUpsert) ClearSource() *TableColumnUpsert
ClearSource clears the value of the "source" 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) 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) SetSource ¶
func (u *TableColumnUpsert) SetSource(v json.RawMessage) *TableColumnUpsert
SetSource sets the "source" 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) 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) UpdateSource ¶
func (u *TableColumnUpsert) UpdateSource() *TableColumnUpsert
UpdateSource sets the "source" 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) 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) ClearSource ¶
func (u *TableColumnUpsertBulk) ClearSource() *TableColumnUpsertBulk
ClearSource clears the value of the "source" 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) 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) SetSource ¶
func (u *TableColumnUpsertBulk) SetSource(v json.RawMessage) *TableColumnUpsertBulk
SetSource sets the "source" 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) 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) UpdateSource ¶
func (u *TableColumnUpsertBulk) UpdateSource() *TableColumnUpsertBulk
UpdateSource sets the "source" 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) 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) ClearSource ¶
func (u *TableColumnUpsertOne) ClearSource() *TableColumnUpsertOne
ClearSource clears the value of the "source" 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) 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) SetSource ¶
func (u *TableColumnUpsertOne) SetSource(v json.RawMessage) *TableColumnUpsertOne
SetSource sets the "source" 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) 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) UpdateSource ¶
func (u *TableColumnUpsertOne) UpdateSource() *TableColumnUpsertOne
UpdateSource sets the "source" 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 { // 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 // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- ent.go
- generate.go
- mutation.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