ent

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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 Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

func Rollback

func Rollback(tx *Tx, err error) error

func WithTx

func WithTx(ctx context.Context, client *Client, fn func(tx *Tx) error) error

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

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(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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 Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

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 Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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 Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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 Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

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

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

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

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

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.

func (*TableColumn) Value

func (tc *TableColumn) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TableColumn. This includes values selected through modifiers, order, etc.

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

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

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

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

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

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

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

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

func (s *TableColumnGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TableColumnGroupBy) BoolX

func (s *TableColumnGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TableColumnGroupBy) Bools

func (s *TableColumnGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TableColumnGroupBy) BoolsX

func (s *TableColumnGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TableColumnGroupBy) Float64

func (s *TableColumnGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TableColumnGroupBy) Float64X

func (s *TableColumnGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TableColumnGroupBy) Float64s

func (s *TableColumnGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TableColumnGroupBy) Float64sX

func (s *TableColumnGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TableColumnGroupBy) Int

func (s *TableColumnGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TableColumnGroupBy) IntX

func (s *TableColumnGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TableColumnGroupBy) Ints

func (s *TableColumnGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TableColumnGroupBy) IntsX

func (s *TableColumnGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *TableColumnGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TableColumnGroupBy) String

func (s *TableColumnGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TableColumnGroupBy) StringX

func (s *TableColumnGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TableColumnGroupBy) Strings

func (s *TableColumnGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TableColumnGroupBy) StringsX

func (s *TableColumnGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *TableColumnMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *TableColumnMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *TableColumnMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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

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

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

func (s *TableColumnSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TableColumnSelect) BoolX

func (s *TableColumnSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TableColumnSelect) Bools

func (s *TableColumnSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TableColumnSelect) BoolsX

func (s *TableColumnSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TableColumnSelect) Float64

func (s *TableColumnSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TableColumnSelect) Float64X

func (s *TableColumnSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TableColumnSelect) Float64s

func (s *TableColumnSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TableColumnSelect) Float64sX

func (s *TableColumnSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TableColumnSelect) Int

func (s *TableColumnSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TableColumnSelect) IntX

func (s *TableColumnSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TableColumnSelect) Ints

func (s *TableColumnSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TableColumnSelect) IntsX

func (s *TableColumnSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *TableColumnSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TableColumnSelect) String

func (s *TableColumnSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TableColumnSelect) StringX

func (s *TableColumnSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TableColumnSelect) Strings

func (s *TableColumnSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TableColumnSelect) StringsX

func (s *TableColumnSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

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

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

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

SetFillMode sets the "fill_mode" field.

func (*TableColumnUpdateOne) SetName

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

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

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

Where appends a list predicates to the TableColumnUpdate builder.

type TableColumnUpsert

type TableColumnUpsert struct {
	*sql.UpdateSet
}

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

SetFillMode sets the "fill_mode" field.

func (*TableColumnUpsert) SetName

SetName sets the "name" field.

func (*TableColumnUpsert) SetNanoid

func (u *TableColumnUpsert) SetNanoid(v string) *TableColumnUpsert

SetNanoid sets the "nanoid" field.

func (*TableColumnUpsert) SetSource

SetSource sets the "source" field.

func (*TableColumnUpsert) SetTableID

func (u *TableColumnUpsert) SetTableID(v int) *TableColumnUpsert

SetTableID sets the "table_id" field.

func (*TableColumnUpsert) SetType

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

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TableColumnUpsertBulk) Exec

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

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

SetFillMode sets the "fill_mode" field.

func (*TableColumnUpsertBulk) SetName

SetName sets the "name" field.

func (*TableColumnUpsertBulk) SetNanoid

SetNanoid sets the "nanoid" field.

func (*TableColumnUpsertBulk) SetSource

SetSource sets the "source" field.

func (*TableColumnUpsertBulk) SetTableID

SetTableID sets the "table_id" field.

func (*TableColumnUpsertBulk) SetType

SetType sets the "type" field.

func (*TableColumnUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*TableColumnUpsertBulk) Update

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

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

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

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TableColumnUpsertOne) Exec

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

IDX is like ID, but panics if an error occurs.

func (*TableColumnUpsertOne) Ignore

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

SetFillMode sets the "fill_mode" field.

func (*TableColumnUpsertOne) SetName

SetName sets the "name" field.

func (*TableColumnUpsertOne) SetNanoid

SetNanoid sets the "nanoid" field.

func (*TableColumnUpsertOne) SetSource

SetSource sets the "source" field.

func (*TableColumnUpsertOne) SetTableID

func (u *TableColumnUpsertOne) SetTableID(v int) *TableColumnUpsertOne

SetTableID sets the "table_id" field.

func (*TableColumnUpsertOne) SetType

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

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) String

func (tm *TableMeta) String() string

String implements the fmt.Stringer.

func (*TableMeta) Unwrap

func (tm *TableMeta) Unwrap() *TableMeta

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.

func (*TableMeta) Value

func (tm *TableMeta) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TableMeta. This includes values selected through modifiers, order, etc.

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) Get

func (c *TableMetaClient) Get(ctx context.Context, id int) (*TableMeta, error)

Get returns a TableMeta 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)

func (*TableMetaCreateBulk) Save

func (tmcb *TableMetaCreateBulk) Save(ctx context.Context) ([]*TableMeta, error)

Save creates the TableMeta entities in the database.

func (*TableMetaCreateBulk) SaveX

func (tmcb *TableMetaCreateBulk) SaveX(ctx context.Context) []*TableMeta

SaveX is like Save, but panics if an error occurs.

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

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

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

func (s *TableMetaGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TableMetaGroupBy) BoolX

