ent

package
v0.0.4-3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT 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.
	TypeAccount    = "Account"
	TypeApp        = "App"
	TypeAppPackage = "AppPackage"
	TypeUser       = "User"
)

Variables

This section is empty.

Functions

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.

Types

type Account added in v0.0.2

type Account struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// InternalID holds the value of the "internal_id" field.
	InternalID int64 `json:"internal_id,omitempty"`
	// Platform holds the value of the "platform" field.
	Platform account.Platform `json:"platform,omitempty"`
	// PlatformAccountID holds the value of the "platform_account_id" field.
	PlatformAccountID string `json:"platform_account_id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// ProfileURL holds the value of the "profile_url" field.
	ProfileURL string `json:"profile_url,omitempty"`
	// AvatarURL holds the value of the "avatar_url" field.
	AvatarURL string `json:"avatar_url,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Account is the model entity for the Account schema.

func (*Account) String added in v0.0.2

func (a *Account) String() string

String implements the fmt.Stringer.

func (*Account) Unwrap added in v0.0.2

func (a *Account) Unwrap() *Account

Unwrap unwraps the Account 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 (*Account) Update added in v0.0.2

func (a *Account) Update() *AccountUpdateOne

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

type AccountClient added in v0.0.2

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

AccountClient is a client for the Account schema.

func NewAccountClient added in v0.0.2

func NewAccountClient(c config) *AccountClient

NewAccountClient returns a client for the Account from the given config.

func (*AccountClient) Create added in v0.0.2

func (c *AccountClient) Create() *AccountCreate

Create returns a builder for creating a Account entity.

func (*AccountClient) CreateBulk added in v0.0.2

func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk

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

func (*AccountClient) Delete added in v0.0.2

func (c *AccountClient) Delete() *AccountDelete

Delete returns a delete builder for Account.

func (*AccountClient) DeleteOne added in v0.0.2

func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AccountClient) DeleteOneID added in v0.0.2

func (c *AccountClient) DeleteOneID(id int) *AccountDeleteOne

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

func (*AccountClient) Get added in v0.0.2

func (c *AccountClient) Get(ctx context.Context, id int) (*Account, error)

Get returns a Account entity by its id.

func (*AccountClient) GetX added in v0.0.2

func (c *AccountClient) GetX(ctx context.Context, id int) *Account

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

func (*AccountClient) Hooks added in v0.0.2

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

Hooks returns the client hooks.

func (*AccountClient) Intercept added in v0.0.4

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

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

func (*AccountClient) Interceptors added in v0.0.4

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

Interceptors returns the client interceptors.

func (*AccountClient) Query added in v0.0.2

func (c *AccountClient) Query() *AccountQuery

Query returns a query builder for Account.

func (*AccountClient) Update added in v0.0.2

func (c *AccountClient) Update() *AccountUpdate

Update returns an update builder for Account.

func (*AccountClient) UpdateOne added in v0.0.2

func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AccountClient) UpdateOneID added in v0.0.2

func (c *AccountClient) UpdateOneID(id int) *AccountUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AccountClient) Use added in v0.0.2

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

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

type AccountCreate added in v0.0.2

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

AccountCreate is the builder for creating a Account entity.

func (*AccountCreate) Exec added in v0.0.2

func (ac *AccountCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountCreate) ExecX added in v0.0.2

func (ac *AccountCreate) ExecX(ctx context.Context)

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

func (*AccountCreate) Mutation added in v0.0.2

func (ac *AccountCreate) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountCreate) OnConflict added in v0.0.2

func (ac *AccountCreate) OnConflict(opts ...sql.ConflictOption) *AccountUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Account.Create().
	SetInternalID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AccountUpsert) {
		SetInternalID(v+v).
	}).
	Exec(ctx)

func (*AccountCreate) OnConflictColumns added in v0.0.2

func (ac *AccountCreate) OnConflictColumns(columns ...string) *AccountUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Account.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AccountCreate) Save added in v0.0.2

func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)

Save creates the Account in the database.

func (*AccountCreate) SaveX added in v0.0.2

func (ac *AccountCreate) SaveX(ctx context.Context) *Account

SaveX calls Save and panics if Save returns an error.

func (*AccountCreate) SetAvatarURL added in v0.0.2

func (ac *AccountCreate) SetAvatarURL(s string) *AccountCreate

SetAvatarURL sets the "avatar_url" field.

func (*AccountCreate) SetCreatedAt added in v0.0.2

func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate

SetCreatedAt sets the "created_at" field.

func (*AccountCreate) SetInternalID added in v0.0.2

func (ac *AccountCreate) SetInternalID(i int64) *AccountCreate

SetInternalID sets the "internal_id" field.

func (*AccountCreate) SetName added in v0.0.2

func (ac *AccountCreate) SetName(s string) *AccountCreate

SetName sets the "name" field.

func (*AccountCreate) SetNillableCreatedAt added in v0.0.2

func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountCreate) SetPlatform added in v0.0.2

func (ac *AccountCreate) SetPlatform(a account.Platform) *AccountCreate

SetPlatform sets the "platform" field.

func (*AccountCreate) SetPlatformAccountID added in v0.0.2

func (ac *AccountCreate) SetPlatformAccountID(s string) *AccountCreate

SetPlatformAccountID sets the "platform_account_id" field.

func (*AccountCreate) SetProfileURL added in v0.0.2

func (ac *AccountCreate) SetProfileURL(s string) *AccountCreate

SetProfileURL sets the "profile_url" field.

type AccountCreateBulk added in v0.0.2

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

AccountCreateBulk is the builder for creating many Account entities in bulk.

func (*AccountCreateBulk) Exec added in v0.0.2

func (acb *AccountCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountCreateBulk) ExecX added in v0.0.2

func (acb *AccountCreateBulk) ExecX(ctx context.Context)

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

func (*AccountCreateBulk) OnConflict added in v0.0.2

func (acb *AccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccountUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Account.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AccountUpsert) {
		SetInternalID(v+v).
	}).
	Exec(ctx)

func (*AccountCreateBulk) OnConflictColumns added in v0.0.2

func (acb *AccountCreateBulk) OnConflictColumns(columns ...string) *AccountUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Account.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AccountCreateBulk) Save added in v0.0.2

func (acb *AccountCreateBulk) Save(ctx context.Context) ([]*Account, error)

Save creates the Account entities in the database.

func (*AccountCreateBulk) SaveX added in v0.0.2

func (acb *AccountCreateBulk) SaveX(ctx context.Context) []*Account

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

type AccountDelete added in v0.0.2

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

AccountDelete is the builder for deleting a Account entity.

func (*AccountDelete) Exec added in v0.0.2

func (ad *AccountDelete) Exec(ctx context.Context) (int, error)

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

func (*AccountDelete) ExecX added in v0.0.2

func (ad *AccountDelete) ExecX(ctx context.Context) int

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

func (*AccountDelete) Where added in v0.0.2

func (ad *AccountDelete) Where(ps ...predicate.Account) *AccountDelete

Where appends a list predicates to the AccountDelete builder.

type AccountDeleteOne added in v0.0.2

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

AccountDeleteOne is the builder for deleting a single Account entity.

func (*AccountDeleteOne) Exec added in v0.0.2

func (ado *AccountDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AccountDeleteOne) ExecX added in v0.0.2

func (ado *AccountDeleteOne) ExecX(ctx context.Context)

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

func (*AccountDeleteOne) Where added in v0.0.4

Where appends a list predicates to the AccountDelete builder.

type AccountGroupBy added in v0.0.2

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

AccountGroupBy is the group-by builder for Account entities.

func (*AccountGroupBy) Aggregate added in v0.0.2

func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy

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

func (*AccountGroupBy) Bool added in v0.0.2

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

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

func (*AccountGroupBy) BoolX added in v0.0.2

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

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

func (*AccountGroupBy) Bools added in v0.0.2

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

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

func (*AccountGroupBy) BoolsX added in v0.0.2

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

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

func (*AccountGroupBy) Float64 added in v0.0.2

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

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

func (*AccountGroupBy) Float64X added in v0.0.2

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

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

func (*AccountGroupBy) Float64s added in v0.0.2

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

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

func (*AccountGroupBy) Float64sX added in v0.0.2

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

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

func (*AccountGroupBy) Int added in v0.0.2

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

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

func (*AccountGroupBy) IntX added in v0.0.2

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

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

func (*AccountGroupBy) Ints added in v0.0.2

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

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

func (*AccountGroupBy) IntsX added in v0.0.2

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

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

func (*AccountGroupBy) Scan added in v0.0.2

func (agb *AccountGroupBy) Scan(ctx context.Context, v any) error

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

func (*AccountGroupBy) ScanX added in v0.0.2

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

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

func (*AccountGroupBy) String added in v0.0.2

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

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

func (*AccountGroupBy) StringX added in v0.0.2

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

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

func (*AccountGroupBy) Strings added in v0.0.2

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

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

func (*AccountGroupBy) StringsX added in v0.0.2

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

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

type AccountMutation added in v0.0.2

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

AccountMutation represents an operation that mutates the Account nodes in the graph.

func (*AccountMutation) AddField added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) AddInternalID added in v0.0.2

func (m *AccountMutation) AddInternalID(i int64)

AddInternalID adds i to the "internal_id" field.

func (*AccountMutation) AddedEdges added in v0.0.2

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

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

func (*AccountMutation) AddedField added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) AddedFields added in v0.0.2

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

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

func (*AccountMutation) AddedIDs added in v0.0.2

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

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

func (*AccountMutation) AddedInternalID added in v0.0.2

func (m *AccountMutation) AddedInternalID() (r int64, exists bool)

AddedInternalID returns the value that was added to the "internal_id" field in this mutation.

func (*AccountMutation) AvatarURL added in v0.0.2

func (m *AccountMutation) AvatarURL() (r string, exists bool)

AvatarURL returns the value of the "avatar_url" field in the mutation.

func (*AccountMutation) ClearEdge added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) ClearField added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) ClearedEdges added in v0.0.2

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

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

func (*AccountMutation) ClearedFields added in v0.0.2

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

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

func (AccountMutation) Client added in v0.0.2

func (m AccountMutation) 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 (*AccountMutation) CreatedAt added in v0.0.2

func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AccountMutation) EdgeCleared added in v0.0.2

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

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

func (*AccountMutation) Field added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) FieldCleared added in v0.0.2

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

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

func (*AccountMutation) Fields added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) ID added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) IDs added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) InternalID added in v0.0.2

func (m *AccountMutation) InternalID() (r int64, exists bool)

InternalID returns the value of the "internal_id" field in the mutation.

func (*AccountMutation) Name added in v0.0.2

func (m *AccountMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AccountMutation) OldAvatarURL added in v0.0.2

func (m *AccountMutation) OldAvatarURL(ctx context.Context) (v string, err error)

OldAvatarURL returns the old "avatar_url" field's value of the Account entity. If the Account 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 (*AccountMutation) OldCreatedAt added in v0.0.2

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

OldCreatedAt returns the old "created_at" field's value of the Account entity. If the Account 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 (*AccountMutation) OldField added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) OldInternalID added in v0.0.2

func (m *AccountMutation) OldInternalID(ctx context.Context) (v int64, err error)

OldInternalID returns the old "internal_id" field's value of the Account entity. If the Account 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 (*AccountMutation) OldName added in v0.0.2

func (m *AccountMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Account entity. If the Account 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 (*AccountMutation) OldPlatform added in v0.0.2

func (m *AccountMutation) OldPlatform(ctx context.Context) (v account.Platform, err error)

OldPlatform returns the old "platform" field's value of the Account entity. If the Account 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 (*AccountMutation) OldPlatformAccountID added in v0.0.2

func (m *AccountMutation) OldPlatformAccountID(ctx context.Context) (v string, err error)

OldPlatformAccountID returns the old "platform_account_id" field's value of the Account entity. If the Account 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 (*AccountMutation) OldProfileURL added in v0.0.2

func (m *AccountMutation) OldProfileURL(ctx context.Context) (v string, err error)

OldProfileURL returns the old "profile_url" field's value of the Account entity. If the Account 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 (*AccountMutation) Op added in v0.0.2

func (m *AccountMutation) Op() Op

Op returns the operation name.

func (*AccountMutation) Platform added in v0.0.2

func (m *AccountMutation) Platform() (r account.Platform, exists bool)

Platform returns the value of the "platform" field in the mutation.

func (*AccountMutation) PlatformAccountID added in v0.0.2

func (m *AccountMutation) PlatformAccountID() (r string, exists bool)

PlatformAccountID returns the value of the "platform_account_id" field in the mutation.

func (*AccountMutation) ProfileURL added in v0.0.2

func (m *AccountMutation) ProfileURL() (r string, exists bool)

ProfileURL returns the value of the "profile_url" field in the mutation.

func (*AccountMutation) RemovedEdges added in v0.0.2

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

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

func (*AccountMutation) RemovedIDs added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) ResetAvatarURL added in v0.0.2

func (m *AccountMutation) ResetAvatarURL()

ResetAvatarURL resets all changes to the "avatar_url" field.

func (*AccountMutation) ResetCreatedAt added in v0.0.2

func (m *AccountMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AccountMutation) ResetEdge added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) ResetField added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) ResetInternalID added in v0.0.2

func (m *AccountMutation) ResetInternalID()

ResetInternalID resets all changes to the "internal_id" field.

func (*AccountMutation) ResetName added in v0.0.2

func (m *AccountMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AccountMutation) ResetPlatform added in v0.0.2

func (m *AccountMutation) ResetPlatform()

ResetPlatform resets all changes to the "platform" field.

func (*AccountMutation) ResetPlatformAccountID added in v0.0.2

func (m *AccountMutation) ResetPlatformAccountID()

ResetPlatformAccountID resets all changes to the "platform_account_id" field.

func (*AccountMutation) ResetProfileURL added in v0.0.2

func (m *AccountMutation) ResetProfileURL()

ResetProfileURL resets all changes to the "profile_url" field.

func (*AccountMutation) SetAvatarURL added in v0.0.2

func (m *AccountMutation) SetAvatarURL(s string)

SetAvatarURL sets the "avatar_url" field.

func (*AccountMutation) SetCreatedAt added in v0.0.2

func (m *AccountMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AccountMutation) SetField added in v0.0.2

func (m *AccountMutation) 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 (*AccountMutation) SetInternalID added in v0.0.2

func (m *AccountMutation) SetInternalID(i int64)

SetInternalID sets the "internal_id" field.

func (*AccountMutation) SetName added in v0.0.2

func (m *AccountMutation) SetName(s string)

SetName sets the "name" field.

func (*AccountMutation) SetOp added in v0.0.4

func (m *AccountMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AccountMutation) SetPlatform added in v0.0.2

func (m *AccountMutation) SetPlatform(a account.Platform)

SetPlatform sets the "platform" field.

func (*AccountMutation) SetPlatformAccountID added in v0.0.2

func (m *AccountMutation) SetPlatformAccountID(s string)

SetPlatformAccountID sets the "platform_account_id" field.

func (*AccountMutation) SetProfileURL added in v0.0.2

func (m *AccountMutation) SetProfileURL(s string)

SetProfileURL sets the "profile_url" field.

func (AccountMutation) Tx added in v0.0.2

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

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

func (*AccountMutation) Type added in v0.0.2

func (m *AccountMutation) Type() string

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

func (*AccountMutation) Where added in v0.0.2

func (m *AccountMutation) Where(ps ...predicate.Account)

Where appends a list predicates to the AccountMutation builder.

func (*AccountMutation) WhereP added in v0.0.4

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

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

type AccountQuery added in v0.0.2

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

AccountQuery is the builder for querying Account entities.

func (*AccountQuery) Aggregate added in v0.0.3

func (aq *AccountQuery) Aggregate(fns ...AggregateFunc) *AccountSelect

Aggregate returns a AccountSelect configured with the given aggregations.

func (*AccountQuery) All added in v0.0.2

func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)

All executes the query and returns a list of Accounts.

func (*AccountQuery) AllX added in v0.0.2

func (aq *AccountQuery) AllX(ctx context.Context) []*Account

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

func (*AccountQuery) Clone added in v0.0.2

func (aq *AccountQuery) Clone() *AccountQuery

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

func (*AccountQuery) Count added in v0.0.2

func (aq *AccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AccountQuery) CountX added in v0.0.2

func (aq *AccountQuery) CountX(ctx context.Context) int

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

func (*AccountQuery) Exist added in v0.0.2

func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)

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

func (*AccountQuery) ExistX added in v0.0.2

func (aq *AccountQuery) ExistX(ctx context.Context) bool

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

func (*AccountQuery) First added in v0.0.2

func (aq *AccountQuery) First(ctx context.Context) (*Account, error)

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

func (*AccountQuery) FirstID added in v0.0.2

func (aq *AccountQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*AccountQuery) FirstIDX added in v0.0.2

func (aq *AccountQuery) FirstIDX(ctx context.Context) int

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

func (*AccountQuery) FirstX added in v0.0.2

func (aq *AccountQuery) FirstX(ctx context.Context) *Account

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

func (*AccountQuery) GroupBy added in v0.0.2

func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy

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

client.Account.Query().
	GroupBy(account.FieldInternalID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AccountQuery) IDs added in v0.0.2

func (aq *AccountQuery) IDs(ctx context.Context) ([]int, error)

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

func (*AccountQuery) IDsX added in v0.0.2

func (aq *AccountQuery) IDsX(ctx context.Context) []int

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

func (*AccountQuery) Limit added in v0.0.2

func (aq *AccountQuery) Limit(limit int) *AccountQuery

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

func (*AccountQuery) Offset added in v0.0.2

func (aq *AccountQuery) Offset(offset int) *AccountQuery

Offset to start from.

func (*AccountQuery) Only added in v0.0.2

func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)

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

func (*AccountQuery) OnlyID added in v0.0.2

func (aq *AccountQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*AccountQuery) OnlyIDX added in v0.0.2

func (aq *AccountQuery) OnlyIDX(ctx context.Context) int

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

func (*AccountQuery) OnlyX added in v0.0.2

func (aq *AccountQuery) OnlyX(ctx context.Context) *Account

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

func (*AccountQuery) Order added in v0.0.2

func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery

Order specifies how the records should be ordered.

func (*AccountQuery) Select added in v0.0.2

func (aq *AccountQuery) Select(fields ...string) *AccountSelect

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

client.Account.Query().
	Select(account.FieldInternalID).
	Scan(ctx, &v)

func (*AccountQuery) Unique added in v0.0.2

func (aq *AccountQuery) Unique(unique bool) *AccountQuery

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 (*AccountQuery) Where added in v0.0.2

func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery

Where adds a new predicate for the AccountQuery builder.

type AccountSelect added in v0.0.2

type AccountSelect struct {
	*AccountQuery
	// contains filtered or unexported fields
}

AccountSelect is the builder for selecting fields of Account entities.

func (*AccountSelect) Aggregate added in v0.0.3

func (as *AccountSelect) Aggregate(fns ...AggregateFunc) *AccountSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AccountSelect) Bool added in v0.0.2

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

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

func (*AccountSelect) BoolX added in v0.0.2

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

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

func (*AccountSelect) Bools added in v0.0.2

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

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

func (*AccountSelect) BoolsX added in v0.0.2

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

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

func (*AccountSelect) Float64 added in v0.0.2

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

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

func (*AccountSelect) Float64X added in v0.0.2

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

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

func (*AccountSelect) Float64s added in v0.0.2

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

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

func (*AccountSelect) Float64sX added in v0.0.2

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

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

func (*AccountSelect) Int added in v0.0.2

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

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

func (*AccountSelect) IntX added in v0.0.2

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

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

func (*AccountSelect) Ints added in v0.0.2

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

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

func (*AccountSelect) IntsX added in v0.0.2

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

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

func (*AccountSelect) Scan added in v0.0.2

func (as *AccountSelect) Scan(ctx context.Context, v any) error

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

func (*AccountSelect) ScanX added in v0.0.2

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

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

func (*AccountSelect) String added in v0.0.2

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

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

func (*AccountSelect) StringX added in v0.0.2

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

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

func (*AccountSelect) Strings added in v0.0.2

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

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

func (*AccountSelect) StringsX added in v0.0.2

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

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

type AccountUpdate added in v0.0.2

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

AccountUpdate is the builder for updating Account entities.

func (*AccountUpdate) AddInternalID added in v0.0.2

func (au *AccountUpdate) AddInternalID(i int64) *AccountUpdate

AddInternalID adds i to the "internal_id" field.

func (*AccountUpdate) Exec added in v0.0.2

func (au *AccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountUpdate) ExecX added in v0.0.2

func (au *AccountUpdate) ExecX(ctx context.Context)

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

func (*AccountUpdate) Mutation added in v0.0.2

func (au *AccountUpdate) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountUpdate) Save added in v0.0.2

func (au *AccountUpdate) Save(ctx context.Context) (int, error)

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

func (*AccountUpdate) SaveX added in v0.0.2

func (au *AccountUpdate) SaveX(ctx context.Context) int

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

func (*AccountUpdate) SetAvatarURL added in v0.0.2

func (au *AccountUpdate) SetAvatarURL(s string) *AccountUpdate

SetAvatarURL sets the "avatar_url" field.

func (*AccountUpdate) SetCreatedAt added in v0.0.2

func (au *AccountUpdate) SetCreatedAt(t time.Time) *AccountUpdate

SetCreatedAt sets the "created_at" field.

func (*AccountUpdate) SetInternalID added in v0.0.2

func (au *AccountUpdate) SetInternalID(i int64) *AccountUpdate

SetInternalID sets the "internal_id" field.

func (*AccountUpdate) SetName added in v0.0.2

func (au *AccountUpdate) SetName(s string) *AccountUpdate

SetName sets the "name" field.

func (*AccountUpdate) SetNillableCreatedAt added in v0.0.2

func (au *AccountUpdate) SetNillableCreatedAt(t *time.Time) *AccountUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountUpdate) SetPlatform added in v0.0.2

func (au *AccountUpdate) SetPlatform(a account.Platform) *AccountUpdate

SetPlatform sets the "platform" field.

func (*AccountUpdate) SetPlatformAccountID added in v0.0.2

func (au *AccountUpdate) SetPlatformAccountID(s string) *AccountUpdate

SetPlatformAccountID sets the "platform_account_id" field.

func (*AccountUpdate) SetProfileURL added in v0.0.2

func (au *AccountUpdate) SetProfileURL(s string) *AccountUpdate

SetProfileURL sets the "profile_url" field.

func (*AccountUpdate) Where added in v0.0.2

func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate

Where appends a list predicates to the AccountUpdate builder.

type AccountUpdateOne added in v0.0.2

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

AccountUpdateOne is the builder for updating a single Account entity.

func (*AccountUpdateOne) AddInternalID added in v0.0.2

func (auo *AccountUpdateOne) AddInternalID(i int64) *AccountUpdateOne

AddInternalID adds i to the "internal_id" field.

func (*AccountUpdateOne) Exec added in v0.0.2

func (auo *AccountUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AccountUpdateOne) ExecX added in v0.0.2

func (auo *AccountUpdateOne) ExecX(ctx context.Context)

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

func (*AccountUpdateOne) Mutation added in v0.0.2

func (auo *AccountUpdateOne) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountUpdateOne) Save added in v0.0.2

func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)

Save executes the query and returns the updated Account entity.

func (*AccountUpdateOne) SaveX added in v0.0.2

func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account

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

func (*AccountUpdateOne) Select added in v0.0.2

func (auo *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne

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

func (*AccountUpdateOne) SetAvatarURL added in v0.0.2

func (auo *AccountUpdateOne) SetAvatarURL(s string) *AccountUpdateOne

SetAvatarURL sets the "avatar_url" field.

func (*AccountUpdateOne) SetCreatedAt added in v0.0.2

func (auo *AccountUpdateOne) SetCreatedAt(t time.Time) *AccountUpdateOne

SetCreatedAt sets the "created_at" field.

func (*AccountUpdateOne) SetInternalID added in v0.0.2

func (auo *AccountUpdateOne) SetInternalID(i int64) *AccountUpdateOne

SetInternalID sets the "internal_id" field.

func (*AccountUpdateOne) SetName added in v0.0.2

func (auo *AccountUpdateOne) SetName(s string) *AccountUpdateOne

SetName sets the "name" field.

func (*AccountUpdateOne) SetNillableCreatedAt added in v0.0.2

func (auo *AccountUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountUpdateOne) SetPlatform added in v0.0.2

func (auo *AccountUpdateOne) SetPlatform(a account.Platform) *AccountUpdateOne

SetPlatform sets the "platform" field.

func (*AccountUpdateOne) SetPlatformAccountID added in v0.0.2

func (auo *AccountUpdateOne) SetPlatformAccountID(s string) *AccountUpdateOne

SetPlatformAccountID sets the "platform_account_id" field.

func (*AccountUpdateOne) SetProfileURL added in v0.0.2

func (auo *AccountUpdateOne) SetProfileURL(s string) *AccountUpdateOne

SetProfileURL sets the "profile_url" field.

type AccountUpsert added in v0.0.2

type AccountUpsert struct {
	*sql.UpdateSet
}

AccountUpsert is the "OnConflict" setter.

func (*AccountUpsert) AddInternalID added in v0.0.2

func (u *AccountUpsert) AddInternalID(v int64) *AccountUpsert

AddInternalID adds v to the "internal_id" field.

func (*AccountUpsert) SetAvatarURL added in v0.0.2

func (u *AccountUpsert) SetAvatarURL(v string) *AccountUpsert

SetAvatarURL sets the "avatar_url" field.

func (*AccountUpsert) SetCreatedAt added in v0.0.2

func (u *AccountUpsert) SetCreatedAt(v time.Time) *AccountUpsert

SetCreatedAt sets the "created_at" field.

func (*AccountUpsert) SetInternalID added in v0.0.2

func (u *AccountUpsert) SetInternalID(v int64) *AccountUpsert

SetInternalID sets the "internal_id" field.

func (*AccountUpsert) SetName added in v0.0.2

func (u *AccountUpsert) SetName(v string) *AccountUpsert

SetName sets the "name" field.

func (*AccountUpsert) SetPlatform added in v0.0.2

func (u *AccountUpsert) SetPlatform(v account.Platform) *AccountUpsert

SetPlatform sets the "platform" field.

func (*AccountUpsert) SetPlatformAccountID added in v0.0.2

func (u *AccountUpsert) SetPlatformAccountID(v string) *AccountUpsert

SetPlatformAccountID sets the "platform_account_id" field.

func (*AccountUpsert) SetProfileURL added in v0.0.2

func (u *AccountUpsert) SetProfileURL(v string) *AccountUpsert

SetProfileURL sets the "profile_url" field.

func (*AccountUpsert) UpdateAvatarURL added in v0.0.2

func (u *AccountUpsert) UpdateAvatarURL() *AccountUpsert

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*AccountUpsert) UpdateCreatedAt added in v0.0.2

func (u *AccountUpsert) UpdateCreatedAt() *AccountUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*AccountUpsert) UpdateInternalID added in v0.0.2

func (u *AccountUpsert) UpdateInternalID() *AccountUpsert

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*AccountUpsert) UpdateName added in v0.0.2

func (u *AccountUpsert) UpdateName() *AccountUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AccountUpsert) UpdatePlatform added in v0.0.2

func (u *AccountUpsert) UpdatePlatform() *AccountUpsert

UpdatePlatform sets the "platform" field to the value that was provided on create.

func (*AccountUpsert) UpdatePlatformAccountID added in v0.0.2

func (u *AccountUpsert) UpdatePlatformAccountID() *AccountUpsert

UpdatePlatformAccountID sets the "platform_account_id" field to the value that was provided on create.

func (*AccountUpsert) UpdateProfileURL added in v0.0.2

func (u *AccountUpsert) UpdateProfileURL() *AccountUpsert

UpdateProfileURL sets the "profile_url" field to the value that was provided on create.

type AccountUpsertBulk added in v0.0.2

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

AccountUpsertBulk is the builder for "upsert"-ing a bulk of Account nodes.

func (*AccountUpsertBulk) AddInternalID added in v0.0.2

func (u *AccountUpsertBulk) AddInternalID(v int64) *AccountUpsertBulk

AddInternalID adds v to the "internal_id" field.

func (*AccountUpsertBulk) DoNothing added in v0.0.2

func (u *AccountUpsertBulk) DoNothing() *AccountUpsertBulk

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

func (*AccountUpsertBulk) Exec added in v0.0.2

func (u *AccountUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountUpsertBulk) ExecX added in v0.0.2

func (u *AccountUpsertBulk) ExecX(ctx context.Context)

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

func (*AccountUpsertBulk) Ignore added in v0.0.2

func (u *AccountUpsertBulk) Ignore() *AccountUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Account.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AccountUpsertBulk) SetAvatarURL added in v0.0.2

func (u *AccountUpsertBulk) SetAvatarURL(v string) *AccountUpsertBulk

SetAvatarURL sets the "avatar_url" field.

func (*AccountUpsertBulk) SetCreatedAt added in v0.0.2

func (u *AccountUpsertBulk) SetCreatedAt(v time.Time) *AccountUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*AccountUpsertBulk) SetInternalID added in v0.0.2

func (u *AccountUpsertBulk) SetInternalID(v int64) *AccountUpsertBulk

SetInternalID sets the "internal_id" field.

func (*AccountUpsertBulk) SetName added in v0.0.2

SetName sets the "name" field.

func (*AccountUpsertBulk) SetPlatform added in v0.0.2

SetPlatform sets the "platform" field.

func (*AccountUpsertBulk) SetPlatformAccountID added in v0.0.2

func (u *AccountUpsertBulk) SetPlatformAccountID(v string) *AccountUpsertBulk

SetPlatformAccountID sets the "platform_account_id" field.

func (*AccountUpsertBulk) SetProfileURL added in v0.0.2

func (u *AccountUpsertBulk) SetProfileURL(v string) *AccountUpsertBulk

SetProfileURL sets the "profile_url" field.

func (*AccountUpsertBulk) Update added in v0.0.2

func (u *AccountUpsertBulk) Update(set func(*AccountUpsert)) *AccountUpsertBulk

Update allows overriding fields `UPDATE` values. See the AccountCreateBulk.OnConflict documentation for more info.

func (*AccountUpsertBulk) UpdateAvatarURL added in v0.0.2

func (u *AccountUpsertBulk) UpdateAvatarURL() *AccountUpsertBulk

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*AccountUpsertBulk) UpdateCreatedAt added in v0.0.2

func (u *AccountUpsertBulk) UpdateCreatedAt() *AccountUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*AccountUpsertBulk) UpdateInternalID added in v0.0.2

func (u *AccountUpsertBulk) UpdateInternalID() *AccountUpsertBulk

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*AccountUpsertBulk) UpdateName added in v0.0.2

func (u *AccountUpsertBulk) UpdateName() *AccountUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AccountUpsertBulk) UpdateNewValues added in v0.0.2

func (u *AccountUpsertBulk) UpdateNewValues() *AccountUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Account.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*AccountUpsertBulk) UpdatePlatform added in v0.0.2

func (u *AccountUpsertBulk) UpdatePlatform() *AccountUpsertBulk

UpdatePlatform sets the "platform" field to the value that was provided on create.

func (*AccountUpsertBulk) UpdatePlatformAccountID added in v0.0.2

func (u *AccountUpsertBulk) UpdatePlatformAccountID() *AccountUpsertBulk

UpdatePlatformAccountID sets the "platform_account_id" field to the value that was provided on create.

func (*AccountUpsertBulk) UpdateProfileURL added in v0.0.2

func (u *AccountUpsertBulk) UpdateProfileURL() *AccountUpsertBulk

UpdateProfileURL sets the "profile_url" field to the value that was provided on create.

type AccountUpsertOne added in v0.0.2

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

AccountUpsertOne is the builder for "upsert"-ing

one Account node.

func (*AccountUpsertOne) AddInternalID added in v0.0.2

func (u *AccountUpsertOne) AddInternalID(v int64) *AccountUpsertOne

AddInternalID adds v to the "internal_id" field.

func (*AccountUpsertOne) DoNothing added in v0.0.2

func (u *AccountUpsertOne) DoNothing() *AccountUpsertOne

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

func (*AccountUpsertOne) Exec added in v0.0.2

func (u *AccountUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountUpsertOne) ExecX added in v0.0.2

func (u *AccountUpsertOne) ExecX(ctx context.Context)

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

func (*AccountUpsertOne) ID added in v0.0.2

func (u *AccountUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AccountUpsertOne) IDX added in v0.0.2

func (u *AccountUpsertOne) IDX(ctx context.Context) int

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

func (*AccountUpsertOne) Ignore added in v0.0.2

func (u *AccountUpsertOne) Ignore() *AccountUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Account.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AccountUpsertOne) SetAvatarURL added in v0.0.2

func (u *AccountUpsertOne) SetAvatarURL(v string) *AccountUpsertOne

SetAvatarURL sets the "avatar_url" field.

func (*AccountUpsertOne) SetCreatedAt added in v0.0.2

func (u *AccountUpsertOne) SetCreatedAt(v time.Time) *AccountUpsertOne

SetCreatedAt sets the "created_at" field.

func (*AccountUpsertOne) SetInternalID added in v0.0.2

func (u *AccountUpsertOne) SetInternalID(v int64) *AccountUpsertOne

SetInternalID sets the "internal_id" field.

func (*AccountUpsertOne) SetName added in v0.0.2

func (u *AccountUpsertOne) SetName(v string) *AccountUpsertOne

SetName sets the "name" field.

func (*AccountUpsertOne) SetPlatform added in v0.0.2

SetPlatform sets the "platform" field.

func (*AccountUpsertOne) SetPlatformAccountID added in v0.0.2

func (u *AccountUpsertOne) SetPlatformAccountID(v string) *AccountUpsertOne

SetPlatformAccountID sets the "platform_account_id" field.

func (*AccountUpsertOne) SetProfileURL added in v0.0.2

func (u *AccountUpsertOne) SetProfileURL(v string) *AccountUpsertOne

SetProfileURL sets the "profile_url" field.

func (*AccountUpsertOne) Update added in v0.0.2

func (u *AccountUpsertOne) Update(set func(*AccountUpsert)) *AccountUpsertOne

Update allows overriding fields `UPDATE` values. See the AccountCreate.OnConflict documentation for more info.

func (*AccountUpsertOne) UpdateAvatarURL added in v0.0.2

func (u *AccountUpsertOne) UpdateAvatarURL() *AccountUpsertOne

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*AccountUpsertOne) UpdateCreatedAt added in v0.0.2

func (u *AccountUpsertOne) UpdateCreatedAt() *AccountUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*AccountUpsertOne) UpdateInternalID added in v0.0.2

func (u *AccountUpsertOne) UpdateInternalID() *AccountUpsertOne

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*AccountUpsertOne) UpdateName added in v0.0.2

func (u *AccountUpsertOne) UpdateName() *AccountUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AccountUpsertOne) UpdateNewValues added in v0.0.2

func (u *AccountUpsertOne) UpdateNewValues() *AccountUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Account.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*AccountUpsertOne) UpdatePlatform added in v0.0.2

func (u *AccountUpsertOne) UpdatePlatform() *AccountUpsertOne

UpdatePlatform sets the "platform" field to the value that was provided on create.

func (*AccountUpsertOne) UpdatePlatformAccountID added in v0.0.2

func (u *AccountUpsertOne) UpdatePlatformAccountID() *AccountUpsertOne

UpdatePlatformAccountID sets the "platform_account_id" field to the value that was provided on create.

func (*AccountUpsertOne) UpdateProfileURL added in v0.0.2

func (u *AccountUpsertOne) UpdateProfileURL() *AccountUpsertOne

UpdateProfileURL sets the "profile_url" field to the value that was provided on create.

type Accounts added in v0.0.2

type Accounts []*Account

Accounts is a parsable slice of Account.

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 App

type App struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// InternalID holds the value of the "internal_id" field.
	InternalID int64 `json:"internal_id,omitempty"`
	// Source holds the value of the "source" field.
	Source app.Source `json:"source,omitempty"`
	// SourceAppID holds the value of the "source_app_id" field.
	SourceAppID string `json:"source_app_id,omitempty"`
	// SourceURL holds the value of the "source_url" field.
	SourceURL string `json:"source_url,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Type holds the value of the "type" field.
	Type app.Type `json:"type,omitempty"`
	// ShortDescription holds the value of the "short_description" field.
	ShortDescription string `json:"short_description,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// ImageURL holds the value of the "image_url" field.
	ImageURL string `json:"image_url,omitempty"`
	// ReleaseDate holds the value of the "release_date" field.
	ReleaseDate string `json:"release_date,omitempty"`
	// Developer holds the value of the "developer" field.
	Developer string `json:"developer,omitempty"`
	// Publisher holds the value of the "publisher" field.
	Publisher string `json:"publisher,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

App is the model entity for the App schema.

func (*App) String

func (a *App) String() string

String implements the fmt.Stringer.

func (*App) Unwrap

func (a *App) Unwrap() *App

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

func (a *App) Update() *AppUpdateOne

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

type AppClient

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

AppClient is a client for the App schema.

func NewAppClient

func NewAppClient(c config) *AppClient

NewAppClient returns a client for the App from the given config.

func (*AppClient) Create

func (c *AppClient) Create() *AppCreate

Create returns a builder for creating a App entity.

func (*AppClient) CreateBulk

func (c *AppClient) CreateBulk(builders ...*AppCreate) *AppCreateBulk

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

func (*AppClient) Delete

func (c *AppClient) Delete() *AppDelete

Delete returns a delete builder for App.

func (*AppClient) DeleteOne

func (c *AppClient) DeleteOne(a *App) *AppDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppClient) DeleteOneID

func (c *AppClient) DeleteOneID(id int) *AppDeleteOne

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

func (*AppClient) Get

func (c *AppClient) Get(ctx context.Context, id int) (*App, error)

Get returns a App entity by its id.

func (*AppClient) GetX

func (c *AppClient) GetX(ctx context.Context, id int) *App

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

func (*AppClient) Hooks

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

Hooks returns the client hooks.

func (*AppClient) Intercept added in v0.0.4

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

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

func (*AppClient) Interceptors added in v0.0.4

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

Interceptors returns the client interceptors.

func (*AppClient) Query

func (c *AppClient) Query() *AppQuery

Query returns a query builder for App.

func (*AppClient) Update

func (c *AppClient) Update() *AppUpdate

Update returns an update builder for App.

func (*AppClient) UpdateOne

func (c *AppClient) UpdateOne(a *App) *AppUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppClient) UpdateOneID

func (c *AppClient) UpdateOneID(id int) *AppUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppClient) Use

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

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

type AppCreate

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

AppCreate is the builder for creating a App entity.

func (*AppCreate) Exec

func (ac *AppCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppCreate) ExecX

func (ac *AppCreate) ExecX(ctx context.Context)

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

func (*AppCreate) Mutation

func (ac *AppCreate) Mutation() *AppMutation

Mutation returns the AppMutation object of the builder.

func (*AppCreate) OnConflict added in v0.0.2

func (ac *AppCreate) OnConflict(opts ...sql.ConflictOption) *AppUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.App.Create().
	SetInternalID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppUpsert) {
		SetInternalID(v+v).
	}).
	Exec(ctx)

func (*AppCreate) OnConflictColumns added in v0.0.2

func (ac *AppCreate) OnConflictColumns(columns ...string) *AppUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.App.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppCreate) Save

func (ac *AppCreate) Save(ctx context.Context) (*App, error)

Save creates the App in the database.

func (*AppCreate) SaveX

func (ac *AppCreate) SaveX(ctx context.Context) *App

SaveX calls Save and panics if Save returns an error.

func (*AppCreate) SetCreatedAt

func (ac *AppCreate) SetCreatedAt(t time.Time) *AppCreate

SetCreatedAt sets the "created_at" field.

func (*AppCreate) SetDescription

func (ac *AppCreate) SetDescription(s string) *AppCreate

SetDescription sets the "description" field.

func (*AppCreate) SetDeveloper

func (ac *AppCreate) SetDeveloper(s string) *AppCreate

SetDeveloper sets the "developer" field.

func (*AppCreate) SetImageURL

func (ac *AppCreate) SetImageURL(s string) *AppCreate

SetImageURL sets the "image_url" field.

func (*AppCreate) SetInternalID

func (ac *AppCreate) SetInternalID(i int64) *AppCreate

SetInternalID sets the "internal_id" field.

func (*AppCreate) SetName

func (ac *AppCreate) SetName(s string) *AppCreate

SetName sets the "name" field.

func (*AppCreate) SetNillableCreatedAt

func (ac *AppCreate) SetNillableCreatedAt(t *time.Time) *AppCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppCreate) SetPublisher

func (ac *AppCreate) SetPublisher(s string) *AppCreate

SetPublisher sets the "publisher" field.

func (*AppCreate) SetReleaseDate

func (ac *AppCreate) SetReleaseDate(s string) *AppCreate

SetReleaseDate sets the "release_date" field.

func (*AppCreate) SetShortDescription

func (ac *AppCreate) SetShortDescription(s string) *AppCreate

SetShortDescription sets the "short_description" field.

func (*AppCreate) SetSource

func (ac *AppCreate) SetSource(a app.Source) *AppCreate

SetSource sets the "source" field.

func (*AppCreate) SetSourceAppID

func (ac *AppCreate) SetSourceAppID(s string) *AppCreate

SetSourceAppID sets the "source_app_id" field.

func (*AppCreate) SetSourceURL

func (ac *AppCreate) SetSourceURL(s string) *AppCreate

SetSourceURL sets the "source_url" field.

func (*AppCreate) SetType

func (ac *AppCreate) SetType(a app.Type) *AppCreate

SetType sets the "type" field.

type AppCreateBulk

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

AppCreateBulk is the builder for creating many App entities in bulk.

func (*AppCreateBulk) Exec

func (acb *AppCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppCreateBulk) ExecX

func (acb *AppCreateBulk) ExecX(ctx context.Context)

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

func (*AppCreateBulk) OnConflict added in v0.0.2

func (acb *AppCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.App.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppUpsert) {
		SetInternalID(v+v).
	}).
	Exec(ctx)

func (*AppCreateBulk) OnConflictColumns added in v0.0.2

func (acb *AppCreateBulk) OnConflictColumns(columns ...string) *AppUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.App.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppCreateBulk) Save

func (acb *AppCreateBulk) Save(ctx context.Context) ([]*App, error)

Save creates the App entities in the database.

func (*AppCreateBulk) SaveX

func (acb *AppCreateBulk) SaveX(ctx context.Context) []*App

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

type AppDelete

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

AppDelete is the builder for deleting a App entity.

func (*AppDelete) Exec

func (ad *AppDelete) Exec(ctx context.Context) (int, error)

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

func (*AppDelete) ExecX

func (ad *AppDelete) ExecX(ctx context.Context) int

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

func (*AppDelete) Where

func (ad *AppDelete) Where(ps ...predicate.App) *AppDelete

Where appends a list predicates to the AppDelete builder.

type AppDeleteOne

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

AppDeleteOne is the builder for deleting a single App entity.

func (*AppDeleteOne) Exec

func (ado *AppDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppDeleteOne) ExecX

func (ado *AppDeleteOne) ExecX(ctx context.Context)

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

func (*AppDeleteOne) Where added in v0.0.4

func (ado *AppDeleteOne) Where(ps ...predicate.App) *AppDeleteOne

Where appends a list predicates to the AppDelete builder.

type AppGroupBy

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

AppGroupBy is the group-by builder for App entities.

func (*AppGroupBy) Aggregate

func (agb *AppGroupBy) Aggregate(fns ...AggregateFunc) *AppGroupBy

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

func (*AppGroupBy) Bool

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

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

func (*AppGroupBy) BoolX

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

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

func (*AppGroupBy) Bools

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

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

func (*AppGroupBy) BoolsX

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

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

func (*AppGroupBy) Float64

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

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

func (*AppGroupBy) Float64X

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

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

func (*AppGroupBy) Float64s

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

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

func (*AppGroupBy) Float64sX

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

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

func (*AppGroupBy) Int

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

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

func (*AppGroupBy) IntX

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

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

func (*AppGroupBy) Ints

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

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

func (*AppGroupBy) IntsX

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

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

func (*AppGroupBy) Scan

func (agb *AppGroupBy) Scan(ctx context.Context, v any) error

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

func (*AppGroupBy) ScanX

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

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

func (*AppGroupBy) String

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

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

func (*AppGroupBy) StringX

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

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

func (*AppGroupBy) Strings

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

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

func (*AppGroupBy) StringsX

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

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

type AppMutation

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

AppMutation represents an operation that mutates the App nodes in the graph.

func (*AppMutation) AddField

func (m *AppMutation) 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 (*AppMutation) AddInternalID

func (m *AppMutation) AddInternalID(i int64)

AddInternalID adds i to the "internal_id" field.

func (*AppMutation) AddedEdges

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

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

func (*AppMutation) AddedField

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

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

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

func (*AppMutation) AddedIDs

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

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

func (*AppMutation) AddedInternalID

func (m *AppMutation) AddedInternalID() (r int64, exists bool)

AddedInternalID returns the value that was added to the "internal_id" field in this mutation.

func (*AppMutation) ClearEdge

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

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

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

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

func (*AppMutation) ClearedFields

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

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

func (AppMutation) Client

func (m AppMutation) 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 (*AppMutation) CreatedAt

func (m *AppMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppMutation) Description

func (m *AppMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*AppMutation) Developer

func (m *AppMutation) Developer() (r string, exists bool)

Developer returns the value of the "developer" field in the mutation.

func (*AppMutation) EdgeCleared

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

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

func (*AppMutation) Field

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

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

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

func (*AppMutation) Fields

func (m *AppMutation) 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 (*AppMutation) GetType

func (m *AppMutation) GetType() (r app.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*AppMutation) ID

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

func (m *AppMutation) 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 (*AppMutation) ImageURL

func (m *AppMutation) ImageURL() (r string, exists bool)

ImageURL returns the value of the "image_url" field in the mutation.

func (*AppMutation) InternalID

func (m *AppMutation) InternalID() (r int64, exists bool)

InternalID returns the value of the "internal_id" field in the mutation.

func (*AppMutation) Name

func (m *AppMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the App entity. If the App 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 (*AppMutation) OldDescription

func (m *AppMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the App entity. If the App 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 (*AppMutation) OldDeveloper

func (m *AppMutation) OldDeveloper(ctx context.Context) (v string, err error)

OldDeveloper returns the old "developer" field's value of the App entity. If the App 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 (*AppMutation) OldField

func (m *AppMutation) 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 (*AppMutation) OldImageURL

func (m *AppMutation) OldImageURL(ctx context.Context) (v string, err error)

OldImageURL returns the old "image_url" field's value of the App entity. If the App 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 (*AppMutation) OldInternalID

func (m *AppMutation) OldInternalID(ctx context.Context) (v int64, err error)

OldInternalID returns the old "internal_id" field's value of the App entity. If the App 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 (*AppMutation) OldName

func (m *AppMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the App entity. If the App 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 (*AppMutation) OldPublisher

func (m *AppMutation) OldPublisher(ctx context.Context) (v string, err error)

OldPublisher returns the old "publisher" field's value of the App entity. If the App 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 (*AppMutation) OldReleaseDate

func (m *AppMutation) OldReleaseDate(ctx context.Context) (v string, err error)

OldReleaseDate returns the old "release_date" field's value of the App entity. If the App 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 (*AppMutation) OldShortDescription

func (m *AppMutation) OldShortDescription(ctx context.Context) (v string, err error)

OldShortDescription returns the old "short_description" field's value of the App entity. If the App 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 (*AppMutation) OldSource

func (m *AppMutation) OldSource(ctx context.Context) (v app.Source, err error)

OldSource returns the old "source" field's value of the App entity. If the App 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 (*AppMutation) OldSourceAppID

func (m *AppMutation) OldSourceAppID(ctx context.Context) (v string, err error)

OldSourceAppID returns the old "source_app_id" field's value of the App entity. If the App 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 (*AppMutation) OldSourceURL

func (m *AppMutation) OldSourceURL(ctx context.Context) (v string, err error)

OldSourceURL returns the old "source_url" field's value of the App entity. If the App 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 (*AppMutation) OldType

func (m *AppMutation) OldType(ctx context.Context) (v app.Type, err error)

OldType returns the old "type" field's value of the App entity. If the App 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 (*AppMutation) Op

func (m *AppMutation) Op() Op

Op returns the operation name.

func (*AppMutation) Publisher

func (m *AppMutation) Publisher() (r string, exists bool)

Publisher returns the value of the "publisher" field in the mutation.

func (*AppMutation) ReleaseDate

func (m *AppMutation) ReleaseDate() (r string, exists bool)

ReleaseDate returns the value of the "release_date" field in the mutation.

func (*AppMutation) RemovedEdges

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

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

func (*AppMutation) RemovedIDs

func (m *AppMutation) 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 (*AppMutation) ResetCreatedAt

func (m *AppMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppMutation) ResetDescription

func (m *AppMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*AppMutation) ResetDeveloper

func (m *AppMutation) ResetDeveloper()

ResetDeveloper resets all changes to the "developer" field.

func (*AppMutation) ResetEdge

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

func (m *AppMutation) 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 (*AppMutation) ResetImageURL

func (m *AppMutation) ResetImageURL()

ResetImageURL resets all changes to the "image_url" field.

func (*AppMutation) ResetInternalID

func (m *AppMutation) ResetInternalID()

ResetInternalID resets all changes to the "internal_id" field.

func (*AppMutation) ResetName

func (m *AppMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppMutation) ResetPublisher

func (m *AppMutation) ResetPublisher()

ResetPublisher resets all changes to the "publisher" field.

func (*AppMutation) ResetReleaseDate

func (m *AppMutation) ResetReleaseDate()

ResetReleaseDate resets all changes to the "release_date" field.

func (*AppMutation) ResetShortDescription

func (m *AppMutation) ResetShortDescription()

ResetShortDescription resets all changes to the "short_description" field.

func (*AppMutation) ResetSource

func (m *AppMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*AppMutation) ResetSourceAppID

func (m *AppMutation) ResetSourceAppID()

ResetSourceAppID resets all changes to the "source_app_id" field.

func (*AppMutation) ResetSourceURL

func (m *AppMutation) ResetSourceURL()

ResetSourceURL resets all changes to the "source_url" field.

func (*AppMutation) ResetType

func (m *AppMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*AppMutation) SetCreatedAt

func (m *AppMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppMutation) SetDescription

func (m *AppMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*AppMutation) SetDeveloper

func (m *AppMutation) SetDeveloper(s string)

SetDeveloper sets the "developer" field.

func (*AppMutation) SetField

func (m *AppMutation) 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 (*AppMutation) SetImageURL

func (m *AppMutation) SetImageURL(s string)

SetImageURL sets the "image_url" field.

func (*AppMutation) SetInternalID

func (m *AppMutation) SetInternalID(i int64)

SetInternalID sets the "internal_id" field.

func (*AppMutation) SetName

func (m *AppMutation) SetName(s string)

SetName sets the "name" field.

func (*AppMutation) SetOp added in v0.0.4

func (m *AppMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppMutation) SetPublisher

func (m *AppMutation) SetPublisher(s string)

SetPublisher sets the "publisher" field.

func (*AppMutation) SetReleaseDate

func (m *AppMutation) SetReleaseDate(s string)

SetReleaseDate sets the "release_date" field.

func (*AppMutation) SetShortDescription

func (m *AppMutation) SetShortDescription(s string)

SetShortDescription sets the "short_description" field.

func (*AppMutation) SetSource

func (m *AppMutation) SetSource(a app.Source)

SetSource sets the "source" field.

func (*AppMutation) SetSourceAppID

func (m *AppMutation) SetSourceAppID(s string)

SetSourceAppID sets the "source_app_id" field.

func (*AppMutation) SetSourceURL

func (m *AppMutation) SetSourceURL(s string)

SetSourceURL sets the "source_url" field.

func (*AppMutation) SetType

func (m *AppMutation) SetType(a app.Type)

SetType sets the "type" field.

func (*AppMutation) ShortDescription

func (m *AppMutation) ShortDescription() (r string, exists bool)

ShortDescription returns the value of the "short_description" field in the mutation.

func (*AppMutation) Source

func (m *AppMutation) Source() (r app.Source, exists bool)

Source returns the value of the "source" field in the mutation.

func (*AppMutation) SourceAppID

func (m *AppMutation) SourceAppID() (r string, exists bool)

SourceAppID returns the value of the "source_app_id" field in the mutation.

func (*AppMutation) SourceURL

func (m *AppMutation) SourceURL() (r string, exists bool)

SourceURL returns the value of the "source_url" field in the mutation.

func (AppMutation) Tx

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

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

func (*AppMutation) Type

func (m *AppMutation) Type() string

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

func (*AppMutation) Where

func (m *AppMutation) Where(ps ...predicate.App)

Where appends a list predicates to the AppMutation builder.

func (*AppMutation) WhereP added in v0.0.4

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

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

type AppPackage added in v0.0.4

type AppPackage struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// InternalID holds the value of the "internal_id" field.
	InternalID int64 `json:"internal_id,omitempty"`
	// Source holds the value of the "source" field.
	Source apppackage.Source `json:"source,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID int64 `json:"source_id,omitempty"`
	// SourcePackageID holds the value of the "source_package_id" field.
	SourcePackageID string `json:"source_package_id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// BinaryName holds the value of the "binary_name" field.
	BinaryName string `json:"binary_name,omitempty"`
	// BinarySize holds the value of the "binary_size" field.
	BinarySize string `json:"binary_size,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

AppPackage is the model entity for the AppPackage schema.

func (*AppPackage) String added in v0.0.4

func (ap *AppPackage) String() string

String implements the fmt.Stringer.

func (*AppPackage) Unwrap added in v0.0.4

func (ap *AppPackage) Unwrap() *AppPackage

Unwrap unwraps the AppPackage 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 (*AppPackage) Update added in v0.0.4

func (ap *AppPackage) Update() *AppPackageUpdateOne

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

type AppPackageClient added in v0.0.4

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

AppPackageClient is a client for the AppPackage schema.

func NewAppPackageClient added in v0.0.4

func NewAppPackageClient(c config) *AppPackageClient

NewAppPackageClient returns a client for the AppPackage from the given config.

func (*AppPackageClient) Create added in v0.0.4

func (c *AppPackageClient) Create() *AppPackageCreate

Create returns a builder for creating a AppPackage entity.

func (*AppPackageClient) CreateBulk added in v0.0.4

func (c *AppPackageClient) CreateBulk(builders ...*AppPackageCreate) *AppPackageCreateBulk

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

func (*AppPackageClient) Delete added in v0.0.4

func (c *AppPackageClient) Delete() *AppPackageDelete

Delete returns a delete builder for AppPackage.

func (*AppPackageClient) DeleteOne added in v0.0.4

func (c *AppPackageClient) DeleteOne(ap *AppPackage) *AppPackageDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppPackageClient) DeleteOneID added in v0.0.4

func (c *AppPackageClient) DeleteOneID(id int) *AppPackageDeleteOne

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

func (*AppPackageClient) Get added in v0.0.4

func (c *AppPackageClient) Get(ctx context.Context, id int) (*AppPackage, error)

Get returns a AppPackage entity by its id.

func (*AppPackageClient) GetX added in v0.0.4

func (c *AppPackageClient) GetX(ctx context.Context, id int) *AppPackage

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

func (*AppPackageClient) Hooks added in v0.0.4

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

Hooks returns the client hooks.

func (*AppPackageClient) Intercept added in v0.0.4

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

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

func (*AppPackageClient) Interceptors added in v0.0.4

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

Interceptors returns the client interceptors.

func (*AppPackageClient) Query added in v0.0.4

func (c *AppPackageClient) Query() *AppPackageQuery

Query returns a query builder for AppPackage.

func (*AppPackageClient) Update added in v0.0.4

func (c *AppPackageClient) Update() *AppPackageUpdate

Update returns an update builder for AppPackage.

func (*AppPackageClient) UpdateOne added in v0.0.4

func (c *AppPackageClient) UpdateOne(ap *AppPackage) *AppPackageUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppPackageClient) UpdateOneID added in v0.0.4

func (c *AppPackageClient) UpdateOneID(id int) *AppPackageUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppPackageClient) Use added in v0.0.4

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

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

type AppPackageCreate added in v0.0.4

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

AppPackageCreate is the builder for creating a AppPackage entity.

func (*AppPackageCreate) Exec added in v0.0.4

func (apc *AppPackageCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPackageCreate) ExecX added in v0.0.4

func (apc *AppPackageCreate) ExecX(ctx context.Context)

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

func (*AppPackageCreate) Mutation added in v0.0.4

func (apc *AppPackageCreate) Mutation() *AppPackageMutation

Mutation returns the AppPackageMutation object of the builder.

func (*AppPackageCreate) OnConflict added in v0.0.4

func (apc *AppPackageCreate) OnConflict(opts ...sql.ConflictOption) *AppPackageUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppPackage.Create().
	SetInternalID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppPackageUpsert) {
		SetInternalID(v+v).
	}).
	Exec(ctx)

func (*AppPackageCreate) OnConflictColumns added in v0.0.4

func (apc *AppPackageCreate) OnConflictColumns(columns ...string) *AppPackageUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppPackage.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppPackageCreate) Save added in v0.0.4

func (apc *AppPackageCreate) Save(ctx context.Context) (*AppPackage, error)

Save creates the AppPackage in the database.

func (*AppPackageCreate) SaveX added in v0.0.4

func (apc *AppPackageCreate) SaveX(ctx context.Context) *AppPackage

SaveX calls Save and panics if Save returns an error.

func (*AppPackageCreate) SetBinaryName added in v0.0.4

func (apc *AppPackageCreate) SetBinaryName(s string) *AppPackageCreate

SetBinaryName sets the "binary_name" field.

func (*AppPackageCreate) SetBinarySize added in v0.0.4

func (apc *AppPackageCreate) SetBinarySize(s string) *AppPackageCreate

SetBinarySize sets the "binary_size" field.

func (*AppPackageCreate) SetCreatedAt added in v0.0.4

func (apc *AppPackageCreate) SetCreatedAt(t time.Time) *AppPackageCreate

SetCreatedAt sets the "created_at" field.

func (*AppPackageCreate) SetDescription added in v0.0.4

func (apc *AppPackageCreate) SetDescription(s string) *AppPackageCreate

SetDescription sets the "description" field.

func (*AppPackageCreate) SetInternalID added in v0.0.4

func (apc *AppPackageCreate) SetInternalID(i int64) *AppPackageCreate

SetInternalID sets the "internal_id" field.

func (*AppPackageCreate) SetName added in v0.0.4

func (apc *AppPackageCreate) SetName(s string) *AppPackageCreate

SetName sets the "name" field.

func (*AppPackageCreate) SetNillableCreatedAt added in v0.0.4

func (apc *AppPackageCreate) SetNillableCreatedAt(t *time.Time) *AppPackageCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppPackageCreate) SetSource added in v0.0.4

SetSource sets the "source" field.

func (*AppPackageCreate) SetSourceID added in v0.0.4

func (apc *AppPackageCreate) SetSourceID(i int64) *AppPackageCreate

SetSourceID sets the "source_id" field.

func (*AppPackageCreate) SetSourcePackageID added in v0.0.4

func (apc *AppPackageCreate) SetSourcePackageID(s string) *AppPackageCreate

SetSourcePackageID sets the "source_package_id" field.

func (*AppPackageCreate) SetUpdatedAt added in v0.0.4

func (apc *AppPackageCreate) SetUpdatedAt(t time.Time) *AppPackageCreate

SetUpdatedAt sets the "updated_at" field.

type AppPackageCreateBulk added in v0.0.4

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

AppPackageCreateBulk is the builder for creating many AppPackage entities in bulk.

func (*AppPackageCreateBulk) Exec added in v0.0.4

func (apcb *AppPackageCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPackageCreateBulk) ExecX added in v0.0.4

func (apcb *AppPackageCreateBulk) ExecX(ctx context.Context)

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

func (*AppPackageCreateBulk) OnConflict added in v0.0.4

func (apcb *AppPackageCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppPackageUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppPackage.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppPackageUpsert) {
		SetInternalID(v+v).
	}).
	Exec(ctx)

func (*AppPackageCreateBulk) OnConflictColumns added in v0.0.4

func (apcb *AppPackageCreateBulk) OnConflictColumns(columns ...string) *AppPackageUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppPackage.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppPackageCreateBulk) Save added in v0.0.4

func (apcb *AppPackageCreateBulk) Save(ctx context.Context) ([]*AppPackage, error)

Save creates the AppPackage entities in the database.

func (*AppPackageCreateBulk) SaveX added in v0.0.4

func (apcb *AppPackageCreateBulk) SaveX(ctx context.Context) []*AppPackage

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

type AppPackageDelete added in v0.0.4

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

AppPackageDelete is the builder for deleting a AppPackage entity.

func (*AppPackageDelete) Exec added in v0.0.4

func (apd *AppPackageDelete) Exec(ctx context.Context) (int, error)

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

func (*AppPackageDelete) ExecX added in v0.0.4

func (apd *AppPackageDelete) ExecX(ctx context.Context) int

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

func (*AppPackageDelete) Where added in v0.0.4

Where appends a list predicates to the AppPackageDelete builder.

type AppPackageDeleteOne added in v0.0.4

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

AppPackageDeleteOne is the builder for deleting a single AppPackage entity.

func (*AppPackageDeleteOne) Exec added in v0.0.4

func (apdo *AppPackageDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppPackageDeleteOne) ExecX added in v0.0.4

func (apdo *AppPackageDeleteOne) ExecX(ctx context.Context)

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

func (*AppPackageDeleteOne) Where added in v0.0.4

Where appends a list predicates to the AppPackageDelete builder.

type AppPackageGroupBy added in v0.0.4

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

AppPackageGroupBy is the group-by builder for AppPackage entities.

func (*AppPackageGroupBy) Aggregate added in v0.0.4

func (apgb *AppPackageGroupBy) Aggregate(fns ...AggregateFunc) *AppPackageGroupBy

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

func (*AppPackageGroupBy) Bool added in v0.0.4

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

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

func (*AppPackageGroupBy) BoolX added in v0.0.4

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

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

func (*AppPackageGroupBy) Bools added in v0.0.4

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

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

func (*AppPackageGroupBy) BoolsX added in v0.0.4

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

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

func (*AppPackageGroupBy) Float64 added in v0.0.4

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

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

func (*AppPackageGroupBy) Float64X added in v0.0.4

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

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

func (*AppPackageGroupBy) Float64s added in v0.0.4

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

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

func (*AppPackageGroupBy) Float64sX added in v0.0.4

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

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

func (*AppPackageGroupBy) Int added in v0.0.4

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

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

func (*AppPackageGroupBy) IntX added in v0.0.4

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

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

func (*AppPackageGroupBy) Ints added in v0.0.4

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

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

func (*AppPackageGroupBy) IntsX added in v0.0.4

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

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

func (*AppPackageGroupBy) Scan added in v0.0.4

func (apgb *AppPackageGroupBy) Scan(ctx context.Context, v any) error

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

func (*AppPackageGroupBy) ScanX added in v0.0.4

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

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

func (*AppPackageGroupBy) String added in v0.0.4

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

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

func (*AppPackageGroupBy) StringX added in v0.0.4

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

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

func (*AppPackageGroupBy) Strings added in v0.0.4

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

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

func (*AppPackageGroupBy) StringsX added in v0.0.4

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

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

type AppPackageMutation added in v0.0.4

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

AppPackageMutation represents an operation that mutates the AppPackage nodes in the graph.

func (*AppPackageMutation) AddField added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) AddInternalID added in v0.0.4

func (m *AppPackageMutation) AddInternalID(i int64)

AddInternalID adds i to the "internal_id" field.

func (*AppPackageMutation) AddSourceID added in v0.0.4

func (m *AppPackageMutation) AddSourceID(i int64)

AddSourceID adds i to the "source_id" field.

func (*AppPackageMutation) AddedEdges added in v0.0.4

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

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

func (*AppPackageMutation) AddedField added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) AddedFields added in v0.0.4

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

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

func (*AppPackageMutation) AddedIDs added in v0.0.4

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

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

func (*AppPackageMutation) AddedInternalID added in v0.0.4

func (m *AppPackageMutation) AddedInternalID() (r int64, exists bool)

AddedInternalID returns the value that was added to the "internal_id" field in this mutation.

func (*AppPackageMutation) AddedSourceID added in v0.0.4

func (m *AppPackageMutation) AddedSourceID() (r int64, exists bool)

AddedSourceID returns the value that was added to the "source_id" field in this mutation.

func (*AppPackageMutation) BinaryName added in v0.0.4

func (m *AppPackageMutation) BinaryName() (r string, exists bool)

BinaryName returns the value of the "binary_name" field in the mutation.

func (*AppPackageMutation) BinarySize added in v0.0.4

func (m *AppPackageMutation) BinarySize() (r string, exists bool)

BinarySize returns the value of the "binary_size" field in the mutation.

func (*AppPackageMutation) ClearEdge added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) ClearField added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) ClearedEdges added in v0.0.4

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

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

func (*AppPackageMutation) ClearedFields added in v0.0.4

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

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

func (AppPackageMutation) Client added in v0.0.4

func (m AppPackageMutation) 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 (*AppPackageMutation) CreatedAt added in v0.0.4

func (m *AppPackageMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppPackageMutation) Description added in v0.0.4

func (m *AppPackageMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*AppPackageMutation) EdgeCleared added in v0.0.4

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

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

func (*AppPackageMutation) Field added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) FieldCleared added in v0.0.4

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

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

func (*AppPackageMutation) Fields added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) ID added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) IDs added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) InternalID added in v0.0.4

func (m *AppPackageMutation) InternalID() (r int64, exists bool)

InternalID returns the value of the "internal_id" field in the mutation.

func (*AppPackageMutation) Name added in v0.0.4

func (m *AppPackageMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppPackageMutation) OldBinaryName added in v0.0.4

func (m *AppPackageMutation) OldBinaryName(ctx context.Context) (v string, err error)

OldBinaryName returns the old "binary_name" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldBinarySize added in v0.0.4

func (m *AppPackageMutation) OldBinarySize(ctx context.Context) (v string, err error)

OldBinarySize returns the old "binary_size" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldCreatedAt added in v0.0.4

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

OldCreatedAt returns the old "created_at" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldDescription added in v0.0.4

func (m *AppPackageMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldField added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) OldInternalID added in v0.0.4

func (m *AppPackageMutation) OldInternalID(ctx context.Context) (v int64, err error)

OldInternalID returns the old "internal_id" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldName added in v0.0.4

func (m *AppPackageMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldSource added in v0.0.4

func (m *AppPackageMutation) OldSource(ctx context.Context) (v apppackage.Source, err error)

OldSource returns the old "source" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldSourceID added in v0.0.4

func (m *AppPackageMutation) OldSourceID(ctx context.Context) (v int64, err error)

OldSourceID returns the old "source_id" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldSourcePackageID added in v0.0.4

func (m *AppPackageMutation) OldSourcePackageID(ctx context.Context) (v string, err error)

OldSourcePackageID returns the old "source_package_id" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldUpdatedAt added in v0.0.4

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

OldUpdatedAt returns the old "updated_at" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) Op added in v0.0.4

func (m *AppPackageMutation) Op() Op

Op returns the operation name.

func (*AppPackageMutation) RemovedEdges added in v0.0.4

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

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

func (*AppPackageMutation) RemovedIDs added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) ResetBinaryName added in v0.0.4

func (m *AppPackageMutation) ResetBinaryName()

ResetBinaryName resets all changes to the "binary_name" field.

func (*AppPackageMutation) ResetBinarySize added in v0.0.4

func (m *AppPackageMutation) ResetBinarySize()

ResetBinarySize resets all changes to the "binary_size" field.

func (*AppPackageMutation) ResetCreatedAt added in v0.0.4

func (m *AppPackageMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppPackageMutation) ResetDescription added in v0.0.4

func (m *AppPackageMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*AppPackageMutation) ResetEdge added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) ResetField added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) ResetInternalID added in v0.0.4

func (m *AppPackageMutation) ResetInternalID()

ResetInternalID resets all changes to the "internal_id" field.

func (*AppPackageMutation) ResetName added in v0.0.4

func (m *AppPackageMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppPackageMutation) ResetSource added in v0.0.4

func (m *AppPackageMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*AppPackageMutation) ResetSourceID added in v0.0.4

func (m *AppPackageMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*AppPackageMutation) ResetSourcePackageID added in v0.0.4

func (m *AppPackageMutation) ResetSourcePackageID()

ResetSourcePackageID resets all changes to the "source_package_id" field.

func (*AppPackageMutation) ResetUpdatedAt added in v0.0.4

func (m *AppPackageMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppPackageMutation) SetBinaryName added in v0.0.4

func (m *AppPackageMutation) SetBinaryName(s string)

SetBinaryName sets the "binary_name" field.

func (*AppPackageMutation) SetBinarySize added in v0.0.4

func (m *AppPackageMutation) SetBinarySize(s string)

SetBinarySize sets the "binary_size" field.

func (*AppPackageMutation) SetCreatedAt added in v0.0.4

func (m *AppPackageMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppPackageMutation) SetDescription added in v0.0.4

func (m *AppPackageMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*AppPackageMutation) SetField added in v0.0.4

func (m *AppPackageMutation) 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 (*AppPackageMutation) SetInternalID added in v0.0.4

func (m *AppPackageMutation) SetInternalID(i int64)

SetInternalID sets the "internal_id" field.

func (*AppPackageMutation) SetName added in v0.0.4

func (m *AppPackageMutation) SetName(s string)

SetName sets the "name" field.

func (*AppPackageMutation) SetOp added in v0.0.4

func (m *AppPackageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppPackageMutation) SetSource added in v0.0.4

func (m *AppPackageMutation) SetSource(a apppackage.Source)

SetSource sets the "source" field.

func (*AppPackageMutation) SetSourceID added in v0.0.4

func (m *AppPackageMutation) SetSourceID(i int64)

SetSourceID sets the "source_id" field.

func (*AppPackageMutation) SetSourcePackageID added in v0.0.4

func (m *AppPackageMutation) SetSourcePackageID(s string)

SetSourcePackageID sets the "source_package_id" field.

func (*AppPackageMutation) SetUpdatedAt added in v0.0.4

func (m *AppPackageMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppPackageMutation) Source added in v0.0.4

func (m *AppPackageMutation) Source() (r apppackage.Source, exists bool)

Source returns the value of the "source" field in the mutation.

func (*AppPackageMutation) SourceID added in v0.0.4

func (m *AppPackageMutation) SourceID() (r int64, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*AppPackageMutation) SourcePackageID added in v0.0.4

func (m *AppPackageMutation) SourcePackageID() (r string, exists bool)

SourcePackageID returns the value of the "source_package_id" field in the mutation.

func (AppPackageMutation) Tx added in v0.0.4

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

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

func (*AppPackageMutation) Type added in v0.0.4

func (m *AppPackageMutation) Type() string

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

func (*AppPackageMutation) UpdatedAt added in v0.0.4

func (m *AppPackageMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppPackageMutation) Where added in v0.0.4

func (m *AppPackageMutation) Where(ps ...predicate.AppPackage)

Where appends a list predicates to the AppPackageMutation builder.

func (*AppPackageMutation) WhereP added in v0.0.4

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

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

type AppPackageQuery added in v0.0.4

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

AppPackageQuery is the builder for querying AppPackage entities.

func (*AppPackageQuery) Aggregate added in v0.0.4

func (apq *AppPackageQuery) Aggregate(fns ...AggregateFunc) *AppPackageSelect

Aggregate returns a AppPackageSelect configured with the given aggregations.

func (*AppPackageQuery) All added in v0.0.4

func (apq *AppPackageQuery) All(ctx context.Context) ([]*AppPackage, error)

All executes the query and returns a list of AppPackages.

func (*AppPackageQuery) AllX added in v0.0.4

func (apq *AppPackageQuery) AllX(ctx context.Context) []*AppPackage

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

func (*AppPackageQuery) Clone added in v0.0.4

func (apq *AppPackageQuery) Clone() *AppPackageQuery

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

func (*AppPackageQuery) Count added in v0.0.4

func (apq *AppPackageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppPackageQuery) CountX added in v0.0.4

func (apq *AppPackageQuery) CountX(ctx context.Context) int

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

func (*AppPackageQuery) Exist added in v0.0.4

func (apq *AppPackageQuery) Exist(ctx context.Context) (bool, error)

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

func (*AppPackageQuery) ExistX added in v0.0.4

func (apq *AppPackageQuery) ExistX(ctx context.Context) bool

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

func (*AppPackageQuery) First added in v0.0.4

func (apq *AppPackageQuery) First(ctx context.Context) (*AppPackage, error)

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

func (*AppPackageQuery) FirstID added in v0.0.4

func (apq *AppPackageQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*AppPackageQuery) FirstIDX added in v0.0.4

func (apq *AppPackageQuery) FirstIDX(ctx context.Context) int

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

func (*AppPackageQuery) FirstX added in v0.0.4

func (apq *AppPackageQuery) FirstX(ctx context.Context) *AppPackage

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

func (*AppPackageQuery) GroupBy added in v0.0.4

func (apq *AppPackageQuery) GroupBy(field string, fields ...string) *AppPackageGroupBy

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

client.AppPackage.Query().
	GroupBy(apppackage.FieldInternalID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppPackageQuery) IDs added in v0.0.4

func (apq *AppPackageQuery) IDs(ctx context.Context) ([]int, error)

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

func (*AppPackageQuery) IDsX added in v0.0.4

func (apq *AppPackageQuery) IDsX(ctx context.Context) []int

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

func (*AppPackageQuery) Limit added in v0.0.4

func (apq *AppPackageQuery) Limit(limit int) *AppPackageQuery

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

func (*AppPackageQuery) Offset added in v0.0.4

func (apq *AppPackageQuery) Offset(offset int) *AppPackageQuery

Offset to start from.

func (*AppPackageQuery) Only added in v0.0.4

func (apq *AppPackageQuery) Only(ctx context.Context) (*AppPackage, error)

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

func (*AppPackageQuery) OnlyID added in v0.0.4

func (apq *AppPackageQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*AppPackageQuery) OnlyIDX added in v0.0.4

func (apq *AppPackageQuery) OnlyIDX(ctx context.Context) int

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

func (*AppPackageQuery) OnlyX added in v0.0.4

func (apq *AppPackageQuery) OnlyX(ctx context.Context) *AppPackage

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

func (*AppPackageQuery) Order added in v0.0.4

func (apq *AppPackageQuery) Order(o ...OrderFunc) *AppPackageQuery

Order specifies how the records should be ordered.

func (*AppPackageQuery) Select added in v0.0.4

func (apq *AppPackageQuery) Select(fields ...string) *AppPackageSelect

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

client.AppPackage.Query().
	Select(apppackage.FieldInternalID).
	Scan(ctx, &v)

func (*AppPackageQuery) Unique added in v0.0.4

func (apq *AppPackageQuery) Unique(unique bool) *AppPackageQuery

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 (*AppPackageQuery) Where added in v0.0.4

Where adds a new predicate for the AppPackageQuery builder.

type AppPackageSelect added in v0.0.4

type AppPackageSelect struct {
	*AppPackageQuery
	// contains filtered or unexported fields
}

AppPackageSelect is the builder for selecting fields of AppPackage entities.

func (*AppPackageSelect) Aggregate added in v0.0.4

func (aps *AppPackageSelect) Aggregate(fns ...AggregateFunc) *AppPackageSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppPackageSelect) Bool added in v0.0.4

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

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

func (*AppPackageSelect) BoolX added in v0.0.4

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

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

func (*AppPackageSelect) Bools added in v0.0.4

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

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

func (*AppPackageSelect) BoolsX added in v0.0.4

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

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

func (*AppPackageSelect) Float64 added in v0.0.4

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

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

func (*AppPackageSelect) Float64X added in v0.0.4

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

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

func (*AppPackageSelect) Float64s added in v0.0.4

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

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

func (*AppPackageSelect) Float64sX added in v0.0.4

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

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

func (*AppPackageSelect) Int added in v0.0.4

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

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

func (*AppPackageSelect) IntX added in v0.0.4

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

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

func (*AppPackageSelect) Ints added in v0.0.4

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

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

func (*AppPackageSelect) IntsX added in v0.0.4

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

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

func (*AppPackageSelect) Scan added in v0.0.4

func (aps *AppPackageSelect) Scan(ctx context.Context, v any) error

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

func (*AppPackageSelect) ScanX added in v0.0.4

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

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

func (*AppPackageSelect) String added in v0.0.4

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

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

func (*AppPackageSelect) StringX added in v0.0.4

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

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

func (*AppPackageSelect) Strings added in v0.0.4

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

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

func (*AppPackageSelect) StringsX added in v0.0.4

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

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

type AppPackageUpdate added in v0.0.4

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

AppPackageUpdate is the builder for updating AppPackage entities.

func (*AppPackageUpdate) AddInternalID added in v0.0.4

func (apu *AppPackageUpdate) AddInternalID(i int64) *AppPackageUpdate

AddInternalID adds i to the "internal_id" field.

func (*AppPackageUpdate) AddSourceID added in v0.0.4

func (apu *AppPackageUpdate) AddSourceID(i int64) *AppPackageUpdate

AddSourceID adds i to the "source_id" field.

func (*AppPackageUpdate) Exec added in v0.0.4

func (apu *AppPackageUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPackageUpdate) ExecX added in v0.0.4

func (apu *AppPackageUpdate) ExecX(ctx context.Context)

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

func (*AppPackageUpdate) Mutation added in v0.0.4

func (apu *AppPackageUpdate) Mutation() *AppPackageMutation

Mutation returns the AppPackageMutation object of the builder.

func (*AppPackageUpdate) Save added in v0.0.4

func (apu *AppPackageUpdate) Save(ctx context.Context) (int, error)

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

func (*AppPackageUpdate) SaveX added in v0.0.4

func (apu *AppPackageUpdate) SaveX(ctx context.Context) int

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

func (*AppPackageUpdate) SetBinaryName added in v0.0.4

func (apu *AppPackageUpdate) SetBinaryName(s string) *AppPackageUpdate

SetBinaryName sets the "binary_name" field.

func (*AppPackageUpdate) SetBinarySize added in v0.0.4

func (apu *AppPackageUpdate) SetBinarySize(s string) *AppPackageUpdate

SetBinarySize sets the "binary_size" field.

func (*AppPackageUpdate) SetCreatedAt added in v0.0.4

func (apu *AppPackageUpdate) SetCreatedAt(t time.Time) *AppPackageUpdate

SetCreatedAt sets the "created_at" field.

func (*AppPackageUpdate) SetDescription added in v0.0.4

func (apu *AppPackageUpdate) SetDescription(s string) *AppPackageUpdate

SetDescription sets the "description" field.

func (*AppPackageUpdate) SetInternalID added in v0.0.4

func (apu *AppPackageUpdate) SetInternalID(i int64) *AppPackageUpdate

SetInternalID sets the "internal_id" field.

func (*AppPackageUpdate) SetName added in v0.0.4

func (apu *AppPackageUpdate) SetName(s string) *AppPackageUpdate

SetName sets the "name" field.

func (*AppPackageUpdate) SetNillableCreatedAt added in v0.0.4

func (apu *AppPackageUpdate) SetNillableCreatedAt(t *time.Time) *AppPackageUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppPackageUpdate) SetSource added in v0.0.4

SetSource sets the "source" field.

func (*AppPackageUpdate) SetSourceID added in v0.0.4

func (apu *AppPackageUpdate) SetSourceID(i int64) *AppPackageUpdate

SetSourceID sets the "source_id" field.

func (*AppPackageUpdate) SetSourcePackageID added in v0.0.4

func (apu *AppPackageUpdate) SetSourcePackageID(s string) *AppPackageUpdate

SetSourcePackageID sets the "source_package_id" field.

func (*AppPackageUpdate) SetUpdatedAt added in v0.0.4

func (apu *AppPackageUpdate) SetUpdatedAt(t time.Time) *AppPackageUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppPackageUpdate) Where added in v0.0.4

Where appends a list predicates to the AppPackageUpdate builder.

type AppPackageUpdateOne added in v0.0.4

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

AppPackageUpdateOne is the builder for updating a single AppPackage entity.

func (*AppPackageUpdateOne) AddInternalID added in v0.0.4

func (apuo *AppPackageUpdateOne) AddInternalID(i int64) *AppPackageUpdateOne

AddInternalID adds i to the "internal_id" field.

func (*AppPackageUpdateOne) AddSourceID added in v0.0.4

func (apuo *AppPackageUpdateOne) AddSourceID(i int64) *AppPackageUpdateOne

AddSourceID adds i to the "source_id" field.

func (*AppPackageUpdateOne) Exec added in v0.0.4

func (apuo *AppPackageUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppPackageUpdateOne) ExecX added in v0.0.4

func (apuo *AppPackageUpdateOne) ExecX(ctx context.Context)

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

func (*AppPackageUpdateOne) Mutation added in v0.0.4

func (apuo *AppPackageUpdateOne) Mutation() *AppPackageMutation

Mutation returns the AppPackageMutation object of the builder.

func (*AppPackageUpdateOne) Save added in v0.0.4

func (apuo *AppPackageUpdateOne) Save(ctx context.Context) (*AppPackage, error)

Save executes the query and returns the updated AppPackage entity.

func (*AppPackageUpdateOne) SaveX added in v0.0.4

func (apuo *AppPackageUpdateOne) SaveX(ctx context.Context) *AppPackage

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

func (*AppPackageUpdateOne) Select added in v0.0.4

func (apuo *AppPackageUpdateOne) Select(field string, fields ...string) *AppPackageUpdateOne

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

func (*AppPackageUpdateOne) SetBinaryName added in v0.0.4

func (apuo *AppPackageUpdateOne) SetBinaryName(s string) *AppPackageUpdateOne

SetBinaryName sets the "binary_name" field.

func (*AppPackageUpdateOne) SetBinarySize added in v0.0.4

func (apuo *AppPackageUpdateOne) SetBinarySize(s string) *AppPackageUpdateOne

SetBinarySize sets the "binary_size" field.

func (*AppPackageUpdateOne) SetCreatedAt added in v0.0.4

func (apuo *AppPackageUpdateOne) SetCreatedAt(t time.Time) *AppPackageUpdateOne

SetCreatedAt sets the "created_at" field.

func (*AppPackageUpdateOne) SetDescription added in v0.0.4

func (apuo *AppPackageUpdateOne) SetDescription(s string) *AppPackageUpdateOne

SetDescription sets the "description" field.

func (*AppPackageUpdateOne) SetInternalID added in v0.0.4

func (apuo *AppPackageUpdateOne) SetInternalID(i int64) *AppPackageUpdateOne

SetInternalID sets the "internal_id" field.

func (*AppPackageUpdateOne) SetName added in v0.0.4

SetName sets the "name" field.

func (*AppPackageUpdateOne) SetNillableCreatedAt added in v0.0.4

func (apuo *AppPackageUpdateOne) SetNillableCreatedAt(t *time.Time) *AppPackageUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppPackageUpdateOne) SetSource added in v0.0.4

SetSource sets the "source" field.

func (*AppPackageUpdateOne) SetSourceID added in v0.0.4

func (apuo *AppPackageUpdateOne) SetSourceID(i int64) *AppPackageUpdateOne

SetSourceID sets the "source_id" field.

func (*AppPackageUpdateOne) SetSourcePackageID added in v0.0.4

func (apuo *AppPackageUpdateOne) SetSourcePackageID(s string) *AppPackageUpdateOne

SetSourcePackageID sets the "source_package_id" field.

func (*AppPackageUpdateOne) SetUpdatedAt added in v0.0.4

func (apuo *AppPackageUpdateOne) SetUpdatedAt(t time.Time) *AppPackageUpdateOne

SetUpdatedAt sets the "updated_at" field.

type AppPackageUpsert added in v0.0.4

type AppPackageUpsert struct {
	*sql.UpdateSet
}

AppPackageUpsert is the "OnConflict" setter.

func (*AppPackageUpsert) AddInternalID added in v0.0.4

func (u *AppPackageUpsert) AddInternalID(v int64) *AppPackageUpsert

AddInternalID adds v to the "internal_id" field.

func (*AppPackageUpsert) AddSourceID added in v0.0.4

func (u *AppPackageUpsert) AddSourceID(v int64) *AppPackageUpsert

AddSourceID adds v to the "source_id" field.

func (*AppPackageUpsert) SetBinaryName added in v0.0.4

func (u *AppPackageUpsert) SetBinaryName(v string) *AppPackageUpsert

SetBinaryName sets the "binary_name" field.

func (*AppPackageUpsert) SetBinarySize added in v0.0.4

func (u *AppPackageUpsert) SetBinarySize(v string) *AppPackageUpsert

SetBinarySize sets the "binary_size" field.

func (*AppPackageUpsert) SetCreatedAt added in v0.0.4

func (u *AppPackageUpsert) SetCreatedAt(v time.Time) *AppPackageUpsert

SetCreatedAt sets the "created_at" field.

func (*AppPackageUpsert) SetDescription added in v0.0.4

func (u *AppPackageUpsert) SetDescription(v string) *AppPackageUpsert

SetDescription sets the "description" field.

func (*AppPackageUpsert) SetInternalID added in v0.0.4

func (u *AppPackageUpsert) SetInternalID(v int64) *AppPackageUpsert

SetInternalID sets the "internal_id" field.

func (*AppPackageUpsert) SetName added in v0.0.4

func (u *AppPackageUpsert) SetName(v string) *AppPackageUpsert

SetName sets the "name" field.

func (*AppPackageUpsert) SetSource added in v0.0.4

SetSource sets the "source" field.

func (*AppPackageUpsert) SetSourceID added in v0.0.4

func (u *AppPackageUpsert) SetSourceID(v int64) *AppPackageUpsert

SetSourceID sets the "source_id" field.

func (*AppPackageUpsert) SetSourcePackageID added in v0.0.4

func (u *AppPackageUpsert) SetSourcePackageID(v string) *AppPackageUpsert

SetSourcePackageID sets the "source_package_id" field.

func (*AppPackageUpsert) SetUpdatedAt added in v0.0.4

func (u *AppPackageUpsert) SetUpdatedAt(v time.Time) *AppPackageUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppPackageUpsert) UpdateBinaryName added in v0.0.4

func (u *AppPackageUpsert) UpdateBinaryName() *AppPackageUpsert

UpdateBinaryName sets the "binary_name" field to the value that was provided on create.

func (*AppPackageUpsert) UpdateBinarySize added in v0.0.4

func (u *AppPackageUpsert) UpdateBinarySize() *AppPackageUpsert

UpdateBinarySize sets the "binary_size" field to the value that was provided on create.

func (*AppPackageUpsert) UpdateCreatedAt added in v0.0.4

func (u *AppPackageUpsert) UpdateCreatedAt() *AppPackageUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*AppPackageUpsert) UpdateDescription added in v0.0.4

func (u *AppPackageUpsert) UpdateDescription() *AppPackageUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*AppPackageUpsert) UpdateInternalID added in v0.0.4

func (u *AppPackageUpsert) UpdateInternalID() *AppPackageUpsert

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*AppPackageUpsert) UpdateName added in v0.0.4

func (u *AppPackageUpsert) UpdateName() *AppPackageUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppPackageUpsert) UpdateSource added in v0.0.4

func (u *AppPackageUpsert) UpdateSource() *AppPackageUpsert

UpdateSource sets the "source" field to the value that was provided on create.

func (*AppPackageUpsert) UpdateSourceID added in v0.0.4

func (u *AppPackageUpsert) UpdateSourceID() *AppPackageUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*AppPackageUpsert) UpdateSourcePackageID added in v0.0.4

func (u *AppPackageUpsert) UpdateSourcePackageID() *AppPackageUpsert

UpdateSourcePackageID sets the "source_package_id" field to the value that was provided on create.

func (*AppPackageUpsert) UpdateUpdatedAt added in v0.0.4

func (u *AppPackageUpsert) UpdateUpdatedAt() *AppPackageUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type AppPackageUpsertBulk added in v0.0.4

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

AppPackageUpsertBulk is the builder for "upsert"-ing a bulk of AppPackage nodes.

func (*AppPackageUpsertBulk) AddInternalID added in v0.0.4

func (u *AppPackageUpsertBulk) AddInternalID(v int64) *AppPackageUpsertBulk

AddInternalID adds v to the "internal_id" field.

func (*AppPackageUpsertBulk) AddSourceID added in v0.0.4

func (u *AppPackageUpsertBulk) AddSourceID(v int64) *AppPackageUpsertBulk

AddSourceID adds v to the "source_id" field.

func (*AppPackageUpsertBulk) DoNothing added in v0.0.4

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

func (*AppPackageUpsertBulk) Exec added in v0.0.4

Exec executes the query.

func (*AppPackageUpsertBulk) ExecX added in v0.0.4

func (u *AppPackageUpsertBulk) ExecX(ctx context.Context)

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

func (*AppPackageUpsertBulk) Ignore added in v0.0.4

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppPackage.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppPackageUpsertBulk) SetBinaryName added in v0.0.4

func (u *AppPackageUpsertBulk) SetBinaryName(v string) *AppPackageUpsertBulk

SetBinaryName sets the "binary_name" field.

func (*AppPackageUpsertBulk) SetBinarySize added in v0.0.4

func (u *AppPackageUpsertBulk) SetBinarySize(v string) *AppPackageUpsertBulk

SetBinarySize sets the "binary_size" field.

func (*AppPackageUpsertBulk) SetCreatedAt added in v0.0.4

func (u *AppPackageUpsertBulk) SetCreatedAt(v time.Time) *AppPackageUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*AppPackageUpsertBulk) SetDescription added in v0.0.4

func (u *AppPackageUpsertBulk) SetDescription(v string) *AppPackageUpsertBulk

SetDescription sets the "description" field.

func (*AppPackageUpsertBulk) SetInternalID added in v0.0.4

func (u *AppPackageUpsertBulk) SetInternalID(v int64) *AppPackageUpsertBulk

SetInternalID sets the "internal_id" field.

func (*AppPackageUpsertBulk) SetName added in v0.0.4

SetName sets the "name" field.

func (*AppPackageUpsertBulk) SetSource added in v0.0.4

SetSource sets the "source" field.

func (*AppPackageUpsertBulk) SetSourceID added in v0.0.4

func (u *AppPackageUpsertBulk) SetSourceID(v int64) *AppPackageUpsertBulk

SetSourceID sets the "source_id" field.

func (*AppPackageUpsertBulk) SetSourcePackageID added in v0.0.4

func (u *AppPackageUpsertBulk) SetSourcePackageID(v string) *AppPackageUpsertBulk

SetSourcePackageID sets the "source_package_id" field.

func (*AppPackageUpsertBulk) SetUpdatedAt added in v0.0.4

func (u *AppPackageUpsertBulk) SetUpdatedAt(v time.Time) *AppPackageUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AppPackageUpsertBulk) Update added in v0.0.4

Update allows overriding fields `UPDATE` values. See the AppPackageCreateBulk.OnConflict documentation for more info.

func (*AppPackageUpsertBulk) UpdateBinaryName added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateBinaryName() *AppPackageUpsertBulk

UpdateBinaryName sets the "binary_name" field to the value that was provided on create.

func (*AppPackageUpsertBulk) UpdateBinarySize added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateBinarySize() *AppPackageUpsertBulk

UpdateBinarySize sets the "binary_size" field to the value that was provided on create.

func (*AppPackageUpsertBulk) UpdateCreatedAt added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateCreatedAt() *AppPackageUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*AppPackageUpsertBulk) UpdateDescription added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateDescription() *AppPackageUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*AppPackageUpsertBulk) UpdateInternalID added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateInternalID() *AppPackageUpsertBulk

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*AppPackageUpsertBulk) UpdateName added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateName() *AppPackageUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AppPackageUpsertBulk) UpdateNewValues added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateNewValues() *AppPackageUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppPackage.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*AppPackageUpsertBulk) UpdateSource added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateSource() *AppPackageUpsertBulk

UpdateSource sets the "source" field to the value that was provided on create.

func (*AppPackageUpsertBulk) UpdateSourceID added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateSourceID() *AppPackageUpsertBulk

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*AppPackageUpsertBulk) UpdateSourcePackageID added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateSourcePackageID() *AppPackageUpsertBulk

UpdateSourcePackageID sets the "source_package_id" field to the value that was provided on create.

func (*AppPackageUpsertBulk) UpdateUpdatedAt added in v0.0.4

func (u *AppPackageUpsertBulk) UpdateUpdatedAt() *AppPackageUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type AppPackageUpsertOne added in v0.0.4

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

AppPackageUpsertOne is the builder for "upsert"-ing

one AppPackage node.

func (*AppPackageUpsertOne) AddInternalID added in v0.0.4

func (u *AppPackageUpsertOne) AddInternalID(v int64) *AppPackageUpsertOne

AddInternalID adds v to the "internal_id" field.

func (*AppPackageUpsertOne) AddSourceID added in v0.0.4

func (u *AppPackageUpsertOne) AddSourceID(v int64) *AppPackageUpsertOne

AddSourceID adds v to the "source_id" field.

func (*AppPackageUpsertOne) DoNothing added in v0.0.4

func (u *AppPackageUpsertOne) DoNothing() *AppPackageUpsertOne

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

func (*AppPackageUpsertOne) Exec added in v0.0.4

Exec executes the query.

func (*AppPackageUpsertOne) ExecX added in v0.0.4

func (u *AppPackageUpsertOne) ExecX(ctx context.Context)

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

func (*AppPackageUpsertOne) ID added in v0.0.4

func (u *AppPackageUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppPackageUpsertOne) IDX added in v0.0.4

func (u *AppPackageUpsertOne) IDX(ctx context.Context) int

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

func (*AppPackageUpsertOne) Ignore added in v0.0.4

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppPackage.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppPackageUpsertOne) SetBinaryName added in v0.0.4

func (u *AppPackageUpsertOne) SetBinaryName(v string) *AppPackageUpsertOne

SetBinaryName sets the "binary_name" field.

func (*AppPackageUpsertOne) SetBinarySize added in v0.0.4

func (u *AppPackageUpsertOne) SetBinarySize(v string) *AppPackageUpsertOne

SetBinarySize sets the "binary_size" field.

func (*AppPackageUpsertOne) SetCreatedAt added in v0.0.4

func (u *AppPackageUpsertOne) SetCreatedAt(v time.Time) *AppPackageUpsertOne

SetCreatedAt sets the "created_at" field.

func (*AppPackageUpsertOne) SetDescription added in v0.0.4

func (u *AppPackageUpsertOne) SetDescription(v string) *AppPackageUpsertOne

SetDescription sets the "description" field.

func (*AppPackageUpsertOne) SetInternalID added in v0.0.4

func (u *AppPackageUpsertOne) SetInternalID(v int64) *AppPackageUpsertOne

SetInternalID sets the "internal_id" field.

func (*AppPackageUpsertOne) SetName added in v0.0.4

SetName sets the "name" field.

func (*AppPackageUpsertOne) SetSource added in v0.0.4

SetSource sets the "source" field.

func (*AppPackageUpsertOne) SetSourceID added in v0.0.4

func (u *AppPackageUpsertOne) SetSourceID(v int64) *AppPackageUpsertOne

SetSourceID sets the "source_id" field.

func (*AppPackageUpsertOne) SetSourcePackageID added in v0.0.4

func (u *AppPackageUpsertOne) SetSourcePackageID(v string) *AppPackageUpsertOne

SetSourcePackageID sets the "source_package_id" field.

func (*AppPackageUpsertOne) SetUpdatedAt added in v0.0.4

func (u *AppPackageUpsertOne) SetUpdatedAt(v time.Time) *AppPackageUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppPackageUpsertOne) Update added in v0.0.4

Update allows overriding fields `UPDATE` values. See the AppPackageCreate.OnConflict documentation for more info.

func (*AppPackageUpsertOne) UpdateBinaryName added in v0.0.4

func (u *AppPackageUpsertOne) UpdateBinaryName() *AppPackageUpsertOne

UpdateBinaryName sets the "binary_name" field to the value that was provided on create.

func (*AppPackageUpsertOne) UpdateBinarySize added in v0.0.4

func (u *AppPackageUpsertOne) UpdateBinarySize() *AppPackageUpsertOne

UpdateBinarySize sets the "binary_size" field to the value that was provided on create.

func (*AppPackageUpsertOne) UpdateCreatedAt added in v0.0.4

func (u *AppPackageUpsertOne) UpdateCreatedAt() *AppPackageUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*AppPackageUpsertOne) UpdateDescription added in v0.0.4

func (u *AppPackageUpsertOne) UpdateDescription() *AppPackageUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*AppPackageUpsertOne) UpdateInternalID added in v0.0.4

func (u *AppPackageUpsertOne) UpdateInternalID() *AppPackageUpsertOne

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*AppPackageUpsertOne) UpdateName added in v0.0.4

func (u *AppPackageUpsertOne) UpdateName() *AppPackageUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppPackageUpsertOne) UpdateNewValues added in v0.0.4

func (u *AppPackageUpsertOne) UpdateNewValues() *AppPackageUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppPackage.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*AppPackageUpsertOne) UpdateSource added in v0.0.4

func (u *AppPackageUpsertOne) UpdateSource() *AppPackageUpsertOne

UpdateSource sets the "source" field to the value that was provided on create.

func (*AppPackageUpsertOne) UpdateSourceID added in v0.0.4

func (u *AppPackageUpsertOne) UpdateSourceID() *AppPackageUpsertOne

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*AppPackageUpsertOne) UpdateSourcePackageID added in v0.0.4

func (u *AppPackageUpsertOne) UpdateSourcePackageID() *AppPackageUpsertOne

UpdateSourcePackageID sets the "source_package_id" field to the value that was provided on create.

func (*AppPackageUpsertOne) UpdateUpdatedAt added in v0.0.4

func (u *AppPackageUpsertOne) UpdateUpdatedAt() *AppPackageUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type AppPackages added in v0.0.4

type AppPackages []*AppPackage

AppPackages is a parsable slice of AppPackage.

type AppQuery

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

AppQuery is the builder for querying App entities.

func (*AppQuery) Aggregate added in v0.0.3

func (aq *AppQuery) Aggregate(fns ...AggregateFunc) *AppSelect

Aggregate returns a AppSelect configured with the given aggregations.

func (*AppQuery) All

func (aq *AppQuery) All(ctx context.Context) ([]*App, error)

All executes the query and returns a list of Apps.

func (*AppQuery) AllX

func (aq *AppQuery) AllX(ctx context.Context) []*App

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

func (*AppQuery) Clone

func (aq *AppQuery) Clone() *AppQuery

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

func (*AppQuery) Count

func (aq *AppQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppQuery) CountX

func (aq *AppQuery) CountX(ctx context.Context) int

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

func (*AppQuery) Exist

func (aq *AppQuery) Exist(ctx context.Context) (bool, error)

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

func (*AppQuery) ExistX

func (aq *AppQuery) ExistX(ctx context.Context) bool

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

func (*AppQuery) First

func (aq *AppQuery) First(ctx context.Context) (*App, error)

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

func (*AppQuery) FirstID

func (aq *AppQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*AppQuery) FirstIDX

func (aq *AppQuery) FirstIDX(ctx context.Context) int

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

func (*AppQuery) FirstX

func (aq *AppQuery) FirstX(ctx context.Context) *App

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

func (*AppQuery) GroupBy

func (aq *AppQuery) GroupBy(field string, fields ...string) *AppGroupBy

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

client.App.Query().
	GroupBy(app.FieldInternalID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppQuery) IDs

func (aq *AppQuery) IDs(ctx context.Context) ([]int, error)

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

func (*AppQuery) IDsX

func (aq *AppQuery) IDsX(ctx context.Context) []int

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

func (*AppQuery) Limit

func (aq *AppQuery) Limit(limit int) *AppQuery

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

func (*AppQuery) Offset

func (aq *AppQuery) Offset(offset int) *AppQuery

Offset to start from.

func (*AppQuery) Only

func (aq *AppQuery) Only(ctx context.Context) (*App, error)

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

func (*AppQuery) OnlyID

func (aq *AppQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*AppQuery) OnlyIDX

func (aq *AppQuery) OnlyIDX(ctx context.Context) int

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

func (*AppQuery) OnlyX

func (aq *AppQuery) OnlyX(ctx context.Context) *App

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

func (*AppQuery) Order

func (aq *AppQuery) Order(o ...OrderFunc) *AppQuery

Order specifies how the records should be ordered.

func (*AppQuery) Select

func (aq *AppQuery) Select(fields ...string) *AppSelect

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

client.App.Query().
	Select(app.FieldInternalID).
	Scan(ctx, &v)

func (*AppQuery) Unique

func (aq *AppQuery) Unique(unique bool) *AppQuery

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

func (aq *AppQuery) Where(ps ...predicate.App) *AppQuery

Where adds a new predicate for the AppQuery builder.

type AppSelect

type AppSelect struct {
	*AppQuery
	// contains filtered or unexported fields
}

AppSelect is the builder for selecting fields of App entities.

func (*AppSelect) Aggregate added in v0.0.3

func (as *AppSelect) Aggregate(fns ...AggregateFunc) *AppSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppSelect) Bool

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

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

func (*AppSelect) BoolX

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

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

func (*AppSelect) Bools

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

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

func (*AppSelect) BoolsX

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

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

func (*AppSelect) Float64

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

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

func (*AppSelect) Float64X

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

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

func (*AppSelect) Float64s

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

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

func (*AppSelect) Float64sX

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

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

func (*AppSelect) Int

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

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

func (*AppSelect) IntX

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

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

func (*AppSelect) Ints

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

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

func (*AppSelect) IntsX

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

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

func (*AppSelect) Scan

func (as *AppSelect) Scan(ctx context.Context, v any) error

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

func (*AppSelect) ScanX

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

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

func (*AppSelect) String

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

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

func (*AppSelect) StringX

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

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

func (*AppSelect) Strings

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

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

func (*AppSelect) StringsX

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

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

type AppUpdate

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

AppUpdate is the builder for updating App entities.

func (*AppUpdate) AddInternalID

func (au *AppUpdate) AddInternalID(i int64) *AppUpdate

AddInternalID adds i to the "internal_id" field.

func (*AppUpdate) Exec

func (au *AppUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppUpdate) ExecX

func (au *AppUpdate) ExecX(ctx context.Context)

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

func (*AppUpdate) Mutation

func (au *AppUpdate) Mutation() *AppMutation

Mutation returns the AppMutation object of the builder.

func (*AppUpdate) Save

func (au *AppUpdate) Save(ctx context.Context) (int, error)

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

func (*AppUpdate) SaveX

func (au *AppUpdate) SaveX(ctx context.Context) int

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

func (*AppUpdate) SetCreatedAt

func (au *AppUpdate) SetCreatedAt(t time.Time) *AppUpdate

SetCreatedAt sets the "created_at" field.

func (*AppUpdate) SetDescription

func (au *AppUpdate) SetDescription(s string) *AppUpdate

SetDescription sets the "description" field.

func (*AppUpdate) SetDeveloper

func (au *AppUpdate) SetDeveloper(s string) *AppUpdate

SetDeveloper sets the "developer" field.

func (*AppUpdate) SetImageURL

func (au *AppUpdate) SetImageURL(s string) *AppUpdate

SetImageURL sets the "image_url" field.

func (*AppUpdate) SetInternalID

func (au *AppUpdate) SetInternalID(i int64) *AppUpdate

SetInternalID sets the "internal_id" field.

func (*AppUpdate) SetName

func (au *AppUpdate) SetName(s string) *AppUpdate

SetName sets the "name" field.

func (*AppUpdate) SetNillableCreatedAt

func (au *AppUpdate) SetNillableCreatedAt(t *time.Time) *AppUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppUpdate) SetPublisher

func (au *AppUpdate) SetPublisher(s string) *AppUpdate

SetPublisher sets the "publisher" field.

func (*AppUpdate) SetReleaseDate

func (au *AppUpdate) SetReleaseDate(s string) *AppUpdate

SetReleaseDate sets the "release_date" field.

func (*AppUpdate) SetShortDescription

func (au *AppUpdate) SetShortDescription(s string) *AppUpdate

SetShortDescription sets the "short_description" field.

func (*AppUpdate) SetSource

func (au *AppUpdate) SetSource(a app.Source) *AppUpdate

SetSource sets the "source" field.

func (*AppUpdate) SetSourceAppID

func (au *AppUpdate) SetSourceAppID(s string) *AppUpdate

SetSourceAppID sets the "source_app_id" field.

func (*AppUpdate) SetSourceURL

func (au *AppUpdate) SetSourceURL(s string) *AppUpdate

SetSourceURL sets the "source_url" field.

func (*AppUpdate) SetType

func (au *AppUpdate) SetType(a app.Type) *AppUpdate

SetType sets the "type" field.

func (*AppUpdate) Where

func (au *AppUpdate) Where(ps ...predicate.App) *AppUpdate

Where appends a list predicates to the AppUpdate builder.

type AppUpdateOne

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

AppUpdateOne is the builder for updating a single App entity.

func (*AppUpdateOne) AddInternalID

func (auo *AppUpdateOne) AddInternalID(i int64) *AppUpdateOne

AddInternalID adds i to the "internal_id" field.

func (*AppUpdateOne) Exec

func (auo *AppUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppUpdateOne) ExecX

func (auo *AppUpdateOne) ExecX(ctx context.Context)

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

func (*AppUpdateOne) Mutation

func (auo *AppUpdateOne) Mutation() *AppMutation

Mutation returns the AppMutation object of the builder.

func (*AppUpdateOne) Save

func (auo *AppUpdateOne) Save(ctx context.Context) (*App, error)

Save executes the query and returns the updated App entity.

func (*AppUpdateOne) SaveX

func (auo *AppUpdateOne) SaveX(ctx context.Context) *App

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

func (*AppUpdateOne) Select

func (auo *AppUpdateOne) Select(field string, fields ...string) *AppUpdateOne

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

func (*AppUpdateOne) SetCreatedAt

func (auo *AppUpdateOne) SetCreatedAt(t time.Time) *AppUpdateOne

SetCreatedAt sets the "created_at" field.

func (*AppUpdateOne) SetDescription

func (auo *AppUpdateOne) SetDescription(s string) *AppUpdateOne

SetDescription sets the "description" field.

func (*AppUpdateOne) SetDeveloper

func (auo *AppUpdateOne) SetDeveloper(s string) *AppUpdateOne

SetDeveloper sets the "developer" field.

func (*AppUpdateOne) SetImageURL

func (auo *AppUpdateOne) SetImageURL(s string) *AppUpdateOne

SetImageURL sets the "image_url" field.

func (*AppUpdateOne) SetInternalID

func (auo *AppUpdateOne) SetInternalID(i int64) *AppUpdateOne

SetInternalID sets the "internal_id" field.

func (*AppUpdateOne) SetName

func (auo *AppUpdateOne) SetName(s string) *AppUpdateOne

SetName sets the "name" field.

func (*AppUpdateOne) SetNillableCreatedAt

func (auo *AppUpdateOne) SetNillableCreatedAt(t *time.Time) *AppUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppUpdateOne) SetPublisher

func (auo *AppUpdateOne) SetPublisher(s string) *AppUpdateOne

SetPublisher sets the "publisher" field.

func (*AppUpdateOne) SetReleaseDate

func (auo *AppUpdateOne) SetReleaseDate(s string) *AppUpdateOne

SetReleaseDate sets the "release_date" field.

func (*AppUpdateOne) SetShortDescription

func (auo *AppUpdateOne) SetShortDescription(s string) *AppUpdateOne

SetShortDescription sets the "short_description" field.

func (*AppUpdateOne) SetSource

func (auo *AppUpdateOne) SetSource(a app.Source) *AppUpdateOne

SetSource sets the "source" field.

func (*AppUpdateOne) SetSourceAppID

func (auo *AppUpdateOne) SetSourceAppID(s string) *AppUpdateOne

SetSourceAppID sets the "source_app_id" field.

func (*AppUpdateOne) SetSourceURL

func (auo *AppUpdateOne) SetSourceURL(s string) *AppUpdateOne

SetSourceURL sets the "source_url" field.

func (*AppUpdateOne) SetType

func (auo *AppUpdateOne) SetType(a app.Type) *AppUpdateOne

SetType sets the "type" field.

type AppUpsert added in v0.0.2

type AppUpsert struct {
	*sql.UpdateSet
}

AppUpsert is the "OnConflict" setter.

func (*AppUpsert) AddInternalID added in v0.0.2

func (u *AppUpsert) AddInternalID(v int64) *AppUpsert

AddInternalID adds v to the "internal_id" field.

func (*AppUpsert) SetCreatedAt added in v0.0.2

func (u *AppUpsert) SetCreatedAt(v time.Time) *AppUpsert

SetCreatedAt sets the "created_at" field.

func (*AppUpsert) SetDescription added in v0.0.2

func (u *AppUpsert) SetDescription(v string) *AppUpsert

SetDescription sets the "description" field.

func (*AppUpsert) SetDeveloper added in v0.0.2

func (u *AppUpsert) SetDeveloper(v string) *AppUpsert

SetDeveloper sets the "developer" field.

func (*AppUpsert) SetImageURL added in v0.0.2

func (u *AppUpsert) SetImageURL(v string) *AppUpsert

SetImageURL sets the "image_url" field.

func (*AppUpsert) SetInternalID added in v0.0.2

func (u *AppUpsert) SetInternalID(v int64) *AppUpsert

SetInternalID sets the "internal_id" field.

func (*AppUpsert) SetName added in v0.0.2

func (u *AppUpsert) SetName(v string) *AppUpsert

SetName sets the "name" field.

func (*AppUpsert) SetPublisher added in v0.0.2

func (u *AppUpsert) SetPublisher(v string) *AppUpsert

SetPublisher sets the "publisher" field.

func (*AppUpsert) SetReleaseDate added in v0.0.2

func (u *AppUpsert) SetReleaseDate(v string) *AppUpsert

SetReleaseDate sets the "release_date" field.

func (*AppUpsert) SetShortDescription added in v0.0.2

func (u *AppUpsert) SetShortDescription(v string) *AppUpsert

SetShortDescription sets the "short_description" field.

func (*AppUpsert) SetSource added in v0.0.2

func (u *AppUpsert) SetSource(v app.Source) *AppUpsert

SetSource sets the "source" field.

func (*AppUpsert) SetSourceAppID added in v0.0.2

func (u *AppUpsert) SetSourceAppID(v string) *AppUpsert

SetSourceAppID sets the "source_app_id" field.

func (*AppUpsert) SetSourceURL added in v0.0.2

func (u *AppUpsert) SetSourceURL(v string) *AppUpsert

SetSourceURL sets the "source_url" field.

func (*AppUpsert) SetType added in v0.0.2

func (u *AppUpsert) SetType(v app.Type) *AppUpsert

SetType sets the "type" field.

func (*AppUpsert) UpdateCreatedAt added in v0.0.2

func (u *AppUpsert) UpdateCreatedAt() *AppUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*AppUpsert) UpdateDescription added in v0.0.2

func (u *AppUpsert) UpdateDescription() *AppUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*AppUpsert) UpdateDeveloper added in v0.0.2

func (u *AppUpsert) UpdateDeveloper() *AppUpsert

UpdateDeveloper sets the "developer" field to the value that was provided on create.

func (*AppUpsert) UpdateImageURL added in v0.0.2

func (u *AppUpsert) UpdateImageURL() *AppUpsert

UpdateImageURL sets the "image_url" field to the value that was provided on create.

func (*AppUpsert) UpdateInternalID added in v0.0.2

func (u *AppUpsert) UpdateInternalID() *AppUpsert

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*AppUpsert) UpdateName added in v0.0.2

func (u *AppUpsert) UpdateName() *AppUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppUpsert) UpdatePublisher added in v0.0.2

func (u *AppUpsert) UpdatePublisher() *AppUpsert

UpdatePublisher sets the "publisher" field to the value that was provided on create.

func (*AppUpsert) UpdateReleaseDate added in v0.0.2

func (u *AppUpsert) UpdateReleaseDate() *AppUpsert

UpdateReleaseDate sets the "release_date" field to the value that was provided on create.

func (*AppUpsert) UpdateShortDescription added in v0.0.2

func (u *AppUpsert) UpdateShortDescription() *AppUpsert

UpdateShortDescription sets the "short_description" field to the value that was provided on create.

func (*AppUpsert) UpdateSource added in v0.0.2

func (u *AppUpsert) UpdateSource() *AppUpsert

UpdateSource sets the "source" field to the value that was provided on create.

func (*AppUpsert) UpdateSourceAppID added in v0.0.2

func (u *AppUpsert) UpdateSourceAppID() *AppUpsert

UpdateSourceAppID sets the "source_app_id" field to the value that was provided on create.

func (*AppUpsert) UpdateSourceURL added in v0.0.2

func (u *AppUpsert) UpdateSourceURL() *AppUpsert

UpdateSourceURL sets the "source_url" field to the value that was provided on create.

func (*AppUpsert) UpdateType added in v0.0.2

func (u *AppUpsert) UpdateType() *AppUpsert

UpdateType sets the "type" field to the value that was provided on create.

type AppUpsertBulk added in v0.0.2

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

AppUpsertBulk is the builder for "upsert"-ing a bulk of App nodes.

func (*AppUpsertBulk) AddInternalID added in v0.0.2

func (u *AppUpsertBulk) AddInternalID(v int64) *AppUpsertBulk

AddInternalID adds v to the "internal_id" field.

func (*AppUpsertBulk) DoNothing added in v0.0.2

func (u *AppUpsertBulk) DoNothing() *AppUpsertBulk

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

func (*AppUpsertBulk) Exec added in v0.0.2

func (u *AppUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppUpsertBulk) ExecX added in v0.0.2

func (u *AppUpsertBulk) ExecX(ctx context.Context)

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

func (*AppUpsertBulk) Ignore added in v0.0.2

func (u *AppUpsertBulk) Ignore() *AppUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.App.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppUpsertBulk) SetCreatedAt added in v0.0.2

func (u *AppUpsertBulk) SetCreatedAt(v time.Time) *AppUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*AppUpsertBulk) SetDescription added in v0.0.2

func (u *AppUpsertBulk) SetDescription(v string) *AppUpsertBulk

SetDescription sets the "description" field.

func (*AppUpsertBulk) SetDeveloper added in v0.0.2

func (u *AppUpsertBulk) SetDeveloper(v string) *AppUpsertBulk

SetDeveloper sets the "developer" field.

func (*AppUpsertBulk) SetImageURL added in v0.0.2

func (u *AppUpsertBulk) SetImageURL(v string) *AppUpsertBulk

SetImageURL sets the "image_url" field.

func (*AppUpsertBulk) SetInternalID added in v0.0.2

func (u *AppUpsertBulk) SetInternalID(v int64) *AppUpsertBulk

SetInternalID sets the "internal_id" field.

func (*AppUpsertBulk) SetName added in v0.0.2

func (u *AppUpsertBulk) SetName(v string) *AppUpsertBulk

SetName sets the "name" field.

func (*AppUpsertBulk) SetPublisher added in v0.0.2

func (u *AppUpsertBulk) SetPublisher(v string) *AppUpsertBulk

SetPublisher sets the "publisher" field.

func (*AppUpsertBulk) SetReleaseDate added in v0.0.2

func (u *AppUpsertBulk) SetReleaseDate(v string) *AppUpsertBulk

SetReleaseDate sets the "release_date" field.

func (*AppUpsertBulk) SetShortDescription added in v0.0.2

func (u *AppUpsertBulk) SetShortDescription(v string) *AppUpsertBulk

SetShortDescription sets the "short_description" field.

func (*AppUpsertBulk) SetSource added in v0.0.2

func (u *AppUpsertBulk) SetSource(v app.Source) *AppUpsertBulk

SetSource sets the "source" field.

func (*AppUpsertBulk) SetSourceAppID added in v0.0.2

func (u *AppUpsertBulk) SetSourceAppID(v string) *AppUpsertBulk

SetSourceAppID sets the "source_app_id" field.

func (*AppUpsertBulk) SetSourceURL added in v0.0.2

func (u *AppUpsertBulk) SetSourceURL(v string) *AppUpsertBulk

SetSourceURL sets the "source_url" field.

func (*AppUpsertBulk) SetType added in v0.0.2

func (u *AppUpsertBulk) SetType(v app.Type) *AppUpsertBulk

SetType sets the "type" field.

func (*AppUpsertBulk) Update added in v0.0.2

func (u *AppUpsertBulk) Update(set func(*AppUpsert)) *AppUpsertBulk

Update allows overriding fields `UPDATE` values. See the AppCreateBulk.OnConflict documentation for more info.

func (*AppUpsertBulk) UpdateCreatedAt added in v0.0.2

func (u *AppUpsertBulk) UpdateCreatedAt() *AppUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateDescription added in v0.0.2

func (u *AppUpsertBulk) UpdateDescription() *AppUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateDeveloper added in v0.0.2

func (u *AppUpsertBulk) UpdateDeveloper() *AppUpsertBulk

UpdateDeveloper sets the "developer" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateImageURL added in v0.0.2

func (u *AppUpsertBulk) UpdateImageURL() *AppUpsertBulk

UpdateImageURL sets the "image_url" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateInternalID added in v0.0.2

func (u *AppUpsertBulk) UpdateInternalID() *AppUpsertBulk

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateName added in v0.0.2

func (u *AppUpsertBulk) UpdateName() *AppUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateNewValues added in v0.0.2

func (u *AppUpsertBulk) UpdateNewValues() *AppUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.App.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*AppUpsertBulk) UpdatePublisher added in v0.0.2

func (u *AppUpsertBulk) UpdatePublisher() *AppUpsertBulk

UpdatePublisher sets the "publisher" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateReleaseDate added in v0.0.2

func (u *AppUpsertBulk) UpdateReleaseDate() *AppUpsertBulk

UpdateReleaseDate sets the "release_date" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateShortDescription added in v0.0.2

func (u *AppUpsertBulk) UpdateShortDescription() *AppUpsertBulk

UpdateShortDescription sets the "short_description" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateSource added in v0.0.2

func (u *AppUpsertBulk) UpdateSource() *AppUpsertBulk

UpdateSource sets the "source" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateSourceAppID added in v0.0.2

func (u *AppUpsertBulk) UpdateSourceAppID() *AppUpsertBulk

UpdateSourceAppID sets the "source_app_id" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateSourceURL added in v0.0.2

func (u *AppUpsertBulk) UpdateSourceURL() *AppUpsertBulk

UpdateSourceURL sets the "source_url" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateType added in v0.0.2

func (u *AppUpsertBulk) UpdateType() *AppUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

type AppUpsertOne added in v0.0.2

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

AppUpsertOne is the builder for "upsert"-ing

one App node.

func (*AppUpsertOne) AddInternalID added in v0.0.2

func (u *AppUpsertOne) AddInternalID(v int64) *AppUpsertOne

AddInternalID adds v to the "internal_id" field.

func (*AppUpsertOne) DoNothing added in v0.0.2

func (u *AppUpsertOne) DoNothing() *AppUpsertOne

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

func (*AppUpsertOne) Exec added in v0.0.2

func (u *AppUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*AppUpsertOne) ExecX added in v0.0.2

func (u *AppUpsertOne) ExecX(ctx context.Context)

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

func (*AppUpsertOne) ID added in v0.0.2

func (u *AppUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppUpsertOne) IDX added in v0.0.2

func (u *AppUpsertOne) IDX(ctx context.Context) int

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

func (*AppUpsertOne) Ignore added in v0.0.2

func (u *AppUpsertOne) Ignore() *AppUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.App.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppUpsertOne) SetCreatedAt added in v0.0.2

func (u *AppUpsertOne) SetCreatedAt(v time.Time) *AppUpsertOne

SetCreatedAt sets the "created_at" field.

func (*AppUpsertOne) SetDescription added in v0.0.2

func (u *AppUpsertOne) SetDescription(v string) *AppUpsertOne

SetDescription sets the "description" field.

func (*AppUpsertOne) SetDeveloper added in v0.0.2

func (u *AppUpsertOne) SetDeveloper(v string) *AppUpsertOne

SetDeveloper sets the "developer" field.

func (*AppUpsertOne) SetImageURL added in v0.0.2

func (u *AppUpsertOne) SetImageURL(v string) *AppUpsertOne

SetImageURL sets the "image_url" field.

func (*AppUpsertOne) SetInternalID added in v0.0.2

func (u *AppUpsertOne) SetInternalID(v int64) *AppUpsertOne

SetInternalID sets the "internal_id" field.

func (*AppUpsertOne) SetName added in v0.0.2

func (u *AppUpsertOne) SetName(v string) *AppUpsertOne

SetName sets the "name" field.

func (*AppUpsertOne) SetPublisher added in v0.0.2

func (u *AppUpsertOne) SetPublisher(v string) *AppUpsertOne

SetPublisher sets the "publisher" field.

func (*AppUpsertOne) SetReleaseDate added in v0.0.2

func (u *AppUpsertOne) SetReleaseDate(v string) *AppUpsertOne

SetReleaseDate sets the "release_date" field.

func (*AppUpsertOne) SetShortDescription added in v0.0.2

func (u *AppUpsertOne) SetShortDescription(v string) *AppUpsertOne

SetShortDescription sets the "short_description" field.

func (*AppUpsertOne) SetSource added in v0.0.2

func (u *AppUpsertOne) SetSource(v app.Source) *AppUpsertOne

SetSource sets the "source" field.

func (*AppUpsertOne) SetSourceAppID added in v0.0.2

func (u *AppUpsertOne) SetSourceAppID(v string) *AppUpsertOne

SetSourceAppID sets the "source_app_id" field.

func (*AppUpsertOne) SetSourceURL added in v0.0.2

func (u *AppUpsertOne) SetSourceURL(v string) *AppUpsertOne

SetSourceURL sets the "source_url" field.

func (*AppUpsertOne) SetType added in v0.0.2

func (u *AppUpsertOne) SetType(v app.Type) *AppUpsertOne

SetType sets the "type" field.

func (*AppUpsertOne) Update added in v0.0.2

func (u *AppUpsertOne) Update(set func(*AppUpsert)) *AppUpsertOne

Update allows overriding fields `UPDATE` values. See the AppCreate.OnConflict documentation for more info.

func (*AppUpsertOne) UpdateCreatedAt added in v0.0.2

func (u *AppUpsertOne) UpdateCreatedAt() *AppUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*AppUpsertOne) UpdateDescription added in v0.0.2

func (u *AppUpsertOne) UpdateDescription() *AppUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*AppUpsertOne) UpdateDeveloper added in v0.0.2

func (u *AppUpsertOne) UpdateDeveloper() *AppUpsertOne

UpdateDeveloper sets the "developer" field to the value that was provided on create.

func (*AppUpsertOne) UpdateImageURL added in v0.0.2

func (u *AppUpsertOne) UpdateImageURL() *AppUpsertOne

UpdateImageURL sets the "image_url" field to the value that was provided on create.

func (*AppUpsertOne) UpdateInternalID added in v0.0.2

func (u *AppUpsertOne) UpdateInternalID() *AppUpsertOne

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*AppUpsertOne) UpdateName added in v0.0.2

func (u *AppUpsertOne) UpdateName() *AppUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppUpsertOne) UpdateNewValues added in v0.0.2

func (u *AppUpsertOne) UpdateNewValues() *AppUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.App.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*AppUpsertOne) UpdatePublisher added in v0.0.2

func (u *AppUpsertOne) UpdatePublisher() *AppUpsertOne

UpdatePublisher sets the "publisher" field to the value that was provided on create.

func (*AppUpsertOne) UpdateReleaseDate added in v0.0.2

func (u *AppUpsertOne) UpdateReleaseDate() *AppUpsertOne

UpdateReleaseDate sets the "release_date" field to the value that was provided on create.

func (*AppUpsertOne) UpdateShortDescription added in v0.0.2

func (u *AppUpsertOne) UpdateShortDescription() *AppUpsertOne

UpdateShortDescription sets the "short_description" field to the value that was provided on create.

func (*AppUpsertOne) UpdateSource added in v0.0.2

func (u *AppUpsertOne) UpdateSource() *AppUpsertOne

UpdateSource sets the "source" field to the value that was provided on create.

func (*AppUpsertOne) UpdateSourceAppID added in v0.0.2

func (u *AppUpsertOne) UpdateSourceAppID() *AppUpsertOne

UpdateSourceAppID sets the "source_app_id" field to the value that was provided on create.

func (*AppUpsertOne) UpdateSourceURL added in v0.0.2

func (u *AppUpsertOne) UpdateSourceURL() *AppUpsertOne

UpdateSourceURL sets the "source_url" field to the value that was provided on create.

func (*AppUpsertOne) UpdateType added in v0.0.2

func (u *AppUpsertOne) UpdateType() *AppUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type Apps

type Apps []*App

Apps is a parsable slice of App.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Account is the client for interacting with the Account builders.
	Account *AccountClient
	// App is the client for interacting with the App builders.
	App *AppClient
	// AppPackage is the client for interacting with the AppPackage builders.
	AppPackage *AppPackageClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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().
	Account.
	Query().
	Count(ctx)

func (*Client) Intercept added in v0.0.4

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 added in v0.0.4

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 added in v0.0.4

type InterceptFunc = ent.InterceptFunc

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

type Interceptor added in v0.0.4

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.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Policy

type Policy = ent.Policy

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

type Querier added in v0.0.4

type Querier = ent.Querier

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

type QuerierFunc added in v0.0.4

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 added in v0.0.4

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 TraverseFunc added in v0.0.4

type TraverseFunc = ent.TraverseFunc

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

type Traverser added in v0.0.4

type Traverser = ent.Traverser

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

type Tx

type Tx struct {

	// Account is the client for interacting with the Account builders.
	Account *AccountClient
	// App is the client for interacting with the App builders.
	App *AppClient
	// AppPackage is the client for interacting with the AppPackage builders.
	AppPackage *AppPackageClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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 User

type User struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// InternalID holds the value of the "internal_id" field.
	InternalID int64 `json:"internal_id,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// Password holds the value of the "password" field.
	Password string `json:"password,omitempty"`
	// Status holds the value of the "status" field.
	Status user.Status `json:"status,omitempty"`
	// Type holds the value of the "type" field.
	Type user.Type `json:"type,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

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

func (u *User) Update() *UserUpdateOne

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

type UserClient

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

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

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

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int) *UserDeleteOne

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

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int) *User

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

func (*UserClient) Hooks

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

Hooks returns the client hooks.

func (*UserClient) Intercept added in v0.0.4

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

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

func (*UserClient) Interceptors added in v0.0.4

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

Interceptors returns the client interceptors.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id int) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

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

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

type UserCreate

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

UserCreate is the builder for creating a User entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

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

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict added in v0.0.2

func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetInternalID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetInternalID(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns added in v0.0.2

func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetCreatedAt

func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetInternalID

func (uc *UserCreate) SetInternalID(i int64) *UserCreate

SetInternalID sets the "internal_id" field.

func (*UserCreate) SetNillableCreatedAt

func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetPassword

func (uc *UserCreate) SetPassword(s string) *UserCreate

SetPassword sets the "password" field.

func (*UserCreate) SetStatus

func (uc *UserCreate) SetStatus(u user.Status) *UserCreate

SetStatus sets the "status" field.

func (*UserCreate) SetType

func (uc *UserCreate) SetType(u user.Type) *UserCreate

SetType sets the "type" field.

func (*UserCreate) SetUsername

func (uc *UserCreate) SetUsername(s string) *UserCreate

SetUsername sets the "username" field.

type UserCreateBulk

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

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

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

func (*UserCreateBulk) OnConflict added in v0.0.2

func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetInternalID(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns added in v0.0.2

func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

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

type UserDelete

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

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

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

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

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

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

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

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

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

func (*UserDeleteOne) Where added in v0.0.4

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserGroupBy

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

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

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

func (*UserGroupBy) Bool

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

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

func (*UserGroupBy) BoolX

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

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

func (*UserGroupBy) Bools

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

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

func (*UserGroupBy) BoolsX

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

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

func (*UserGroupBy) Float64

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

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

func (*UserGroupBy) Float64X

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

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

func (*UserGroupBy) Float64s

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

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

func (*UserGroupBy) Float64sX

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

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

func (*UserGroupBy) Int

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

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

func (*UserGroupBy) IntX

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

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

func (*UserGroupBy) Ints

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

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

func (*UserGroupBy) IntsX

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

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

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

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

func (*UserGroupBy) ScanX

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

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

func (*UserGroupBy) String

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

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

func (*UserGroupBy) StringX

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

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

func (*UserGroupBy) Strings

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

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

func (*UserGroupBy) StringsX

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

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

type UserMutation

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

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddField

func (m *UserMutation) 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 (*UserMutation) AddInternalID

func (m *UserMutation) AddInternalID(i int64)

AddInternalID adds i to the "internal_id" field.

func (*UserMutation) AddedEdges

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

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

func (*UserMutation) AddedField

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

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

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

func (*UserMutation) AddedIDs

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

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

func (*UserMutation) AddedInternalID

func (m *UserMutation) AddedInternalID() (r int64, exists bool)

AddedInternalID returns the value that was added to the "internal_id" field in this mutation.

func (*UserMutation) ClearEdge

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

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

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

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

func (*UserMutation) ClearedFields

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

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

func (UserMutation) Client

func (m UserMutation) 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 (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) EdgeCleared

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

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

func (*UserMutation) Field

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

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

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

func (*UserMutation) Fields

func (m *UserMutation) 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 (*UserMutation) GetType

func (m *UserMutation) GetType() (r user.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*UserMutation) ID

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

func (m *UserMutation) 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 (*UserMutation) InternalID

func (m *UserMutation) InternalID() (r int64, exists bool)

InternalID returns the value of the "internal_id" field in the mutation.

func (*UserMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User 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 (*UserMutation) OldField

func (m *UserMutation) 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 (*UserMutation) OldInternalID

func (m *UserMutation) OldInternalID(ctx context.Context) (v int64, err error)

OldInternalID returns the old "internal_id" field's value of the User entity. If the User 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 (*UserMutation) OldPassword

func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)

OldPassword returns the old "password" field's value of the User entity. If the User 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 (*UserMutation) OldStatus

func (m *UserMutation) OldStatus(ctx context.Context) (v user.Status, err error)

OldStatus returns the old "status" field's value of the User entity. If the User 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 (*UserMutation) OldType

func (m *UserMutation) OldType(ctx context.Context) (v user.Type, err error)

OldType returns the old "type" field's value of the User entity. If the User 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 (*UserMutation) OldUsername

func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the User entity. If the User 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 (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) Password

func (m *UserMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*UserMutation) RemovedEdges

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

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

func (*UserMutation) RemovedIDs

func (m *UserMutation) 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 (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetEdge

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

func (m *UserMutation) 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 (*UserMutation) ResetInternalID

func (m *UserMutation) ResetInternalID()

ResetInternalID resets all changes to the "internal_id" field.

func (*UserMutation) ResetPassword

func (m *UserMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*UserMutation) ResetStatus

func (m *UserMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*UserMutation) ResetType

func (m *UserMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*UserMutation) ResetUsername

func (m *UserMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetField

func (m *UserMutation) 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 (*UserMutation) SetInternalID

func (m *UserMutation) SetInternalID(i int64)

SetInternalID sets the "internal_id" field.

func (*UserMutation) SetOp added in v0.0.4

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetPassword

func (m *UserMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*UserMutation) SetStatus

func (m *UserMutation) SetStatus(u user.Status)

SetStatus sets the "status" field.

func (*UserMutation) SetType

func (m *UserMutation) SetType(u user.Type)

SetType sets the "type" field.

func (*UserMutation) SetUsername

func (m *UserMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (*UserMutation) Status

func (m *UserMutation) Status() (r user.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (UserMutation) Tx

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

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

func (*UserMutation) Type

func (m *UserMutation) Type() string

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

func (*UserMutation) Username

func (m *UserMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP added in v0.0.4

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

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

type UserQuery

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

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate added in v0.0.3

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

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

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

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

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

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

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

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

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

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

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

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

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int

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

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

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

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

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

client.User.Query().
	GroupBy(user.FieldInternalID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)

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

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

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

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

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

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

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

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int

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

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

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

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

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

client.User.Query().
	Select(user.FieldInternalID).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

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

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate added in v0.0.3

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

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

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

func (*UserSelect) BoolX

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

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

func (*UserSelect) Bools

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

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

func (*UserSelect) BoolsX

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

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

func (*UserSelect) Float64

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

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

func (*UserSelect) Float64X

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

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

func (*UserSelect) Float64s

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

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

func (*UserSelect) Float64sX

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

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

func (*UserSelect) Int

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

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

func (*UserSelect) IntX

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

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

func (*UserSelect) Ints

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

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

func (*UserSelect) IntsX

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

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

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

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

func (*UserSelect) ScanX

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

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

func (*UserSelect) String

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

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

func (*UserSelect) StringX

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

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

func (*UserSelect) Strings

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

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

func (*UserSelect) StringsX

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

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

type UserUpdate

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

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddInternalID

func (uu *UserUpdate) AddInternalID(i int64) *UserUpdate

AddInternalID adds i to the "internal_id" field.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

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

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

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

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

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

func (*UserUpdate) SetCreatedAt

func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate

SetCreatedAt sets the "created_at" field.

func (*UserUpdate) SetInternalID

func (uu *UserUpdate) SetInternalID(i int64) *UserUpdate

SetInternalID sets the "internal_id" field.

func (*UserUpdate) SetNillableCreatedAt

func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserUpdate) SetPassword

func (uu *UserUpdate) SetPassword(s string) *UserUpdate

SetPassword sets the "password" field.

func (*UserUpdate) SetStatus

func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate

SetStatus sets the "status" field.

func (*UserUpdate) SetType

func (uu *UserUpdate) SetType(u user.Type) *UserUpdate

SetType sets the "type" field.

func (*UserUpdate) SetUsername

func (uu *UserUpdate) SetUsername(s string) *UserUpdate

SetUsername sets the "username" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

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

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddInternalID

func (uuo *UserUpdateOne) AddInternalID(i int64) *UserUpdateOne

AddInternalID adds i to the "internal_id" field.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

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

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

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

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

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

func (*UserUpdateOne) SetCreatedAt

func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne

SetCreatedAt sets the "created_at" field.

func (*UserUpdateOne) SetInternalID

func (uuo *UserUpdateOne) SetInternalID(i int64) *UserUpdateOne

SetInternalID sets the "internal_id" field.

func (*UserUpdateOne) SetNillableCreatedAt

func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserUpdateOne) SetPassword

func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne

SetPassword sets the "password" field.

func (*UserUpdateOne) SetStatus

func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne

SetStatus sets the "status" field.

func (*UserUpdateOne) SetType

func (uuo *UserUpdateOne) SetType(u user.Type) *UserUpdateOne

SetType sets the "type" field.

func (*UserUpdateOne) SetUsername

func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne

SetUsername sets the "username" field.

type UserUpsert added in v0.0.2

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) AddInternalID added in v0.0.2

func (u *UserUpsert) AddInternalID(v int64) *UserUpsert

AddInternalID adds v to the "internal_id" field.

func (*UserUpsert) SetCreatedAt added in v0.0.2

func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert

SetCreatedAt sets the "created_at" field.

func (*UserUpsert) SetInternalID added in v0.0.2

func (u *UserUpsert) SetInternalID(v int64) *UserUpsert

SetInternalID sets the "internal_id" field.

func (*UserUpsert) SetPassword added in v0.0.2

func (u *UserUpsert) SetPassword(v string) *UserUpsert

SetPassword sets the "password" field.

func (*UserUpsert) SetStatus added in v0.0.2

func (u *UserUpsert) SetStatus(v user.Status) *UserUpsert

SetStatus sets the "status" field.

func (*UserUpsert) SetType added in v0.0.2

func (u *UserUpsert) SetType(v user.Type) *UserUpsert

SetType sets the "type" field.

func (*UserUpsert) SetUsername added in v0.0.2

func (u *UserUpsert) SetUsername(v string) *UserUpsert

SetUsername sets the "username" field.

func (*UserUpsert) UpdateCreatedAt added in v0.0.2

func (u *UserUpsert) UpdateCreatedAt() *UserUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*UserUpsert) UpdateInternalID added in v0.0.2

func (u *UserUpsert) UpdateInternalID() *UserUpsert

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*UserUpsert) UpdatePassword added in v0.0.2

func (u *UserUpsert) UpdatePassword() *UserUpsert

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserUpsert) UpdateStatus added in v0.0.2

func (u *UserUpsert) UpdateStatus() *UserUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserUpsert) UpdateType added in v0.0.2

func (u *UserUpsert) UpdateType() *UserUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*UserUpsert) UpdateUsername added in v0.0.2

func (u *UserUpsert) UpdateUsername() *UserUpsert

UpdateUsername sets the "username" field to the value that was provided on create.

type UserUpsertBulk added in v0.0.2

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

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) AddInternalID added in v0.0.2

func (u *UserUpsertBulk) AddInternalID(v int64) *UserUpsertBulk

AddInternalID adds v to the "internal_id" field.

func (*UserUpsertBulk) DoNothing added in v0.0.2

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

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

func (*UserUpsertBulk) Exec added in v0.0.2

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX added in v0.0.2

func (u *UserUpsertBulk) ExecX(ctx context.Context)

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

func (*UserUpsertBulk) Ignore added in v0.0.2

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetCreatedAt added in v0.0.2

func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*UserUpsertBulk) SetInternalID added in v0.0.2

func (u *UserUpsertBulk) SetInternalID(v int64) *UserUpsertBulk

SetInternalID sets the "internal_id" field.

func (*UserUpsertBulk) SetPassword added in v0.0.2

func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk

SetPassword sets the "password" field.

func (*UserUpsertBulk) SetStatus added in v0.0.2

func (u *UserUpsertBulk) SetStatus(v user.Status) *UserUpsertBulk

SetStatus sets the "status" field.

func (*UserUpsertBulk) SetType added in v0.0.2

func (u *UserUpsertBulk) SetType(v user.Type) *UserUpsertBulk

SetType sets the "type" field.

func (*UserUpsertBulk) SetUsername added in v0.0.2

func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk

SetUsername sets the "username" field.

func (*UserUpsertBulk) Update added in v0.0.2

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateCreatedAt added in v0.0.2

func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateInternalID added in v0.0.2

func (u *UserUpsertBulk) UpdateInternalID() *UserUpsertBulk

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues added in v0.0.2

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdatePassword added in v0.0.2

func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateStatus added in v0.0.2

func (u *UserUpsertBulk) UpdateStatus() *UserUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateType added in v0.0.2

func (u *UserUpsertBulk) UpdateType() *UserUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUsername added in v0.0.2

func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk

UpdateUsername sets the "username" field to the value that was provided on create.

type UserUpsertOne added in v0.0.2

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

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) AddInternalID added in v0.0.2

func (u *UserUpsertOne) AddInternalID(v int64) *UserUpsertOne

AddInternalID adds v to the "internal_id" field.

func (*UserUpsertOne) DoNothing added in v0.0.2

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

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

func (*UserUpsertOne) Exec added in v0.0.2

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX added in v0.0.2

func (u *UserUpsertOne) ExecX(ctx context.Context)

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

func (*UserUpsertOne) ID added in v0.0.2

func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX added in v0.0.2

func (u *UserUpsertOne) IDX(ctx context.Context) int

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

func (*UserUpsertOne) Ignore added in v0.0.2

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetCreatedAt added in v0.0.2

func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne

SetCreatedAt sets the "created_at" field.

func (*UserUpsertOne) SetInternalID added in v0.0.2

func (u *UserUpsertOne) SetInternalID(v int64) *UserUpsertOne

SetInternalID sets the "internal_id" field.

func (*UserUpsertOne) SetPassword added in v0.0.2

func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne

SetPassword sets the "password" field.

func (*UserUpsertOne) SetStatus added in v0.0.2

func (u *UserUpsertOne) SetStatus(v user.Status) *UserUpsertOne

SetStatus sets the "status" field.

func (*UserUpsertOne) SetType added in v0.0.2

func (u *UserUpsertOne) SetType(v user.Type) *UserUpsertOne

SetType sets the "type" field.

func (*UserUpsertOne) SetUsername added in v0.0.2

func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne

SetUsername sets the "username" field.

func (*UserUpsertOne) Update added in v0.0.2

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateCreatedAt added in v0.0.2

func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateInternalID added in v0.0.2

func (u *UserUpsertOne) UpdateInternalID() *UserUpsertOne

UpdateInternalID sets the "internal_id" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues added in v0.0.2

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdatePassword added in v0.0.2

func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserUpsertOne) UpdateStatus added in v0.0.2

func (u *UserUpsertOne) UpdateStatus() *UserUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserUpsertOne) UpdateType added in v0.0.2

func (u *UserUpsertOne) UpdateType() *UserUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUsername added in v0.0.2

func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne

UpdateUsername sets the "username" field to the value that was provided on create.

type Users

type Users []*User

Users is a parsable slice of User.

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