ent

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 21 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.
	TypeSchemaA = "SchemaA"
	TypeSchemaB = "SchemaB"
)

Variables

This section is empty.

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 SchemaASliceToOpenAPI

func SchemaASliceToOpenAPI(s []*SchemaA) (_ []openapi.SchemaA, err error)

Following edges must be loaded:

edge_schemab_unique_required
edge_schemab_unique_required_bindto_bs
edge_schemab_unique_optional
edge_schemab
edge_schemaa_recursive:
  edge_schemab_unique_required
  edge_schemab_unique_required_bindto_bs
  edge_schemab_unique_optional
  edge_schemab
  edge_schemaa_recursive...

func SchemaBSliceToOpenAPI

func SchemaBSliceToOpenAPI(s []*SchemaB) (_ []openapi.SchemaB, err 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
	// SchemaA is the client for interacting with the SchemaA builders.
	SchemaA *SchemaAClient
	// SchemaB is the client for interacting with the SchemaB builders.
	SchemaB *SchemaBClient
	// 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().
	SchemaA.
	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 SchemaA

type SchemaA struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Int64 holds the value of the "int64" field.
	Int64 int64 `json:"int64,omitempty"`
	// StringBindtoFoobar holds the value of the "string_bindto_foobar" field.
	StringBindtoFoobar string `json:"string_bindto_foobar,omitempty"`
	// StringOptionalNullable holds the value of the "string_optional_nullable" field.
	StringOptionalNullable *string `json:"string_optional_nullable,omitempty"`
	// OptionalNullableBool holds the value of the "optional_nullable_bool" field.
	OptionalNullableBool *bool `json:"optional_nullable_bool,omitempty"`
	// JsontypeStrings holds the value of the "jsontype_strings" field.
	JsontypeStrings []string `json:"jsontype_strings,omitempty"`
	// JsontypeStringsOptional holds the value of the "jsontype_strings_optional" field.
	JsontypeStringsOptional []string `json:"jsontype_strings_optional,omitempty"`
	// JsontypeInts holds the value of the "jsontype_ints" field.
	JsontypeInts []int `json:"jsontype_ints,omitempty"`
	// JsontypeIntsOptional holds the value of the "jsontype_ints_optional" field.
	JsontypeIntsOptional []int `json:"jsontype_ints_optional,omitempty"`
	// RequiredEnum holds the value of the "required_enum" field.
	RequiredEnum schemaa.RequiredEnum `json:"required_enum,omitempty"`
	// OptionalNullableEnum holds the value of the "optional_nullable_enum" field.
	OptionalNullableEnum *schemaa.OptionalNullableEnum `json:"optional_nullable_enum,omitempty"`
	// Bytes holds the value of the "bytes" field.
	Bytes []byte `json:"bytes,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SchemaAQuery when eager-loading is set.
	Edges SchemaAEdges `json:"edges"`
	// contains filtered or unexported fields
}

SchemaA is the model entity for the SchemaA schema.

func (*SchemaA) QueryEdgeSchemaaRecursive

func (s *SchemaA) QueryEdgeSchemaaRecursive() *SchemaAQuery

QueryEdgeSchemaaRecursive queries the "edge_schemaa_recursive" edge of the SchemaA entity.

func (*SchemaA) QueryEdgeSchemab

func (s *SchemaA) QueryEdgeSchemab() *SchemaBQuery

QueryEdgeSchemab queries the "edge_schemab" edge of the SchemaA entity.

func (*SchemaA) QueryEdgeSchemabUniqueOptional

func (s *SchemaA) QueryEdgeSchemabUniqueOptional() *SchemaBQuery

QueryEdgeSchemabUniqueOptional queries the "edge_schemab_unique_optional" edge of the SchemaA entity.

func (*SchemaA) QueryEdgeSchemabUniqueRequired

func (s *SchemaA) QueryEdgeSchemabUniqueRequired() *SchemaBQuery

QueryEdgeSchemabUniqueRequired queries the "edge_schemab_unique_required" edge of the SchemaA entity.

func (*SchemaA) QueryEdgeSchemabUniqueRequiredBindtoBs

func (s *SchemaA) QueryEdgeSchemabUniqueRequiredBindtoBs() *SchemaBQuery

QueryEdgeSchemabUniqueRequiredBindtoBs queries the "edge_schemab_unique_required_bindto_bs" edge of the SchemaA entity.

func (*SchemaA) String

func (s *SchemaA) String() string

String implements the fmt.Stringer.

func (*SchemaA) ToOpenAPI

func (e *SchemaA) ToOpenAPI() (*openapi.SchemaA, error)

Following edges must be loaded:

edge_schemab_unique_required
edge_schemab_unique_required_bindto_bs
edge_schemab_unique_optional
edge_schemab
edge_schemaa_recursive:
  edge_schemab_unique_required
  edge_schemab_unique_required_bindto_bs
  edge_schemab_unique_optional
  edge_schemab
  edge_schemaa_recursive...

func (*SchemaA) Unwrap

func (s *SchemaA) Unwrap() *SchemaA

Unwrap unwraps the SchemaA 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 (*SchemaA) Update

func (s *SchemaA) Update() *SchemaAUpdateOne

Update returns a builder for updating this SchemaA. Note that you need to call SchemaA.Unwrap() before calling this method if this SchemaA was returned from a transaction, and the transaction was committed or rolled back.

func (*SchemaA) Value

func (s *SchemaA) Value(name string) (ent.Value, error)

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

type SchemaAClient

type SchemaAClient struct {
	// contains filtered or unexported fields
}

SchemaAClient is a client for the SchemaA schema.

func NewSchemaAClient

func NewSchemaAClient(c config) *SchemaAClient

NewSchemaAClient returns a client for the SchemaA from the given config.

func (*SchemaAClient) Create

func (c *SchemaAClient) Create() *SchemaACreate

Create returns a builder for creating a SchemaA entity.

func (*SchemaAClient) CreateBulk

func (c *SchemaAClient) CreateBulk(builders ...*SchemaACreate) *SchemaACreateBulk

CreateBulk returns a builder for creating a bulk of SchemaA entities.

func (*SchemaAClient) Delete

func (c *SchemaAClient) Delete() *SchemaADelete

Delete returns a delete builder for SchemaA.

func (*SchemaAClient) DeleteOne

func (c *SchemaAClient) DeleteOne(s *SchemaA) *SchemaADeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SchemaAClient) DeleteOneID

func (c *SchemaAClient) DeleteOneID(id int) *SchemaADeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SchemaAClient) Get

func (c *SchemaAClient) Get(ctx context.Context, id int) (*SchemaA, error)

Get returns a SchemaA entity by its id.

func (*SchemaAClient) GetX

func (c *SchemaAClient) GetX(ctx context.Context, id int) *SchemaA

GetX is like Get, but panics if an error occurs.

func (*SchemaAClient) Hooks

func (c *SchemaAClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SchemaAClient) Intercept

func (c *SchemaAClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `schemaa.Intercept(f(g(h())))`.

func (*SchemaAClient) Interceptors

func (c *SchemaAClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SchemaAClient) Query

func (c *SchemaAClient) Query() *SchemaAQuery

Query returns a query builder for SchemaA.

func (*SchemaAClient) QueryEdgeSchemaaRecursive

func (c *SchemaAClient) QueryEdgeSchemaaRecursive(s *SchemaA) *SchemaAQuery

QueryEdgeSchemaaRecursive queries the edge_schemaa_recursive edge of a SchemaA.

func (*SchemaAClient) QueryEdgeSchemab

func (c *SchemaAClient) QueryEdgeSchemab(s *SchemaA) *SchemaBQuery

QueryEdgeSchemab queries the edge_schemab edge of a SchemaA.

func (*SchemaAClient) QueryEdgeSchemabUniqueOptional

func (c *SchemaAClient) QueryEdgeSchemabUniqueOptional(s *SchemaA) *SchemaBQuery

QueryEdgeSchemabUniqueOptional queries the edge_schemab_unique_optional edge of a SchemaA.

func (*SchemaAClient) QueryEdgeSchemabUniqueRequired

func (c *SchemaAClient) QueryEdgeSchemabUniqueRequired(s *SchemaA) *SchemaBQuery

QueryEdgeSchemabUniqueRequired queries the edge_schemab_unique_required edge of a SchemaA.

func (*SchemaAClient) QueryEdgeSchemabUniqueRequiredBindtoBs

func (c *SchemaAClient) QueryEdgeSchemabUniqueRequiredBindtoBs(s *SchemaA) *SchemaBQuery

QueryEdgeSchemabUniqueRequiredBindtoBs queries the edge_schemab_unique_required_bindto_bs edge of a SchemaA.

func (*SchemaAClient) Update

func (c *SchemaAClient) Update() *SchemaAUpdate

Update returns an update builder for SchemaA.

func (*SchemaAClient) UpdateOne

func (c *SchemaAClient) UpdateOne(s *SchemaA) *SchemaAUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SchemaAClient) UpdateOneID

func (c *SchemaAClient) UpdateOneID(id int) *SchemaAUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SchemaAClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `schemaa.Hooks(f(g(h())))`.

type SchemaACreate

type SchemaACreate struct {
	// contains filtered or unexported fields
}

SchemaACreate is the builder for creating a SchemaA entity.

func (*SchemaACreate) AddEdgeSchemaaRecursive

func (sa *SchemaACreate) AddEdgeSchemaaRecursive(s ...*SchemaA) *SchemaACreate

AddEdgeSchemaaRecursive adds the "edge_schemaa_recursive" edges to the SchemaA entity.

func (*SchemaACreate) AddEdgeSchemaaRecursiveIDs

func (sa *SchemaACreate) AddEdgeSchemaaRecursiveIDs(ids ...int) *SchemaACreate

AddEdgeSchemaaRecursiveIDs adds the "edge_schemaa_recursive" edge to the SchemaA entity by IDs.

func (*SchemaACreate) AddEdgeSchemab

func (sa *SchemaACreate) AddEdgeSchemab(s ...*SchemaB) *SchemaACreate

AddEdgeSchemab adds the "edge_schemab" edges to the SchemaB entity.

func (*SchemaACreate) AddEdgeSchemabIDs

func (sa *SchemaACreate) AddEdgeSchemabIDs(ids ...int64) *SchemaACreate

AddEdgeSchemabIDs adds the "edge_schemab" edge to the SchemaB entity by IDs.

func (*SchemaACreate) Exec

func (sa *SchemaACreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SchemaACreate) ExecX

func (sa *SchemaACreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaACreate) Mutation

func (sa *SchemaACreate) Mutation() *SchemaAMutation

Mutation returns the SchemaAMutation object of the builder.

func (*SchemaACreate) Save

func (sa *SchemaACreate) Save(ctx context.Context) (*SchemaA, error)

Save creates the SchemaA in the database.

func (*SchemaACreate) SaveX

func (sa *SchemaACreate) SaveX(ctx context.Context) *SchemaA

SaveX calls Save and panics if Save returns an error.

func (*SchemaACreate) SetBytes

func (sa *SchemaACreate) SetBytes(b []byte) *SchemaACreate

SetBytes sets the "bytes" field.

func (*SchemaACreate) SetEdgeSchemabUniqueOptional

func (sa *SchemaACreate) SetEdgeSchemabUniqueOptional(s *SchemaB) *SchemaACreate

SetEdgeSchemabUniqueOptional sets the "edge_schemab_unique_optional" edge to the SchemaB entity.

func (*SchemaACreate) SetEdgeSchemabUniqueOptionalID

func (sa *SchemaACreate) SetEdgeSchemabUniqueOptionalID(id int64) *SchemaACreate

SetEdgeSchemabUniqueOptionalID sets the "edge_schemab_unique_optional" edge to the SchemaB entity by ID.

func (*SchemaACreate) SetEdgeSchemabUniqueRequired

func (sa *SchemaACreate) SetEdgeSchemabUniqueRequired(s *SchemaB) *SchemaACreate

SetEdgeSchemabUniqueRequired sets the "edge_schemab_unique_required" edge to the SchemaB entity.

func (*SchemaACreate) SetEdgeSchemabUniqueRequiredBindtoBs

func (sa *SchemaACreate) SetEdgeSchemabUniqueRequiredBindtoBs(s *SchemaB) *SchemaACreate

SetEdgeSchemabUniqueRequiredBindtoBs sets the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity.

func (*SchemaACreate) SetEdgeSchemabUniqueRequiredBindtoBsID

func (sa *SchemaACreate) SetEdgeSchemabUniqueRequiredBindtoBsID(id int64) *SchemaACreate

SetEdgeSchemabUniqueRequiredBindtoBsID sets the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity by ID.

func (*SchemaACreate) SetEdgeSchemabUniqueRequiredID

func (sa *SchemaACreate) SetEdgeSchemabUniqueRequiredID(id int64) *SchemaACreate

SetEdgeSchemabUniqueRequiredID sets the "edge_schemab_unique_required" edge to the SchemaB entity by ID.

func (*SchemaACreate) SetInt64

func (sa *SchemaACreate) SetInt64(i int64) *SchemaACreate

SetInt64 sets the "int64" field.

func (*SchemaACreate) SetJsontypeInts

func (sa *SchemaACreate) SetJsontypeInts(i []int) *SchemaACreate

SetJsontypeInts sets the "jsontype_ints" field.

func (*SchemaACreate) SetJsontypeIntsOptional

func (sa *SchemaACreate) SetJsontypeIntsOptional(i []int) *SchemaACreate

SetJsontypeIntsOptional sets the "jsontype_ints_optional" field.

func (*SchemaACreate) SetJsontypeStrings

func (sa *SchemaACreate) SetJsontypeStrings(s []string) *SchemaACreate

SetJsontypeStrings sets the "jsontype_strings" field.

func (*SchemaACreate) SetJsontypeStringsOptional

func (sa *SchemaACreate) SetJsontypeStringsOptional(s []string) *SchemaACreate

SetJsontypeStringsOptional sets the "jsontype_strings_optional" field.

func (*SchemaACreate) SetNillableEdgeSchemabUniqueOptionalID

func (sa *SchemaACreate) SetNillableEdgeSchemabUniqueOptionalID(id *int64) *SchemaACreate

SetNillableEdgeSchemabUniqueOptionalID sets the "edge_schemab_unique_optional" edge to the SchemaB entity by ID if the given value is not nil.

func (*SchemaACreate) SetNillableOptionalNullableBool

func (sa *SchemaACreate) SetNillableOptionalNullableBool(b *bool) *SchemaACreate

SetNillableOptionalNullableBool sets the "optional_nullable_bool" field if the given value is not nil.

func (*SchemaACreate) SetNillableOptionalNullableEnum

func (sa *SchemaACreate) SetNillableOptionalNullableEnum(sne *schemaa.OptionalNullableEnum) *SchemaACreate

SetNillableOptionalNullableEnum sets the "optional_nullable_enum" field if the given value is not nil.

func (*SchemaACreate) SetNillableStringOptionalNullable

func (sa *SchemaACreate) SetNillableStringOptionalNullable(s *string) *SchemaACreate

SetNillableStringOptionalNullable sets the "string_optional_nullable" field if the given value is not nil.

func (*SchemaACreate) SetOptionalNullableBool

func (sa *SchemaACreate) SetOptionalNullableBool(b bool) *SchemaACreate

SetOptionalNullableBool sets the "optional_nullable_bool" field.

func (*SchemaACreate) SetOptionalNullableEnum

func (sa *SchemaACreate) SetOptionalNullableEnum(sne schemaa.OptionalNullableEnum) *SchemaACreate

SetOptionalNullableEnum sets the "optional_nullable_enum" field.

func (*SchemaACreate) SetRequiredEnum

func (sa *SchemaACreate) SetRequiredEnum(se schemaa.RequiredEnum) *SchemaACreate

SetRequiredEnum sets the "required_enum" field.

func (*SchemaACreate) SetStringBindtoFoobar

func (sa *SchemaACreate) SetStringBindtoFoobar(s string) *SchemaACreate

SetStringBindtoFoobar sets the "string_bindto_foobar" field.

func (*SchemaACreate) SetStringOptionalNullable

func (sa *SchemaACreate) SetStringOptionalNullable(s string) *SchemaACreate

SetStringOptionalNullable sets the "string_optional_nullable" field.

type SchemaACreateBulk

type SchemaACreateBulk struct {
	// contains filtered or unexported fields
}

SchemaACreateBulk is the builder for creating many SchemaA entities in bulk.

func (*SchemaACreateBulk) Exec

func (sab *SchemaACreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SchemaACreateBulk) ExecX

func (sab *SchemaACreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaACreateBulk) Save

func (sab *SchemaACreateBulk) Save(ctx context.Context) ([]*SchemaA, error)

Save creates the SchemaA entities in the database.

func (*SchemaACreateBulk) SaveX

func (sab *SchemaACreateBulk) SaveX(ctx context.Context) []*SchemaA

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

type SchemaADelete

type SchemaADelete struct {
	// contains filtered or unexported fields
}

SchemaADelete is the builder for deleting a SchemaA entity.

func (*SchemaADelete) Exec

func (sa *SchemaADelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SchemaADelete) ExecX

func (sa *SchemaADelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SchemaADelete) Where

func (sa *SchemaADelete) Where(ps ...predicate.SchemaA) *SchemaADelete

Where appends a list predicates to the SchemaADelete builder.

type SchemaADeleteOne

type SchemaADeleteOne struct {
	// contains filtered or unexported fields
}

SchemaADeleteOne is the builder for deleting a single SchemaA entity.

func (*SchemaADeleteOne) Exec

func (sao *SchemaADeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SchemaADeleteOne) ExecX

func (sao *SchemaADeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaADeleteOne) Where

Where appends a list predicates to the SchemaADelete builder.

type SchemaAEdges

type SchemaAEdges struct {
	// EdgeSchemabUniqueRequired holds the value of the edge_schemab_unique_required edge.
	EdgeSchemabUniqueRequired *SchemaB `json:"edge_schemab_unique_required,omitempty"`
	// EdgeSchemabUniqueRequiredBindtoBs holds the value of the edge_schemab_unique_required_bindto_bs edge.
	EdgeSchemabUniqueRequiredBindtoBs *SchemaB `json:"edge_schemab_unique_required_bindto_bs,omitempty"`
	// EdgeSchemabUniqueOptional holds the value of the edge_schemab_unique_optional edge.
	EdgeSchemabUniqueOptional *SchemaB `json:"edge_schemab_unique_optional,omitempty"`
	// EdgeSchemab holds the value of the edge_schemab edge.
	EdgeSchemab []*SchemaB `json:"edge_schemab,omitempty"`
	// EdgeSchemaaRecursive holds the value of the edge_schemaa_recursive edge.
	EdgeSchemaaRecursive []*SchemaA `json:"edge_schemaa_recursive,omitempty"`
	// contains filtered or unexported fields
}

SchemaAEdges holds the relations/edges for other nodes in the graph.

func (SchemaAEdges) EdgeSchemaaRecursiveOrErr

func (e SchemaAEdges) EdgeSchemaaRecursiveOrErr() ([]*SchemaA, error)

EdgeSchemaaRecursiveOrErr returns the EdgeSchemaaRecursive value or an error if the edge was not loaded in eager-loading.

func (SchemaAEdges) EdgeSchemabOrErr

func (e SchemaAEdges) EdgeSchemabOrErr() ([]*SchemaB, error)

EdgeSchemabOrErr returns the EdgeSchemab value or an error if the edge was not loaded in eager-loading.

func (SchemaAEdges) EdgeSchemabUniqueOptionalOrErr

func (e SchemaAEdges) EdgeSchemabUniqueOptionalOrErr() (*SchemaB, error)

EdgeSchemabUniqueOptionalOrErr returns the EdgeSchemabUniqueOptional value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SchemaAEdges) EdgeSchemabUniqueRequiredBindtoBsOrErr

func (e SchemaAEdges) EdgeSchemabUniqueRequiredBindtoBsOrErr() (*SchemaB, error)

EdgeSchemabUniqueRequiredBindtoBsOrErr returns the EdgeSchemabUniqueRequiredBindtoBs value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SchemaAEdges) EdgeSchemabUniqueRequiredOrErr

func (e SchemaAEdges) EdgeSchemabUniqueRequiredOrErr() (*SchemaB, error)

EdgeSchemabUniqueRequiredOrErr returns the EdgeSchemabUniqueRequired value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SchemaAGroupBy

type SchemaAGroupBy struct {
	// contains filtered or unexported fields
}

SchemaAGroupBy is the group-by builder for SchemaA entities.

func (*SchemaAGroupBy) Aggregate

func (sab *SchemaAGroupBy) Aggregate(fns ...AggregateFunc) *SchemaAGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SchemaAGroupBy) Bool

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

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

func (*SchemaAGroupBy) BoolX

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

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

func (*SchemaAGroupBy) Bools

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

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

func (*SchemaAGroupBy) BoolsX

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

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

func (*SchemaAGroupBy) Float64

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

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

func (*SchemaAGroupBy) Float64X

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

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

func (*SchemaAGroupBy) Float64s

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

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

func (*SchemaAGroupBy) Float64sX

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

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

func (*SchemaAGroupBy) Int

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

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

func (*SchemaAGroupBy) IntX

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

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

func (*SchemaAGroupBy) Ints

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

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

func (*SchemaAGroupBy) IntsX

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

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

func (*SchemaAGroupBy) Scan

func (sab *SchemaAGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SchemaAGroupBy) ScanX

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

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

func (*SchemaAGroupBy) String

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

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

func (*SchemaAGroupBy) StringX

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

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

func (*SchemaAGroupBy) Strings

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

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

func (*SchemaAGroupBy) StringsX

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

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

type SchemaAMutation

type SchemaAMutation struct {
	// contains filtered or unexported fields
}

SchemaAMutation represents an operation that mutates the SchemaA nodes in the graph.

func (*SchemaAMutation) AddEdgeSchemaaRecursiveIDs

func (m *SchemaAMutation) AddEdgeSchemaaRecursiveIDs(ids ...int)

AddEdgeSchemaaRecursiveIDs adds the "edge_schemaa_recursive" edge to the SchemaA entity by ids.

func (*SchemaAMutation) AddEdgeSchemabIDs

func (m *SchemaAMutation) AddEdgeSchemabIDs(ids ...int64)

AddEdgeSchemabIDs adds the "edge_schemab" edge to the SchemaB entity by ids.

func (*SchemaAMutation) AddField

func (m *SchemaAMutation) 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 (*SchemaAMutation) AddInt64

func (m *SchemaAMutation) AddInt64(i int64)

AddInt64 adds i to the "int64" field.

func (*SchemaAMutation) AddedEdges

func (m *SchemaAMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SchemaAMutation) AddedField

func (m *SchemaAMutation) 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 (*SchemaAMutation) AddedFields

func (m *SchemaAMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SchemaAMutation) AddedIDs

func (m *SchemaAMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SchemaAMutation) AddedInt64

func (m *SchemaAMutation) AddedInt64() (r int64, exists bool)

AddedInt64 returns the value that was added to the "int64" field in this mutation.

func (*SchemaAMutation) AppendJsontypeInts

func (m *SchemaAMutation) AppendJsontypeInts(i []int)

AppendJsontypeInts adds i to the "jsontype_ints" field.

func (*SchemaAMutation) AppendJsontypeIntsOptional

func (m *SchemaAMutation) AppendJsontypeIntsOptional(i []int)

AppendJsontypeIntsOptional adds i to the "jsontype_ints_optional" field.

func (*SchemaAMutation) AppendJsontypeStrings

func (m *SchemaAMutation) AppendJsontypeStrings(s []string)

AppendJsontypeStrings adds s to the "jsontype_strings" field.

func (*SchemaAMutation) AppendJsontypeStringsOptional

func (m *SchemaAMutation) AppendJsontypeStringsOptional(s []string)

AppendJsontypeStringsOptional adds s to the "jsontype_strings_optional" field.

func (*SchemaAMutation) AppendedJsontypeInts

func (m *SchemaAMutation) AppendedJsontypeInts() ([]int, bool)

AppendedJsontypeInts returns the list of values that were appended to the "jsontype_ints" field in this mutation.

func (*SchemaAMutation) AppendedJsontypeIntsOptional

func (m *SchemaAMutation) AppendedJsontypeIntsOptional() ([]int, bool)

AppendedJsontypeIntsOptional returns the list of values that were appended to the "jsontype_ints_optional" field in this mutation.

func (*SchemaAMutation) AppendedJsontypeStrings

func (m *SchemaAMutation) AppendedJsontypeStrings() ([]string, bool)

AppendedJsontypeStrings returns the list of values that were appended to the "jsontype_strings" field in this mutation.

func (*SchemaAMutation) AppendedJsontypeStringsOptional

func (m *SchemaAMutation) AppendedJsontypeStringsOptional() ([]string, bool)

AppendedJsontypeStringsOptional returns the list of values that were appended to the "jsontype_strings_optional" field in this mutation.

func (*SchemaAMutation) Bytes

func (m *SchemaAMutation) Bytes() (r []byte, exists bool)

Bytes returns the value of the "bytes" field in the mutation.

func (*SchemaAMutation) ClearEdge

func (m *SchemaAMutation) 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 (*SchemaAMutation) ClearEdgeSchemaaRecursive

func (m *SchemaAMutation) ClearEdgeSchemaaRecursive()

ClearEdgeSchemaaRecursive clears the "edge_schemaa_recursive" edge to the SchemaA entity.

func (*SchemaAMutation) ClearEdgeSchemab

func (m *SchemaAMutation) ClearEdgeSchemab()

ClearEdgeSchemab clears the "edge_schemab" edge to the SchemaB entity.

func (*SchemaAMutation) ClearEdgeSchemabUniqueOptional

func (m *SchemaAMutation) ClearEdgeSchemabUniqueOptional()

ClearEdgeSchemabUniqueOptional clears the "edge_schemab_unique_optional" edge to the SchemaB entity.

func (*SchemaAMutation) ClearEdgeSchemabUniqueRequired

func (m *SchemaAMutation) ClearEdgeSchemabUniqueRequired()

ClearEdgeSchemabUniqueRequired clears the "edge_schemab_unique_required" edge to the SchemaB entity.

func (*SchemaAMutation) ClearEdgeSchemabUniqueRequiredBindtoBs

func (m *SchemaAMutation) ClearEdgeSchemabUniqueRequiredBindtoBs()

ClearEdgeSchemabUniqueRequiredBindtoBs clears the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity.

func (*SchemaAMutation) ClearField

func (m *SchemaAMutation) 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 (*SchemaAMutation) ClearJsontypeIntsOptional

func (m *SchemaAMutation) ClearJsontypeIntsOptional()

ClearJsontypeIntsOptional clears the value of the "jsontype_ints_optional" field.

func (*SchemaAMutation) ClearJsontypeStringsOptional

func (m *SchemaAMutation) ClearJsontypeStringsOptional()

ClearJsontypeStringsOptional clears the value of the "jsontype_strings_optional" field.

func (*SchemaAMutation) ClearOptionalNullableBool

func (m *SchemaAMutation) ClearOptionalNullableBool()

ClearOptionalNullableBool clears the value of the "optional_nullable_bool" field.

func (*SchemaAMutation) ClearOptionalNullableEnum

func (m *SchemaAMutation) ClearOptionalNullableEnum()

ClearOptionalNullableEnum clears the value of the "optional_nullable_enum" field.

func (*SchemaAMutation) ClearStringOptionalNullable

func (m *SchemaAMutation) ClearStringOptionalNullable()

ClearStringOptionalNullable clears the value of the "string_optional_nullable" field.

func (*SchemaAMutation) ClearedEdges

func (m *SchemaAMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SchemaAMutation) ClearedFields

func (m *SchemaAMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SchemaAMutation) Client

func (m SchemaAMutation) 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 (*SchemaAMutation) EdgeCleared

func (m *SchemaAMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SchemaAMutation) EdgeSchemaaRecursiveCleared

func (m *SchemaAMutation) EdgeSchemaaRecursiveCleared() bool

EdgeSchemaaRecursiveCleared reports if the "edge_schemaa_recursive" edge to the SchemaA entity was cleared.

func (*SchemaAMutation) EdgeSchemaaRecursiveIDs

func (m *SchemaAMutation) EdgeSchemaaRecursiveIDs() (ids []int)

EdgeSchemaaRecursiveIDs returns the "edge_schemaa_recursive" edge IDs in the mutation.

func (*SchemaAMutation) EdgeSchemabCleared

func (m *SchemaAMutation) EdgeSchemabCleared() bool

EdgeSchemabCleared reports if the "edge_schemab" edge to the SchemaB entity was cleared.

func (*SchemaAMutation) EdgeSchemabIDs

func (m *SchemaAMutation) EdgeSchemabIDs() (ids []int64)

EdgeSchemabIDs returns the "edge_schemab" edge IDs in the mutation.

func (*SchemaAMutation) EdgeSchemabUniqueOptionalCleared

func (m *SchemaAMutation) EdgeSchemabUniqueOptionalCleared() bool

EdgeSchemabUniqueOptionalCleared reports if the "edge_schemab_unique_optional" edge to the SchemaB entity was cleared.

func (*SchemaAMutation) EdgeSchemabUniqueOptionalID

func (m *SchemaAMutation) EdgeSchemabUniqueOptionalID() (id int64, exists bool)

EdgeSchemabUniqueOptionalID returns the "edge_schemab_unique_optional" edge ID in the mutation.

func (*SchemaAMutation) EdgeSchemabUniqueOptionalIDs

func (m *SchemaAMutation) EdgeSchemabUniqueOptionalIDs() (ids []int64)

EdgeSchemabUniqueOptionalIDs returns the "edge_schemab_unique_optional" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EdgeSchemabUniqueOptionalID instead. It exists only for internal usage by the builders.

func (*SchemaAMutation) EdgeSchemabUniqueRequiredBindtoBsCleared

func (m *SchemaAMutation) EdgeSchemabUniqueRequiredBindtoBsCleared() bool

EdgeSchemabUniqueRequiredBindtoBsCleared reports if the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity was cleared.

func (*SchemaAMutation) EdgeSchemabUniqueRequiredBindtoBsID

func (m *SchemaAMutation) EdgeSchemabUniqueRequiredBindtoBsID() (id int64, exists bool)

EdgeSchemabUniqueRequiredBindtoBsID returns the "edge_schemab_unique_required_bindto_bs" edge ID in the mutation.

func (*SchemaAMutation) EdgeSchemabUniqueRequiredBindtoBsIDs

func (m *SchemaAMutation) EdgeSchemabUniqueRequiredBindtoBsIDs() (ids []int64)

EdgeSchemabUniqueRequiredBindtoBsIDs returns the "edge_schemab_unique_required_bindto_bs" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EdgeSchemabUniqueRequiredBindtoBsID instead. It exists only for internal usage by the builders.

func (*SchemaAMutation) EdgeSchemabUniqueRequiredCleared

func (m *SchemaAMutation) EdgeSchemabUniqueRequiredCleared() bool

EdgeSchemabUniqueRequiredCleared reports if the "edge_schemab_unique_required" edge to the SchemaB entity was cleared.

func (*SchemaAMutation) EdgeSchemabUniqueRequiredID

func (m *SchemaAMutation) EdgeSchemabUniqueRequiredID() (id int64, exists bool)

EdgeSchemabUniqueRequiredID returns the "edge_schemab_unique_required" edge ID in the mutation.

func (*SchemaAMutation) EdgeSchemabUniqueRequiredIDs

func (m *SchemaAMutation) EdgeSchemabUniqueRequiredIDs() (ids []int64)

EdgeSchemabUniqueRequiredIDs returns the "edge_schemab_unique_required" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EdgeSchemabUniqueRequiredID instead. It exists only for internal usage by the builders.

func (*SchemaAMutation) Field

func (m *SchemaAMutation) 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 (*SchemaAMutation) FieldCleared

func (m *SchemaAMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SchemaAMutation) Fields

func (m *SchemaAMutation) 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 (*SchemaAMutation) ID

func (m *SchemaAMutation) 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 (*SchemaAMutation) IDs

func (m *SchemaAMutation) 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 (*SchemaAMutation) Int64

func (m *SchemaAMutation) Int64() (r int64, exists bool)

Int64 returns the value of the "int64" field in the mutation.

func (*SchemaAMutation) JsontypeInts

func (m *SchemaAMutation) JsontypeInts() (r []int, exists bool)

JsontypeInts returns the value of the "jsontype_ints" field in the mutation.

func (*SchemaAMutation) JsontypeIntsOptional

func (m *SchemaAMutation) JsontypeIntsOptional() (r []int, exists bool)

JsontypeIntsOptional returns the value of the "jsontype_ints_optional" field in the mutation.

func (*SchemaAMutation) JsontypeIntsOptionalCleared

func (m *SchemaAMutation) JsontypeIntsOptionalCleared() bool

JsontypeIntsOptionalCleared returns if the "jsontype_ints_optional" field was cleared in this mutation.

func (*SchemaAMutation) JsontypeStrings

func (m *SchemaAMutation) JsontypeStrings() (r []string, exists bool)

JsontypeStrings returns the value of the "jsontype_strings" field in the mutation.

func (*SchemaAMutation) JsontypeStringsOptional

func (m *SchemaAMutation) JsontypeStringsOptional() (r []string, exists bool)

JsontypeStringsOptional returns the value of the "jsontype_strings_optional" field in the mutation.

func (*SchemaAMutation) JsontypeStringsOptionalCleared

func (m *SchemaAMutation) JsontypeStringsOptionalCleared() bool

JsontypeStringsOptionalCleared returns if the "jsontype_strings_optional" field was cleared in this mutation.

func (*SchemaAMutation) OldBytes

func (m *SchemaAMutation) OldBytes(ctx context.Context) (v []byte, err error)

OldBytes returns the old "bytes" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldField

func (m *SchemaAMutation) 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 (*SchemaAMutation) OldInt64

func (m *SchemaAMutation) OldInt64(ctx context.Context) (v int64, err error)

OldInt64 returns the old "int64" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldJsontypeInts

func (m *SchemaAMutation) OldJsontypeInts(ctx context.Context) (v []int, err error)

OldJsontypeInts returns the old "jsontype_ints" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldJsontypeIntsOptional

func (m *SchemaAMutation) OldJsontypeIntsOptional(ctx context.Context) (v []int, err error)

OldJsontypeIntsOptional returns the old "jsontype_ints_optional" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldJsontypeStrings

func (m *SchemaAMutation) OldJsontypeStrings(ctx context.Context) (v []string, err error)

OldJsontypeStrings returns the old "jsontype_strings" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldJsontypeStringsOptional

func (m *SchemaAMutation) OldJsontypeStringsOptional(ctx context.Context) (v []string, err error)

OldJsontypeStringsOptional returns the old "jsontype_strings_optional" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldOptionalNullableBool

func (m *SchemaAMutation) OldOptionalNullableBool(ctx context.Context) (v *bool, err error)

OldOptionalNullableBool returns the old "optional_nullable_bool" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldOptionalNullableEnum

func (m *SchemaAMutation) OldOptionalNullableEnum(ctx context.Context) (v *schemaa.OptionalNullableEnum, err error)

OldOptionalNullableEnum returns the old "optional_nullable_enum" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldRequiredEnum

func (m *SchemaAMutation) OldRequiredEnum(ctx context.Context) (v schemaa.RequiredEnum, err error)

OldRequiredEnum returns the old "required_enum" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldStringBindtoFoobar

func (m *SchemaAMutation) OldStringBindtoFoobar(ctx context.Context) (v string, err error)

OldStringBindtoFoobar returns the old "string_bindto_foobar" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) OldStringOptionalNullable

func (m *SchemaAMutation) OldStringOptionalNullable(ctx context.Context) (v *string, err error)

OldStringOptionalNullable returns the old "string_optional_nullable" field's value of the SchemaA entity. If the SchemaA 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 (*SchemaAMutation) Op

func (m *SchemaAMutation) Op() Op

Op returns the operation name.

func (*SchemaAMutation) OptionalNullableBool

func (m *SchemaAMutation) OptionalNullableBool() (r bool, exists bool)

OptionalNullableBool returns the value of the "optional_nullable_bool" field in the mutation.

func (*SchemaAMutation) OptionalNullableBoolCleared

func (m *SchemaAMutation) OptionalNullableBoolCleared() bool

OptionalNullableBoolCleared returns if the "optional_nullable_bool" field was cleared in this mutation.

func (*SchemaAMutation) OptionalNullableEnum

func (m *SchemaAMutation) OptionalNullableEnum() (r schemaa.OptionalNullableEnum, exists bool)

OptionalNullableEnum returns the value of the "optional_nullable_enum" field in the mutation.

func (*SchemaAMutation) OptionalNullableEnumCleared

func (m *SchemaAMutation) OptionalNullableEnumCleared() bool

OptionalNullableEnumCleared returns if the "optional_nullable_enum" field was cleared in this mutation.

func (*SchemaAMutation) RemoveEdgeSchemaaRecursiveIDs

func (m *SchemaAMutation) RemoveEdgeSchemaaRecursiveIDs(ids ...int)

RemoveEdgeSchemaaRecursiveIDs removes the "edge_schemaa_recursive" edge to the SchemaA entity by IDs.

func (*SchemaAMutation) RemoveEdgeSchemabIDs

func (m *SchemaAMutation) RemoveEdgeSchemabIDs(ids ...int64)

RemoveEdgeSchemabIDs removes the "edge_schemab" edge to the SchemaB entity by IDs.

func (*SchemaAMutation) RemovedEdgeSchemaaRecursiveIDs

func (m *SchemaAMutation) RemovedEdgeSchemaaRecursiveIDs() (ids []int)

RemovedEdgeSchemaaRecursive returns the removed IDs of the "edge_schemaa_recursive" edge to the SchemaA entity.

func (*SchemaAMutation) RemovedEdgeSchemabIDs

func (m *SchemaAMutation) RemovedEdgeSchemabIDs() (ids []int64)

RemovedEdgeSchemab returns the removed IDs of the "edge_schemab" edge to the SchemaB entity.

func (*SchemaAMutation) RemovedEdges

func (m *SchemaAMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SchemaAMutation) RemovedIDs

func (m *SchemaAMutation) 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 (*SchemaAMutation) RequiredEnum

func (m *SchemaAMutation) RequiredEnum() (r schemaa.RequiredEnum, exists bool)

RequiredEnum returns the value of the "required_enum" field in the mutation.

func (*SchemaAMutation) ResetBytes

func (m *SchemaAMutation) ResetBytes()

ResetBytes resets all changes to the "bytes" field.

func (*SchemaAMutation) ResetEdge

func (m *SchemaAMutation) 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 (*SchemaAMutation) ResetEdgeSchemaaRecursive

func (m *SchemaAMutation) ResetEdgeSchemaaRecursive()

ResetEdgeSchemaaRecursive resets all changes to the "edge_schemaa_recursive" edge.

func (*SchemaAMutation) ResetEdgeSchemab

func (m *SchemaAMutation) ResetEdgeSchemab()

ResetEdgeSchemab resets all changes to the "edge_schemab" edge.

func (*SchemaAMutation) ResetEdgeSchemabUniqueOptional

func (m *SchemaAMutation) ResetEdgeSchemabUniqueOptional()

ResetEdgeSchemabUniqueOptional resets all changes to the "edge_schemab_unique_optional" edge.

func (*SchemaAMutation) ResetEdgeSchemabUniqueRequired

func (m *SchemaAMutation) ResetEdgeSchemabUniqueRequired()

ResetEdgeSchemabUniqueRequired resets all changes to the "edge_schemab_unique_required" edge.

func (*SchemaAMutation) ResetEdgeSchemabUniqueRequiredBindtoBs

func (m *SchemaAMutation) ResetEdgeSchemabUniqueRequiredBindtoBs()

ResetEdgeSchemabUniqueRequiredBindtoBs resets all changes to the "edge_schemab_unique_required_bindto_bs" edge.

func (*SchemaAMutation) ResetField

func (m *SchemaAMutation) 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 (*SchemaAMutation) ResetInt64

func (m *SchemaAMutation) ResetInt64()

ResetInt64 resets all changes to the "int64" field.

func (*SchemaAMutation) ResetJsontypeInts

func (m *SchemaAMutation) ResetJsontypeInts()

ResetJsontypeInts resets all changes to the "jsontype_ints" field.

func (*SchemaAMutation) ResetJsontypeIntsOptional

func (m *SchemaAMutation) ResetJsontypeIntsOptional()

ResetJsontypeIntsOptional resets all changes to the "jsontype_ints_optional" field.

func (*SchemaAMutation) ResetJsontypeStrings

func (m *SchemaAMutation) ResetJsontypeStrings()

ResetJsontypeStrings resets all changes to the "jsontype_strings" field.

func (*SchemaAMutation) ResetJsontypeStringsOptional

func (m *SchemaAMutation) ResetJsontypeStringsOptional()

ResetJsontypeStringsOptional resets all changes to the "jsontype_strings_optional" field.

func (*SchemaAMutation) ResetOptionalNullableBool

func (m *SchemaAMutation) ResetOptionalNullableBool()

ResetOptionalNullableBool resets all changes to the "optional_nullable_bool" field.

func (*SchemaAMutation) ResetOptionalNullableEnum

func (m *SchemaAMutation) ResetOptionalNullableEnum()

ResetOptionalNullableEnum resets all changes to the "optional_nullable_enum" field.

func (*SchemaAMutation) ResetRequiredEnum

func (m *SchemaAMutation) ResetRequiredEnum()

ResetRequiredEnum resets all changes to the "required_enum" field.

func (*SchemaAMutation) ResetStringBindtoFoobar

func (m *SchemaAMutation) ResetStringBindtoFoobar()

ResetStringBindtoFoobar resets all changes to the "string_bindto_foobar" field.

func (*SchemaAMutation) ResetStringOptionalNullable

func (m *SchemaAMutation) ResetStringOptionalNullable()

ResetStringOptionalNullable resets all changes to the "string_optional_nullable" field.

func (*SchemaAMutation) SetBytes

func (m *SchemaAMutation) SetBytes(b []byte)

SetBytes sets the "bytes" field.

func (*SchemaAMutation) SetEdgeSchemabUniqueOptionalID

func (m *SchemaAMutation) SetEdgeSchemabUniqueOptionalID(id int64)

SetEdgeSchemabUniqueOptionalID sets the "edge_schemab_unique_optional" edge to the SchemaB entity by id.

func (*SchemaAMutation) SetEdgeSchemabUniqueRequiredBindtoBsID

func (m *SchemaAMutation) SetEdgeSchemabUniqueRequiredBindtoBsID(id int64)

SetEdgeSchemabUniqueRequiredBindtoBsID sets the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity by id.

func (*SchemaAMutation) SetEdgeSchemabUniqueRequiredID

func (m *SchemaAMutation) SetEdgeSchemabUniqueRequiredID(id int64)

SetEdgeSchemabUniqueRequiredID sets the "edge_schemab_unique_required" edge to the SchemaB entity by id.

func (*SchemaAMutation) SetField

func (m *SchemaAMutation) 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 (*SchemaAMutation) SetInt64

func (m *SchemaAMutation) SetInt64(i int64)

SetInt64 sets the "int64" field.

func (*SchemaAMutation) SetJsontypeInts

func (m *SchemaAMutation) SetJsontypeInts(i []int)

SetJsontypeInts sets the "jsontype_ints" field.

func (*SchemaAMutation) SetJsontypeIntsOptional

func (m *SchemaAMutation) SetJsontypeIntsOptional(i []int)

SetJsontypeIntsOptional sets the "jsontype_ints_optional" field.

func (*SchemaAMutation) SetJsontypeStrings

func (m *SchemaAMutation) SetJsontypeStrings(s []string)

SetJsontypeStrings sets the "jsontype_strings" field.

func (*SchemaAMutation) SetJsontypeStringsOptional

func (m *SchemaAMutation) SetJsontypeStringsOptional(s []string)

SetJsontypeStringsOptional sets the "jsontype_strings_optional" field.

func (*SchemaAMutation) SetOp

func (m *SchemaAMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SchemaAMutation) SetOptionalNullableBool

func (m *SchemaAMutation) SetOptionalNullableBool(b bool)

SetOptionalNullableBool sets the "optional_nullable_bool" field.

func (*SchemaAMutation) SetOptionalNullableEnum

func (m *SchemaAMutation) SetOptionalNullableEnum(sne schemaa.OptionalNullableEnum)

SetOptionalNullableEnum sets the "optional_nullable_enum" field.

func (*SchemaAMutation) SetRequiredEnum

func (m *SchemaAMutation) SetRequiredEnum(se schemaa.RequiredEnum)

SetRequiredEnum sets the "required_enum" field.

func (*SchemaAMutation) SetStringBindtoFoobar

func (m *SchemaAMutation) SetStringBindtoFoobar(s string)

SetStringBindtoFoobar sets the "string_bindto_foobar" field.

func (*SchemaAMutation) SetStringOptionalNullable

func (m *SchemaAMutation) SetStringOptionalNullable(s string)

SetStringOptionalNullable sets the "string_optional_nullable" field.

func (*SchemaAMutation) StringBindtoFoobar

func (m *SchemaAMutation) StringBindtoFoobar() (r string, exists bool)

StringBindtoFoobar returns the value of the "string_bindto_foobar" field in the mutation.

func (*SchemaAMutation) StringOptionalNullable

func (m *SchemaAMutation) StringOptionalNullable() (r string, exists bool)

StringOptionalNullable returns the value of the "string_optional_nullable" field in the mutation.

func (*SchemaAMutation) StringOptionalNullableCleared

func (m *SchemaAMutation) StringOptionalNullableCleared() bool

StringOptionalNullableCleared returns if the "string_optional_nullable" field was cleared in this mutation.

func (SchemaAMutation) Tx

func (m SchemaAMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SchemaAMutation) Type

func (m *SchemaAMutation) Type() string

Type returns the node type of this mutation (SchemaA).

func (*SchemaAMutation) Where

func (m *SchemaAMutation) Where(ps ...predicate.SchemaA)

Where appends a list predicates to the SchemaAMutation builder.

func (*SchemaAMutation) WhereP

func (m *SchemaAMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SchemaAMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SchemaAQuery

type SchemaAQuery struct {
	// contains filtered or unexported fields
}

SchemaAQuery is the builder for querying SchemaA entities.

func (*SchemaAQuery) Aggregate

func (sa *SchemaAQuery) Aggregate(fns ...AggregateFunc) *SchemaASelect

Aggregate returns a SchemaASelect configured with the given aggregations.

func (*SchemaAQuery) All

func (sa *SchemaAQuery) All(ctx context.Context) ([]*SchemaA, error)

All executes the query and returns a list of SchemaAs.

func (*SchemaAQuery) AllX

func (sa *SchemaAQuery) AllX(ctx context.Context) []*SchemaA

AllX is like All, but panics if an error occurs.

func (*SchemaAQuery) Clone

func (sa *SchemaAQuery) Clone() *SchemaAQuery

Clone returns a duplicate of the SchemaAQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SchemaAQuery) Count

func (sa *SchemaAQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SchemaAQuery) CountX

func (sa *SchemaAQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SchemaAQuery) Exist

func (sa *SchemaAQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SchemaAQuery) ExistX

func (sa *SchemaAQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SchemaAQuery) First

func (sa *SchemaAQuery) First(ctx context.Context) (*SchemaA, error)

First returns the first SchemaA entity from the query. Returns a *NotFoundError when no SchemaA was found.

func (*SchemaAQuery) FirstID

func (sa *SchemaAQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first SchemaA ID from the query. Returns a *NotFoundError when no SchemaA ID was found.

func (*SchemaAQuery) FirstIDX

func (sa *SchemaAQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SchemaAQuery) FirstX

func (sa *SchemaAQuery) FirstX(ctx context.Context) *SchemaA

FirstX is like First, but panics if an error occurs.

func (*SchemaAQuery) GroupBy

func (sa *SchemaAQuery) GroupBy(field string, fields ...string) *SchemaAGroupBy

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 {
	Int64 int64 `json:"int64,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SchemaA.Query().
	GroupBy(schemaa.FieldInt64).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SchemaAQuery) IDs

func (sa *SchemaAQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of SchemaA IDs.

func (*SchemaAQuery) IDsX

func (sa *SchemaAQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SchemaAQuery) Limit

func (sa *SchemaAQuery) Limit(limit int) *SchemaAQuery

Limit the number of records to be returned by this query.

func (*SchemaAQuery) Offset

func (sa *SchemaAQuery) Offset(offset int) *SchemaAQuery

Offset to start from.

func (*SchemaAQuery) Only

func (sa *SchemaAQuery) Only(ctx context.Context) (*SchemaA, error)

Only returns a single SchemaA entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SchemaA entity is found. Returns a *NotFoundError when no SchemaA entities are found.

func (*SchemaAQuery) OnlyID

func (sa *SchemaAQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only SchemaA ID in the query. Returns a *NotSingularError when more than one SchemaA ID is found. Returns a *NotFoundError when no entities are found.

func (*SchemaAQuery) OnlyIDX

func (sa *SchemaAQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SchemaAQuery) OnlyX

func (sa *SchemaAQuery) OnlyX(ctx context.Context) *SchemaA

OnlyX is like Only, but panics if an error occurs.

func (*SchemaAQuery) Order

func (sa *SchemaAQuery) Order(o ...schemaa.OrderOption) *SchemaAQuery

Order specifies how the records should be ordered.

func (*SchemaAQuery) QueryEdgeSchemaaRecursive

func (sa *SchemaAQuery) QueryEdgeSchemaaRecursive() *SchemaAQuery

QueryEdgeSchemaaRecursive chains the current query on the "edge_schemaa_recursive" edge.

func (*SchemaAQuery) QueryEdgeSchemab

func (sa *SchemaAQuery) QueryEdgeSchemab() *SchemaBQuery

QueryEdgeSchemab chains the current query on the "edge_schemab" edge.

func (*SchemaAQuery) QueryEdgeSchemabUniqueOptional

func (sa *SchemaAQuery) QueryEdgeSchemabUniqueOptional() *SchemaBQuery

QueryEdgeSchemabUniqueOptional chains the current query on the "edge_schemab_unique_optional" edge.

func (*SchemaAQuery) QueryEdgeSchemabUniqueRequired

func (sa *SchemaAQuery) QueryEdgeSchemabUniqueRequired() *SchemaBQuery

QueryEdgeSchemabUniqueRequired chains the current query on the "edge_schemab_unique_required" edge.

func (*SchemaAQuery) QueryEdgeSchemabUniqueRequiredBindtoBs

func (sa *SchemaAQuery) QueryEdgeSchemabUniqueRequiredBindtoBs() *SchemaBQuery

QueryEdgeSchemabUniqueRequiredBindtoBs chains the current query on the "edge_schemab_unique_required_bindto_bs" edge.

func (*SchemaAQuery) Select

func (sa *SchemaAQuery) Select(fields ...string) *SchemaASelect

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 {
	Int64 int64 `json:"int64,omitempty"`
}

client.SchemaA.Query().
	Select(schemaa.FieldInt64).
	Scan(ctx, &v)

func (*SchemaAQuery) Unique

func (sa *SchemaAQuery) Unique(unique bool) *SchemaAQuery

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 (*SchemaAQuery) Where

func (sa *SchemaAQuery) Where(ps ...predicate.SchemaA) *SchemaAQuery

Where adds a new predicate for the SchemaAQuery builder.

func (*SchemaAQuery) WithEdgeSchemaaRecursive

func (sa *SchemaAQuery) WithEdgeSchemaaRecursive(opts ...func(*SchemaAQuery)) *SchemaAQuery

WithEdgeSchemaaRecursive tells the query-builder to eager-load the nodes that are connected to the "edge_schemaa_recursive" edge. The optional arguments are used to configure the query builder of the edge.

func (*SchemaAQuery) WithEdgeSchemab

func (sa *SchemaAQuery) WithEdgeSchemab(opts ...func(*SchemaBQuery)) *SchemaAQuery

WithEdgeSchemab tells the query-builder to eager-load the nodes that are connected to the "edge_schemab" edge. The optional arguments are used to configure the query builder of the edge.

func (*SchemaAQuery) WithEdgeSchemabUniqueOptional

func (sa *SchemaAQuery) WithEdgeSchemabUniqueOptional(opts ...func(*SchemaBQuery)) *SchemaAQuery

WithEdgeSchemabUniqueOptional tells the query-builder to eager-load the nodes that are connected to the "edge_schemab_unique_optional" edge. The optional arguments are used to configure the query builder of the edge.

func (*SchemaAQuery) WithEdgeSchemabUniqueRequired

func (sa *SchemaAQuery) WithEdgeSchemabUniqueRequired(opts ...func(*SchemaBQuery)) *SchemaAQuery

WithEdgeSchemabUniqueRequired tells the query-builder to eager-load the nodes that are connected to the "edge_schemab_unique_required" edge. The optional arguments are used to configure the query builder of the edge.

func (*SchemaAQuery) WithEdgeSchemabUniqueRequiredBindtoBs

func (sa *SchemaAQuery) WithEdgeSchemabUniqueRequiredBindtoBs(opts ...func(*SchemaBQuery)) *SchemaAQuery

WithEdgeSchemabUniqueRequiredBindtoBs tells the query-builder to eager-load the nodes that are connected to the "edge_schemab_unique_required_bindto_bs" edge. The optional arguments are used to configure the query builder of the edge.

type SchemaASelect

type SchemaASelect struct {
	*SchemaAQuery
	// contains filtered or unexported fields
}

SchemaASelect is the builder for selecting fields of SchemaA entities.

func (*SchemaASelect) Aggregate

func (sa *SchemaASelect) Aggregate(fns ...AggregateFunc) *SchemaASelect

Aggregate adds the given aggregation functions to the selector query.

func (*SchemaASelect) Bool

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

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

func (*SchemaASelect) BoolX

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

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

func (*SchemaASelect) Bools

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

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

func (*SchemaASelect) BoolsX

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

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

func (*SchemaASelect) Float64

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

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

func (*SchemaASelect) Float64X

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

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

func (*SchemaASelect) Float64s

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

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

func (*SchemaASelect) Float64sX

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

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

func (*SchemaASelect) Int

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

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

func (*SchemaASelect) IntX

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

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

func (*SchemaASelect) Ints

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

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

func (*SchemaASelect) IntsX

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

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

func (*SchemaASelect) Scan

func (sa *SchemaASelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SchemaASelect) ScanX

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

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

func (*SchemaASelect) String

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

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

func (*SchemaASelect) StringX

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

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

func (*SchemaASelect) Strings

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

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

func (*SchemaASelect) StringsX

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

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

type SchemaAUpdate

type SchemaAUpdate struct {
	// contains filtered or unexported fields
}

SchemaAUpdate is the builder for updating SchemaA entities.

func (*SchemaAUpdate) AddEdgeSchemaaRecursive

func (sa *SchemaAUpdate) AddEdgeSchemaaRecursive(s ...*SchemaA) *SchemaAUpdate

AddEdgeSchemaaRecursive adds the "edge_schemaa_recursive" edges to the SchemaA entity.

func (*SchemaAUpdate) AddEdgeSchemaaRecursiveIDs

func (sa *SchemaAUpdate) AddEdgeSchemaaRecursiveIDs(ids ...int) *SchemaAUpdate

AddEdgeSchemaaRecursiveIDs adds the "edge_schemaa_recursive" edge to the SchemaA entity by IDs.

func (*SchemaAUpdate) AddEdgeSchemab

func (sa *SchemaAUpdate) AddEdgeSchemab(s ...*SchemaB) *SchemaAUpdate

AddEdgeSchemab adds the "edge_schemab" edges to the SchemaB entity.

func (*SchemaAUpdate) AddEdgeSchemabIDs

func (sa *SchemaAUpdate) AddEdgeSchemabIDs(ids ...int64) *SchemaAUpdate

AddEdgeSchemabIDs adds the "edge_schemab" edge to the SchemaB entity by IDs.

func (*SchemaAUpdate) AddInt64

func (sa *SchemaAUpdate) AddInt64(i int64) *SchemaAUpdate

AddInt64 adds i to the "int64" field.

func (*SchemaAUpdate) AppendJsontypeInts

func (sa *SchemaAUpdate) AppendJsontypeInts(i []int) *SchemaAUpdate

AppendJsontypeInts appends i to the "jsontype_ints" field.

func (*SchemaAUpdate) AppendJsontypeIntsOptional

func (sa *SchemaAUpdate) AppendJsontypeIntsOptional(i []int) *SchemaAUpdate

AppendJsontypeIntsOptional appends i to the "jsontype_ints_optional" field.

func (*SchemaAUpdate) AppendJsontypeStrings

func (sa *SchemaAUpdate) AppendJsontypeStrings(s []string) *SchemaAUpdate

AppendJsontypeStrings appends s to the "jsontype_strings" field.

func (*SchemaAUpdate) AppendJsontypeStringsOptional

func (sa *SchemaAUpdate) AppendJsontypeStringsOptional(s []string) *SchemaAUpdate

AppendJsontypeStringsOptional appends s to the "jsontype_strings_optional" field.

func (*SchemaAUpdate) ClearEdgeSchemaaRecursive

func (sa *SchemaAUpdate) ClearEdgeSchemaaRecursive() *SchemaAUpdate

ClearEdgeSchemaaRecursive clears all "edge_schemaa_recursive" edges to the SchemaA entity.

func (*SchemaAUpdate) ClearEdgeSchemab

func (sa *SchemaAUpdate) ClearEdgeSchemab() *SchemaAUpdate

ClearEdgeSchemab clears all "edge_schemab" edges to the SchemaB entity.

func (*SchemaAUpdate) ClearEdgeSchemabUniqueOptional

func (sa *SchemaAUpdate) ClearEdgeSchemabUniqueOptional() *SchemaAUpdate

ClearEdgeSchemabUniqueOptional clears the "edge_schemab_unique_optional" edge to the SchemaB entity.

func (*SchemaAUpdate) ClearEdgeSchemabUniqueRequired

func (sa *SchemaAUpdate) ClearEdgeSchemabUniqueRequired() *SchemaAUpdate

ClearEdgeSchemabUniqueRequired clears the "edge_schemab_unique_required" edge to the SchemaB entity.

func (*SchemaAUpdate) ClearEdgeSchemabUniqueRequiredBindtoBs

func (sa *SchemaAUpdate) ClearEdgeSchemabUniqueRequiredBindtoBs() *SchemaAUpdate

ClearEdgeSchemabUniqueRequiredBindtoBs clears the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity.

func (*SchemaAUpdate) ClearJsontypeIntsOptional

func (sa *SchemaAUpdate) ClearJsontypeIntsOptional() *SchemaAUpdate

ClearJsontypeIntsOptional clears the value of the "jsontype_ints_optional" field.

func (*SchemaAUpdate) ClearJsontypeStringsOptional

func (sa *SchemaAUpdate) ClearJsontypeStringsOptional() *SchemaAUpdate

ClearJsontypeStringsOptional clears the value of the "jsontype_strings_optional" field.

func (*SchemaAUpdate) ClearOptionalNullableBool

func (sa *SchemaAUpdate) ClearOptionalNullableBool() *SchemaAUpdate

ClearOptionalNullableBool clears the value of the "optional_nullable_bool" field.

func (*SchemaAUpdate) ClearOptionalNullableEnum

func (sa *SchemaAUpdate) ClearOptionalNullableEnum() *SchemaAUpdate

ClearOptionalNullableEnum clears the value of the "optional_nullable_enum" field.

func (*SchemaAUpdate) ClearStringOptionalNullable

func (sa *SchemaAUpdate) ClearStringOptionalNullable() *SchemaAUpdate

ClearStringOptionalNullable clears the value of the "string_optional_nullable" field.

func (*SchemaAUpdate) Exec

func (sa *SchemaAUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SchemaAUpdate) ExecX

func (sa *SchemaAUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaAUpdate) Mutation

func (sa *SchemaAUpdate) Mutation() *SchemaAMutation

Mutation returns the SchemaAMutation object of the builder.

func (*SchemaAUpdate) RemoveEdgeSchemaaRecursive

func (sa *SchemaAUpdate) RemoveEdgeSchemaaRecursive(s ...*SchemaA) *SchemaAUpdate

RemoveEdgeSchemaaRecursive removes "edge_schemaa_recursive" edges to SchemaA entities.

func (*SchemaAUpdate) RemoveEdgeSchemaaRecursiveIDs

func (sa *SchemaAUpdate) RemoveEdgeSchemaaRecursiveIDs(ids ...int) *SchemaAUpdate

RemoveEdgeSchemaaRecursiveIDs removes the "edge_schemaa_recursive" edge to SchemaA entities by IDs.

func (*SchemaAUpdate) RemoveEdgeSchemab

func (sa *SchemaAUpdate) RemoveEdgeSchemab(s ...*SchemaB) *SchemaAUpdate

RemoveEdgeSchemab removes "edge_schemab" edges to SchemaB entities.

func (*SchemaAUpdate) RemoveEdgeSchemabIDs

func (sa *SchemaAUpdate) RemoveEdgeSchemabIDs(ids ...int64) *SchemaAUpdate

RemoveEdgeSchemabIDs removes the "edge_schemab" edge to SchemaB entities by IDs.

func (*SchemaAUpdate) Save

func (sa *SchemaAUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SchemaAUpdate) SaveX

func (sa *SchemaAUpdate) SaveX(ctx context.Context) int

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

func (*SchemaAUpdate) SetBytes

func (sa *SchemaAUpdate) SetBytes(b []byte) *SchemaAUpdate

SetBytes sets the "bytes" field.

func (*SchemaAUpdate) SetEdgeSchemabUniqueOptional

func (sa *SchemaAUpdate) SetEdgeSchemabUniqueOptional(s *SchemaB) *SchemaAUpdate

SetEdgeSchemabUniqueOptional sets the "edge_schemab_unique_optional" edge to the SchemaB entity.

func (*SchemaAUpdate) SetEdgeSchemabUniqueOptionalID

func (sa *SchemaAUpdate) SetEdgeSchemabUniqueOptionalID(id int64) *SchemaAUpdate

SetEdgeSchemabUniqueOptionalID sets the "edge_schemab_unique_optional" edge to the SchemaB entity by ID.

func (*SchemaAUpdate) SetEdgeSchemabUniqueRequired

func (sa *SchemaAUpdate) SetEdgeSchemabUniqueRequired(s *SchemaB) *SchemaAUpdate

SetEdgeSchemabUniqueRequired sets the "edge_schemab_unique_required" edge to the SchemaB entity.

func (*SchemaAUpdate) SetEdgeSchemabUniqueRequiredBindtoBs

func (sa *SchemaAUpdate) SetEdgeSchemabUniqueRequiredBindtoBs(s *SchemaB) *SchemaAUpdate

SetEdgeSchemabUniqueRequiredBindtoBs sets the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity.

func (*SchemaAUpdate) SetEdgeSchemabUniqueRequiredBindtoBsID

func (sa *SchemaAUpdate) SetEdgeSchemabUniqueRequiredBindtoBsID(id int64) *SchemaAUpdate

SetEdgeSchemabUniqueRequiredBindtoBsID sets the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity by ID.

func (*SchemaAUpdate) SetEdgeSchemabUniqueRequiredID

func (sa *SchemaAUpdate) SetEdgeSchemabUniqueRequiredID(id int64) *SchemaAUpdate

SetEdgeSchemabUniqueRequiredID sets the "edge_schemab_unique_required" edge to the SchemaB entity by ID.

func (*SchemaAUpdate) SetInt64

func (sa *SchemaAUpdate) SetInt64(i int64) *SchemaAUpdate

SetInt64 sets the "int64" field.

func (*SchemaAUpdate) SetJsontypeInts

func (sa *SchemaAUpdate) SetJsontypeInts(i []int) *SchemaAUpdate

SetJsontypeInts sets the "jsontype_ints" field.

func (*SchemaAUpdate) SetJsontypeIntsOptional

func (sa *SchemaAUpdate) SetJsontypeIntsOptional(i []int) *SchemaAUpdate

SetJsontypeIntsOptional sets the "jsontype_ints_optional" field.

func (*SchemaAUpdate) SetJsontypeStrings

func (sa *SchemaAUpdate) SetJsontypeStrings(s []string) *SchemaAUpdate

SetJsontypeStrings sets the "jsontype_strings" field.

func (*SchemaAUpdate) SetJsontypeStringsOptional

func (sa *SchemaAUpdate) SetJsontypeStringsOptional(s []string) *SchemaAUpdate

SetJsontypeStringsOptional sets the "jsontype_strings_optional" field.

func (*SchemaAUpdate) SetNillableEdgeSchemabUniqueOptionalID

func (sa *SchemaAUpdate) SetNillableEdgeSchemabUniqueOptionalID(id *int64) *SchemaAUpdate

SetNillableEdgeSchemabUniqueOptionalID sets the "edge_schemab_unique_optional" edge to the SchemaB entity by ID if the given value is not nil.

func (*SchemaAUpdate) SetNillableOptionalNullableBool

func (sa *SchemaAUpdate) SetNillableOptionalNullableBool(b *bool) *SchemaAUpdate

SetNillableOptionalNullableBool sets the "optional_nullable_bool" field if the given value is not nil.

func (*SchemaAUpdate) SetNillableOptionalNullableEnum

func (sa *SchemaAUpdate) SetNillableOptionalNullableEnum(sne *schemaa.OptionalNullableEnum) *SchemaAUpdate

SetNillableOptionalNullableEnum sets the "optional_nullable_enum" field if the given value is not nil.

func (*SchemaAUpdate) SetNillableStringOptionalNullable

func (sa *SchemaAUpdate) SetNillableStringOptionalNullable(s *string) *SchemaAUpdate

SetNillableStringOptionalNullable sets the "string_optional_nullable" field if the given value is not nil.

func (*SchemaAUpdate) SetOptionalNullableBool

func (sa *SchemaAUpdate) SetOptionalNullableBool(b bool) *SchemaAUpdate

SetOptionalNullableBool sets the "optional_nullable_bool" field.

func (*SchemaAUpdate) SetOptionalNullableEnum

func (sa *SchemaAUpdate) SetOptionalNullableEnum(sne schemaa.OptionalNullableEnum) *SchemaAUpdate

SetOptionalNullableEnum sets the "optional_nullable_enum" field.

func (*SchemaAUpdate) SetRequiredEnum

func (sa *SchemaAUpdate) SetRequiredEnum(se schemaa.RequiredEnum) *SchemaAUpdate

SetRequiredEnum sets the "required_enum" field.

func (*SchemaAUpdate) SetStringBindtoFoobar

func (sa *SchemaAUpdate) SetStringBindtoFoobar(s string) *SchemaAUpdate

SetStringBindtoFoobar sets the "string_bindto_foobar" field.

func (*SchemaAUpdate) SetStringOptionalNullable

func (sa *SchemaAUpdate) SetStringOptionalNullable(s string) *SchemaAUpdate

SetStringOptionalNullable sets the "string_optional_nullable" field.

func (*SchemaAUpdate) Where

func (sa *SchemaAUpdate) Where(ps ...predicate.SchemaA) *SchemaAUpdate

Where appends a list predicates to the SchemaAUpdate builder.

type SchemaAUpdateOne

type SchemaAUpdateOne struct {
	// contains filtered or unexported fields
}

SchemaAUpdateOne is the builder for updating a single SchemaA entity.

func (*SchemaAUpdateOne) AddEdgeSchemaaRecursive

func (sao *SchemaAUpdateOne) AddEdgeSchemaaRecursive(s ...*SchemaA) *SchemaAUpdateOne

AddEdgeSchemaaRecursive adds the "edge_schemaa_recursive" edges to the SchemaA entity.

func (*SchemaAUpdateOne) AddEdgeSchemaaRecursiveIDs

func (sao *SchemaAUpdateOne) AddEdgeSchemaaRecursiveIDs(ids ...int) *SchemaAUpdateOne

AddEdgeSchemaaRecursiveIDs adds the "edge_schemaa_recursive" edge to the SchemaA entity by IDs.

func (*SchemaAUpdateOne) AddEdgeSchemab

func (sao *SchemaAUpdateOne) AddEdgeSchemab(s ...*SchemaB) *SchemaAUpdateOne

AddEdgeSchemab adds the "edge_schemab" edges to the SchemaB entity.

func (*SchemaAUpdateOne) AddEdgeSchemabIDs

func (sao *SchemaAUpdateOne) AddEdgeSchemabIDs(ids ...int64) *SchemaAUpdateOne

AddEdgeSchemabIDs adds the "edge_schemab" edge to the SchemaB entity by IDs.

func (*SchemaAUpdateOne) AddInt64

func (sao *SchemaAUpdateOne) AddInt64(i int64) *SchemaAUpdateOne

AddInt64 adds i to the "int64" field.

func (*SchemaAUpdateOne) AppendJsontypeInts

func (sao *SchemaAUpdateOne) AppendJsontypeInts(i []int) *SchemaAUpdateOne

AppendJsontypeInts appends i to the "jsontype_ints" field.

func (*SchemaAUpdateOne) AppendJsontypeIntsOptional

func (sao *SchemaAUpdateOne) AppendJsontypeIntsOptional(i []int) *SchemaAUpdateOne

AppendJsontypeIntsOptional appends i to the "jsontype_ints_optional" field.

func (*SchemaAUpdateOne) AppendJsontypeStrings

func (sao *SchemaAUpdateOne) AppendJsontypeStrings(s []string) *SchemaAUpdateOne

AppendJsontypeStrings appends s to the "jsontype_strings" field.

func (*SchemaAUpdateOne) AppendJsontypeStringsOptional

func (sao *SchemaAUpdateOne) AppendJsontypeStringsOptional(s []string) *SchemaAUpdateOne

AppendJsontypeStringsOptional appends s to the "jsontype_strings_optional" field.

func (*SchemaAUpdateOne) ClearEdgeSchemaaRecursive

func (sao *SchemaAUpdateOne) ClearEdgeSchemaaRecursive() *SchemaAUpdateOne

ClearEdgeSchemaaRecursive clears all "edge_schemaa_recursive" edges to the SchemaA entity.

func (*SchemaAUpdateOne) ClearEdgeSchemab

func (sao *SchemaAUpdateOne) ClearEdgeSchemab() *SchemaAUpdateOne

ClearEdgeSchemab clears all "edge_schemab" edges to the SchemaB entity.

func (*SchemaAUpdateOne) ClearEdgeSchemabUniqueOptional

func (sao *SchemaAUpdateOne) ClearEdgeSchemabUniqueOptional() *SchemaAUpdateOne

ClearEdgeSchemabUniqueOptional clears the "edge_schemab_unique_optional" edge to the SchemaB entity.

func (*SchemaAUpdateOne) ClearEdgeSchemabUniqueRequired

func (sao *SchemaAUpdateOne) ClearEdgeSchemabUniqueRequired() *SchemaAUpdateOne

ClearEdgeSchemabUniqueRequired clears the "edge_schemab_unique_required" edge to the SchemaB entity.

func (*SchemaAUpdateOne) ClearEdgeSchemabUniqueRequiredBindtoBs

func (sao *SchemaAUpdateOne) ClearEdgeSchemabUniqueRequiredBindtoBs() *SchemaAUpdateOne

ClearEdgeSchemabUniqueRequiredBindtoBs clears the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity.

func (*SchemaAUpdateOne) ClearJsontypeIntsOptional

func (sao *SchemaAUpdateOne) ClearJsontypeIntsOptional() *SchemaAUpdateOne

ClearJsontypeIntsOptional clears the value of the "jsontype_ints_optional" field.

func (*SchemaAUpdateOne) ClearJsontypeStringsOptional

func (sao *SchemaAUpdateOne) ClearJsontypeStringsOptional() *SchemaAUpdateOne

ClearJsontypeStringsOptional clears the value of the "jsontype_strings_optional" field.

func (*SchemaAUpdateOne) ClearOptionalNullableBool

func (sao *SchemaAUpdateOne) ClearOptionalNullableBool() *SchemaAUpdateOne

ClearOptionalNullableBool clears the value of the "optional_nullable_bool" field.

func (*SchemaAUpdateOne) ClearOptionalNullableEnum

func (sao *SchemaAUpdateOne) ClearOptionalNullableEnum() *SchemaAUpdateOne

ClearOptionalNullableEnum clears the value of the "optional_nullable_enum" field.

func (*SchemaAUpdateOne) ClearStringOptionalNullable

func (sao *SchemaAUpdateOne) ClearStringOptionalNullable() *SchemaAUpdateOne

ClearStringOptionalNullable clears the value of the "string_optional_nullable" field.

func (*SchemaAUpdateOne) Exec

func (sao *SchemaAUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SchemaAUpdateOne) ExecX

func (sao *SchemaAUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaAUpdateOne) Mutation

func (sao *SchemaAUpdateOne) Mutation() *SchemaAMutation

Mutation returns the SchemaAMutation object of the builder.

func (*SchemaAUpdateOne) RemoveEdgeSchemaaRecursive

func (sao *SchemaAUpdateOne) RemoveEdgeSchemaaRecursive(s ...*SchemaA) *SchemaAUpdateOne

RemoveEdgeSchemaaRecursive removes "edge_schemaa_recursive" edges to SchemaA entities.

func (*SchemaAUpdateOne) RemoveEdgeSchemaaRecursiveIDs

func (sao *SchemaAUpdateOne) RemoveEdgeSchemaaRecursiveIDs(ids ...int) *SchemaAUpdateOne

RemoveEdgeSchemaaRecursiveIDs removes the "edge_schemaa_recursive" edge to SchemaA entities by IDs.

func (*SchemaAUpdateOne) RemoveEdgeSchemab

func (sao *SchemaAUpdateOne) RemoveEdgeSchemab(s ...*SchemaB) *SchemaAUpdateOne

RemoveEdgeSchemab removes "edge_schemab" edges to SchemaB entities.

func (*SchemaAUpdateOne) RemoveEdgeSchemabIDs

func (sao *SchemaAUpdateOne) RemoveEdgeSchemabIDs(ids ...int64) *SchemaAUpdateOne

RemoveEdgeSchemabIDs removes the "edge_schemab" edge to SchemaB entities by IDs.

func (*SchemaAUpdateOne) Save

func (sao *SchemaAUpdateOne) Save(ctx context.Context) (*SchemaA, error)

Save executes the query and returns the updated SchemaA entity.

func (*SchemaAUpdateOne) SaveX

func (sao *SchemaAUpdateOne) SaveX(ctx context.Context) *SchemaA

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

func (*SchemaAUpdateOne) Select

func (sao *SchemaAUpdateOne) Select(field string, fields ...string) *SchemaAUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SchemaAUpdateOne) SetBytes

func (sao *SchemaAUpdateOne) SetBytes(b []byte) *SchemaAUpdateOne

SetBytes sets the "bytes" field.

func (*SchemaAUpdateOne) SetEdgeSchemabUniqueOptional

func (sao *SchemaAUpdateOne) SetEdgeSchemabUniqueOptional(s *SchemaB) *SchemaAUpdateOne

SetEdgeSchemabUniqueOptional sets the "edge_schemab_unique_optional" edge to the SchemaB entity.

func (*SchemaAUpdateOne) SetEdgeSchemabUniqueOptionalID

func (sao *SchemaAUpdateOne) SetEdgeSchemabUniqueOptionalID(id int64) *SchemaAUpdateOne

SetEdgeSchemabUniqueOptionalID sets the "edge_schemab_unique_optional" edge to the SchemaB entity by ID.

func (*SchemaAUpdateOne) SetEdgeSchemabUniqueRequired

func (sao *SchemaAUpdateOne) SetEdgeSchemabUniqueRequired(s *SchemaB) *SchemaAUpdateOne

SetEdgeSchemabUniqueRequired sets the "edge_schemab_unique_required" edge to the SchemaB entity.

func (*SchemaAUpdateOne) SetEdgeSchemabUniqueRequiredBindtoBs

func (sao *SchemaAUpdateOne) SetEdgeSchemabUniqueRequiredBindtoBs(s *SchemaB) *SchemaAUpdateOne

SetEdgeSchemabUniqueRequiredBindtoBs sets the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity.

func (*SchemaAUpdateOne) SetEdgeSchemabUniqueRequiredBindtoBsID

func (sao *SchemaAUpdateOne) SetEdgeSchemabUniqueRequiredBindtoBsID(id int64) *SchemaAUpdateOne

SetEdgeSchemabUniqueRequiredBindtoBsID sets the "edge_schemab_unique_required_bindto_bs" edge to the SchemaB entity by ID.

func (*SchemaAUpdateOne) SetEdgeSchemabUniqueRequiredID

func (sao *SchemaAUpdateOne) SetEdgeSchemabUniqueRequiredID(id int64) *SchemaAUpdateOne

SetEdgeSchemabUniqueRequiredID sets the "edge_schemab_unique_required" edge to the SchemaB entity by ID.

func (*SchemaAUpdateOne) SetInt64

func (sao *SchemaAUpdateOne) SetInt64(i int64) *SchemaAUpdateOne

SetInt64 sets the "int64" field.

func (*SchemaAUpdateOne) SetJsontypeInts

func (sao *SchemaAUpdateOne) SetJsontypeInts(i []int) *SchemaAUpdateOne

SetJsontypeInts sets the "jsontype_ints" field.

func (*SchemaAUpdateOne) SetJsontypeIntsOptional

func (sao *SchemaAUpdateOne) SetJsontypeIntsOptional(i []int) *SchemaAUpdateOne

SetJsontypeIntsOptional sets the "jsontype_ints_optional" field.

func (*SchemaAUpdateOne) SetJsontypeStrings

func (sao *SchemaAUpdateOne) SetJsontypeStrings(s []string) *SchemaAUpdateOne

SetJsontypeStrings sets the "jsontype_strings" field.

func (*SchemaAUpdateOne) SetJsontypeStringsOptional

func (sao *SchemaAUpdateOne) SetJsontypeStringsOptional(s []string) *SchemaAUpdateOne

SetJsontypeStringsOptional sets the "jsontype_strings_optional" field.

func (*SchemaAUpdateOne) SetNillableEdgeSchemabUniqueOptionalID

func (sao *SchemaAUpdateOne) SetNillableEdgeSchemabUniqueOptionalID(id *int64) *SchemaAUpdateOne

SetNillableEdgeSchemabUniqueOptionalID sets the "edge_schemab_unique_optional" edge to the SchemaB entity by ID if the given value is not nil.

func (*SchemaAUpdateOne) SetNillableOptionalNullableBool

func (sao *SchemaAUpdateOne) SetNillableOptionalNullableBool(b *bool) *SchemaAUpdateOne

SetNillableOptionalNullableBool sets the "optional_nullable_bool" field if the given value is not nil.

func (*SchemaAUpdateOne) SetNillableOptionalNullableEnum

func (sao *SchemaAUpdateOne) SetNillableOptionalNullableEnum(sne *schemaa.OptionalNullableEnum) *SchemaAUpdateOne

SetNillableOptionalNullableEnum sets the "optional_nullable_enum" field if the given value is not nil.

func (*SchemaAUpdateOne) SetNillableStringOptionalNullable

func (sao *SchemaAUpdateOne) SetNillableStringOptionalNullable(s *string) *SchemaAUpdateOne

SetNillableStringOptionalNullable sets the "string_optional_nullable" field if the given value is not nil.

func (*SchemaAUpdateOne) SetOptionalNullableBool

func (sao *SchemaAUpdateOne) SetOptionalNullableBool(b bool) *SchemaAUpdateOne

SetOptionalNullableBool sets the "optional_nullable_bool" field.

func (*SchemaAUpdateOne) SetOptionalNullableEnum

func (sao *SchemaAUpdateOne) SetOptionalNullableEnum(sne schemaa.OptionalNullableEnum) *SchemaAUpdateOne

SetOptionalNullableEnum sets the "optional_nullable_enum" field.

func (*SchemaAUpdateOne) SetRequiredEnum

func (sao *SchemaAUpdateOne) SetRequiredEnum(se schemaa.RequiredEnum) *SchemaAUpdateOne

SetRequiredEnum sets the "required_enum" field.

func (*SchemaAUpdateOne) SetStringBindtoFoobar

func (sao *SchemaAUpdateOne) SetStringBindtoFoobar(s string) *SchemaAUpdateOne

SetStringBindtoFoobar sets the "string_bindto_foobar" field.

func (*SchemaAUpdateOne) SetStringOptionalNullable

func (sao *SchemaAUpdateOne) SetStringOptionalNullable(s string) *SchemaAUpdateOne

SetStringOptionalNullable sets the "string_optional_nullable" field.

func (*SchemaAUpdateOne) Where

Where appends a list predicates to the SchemaAUpdate builder.

type SchemaAs

type SchemaAs []*SchemaA

SchemaAs is a parsable slice of SchemaA.

type SchemaB

type SchemaB struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// contains filtered or unexported fields
}

SchemaB is the model entity for the SchemaB schema.

func (*SchemaB) String

func (s *SchemaB) String() string

String implements the fmt.Stringer.

func (*SchemaB) ToOpenAPI

func (e *SchemaB) ToOpenAPI() (*openapi.SchemaB, error)

func (*SchemaB) Unwrap

func (s *SchemaB) Unwrap() *SchemaB

Unwrap unwraps the SchemaB 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 (*SchemaB) Update

func (s *SchemaB) Update() *SchemaBUpdateOne

Update returns a builder for updating this SchemaB. Note that you need to call SchemaB.Unwrap() before calling this method if this SchemaB was returned from a transaction, and the transaction was committed or rolled back.

func (*SchemaB) Value

func (s *SchemaB) Value(name string) (ent.Value, error)

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

type SchemaBClient

type SchemaBClient struct {
	// contains filtered or unexported fields
}

SchemaBClient is a client for the SchemaB schema.

func NewSchemaBClient

func NewSchemaBClient(c config) *SchemaBClient

NewSchemaBClient returns a client for the SchemaB from the given config.

func (*SchemaBClient) Create

func (c *SchemaBClient) Create() *SchemaBCreate

Create returns a builder for creating a SchemaB entity.

func (*SchemaBClient) CreateBulk

func (c *SchemaBClient) CreateBulk(builders ...*SchemaBCreate) *SchemaBCreateBulk

CreateBulk returns a builder for creating a bulk of SchemaB entities.

func (*SchemaBClient) Delete

func (c *SchemaBClient) Delete() *SchemaBDelete

Delete returns a delete builder for SchemaB.

func (*SchemaBClient) DeleteOne

func (c *SchemaBClient) DeleteOne(s *SchemaB) *SchemaBDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SchemaBClient) DeleteOneID

func (c *SchemaBClient) DeleteOneID(id int64) *SchemaBDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SchemaBClient) Get

func (c *SchemaBClient) Get(ctx context.Context, id int64) (*SchemaB, error)

Get returns a SchemaB entity by its id.

func (*SchemaBClient) GetX

func (c *SchemaBClient) GetX(ctx context.Context, id int64) *SchemaB

GetX is like Get, but panics if an error occurs.

func (*SchemaBClient) Hooks

func (c *SchemaBClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SchemaBClient) Intercept

func (c *SchemaBClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `schemab.Intercept(f(g(h())))`.

func (*SchemaBClient) Interceptors

func (c *SchemaBClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SchemaBClient) Query

func (c *SchemaBClient) Query() *SchemaBQuery

Query returns a query builder for SchemaB.

func (*SchemaBClient) Update

func (c *SchemaBClient) Update() *SchemaBUpdate

Update returns an update builder for SchemaB.

func (*SchemaBClient) UpdateOne

func (c *SchemaBClient) UpdateOne(s *SchemaB) *SchemaBUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SchemaBClient) UpdateOneID

func (c *SchemaBClient) UpdateOneID(id int64) *SchemaBUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SchemaBClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `schemab.Hooks(f(g(h())))`.

type SchemaBCreate

type SchemaBCreate struct {
	// contains filtered or unexported fields
}

SchemaBCreate is the builder for creating a SchemaB entity.

func (*SchemaBCreate) Exec

func (sb *SchemaBCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SchemaBCreate) ExecX

func (sb *SchemaBCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaBCreate) Mutation

func (sb *SchemaBCreate) Mutation() *SchemaBMutation

Mutation returns the SchemaBMutation object of the builder.

func (*SchemaBCreate) Save

func (sb *SchemaBCreate) Save(ctx context.Context) (*SchemaB, error)

Save creates the SchemaB in the database.

func (*SchemaBCreate) SaveX

func (sb *SchemaBCreate) SaveX(ctx context.Context) *SchemaB

SaveX calls Save and panics if Save returns an error.

func (*SchemaBCreate) SetID

func (sb *SchemaBCreate) SetID(i int64) *SchemaBCreate

SetID sets the "id" field.

type SchemaBCreateBulk

type SchemaBCreateBulk struct {
	// contains filtered or unexported fields
}

SchemaBCreateBulk is the builder for creating many SchemaB entities in bulk.

func (*SchemaBCreateBulk) Exec

func (sbb *SchemaBCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SchemaBCreateBulk) ExecX

func (sbb *SchemaBCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaBCreateBulk) Save

func (sbb *SchemaBCreateBulk) Save(ctx context.Context) ([]*SchemaB, error)

Save creates the SchemaB entities in the database.

func (*SchemaBCreateBulk) SaveX

func (sbb *SchemaBCreateBulk) SaveX(ctx context.Context) []*SchemaB

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

type SchemaBDelete

type SchemaBDelete struct {
	// contains filtered or unexported fields
}

SchemaBDelete is the builder for deleting a SchemaB entity.

func (*SchemaBDelete) Exec

func (sb *SchemaBDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SchemaBDelete) ExecX

func (sb *SchemaBDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SchemaBDelete) Where

func (sb *SchemaBDelete) Where(ps ...predicate.SchemaB) *SchemaBDelete

Where appends a list predicates to the SchemaBDelete builder.

type SchemaBDeleteOne

type SchemaBDeleteOne struct {
	// contains filtered or unexported fields
}

SchemaBDeleteOne is the builder for deleting a single SchemaB entity.

func (*SchemaBDeleteOne) Exec

func (sbo *SchemaBDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SchemaBDeleteOne) ExecX

func (sbo *SchemaBDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaBDeleteOne) Where

Where appends a list predicates to the SchemaBDelete builder.

type SchemaBGroupBy

type SchemaBGroupBy struct {
	// contains filtered or unexported fields
}

SchemaBGroupBy is the group-by builder for SchemaB entities.

func (*SchemaBGroupBy) Aggregate

func (sbb *SchemaBGroupBy) Aggregate(fns ...AggregateFunc) *SchemaBGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SchemaBGroupBy) Bool

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

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

func (*SchemaBGroupBy) BoolX

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

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

func (*SchemaBGroupBy) Bools

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

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

func (*SchemaBGroupBy) BoolsX

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

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

func (*SchemaBGroupBy) Float64

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

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

func (*SchemaBGroupBy) Float64X

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

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

func (*SchemaBGroupBy) Float64s

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

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

func (*SchemaBGroupBy) Float64sX

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

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

func (*SchemaBGroupBy) Int

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

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

func (*SchemaBGroupBy) IntX

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

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

func (*SchemaBGroupBy) Ints

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

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

func (*SchemaBGroupBy) IntsX

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

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

func (*SchemaBGroupBy) Scan

func (sbb *SchemaBGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SchemaBGroupBy) ScanX

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

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

func (*SchemaBGroupBy) String

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

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

func (*SchemaBGroupBy) StringX

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

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

func (*SchemaBGroupBy) Strings

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

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

func (*SchemaBGroupBy) StringsX

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

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

type SchemaBMutation

type SchemaBMutation struct {
	// contains filtered or unexported fields
}

SchemaBMutation represents an operation that mutates the SchemaB nodes in the graph.

func (*SchemaBMutation) AddField

func (m *SchemaBMutation) 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 (*SchemaBMutation) AddedEdges

func (m *SchemaBMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SchemaBMutation) AddedField

func (m *SchemaBMutation) 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 (*SchemaBMutation) AddedFields

func (m *SchemaBMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SchemaBMutation) AddedIDs

func (m *SchemaBMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SchemaBMutation) ClearEdge

func (m *SchemaBMutation) 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 (*SchemaBMutation) ClearField

func (m *SchemaBMutation) 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 (*SchemaBMutation) ClearedEdges

func (m *SchemaBMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SchemaBMutation) ClearedFields

func (m *SchemaBMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SchemaBMutation) Client

func (m SchemaBMutation) 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 (*SchemaBMutation) EdgeCleared

func (m *SchemaBMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SchemaBMutation) Field

func (m *SchemaBMutation) 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 (*SchemaBMutation) FieldCleared

func (m *SchemaBMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SchemaBMutation) Fields

func (m *SchemaBMutation) 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 (*SchemaBMutation) ID

func (m *SchemaBMutation) ID() (id int64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SchemaBMutation) IDs

func (m *SchemaBMutation) IDs(ctx context.Context) ([]int64, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SchemaBMutation) OldField

func (m *SchemaBMutation) 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 (*SchemaBMutation) Op

func (m *SchemaBMutation) Op() Op

Op returns the operation name.

func (*SchemaBMutation) RemovedEdges

func (m *SchemaBMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SchemaBMutation) RemovedIDs

func (m *SchemaBMutation) 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 (*SchemaBMutation) ResetEdge

func (m *SchemaBMutation) 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 (*SchemaBMutation) ResetField

func (m *SchemaBMutation) 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 (*SchemaBMutation) SetField

func (m *SchemaBMutation) 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 (*SchemaBMutation) SetID

func (m *SchemaBMutation) SetID(id int64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SchemaB entities.

func (*SchemaBMutation) SetOp

func (m *SchemaBMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (SchemaBMutation) Tx

func (m SchemaBMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SchemaBMutation) Type

func (m *SchemaBMutation) Type() string

Type returns the node type of this mutation (SchemaB).

func (*SchemaBMutation) Where

func (m *SchemaBMutation) Where(ps ...predicate.SchemaB)

Where appends a list predicates to the SchemaBMutation builder.

func (*SchemaBMutation) WhereP

func (m *SchemaBMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SchemaBMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SchemaBQuery

type SchemaBQuery struct {
	// contains filtered or unexported fields
}

SchemaBQuery is the builder for querying SchemaB entities.

func (*SchemaBQuery) Aggregate

func (sb *SchemaBQuery) Aggregate(fns ...AggregateFunc) *SchemaBSelect

Aggregate returns a SchemaBSelect configured with the given aggregations.

func (*SchemaBQuery) All

func (sb *SchemaBQuery) All(ctx context.Context) ([]*SchemaB, error)

All executes the query and returns a list of SchemaBs.

func (*SchemaBQuery) AllX

func (sb *SchemaBQuery) AllX(ctx context.Context) []*SchemaB

AllX is like All, but panics if an error occurs.

func (*SchemaBQuery) Clone

func (sb *SchemaBQuery) Clone() *SchemaBQuery

Clone returns a duplicate of the SchemaBQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SchemaBQuery) Count

func (sb *SchemaBQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SchemaBQuery) CountX

func (sb *SchemaBQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SchemaBQuery) Exist

func (sb *SchemaBQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SchemaBQuery) ExistX

func (sb *SchemaBQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SchemaBQuery) First

func (sb *SchemaBQuery) First(ctx context.Context) (*SchemaB, error)

First returns the first SchemaB entity from the query. Returns a *NotFoundError when no SchemaB was found.

func (*SchemaBQuery) FirstID

func (sb *SchemaBQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first SchemaB ID from the query. Returns a *NotFoundError when no SchemaB ID was found.

func (*SchemaBQuery) FirstIDX

func (sb *SchemaBQuery) FirstIDX(ctx context.Context) int64

FirstIDX is like FirstID, but panics if an error occurs.

func (*SchemaBQuery) FirstX

func (sb *SchemaBQuery) FirstX(ctx context.Context) *SchemaB

FirstX is like First, but panics if an error occurs.

func (*SchemaBQuery) GroupBy

func (sb *SchemaBQuery) GroupBy(field string, fields ...string) *SchemaBGroupBy

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.

func (*SchemaBQuery) IDs

func (sb *SchemaBQuery) IDs(ctx context.Context) (ids []int64, err error)

IDs executes the query and returns a list of SchemaB IDs.

func (*SchemaBQuery) IDsX

func (sb *SchemaBQuery) IDsX(ctx context.Context) []int64

IDsX is like IDs, but panics if an error occurs.

func (*SchemaBQuery) Limit

func (sb *SchemaBQuery) Limit(limit int) *SchemaBQuery

Limit the number of records to be returned by this query.

func (*SchemaBQuery) Offset

func (sb *SchemaBQuery) Offset(offset int) *SchemaBQuery

Offset to start from.

func (*SchemaBQuery) Only

func (sb *SchemaBQuery) Only(ctx context.Context) (*SchemaB, error)

Only returns a single SchemaB entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SchemaB entity is found. Returns a *NotFoundError when no SchemaB entities are found.

func (*SchemaBQuery) OnlyID

func (sb *SchemaBQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID is like Only, but returns the only SchemaB ID in the query. Returns a *NotSingularError when more than one SchemaB ID is found. Returns a *NotFoundError when no entities are found.

func (*SchemaBQuery) OnlyIDX

func (sb *SchemaBQuery) OnlyIDX(ctx context.Context) int64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SchemaBQuery) OnlyX

func (sb *SchemaBQuery) OnlyX(ctx context.Context) *SchemaB

OnlyX is like Only, but panics if an error occurs.

func (*SchemaBQuery) Order

func (sb *SchemaBQuery) Order(o ...schemab.OrderOption) *SchemaBQuery

Order specifies how the records should be ordered.

func (*SchemaBQuery) Select

func (sb *SchemaBQuery) Select(fields ...string) *SchemaBSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*SchemaBQuery) Unique

func (sb *SchemaBQuery) Unique(unique bool) *SchemaBQuery

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 (*SchemaBQuery) Where

func (sb *SchemaBQuery) Where(ps ...predicate.SchemaB) *SchemaBQuery

Where adds a new predicate for the SchemaBQuery builder.

type SchemaBSelect

type SchemaBSelect struct {
	*SchemaBQuery
	// contains filtered or unexported fields
}

SchemaBSelect is the builder for selecting fields of SchemaB entities.

func (*SchemaBSelect) Aggregate

func (sb *SchemaBSelect) Aggregate(fns ...AggregateFunc) *SchemaBSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SchemaBSelect) Bool

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

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

func (*SchemaBSelect) BoolX

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

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

func (*SchemaBSelect) Bools

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

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

func (*SchemaBSelect) BoolsX

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

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

func (*SchemaBSelect) Float64

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

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

func (*SchemaBSelect) Float64X

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

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

func (*SchemaBSelect) Float64s

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

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

func (*SchemaBSelect) Float64sX

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

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

func (*SchemaBSelect) Int

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

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

func (*SchemaBSelect) IntX

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

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

func (*SchemaBSelect) Ints

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

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

func (*SchemaBSelect) IntsX

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

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

func (*SchemaBSelect) Scan

func (sb *SchemaBSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SchemaBSelect) ScanX

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

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

func (*SchemaBSelect) String

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

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

func (*SchemaBSelect) StringX

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

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

func (*SchemaBSelect) Strings

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

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

func (*SchemaBSelect) StringsX

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

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

type SchemaBUpdate

type SchemaBUpdate struct {
	// contains filtered or unexported fields
}

SchemaBUpdate is the builder for updating SchemaB entities.

func (*SchemaBUpdate) Exec

func (sb *SchemaBUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SchemaBUpdate) ExecX

func (sb *SchemaBUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaBUpdate) Mutation

func (sb *SchemaBUpdate) Mutation() *SchemaBMutation

Mutation returns the SchemaBMutation object of the builder.

func (*SchemaBUpdate) Save

func (sb *SchemaBUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SchemaBUpdate) SaveX

func (sb *SchemaBUpdate) SaveX(ctx context.Context) int

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

func (*SchemaBUpdate) Where

func (sb *SchemaBUpdate) Where(ps ...predicate.SchemaB) *SchemaBUpdate

Where appends a list predicates to the SchemaBUpdate builder.

type SchemaBUpdateOne

type SchemaBUpdateOne struct {
	// contains filtered or unexported fields
}

SchemaBUpdateOne is the builder for updating a single SchemaB entity.

func (*SchemaBUpdateOne) Exec

func (sbo *SchemaBUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SchemaBUpdateOne) ExecX

func (sbo *SchemaBUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchemaBUpdateOne) Mutation

func (sbo *SchemaBUpdateOne) Mutation() *SchemaBMutation

Mutation returns the SchemaBMutation object of the builder.

func (*SchemaBUpdateOne) Save

func (sbo *SchemaBUpdateOne) Save(ctx context.Context) (*SchemaB, error)

Save executes the query and returns the updated SchemaB entity.

func (*SchemaBUpdateOne) SaveX

func (sbo *SchemaBUpdateOne) SaveX(ctx context.Context) *SchemaB

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

func (*SchemaBUpdateOne) Select

func (sbo *SchemaBUpdateOne) Select(field string, fields ...string) *SchemaBUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SchemaBUpdateOne) Where

Where appends a list predicates to the SchemaBUpdate builder.

type SchemaBs

type SchemaBs []*SchemaB

SchemaBs is a parsable slice of SchemaB.

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 {

	// SchemaA is the client for interacting with the SchemaA builders.
	SchemaA *SchemaAClient
	// SchemaB is the client for interacting with the SchemaB builders.
	SchemaB *SchemaBClient
	// 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