func (s *TableMetaGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TableMetaGroupBy) Bools

func (s *TableMetaGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TableMetaGroupBy) BoolsX

func (s *TableMetaGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TableMetaGroupBy) Float64

func (s *TableMetaGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TableMetaGroupBy) Float64X

func (s *TableMetaGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TableMetaGroupBy) Float64s

func (s *TableMetaGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TableMetaGroupBy) Float64sX

func (s *TableMetaGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TableMetaGroupBy) Int

func (s *TableMetaGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TableMetaGroupBy) IntX

func (s *TableMetaGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TableMetaGroupBy) Ints

func (s *TableMetaGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TableMetaGroupBy) IntsX

func (s *TableMetaGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *TableMetaGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TableMetaGroupBy) String

func (s *TableMetaGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TableMetaGroupBy) StringX

func (s *TableMetaGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TableMetaGroupBy) Strings

func (s *TableMetaGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TableMetaGroupBy) StringsX

func (s *TableMetaGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *TableMetaMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *TableMetaMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *TableMetaMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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) Op

func (m *TableMetaMutation) Op() Op

Op returns the operation name.

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

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

func (s *TableMetaSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TableMetaSelect) BoolX

func (s *TableMetaSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TableMetaSelect) Bools

func (s *TableMetaSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TableMetaSelect) BoolsX

func (s *TableMetaSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TableMetaSelect) Float64

func (s *TableMetaSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TableMetaSelect) Float64X

func (s *TableMetaSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TableMetaSelect) Float64s

func (s *TableMetaSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TableMetaSelect) Float64sX

func (s *TableMetaSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TableMetaSelect) Int

func (s *TableMetaSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TableMetaSelect) IntX

func (s *TableMetaSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TableMetaSelect) Ints

func (s *TableMetaSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TableMetaSelect) IntsX

func (s *TableMetaSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *TableMetaSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TableMetaSelect) String

func (s *TableMetaSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TableMetaSelect) StringX

func (s *TableMetaSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TableMetaSelect) Strings

func (s *TableMetaSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TableMetaSelect) StringsX

func (s *TableMetaSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

Where appends a list predicates to the TableMetaUpdate builder.

type TableMetaUpsert

type TableMetaUpsert struct {
	*sql.UpdateSet
}

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

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

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

SetModel sets the "model" field.

func (*TableMetaUpsertBulk) SetName

SetName sets the "name" field.

func (*TableMetaUpsertBulk) SetNanoid

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

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

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

SetModel sets the "model" field.

func (*TableMetaUpsertOne) SetName

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) String

func (tr *TableRow) String() string

String implements the fmt.Stringer.

func (*TableRow) Unwrap

func (tr *TableRow) Unwrap() *TableRow

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.

func (*TableRow) Value

func (tr *TableRow) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TableRow. This includes values selected through modifiers, order, etc.

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) Get

func (c *TableRowClient) Get(ctx context.Context, id int) (*TableRow, error)

Get returns a TableRow 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)

func (*TableRowCreateBulk) Save

func (trcb *TableRowCreateBulk) Save(ctx context.Context) ([]*TableRow, error)

Save creates the TableRow entities in the database.

func (*TableRowCreateBulk) SaveX

func (trcb *TableRowCreateBulk) SaveX(ctx context.Context) []*TableRow

SaveX is like Save, but panics if an error occurs.

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

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

func (s *TableRowGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TableRowGroupBy) BoolX

func (s *TableRowGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TableRowGroupBy) Bools

func (s *TableRowGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TableRowGroupBy) BoolsX

func (s *TableRowGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TableRowGroupBy) Float64

func (s *TableRowGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TableRowGroupBy) Float64X

func (s *TableRowGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TableRowGroupBy) Float64s

func (s *TableRowGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TableRowGroupBy) Float64sX

func (s *TableRowGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TableRowGroupBy) Int

func (s *TableRowGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TableRowGroupBy) IntX

func (s *TableRowGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TableRowGroupBy) Ints

func (s *TableRowGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TableRowGroupBy) IntsX

func (s *TableRowGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *TableRowGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TableRowGroupBy) String

func (s *TableRowGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TableRowGroupBy) StringX

func (s *TableRowGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TableRowGroupBy) Strings

func (s *TableRowGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TableRowGroupBy) StringsX

func (s *TableRowGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *TableRowMutation) OldCells(ctx context.Context) (v []*schema.CellValue, err error)

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

func (m *TableRowMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *TableRowMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *TableRowMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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) Op

func (m *TableRowMutation) Op() Op

Op returns the operation name.

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

func (s *TableRowSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TableRowSelect) BoolX

func (s *TableRowSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TableRowSelect) Bools

func (s *TableRowSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TableRowSelect) BoolsX

func (s *TableRowSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TableRowSelect) Float64

func (s *TableRowSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TableRowSelect) Float64X

func (s *TableRowSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TableRowSelect) Float64s

func (s *TableRowSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TableRowSelect) Float64sX

func (s *TableRowSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TableRowSelect) Int

func (s *TableRowSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TableRowSelect) IntX

func (s *TableRowSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TableRowSelect) Ints

func (s *TableRowSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TableRowSelect) IntsX

func (s *TableRowSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *TableRowSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TableRowSelect) String

func (s *TableRowSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TableRowSelect) StringX

func (s *TableRowSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TableRowSelect) Strings

func (s *TableRowSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TableRowSelect) StringsX

func (s *TableRowSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

Where appends a list predicates to the TableRowUpdate builder.

type TableRowUpsert

type TableRowUpsert struct {
	*sql.UpdateSet
}

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

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

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

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 TableRows

type TableRows []*TableRow

TableRows is a parsable slice of TableRow.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

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

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL