ent

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 28 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"
	TypeFeed       = "Feed"
	TypeFeedConfig = "FeedConfig"
	TypeFeedItem   = "FeedItem"
	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 int64 `json:"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"`
	// 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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AccountQuery when eager-loading is set.
	Edges AccountEdges `json:"edges"`
	// contains filtered or unexported fields
}

Account is the model entity for the Account schema.

func (*Account) QueryUser added in v0.0.6

func (a *Account) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Account entity.

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 int64) *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 int64) (*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 int64) *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)

Intercept 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) QueryUser added in v0.0.6

func (c *AccountClient) QueryUser(a *Account) *UserQuery

QueryUser queries the user edge of a 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 int64) *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().
	SetPlatform(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) {
		SetPlatform(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) SetID added in v0.0.6

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

SetID sets the "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) SetNillableUpdatedAt added in v0.0.5

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

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AccountCreate) SetNillableUserID added in v0.0.6

func (ac *AccountCreate) SetNillableUserID(id *int64) *AccountCreate

SetNillableUserID sets the "user" edge to the User entity by ID 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.

func (*AccountCreate) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" field.

func (*AccountCreate) SetUser added in v0.0.6

func (ac *AccountCreate) SetUser(u *User) *AccountCreate

SetUser sets the "user" edge to the User entity.

func (*AccountCreate) SetUserID added in v0.0.6

func (ac *AccountCreate) SetUserID(id int64) *AccountCreate

SetUserID sets the "user" edge to the User entity by ID.

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) {
		SetPlatform(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 AccountEdges added in v0.0.6

type AccountEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

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

func (AccountEdges) UserOrErr added in v0.0.6

func (e AccountEdges) UserOrErr() (*User, error)

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

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) 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) 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) ClearUser added in v0.0.6

func (m *AccountMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

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 int64, exists bool)

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

func (*AccountMutation) IDs added in v0.0.2

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

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

func (*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) 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) OldUpdatedAt added in v0.0.5

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

OldUpdatedAt returns the old "updated_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) 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) 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) ResetUpdatedAt added in v0.0.5

func (m *AccountMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AccountMutation) ResetUser added in v0.0.6

func (m *AccountMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

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) SetID added in v0.0.6

func (m *AccountMutation) SetID(id int64)

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

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) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" field.

func (*AccountMutation) SetUserID added in v0.0.6

func (m *AccountMutation) SetUserID(id int64)

SetUserID sets the "user" edge to the User entity by id.

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) UpdatedAt added in v0.0.5

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

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

func (*AccountMutation) UserCleared added in v0.0.6

func (m *AccountMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*AccountMutation) UserID added in v0.0.6

func (m *AccountMutation) UserID() (id int64, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*AccountMutation) UserIDs added in v0.0.6

func (m *AccountMutation) UserIDs() (ids []int64)

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

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 int64, 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) int64

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 {
	Platform account.Platform `json:"platform,omitempty"`
	Count int `json:"count,omitempty"`
}

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

func (*AccountQuery) IDs added in v0.0.2

func (aq *AccountQuery) IDs(ctx context.Context) (ids []int64, err 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) []int64

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 int64, 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) int64

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) QueryUser added in v0.0.6

func (aq *AccountQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

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 {
	Platform account.Platform `json:"platform,omitempty"`
}

client.Account.Query().
	Select(account.FieldPlatform).
	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.

func (*AccountQuery) WithUser added in v0.0.6

func (aq *AccountQuery) WithUser(opts ...func(*UserQuery)) *AccountQuery

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

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) ClearUser added in v0.0.6

func (au *AccountUpdate) ClearUser() *AccountUpdate

ClearUser clears the "user" edge to the User entity.

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) 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) SetNillableUserID added in v0.0.6

func (au *AccountUpdate) SetNillableUserID(id *int64) *AccountUpdate

SetNillableUserID sets the "user" edge to the User entity by ID 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) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" field.

func (*AccountUpdate) SetUser added in v0.0.6

func (au *AccountUpdate) SetUser(u *User) *AccountUpdate

SetUser sets the "user" edge to the User entity.

func (*AccountUpdate) SetUserID added in v0.0.6

func (au *AccountUpdate) SetUserID(id int64) *AccountUpdate

SetUserID sets the "user" edge to the User entity by ID.

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) ClearUser added in v0.0.6

func (auo *AccountUpdateOne) ClearUser() *AccountUpdateOne

ClearUser clears the "user" edge to the User entity.

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) 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) SetNillableUserID added in v0.0.6

func (auo *AccountUpdateOne) SetNillableUserID(id *int64) *AccountUpdateOne

SetNillableUserID sets the "user" edge to the User entity by ID 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.

func (*AccountUpdateOne) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" field.

func (*AccountUpdateOne) SetUser added in v0.0.6

func (auo *AccountUpdateOne) SetUser(u *User) *AccountUpdateOne

SetUser sets the "user" edge to the User entity.

func (*AccountUpdateOne) SetUserID added in v0.0.6

func (auo *AccountUpdateOne) SetUserID(id int64) *AccountUpdateOne

SetUserID sets the "user" edge to the User entity by ID.

func (*AccountUpdateOne) Where added in v0.0.5

Where appends a list predicates to the AccountUpdate builder.

type AccountUpsert added in v0.0.2

type AccountUpsert struct {
	*sql.UpdateSet
}

AccountUpsert is the "OnConflict" setter.

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) 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) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" 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) 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.

func (*AccountUpsert) UpdateUpdatedAt added in v0.0.5

func (u *AccountUpsert) UpdateUpdatedAt() *AccountUpsert

UpdateUpdatedAt sets the "updated_at" 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) 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) 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) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" 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) 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(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(account.FieldID)
		}),
	).
	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.

func (*AccountUpsertBulk) UpdateUpdatedAt added in v0.0.5

func (u *AccountUpsertBulk) UpdateUpdatedAt() *AccountUpsertBulk

UpdateUpdatedAt sets the "updated_at" 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) 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 int64, 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) int64

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) 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) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" 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) 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 except the ID field. Using this option is equivalent to using:

client.Account.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(account.FieldID)
		}),
	).
	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.

func (*AccountUpsertOne) UpdateUpdatedAt added in v0.0.5

func (u *AccountUpsertOne) UpdateUpdatedAt() *AccountUpsertOne

UpdateUpdatedAt sets the "updated_at" 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 int64 `json:"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"`
	// Version holds the value of the "version" field.
	Version string `json:"version,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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppQuery when eager-loading is set.
	Edges AppEdges `json:"edges"`
	// contains filtered or unexported fields
}

App is the model entity for the App schema.

func (*App) QueryAppPackage added in v0.0.6

func (a *App) QueryAppPackage() *AppPackageQuery

QueryAppPackage queries the "app_package" edge of the App entity.

func (*App) QueryUser added in v0.0.6

func (a *App) QueryUser() *UserQuery

QueryUser queries the "user" edge of the App entity.

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 int64) *AppDeleteOne

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

func (*AppClient) Get

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

Get returns a App entity by its id.

func (*AppClient) GetX

func (c *AppClient) GetX(ctx context.Context, id int64) *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)

Intercept 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) QueryAppPackage added in v0.0.6

func (c *AppClient) QueryAppPackage(a *App) *AppPackageQuery

QueryAppPackage queries the app_package edge of a App.

func (*AppClient) QueryUser added in v0.0.6

func (c *AppClient) QueryUser(a *App) *UserQuery

QueryUser queries the user edge of a 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 int64) *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) AddAppPackage added in v0.0.6

func (ac *AppCreate) AddAppPackage(a ...*AppPackage) *AppCreate

AddAppPackage adds the "app_package" edges to the AppPackage entity.

func (*AppCreate) AddAppPackageIDs added in v0.0.6

func (ac *AppCreate) AddAppPackageIDs(ids ...int64) *AppCreate

AddAppPackageIDs adds the "app_package" edge to the AppPackage entity by IDs.

func (*AppCreate) AddUser added in v0.0.6

func (ac *AppCreate) AddUser(u ...*User) *AppCreate

AddUser adds the "user" edges to the User entity.

func (*AppCreate) AddUserIDs added in v0.0.6

func (ac *AppCreate) AddUserIDs(ids ...int64) *AppCreate

AddUserIDs adds the "user" edge to the User entity by IDs.

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().
	SetSource(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) {
		SetSource(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) SetID added in v0.0.6

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

SetID sets the "id" field.

func (*AppCreate) SetImageURL

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

SetImageURL sets the "image_url" 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) SetNillableUpdatedAt added in v0.0.5

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

SetNillableUpdatedAt sets the "updated_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.

func (*AppCreate) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" field.

func (*AppCreate) SetVersion added in v0.0.5

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

SetVersion sets the "version" 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) {
		SetSource(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 AppEdges added in v0.0.6

type AppEdges struct {
	// User holds the value of the user edge.
	User []*User `json:"user,omitempty"`
	// AppPackage holds the value of the app_package edge.
	AppPackage []*AppPackage `json:"app_package,omitempty"`
	// contains filtered or unexported fields
}

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

func (AppEdges) AppPackageOrErr added in v0.0.6

func (e AppEdges) AppPackageOrErr() ([]*AppPackage, error)

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

func (AppEdges) UserOrErr added in v0.0.6

func (e AppEdges) UserOrErr() ([]*User, error)

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

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) AddAppPackageIDs added in v0.0.6

func (m *AppMutation) AddAppPackageIDs(ids ...int64)

AddAppPackageIDs adds the "app_package" edge to the AppPackage entity by ids.

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) AddUserIDs added in v0.0.6

func (m *AppMutation) AddUserIDs(ids ...int64)

AddUserIDs adds the "user" edge to the User entity by ids.

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) AppPackageCleared added in v0.0.6

func (m *AppMutation) AppPackageCleared() bool

AppPackageCleared reports if the "app_package" edge to the AppPackage entity was cleared.

func (*AppMutation) AppPackageIDs added in v0.0.6

func (m *AppMutation) AppPackageIDs() (ids []int64)

AppPackageIDs returns the "app_package" edge IDs in the mutation.

func (*AppMutation) ClearAppPackage added in v0.0.6

func (m *AppMutation) ClearAppPackage()

ClearAppPackage clears the "app_package" edge to the AppPackage entity.

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) ClearUser added in v0.0.6

func (m *AppMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

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 int64, exists bool)

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

func (*AppMutation) IDs

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

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

func (*AppMutation) ImageURL

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

ImageURL returns the value of the "image_url" 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) 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) OldUpdatedAt added in v0.0.5

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

OldUpdatedAt returns the old "updated_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) OldVersion added in v0.0.5

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

OldVersion returns the old "version" 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) RemoveAppPackageIDs added in v0.0.6

func (m *AppMutation) RemoveAppPackageIDs(ids ...int64)

RemoveAppPackageIDs removes the "app_package" edge to the AppPackage entity by IDs.

func (*AppMutation) RemoveUserIDs added in v0.0.6

func (m *AppMutation) RemoveUserIDs(ids ...int64)

RemoveUserIDs removes the "user" edge to the User entity by IDs.

func (*AppMutation) RemovedAppPackageIDs added in v0.0.6

func (m *AppMutation) RemovedAppPackageIDs() (ids []int64)

RemovedAppPackage returns the removed IDs of the "app_package" edge to the AppPackage entity.

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) RemovedUserIDs added in v0.0.6

func (m *AppMutation) RemovedUserIDs() (ids []int64)

RemovedUser returns the removed IDs of the "user" edge to the User entity.

func (*AppMutation) ResetAppPackage added in v0.0.6

func (m *AppMutation) ResetAppPackage()

ResetAppPackage resets all changes to the "app_package" edge.

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) 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) ResetUpdatedAt added in v0.0.5

func (m *AppMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppMutation) ResetUser added in v0.0.6

func (m *AppMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*AppMutation) ResetVersion added in v0.0.5

func (m *AppMutation) ResetVersion()

ResetVersion resets all changes to the "version" 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) SetID added in v0.0.6

func (m *AppMutation) SetID(id int64)

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

func (*AppMutation) SetImageURL

func (m *AppMutation) SetImageURL(s string)

SetImageURL sets the "image_url" 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) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" field.

func (*AppMutation) SetVersion added in v0.0.5

func (m *AppMutation) SetVersion(s string)

SetVersion sets the "version" 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) UpdatedAt added in v0.0.5

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

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

func (*AppMutation) UserCleared added in v0.0.6

func (m *AppMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*AppMutation) UserIDs added in v0.0.6

func (m *AppMutation) UserIDs() (ids []int64)

UserIDs returns the "user" edge IDs in the mutation.

func (*AppMutation) Version added in v0.0.5

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

Version returns the value of the "version" field in the mutation.

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 int64 `json:"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 int64 `json:"binary_size,omitempty"`
	// BinaryPublicURL holds the value of the "binary_public_url" field.
	BinaryPublicURL string `json:"binary_public_url,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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppPackageQuery when eager-loading is set.
	Edges AppPackageEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppPackage is the model entity for the AppPackage schema.

func (*AppPackage) QueryApp added in v0.0.6

func (ap *AppPackage) QueryApp() *AppQuery

QueryApp queries the "app" edge of the AppPackage entity.

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 int64) *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 int64) (*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 int64) *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)

Intercept 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) QueryApp added in v0.0.6

func (c *AppPackageClient) QueryApp(ap *AppPackage) *AppQuery

QueryApp queries the app edge of a 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 int64) *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().
	SetSource(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) {
		SetSource(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) SetApp added in v0.0.6

func (apc *AppPackageCreate) SetApp(a *App) *AppPackageCreate

SetApp sets the "app" edge to the App entity.

func (*AppPackageCreate) SetAppID added in v0.0.6

func (apc *AppPackageCreate) SetAppID(id int64) *AppPackageCreate

SetAppID sets the "app" edge to the App entity by ID.

func (*AppPackageCreate) SetBinaryName added in v0.0.4

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

SetBinaryName sets the "binary_name" field.

func (*AppPackageCreate) SetBinaryPublicURL added in v0.0.5

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

SetBinaryPublicURL sets the "binary_public_url" field.

func (*AppPackageCreate) SetBinarySize added in v0.0.4

func (apc *AppPackageCreate) SetBinarySize(i int64) *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) SetID added in v0.0.6

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

SetID sets the "id" field.

func (*AppPackageCreate) SetName added in v0.0.4

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

SetName sets the "name" field.

func (*AppPackageCreate) SetNillableAppID added in v0.0.6

func (apc *AppPackageCreate) SetNillableAppID(id *int64) *AppPackageCreate

SetNillableAppID sets the "app" edge to the App entity by ID if the given value is not nil.

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) SetNillableUpdatedAt added in v0.0.5

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

SetNillableUpdatedAt sets the "updated_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) {
		SetSource(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 AppPackageEdges added in v0.0.6

type AppPackageEdges struct {
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// contains filtered or unexported fields
}

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

func (AppPackageEdges) AppOrErr added in v0.0.6

func (e AppPackageEdges) AppOrErr() (*App, error)

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

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) AddBinarySize added in v0.0.5

func (m *AppPackageMutation) AddBinarySize(i int64)

AddBinarySize adds i to the "binary_size" field.

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) AddSourceID added in v0.0.4

func (m *AppPackageMutation) AddSourceID(i int64)

AddSourceID adds i to the "source_id" field.

func (*AppPackageMutation) AddedBinarySize added in v0.0.5

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

AddedBinarySize returns the value that was added to the "binary_size" field in this mutation.

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) 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) AppCleared added in v0.0.6

func (m *AppPackageMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

func (*AppPackageMutation) AppID added in v0.0.6

func (m *AppPackageMutation) AppID() (id int64, exists bool)

AppID returns the "app" edge ID in the mutation.

func (*AppPackageMutation) AppIDs added in v0.0.6

func (m *AppPackageMutation) AppIDs() (ids []int64)

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

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) BinaryPublicURL added in v0.0.5

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

BinaryPublicURL returns the value of the "binary_public_url" field in the mutation.

func (*AppPackageMutation) BinarySize added in v0.0.4

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

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

func (*AppPackageMutation) ClearApp added in v0.0.6

func (m *AppPackageMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

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 int64, exists bool)

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

func (*AppPackageMutation) IDs added in v0.0.4

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

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

func (*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) OldBinaryPublicURL added in v0.0.5

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

OldBinaryPublicURL returns the old "binary_public_url" 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 int64, 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) 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) ResetApp added in v0.0.6

func (m *AppPackageMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*AppPackageMutation) ResetBinaryName added in v0.0.4

func (m *AppPackageMutation) ResetBinaryName()

ResetBinaryName resets all changes to the "binary_name" field.

func (*AppPackageMutation) ResetBinaryPublicURL added in v0.0.5

func (m *AppPackageMutation) ResetBinaryPublicURL()

ResetBinaryPublicURL resets all changes to the "binary_public_url" 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) 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) SetAppID added in v0.0.6

func (m *AppPackageMutation) SetAppID(id int64)

SetAppID sets the "app" edge to the App entity by id.

func (*AppPackageMutation) SetBinaryName added in v0.0.4

func (m *AppPackageMutation) SetBinaryName(s string)

SetBinaryName sets the "binary_name" field.

func (*AppPackageMutation) SetBinaryPublicURL added in v0.0.5

func (m *AppPackageMutation) SetBinaryPublicURL(s string)

SetBinaryPublicURL sets the "binary_public_url" field.

func (*AppPackageMutation) SetBinarySize added in v0.0.4

func (m *AppPackageMutation) SetBinarySize(i int64)

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) SetID added in v0.0.6

func (m *AppPackageMutation) SetID(id int64)

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

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 int64, 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) int64

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 {
	Source apppackage.Source `json:"source,omitempty"`
	Count int `json:"count,omitempty"`
}

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

func (*AppPackageQuery) IDs added in v0.0.4

func (apq *AppPackageQuery) IDs(ctx context.Context) (ids []int64, err 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) []int64

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 int64, 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) int64

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) QueryApp added in v0.0.6

func (apq *AppPackageQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

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 {
	Source apppackage.Source `json:"source,omitempty"`
}

client.AppPackage.Query().
	Select(apppackage.FieldSource).
	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.

func (*AppPackageQuery) WithApp added in v0.0.6

func (apq *AppPackageQuery) WithApp(opts ...func(*AppQuery)) *AppPackageQuery

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

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) AddBinarySize added in v0.0.5

func (apu *AppPackageUpdate) AddBinarySize(i int64) *AppPackageUpdate

AddBinarySize adds i to the "binary_size" 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) ClearApp added in v0.0.6

func (apu *AppPackageUpdate) ClearApp() *AppPackageUpdate

ClearApp clears the "app" edge to the App entity.

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) SetApp added in v0.0.6

func (apu *AppPackageUpdate) SetApp(a *App) *AppPackageUpdate

SetApp sets the "app" edge to the App entity.

func (*AppPackageUpdate) SetAppID added in v0.0.6

func (apu *AppPackageUpdate) SetAppID(id int64) *AppPackageUpdate

SetAppID sets the "app" edge to the App entity by ID.

func (*AppPackageUpdate) SetBinaryName added in v0.0.4

func (apu *AppPackageUpdate) SetBinaryName(s string) *AppPackageUpdate

SetBinaryName sets the "binary_name" field.

func (*AppPackageUpdate) SetBinaryPublicURL added in v0.0.5

func (apu *AppPackageUpdate) SetBinaryPublicURL(s string) *AppPackageUpdate

SetBinaryPublicURL sets the "binary_public_url" field.

func (*AppPackageUpdate) SetBinarySize added in v0.0.4

func (apu *AppPackageUpdate) SetBinarySize(i int64) *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) SetName added in v0.0.4

func (apu *AppPackageUpdate) SetName(s string) *AppPackageUpdate

SetName sets the "name" field.

func (*AppPackageUpdate) SetNillableAppID added in v0.0.6

func (apu *AppPackageUpdate) SetNillableAppID(id *int64) *AppPackageUpdate

SetNillableAppID sets the "app" edge to the App entity by ID if the given value is not nil.

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) AddBinarySize added in v0.0.5

func (apuo *AppPackageUpdateOne) AddBinarySize(i int64) *AppPackageUpdateOne

AddBinarySize adds i to the "binary_size" 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) ClearApp added in v0.0.6

func (apuo *AppPackageUpdateOne) ClearApp() *AppPackageUpdateOne

ClearApp clears the "app" edge to the App entity.

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) SetApp added in v0.0.6

func (apuo *AppPackageUpdateOne) SetApp(a *App) *AppPackageUpdateOne

SetApp sets the "app" edge to the App entity.

func (*AppPackageUpdateOne) SetAppID added in v0.0.6

func (apuo *AppPackageUpdateOne) SetAppID(id int64) *AppPackageUpdateOne

SetAppID sets the "app" edge to the App entity by ID.

func (*AppPackageUpdateOne) SetBinaryName added in v0.0.4

func (apuo *AppPackageUpdateOne) SetBinaryName(s string) *AppPackageUpdateOne

SetBinaryName sets the "binary_name" field.

func (*AppPackageUpdateOne) SetBinaryPublicURL added in v0.0.5

func (apuo *AppPackageUpdateOne) SetBinaryPublicURL(s string) *AppPackageUpdateOne

SetBinaryPublicURL sets the "binary_public_url" field.

func (*AppPackageUpdateOne) SetBinarySize added in v0.0.4

func (apuo *AppPackageUpdateOne) SetBinarySize(i int64) *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) SetName added in v0.0.4

SetName sets the "name" field.

func (*AppPackageUpdateOne) SetNillableAppID added in v0.0.6

func (apuo *AppPackageUpdateOne) SetNillableAppID(id *int64) *AppPackageUpdateOne

SetNillableAppID sets the "app" edge to the App entity by ID if the given value is not nil.

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.

func (*AppPackageUpdateOne) Where added in v0.0.5

Where appends a list predicates to the AppPackageUpdate builder.

type AppPackageUpsert added in v0.0.4

type AppPackageUpsert struct {
	*sql.UpdateSet
}

AppPackageUpsert is the "OnConflict" setter.

func (*AppPackageUpsert) AddBinarySize added in v0.0.5

func (u *AppPackageUpsert) AddBinarySize(v int64) *AppPackageUpsert

AddBinarySize adds v to the "binary_size" 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) SetBinaryPublicURL added in v0.0.5

func (u *AppPackageUpsert) SetBinaryPublicURL(v string) *AppPackageUpsert

SetBinaryPublicURL sets the "binary_public_url" field.

func (*AppPackageUpsert) SetBinarySize added in v0.0.4

func (u *AppPackageUpsert) SetBinarySize(v int64) *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) 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) UpdateBinaryPublicURL added in v0.0.5

func (u *AppPackageUpsert) UpdateBinaryPublicURL() *AppPackageUpsert

UpdateBinaryPublicURL sets the "binary_public_url" 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) 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) AddBinarySize added in v0.0.5

func (u *AppPackageUpsertBulk) AddBinarySize(v int64) *AppPackageUpsertBulk

AddBinarySize adds v to the "binary_size" 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) SetBinaryPublicURL added in v0.0.5

func (u *AppPackageUpsertBulk) SetBinaryPublicURL(v string) *AppPackageUpsertBulk

SetBinaryPublicURL sets the "binary_public_url" field.

func (*AppPackageUpsertBulk) SetBinarySize added in v0.0.4

func (u *AppPackageUpsertBulk) SetBinarySize(v int64) *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) 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) UpdateBinaryPublicURL added in v0.0.5

func (u *AppPackageUpsertBulk) UpdateBinaryPublicURL() *AppPackageUpsertBulk

UpdateBinaryPublicURL sets the "binary_public_url" 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) 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(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(apppackage.FieldID)
		}),
	).
	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) AddBinarySize added in v0.0.5

func (u *AppPackageUpsertOne) AddBinarySize(v int64) *AppPackageUpsertOne

AddBinarySize adds v to the "binary_size" 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 int64, err error)

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

func (*AppPackageUpsertOne) IDX added in v0.0.4

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) SetBinaryPublicURL added in v0.0.5

func (u *AppPackageUpsertOne) SetBinaryPublicURL(v string) *AppPackageUpsertOne

SetBinaryPublicURL sets the "binary_public_url" field.

func (*AppPackageUpsertOne) SetBinarySize added in v0.0.4

func (u *AppPackageUpsertOne) SetBinarySize(v int64) *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) 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) UpdateBinaryPublicURL added in v0.0.5

func (u *AppPackageUpsertOne) UpdateBinaryPublicURL() *AppPackageUpsertOne

UpdateBinaryPublicURL sets the "binary_public_url" 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) 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 except the ID field. Using this option is equivalent to using:

client.AppPackage.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(apppackage.FieldID)
		}),
	).
	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 int64, 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) int64

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 {
	Source app.Source `json:"source,omitempty"`
	Count int `json:"count,omitempty"`
}

client.App.Query().
	GroupBy(app.FieldSource).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppQuery) IDs

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

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

func (*AppQuery) IDsX

func (aq *AppQuery) IDsX(ctx context.Context) []int64

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 int64, 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) int64

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) QueryAppPackage added in v0.0.6

func (aq *AppQuery) QueryAppPackage() *AppPackageQuery

QueryAppPackage chains the current query on the "app_package" edge.

func (*AppQuery) QueryUser added in v0.0.6

func (aq *AppQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

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 {
	Source app.Source `json:"source,omitempty"`
}

client.App.Query().
	Select(app.FieldSource).
	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.

func (*AppQuery) WithAppPackage added in v0.0.6

func (aq *AppQuery) WithAppPackage(opts ...func(*AppPackageQuery)) *AppQuery

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

func (*AppQuery) WithUser added in v0.0.6

func (aq *AppQuery) WithUser(opts ...func(*UserQuery)) *AppQuery

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

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) AddAppPackage added in v0.0.6

func (au *AppUpdate) AddAppPackage(a ...*AppPackage) *AppUpdate

AddAppPackage adds the "app_package" edges to the AppPackage entity.

func (*AppUpdate) AddAppPackageIDs added in v0.0.6

func (au *AppUpdate) AddAppPackageIDs(ids ...int64) *AppUpdate

AddAppPackageIDs adds the "app_package" edge to the AppPackage entity by IDs.

func (*AppUpdate) AddUser added in v0.0.6

func (au *AppUpdate) AddUser(u ...*User) *AppUpdate

AddUser adds the "user" edges to the User entity.

func (*AppUpdate) AddUserIDs added in v0.0.6

func (au *AppUpdate) AddUserIDs(ids ...int64) *AppUpdate

AddUserIDs adds the "user" edge to the User entity by IDs.

func (*AppUpdate) ClearAppPackage added in v0.0.6

func (au *AppUpdate) ClearAppPackage() *AppUpdate

ClearAppPackage clears all "app_package" edges to the AppPackage entity.

func (*AppUpdate) ClearUser added in v0.0.6

func (au *AppUpdate) ClearUser() *AppUpdate

ClearUser clears all "user" edges to the User entity.

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) RemoveAppPackage added in v0.0.6

func (au *AppUpdate) RemoveAppPackage(a ...*AppPackage) *AppUpdate

RemoveAppPackage removes "app_package" edges to AppPackage entities.

func (*AppUpdate) RemoveAppPackageIDs added in v0.0.6

func (au *AppUpdate) RemoveAppPackageIDs(ids ...int64) *AppUpdate

RemoveAppPackageIDs removes the "app_package" edge to AppPackage entities by IDs.

func (*AppUpdate) RemoveUser added in v0.0.6

func (au *AppUpdate) RemoveUser(u ...*User) *AppUpdate

RemoveUser removes "user" edges to User entities.

func (*AppUpdate) RemoveUserIDs added in v0.0.6

func (au *AppUpdate) RemoveUserIDs(ids ...int64) *AppUpdate

RemoveUserIDs removes the "user" edge to User entities by IDs.

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) 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) SetUpdatedAt added in v0.0.5

func (au *AppUpdate) SetUpdatedAt(t time.Time) *AppUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppUpdate) SetVersion added in v0.0.5

func (au *AppUpdate) SetVersion(s string) *AppUpdate

SetVersion sets the "version" 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) AddAppPackage added in v0.0.6

func (auo *AppUpdateOne) AddAppPackage(a ...*AppPackage) *AppUpdateOne

AddAppPackage adds the "app_package" edges to the AppPackage entity.

func (*AppUpdateOne) AddAppPackageIDs added in v0.0.6

func (auo *AppUpdateOne) AddAppPackageIDs(ids ...int64) *AppUpdateOne

AddAppPackageIDs adds the "app_package" edge to the AppPackage entity by IDs.

func (*AppUpdateOne) AddUser added in v0.0.6

func (auo *AppUpdateOne) AddUser(u ...*User) *AppUpdateOne

AddUser adds the "user" edges to the User entity.

func (*AppUpdateOne) AddUserIDs added in v0.0.6

func (auo *AppUpdateOne) AddUserIDs(ids ...int64) *AppUpdateOne

AddUserIDs adds the "user" edge to the User entity by IDs.

func (*AppUpdateOne) ClearAppPackage added in v0.0.6

func (auo *AppUpdateOne) ClearAppPackage() *AppUpdateOne

ClearAppPackage clears all "app_package" edges to the AppPackage entity.

func (*AppUpdateOne) ClearUser added in v0.0.6

func (auo *AppUpdateOne) ClearUser() *AppUpdateOne

ClearUser clears all "user" edges to the User entity.

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) RemoveAppPackage added in v0.0.6

func (auo *AppUpdateOne) RemoveAppPackage(a ...*AppPackage) *AppUpdateOne

RemoveAppPackage removes "app_package" edges to AppPackage entities.

func (*AppUpdateOne) RemoveAppPackageIDs added in v0.0.6

func (auo *AppUpdateOne) RemoveAppPackageIDs(ids ...int64) *AppUpdateOne

RemoveAppPackageIDs removes the "app_package" edge to AppPackage entities by IDs.

func (*AppUpdateOne) RemoveUser added in v0.0.6

func (auo *AppUpdateOne) RemoveUser(u ...*User) *AppUpdateOne

RemoveUser removes "user" edges to User entities.

func (*AppUpdateOne) RemoveUserIDs added in v0.0.6

func (auo *AppUpdateOne) RemoveUserIDs(ids ...int64) *AppUpdateOne

RemoveUserIDs removes the "user" edge to User entities by IDs.

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

func (*AppUpdateOne) SetUpdatedAt added in v0.0.5

func (auo *AppUpdateOne) SetUpdatedAt(t time.Time) *AppUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppUpdateOne) SetVersion added in v0.0.5

func (auo *AppUpdateOne) SetVersion(s string) *AppUpdateOne

SetVersion sets the "version" field.

func (*AppUpdateOne) Where added in v0.0.5

func (auo *AppUpdateOne) Where(ps ...predicate.App) *AppUpdateOne

Where appends a list predicates to the AppUpdate builder.

type AppUpsert added in v0.0.2

type AppUpsert struct {
	*sql.UpdateSet
}

AppUpsert is the "OnConflict" setter.

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) 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) SetUpdatedAt added in v0.0.5

func (u *AppUpsert) SetUpdatedAt(v time.Time) *AppUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppUpsert) SetVersion added in v0.0.5

func (u *AppUpsert) SetVersion(v string) *AppUpsert

SetVersion sets the "version" 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) 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.

func (*AppUpsert) UpdateUpdatedAt added in v0.0.5

func (u *AppUpsert) UpdateUpdatedAt() *AppUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppUpsert) UpdateVersion added in v0.0.5

func (u *AppUpsert) UpdateVersion() *AppUpsert

UpdateVersion sets the "version" 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) 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) 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) SetUpdatedAt added in v0.0.5

func (u *AppUpsertBulk) SetUpdatedAt(v time.Time) *AppUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AppUpsertBulk) SetVersion added in v0.0.5

func (u *AppUpsertBulk) SetVersion(v string) *AppUpsertBulk

SetVersion sets the "version" 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) 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(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(app.FieldID)
		}),
	).
	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.

func (*AppUpsertBulk) UpdateUpdatedAt added in v0.0.5

func (u *AppUpsertBulk) UpdateUpdatedAt() *AppUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateVersion added in v0.0.5

func (u *AppUpsertBulk) UpdateVersion() *AppUpsertBulk

UpdateVersion sets the "version" 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) 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 int64, 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) int64

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) 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) SetUpdatedAt added in v0.0.5

func (u *AppUpsertOne) SetUpdatedAt(v time.Time) *AppUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppUpsertOne) SetVersion added in v0.0.5

func (u *AppUpsertOne) SetVersion(v string) *AppUpsertOne

SetVersion sets the "version" 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) 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 except the ID field. Using this option is equivalent to using:

client.App.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(app.FieldID)
		}),
	).
	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.

func (*AppUpsertOne) UpdateUpdatedAt added in v0.0.5

func (u *AppUpsertOne) UpdateUpdatedAt() *AppUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppUpsertOne) UpdateVersion added in v0.0.5

func (u *AppUpsertOne) UpdateVersion() *AppUpsertOne

UpdateVersion sets the "version" 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
	// Feed is the client for interacting with the Feed builders.
	Feed *FeedClient
	// FeedConfig is the client for interacting with the FeedConfig builders.
	FeedConfig *FeedConfigClient
	// FeedItem is the client for interacting with the FeedItem builders.
	FeedItem *FeedItemClient
	// 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 Feed added in v0.0.5

type Feed struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Link holds the value of the "link" field.
	Link string `json:"link,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Language holds the value of the "language" field.
	Language string `json:"language,omitempty"`
	// Authors holds the value of the "authors" field.
	Authors []*modelfeed.Person `json:"authors,omitempty"`
	// Image holds the value of the "image" field.
	Image *modelfeed.Image `json:"image,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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FeedQuery when eager-loading is set.
	Edges FeedEdges `json:"edges"`
	// contains filtered or unexported fields
}

Feed is the model entity for the Feed schema.

func (*Feed) QueryConfig added in v0.0.5

func (f *Feed) QueryConfig() *FeedConfigQuery

QueryConfig queries the "config" edge of the Feed entity.

func (*Feed) QueryItem added in v0.0.6

func (f *Feed) QueryItem() *FeedItemQuery

QueryItem queries the "item" edge of the Feed entity.

func (*Feed) String added in v0.0.5

func (f *Feed) String() string

String implements the fmt.Stringer.

func (*Feed) Unwrap added in v0.0.5

func (f *Feed) Unwrap() *Feed

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

func (f *Feed) Update() *FeedUpdateOne

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

type FeedClient added in v0.0.5

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

FeedClient is a client for the Feed schema.

func NewFeedClient added in v0.0.5

func NewFeedClient(c config) *FeedClient

NewFeedClient returns a client for the Feed from the given config.

func (*FeedClient) Create added in v0.0.5

func (c *FeedClient) Create() *FeedCreate

Create returns a builder for creating a Feed entity.

func (*FeedClient) CreateBulk added in v0.0.5

func (c *FeedClient) CreateBulk(builders ...*FeedCreate) *FeedCreateBulk

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

func (*FeedClient) Delete added in v0.0.5

func (c *FeedClient) Delete() *FeedDelete

Delete returns a delete builder for Feed.

func (*FeedClient) DeleteOne added in v0.0.5

func (c *FeedClient) DeleteOne(f *Feed) *FeedDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FeedClient) DeleteOneID added in v0.0.5

func (c *FeedClient) DeleteOneID(id int64) *FeedDeleteOne

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

func (*FeedClient) Get added in v0.0.5

func (c *FeedClient) Get(ctx context.Context, id int64) (*Feed, error)

Get returns a Feed entity by its id.

func (*FeedClient) GetX added in v0.0.5

func (c *FeedClient) GetX(ctx context.Context, id int64) *Feed

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

func (*FeedClient) Hooks added in v0.0.5

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

Hooks returns the client hooks.

func (*FeedClient) Intercept added in v0.0.5

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

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

func (*FeedClient) Interceptors added in v0.0.5

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

Interceptors returns the client interceptors.

func (*FeedClient) Query added in v0.0.5

func (c *FeedClient) Query() *FeedQuery

Query returns a query builder for Feed.

func (*FeedClient) QueryConfig added in v0.0.5

func (c *FeedClient) QueryConfig(f *Feed) *FeedConfigQuery

QueryConfig queries the config edge of a Feed.

func (*FeedClient) QueryItem added in v0.0.6

func (c *FeedClient) QueryItem(f *Feed) *FeedItemQuery

QueryItem queries the item edge of a Feed.

func (*FeedClient) Update added in v0.0.5

func (c *FeedClient) Update() *FeedUpdate

Update returns an update builder for Feed.

func (*FeedClient) UpdateOne added in v0.0.5

func (c *FeedClient) UpdateOne(f *Feed) *FeedUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FeedClient) UpdateOneID added in v0.0.5

func (c *FeedClient) UpdateOneID(id int64) *FeedUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FeedClient) Use added in v0.0.5

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

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

type FeedConfig added in v0.0.5

type FeedConfig struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// FeedURL holds the value of the "feed_url" field.
	FeedURL string `json:"feed_url,omitempty"`
	// AuthorAccount holds the value of the "author_account" field.
	AuthorAccount int64 `json:"author_account,omitempty"`
	// Source holds the value of the "source" field.
	Source feedconfig.Source `json:"source,omitempty"`
	// Status holds the value of the "status" field.
	Status feedconfig.Status `json:"status,omitempty"`
	// PullInterval holds the value of the "pull_interval" field.
	PullInterval time.Duration `json:"pull_interval,omitempty"`
	// NextPullBeginAt holds the value of the "next_pull_begin_at" field.
	NextPullBeginAt time.Time `json:"next_pull_begin_at,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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FeedConfigQuery when eager-loading is set.
	Edges FeedConfigEdges `json:"edges"`
	// contains filtered or unexported fields
}

FeedConfig is the model entity for the FeedConfig schema.

func (*FeedConfig) QueryFeed added in v0.0.5

func (fc *FeedConfig) QueryFeed() *FeedQuery

QueryFeed queries the "feed" edge of the FeedConfig entity.

func (*FeedConfig) QueryUser added in v0.0.6

func (fc *FeedConfig) QueryUser() *UserQuery

QueryUser queries the "user" edge of the FeedConfig entity.

func (*FeedConfig) String added in v0.0.5

func (fc *FeedConfig) String() string

String implements the fmt.Stringer.

func (*FeedConfig) Unwrap added in v0.0.5

func (fc *FeedConfig) Unwrap() *FeedConfig

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

func (fc *FeedConfig) Update() *FeedConfigUpdateOne

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

type FeedConfigClient added in v0.0.5

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

FeedConfigClient is a client for the FeedConfig schema.

func NewFeedConfigClient added in v0.0.5

func NewFeedConfigClient(c config) *FeedConfigClient

NewFeedConfigClient returns a client for the FeedConfig from the given config.

func (*FeedConfigClient) Create added in v0.0.5

func (c *FeedConfigClient) Create() *FeedConfigCreate

Create returns a builder for creating a FeedConfig entity.

func (*FeedConfigClient) CreateBulk added in v0.0.5

func (c *FeedConfigClient) CreateBulk(builders ...*FeedConfigCreate) *FeedConfigCreateBulk

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

func (*FeedConfigClient) Delete added in v0.0.5

func (c *FeedConfigClient) Delete() *FeedConfigDelete

Delete returns a delete builder for FeedConfig.

func (*FeedConfigClient) DeleteOne added in v0.0.5

func (c *FeedConfigClient) DeleteOne(fc *FeedConfig) *FeedConfigDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FeedConfigClient) DeleteOneID added in v0.0.5

func (c *FeedConfigClient) DeleteOneID(id int64) *FeedConfigDeleteOne

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

func (*FeedConfigClient) Get added in v0.0.5

func (c *FeedConfigClient) Get(ctx context.Context, id int64) (*FeedConfig, error)

Get returns a FeedConfig entity by its id.

func (*FeedConfigClient) GetX added in v0.0.5

func (c *FeedConfigClient) GetX(ctx context.Context, id int64) *FeedConfig

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

func (*FeedConfigClient) Hooks added in v0.0.5

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

Hooks returns the client hooks.

func (*FeedConfigClient) Intercept added in v0.0.5

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

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

func (*FeedConfigClient) Interceptors added in v0.0.5

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

Interceptors returns the client interceptors.

func (*FeedConfigClient) Query added in v0.0.5

func (c *FeedConfigClient) Query() *FeedConfigQuery

Query returns a query builder for FeedConfig.

func (*FeedConfigClient) QueryFeed added in v0.0.5

func (c *FeedConfigClient) QueryFeed(fc *FeedConfig) *FeedQuery

QueryFeed queries the feed edge of a FeedConfig.

func (*FeedConfigClient) QueryUser added in v0.0.6

func (c *FeedConfigClient) QueryUser(fc *FeedConfig) *UserQuery

QueryUser queries the user edge of a FeedConfig.

func (*FeedConfigClient) Update added in v0.0.5

func (c *FeedConfigClient) Update() *FeedConfigUpdate

Update returns an update builder for FeedConfig.

func (*FeedConfigClient) UpdateOne added in v0.0.5

func (c *FeedConfigClient) UpdateOne(fc *FeedConfig) *FeedConfigUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FeedConfigClient) UpdateOneID added in v0.0.5

func (c *FeedConfigClient) UpdateOneID(id int64) *FeedConfigUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FeedConfigClient) Use added in v0.0.5

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

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

type FeedConfigCreate added in v0.0.5

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

FeedConfigCreate is the builder for creating a FeedConfig entity.

func (*FeedConfigCreate) Exec added in v0.0.5

func (fcc *FeedConfigCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FeedConfigCreate) ExecX added in v0.0.5

func (fcc *FeedConfigCreate) ExecX(ctx context.Context)

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

func (*FeedConfigCreate) Mutation added in v0.0.5

func (fcc *FeedConfigCreate) Mutation() *FeedConfigMutation

Mutation returns the FeedConfigMutation object of the builder.

func (*FeedConfigCreate) OnConflict added in v0.0.5

func (fcc *FeedConfigCreate) OnConflict(opts ...sql.ConflictOption) *FeedConfigUpsertOne

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

client.FeedConfig.Create().
	SetFeedURL(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.FeedConfigUpsert) {
		SetFeedURL(v+v).
	}).
	Exec(ctx)

func (*FeedConfigCreate) OnConflictColumns added in v0.0.5

func (fcc *FeedConfigCreate) OnConflictColumns(columns ...string) *FeedConfigUpsertOne

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

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

func (*FeedConfigCreate) Save added in v0.0.5

func (fcc *FeedConfigCreate) Save(ctx context.Context) (*FeedConfig, error)

Save creates the FeedConfig in the database.

func (*FeedConfigCreate) SaveX added in v0.0.5

func (fcc *FeedConfigCreate) SaveX(ctx context.Context) *FeedConfig

SaveX calls Save and panics if Save returns an error.

func (*FeedConfigCreate) SetAuthorAccount added in v0.0.5

func (fcc *FeedConfigCreate) SetAuthorAccount(i int64) *FeedConfigCreate

SetAuthorAccount sets the "author_account" field.

func (*FeedConfigCreate) SetCreatedAt added in v0.0.5

func (fcc *FeedConfigCreate) SetCreatedAt(t time.Time) *FeedConfigCreate

SetCreatedAt sets the "created_at" field.

func (*FeedConfigCreate) SetFeed added in v0.0.6

func (fcc *FeedConfigCreate) SetFeed(f *Feed) *FeedConfigCreate

SetFeed sets the "feed" edge to the Feed entity.

func (*FeedConfigCreate) SetFeedID added in v0.0.6

func (fcc *FeedConfigCreate) SetFeedID(id int64) *FeedConfigCreate

SetFeedID sets the "feed" edge to the Feed entity by ID.

func (*FeedConfigCreate) SetFeedURL added in v0.0.5

func (fcc *FeedConfigCreate) SetFeedURL(s string) *FeedConfigCreate

SetFeedURL sets the "feed_url" field.

func (*FeedConfigCreate) SetID added in v0.0.6

func (fcc *FeedConfigCreate) SetID(i int64) *FeedConfigCreate

SetID sets the "id" field.

func (*FeedConfigCreate) SetNextPullBeginAt added in v0.0.5

func (fcc *FeedConfigCreate) SetNextPullBeginAt(t time.Time) *FeedConfigCreate

SetNextPullBeginAt sets the "next_pull_begin_at" field.

func (*FeedConfigCreate) SetNillableCreatedAt added in v0.0.5

func (fcc *FeedConfigCreate) SetNillableCreatedAt(t *time.Time) *FeedConfigCreate

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

func (*FeedConfigCreate) SetNillableFeedID added in v0.0.6

func (fcc *FeedConfigCreate) SetNillableFeedID(id *int64) *FeedConfigCreate

SetNillableFeedID sets the "feed" edge to the Feed entity by ID if the given value is not nil.

func (*FeedConfigCreate) SetNillableNextPullBeginAt added in v0.0.5

func (fcc *FeedConfigCreate) SetNillableNextPullBeginAt(t *time.Time) *FeedConfigCreate

SetNillableNextPullBeginAt sets the "next_pull_begin_at" field if the given value is not nil.

func (*FeedConfigCreate) SetNillableUpdatedAt added in v0.0.5

func (fcc *FeedConfigCreate) SetNillableUpdatedAt(t *time.Time) *FeedConfigCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FeedConfigCreate) SetPullInterval added in v0.0.5

func (fcc *FeedConfigCreate) SetPullInterval(t time.Duration) *FeedConfigCreate

SetPullInterval sets the "pull_interval" field.

func (*FeedConfigCreate) SetSource added in v0.0.5

SetSource sets the "source" field.

func (*FeedConfigCreate) SetStatus added in v0.0.5

SetStatus sets the "status" field.

func (*FeedConfigCreate) SetUpdatedAt added in v0.0.5

func (fcc *FeedConfigCreate) SetUpdatedAt(t time.Time) *FeedConfigCreate

SetUpdatedAt sets the "updated_at" field.

func (*FeedConfigCreate) SetUser added in v0.0.6

func (fcc *FeedConfigCreate) SetUser(u *User) *FeedConfigCreate

SetUser sets the "user" edge to the User entity.

func (*FeedConfigCreate) SetUserID added in v0.0.6

func (fcc *FeedConfigCreate) SetUserID(id int64) *FeedConfigCreate

SetUserID sets the "user" edge to the User entity by ID.

type FeedConfigCreateBulk added in v0.0.5

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

FeedConfigCreateBulk is the builder for creating many FeedConfig entities in bulk.

func (*FeedConfigCreateBulk) Exec added in v0.0.5

func (fccb *FeedConfigCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FeedConfigCreateBulk) ExecX added in v0.0.5

func (fccb *FeedConfigCreateBulk) ExecX(ctx context.Context)

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

func (*FeedConfigCreateBulk) OnConflict added in v0.0.5

func (fccb *FeedConfigCreateBulk) OnConflict(opts ...sql.ConflictOption) *FeedConfigUpsertBulk

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

client.FeedConfig.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.FeedConfigUpsert) {
		SetFeedURL(v+v).
	}).
	Exec(ctx)

func (*FeedConfigCreateBulk) OnConflictColumns added in v0.0.5

func (fccb *FeedConfigCreateBulk) OnConflictColumns(columns ...string) *FeedConfigUpsertBulk

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

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

func (*FeedConfigCreateBulk) Save added in v0.0.5

func (fccb *FeedConfigCreateBulk) Save(ctx context.Context) ([]*FeedConfig, error)

Save creates the FeedConfig entities in the database.

func (*FeedConfigCreateBulk) SaveX added in v0.0.5

func (fccb *FeedConfigCreateBulk) SaveX(ctx context.Context) []*FeedConfig

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

type FeedConfigDelete added in v0.0.5

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

FeedConfigDelete is the builder for deleting a FeedConfig entity.

func (*FeedConfigDelete) Exec added in v0.0.5

func (fcd *FeedConfigDelete) Exec(ctx context.Context) (int, error)

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

func (*FeedConfigDelete) ExecX added in v0.0.5

func (fcd *FeedConfigDelete) ExecX(ctx context.Context) int

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

func (*FeedConfigDelete) Where added in v0.0.5

Where appends a list predicates to the FeedConfigDelete builder.

type FeedConfigDeleteOne added in v0.0.5

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

FeedConfigDeleteOne is the builder for deleting a single FeedConfig entity.

func (*FeedConfigDeleteOne) Exec added in v0.0.5

func (fcdo *FeedConfigDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FeedConfigDeleteOne) ExecX added in v0.0.5

func (fcdo *FeedConfigDeleteOne) ExecX(ctx context.Context)

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

func (*FeedConfigDeleteOne) Where added in v0.0.5

Where appends a list predicates to the FeedConfigDelete builder.

type FeedConfigEdges added in v0.0.5

type FeedConfigEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Feed holds the value of the feed edge.
	Feed *Feed `json:"feed,omitempty"`
	// contains filtered or unexported fields
}

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

func (FeedConfigEdges) FeedOrErr added in v0.0.5

func (e FeedConfigEdges) FeedOrErr() (*Feed, error)

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

func (FeedConfigEdges) UserOrErr added in v0.0.6

func (e FeedConfigEdges) UserOrErr() (*User, error)

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

type FeedConfigGroupBy added in v0.0.5

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

FeedConfigGroupBy is the group-by builder for FeedConfig entities.

func (*FeedConfigGroupBy) Aggregate added in v0.0.5

func (fcgb *FeedConfigGroupBy) Aggregate(fns ...AggregateFunc) *FeedConfigGroupBy

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

func (*FeedConfigGroupBy) Bool added in v0.0.5

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

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

func (*FeedConfigGroupBy) BoolX added in v0.0.5

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

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

func (*FeedConfigGroupBy) Bools added in v0.0.5

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

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

func (*FeedConfigGroupBy) BoolsX added in v0.0.5

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

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

func (*FeedConfigGroupBy) Float64 added in v0.0.5

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

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

func (*FeedConfigGroupBy) Float64X added in v0.0.5

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

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

func (*FeedConfigGroupBy) Float64s added in v0.0.5

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

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

func (*FeedConfigGroupBy) Float64sX added in v0.0.5

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

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

func (*FeedConfigGroupBy) Int added in v0.0.5

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

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

func (*FeedConfigGroupBy) IntX added in v0.0.5

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

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

func (*FeedConfigGroupBy) Ints added in v0.0.5

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

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

func (*FeedConfigGroupBy) IntsX added in v0.0.5

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

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

func (*FeedConfigGroupBy) Scan added in v0.0.5

func (fcgb *FeedConfigGroupBy) Scan(ctx context.Context, v any) error

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

func (*FeedConfigGroupBy) ScanX added in v0.0.5

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

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

func (*FeedConfigGroupBy) String added in v0.0.5

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

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

func (*FeedConfigGroupBy) StringX added in v0.0.5

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

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

func (*FeedConfigGroupBy) Strings added in v0.0.5

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

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

func (*FeedConfigGroupBy) StringsX added in v0.0.5

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

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

type FeedConfigMutation added in v0.0.5

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

FeedConfigMutation represents an operation that mutates the FeedConfig nodes in the graph.

func (*FeedConfigMutation) AddAuthorAccount added in v0.0.5

func (m *FeedConfigMutation) AddAuthorAccount(i int64)

AddAuthorAccount adds i to the "author_account" field.

func (*FeedConfigMutation) AddField added in v0.0.5

func (m *FeedConfigMutation) 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 (*FeedConfigMutation) AddPullInterval added in v0.0.5

func (m *FeedConfigMutation) AddPullInterval(t time.Duration)

AddPullInterval adds t to the "pull_interval" field.

func (*FeedConfigMutation) AddedAuthorAccount added in v0.0.5

func (m *FeedConfigMutation) AddedAuthorAccount() (r int64, exists bool)

AddedAuthorAccount returns the value that was added to the "author_account" field in this mutation.

func (*FeedConfigMutation) AddedEdges added in v0.0.5

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

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

func (*FeedConfigMutation) AddedField added in v0.0.5

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

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

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

func (*FeedConfigMutation) AddedIDs added in v0.0.5

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

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

func (*FeedConfigMutation) AddedPullInterval added in v0.0.5

func (m *FeedConfigMutation) AddedPullInterval() (r time.Duration, exists bool)

AddedPullInterval returns the value that was added to the "pull_interval" field in this mutation.

func (*FeedConfigMutation) AuthorAccount added in v0.0.5

func (m *FeedConfigMutation) AuthorAccount() (r int64, exists bool)

AuthorAccount returns the value of the "author_account" field in the mutation.

func (*FeedConfigMutation) ClearEdge added in v0.0.5

func (m *FeedConfigMutation) 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 (*FeedConfigMutation) ClearFeed added in v0.0.5

func (m *FeedConfigMutation) ClearFeed()

ClearFeed clears the "feed" edge to the Feed entity.

func (*FeedConfigMutation) ClearField added in v0.0.5

func (m *FeedConfigMutation) 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 (*FeedConfigMutation) ClearUser added in v0.0.6

func (m *FeedConfigMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*FeedConfigMutation) ClearedEdges added in v0.0.5

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

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

func (*FeedConfigMutation) ClearedFields added in v0.0.5

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

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

func (FeedConfigMutation) Client added in v0.0.5

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

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

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

func (*FeedConfigMutation) EdgeCleared added in v0.0.5

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

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

func (*FeedConfigMutation) FeedCleared added in v0.0.5

func (m *FeedConfigMutation) FeedCleared() bool

FeedCleared reports if the "feed" edge to the Feed entity was cleared.

func (*FeedConfigMutation) FeedID added in v0.0.6

func (m *FeedConfigMutation) FeedID() (id int64, exists bool)

FeedID returns the "feed" edge ID in the mutation.

func (*FeedConfigMutation) FeedIDs added in v0.0.5

func (m *FeedConfigMutation) FeedIDs() (ids []int64)

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

func (*FeedConfigMutation) FeedURL added in v0.0.5

func (m *FeedConfigMutation) FeedURL() (r string, exists bool)

FeedURL returns the value of the "feed_url" field in the mutation.

func (*FeedConfigMutation) Field added in v0.0.5

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

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

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

func (*FeedConfigMutation) Fields added in v0.0.5

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

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

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

func (*FeedConfigMutation) IDs added in v0.0.5

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

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

func (*FeedConfigMutation) NextPullBeginAt added in v0.0.5

func (m *FeedConfigMutation) NextPullBeginAt() (r time.Time, exists bool)

NextPullBeginAt returns the value of the "next_pull_begin_at" field in the mutation.

func (*FeedConfigMutation) OldAuthorAccount added in v0.0.5

func (m *FeedConfigMutation) OldAuthorAccount(ctx context.Context) (v int64, err error)

OldAuthorAccount returns the old "author_account" field's value of the FeedConfig entity. If the FeedConfig 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 (*FeedConfigMutation) OldCreatedAt added in v0.0.5

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

OldCreatedAt returns the old "created_at" field's value of the FeedConfig entity. If the FeedConfig 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 (*FeedConfigMutation) OldFeedURL added in v0.0.5

func (m *FeedConfigMutation) OldFeedURL(ctx context.Context) (v string, err error)

OldFeedURL returns the old "feed_url" field's value of the FeedConfig entity. If the FeedConfig 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 (*FeedConfigMutation) OldField added in v0.0.5

func (m *FeedConfigMutation) 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 (*FeedConfigMutation) OldNextPullBeginAt added in v0.0.5

func (m *FeedConfigMutation) OldNextPullBeginAt(ctx context.Context) (v time.Time, err error)

OldNextPullBeginAt returns the old "next_pull_begin_at" field's value of the FeedConfig entity. If the FeedConfig 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 (*FeedConfigMutation) OldPullInterval added in v0.0.5

func (m *FeedConfigMutation) OldPullInterval(ctx context.Context) (v time.Duration, err error)

OldPullInterval returns the old "pull_interval" field's value of the FeedConfig entity. If the FeedConfig 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 (*FeedConfigMutation) OldSource added in v0.0.5

func (m *FeedConfigMutation) OldSource(ctx context.Context) (v feedconfig.Source, err error)

OldSource returns the old "source" field's value of the FeedConfig entity. If the FeedConfig 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 (*FeedConfigMutation) OldStatus added in v0.0.5

func (m *FeedConfigMutation) OldStatus(ctx context.Context) (v feedconfig.Status, err error)

OldStatus returns the old "status" field's value of the FeedConfig entity. If the FeedConfig 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 (*FeedConfigMutation) OldUpdatedAt added in v0.0.5

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

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

func (m *FeedConfigMutation) Op() Op

Op returns the operation name.

func (*FeedConfigMutation) PullInterval added in v0.0.5

func (m *FeedConfigMutation) PullInterval() (r time.Duration, exists bool)

PullInterval returns the value of the "pull_interval" field in the mutation.

func (*FeedConfigMutation) RemovedEdges added in v0.0.5

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

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

func (*FeedConfigMutation) RemovedIDs added in v0.0.5

func (m *FeedConfigMutation) 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 (*FeedConfigMutation) ResetAuthorAccount added in v0.0.5

func (m *FeedConfigMutation) ResetAuthorAccount()

ResetAuthorAccount resets all changes to the "author_account" field.

func (*FeedConfigMutation) ResetCreatedAt added in v0.0.5

func (m *FeedConfigMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FeedConfigMutation) ResetEdge added in v0.0.5

func (m *FeedConfigMutation) 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 (*FeedConfigMutation) ResetFeed added in v0.0.5

func (m *FeedConfigMutation) ResetFeed()

ResetFeed resets all changes to the "feed" edge.

func (*FeedConfigMutation) ResetFeedURL added in v0.0.5

func (m *FeedConfigMutation) ResetFeedURL()

ResetFeedURL resets all changes to the "feed_url" field.

func (*FeedConfigMutation) ResetField added in v0.0.5

func (m *FeedConfigMutation) 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 (*FeedConfigMutation) ResetNextPullBeginAt added in v0.0.5

func (m *FeedConfigMutation) ResetNextPullBeginAt()

ResetNextPullBeginAt resets all changes to the "next_pull_begin_at" field.

func (*FeedConfigMutation) ResetPullInterval added in v0.0.5

func (m *FeedConfigMutation) ResetPullInterval()

ResetPullInterval resets all changes to the "pull_interval" field.

func (*FeedConfigMutation) ResetSource added in v0.0.5

func (m *FeedConfigMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*FeedConfigMutation) ResetStatus added in v0.0.5

func (m *FeedConfigMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*FeedConfigMutation) ResetUpdatedAt added in v0.0.5

func (m *FeedConfigMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FeedConfigMutation) ResetUser added in v0.0.6

func (m *FeedConfigMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*FeedConfigMutation) SetAuthorAccount added in v0.0.5

func (m *FeedConfigMutation) SetAuthorAccount(i int64)

SetAuthorAccount sets the "author_account" field.

func (*FeedConfigMutation) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedConfigMutation) SetFeedID added in v0.0.6

func (m *FeedConfigMutation) SetFeedID(id int64)

SetFeedID sets the "feed" edge to the Feed entity by id.

func (*FeedConfigMutation) SetFeedURL added in v0.0.5

func (m *FeedConfigMutation) SetFeedURL(s string)

SetFeedURL sets the "feed_url" field.

func (*FeedConfigMutation) SetField added in v0.0.5

func (m *FeedConfigMutation) 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 (*FeedConfigMutation) SetID added in v0.0.6

func (m *FeedConfigMutation) SetID(id int64)

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

func (*FeedConfigMutation) SetNextPullBeginAt added in v0.0.5

func (m *FeedConfigMutation) SetNextPullBeginAt(t time.Time)

SetNextPullBeginAt sets the "next_pull_begin_at" field.

func (*FeedConfigMutation) SetOp added in v0.0.5

func (m *FeedConfigMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FeedConfigMutation) SetPullInterval added in v0.0.5

func (m *FeedConfigMutation) SetPullInterval(t time.Duration)

SetPullInterval sets the "pull_interval" field.

func (*FeedConfigMutation) SetSource added in v0.0.5

func (m *FeedConfigMutation) SetSource(f feedconfig.Source)

SetSource sets the "source" field.

func (*FeedConfigMutation) SetStatus added in v0.0.5

func (m *FeedConfigMutation) SetStatus(f feedconfig.Status)

SetStatus sets the "status" field.

func (*FeedConfigMutation) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" field.

func (*FeedConfigMutation) SetUserID added in v0.0.6

func (m *FeedConfigMutation) SetUserID(id int64)

SetUserID sets the "user" edge to the User entity by id.

func (*FeedConfigMutation) Source added in v0.0.5

func (m *FeedConfigMutation) Source() (r feedconfig.Source, exists bool)

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

func (*FeedConfigMutation) Status added in v0.0.5

func (m *FeedConfigMutation) Status() (r feedconfig.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (FeedConfigMutation) Tx added in v0.0.5

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

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

func (*FeedConfigMutation) Type added in v0.0.5

func (m *FeedConfigMutation) Type() string

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

func (*FeedConfigMutation) UpdatedAt added in v0.0.5

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

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

func (*FeedConfigMutation) UserCleared added in v0.0.6

func (m *FeedConfigMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*FeedConfigMutation) UserID added in v0.0.6

func (m *FeedConfigMutation) UserID() (id int64, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*FeedConfigMutation) UserIDs added in v0.0.6

func (m *FeedConfigMutation) UserIDs() (ids []int64)

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

func (*FeedConfigMutation) Where added in v0.0.5

func (m *FeedConfigMutation) Where(ps ...predicate.FeedConfig)

Where appends a list predicates to the FeedConfigMutation builder.

func (*FeedConfigMutation) WhereP added in v0.0.5

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

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

type FeedConfigQuery added in v0.0.5

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

FeedConfigQuery is the builder for querying FeedConfig entities.

func (*FeedConfigQuery) Aggregate added in v0.0.5

func (fcq *FeedConfigQuery) Aggregate(fns ...AggregateFunc) *FeedConfigSelect

Aggregate returns a FeedConfigSelect configured with the given aggregations.

func (*FeedConfigQuery) All added in v0.0.5

func (fcq *FeedConfigQuery) All(ctx context.Context) ([]*FeedConfig, error)

All executes the query and returns a list of FeedConfigs.

func (*FeedConfigQuery) AllX added in v0.0.5

func (fcq *FeedConfigQuery) AllX(ctx context.Context) []*FeedConfig

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

func (*FeedConfigQuery) Clone added in v0.0.5

func (fcq *FeedConfigQuery) Clone() *FeedConfigQuery

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

func (*FeedConfigQuery) Count added in v0.0.5

func (fcq *FeedConfigQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FeedConfigQuery) CountX added in v0.0.5

func (fcq *FeedConfigQuery) CountX(ctx context.Context) int

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

func (*FeedConfigQuery) Exist added in v0.0.5

func (fcq *FeedConfigQuery) Exist(ctx context.Context) (bool, error)

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

func (*FeedConfigQuery) ExistX added in v0.0.5

func (fcq *FeedConfigQuery) ExistX(ctx context.Context) bool

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

func (*FeedConfigQuery) First added in v0.0.5

func (fcq *FeedConfigQuery) First(ctx context.Context) (*FeedConfig, error)

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

func (*FeedConfigQuery) FirstID added in v0.0.5

func (fcq *FeedConfigQuery) FirstID(ctx context.Context) (id int64, err error)

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

func (*FeedConfigQuery) FirstIDX added in v0.0.5

func (fcq *FeedConfigQuery) FirstIDX(ctx context.Context) int64

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

func (*FeedConfigQuery) FirstX added in v0.0.5

func (fcq *FeedConfigQuery) FirstX(ctx context.Context) *FeedConfig

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

func (*FeedConfigQuery) GroupBy added in v0.0.5

func (fcq *FeedConfigQuery) GroupBy(field string, fields ...string) *FeedConfigGroupBy

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 {
	FeedURL string `json:"feed_url,omitempty"`
	Count int `json:"count,omitempty"`
}

client.FeedConfig.Query().
	GroupBy(feedconfig.FieldFeedURL).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FeedConfigQuery) IDs added in v0.0.5

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

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

func (*FeedConfigQuery) IDsX added in v0.0.5

func (fcq *FeedConfigQuery) IDsX(ctx context.Context) []int64

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

func (*FeedConfigQuery) Limit added in v0.0.5

func (fcq *FeedConfigQuery) Limit(limit int) *FeedConfigQuery

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

func (*FeedConfigQuery) Offset added in v0.0.5

func (fcq *FeedConfigQuery) Offset(offset int) *FeedConfigQuery

Offset to start from.

func (*FeedConfigQuery) Only added in v0.0.5

func (fcq *FeedConfigQuery) Only(ctx context.Context) (*FeedConfig, error)

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

func (*FeedConfigQuery) OnlyID added in v0.0.5

func (fcq *FeedConfigQuery) OnlyID(ctx context.Context) (id int64, err error)

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

func (*FeedConfigQuery) OnlyIDX added in v0.0.5

func (fcq *FeedConfigQuery) OnlyIDX(ctx context.Context) int64

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

func (*FeedConfigQuery) OnlyX added in v0.0.5

func (fcq *FeedConfigQuery) OnlyX(ctx context.Context) *FeedConfig

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

func (*FeedConfigQuery) Order added in v0.0.5

func (fcq *FeedConfigQuery) Order(o ...OrderFunc) *FeedConfigQuery

Order specifies how the records should be ordered.

func (*FeedConfigQuery) QueryFeed added in v0.0.5

func (fcq *FeedConfigQuery) QueryFeed() *FeedQuery

QueryFeed chains the current query on the "feed" edge.

func (*FeedConfigQuery) QueryUser added in v0.0.6

func (fcq *FeedConfigQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*FeedConfigQuery) Select added in v0.0.5

func (fcq *FeedConfigQuery) Select(fields ...string) *FeedConfigSelect

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 {
	FeedURL string `json:"feed_url,omitempty"`
}

client.FeedConfig.Query().
	Select(feedconfig.FieldFeedURL).
	Scan(ctx, &v)

func (*FeedConfigQuery) Unique added in v0.0.5

func (fcq *FeedConfigQuery) Unique(unique bool) *FeedConfigQuery

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

Where adds a new predicate for the FeedConfigQuery builder.

func (*FeedConfigQuery) WithFeed added in v0.0.5

func (fcq *FeedConfigQuery) WithFeed(opts ...func(*FeedQuery)) *FeedConfigQuery

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

func (*FeedConfigQuery) WithUser added in v0.0.6

func (fcq *FeedConfigQuery) WithUser(opts ...func(*UserQuery)) *FeedConfigQuery

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

type FeedConfigSelect added in v0.0.5

type FeedConfigSelect struct {
	*FeedConfigQuery
	// contains filtered or unexported fields
}

FeedConfigSelect is the builder for selecting fields of FeedConfig entities.

func (*FeedConfigSelect) Aggregate added in v0.0.5

func (fcs *FeedConfigSelect) Aggregate(fns ...AggregateFunc) *FeedConfigSelect

Aggregate adds the given aggregation functions to the selector query.

func (*FeedConfigSelect) Bool added in v0.0.5

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

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

func (*FeedConfigSelect) BoolX added in v0.0.5

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

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

func (*FeedConfigSelect) Bools added in v0.0.5

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

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

func (*FeedConfigSelect) BoolsX added in v0.0.5

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

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

func (*FeedConfigSelect) Float64 added in v0.0.5

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

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

func (*FeedConfigSelect) Float64X added in v0.0.5

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

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

func (*FeedConfigSelect) Float64s added in v0.0.5

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

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

func (*FeedConfigSelect) Float64sX added in v0.0.5

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

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

func (*FeedConfigSelect) Int added in v0.0.5

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

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

func (*FeedConfigSelect) IntX added in v0.0.5

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

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

func (*FeedConfigSelect) Ints added in v0.0.5

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

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

func (*FeedConfigSelect) IntsX added in v0.0.5

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

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

func (*FeedConfigSelect) Scan added in v0.0.5

func (fcs *FeedConfigSelect) Scan(ctx context.Context, v any) error

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

func (*FeedConfigSelect) ScanX added in v0.0.5

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

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

func (*FeedConfigSelect) String added in v0.0.5

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

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

func (*FeedConfigSelect) StringX added in v0.0.5

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

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

func (*FeedConfigSelect) Strings added in v0.0.5

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

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

func (*FeedConfigSelect) StringsX added in v0.0.5

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

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

type FeedConfigUpdate added in v0.0.5

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

FeedConfigUpdate is the builder for updating FeedConfig entities.

func (*FeedConfigUpdate) AddAuthorAccount added in v0.0.5

func (fcu *FeedConfigUpdate) AddAuthorAccount(i int64) *FeedConfigUpdate

AddAuthorAccount adds i to the "author_account" field.

func (*FeedConfigUpdate) AddPullInterval added in v0.0.5

func (fcu *FeedConfigUpdate) AddPullInterval(t time.Duration) *FeedConfigUpdate

AddPullInterval adds t to the "pull_interval" field.

func (*FeedConfigUpdate) ClearFeed added in v0.0.5

func (fcu *FeedConfigUpdate) ClearFeed() *FeedConfigUpdate

ClearFeed clears the "feed" edge to the Feed entity.

func (*FeedConfigUpdate) ClearUser added in v0.0.6

func (fcu *FeedConfigUpdate) ClearUser() *FeedConfigUpdate

ClearUser clears the "user" edge to the User entity.

func (*FeedConfigUpdate) Exec added in v0.0.5

func (fcu *FeedConfigUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FeedConfigUpdate) ExecX added in v0.0.5

func (fcu *FeedConfigUpdate) ExecX(ctx context.Context)

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

func (*FeedConfigUpdate) Mutation added in v0.0.5

func (fcu *FeedConfigUpdate) Mutation() *FeedConfigMutation

Mutation returns the FeedConfigMutation object of the builder.

func (*FeedConfigUpdate) Save added in v0.0.5

func (fcu *FeedConfigUpdate) Save(ctx context.Context) (int, error)

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

func (*FeedConfigUpdate) SaveX added in v0.0.5

func (fcu *FeedConfigUpdate) SaveX(ctx context.Context) int

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

func (*FeedConfigUpdate) SetAuthorAccount added in v0.0.5

func (fcu *FeedConfigUpdate) SetAuthorAccount(i int64) *FeedConfigUpdate

SetAuthorAccount sets the "author_account" field.

func (*FeedConfigUpdate) SetCreatedAt added in v0.0.5

func (fcu *FeedConfigUpdate) SetCreatedAt(t time.Time) *FeedConfigUpdate

SetCreatedAt sets the "created_at" field.

func (*FeedConfigUpdate) SetFeed added in v0.0.6

func (fcu *FeedConfigUpdate) SetFeed(f *Feed) *FeedConfigUpdate

SetFeed sets the "feed" edge to the Feed entity.

func (*FeedConfigUpdate) SetFeedID added in v0.0.6

func (fcu *FeedConfigUpdate) SetFeedID(id int64) *FeedConfigUpdate

SetFeedID sets the "feed" edge to the Feed entity by ID.

func (*FeedConfigUpdate) SetFeedURL added in v0.0.5

func (fcu *FeedConfigUpdate) SetFeedURL(s string) *FeedConfigUpdate

SetFeedURL sets the "feed_url" field.

func (*FeedConfigUpdate) SetNextPullBeginAt added in v0.0.5

func (fcu *FeedConfigUpdate) SetNextPullBeginAt(t time.Time) *FeedConfigUpdate

SetNextPullBeginAt sets the "next_pull_begin_at" field.

func (*FeedConfigUpdate) SetNillableCreatedAt added in v0.0.5

func (fcu *FeedConfigUpdate) SetNillableCreatedAt(t *time.Time) *FeedConfigUpdate

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

func (*FeedConfigUpdate) SetNillableFeedID added in v0.0.6

func (fcu *FeedConfigUpdate) SetNillableFeedID(id *int64) *FeedConfigUpdate

SetNillableFeedID sets the "feed" edge to the Feed entity by ID if the given value is not nil.

func (*FeedConfigUpdate) SetNillableNextPullBeginAt added in v0.0.5

func (fcu *FeedConfigUpdate) SetNillableNextPullBeginAt(t *time.Time) *FeedConfigUpdate

SetNillableNextPullBeginAt sets the "next_pull_begin_at" field if the given value is not nil.

func (*FeedConfigUpdate) SetPullInterval added in v0.0.5

func (fcu *FeedConfigUpdate) SetPullInterval(t time.Duration) *FeedConfigUpdate

SetPullInterval sets the "pull_interval" field.

func (*FeedConfigUpdate) SetSource added in v0.0.5

SetSource sets the "source" field.

func (*FeedConfigUpdate) SetStatus added in v0.0.5

SetStatus sets the "status" field.

func (*FeedConfigUpdate) SetUpdatedAt added in v0.0.5

func (fcu *FeedConfigUpdate) SetUpdatedAt(t time.Time) *FeedConfigUpdate

SetUpdatedAt sets the "updated_at" field.

func (*FeedConfigUpdate) SetUser added in v0.0.6

func (fcu *FeedConfigUpdate) SetUser(u *User) *FeedConfigUpdate

SetUser sets the "user" edge to the User entity.

func (*FeedConfigUpdate) SetUserID added in v0.0.6

func (fcu *FeedConfigUpdate) SetUserID(id int64) *FeedConfigUpdate

SetUserID sets the "user" edge to the User entity by ID.

func (*FeedConfigUpdate) Where added in v0.0.5

Where appends a list predicates to the FeedConfigUpdate builder.

type FeedConfigUpdateOne added in v0.0.5

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

FeedConfigUpdateOne is the builder for updating a single FeedConfig entity.

func (*FeedConfigUpdateOne) AddAuthorAccount added in v0.0.5

func (fcuo *FeedConfigUpdateOne) AddAuthorAccount(i int64) *FeedConfigUpdateOne

AddAuthorAccount adds i to the "author_account" field.

func (*FeedConfigUpdateOne) AddPullInterval added in v0.0.5

func (fcuo *FeedConfigUpdateOne) AddPullInterval(t time.Duration) *FeedConfigUpdateOne

AddPullInterval adds t to the "pull_interval" field.

func (*FeedConfigUpdateOne) ClearFeed added in v0.0.5

func (fcuo *FeedConfigUpdateOne) ClearFeed() *FeedConfigUpdateOne

ClearFeed clears the "feed" edge to the Feed entity.

func (*FeedConfigUpdateOne) ClearUser added in v0.0.6

func (fcuo *FeedConfigUpdateOne) ClearUser() *FeedConfigUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*FeedConfigUpdateOne) Exec added in v0.0.5

func (fcuo *FeedConfigUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FeedConfigUpdateOne) ExecX added in v0.0.5

func (fcuo *FeedConfigUpdateOne) ExecX(ctx context.Context)

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

func (*FeedConfigUpdateOne) Mutation added in v0.0.5

func (fcuo *FeedConfigUpdateOne) Mutation() *FeedConfigMutation

Mutation returns the FeedConfigMutation object of the builder.

func (*FeedConfigUpdateOne) Save added in v0.0.5

func (fcuo *FeedConfigUpdateOne) Save(ctx context.Context) (*FeedConfig, error)

Save executes the query and returns the updated FeedConfig entity.

func (*FeedConfigUpdateOne) SaveX added in v0.0.5

func (fcuo *FeedConfigUpdateOne) SaveX(ctx context.Context) *FeedConfig

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

func (*FeedConfigUpdateOne) Select added in v0.0.5

func (fcuo *FeedConfigUpdateOne) Select(field string, fields ...string) *FeedConfigUpdateOne

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

func (*FeedConfigUpdateOne) SetAuthorAccount added in v0.0.5

func (fcuo *FeedConfigUpdateOne) SetAuthorAccount(i int64) *FeedConfigUpdateOne

SetAuthorAccount sets the "author_account" field.

func (*FeedConfigUpdateOne) SetCreatedAt added in v0.0.5

func (fcuo *FeedConfigUpdateOne) SetCreatedAt(t time.Time) *FeedConfigUpdateOne

SetCreatedAt sets the "created_at" field.

func (*FeedConfigUpdateOne) SetFeed added in v0.0.6

func (fcuo *FeedConfigUpdateOne) SetFeed(f *Feed) *FeedConfigUpdateOne

SetFeed sets the "feed" edge to the Feed entity.

func (*FeedConfigUpdateOne) SetFeedID added in v0.0.6

func (fcuo *FeedConfigUpdateOne) SetFeedID(id int64) *FeedConfigUpdateOne

SetFeedID sets the "feed" edge to the Feed entity by ID.

func (*FeedConfigUpdateOne) SetFeedURL added in v0.0.5

func (fcuo *FeedConfigUpdateOne) SetFeedURL(s string) *FeedConfigUpdateOne

SetFeedURL sets the "feed_url" field.

func (*FeedConfigUpdateOne) SetNextPullBeginAt added in v0.0.5

func (fcuo *FeedConfigUpdateOne) SetNextPullBeginAt(t time.Time) *FeedConfigUpdateOne

SetNextPullBeginAt sets the "next_pull_begin_at" field.

func (*FeedConfigUpdateOne) SetNillableCreatedAt added in v0.0.5

func (fcuo *FeedConfigUpdateOne) SetNillableCreatedAt(t *time.Time) *FeedConfigUpdateOne

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

func (*FeedConfigUpdateOne) SetNillableFeedID added in v0.0.6

func (fcuo *FeedConfigUpdateOne) SetNillableFeedID(id *int64) *FeedConfigUpdateOne

SetNillableFeedID sets the "feed" edge to the Feed entity by ID if the given value is not nil.

func (*FeedConfigUpdateOne) SetNillableNextPullBeginAt added in v0.0.5

func (fcuo *FeedConfigUpdateOne) SetNillableNextPullBeginAt(t *time.Time) *FeedConfigUpdateOne

SetNillableNextPullBeginAt sets the "next_pull_begin_at" field if the given value is not nil.

func (*FeedConfigUpdateOne) SetPullInterval added in v0.0.5

func (fcuo *FeedConfigUpdateOne) SetPullInterval(t time.Duration) *FeedConfigUpdateOne

SetPullInterval sets the "pull_interval" field.

func (*FeedConfigUpdateOne) SetSource added in v0.0.5

SetSource sets the "source" field.

func (*FeedConfigUpdateOne) SetStatus added in v0.0.5

SetStatus sets the "status" field.

func (*FeedConfigUpdateOne) SetUpdatedAt added in v0.0.5

func (fcuo *FeedConfigUpdateOne) SetUpdatedAt(t time.Time) *FeedConfigUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*FeedConfigUpdateOne) SetUser added in v0.0.6

func (fcuo *FeedConfigUpdateOne) SetUser(u *User) *FeedConfigUpdateOne

SetUser sets the "user" edge to the User entity.

func (*FeedConfigUpdateOne) SetUserID added in v0.0.6

func (fcuo *FeedConfigUpdateOne) SetUserID(id int64) *FeedConfigUpdateOne

SetUserID sets the "user" edge to the User entity by ID.

func (*FeedConfigUpdateOne) Where added in v0.0.5

Where appends a list predicates to the FeedConfigUpdate builder.

type FeedConfigUpsert added in v0.0.5

type FeedConfigUpsert struct {
	*sql.UpdateSet
}

FeedConfigUpsert is the "OnConflict" setter.

func (*FeedConfigUpsert) AddAuthorAccount added in v0.0.5

func (u *FeedConfigUpsert) AddAuthorAccount(v int64) *FeedConfigUpsert

AddAuthorAccount adds v to the "author_account" field.

func (*FeedConfigUpsert) AddPullInterval added in v0.0.5

func (u *FeedConfigUpsert) AddPullInterval(v time.Duration) *FeedConfigUpsert

AddPullInterval adds v to the "pull_interval" field.

func (*FeedConfigUpsert) SetAuthorAccount added in v0.0.5

func (u *FeedConfigUpsert) SetAuthorAccount(v int64) *FeedConfigUpsert

SetAuthorAccount sets the "author_account" field.

func (*FeedConfigUpsert) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedConfigUpsert) SetFeedURL added in v0.0.5

func (u *FeedConfigUpsert) SetFeedURL(v string) *FeedConfigUpsert

SetFeedURL sets the "feed_url" field.

func (*FeedConfigUpsert) SetNextPullBeginAt added in v0.0.5

func (u *FeedConfigUpsert) SetNextPullBeginAt(v time.Time) *FeedConfigUpsert

SetNextPullBeginAt sets the "next_pull_begin_at" field.

func (*FeedConfigUpsert) SetPullInterval added in v0.0.5

func (u *FeedConfigUpsert) SetPullInterval(v time.Duration) *FeedConfigUpsert

SetPullInterval sets the "pull_interval" field.

func (*FeedConfigUpsert) SetSource added in v0.0.5

SetSource sets the "source" field.

func (*FeedConfigUpsert) SetStatus added in v0.0.5

SetStatus sets the "status" field.

func (*FeedConfigUpsert) SetUpdatedAt added in v0.0.5

func (u *FeedConfigUpsert) SetUpdatedAt(v time.Time) *FeedConfigUpsert

SetUpdatedAt sets the "updated_at" field.

func (*FeedConfigUpsert) UpdateAuthorAccount added in v0.0.5

func (u *FeedConfigUpsert) UpdateAuthorAccount() *FeedConfigUpsert

UpdateAuthorAccount sets the "author_account" field to the value that was provided on create.

func (*FeedConfigUpsert) UpdateCreatedAt added in v0.0.5

func (u *FeedConfigUpsert) UpdateCreatedAt() *FeedConfigUpsert

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

func (*FeedConfigUpsert) UpdateFeedURL added in v0.0.5

func (u *FeedConfigUpsert) UpdateFeedURL() *FeedConfigUpsert

UpdateFeedURL sets the "feed_url" field to the value that was provided on create.

func (*FeedConfigUpsert) UpdateNextPullBeginAt added in v0.0.5

func (u *FeedConfigUpsert) UpdateNextPullBeginAt() *FeedConfigUpsert

UpdateNextPullBeginAt sets the "next_pull_begin_at" field to the value that was provided on create.

func (*FeedConfigUpsert) UpdatePullInterval added in v0.0.5

func (u *FeedConfigUpsert) UpdatePullInterval() *FeedConfigUpsert

UpdatePullInterval sets the "pull_interval" field to the value that was provided on create.

func (*FeedConfigUpsert) UpdateSource added in v0.0.5

func (u *FeedConfigUpsert) UpdateSource() *FeedConfigUpsert

UpdateSource sets the "source" field to the value that was provided on create.

func (*FeedConfigUpsert) UpdateStatus added in v0.0.5

func (u *FeedConfigUpsert) UpdateStatus() *FeedConfigUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*FeedConfigUpsert) UpdateUpdatedAt added in v0.0.5

func (u *FeedConfigUpsert) UpdateUpdatedAt() *FeedConfigUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type FeedConfigUpsertBulk added in v0.0.5

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

FeedConfigUpsertBulk is the builder for "upsert"-ing a bulk of FeedConfig nodes.

func (*FeedConfigUpsertBulk) AddAuthorAccount added in v0.0.5

func (u *FeedConfigUpsertBulk) AddAuthorAccount(v int64) *FeedConfigUpsertBulk

AddAuthorAccount adds v to the "author_account" field.

func (*FeedConfigUpsertBulk) AddPullInterval added in v0.0.5

func (u *FeedConfigUpsertBulk) AddPullInterval(v time.Duration) *FeedConfigUpsertBulk

AddPullInterval adds v to the "pull_interval" field.

func (*FeedConfigUpsertBulk) DoNothing added in v0.0.5

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

func (*FeedConfigUpsertBulk) Exec added in v0.0.5

Exec executes the query.

func (*FeedConfigUpsertBulk) ExecX added in v0.0.5

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

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

func (*FeedConfigUpsertBulk) Ignore added in v0.0.5

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

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

func (*FeedConfigUpsertBulk) SetAuthorAccount added in v0.0.5

func (u *FeedConfigUpsertBulk) SetAuthorAccount(v int64) *FeedConfigUpsertBulk

SetAuthorAccount sets the "author_account" field.

func (*FeedConfigUpsertBulk) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedConfigUpsertBulk) SetFeedURL added in v0.0.5

SetFeedURL sets the "feed_url" field.

func (*FeedConfigUpsertBulk) SetNextPullBeginAt added in v0.0.5

func (u *FeedConfigUpsertBulk) SetNextPullBeginAt(v time.Time) *FeedConfigUpsertBulk

SetNextPullBeginAt sets the "next_pull_begin_at" field.

func (*FeedConfigUpsertBulk) SetPullInterval added in v0.0.5

func (u *FeedConfigUpsertBulk) SetPullInterval(v time.Duration) *FeedConfigUpsertBulk

SetPullInterval sets the "pull_interval" field.

func (*FeedConfigUpsertBulk) SetSource added in v0.0.5

SetSource sets the "source" field.

func (*FeedConfigUpsertBulk) SetStatus added in v0.0.5

SetStatus sets the "status" field.

func (*FeedConfigUpsertBulk) SetUpdatedAt added in v0.0.5

func (u *FeedConfigUpsertBulk) SetUpdatedAt(v time.Time) *FeedConfigUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*FeedConfigUpsertBulk) Update added in v0.0.5

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

func (*FeedConfigUpsertBulk) UpdateAuthorAccount added in v0.0.5

func (u *FeedConfigUpsertBulk) UpdateAuthorAccount() *FeedConfigUpsertBulk

UpdateAuthorAccount sets the "author_account" field to the value that was provided on create.

func (*FeedConfigUpsertBulk) UpdateCreatedAt added in v0.0.5

func (u *FeedConfigUpsertBulk) UpdateCreatedAt() *FeedConfigUpsertBulk

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

func (*FeedConfigUpsertBulk) UpdateFeedURL added in v0.0.5

func (u *FeedConfigUpsertBulk) UpdateFeedURL() *FeedConfigUpsertBulk

UpdateFeedURL sets the "feed_url" field to the value that was provided on create.

func (*FeedConfigUpsertBulk) UpdateNewValues added in v0.0.5

func (u *FeedConfigUpsertBulk) UpdateNewValues() *FeedConfigUpsertBulk

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

client.FeedConfig.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(feedconfig.FieldID)
		}),
	).
	Exec(ctx)

func (*FeedConfigUpsertBulk) UpdateNextPullBeginAt added in v0.0.5

func (u *FeedConfigUpsertBulk) UpdateNextPullBeginAt() *FeedConfigUpsertBulk

UpdateNextPullBeginAt sets the "next_pull_begin_at" field to the value that was provided on create.

func (*FeedConfigUpsertBulk) UpdatePullInterval added in v0.0.5

func (u *FeedConfigUpsertBulk) UpdatePullInterval() *FeedConfigUpsertBulk

UpdatePullInterval sets the "pull_interval" field to the value that was provided on create.

func (*FeedConfigUpsertBulk) UpdateSource added in v0.0.5

func (u *FeedConfigUpsertBulk) UpdateSource() *FeedConfigUpsertBulk

UpdateSource sets the "source" field to the value that was provided on create.

func (*FeedConfigUpsertBulk) UpdateStatus added in v0.0.5

func (u *FeedConfigUpsertBulk) UpdateStatus() *FeedConfigUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*FeedConfigUpsertBulk) UpdateUpdatedAt added in v0.0.5

func (u *FeedConfigUpsertBulk) UpdateUpdatedAt() *FeedConfigUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type FeedConfigUpsertOne added in v0.0.5

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

FeedConfigUpsertOne is the builder for "upsert"-ing

one FeedConfig node.

func (*FeedConfigUpsertOne) AddAuthorAccount added in v0.0.5

func (u *FeedConfigUpsertOne) AddAuthorAccount(v int64) *FeedConfigUpsertOne

AddAuthorAccount adds v to the "author_account" field.

func (*FeedConfigUpsertOne) AddPullInterval added in v0.0.5

func (u *FeedConfigUpsertOne) AddPullInterval(v time.Duration) *FeedConfigUpsertOne

AddPullInterval adds v to the "pull_interval" field.

func (*FeedConfigUpsertOne) DoNothing added in v0.0.5

func (u *FeedConfigUpsertOne) DoNothing() *FeedConfigUpsertOne

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

func (*FeedConfigUpsertOne) Exec added in v0.0.5

Exec executes the query.

func (*FeedConfigUpsertOne) ExecX added in v0.0.5

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

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

func (*FeedConfigUpsertOne) ID added in v0.0.5

func (u *FeedConfigUpsertOne) ID(ctx context.Context) (id int64, err error)

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

func (*FeedConfigUpsertOne) IDX added in v0.0.5

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

func (*FeedConfigUpsertOne) Ignore added in v0.0.5

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

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

func (*FeedConfigUpsertOne) SetAuthorAccount added in v0.0.5

func (u *FeedConfigUpsertOne) SetAuthorAccount(v int64) *FeedConfigUpsertOne

SetAuthorAccount sets the "author_account" field.

func (*FeedConfigUpsertOne) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedConfigUpsertOne) SetFeedURL added in v0.0.5

SetFeedURL sets the "feed_url" field.

func (*FeedConfigUpsertOne) SetNextPullBeginAt added in v0.0.5

func (u *FeedConfigUpsertOne) SetNextPullBeginAt(v time.Time) *FeedConfigUpsertOne

SetNextPullBeginAt sets the "next_pull_begin_at" field.

func (*FeedConfigUpsertOne) SetPullInterval added in v0.0.5

func (u *FeedConfigUpsertOne) SetPullInterval(v time.Duration) *FeedConfigUpsertOne

SetPullInterval sets the "pull_interval" field.

func (*FeedConfigUpsertOne) SetSource added in v0.0.5

SetSource sets the "source" field.

func (*FeedConfigUpsertOne) SetStatus added in v0.0.5

SetStatus sets the "status" field.

func (*FeedConfigUpsertOne) SetUpdatedAt added in v0.0.5

func (u *FeedConfigUpsertOne) SetUpdatedAt(v time.Time) *FeedConfigUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*FeedConfigUpsertOne) Update added in v0.0.5

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

func (*FeedConfigUpsertOne) UpdateAuthorAccount added in v0.0.5

func (u *FeedConfigUpsertOne) UpdateAuthorAccount() *FeedConfigUpsertOne

UpdateAuthorAccount sets the "author_account" field to the value that was provided on create.

func (*FeedConfigUpsertOne) UpdateCreatedAt added in v0.0.5

func (u *FeedConfigUpsertOne) UpdateCreatedAt() *FeedConfigUpsertOne

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

func (*FeedConfigUpsertOne) UpdateFeedURL added in v0.0.5

func (u *FeedConfigUpsertOne) UpdateFeedURL() *FeedConfigUpsertOne

UpdateFeedURL sets the "feed_url" field to the value that was provided on create.

func (*FeedConfigUpsertOne) UpdateNewValues added in v0.0.5

func (u *FeedConfigUpsertOne) UpdateNewValues() *FeedConfigUpsertOne

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

client.FeedConfig.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(feedconfig.FieldID)
		}),
	).
	Exec(ctx)

func (*FeedConfigUpsertOne) UpdateNextPullBeginAt added in v0.0.5

func (u *FeedConfigUpsertOne) UpdateNextPullBeginAt() *FeedConfigUpsertOne

UpdateNextPullBeginAt sets the "next_pull_begin_at" field to the value that was provided on create.

func (*FeedConfigUpsertOne) UpdatePullInterval added in v0.0.5

func (u *FeedConfigUpsertOne) UpdatePullInterval() *FeedConfigUpsertOne

UpdatePullInterval sets the "pull_interval" field to the value that was provided on create.

func (*FeedConfigUpsertOne) UpdateSource added in v0.0.5

func (u *FeedConfigUpsertOne) UpdateSource() *FeedConfigUpsertOne

UpdateSource sets the "source" field to the value that was provided on create.

func (*FeedConfigUpsertOne) UpdateStatus added in v0.0.5

func (u *FeedConfigUpsertOne) UpdateStatus() *FeedConfigUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*FeedConfigUpsertOne) UpdateUpdatedAt added in v0.0.5

func (u *FeedConfigUpsertOne) UpdateUpdatedAt() *FeedConfigUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type FeedConfigs added in v0.0.5

type FeedConfigs []*FeedConfig

FeedConfigs is a parsable slice of FeedConfig.

type FeedCreate added in v0.0.5

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

FeedCreate is the builder for creating a Feed entity.

func (*FeedCreate) AddItem added in v0.0.6

func (fc *FeedCreate) AddItem(f ...*FeedItem) *FeedCreate

AddItem adds the "item" edges to the FeedItem entity.

func (*FeedCreate) AddItemIDs added in v0.0.6

func (fc *FeedCreate) AddItemIDs(ids ...int64) *FeedCreate

AddItemIDs adds the "item" edge to the FeedItem entity by IDs.

func (*FeedCreate) Exec added in v0.0.5

func (fc *FeedCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FeedCreate) ExecX added in v0.0.5

func (fc *FeedCreate) ExecX(ctx context.Context)

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

func (*FeedCreate) Mutation added in v0.0.5

func (fc *FeedCreate) Mutation() *FeedMutation

Mutation returns the FeedMutation object of the builder.

func (*FeedCreate) OnConflict added in v0.0.5

func (fc *FeedCreate) OnConflict(opts ...sql.ConflictOption) *FeedUpsertOne

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

client.Feed.Create().
	SetTitle(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.FeedUpsert) {
		SetTitle(v+v).
	}).
	Exec(ctx)

func (*FeedCreate) OnConflictColumns added in v0.0.5

func (fc *FeedCreate) OnConflictColumns(columns ...string) *FeedUpsertOne

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

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

func (*FeedCreate) Save added in v0.0.5

func (fc *FeedCreate) Save(ctx context.Context) (*Feed, error)

Save creates the Feed in the database.

func (*FeedCreate) SaveX added in v0.0.5

func (fc *FeedCreate) SaveX(ctx context.Context) *Feed

SaveX calls Save and panics if Save returns an error.

func (*FeedCreate) SetAuthors added in v0.0.5

func (fc *FeedCreate) SetAuthors(m []*modelfeed.Person) *FeedCreate

SetAuthors sets the "authors" field.

func (*FeedCreate) SetConfig added in v0.0.5

func (fc *FeedCreate) SetConfig(f *FeedConfig) *FeedCreate

SetConfig sets the "config" edge to the FeedConfig entity.

func (*FeedCreate) SetConfigID added in v0.0.5

func (fc *FeedCreate) SetConfigID(id int64) *FeedCreate

SetConfigID sets the "config" edge to the FeedConfig entity by ID.

func (*FeedCreate) SetCreatedAt added in v0.0.5

func (fc *FeedCreate) SetCreatedAt(t time.Time) *FeedCreate

SetCreatedAt sets the "created_at" field.

func (*FeedCreate) SetDescription added in v0.0.5

func (fc *FeedCreate) SetDescription(s string) *FeedCreate

SetDescription sets the "description" field.

func (*FeedCreate) SetID added in v0.0.6

func (fc *FeedCreate) SetID(i int64) *FeedCreate

SetID sets the "id" field.

func (*FeedCreate) SetImage added in v0.0.5

func (fc *FeedCreate) SetImage(m *modelfeed.Image) *FeedCreate

SetImage sets the "image" field.

func (*FeedCreate) SetLanguage added in v0.0.5

func (fc *FeedCreate) SetLanguage(s string) *FeedCreate

SetLanguage sets the "language" field.

func (fc *FeedCreate) SetLink(s string) *FeedCreate

SetLink sets the "link" field.

func (*FeedCreate) SetNillableCreatedAt added in v0.0.5

func (fc *FeedCreate) SetNillableCreatedAt(t *time.Time) *FeedCreate

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

func (*FeedCreate) SetNillableUpdatedAt added in v0.0.5

func (fc *FeedCreate) SetNillableUpdatedAt(t *time.Time) *FeedCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FeedCreate) SetTitle added in v0.0.5

func (fc *FeedCreate) SetTitle(s string) *FeedCreate

SetTitle sets the "title" field.

func (*FeedCreate) SetUpdatedAt added in v0.0.5

func (fc *FeedCreate) SetUpdatedAt(t time.Time) *FeedCreate

SetUpdatedAt sets the "updated_at" field.

type FeedCreateBulk added in v0.0.5

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

FeedCreateBulk is the builder for creating many Feed entities in bulk.

func (*FeedCreateBulk) Exec added in v0.0.5

func (fcb *FeedCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FeedCreateBulk) ExecX added in v0.0.5

func (fcb *FeedCreateBulk) ExecX(ctx context.Context)

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

func (*FeedCreateBulk) OnConflict added in v0.0.5

func (fcb *FeedCreateBulk) OnConflict(opts ...sql.ConflictOption) *FeedUpsertBulk

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

client.Feed.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.FeedUpsert) {
		SetTitle(v+v).
	}).
	Exec(ctx)

func (*FeedCreateBulk) OnConflictColumns added in v0.0.5

func (fcb *FeedCreateBulk) OnConflictColumns(columns ...string) *FeedUpsertBulk

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

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

func (*FeedCreateBulk) Save added in v0.0.5

func (fcb *FeedCreateBulk) Save(ctx context.Context) ([]*Feed, error)

Save creates the Feed entities in the database.

func (*FeedCreateBulk) SaveX added in v0.0.5

func (fcb *FeedCreateBulk) SaveX(ctx context.Context) []*Feed

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

type FeedDelete added in v0.0.5

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

FeedDelete is the builder for deleting a Feed entity.

func (*FeedDelete) Exec added in v0.0.5

func (fd *FeedDelete) Exec(ctx context.Context) (int, error)

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

func (*FeedDelete) ExecX added in v0.0.5

func (fd *FeedDelete) ExecX(ctx context.Context) int

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

func (*FeedDelete) Where added in v0.0.5

func (fd *FeedDelete) Where(ps ...predicate.Feed) *FeedDelete

Where appends a list predicates to the FeedDelete builder.

type FeedDeleteOne added in v0.0.5

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

FeedDeleteOne is the builder for deleting a single Feed entity.

func (*FeedDeleteOne) Exec added in v0.0.5

func (fdo *FeedDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FeedDeleteOne) ExecX added in v0.0.5

func (fdo *FeedDeleteOne) ExecX(ctx context.Context)

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

func (*FeedDeleteOne) Where added in v0.0.5

func (fdo *FeedDeleteOne) Where(ps ...predicate.Feed) *FeedDeleteOne

Where appends a list predicates to the FeedDelete builder.

type FeedEdges added in v0.0.5

type FeedEdges struct {
	// Item holds the value of the item edge.
	Item []*FeedItem `json:"item,omitempty"`
	// Config holds the value of the config edge.
	Config *FeedConfig `json:"config,omitempty"`
	// contains filtered or unexported fields
}

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

func (FeedEdges) ConfigOrErr added in v0.0.5

func (e FeedEdges) ConfigOrErr() (*FeedConfig, error)

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

func (FeedEdges) ItemOrErr added in v0.0.6

func (e FeedEdges) ItemOrErr() ([]*FeedItem, error)

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

type FeedGroupBy added in v0.0.5

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

FeedGroupBy is the group-by builder for Feed entities.

func (*FeedGroupBy) Aggregate added in v0.0.5

func (fgb *FeedGroupBy) Aggregate(fns ...AggregateFunc) *FeedGroupBy

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

func (*FeedGroupBy) Bool added in v0.0.5

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

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

func (*FeedGroupBy) BoolX added in v0.0.5

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

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

func (*FeedGroupBy) Bools added in v0.0.5

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

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

func (*FeedGroupBy) BoolsX added in v0.0.5

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

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

func (*FeedGroupBy) Float64 added in v0.0.5

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

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

func (*FeedGroupBy) Float64X added in v0.0.5

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

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

func (*FeedGroupBy) Float64s added in v0.0.5

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

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

func (*FeedGroupBy) Float64sX added in v0.0.5

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

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

func (*FeedGroupBy) Int added in v0.0.5

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

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

func (*FeedGroupBy) IntX added in v0.0.5

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

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

func (*FeedGroupBy) Ints added in v0.0.5

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

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

func (*FeedGroupBy) IntsX added in v0.0.5

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

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

func (*FeedGroupBy) Scan added in v0.0.5

func (fgb *FeedGroupBy) Scan(ctx context.Context, v any) error

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

func (*FeedGroupBy) ScanX added in v0.0.5

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

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

func (*FeedGroupBy) String added in v0.0.5

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

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

func (*FeedGroupBy) StringX added in v0.0.5

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

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

func (*FeedGroupBy) Strings added in v0.0.5

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

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

func (*FeedGroupBy) StringsX added in v0.0.5

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

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

type FeedItem added in v0.0.5

type FeedItem struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Authors holds the value of the "authors" field.
	Authors []modelfeed.Person `json:"authors,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Content holds the value of the "content" field.
	Content string `json:"content,omitempty"`
	// GUID holds the value of the "guid" field.
	GUID string `json:"guid,omitempty"`
	// Link holds the value of the "link" field.
	Link string `json:"link,omitempty"`
	// Image holds the value of the "image" field.
	Image *modelfeed.Image `json:"image,omitempty"`
	// Published holds the value of the "published" field.
	Published string `json:"published,omitempty"`
	// PublishedParsed holds the value of the "published_parsed" field.
	PublishedParsed time.Time `json:"published_parsed,omitempty"`
	// Updated holds the value of the "updated" field.
	Updated string `json:"updated,omitempty"`
	// UpdatedParsed holds the value of the "updated_parsed" field.
	UpdatedParsed time.Time `json:"updated_parsed,omitempty"`
	// Enclosure holds the value of the "enclosure" field.
	Enclosure []modelfeed.Enclosure `json:"enclosure,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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FeedItemQuery when eager-loading is set.
	Edges FeedItemEdges `json:"edges"`
	// contains filtered or unexported fields
}

FeedItem is the model entity for the FeedItem schema.

func (*FeedItem) QueryFeed added in v0.0.6

func (fi *FeedItem) QueryFeed() *FeedQuery

QueryFeed queries the "feed" edge of the FeedItem entity.

func (*FeedItem) String added in v0.0.5

func (fi *FeedItem) String() string

String implements the fmt.Stringer.

func (*FeedItem) Unwrap added in v0.0.5

func (fi *FeedItem) Unwrap() *FeedItem

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

func (fi *FeedItem) Update() *FeedItemUpdateOne

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

type FeedItemClient added in v0.0.5

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

FeedItemClient is a client for the FeedItem schema.

func NewFeedItemClient added in v0.0.5

func NewFeedItemClient(c config) *FeedItemClient

NewFeedItemClient returns a client for the FeedItem from the given config.

func (*FeedItemClient) Create added in v0.0.5

func (c *FeedItemClient) Create() *FeedItemCreate

Create returns a builder for creating a FeedItem entity.

func (*FeedItemClient) CreateBulk added in v0.0.5

func (c *FeedItemClient) CreateBulk(builders ...*FeedItemCreate) *FeedItemCreateBulk

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

func (*FeedItemClient) Delete added in v0.0.5

func (c *FeedItemClient) Delete() *FeedItemDelete

Delete returns a delete builder for FeedItem.

func (*FeedItemClient) DeleteOne added in v0.0.5

func (c *FeedItemClient) DeleteOne(fi *FeedItem) *FeedItemDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FeedItemClient) DeleteOneID added in v0.0.5

func (c *FeedItemClient) DeleteOneID(id int64) *FeedItemDeleteOne

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

func (*FeedItemClient) Get added in v0.0.5

func (c *FeedItemClient) Get(ctx context.Context, id int64) (*FeedItem, error)

Get returns a FeedItem entity by its id.

func (*FeedItemClient) GetX added in v0.0.5

func (c *FeedItemClient) GetX(ctx context.Context, id int64) *FeedItem

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

func (*FeedItemClient) Hooks added in v0.0.5

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

Hooks returns the client hooks.

func (*FeedItemClient) Intercept added in v0.0.5

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

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

func (*FeedItemClient) Interceptors added in v0.0.5

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

Interceptors returns the client interceptors.

func (*FeedItemClient) Query added in v0.0.5

func (c *FeedItemClient) Query() *FeedItemQuery

Query returns a query builder for FeedItem.

func (*FeedItemClient) QueryFeed added in v0.0.6

func (c *FeedItemClient) QueryFeed(fi *FeedItem) *FeedQuery

QueryFeed queries the feed edge of a FeedItem.

func (*FeedItemClient) Update added in v0.0.5

func (c *FeedItemClient) Update() *FeedItemUpdate

Update returns an update builder for FeedItem.

func (*FeedItemClient) UpdateOne added in v0.0.5

func (c *FeedItemClient) UpdateOne(fi *FeedItem) *FeedItemUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FeedItemClient) UpdateOneID added in v0.0.5

func (c *FeedItemClient) UpdateOneID(id int64) *FeedItemUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FeedItemClient) Use added in v0.0.5

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

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

type FeedItemCreate added in v0.0.5

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

FeedItemCreate is the builder for creating a FeedItem entity.

func (*FeedItemCreate) Exec added in v0.0.5

func (fic *FeedItemCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FeedItemCreate) ExecX added in v0.0.5

func (fic *FeedItemCreate) ExecX(ctx context.Context)

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

func (*FeedItemCreate) Mutation added in v0.0.5

func (fic *FeedItemCreate) Mutation() *FeedItemMutation

Mutation returns the FeedItemMutation object of the builder.

func (*FeedItemCreate) OnConflict added in v0.0.5

func (fic *FeedItemCreate) OnConflict(opts ...sql.ConflictOption) *FeedItemUpsertOne

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

client.FeedItem.Create().
	SetTitle(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.FeedItemUpsert) {
		SetTitle(v+v).
	}).
	Exec(ctx)

func (*FeedItemCreate) OnConflictColumns added in v0.0.5

func (fic *FeedItemCreate) OnConflictColumns(columns ...string) *FeedItemUpsertOne

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

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

func (*FeedItemCreate) Save added in v0.0.5

func (fic *FeedItemCreate) Save(ctx context.Context) (*FeedItem, error)

Save creates the FeedItem in the database.

func (*FeedItemCreate) SaveX added in v0.0.5

func (fic *FeedItemCreate) SaveX(ctx context.Context) *FeedItem

SaveX calls Save and panics if Save returns an error.

func (*FeedItemCreate) SetAuthors added in v0.0.5

func (fic *FeedItemCreate) SetAuthors(m []modelfeed.Person) *FeedItemCreate

SetAuthors sets the "authors" field.

func (*FeedItemCreate) SetContent added in v0.0.5

func (fic *FeedItemCreate) SetContent(s string) *FeedItemCreate

SetContent sets the "content" field.

func (*FeedItemCreate) SetCreatedAt added in v0.0.5

func (fic *FeedItemCreate) SetCreatedAt(t time.Time) *FeedItemCreate

SetCreatedAt sets the "created_at" field.

func (*FeedItemCreate) SetDescription added in v0.0.5

func (fic *FeedItemCreate) SetDescription(s string) *FeedItemCreate

SetDescription sets the "description" field.

func (*FeedItemCreate) SetEnclosure added in v0.0.5

func (fic *FeedItemCreate) SetEnclosure(m []modelfeed.Enclosure) *FeedItemCreate

SetEnclosure sets the "enclosure" field.

func (*FeedItemCreate) SetFeed added in v0.0.6

func (fic *FeedItemCreate) SetFeed(f *Feed) *FeedItemCreate

SetFeed sets the "feed" edge to the Feed entity.

func (*FeedItemCreate) SetFeedID added in v0.0.6

func (fic *FeedItemCreate) SetFeedID(id int64) *FeedItemCreate

SetFeedID sets the "feed" edge to the Feed entity by ID.

func (*FeedItemCreate) SetGUID added in v0.0.5

func (fic *FeedItemCreate) SetGUID(s string) *FeedItemCreate

SetGUID sets the "guid" field.

func (*FeedItemCreate) SetID added in v0.0.6

func (fic *FeedItemCreate) SetID(i int64) *FeedItemCreate

SetID sets the "id" field.

func (*FeedItemCreate) SetImage added in v0.0.5

func (fic *FeedItemCreate) SetImage(m *modelfeed.Image) *FeedItemCreate

SetImage sets the "image" field.

func (fic *FeedItemCreate) SetLink(s string) *FeedItemCreate

SetLink sets the "link" field.

func (*FeedItemCreate) SetNillableCreatedAt added in v0.0.5

func (fic *FeedItemCreate) SetNillableCreatedAt(t *time.Time) *FeedItemCreate

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

func (*FeedItemCreate) SetNillableUpdatedAt added in v0.0.5

func (fic *FeedItemCreate) SetNillableUpdatedAt(t *time.Time) *FeedItemCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FeedItemCreate) SetPublished added in v0.0.5

func (fic *FeedItemCreate) SetPublished(s string) *FeedItemCreate

SetPublished sets the "published" field.

func (*FeedItemCreate) SetPublishedParsed added in v0.0.5

func (fic *FeedItemCreate) SetPublishedParsed(t time.Time) *FeedItemCreate

SetPublishedParsed sets the "published_parsed" field.

func (*FeedItemCreate) SetTitle added in v0.0.5

func (fic *FeedItemCreate) SetTitle(s string) *FeedItemCreate

SetTitle sets the "title" field.

func (*FeedItemCreate) SetUpdated added in v0.0.5

func (fic *FeedItemCreate) SetUpdated(s string) *FeedItemCreate

SetUpdated sets the "updated" field.

func (*FeedItemCreate) SetUpdatedAt added in v0.0.5

func (fic *FeedItemCreate) SetUpdatedAt(t time.Time) *FeedItemCreate

SetUpdatedAt sets the "updated_at" field.

func (*FeedItemCreate) SetUpdatedParsed added in v0.0.5

func (fic *FeedItemCreate) SetUpdatedParsed(t time.Time) *FeedItemCreate

SetUpdatedParsed sets the "updated_parsed" field.

type FeedItemCreateBulk added in v0.0.5

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

FeedItemCreateBulk is the builder for creating many FeedItem entities in bulk.

func (*FeedItemCreateBulk) Exec added in v0.0.5

func (ficb *FeedItemCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FeedItemCreateBulk) ExecX added in v0.0.5

func (ficb *FeedItemCreateBulk) ExecX(ctx context.Context)

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

func (*FeedItemCreateBulk) OnConflict added in v0.0.5

func (ficb *FeedItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *FeedItemUpsertBulk

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

client.FeedItem.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.FeedItemUpsert) {
		SetTitle(v+v).
	}).
	Exec(ctx)

func (*FeedItemCreateBulk) OnConflictColumns added in v0.0.5

func (ficb *FeedItemCreateBulk) OnConflictColumns(columns ...string) *FeedItemUpsertBulk

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

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

func (*FeedItemCreateBulk) Save added in v0.0.5

func (ficb *FeedItemCreateBulk) Save(ctx context.Context) ([]*FeedItem, error)

Save creates the FeedItem entities in the database.

func (*FeedItemCreateBulk) SaveX added in v0.0.5

func (ficb *FeedItemCreateBulk) SaveX(ctx context.Context) []*FeedItem

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

type FeedItemDelete added in v0.0.5

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

FeedItemDelete is the builder for deleting a FeedItem entity.

func (*FeedItemDelete) Exec added in v0.0.5

func (fid *FeedItemDelete) Exec(ctx context.Context) (int, error)

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

func (*FeedItemDelete) ExecX added in v0.0.5

func (fid *FeedItemDelete) ExecX(ctx context.Context) int

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

func (*FeedItemDelete) Where added in v0.0.5

func (fid *FeedItemDelete) Where(ps ...predicate.FeedItem) *FeedItemDelete

Where appends a list predicates to the FeedItemDelete builder.

type FeedItemDeleteOne added in v0.0.5

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

FeedItemDeleteOne is the builder for deleting a single FeedItem entity.

func (*FeedItemDeleteOne) Exec added in v0.0.5

func (fido *FeedItemDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FeedItemDeleteOne) ExecX added in v0.0.5

func (fido *FeedItemDeleteOne) ExecX(ctx context.Context)

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

func (*FeedItemDeleteOne) Where added in v0.0.5

Where appends a list predicates to the FeedItemDelete builder.

type FeedItemEdges added in v0.0.6

type FeedItemEdges struct {
	// Feed holds the value of the feed edge.
	Feed *Feed `json:"feed,omitempty"`
	// contains filtered or unexported fields
}

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

func (FeedItemEdges) FeedOrErr added in v0.0.6

func (e FeedItemEdges) FeedOrErr() (*Feed, error)

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

type FeedItemGroupBy added in v0.0.5

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

FeedItemGroupBy is the group-by builder for FeedItem entities.

func (*FeedItemGroupBy) Aggregate added in v0.0.5

func (figb *FeedItemGroupBy) Aggregate(fns ...AggregateFunc) *FeedItemGroupBy

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

func (*FeedItemGroupBy) Bool added in v0.0.5

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

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

func (*FeedItemGroupBy) BoolX added in v0.0.5

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

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

func (*FeedItemGroupBy) Bools added in v0.0.5

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

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

func (*FeedItemGroupBy) BoolsX added in v0.0.5

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

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

func (*FeedItemGroupBy) Float64 added in v0.0.5

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

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

func (*FeedItemGroupBy) Float64X added in v0.0.5

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

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

func (*FeedItemGroupBy) Float64s added in v0.0.5

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

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

func (*FeedItemGroupBy) Float64sX added in v0.0.5

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

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

func (*FeedItemGroupBy) Int added in v0.0.5

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

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

func (*FeedItemGroupBy) IntX added in v0.0.5

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

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

func (*FeedItemGroupBy) Ints added in v0.0.5

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

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

func (*FeedItemGroupBy) IntsX added in v0.0.5

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

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

func (*FeedItemGroupBy) Scan added in v0.0.5

func (figb *FeedItemGroupBy) Scan(ctx context.Context, v any) error

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

func (*FeedItemGroupBy) ScanX added in v0.0.5

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

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

func (*FeedItemGroupBy) String added in v0.0.5

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

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

func (*FeedItemGroupBy) StringX added in v0.0.5

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

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

func (*FeedItemGroupBy) Strings added in v0.0.5

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

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

func (*FeedItemGroupBy) StringsX added in v0.0.5

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

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

type FeedItemMutation added in v0.0.5

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

FeedItemMutation represents an operation that mutates the FeedItem nodes in the graph.

func (*FeedItemMutation) AddField added in v0.0.5

func (m *FeedItemMutation) 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 (*FeedItemMutation) AddedEdges added in v0.0.5

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

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

func (*FeedItemMutation) AddedField added in v0.0.5

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

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

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

func (*FeedItemMutation) AddedIDs added in v0.0.5

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

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

func (*FeedItemMutation) AppendAuthors added in v0.0.5

func (m *FeedItemMutation) AppendAuthors(value []modelfeed.Person)

AppendAuthors adds value to the "authors" field.

func (*FeedItemMutation) AppendEnclosure added in v0.0.5

func (m *FeedItemMutation) AppendEnclosure(value []modelfeed.Enclosure)

AppendEnclosure adds value to the "enclosure" field.

func (*FeedItemMutation) AppendedAuthors added in v0.0.5

func (m *FeedItemMutation) AppendedAuthors() ([]modelfeed.Person, bool)

AppendedAuthors returns the list of values that were appended to the "authors" field in this mutation.

func (*FeedItemMutation) AppendedEnclosure added in v0.0.5

func (m *FeedItemMutation) AppendedEnclosure() ([]modelfeed.Enclosure, bool)

AppendedEnclosure returns the list of values that were appended to the "enclosure" field in this mutation.

func (*FeedItemMutation) Authors added in v0.0.5

func (m *FeedItemMutation) Authors() (r []modelfeed.Person, exists bool)

Authors returns the value of the "authors" field in the mutation.

func (*FeedItemMutation) ClearEdge added in v0.0.5

func (m *FeedItemMutation) 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 (*FeedItemMutation) ClearFeed added in v0.0.6

func (m *FeedItemMutation) ClearFeed()

ClearFeed clears the "feed" edge to the Feed entity.

func (*FeedItemMutation) ClearField added in v0.0.5

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

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

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

func (*FeedItemMutation) ClearedFields added in v0.0.5

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

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

func (FeedItemMutation) Client added in v0.0.5

func (m FeedItemMutation) 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 (*FeedItemMutation) Content added in v0.0.5

func (m *FeedItemMutation) Content() (r string, exists bool)

Content returns the value of the "content" field in the mutation.

func (*FeedItemMutation) CreatedAt added in v0.0.5

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

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

func (*FeedItemMutation) Description added in v0.0.5

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

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

func (*FeedItemMutation) EdgeCleared added in v0.0.5

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

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

func (*FeedItemMutation) Enclosure added in v0.0.5

func (m *FeedItemMutation) Enclosure() (r []modelfeed.Enclosure, exists bool)

Enclosure returns the value of the "enclosure" field in the mutation.

func (*FeedItemMutation) FeedCleared added in v0.0.6

func (m *FeedItemMutation) FeedCleared() bool

FeedCleared reports if the "feed" edge to the Feed entity was cleared.

func (*FeedItemMutation) FeedID added in v0.0.6

func (m *FeedItemMutation) FeedID() (id int64, exists bool)

FeedID returns the "feed" edge ID in the mutation.

func (*FeedItemMutation) FeedIDs added in v0.0.6

func (m *FeedItemMutation) FeedIDs() (ids []int64)

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

func (*FeedItemMutation) Field added in v0.0.5

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

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

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

func (*FeedItemMutation) Fields added in v0.0.5

func (m *FeedItemMutation) 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 (*FeedItemMutation) GUID added in v0.0.5

func (m *FeedItemMutation) GUID() (r string, exists bool)

GUID returns the value of the "guid" field in the mutation.

func (*FeedItemMutation) ID added in v0.0.5

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

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

func (*FeedItemMutation) IDs added in v0.0.5

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

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

func (*FeedItemMutation) Image added in v0.0.5

func (m *FeedItemMutation) Image() (r *modelfeed.Image, exists bool)

Image returns the value of the "image" field in the mutation.

func (m *FeedItemMutation) Link() (r string, exists bool)

Link returns the value of the "link" field in the mutation.

func (*FeedItemMutation) OldAuthors added in v0.0.5

func (m *FeedItemMutation) OldAuthors(ctx context.Context) (v []modelfeed.Person, err error)

OldAuthors returns the old "authors" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldContent added in v0.0.5

func (m *FeedItemMutation) OldContent(ctx context.Context) (v string, err error)

OldContent returns the old "content" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldCreatedAt added in v0.0.5

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

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

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

OldDescription returns the old "description" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldEnclosure added in v0.0.5

func (m *FeedItemMutation) OldEnclosure(ctx context.Context) (v []modelfeed.Enclosure, err error)

OldEnclosure returns the old "enclosure" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldField added in v0.0.5

func (m *FeedItemMutation) 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 (*FeedItemMutation) OldGUID added in v0.0.5

func (m *FeedItemMutation) OldGUID(ctx context.Context) (v string, err error)

OldGUID returns the old "guid" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldImage added in v0.0.5

func (m *FeedItemMutation) OldImage(ctx context.Context) (v *modelfeed.Image, err error)

OldImage returns the old "image" field's value of the FeedItem entity. If the FeedItem 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 (m *FeedItemMutation) OldLink(ctx context.Context) (v string, err error)

OldLink returns the old "link" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldPublished added in v0.0.5

func (m *FeedItemMutation) OldPublished(ctx context.Context) (v string, err error)

OldPublished returns the old "published" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldPublishedParsed added in v0.0.5

func (m *FeedItemMutation) OldPublishedParsed(ctx context.Context) (v time.Time, err error)

OldPublishedParsed returns the old "published_parsed" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldTitle added in v0.0.5

func (m *FeedItemMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldUpdated added in v0.0.5

func (m *FeedItemMutation) OldUpdated(ctx context.Context) (v string, err error)

OldUpdated returns the old "updated" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldUpdatedAt added in v0.0.5

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

OldUpdatedAt returns the old "updated_at" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) OldUpdatedParsed added in v0.0.5

func (m *FeedItemMutation) OldUpdatedParsed(ctx context.Context) (v time.Time, err error)

OldUpdatedParsed returns the old "updated_parsed" field's value of the FeedItem entity. If the FeedItem 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 (*FeedItemMutation) Op added in v0.0.5

func (m *FeedItemMutation) Op() Op

Op returns the operation name.

func (*FeedItemMutation) Published added in v0.0.5

func (m *FeedItemMutation) Published() (r string, exists bool)

Published returns the value of the "published" field in the mutation.

func (*FeedItemMutation) PublishedParsed added in v0.0.5

func (m *FeedItemMutation) PublishedParsed() (r time.Time, exists bool)

PublishedParsed returns the value of the "published_parsed" field in the mutation.

func (*FeedItemMutation) RemovedEdges added in v0.0.5

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

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

func (*FeedItemMutation) RemovedIDs added in v0.0.5

func (m *FeedItemMutation) 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 (*FeedItemMutation) ResetAuthors added in v0.0.5

func (m *FeedItemMutation) ResetAuthors()

ResetAuthors resets all changes to the "authors" field.

func (*FeedItemMutation) ResetContent added in v0.0.5

func (m *FeedItemMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*FeedItemMutation) ResetCreatedAt added in v0.0.5

func (m *FeedItemMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FeedItemMutation) ResetDescription added in v0.0.5

func (m *FeedItemMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*FeedItemMutation) ResetEdge added in v0.0.5

func (m *FeedItemMutation) 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 (*FeedItemMutation) ResetEnclosure added in v0.0.5

func (m *FeedItemMutation) ResetEnclosure()

ResetEnclosure resets all changes to the "enclosure" field.

func (*FeedItemMutation) ResetFeed added in v0.0.6

func (m *FeedItemMutation) ResetFeed()

ResetFeed resets all changes to the "feed" edge.

func (*FeedItemMutation) ResetField added in v0.0.5

func (m *FeedItemMutation) 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 (*FeedItemMutation) ResetGUID added in v0.0.5

func (m *FeedItemMutation) ResetGUID()

ResetGUID resets all changes to the "guid" field.

func (*FeedItemMutation) ResetImage added in v0.0.5

func (m *FeedItemMutation) ResetImage()

ResetImage resets all changes to the "image" field.

func (m *FeedItemMutation) ResetLink()

ResetLink resets all changes to the "link" field.

func (*FeedItemMutation) ResetPublished added in v0.0.5

func (m *FeedItemMutation) ResetPublished()

ResetPublished resets all changes to the "published" field.

func (*FeedItemMutation) ResetPublishedParsed added in v0.0.5

func (m *FeedItemMutation) ResetPublishedParsed()

ResetPublishedParsed resets all changes to the "published_parsed" field.

func (*FeedItemMutation) ResetTitle added in v0.0.5

func (m *FeedItemMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*FeedItemMutation) ResetUpdated added in v0.0.5

func (m *FeedItemMutation) ResetUpdated()

ResetUpdated resets all changes to the "updated" field.

func (*FeedItemMutation) ResetUpdatedAt added in v0.0.5

func (m *FeedItemMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FeedItemMutation) ResetUpdatedParsed added in v0.0.5

func (m *FeedItemMutation) ResetUpdatedParsed()

ResetUpdatedParsed resets all changes to the "updated_parsed" field.

func (*FeedItemMutation) SetAuthors added in v0.0.5

func (m *FeedItemMutation) SetAuthors(value []modelfeed.Person)

SetAuthors sets the "authors" field.

func (*FeedItemMutation) SetContent added in v0.0.5

func (m *FeedItemMutation) SetContent(s string)

SetContent sets the "content" field.

func (*FeedItemMutation) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedItemMutation) SetDescription added in v0.0.5

func (m *FeedItemMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*FeedItemMutation) SetEnclosure added in v0.0.5

func (m *FeedItemMutation) SetEnclosure(value []modelfeed.Enclosure)

SetEnclosure sets the "enclosure" field.

func (*FeedItemMutation) SetFeedID added in v0.0.6

func (m *FeedItemMutation) SetFeedID(id int64)

SetFeedID sets the "feed" edge to the Feed entity by id.

func (*FeedItemMutation) SetField added in v0.0.5

func (m *FeedItemMutation) 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 (*FeedItemMutation) SetGUID added in v0.0.5

func (m *FeedItemMutation) SetGUID(s string)

SetGUID sets the "guid" field.

func (*FeedItemMutation) SetID added in v0.0.6

func (m *FeedItemMutation) SetID(id int64)

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

func (*FeedItemMutation) SetImage added in v0.0.5

func (m *FeedItemMutation) SetImage(value *modelfeed.Image)

SetImage sets the "image" field.

func (m *FeedItemMutation) SetLink(s string)

SetLink sets the "link" field.

func (*FeedItemMutation) SetOp added in v0.0.5

func (m *FeedItemMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FeedItemMutation) SetPublished added in v0.0.5

func (m *FeedItemMutation) SetPublished(s string)

SetPublished sets the "published" field.

func (*FeedItemMutation) SetPublishedParsed added in v0.0.5

func (m *FeedItemMutation) SetPublishedParsed(t time.Time)

SetPublishedParsed sets the "published_parsed" field.

func (*FeedItemMutation) SetTitle added in v0.0.5

func (m *FeedItemMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*FeedItemMutation) SetUpdated added in v0.0.5

func (m *FeedItemMutation) SetUpdated(s string)

SetUpdated sets the "updated" field.

func (*FeedItemMutation) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" field.

func (*FeedItemMutation) SetUpdatedParsed added in v0.0.5

func (m *FeedItemMutation) SetUpdatedParsed(t time.Time)

SetUpdatedParsed sets the "updated_parsed" field.

func (*FeedItemMutation) Title added in v0.0.5

func (m *FeedItemMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (FeedItemMutation) Tx added in v0.0.5

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

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

func (*FeedItemMutation) Type added in v0.0.5

func (m *FeedItemMutation) Type() string

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

func (*FeedItemMutation) Updated added in v0.0.5

func (m *FeedItemMutation) Updated() (r string, exists bool)

Updated returns the value of the "updated" field in the mutation.

func (*FeedItemMutation) UpdatedAt added in v0.0.5

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

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

func (*FeedItemMutation) UpdatedParsed added in v0.0.5

func (m *FeedItemMutation) UpdatedParsed() (r time.Time, exists bool)

UpdatedParsed returns the value of the "updated_parsed" field in the mutation.

func (*FeedItemMutation) Where added in v0.0.5

func (m *FeedItemMutation) Where(ps ...predicate.FeedItem)

Where appends a list predicates to the FeedItemMutation builder.

func (*FeedItemMutation) WhereP added in v0.0.5

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

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

type FeedItemQuery added in v0.0.5

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

FeedItemQuery is the builder for querying FeedItem entities.

func (*FeedItemQuery) Aggregate added in v0.0.5

func (fiq *FeedItemQuery) Aggregate(fns ...AggregateFunc) *FeedItemSelect

Aggregate returns a FeedItemSelect configured with the given aggregations.

func (*FeedItemQuery) All added in v0.0.5

func (fiq *FeedItemQuery) All(ctx context.Context) ([]*FeedItem, error)

All executes the query and returns a list of FeedItems.

func (*FeedItemQuery) AllX added in v0.0.5

func (fiq *FeedItemQuery) AllX(ctx context.Context) []*FeedItem

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

func (*FeedItemQuery) Clone added in v0.0.5

func (fiq *FeedItemQuery) Clone() *FeedItemQuery

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

func (*FeedItemQuery) Count added in v0.0.5

func (fiq *FeedItemQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FeedItemQuery) CountX added in v0.0.5

func (fiq *FeedItemQuery) CountX(ctx context.Context) int

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

func (*FeedItemQuery) Exist added in v0.0.5

func (fiq *FeedItemQuery) Exist(ctx context.Context) (bool, error)

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

func (*FeedItemQuery) ExistX added in v0.0.5

func (fiq *FeedItemQuery) ExistX(ctx context.Context) bool

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

func (*FeedItemQuery) First added in v0.0.5

func (fiq *FeedItemQuery) First(ctx context.Context) (*FeedItem, error)

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

func (*FeedItemQuery) FirstID added in v0.0.5

func (fiq *FeedItemQuery) FirstID(ctx context.Context) (id int64, err error)

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

func (*FeedItemQuery) FirstIDX added in v0.0.5

func (fiq *FeedItemQuery) FirstIDX(ctx context.Context) int64

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

func (*FeedItemQuery) FirstX added in v0.0.5

func (fiq *FeedItemQuery) FirstX(ctx context.Context) *FeedItem

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

func (*FeedItemQuery) GroupBy added in v0.0.5

func (fiq *FeedItemQuery) GroupBy(field string, fields ...string) *FeedItemGroupBy

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 {
	Title string `json:"title,omitempty"`
	Count int `json:"count,omitempty"`
}

client.FeedItem.Query().
	GroupBy(feeditem.FieldTitle).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FeedItemQuery) IDs added in v0.0.5

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

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

func (*FeedItemQuery) IDsX added in v0.0.5

func (fiq *FeedItemQuery) IDsX(ctx context.Context) []int64

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

func (*FeedItemQuery) Limit added in v0.0.5

func (fiq *FeedItemQuery) Limit(limit int) *FeedItemQuery

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

func (*FeedItemQuery) Offset added in v0.0.5

func (fiq *FeedItemQuery) Offset(offset int) *FeedItemQuery

Offset to start from.

func (*FeedItemQuery) Only added in v0.0.5

func (fiq *FeedItemQuery) Only(ctx context.Context) (*FeedItem, error)

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

func (*FeedItemQuery) OnlyID added in v0.0.5

func (fiq *FeedItemQuery) OnlyID(ctx context.Context) (id int64, err error)

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

func (*FeedItemQuery) OnlyIDX added in v0.0.5

func (fiq *FeedItemQuery) OnlyIDX(ctx context.Context) int64

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

func (*FeedItemQuery) OnlyX added in v0.0.5

func (fiq *FeedItemQuery) OnlyX(ctx context.Context) *FeedItem

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

func (*FeedItemQuery) Order added in v0.0.5

func (fiq *FeedItemQuery) Order(o ...OrderFunc) *FeedItemQuery

Order specifies how the records should be ordered.

func (*FeedItemQuery) QueryFeed added in v0.0.6

func (fiq *FeedItemQuery) QueryFeed() *FeedQuery

QueryFeed chains the current query on the "feed" edge.

func (*FeedItemQuery) Select added in v0.0.5

func (fiq *FeedItemQuery) Select(fields ...string) *FeedItemSelect

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 {
	Title string `json:"title,omitempty"`
}

client.FeedItem.Query().
	Select(feeditem.FieldTitle).
	Scan(ctx, &v)

func (*FeedItemQuery) Unique added in v0.0.5

func (fiq *FeedItemQuery) Unique(unique bool) *FeedItemQuery

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

func (fiq *FeedItemQuery) Where(ps ...predicate.FeedItem) *FeedItemQuery

Where adds a new predicate for the FeedItemQuery builder.

func (*FeedItemQuery) WithFeed added in v0.0.6

func (fiq *FeedItemQuery) WithFeed(opts ...func(*FeedQuery)) *FeedItemQuery

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

type FeedItemSelect added in v0.0.5

type FeedItemSelect struct {
	*FeedItemQuery
	// contains filtered or unexported fields
}

FeedItemSelect is the builder for selecting fields of FeedItem entities.

func (*FeedItemSelect) Aggregate added in v0.0.5

func (fis *FeedItemSelect) Aggregate(fns ...AggregateFunc) *FeedItemSelect

Aggregate adds the given aggregation functions to the selector query.

func (*FeedItemSelect) Bool added in v0.0.5

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

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

func (*FeedItemSelect) BoolX added in v0.0.5

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

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

func (*FeedItemSelect) Bools added in v0.0.5

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

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

func (*FeedItemSelect) BoolsX added in v0.0.5

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

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

func (*FeedItemSelect) Float64 added in v0.0.5

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

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

func (*FeedItemSelect) Float64X added in v0.0.5

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

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

func (*FeedItemSelect) Float64s added in v0.0.5

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

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

func (*FeedItemSelect) Float64sX added in v0.0.5

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

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

func (*FeedItemSelect) Int added in v0.0.5

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

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

func (*FeedItemSelect) IntX added in v0.0.5

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

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

func (*FeedItemSelect) Ints added in v0.0.5

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

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

func (*FeedItemSelect) IntsX added in v0.0.5

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

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

func (*FeedItemSelect) Scan added in v0.0.5

func (fis *FeedItemSelect) Scan(ctx context.Context, v any) error

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

func (*FeedItemSelect) ScanX added in v0.0.5

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

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

func (*FeedItemSelect) String added in v0.0.5

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

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

func (*FeedItemSelect) StringX added in v0.0.5

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

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

func (*FeedItemSelect) Strings added in v0.0.5

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

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

func (*FeedItemSelect) StringsX added in v0.0.5

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

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

type FeedItemUpdate added in v0.0.5

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

FeedItemUpdate is the builder for updating FeedItem entities.

func (*FeedItemUpdate) AppendAuthors added in v0.0.5

func (fiu *FeedItemUpdate) AppendAuthors(m []modelfeed.Person) *FeedItemUpdate

AppendAuthors appends m to the "authors" field.

func (*FeedItemUpdate) AppendEnclosure added in v0.0.5

func (fiu *FeedItemUpdate) AppendEnclosure(m []modelfeed.Enclosure) *FeedItemUpdate

AppendEnclosure appends m to the "enclosure" field.

func (*FeedItemUpdate) ClearFeed added in v0.0.6

func (fiu *FeedItemUpdate) ClearFeed() *FeedItemUpdate

ClearFeed clears the "feed" edge to the Feed entity.

func (*FeedItemUpdate) Exec added in v0.0.5

func (fiu *FeedItemUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FeedItemUpdate) ExecX added in v0.0.5

func (fiu *FeedItemUpdate) ExecX(ctx context.Context)

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

func (*FeedItemUpdate) Mutation added in v0.0.5

func (fiu *FeedItemUpdate) Mutation() *FeedItemMutation

Mutation returns the FeedItemMutation object of the builder.

func (*FeedItemUpdate) Save added in v0.0.5

func (fiu *FeedItemUpdate) Save(ctx context.Context) (int, error)

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

func (*FeedItemUpdate) SaveX added in v0.0.5

func (fiu *FeedItemUpdate) SaveX(ctx context.Context) int

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

func (*FeedItemUpdate) SetAuthors added in v0.0.5

func (fiu *FeedItemUpdate) SetAuthors(m []modelfeed.Person) *FeedItemUpdate

SetAuthors sets the "authors" field.

func (*FeedItemUpdate) SetContent added in v0.0.5

func (fiu *FeedItemUpdate) SetContent(s string) *FeedItemUpdate

SetContent sets the "content" field.

func (*FeedItemUpdate) SetCreatedAt added in v0.0.5

func (fiu *FeedItemUpdate) SetCreatedAt(t time.Time) *FeedItemUpdate

SetCreatedAt sets the "created_at" field.

func (*FeedItemUpdate) SetDescription added in v0.0.5

func (fiu *FeedItemUpdate) SetDescription(s string) *FeedItemUpdate

SetDescription sets the "description" field.

func (*FeedItemUpdate) SetEnclosure added in v0.0.5

func (fiu *FeedItemUpdate) SetEnclosure(m []modelfeed.Enclosure) *FeedItemUpdate

SetEnclosure sets the "enclosure" field.

func (*FeedItemUpdate) SetFeed added in v0.0.6

func (fiu *FeedItemUpdate) SetFeed(f *Feed) *FeedItemUpdate

SetFeed sets the "feed" edge to the Feed entity.

func (*FeedItemUpdate) SetFeedID added in v0.0.6

func (fiu *FeedItemUpdate) SetFeedID(id int64) *FeedItemUpdate

SetFeedID sets the "feed" edge to the Feed entity by ID.

func (*FeedItemUpdate) SetGUID added in v0.0.5

func (fiu *FeedItemUpdate) SetGUID(s string) *FeedItemUpdate

SetGUID sets the "guid" field.

func (*FeedItemUpdate) SetImage added in v0.0.5

func (fiu *FeedItemUpdate) SetImage(m *modelfeed.Image) *FeedItemUpdate

SetImage sets the "image" field.

func (fiu *FeedItemUpdate) SetLink(s string) *FeedItemUpdate

SetLink sets the "link" field.

func (*FeedItemUpdate) SetNillableCreatedAt added in v0.0.5

func (fiu *FeedItemUpdate) SetNillableCreatedAt(t *time.Time) *FeedItemUpdate

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

func (*FeedItemUpdate) SetPublished added in v0.0.5

func (fiu *FeedItemUpdate) SetPublished(s string) *FeedItemUpdate

SetPublished sets the "published" field.

func (*FeedItemUpdate) SetPublishedParsed added in v0.0.5

func (fiu *FeedItemUpdate) SetPublishedParsed(t time.Time) *FeedItemUpdate

SetPublishedParsed sets the "published_parsed" field.

func (*FeedItemUpdate) SetTitle added in v0.0.5

func (fiu *FeedItemUpdate) SetTitle(s string) *FeedItemUpdate

SetTitle sets the "title" field.

func (*FeedItemUpdate) SetUpdated added in v0.0.5

func (fiu *FeedItemUpdate) SetUpdated(s string) *FeedItemUpdate

SetUpdated sets the "updated" field.

func (*FeedItemUpdate) SetUpdatedAt added in v0.0.5

func (fiu *FeedItemUpdate) SetUpdatedAt(t time.Time) *FeedItemUpdate

SetUpdatedAt sets the "updated_at" field.

func (*FeedItemUpdate) SetUpdatedParsed added in v0.0.5

func (fiu *FeedItemUpdate) SetUpdatedParsed(t time.Time) *FeedItemUpdate

SetUpdatedParsed sets the "updated_parsed" field.

func (*FeedItemUpdate) Where added in v0.0.5

func (fiu *FeedItemUpdate) Where(ps ...predicate.FeedItem) *FeedItemUpdate

Where appends a list predicates to the FeedItemUpdate builder.

type FeedItemUpdateOne added in v0.0.5

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

FeedItemUpdateOne is the builder for updating a single FeedItem entity.

func (*FeedItemUpdateOne) AppendAuthors added in v0.0.5

func (fiuo *FeedItemUpdateOne) AppendAuthors(m []modelfeed.Person) *FeedItemUpdateOne

AppendAuthors appends m to the "authors" field.

func (*FeedItemUpdateOne) AppendEnclosure added in v0.0.5

func (fiuo *FeedItemUpdateOne) AppendEnclosure(m []modelfeed.Enclosure) *FeedItemUpdateOne

AppendEnclosure appends m to the "enclosure" field.

func (*FeedItemUpdateOne) ClearFeed added in v0.0.6

func (fiuo *FeedItemUpdateOne) ClearFeed() *FeedItemUpdateOne

ClearFeed clears the "feed" edge to the Feed entity.

func (*FeedItemUpdateOne) Exec added in v0.0.5

func (fiuo *FeedItemUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FeedItemUpdateOne) ExecX added in v0.0.5

func (fiuo *FeedItemUpdateOne) ExecX(ctx context.Context)

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

func (*FeedItemUpdateOne) Mutation added in v0.0.5

func (fiuo *FeedItemUpdateOne) Mutation() *FeedItemMutation

Mutation returns the FeedItemMutation object of the builder.

func (*FeedItemUpdateOne) Save added in v0.0.5

func (fiuo *FeedItemUpdateOne) Save(ctx context.Context) (*FeedItem, error)

Save executes the query and returns the updated FeedItem entity.

func (*FeedItemUpdateOne) SaveX added in v0.0.5

func (fiuo *FeedItemUpdateOne) SaveX(ctx context.Context) *FeedItem

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

func (*FeedItemUpdateOne) Select added in v0.0.5

func (fiuo *FeedItemUpdateOne) Select(field string, fields ...string) *FeedItemUpdateOne

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

func (*FeedItemUpdateOne) SetAuthors added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetAuthors(m []modelfeed.Person) *FeedItemUpdateOne

SetAuthors sets the "authors" field.

func (*FeedItemUpdateOne) SetContent added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetContent(s string) *FeedItemUpdateOne

SetContent sets the "content" field.

func (*FeedItemUpdateOne) SetCreatedAt added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetCreatedAt(t time.Time) *FeedItemUpdateOne

SetCreatedAt sets the "created_at" field.

func (*FeedItemUpdateOne) SetDescription added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetDescription(s string) *FeedItemUpdateOne

SetDescription sets the "description" field.

func (*FeedItemUpdateOne) SetEnclosure added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetEnclosure(m []modelfeed.Enclosure) *FeedItemUpdateOne

SetEnclosure sets the "enclosure" field.

func (*FeedItemUpdateOne) SetFeed added in v0.0.6

func (fiuo *FeedItemUpdateOne) SetFeed(f *Feed) *FeedItemUpdateOne

SetFeed sets the "feed" edge to the Feed entity.

func (*FeedItemUpdateOne) SetFeedID added in v0.0.6

func (fiuo *FeedItemUpdateOne) SetFeedID(id int64) *FeedItemUpdateOne

SetFeedID sets the "feed" edge to the Feed entity by ID.

func (*FeedItemUpdateOne) SetGUID added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetGUID(s string) *FeedItemUpdateOne

SetGUID sets the "guid" field.

func (*FeedItemUpdateOne) SetImage added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetImage(m *modelfeed.Image) *FeedItemUpdateOne

SetImage sets the "image" field.

func (fiuo *FeedItemUpdateOne) SetLink(s string) *FeedItemUpdateOne

SetLink sets the "link" field.

func (*FeedItemUpdateOne) SetNillableCreatedAt added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetNillableCreatedAt(t *time.Time) *FeedItemUpdateOne

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

func (*FeedItemUpdateOne) SetPublished added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetPublished(s string) *FeedItemUpdateOne

SetPublished sets the "published" field.

func (*FeedItemUpdateOne) SetPublishedParsed added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetPublishedParsed(t time.Time) *FeedItemUpdateOne

SetPublishedParsed sets the "published_parsed" field.

func (*FeedItemUpdateOne) SetTitle added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetTitle(s string) *FeedItemUpdateOne

SetTitle sets the "title" field.

func (*FeedItemUpdateOne) SetUpdated added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetUpdated(s string) *FeedItemUpdateOne

SetUpdated sets the "updated" field.

func (*FeedItemUpdateOne) SetUpdatedAt added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetUpdatedAt(t time.Time) *FeedItemUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*FeedItemUpdateOne) SetUpdatedParsed added in v0.0.5

func (fiuo *FeedItemUpdateOne) SetUpdatedParsed(t time.Time) *FeedItemUpdateOne

SetUpdatedParsed sets the "updated_parsed" field.

func (*FeedItemUpdateOne) Where added in v0.0.5

Where appends a list predicates to the FeedItemUpdate builder.

type FeedItemUpsert added in v0.0.5

type FeedItemUpsert struct {
	*sql.UpdateSet
}

FeedItemUpsert is the "OnConflict" setter.

func (*FeedItemUpsert) SetAuthors added in v0.0.5

func (u *FeedItemUpsert) SetAuthors(v []modelfeed.Person) *FeedItemUpsert

SetAuthors sets the "authors" field.

func (*FeedItemUpsert) SetContent added in v0.0.5

func (u *FeedItemUpsert) SetContent(v string) *FeedItemUpsert

SetContent sets the "content" field.

func (*FeedItemUpsert) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedItemUpsert) SetDescription added in v0.0.5

func (u *FeedItemUpsert) SetDescription(v string) *FeedItemUpsert

SetDescription sets the "description" field.

func (*FeedItemUpsert) SetEnclosure added in v0.0.5

func (u *FeedItemUpsert) SetEnclosure(v []modelfeed.Enclosure) *FeedItemUpsert

SetEnclosure sets the "enclosure" field.

func (*FeedItemUpsert) SetGUID added in v0.0.5

func (u *FeedItemUpsert) SetGUID(v string) *FeedItemUpsert

SetGUID sets the "guid" field.

func (*FeedItemUpsert) SetImage added in v0.0.5

func (u *FeedItemUpsert) SetImage(v *modelfeed.Image) *FeedItemUpsert

SetImage sets the "image" field.

func (u *FeedItemUpsert) SetLink(v string) *FeedItemUpsert

SetLink sets the "link" field.

func (*FeedItemUpsert) SetPublished added in v0.0.5

func (u *FeedItemUpsert) SetPublished(v string) *FeedItemUpsert

SetPublished sets the "published" field.

func (*FeedItemUpsert) SetPublishedParsed added in v0.0.5

func (u *FeedItemUpsert) SetPublishedParsed(v time.Time) *FeedItemUpsert

SetPublishedParsed sets the "published_parsed" field.

func (*FeedItemUpsert) SetTitle added in v0.0.5

func (u *FeedItemUpsert) SetTitle(v string) *FeedItemUpsert

SetTitle sets the "title" field.

func (*FeedItemUpsert) SetUpdated added in v0.0.5

func (u *FeedItemUpsert) SetUpdated(v string) *FeedItemUpsert

SetUpdated sets the "updated" field.

func (*FeedItemUpsert) SetUpdatedAt added in v0.0.5

func (u *FeedItemUpsert) SetUpdatedAt(v time.Time) *FeedItemUpsert

SetUpdatedAt sets the "updated_at" field.

func (*FeedItemUpsert) SetUpdatedParsed added in v0.0.5

func (u *FeedItemUpsert) SetUpdatedParsed(v time.Time) *FeedItemUpsert

SetUpdatedParsed sets the "updated_parsed" field.

func (*FeedItemUpsert) UpdateAuthors added in v0.0.5

func (u *FeedItemUpsert) UpdateAuthors() *FeedItemUpsert

UpdateAuthors sets the "authors" field to the value that was provided on create.

func (*FeedItemUpsert) UpdateContent added in v0.0.5

func (u *FeedItemUpsert) UpdateContent() *FeedItemUpsert

UpdateContent sets the "content" field to the value that was provided on create.

func (*FeedItemUpsert) UpdateCreatedAt added in v0.0.5

func (u *FeedItemUpsert) UpdateCreatedAt() *FeedItemUpsert

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

func (*FeedItemUpsert) UpdateDescription added in v0.0.5

func (u *FeedItemUpsert) UpdateDescription() *FeedItemUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*FeedItemUpsert) UpdateEnclosure added in v0.0.5

func (u *FeedItemUpsert) UpdateEnclosure() *FeedItemUpsert

UpdateEnclosure sets the "enclosure" field to the value that was provided on create.

func (*FeedItemUpsert) UpdateGUID added in v0.0.5

func (u *FeedItemUpsert) UpdateGUID() *FeedItemUpsert

UpdateGUID sets the "guid" field to the value that was provided on create.

func (*FeedItemUpsert) UpdateImage added in v0.0.5

func (u *FeedItemUpsert) UpdateImage() *FeedItemUpsert

UpdateImage sets the "image" field to the value that was provided on create.

func (u *FeedItemUpsert) UpdateLink() *FeedItemUpsert

UpdateLink sets the "link" field to the value that was provided on create.

func (*FeedItemUpsert) UpdatePublished added in v0.0.5

func (u *FeedItemUpsert) UpdatePublished() *FeedItemUpsert

UpdatePublished sets the "published" field to the value that was provided on create.

func (*FeedItemUpsert) UpdatePublishedParsed added in v0.0.5

func (u *FeedItemUpsert) UpdatePublishedParsed() *FeedItemUpsert

UpdatePublishedParsed sets the "published_parsed" field to the value that was provided on create.

func (*FeedItemUpsert) UpdateTitle added in v0.0.5

func (u *FeedItemUpsert) UpdateTitle() *FeedItemUpsert

UpdateTitle sets the "title" field to the value that was provided on create.

func (*FeedItemUpsert) UpdateUpdated added in v0.0.5

func (u *FeedItemUpsert) UpdateUpdated() *FeedItemUpsert

UpdateUpdated sets the "updated" field to the value that was provided on create.

func (*FeedItemUpsert) UpdateUpdatedAt added in v0.0.5

func (u *FeedItemUpsert) UpdateUpdatedAt() *FeedItemUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FeedItemUpsert) UpdateUpdatedParsed added in v0.0.5

func (u *FeedItemUpsert) UpdateUpdatedParsed() *FeedItemUpsert

UpdateUpdatedParsed sets the "updated_parsed" field to the value that was provided on create.

type FeedItemUpsertBulk added in v0.0.5

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

FeedItemUpsertBulk is the builder for "upsert"-ing a bulk of FeedItem nodes.

func (*FeedItemUpsertBulk) DoNothing added in v0.0.5

func (u *FeedItemUpsertBulk) DoNothing() *FeedItemUpsertBulk

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

func (*FeedItemUpsertBulk) Exec added in v0.0.5

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

Exec executes the query.

func (*FeedItemUpsertBulk) ExecX added in v0.0.5

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

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

func (*FeedItemUpsertBulk) Ignore added in v0.0.5

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

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

func (*FeedItemUpsertBulk) SetAuthors added in v0.0.5

SetAuthors sets the "authors" field.

func (*FeedItemUpsertBulk) SetContent added in v0.0.5

func (u *FeedItemUpsertBulk) SetContent(v string) *FeedItemUpsertBulk

SetContent sets the "content" field.

func (*FeedItemUpsertBulk) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedItemUpsertBulk) SetDescription added in v0.0.5

func (u *FeedItemUpsertBulk) SetDescription(v string) *FeedItemUpsertBulk

SetDescription sets the "description" field.

func (*FeedItemUpsertBulk) SetEnclosure added in v0.0.5

SetEnclosure sets the "enclosure" field.

func (*FeedItemUpsertBulk) SetGUID added in v0.0.5

SetGUID sets the "guid" field.

func (*FeedItemUpsertBulk) SetImage added in v0.0.5

SetImage sets the "image" field.

SetLink sets the "link" field.

func (*FeedItemUpsertBulk) SetPublished added in v0.0.5

func (u *FeedItemUpsertBulk) SetPublished(v string) *FeedItemUpsertBulk

SetPublished sets the "published" field.

func (*FeedItemUpsertBulk) SetPublishedParsed added in v0.0.5

func (u *FeedItemUpsertBulk) SetPublishedParsed(v time.Time) *FeedItemUpsertBulk

SetPublishedParsed sets the "published_parsed" field.

func (*FeedItemUpsertBulk) SetTitle added in v0.0.5

SetTitle sets the "title" field.

func (*FeedItemUpsertBulk) SetUpdated added in v0.0.5

func (u *FeedItemUpsertBulk) SetUpdated(v string) *FeedItemUpsertBulk

SetUpdated sets the "updated" field.

func (*FeedItemUpsertBulk) SetUpdatedAt added in v0.0.5

func (u *FeedItemUpsertBulk) SetUpdatedAt(v time.Time) *FeedItemUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*FeedItemUpsertBulk) SetUpdatedParsed added in v0.0.5

func (u *FeedItemUpsertBulk) SetUpdatedParsed(v time.Time) *FeedItemUpsertBulk

SetUpdatedParsed sets the "updated_parsed" field.

func (*FeedItemUpsertBulk) Update added in v0.0.5

func (u *FeedItemUpsertBulk) Update(set func(*FeedItemUpsert)) *FeedItemUpsertBulk

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

func (*FeedItemUpsertBulk) UpdateAuthors added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateAuthors() *FeedItemUpsertBulk

UpdateAuthors sets the "authors" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateContent added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateContent() *FeedItemUpsertBulk

UpdateContent sets the "content" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateCreatedAt added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateCreatedAt() *FeedItemUpsertBulk

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

func (*FeedItemUpsertBulk) UpdateDescription added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateDescription() *FeedItemUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateEnclosure added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateEnclosure() *FeedItemUpsertBulk

UpdateEnclosure sets the "enclosure" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateGUID added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateGUID() *FeedItemUpsertBulk

UpdateGUID sets the "guid" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateImage added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateImage() *FeedItemUpsertBulk

UpdateImage sets the "image" field to the value that was provided on create.

func (u *FeedItemUpsertBulk) UpdateLink() *FeedItemUpsertBulk

UpdateLink sets the "link" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateNewValues added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateNewValues() *FeedItemUpsertBulk

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

client.FeedItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(feeditem.FieldID)
		}),
	).
	Exec(ctx)

func (*FeedItemUpsertBulk) UpdatePublished added in v0.0.5

func (u *FeedItemUpsertBulk) UpdatePublished() *FeedItemUpsertBulk

UpdatePublished sets the "published" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdatePublishedParsed added in v0.0.5

func (u *FeedItemUpsertBulk) UpdatePublishedParsed() *FeedItemUpsertBulk

UpdatePublishedParsed sets the "published_parsed" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateTitle added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateTitle() *FeedItemUpsertBulk

UpdateTitle sets the "title" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateUpdated added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateUpdated() *FeedItemUpsertBulk

UpdateUpdated sets the "updated" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateUpdatedAt added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateUpdatedAt() *FeedItemUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FeedItemUpsertBulk) UpdateUpdatedParsed added in v0.0.5

func (u *FeedItemUpsertBulk) UpdateUpdatedParsed() *FeedItemUpsertBulk

UpdateUpdatedParsed sets the "updated_parsed" field to the value that was provided on create.

type FeedItemUpsertOne added in v0.0.5

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

FeedItemUpsertOne is the builder for "upsert"-ing

one FeedItem node.

func (*FeedItemUpsertOne) DoNothing added in v0.0.5

func (u *FeedItemUpsertOne) DoNothing() *FeedItemUpsertOne

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

func (*FeedItemUpsertOne) Exec added in v0.0.5

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

Exec executes the query.

func (*FeedItemUpsertOne) ExecX added in v0.0.5

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

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

func (*FeedItemUpsertOne) ID added in v0.0.5

func (u *FeedItemUpsertOne) ID(ctx context.Context) (id int64, err error)

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

func (*FeedItemUpsertOne) IDX added in v0.0.5

func (u *FeedItemUpsertOne) IDX(ctx context.Context) int64

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

func (*FeedItemUpsertOne) Ignore added in v0.0.5

func (u *FeedItemUpsertOne) Ignore() *FeedItemUpsertOne

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

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

func (*FeedItemUpsertOne) SetAuthors added in v0.0.5

SetAuthors sets the "authors" field.

func (*FeedItemUpsertOne) SetContent added in v0.0.5

func (u *FeedItemUpsertOne) SetContent(v string) *FeedItemUpsertOne

SetContent sets the "content" field.

func (*FeedItemUpsertOne) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedItemUpsertOne) SetDescription added in v0.0.5

func (u *FeedItemUpsertOne) SetDescription(v string) *FeedItemUpsertOne

SetDescription sets the "description" field.

func (*FeedItemUpsertOne) SetEnclosure added in v0.0.5

SetEnclosure sets the "enclosure" field.

func (*FeedItemUpsertOne) SetGUID added in v0.0.5

SetGUID sets the "guid" field.

func (*FeedItemUpsertOne) SetImage added in v0.0.5

SetImage sets the "image" field.

SetLink sets the "link" field.

func (*FeedItemUpsertOne) SetPublished added in v0.0.5

func (u *FeedItemUpsertOne) SetPublished(v string) *FeedItemUpsertOne

SetPublished sets the "published" field.

func (*FeedItemUpsertOne) SetPublishedParsed added in v0.0.5

func (u *FeedItemUpsertOne) SetPublishedParsed(v time.Time) *FeedItemUpsertOne

SetPublishedParsed sets the "published_parsed" field.

func (*FeedItemUpsertOne) SetTitle added in v0.0.5

func (u *FeedItemUpsertOne) SetTitle(v string) *FeedItemUpsertOne

SetTitle sets the "title" field.

func (*FeedItemUpsertOne) SetUpdated added in v0.0.5

func (u *FeedItemUpsertOne) SetUpdated(v string) *FeedItemUpsertOne

SetUpdated sets the "updated" field.

func (*FeedItemUpsertOne) SetUpdatedAt added in v0.0.5

func (u *FeedItemUpsertOne) SetUpdatedAt(v time.Time) *FeedItemUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*FeedItemUpsertOne) SetUpdatedParsed added in v0.0.5

func (u *FeedItemUpsertOne) SetUpdatedParsed(v time.Time) *FeedItemUpsertOne

SetUpdatedParsed sets the "updated_parsed" field.

func (*FeedItemUpsertOne) Update added in v0.0.5

func (u *FeedItemUpsertOne) Update(set func(*FeedItemUpsert)) *FeedItemUpsertOne

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

func (*FeedItemUpsertOne) UpdateAuthors added in v0.0.5

func (u *FeedItemUpsertOne) UpdateAuthors() *FeedItemUpsertOne

UpdateAuthors sets the "authors" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateContent added in v0.0.5

func (u *FeedItemUpsertOne) UpdateContent() *FeedItemUpsertOne

UpdateContent sets the "content" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateCreatedAt added in v0.0.5

func (u *FeedItemUpsertOne) UpdateCreatedAt() *FeedItemUpsertOne

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

func (*FeedItemUpsertOne) UpdateDescription added in v0.0.5

func (u *FeedItemUpsertOne) UpdateDescription() *FeedItemUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateEnclosure added in v0.0.5

func (u *FeedItemUpsertOne) UpdateEnclosure() *FeedItemUpsertOne

UpdateEnclosure sets the "enclosure" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateGUID added in v0.0.5

func (u *FeedItemUpsertOne) UpdateGUID() *FeedItemUpsertOne

UpdateGUID sets the "guid" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateImage added in v0.0.5

func (u *FeedItemUpsertOne) UpdateImage() *FeedItemUpsertOne

UpdateImage sets the "image" field to the value that was provided on create.

func (u *FeedItemUpsertOne) UpdateLink() *FeedItemUpsertOne

UpdateLink sets the "link" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateNewValues added in v0.0.5

func (u *FeedItemUpsertOne) UpdateNewValues() *FeedItemUpsertOne

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

client.FeedItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(feeditem.FieldID)
		}),
	).
	Exec(ctx)

func (*FeedItemUpsertOne) UpdatePublished added in v0.0.5

func (u *FeedItemUpsertOne) UpdatePublished() *FeedItemUpsertOne

UpdatePublished sets the "published" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdatePublishedParsed added in v0.0.5

func (u *FeedItemUpsertOne) UpdatePublishedParsed() *FeedItemUpsertOne

UpdatePublishedParsed sets the "published_parsed" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateTitle added in v0.0.5

func (u *FeedItemUpsertOne) UpdateTitle() *FeedItemUpsertOne

UpdateTitle sets the "title" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateUpdated added in v0.0.5

func (u *FeedItemUpsertOne) UpdateUpdated() *FeedItemUpsertOne

UpdateUpdated sets the "updated" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateUpdatedAt added in v0.0.5

func (u *FeedItemUpsertOne) UpdateUpdatedAt() *FeedItemUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FeedItemUpsertOne) UpdateUpdatedParsed added in v0.0.5

func (u *FeedItemUpsertOne) UpdateUpdatedParsed() *FeedItemUpsertOne

UpdateUpdatedParsed sets the "updated_parsed" field to the value that was provided on create.

type FeedItems added in v0.0.5

type FeedItems []*FeedItem

FeedItems is a parsable slice of FeedItem.

type FeedMutation added in v0.0.5

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

FeedMutation represents an operation that mutates the Feed nodes in the graph.

func (*FeedMutation) AddField added in v0.0.5

func (m *FeedMutation) 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 (*FeedMutation) AddItemIDs added in v0.0.6

func (m *FeedMutation) AddItemIDs(ids ...int64)

AddItemIDs adds the "item" edge to the FeedItem entity by ids.

func (*FeedMutation) AddedEdges added in v0.0.5

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

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

func (*FeedMutation) AddedField added in v0.0.5

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

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

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

func (*FeedMutation) AddedIDs added in v0.0.5

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

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

func (*FeedMutation) AppendAuthors added in v0.0.5

func (m *FeedMutation) AppendAuthors(value []*modelfeed.Person)

AppendAuthors adds value to the "authors" field.

func (*FeedMutation) AppendedAuthors added in v0.0.5

func (m *FeedMutation) AppendedAuthors() ([]*modelfeed.Person, bool)

AppendedAuthors returns the list of values that were appended to the "authors" field in this mutation.

func (*FeedMutation) Authors added in v0.0.5

func (m *FeedMutation) Authors() (r []*modelfeed.Person, exists bool)

Authors returns the value of the "authors" field in the mutation.

func (*FeedMutation) ClearConfig added in v0.0.5

func (m *FeedMutation) ClearConfig()

ClearConfig clears the "config" edge to the FeedConfig entity.

func (*FeedMutation) ClearEdge added in v0.0.5

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

func (m *FeedMutation) 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 (*FeedMutation) ClearItem added in v0.0.6

func (m *FeedMutation) ClearItem()

ClearItem clears the "item" edge to the FeedItem entity.

func (*FeedMutation) ClearedEdges added in v0.0.5

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

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

func (*FeedMutation) ClearedFields added in v0.0.5

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

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

func (FeedMutation) Client added in v0.0.5

func (m FeedMutation) 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 (*FeedMutation) ConfigCleared added in v0.0.5

func (m *FeedMutation) ConfigCleared() bool

ConfigCleared reports if the "config" edge to the FeedConfig entity was cleared.

func (*FeedMutation) ConfigID added in v0.0.5

func (m *FeedMutation) ConfigID() (id int64, exists bool)

ConfigID returns the "config" edge ID in the mutation.

func (*FeedMutation) ConfigIDs added in v0.0.5

func (m *FeedMutation) ConfigIDs() (ids []int64)

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

func (*FeedMutation) CreatedAt added in v0.0.5

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

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

func (*FeedMutation) Description added in v0.0.5

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

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

func (*FeedMutation) EdgeCleared added in v0.0.5

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

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

func (*FeedMutation) Field added in v0.0.5

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

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

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

func (*FeedMutation) Fields added in v0.0.5

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

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

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

func (*FeedMutation) IDs added in v0.0.5

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

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

func (*FeedMutation) Image added in v0.0.5

func (m *FeedMutation) Image() (r *modelfeed.Image, exists bool)

Image returns the value of the "image" field in the mutation.

func (*FeedMutation) ItemCleared added in v0.0.6

func (m *FeedMutation) ItemCleared() bool

ItemCleared reports if the "item" edge to the FeedItem entity was cleared.

func (*FeedMutation) ItemIDs added in v0.0.6

func (m *FeedMutation) ItemIDs() (ids []int64)

ItemIDs returns the "item" edge IDs in the mutation.

func (*FeedMutation) Language added in v0.0.5

func (m *FeedMutation) Language() (r string, exists bool)

Language returns the value of the "language" field in the mutation.

func (m *FeedMutation) Link() (r string, exists bool)

Link returns the value of the "link" field in the mutation.

func (*FeedMutation) OldAuthors added in v0.0.5

func (m *FeedMutation) OldAuthors(ctx context.Context) (v []*modelfeed.Person, err error)

OldAuthors returns the old "authors" field's value of the Feed entity. If the Feed 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 (*FeedMutation) OldCreatedAt added in v0.0.5

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

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

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

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

func (m *FeedMutation) 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 (*FeedMutation) OldImage added in v0.0.5

func (m *FeedMutation) OldImage(ctx context.Context) (v *modelfeed.Image, err error)

OldImage returns the old "image" field's value of the Feed entity. If the Feed 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 (*FeedMutation) OldLanguage added in v0.0.5

func (m *FeedMutation) OldLanguage(ctx context.Context) (v string, err error)

OldLanguage returns the old "language" field's value of the Feed entity. If the Feed 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 (m *FeedMutation) OldLink(ctx context.Context) (v string, err error)

OldLink returns the old "link" field's value of the Feed entity. If the Feed 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 (*FeedMutation) OldTitle added in v0.0.5

func (m *FeedMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the Feed entity. If the Feed 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 (*FeedMutation) OldUpdatedAt added in v0.0.5

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

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

func (m *FeedMutation) Op() Op

Op returns the operation name.

func (*FeedMutation) RemoveItemIDs added in v0.0.6

func (m *FeedMutation) RemoveItemIDs(ids ...int64)

RemoveItemIDs removes the "item" edge to the FeedItem entity by IDs.

func (*FeedMutation) RemovedEdges added in v0.0.5

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

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

func (*FeedMutation) RemovedIDs added in v0.0.5

func (m *FeedMutation) 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 (*FeedMutation) RemovedItemIDs added in v0.0.6

func (m *FeedMutation) RemovedItemIDs() (ids []int64)

RemovedItem returns the removed IDs of the "item" edge to the FeedItem entity.

func (*FeedMutation) ResetAuthors added in v0.0.5

func (m *FeedMutation) ResetAuthors()

ResetAuthors resets all changes to the "authors" field.

func (*FeedMutation) ResetConfig added in v0.0.5

func (m *FeedMutation) ResetConfig()

ResetConfig resets all changes to the "config" edge.

func (*FeedMutation) ResetCreatedAt added in v0.0.5

func (m *FeedMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FeedMutation) ResetDescription added in v0.0.5

func (m *FeedMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*FeedMutation) ResetEdge added in v0.0.5

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

func (m *FeedMutation) 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 (*FeedMutation) ResetImage added in v0.0.5

func (m *FeedMutation) ResetImage()

ResetImage resets all changes to the "image" field.

func (*FeedMutation) ResetItem added in v0.0.6

func (m *FeedMutation) ResetItem()

ResetItem resets all changes to the "item" edge.

func (*FeedMutation) ResetLanguage added in v0.0.5

func (m *FeedMutation) ResetLanguage()

ResetLanguage resets all changes to the "language" field.

func (m *FeedMutation) ResetLink()

ResetLink resets all changes to the "link" field.

func (*FeedMutation) ResetTitle added in v0.0.5

func (m *FeedMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*FeedMutation) ResetUpdatedAt added in v0.0.5

func (m *FeedMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FeedMutation) SetAuthors added in v0.0.5

func (m *FeedMutation) SetAuthors(value []*modelfeed.Person)

SetAuthors sets the "authors" field.

func (*FeedMutation) SetConfigID added in v0.0.5

func (m *FeedMutation) SetConfigID(id int64)

SetConfigID sets the "config" edge to the FeedConfig entity by id.

func (*FeedMutation) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedMutation) SetDescription added in v0.0.5

func (m *FeedMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*FeedMutation) SetField added in v0.0.5

func (m *FeedMutation) 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 (*FeedMutation) SetID added in v0.0.6

func (m *FeedMutation) SetID(id int64)

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

func (*FeedMutation) SetImage added in v0.0.5

func (m *FeedMutation) SetImage(value *modelfeed.Image)

SetImage sets the "image" field.

func (*FeedMutation) SetLanguage added in v0.0.5

func (m *FeedMutation) SetLanguage(s string)

SetLanguage sets the "language" field.

func (m *FeedMutation) SetLink(s string)

SetLink sets the "link" field.

func (*FeedMutation) SetOp added in v0.0.5

func (m *FeedMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FeedMutation) SetTitle added in v0.0.5

func (m *FeedMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*FeedMutation) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" field.

func (*FeedMutation) Title added in v0.0.5

func (m *FeedMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (FeedMutation) Tx added in v0.0.5

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

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

func (*FeedMutation) Type added in v0.0.5

func (m *FeedMutation) Type() string

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

func (*FeedMutation) UpdatedAt added in v0.0.5

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

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

func (*FeedMutation) Where added in v0.0.5

func (m *FeedMutation) Where(ps ...predicate.Feed)

Where appends a list predicates to the FeedMutation builder.

func (*FeedMutation) WhereP added in v0.0.5

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

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

type FeedQuery added in v0.0.5

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

FeedQuery is the builder for querying Feed entities.

func (*FeedQuery) Aggregate added in v0.0.5

func (fq *FeedQuery) Aggregate(fns ...AggregateFunc) *FeedSelect

Aggregate returns a FeedSelect configured with the given aggregations.

func (*FeedQuery) All added in v0.0.5

func (fq *FeedQuery) All(ctx context.Context) ([]*Feed, error)

All executes the query and returns a list of Feeds.

func (*FeedQuery) AllX added in v0.0.5

func (fq *FeedQuery) AllX(ctx context.Context) []*Feed

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

func (*FeedQuery) Clone added in v0.0.5

func (fq *FeedQuery) Clone() *FeedQuery

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

func (*FeedQuery) Count added in v0.0.5

func (fq *FeedQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FeedQuery) CountX added in v0.0.5

func (fq *FeedQuery) CountX(ctx context.Context) int

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

func (*FeedQuery) Exist added in v0.0.5

func (fq *FeedQuery) Exist(ctx context.Context) (bool, error)

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

func (*FeedQuery) ExistX added in v0.0.5

func (fq *FeedQuery) ExistX(ctx context.Context) bool

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

func (*FeedQuery) First added in v0.0.5

func (fq *FeedQuery) First(ctx context.Context) (*Feed, error)

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

func (*FeedQuery) FirstID added in v0.0.5

func (fq *FeedQuery) FirstID(ctx context.Context) (id int64, err error)

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

func (*FeedQuery) FirstIDX added in v0.0.5

func (fq *FeedQuery) FirstIDX(ctx context.Context) int64

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

func (*FeedQuery) FirstX added in v0.0.5

func (fq *FeedQuery) FirstX(ctx context.Context) *Feed

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

func (*FeedQuery) GroupBy added in v0.0.5

func (fq *FeedQuery) GroupBy(field string, fields ...string) *FeedGroupBy

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 {
	Title string `json:"title,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Feed.Query().
	GroupBy(feed.FieldTitle).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FeedQuery) IDs added in v0.0.5

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

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

func (*FeedQuery) IDsX added in v0.0.5

func (fq *FeedQuery) IDsX(ctx context.Context) []int64

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

func (*FeedQuery) Limit added in v0.0.5

func (fq *FeedQuery) Limit(limit int) *FeedQuery

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

func (*FeedQuery) Offset added in v0.0.5

func (fq *FeedQuery) Offset(offset int) *FeedQuery

Offset to start from.

func (*FeedQuery) Only added in v0.0.5

func (fq *FeedQuery) Only(ctx context.Context) (*Feed, error)

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

func (*FeedQuery) OnlyID added in v0.0.5

func (fq *FeedQuery) OnlyID(ctx context.Context) (id int64, err error)

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

func (*FeedQuery) OnlyIDX added in v0.0.5

func (fq *FeedQuery) OnlyIDX(ctx context.Context) int64

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

func (*FeedQuery) OnlyX added in v0.0.5

func (fq *FeedQuery) OnlyX(ctx context.Context) *Feed

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

func (*FeedQuery) Order added in v0.0.5

func (fq *FeedQuery) Order(o ...OrderFunc) *FeedQuery

Order specifies how the records should be ordered.

func (*FeedQuery) QueryConfig added in v0.0.5

func (fq *FeedQuery) QueryConfig() *FeedConfigQuery

QueryConfig chains the current query on the "config" edge.

func (*FeedQuery) QueryItem added in v0.0.6

func (fq *FeedQuery) QueryItem() *FeedItemQuery

QueryItem chains the current query on the "item" edge.

func (*FeedQuery) Select added in v0.0.5

func (fq *FeedQuery) Select(fields ...string) *FeedSelect

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 {
	Title string `json:"title,omitempty"`
}

client.Feed.Query().
	Select(feed.FieldTitle).
	Scan(ctx, &v)

func (*FeedQuery) Unique added in v0.0.5

func (fq *FeedQuery) Unique(unique bool) *FeedQuery

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

func (fq *FeedQuery) Where(ps ...predicate.Feed) *FeedQuery

Where adds a new predicate for the FeedQuery builder.

func (*FeedQuery) WithConfig added in v0.0.5

func (fq *FeedQuery) WithConfig(opts ...func(*FeedConfigQuery)) *FeedQuery

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

func (*FeedQuery) WithItem added in v0.0.6

func (fq *FeedQuery) WithItem(opts ...func(*FeedItemQuery)) *FeedQuery

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

type FeedSelect added in v0.0.5

type FeedSelect struct {
	*FeedQuery
	// contains filtered or unexported fields
}

FeedSelect is the builder for selecting fields of Feed entities.

func (*FeedSelect) Aggregate added in v0.0.5

func (fs *FeedSelect) Aggregate(fns ...AggregateFunc) *FeedSelect

Aggregate adds the given aggregation functions to the selector query.

func (*FeedSelect) Bool added in v0.0.5

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

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

func (*FeedSelect) BoolX added in v0.0.5

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

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

func (*FeedSelect) Bools added in v0.0.5

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

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

func (*FeedSelect) BoolsX added in v0.0.5

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

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

func (*FeedSelect) Float64 added in v0.0.5

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

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

func (*FeedSelect) Float64X added in v0.0.5

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

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

func (*FeedSelect) Float64s added in v0.0.5

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

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

func (*FeedSelect) Float64sX added in v0.0.5

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

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

func (*FeedSelect) Int added in v0.0.5

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

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

func (*FeedSelect) IntX added in v0.0.5

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

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

func (*FeedSelect) Ints added in v0.0.5

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

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

func (*FeedSelect) IntsX added in v0.0.5

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

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

func (*FeedSelect) Scan added in v0.0.5

func (fs *FeedSelect) Scan(ctx context.Context, v any) error

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

func (*FeedSelect) ScanX added in v0.0.5

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

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

func (*FeedSelect) String added in v0.0.5

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

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

func (*FeedSelect) StringX added in v0.0.5

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

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

func (*FeedSelect) Strings added in v0.0.5

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

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

func (*FeedSelect) StringsX added in v0.0.5

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

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

type FeedUpdate added in v0.0.5

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

FeedUpdate is the builder for updating Feed entities.

func (*FeedUpdate) AddItem added in v0.0.6

func (fu *FeedUpdate) AddItem(f ...*FeedItem) *FeedUpdate

AddItem adds the "item" edges to the FeedItem entity.

func (*FeedUpdate) AddItemIDs added in v0.0.6

func (fu *FeedUpdate) AddItemIDs(ids ...int64) *FeedUpdate

AddItemIDs adds the "item" edge to the FeedItem entity by IDs.

func (*FeedUpdate) AppendAuthors added in v0.0.5

func (fu *FeedUpdate) AppendAuthors(m []*modelfeed.Person) *FeedUpdate

AppendAuthors appends m to the "authors" field.

func (*FeedUpdate) ClearConfig added in v0.0.5

func (fu *FeedUpdate) ClearConfig() *FeedUpdate

ClearConfig clears the "config" edge to the FeedConfig entity.

func (*FeedUpdate) ClearItem added in v0.0.6

func (fu *FeedUpdate) ClearItem() *FeedUpdate

ClearItem clears all "item" edges to the FeedItem entity.

func (*FeedUpdate) Exec added in v0.0.5

func (fu *FeedUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FeedUpdate) ExecX added in v0.0.5

func (fu *FeedUpdate) ExecX(ctx context.Context)

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

func (*FeedUpdate) Mutation added in v0.0.5

func (fu *FeedUpdate) Mutation() *FeedMutation

Mutation returns the FeedMutation object of the builder.

func (*FeedUpdate) RemoveItem added in v0.0.6

func (fu *FeedUpdate) RemoveItem(f ...*FeedItem) *FeedUpdate

RemoveItem removes "item" edges to FeedItem entities.

func (*FeedUpdate) RemoveItemIDs added in v0.0.6

func (fu *FeedUpdate) RemoveItemIDs(ids ...int64) *FeedUpdate

RemoveItemIDs removes the "item" edge to FeedItem entities by IDs.

func (*FeedUpdate) Save added in v0.0.5

func (fu *FeedUpdate) Save(ctx context.Context) (int, error)

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

func (*FeedUpdate) SaveX added in v0.0.5

func (fu *FeedUpdate) SaveX(ctx context.Context) int

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

func (*FeedUpdate) SetAuthors added in v0.0.5

func (fu *FeedUpdate) SetAuthors(m []*modelfeed.Person) *FeedUpdate

SetAuthors sets the "authors" field.

func (*FeedUpdate) SetConfig added in v0.0.5

func (fu *FeedUpdate) SetConfig(f *FeedConfig) *FeedUpdate

SetConfig sets the "config" edge to the FeedConfig entity.

func (*FeedUpdate) SetConfigID added in v0.0.5

func (fu *FeedUpdate) SetConfigID(id int64) *FeedUpdate

SetConfigID sets the "config" edge to the FeedConfig entity by ID.

func (*FeedUpdate) SetCreatedAt added in v0.0.5

func (fu *FeedUpdate) SetCreatedAt(t time.Time) *FeedUpdate

SetCreatedAt sets the "created_at" field.

func (*FeedUpdate) SetDescription added in v0.0.5

func (fu *FeedUpdate) SetDescription(s string) *FeedUpdate

SetDescription sets the "description" field.

func (*FeedUpdate) SetImage added in v0.0.5

func (fu *FeedUpdate) SetImage(m *modelfeed.Image) *FeedUpdate

SetImage sets the "image" field.

func (*FeedUpdate) SetLanguage added in v0.0.5

func (fu *FeedUpdate) SetLanguage(s string) *FeedUpdate

SetLanguage sets the "language" field.

func (fu *FeedUpdate) SetLink(s string) *FeedUpdate

SetLink sets the "link" field.

func (*FeedUpdate) SetNillableCreatedAt added in v0.0.5

func (fu *FeedUpdate) SetNillableCreatedAt(t *time.Time) *FeedUpdate

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

func (*FeedUpdate) SetTitle added in v0.0.5

func (fu *FeedUpdate) SetTitle(s string) *FeedUpdate

SetTitle sets the "title" field.

func (*FeedUpdate) SetUpdatedAt added in v0.0.5

func (fu *FeedUpdate) SetUpdatedAt(t time.Time) *FeedUpdate

SetUpdatedAt sets the "updated_at" field.

func (*FeedUpdate) Where added in v0.0.5

func (fu *FeedUpdate) Where(ps ...predicate.Feed) *FeedUpdate

Where appends a list predicates to the FeedUpdate builder.

type FeedUpdateOne added in v0.0.5

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

FeedUpdateOne is the builder for updating a single Feed entity.

func (*FeedUpdateOne) AddItem added in v0.0.6

func (fuo *FeedUpdateOne) AddItem(f ...*FeedItem) *FeedUpdateOne

AddItem adds the "item" edges to the FeedItem entity.

func (*FeedUpdateOne) AddItemIDs added in v0.0.6

func (fuo *FeedUpdateOne) AddItemIDs(ids ...int64) *FeedUpdateOne

AddItemIDs adds the "item" edge to the FeedItem entity by IDs.

func (*FeedUpdateOne) AppendAuthors added in v0.0.5

func (fuo *FeedUpdateOne) AppendAuthors(m []*modelfeed.Person) *FeedUpdateOne

AppendAuthors appends m to the "authors" field.

func (*FeedUpdateOne) ClearConfig added in v0.0.5

func (fuo *FeedUpdateOne) ClearConfig() *FeedUpdateOne

ClearConfig clears the "config" edge to the FeedConfig entity.

func (*FeedUpdateOne) ClearItem added in v0.0.6

func (fuo *FeedUpdateOne) ClearItem() *FeedUpdateOne

ClearItem clears all "item" edges to the FeedItem entity.

func (*FeedUpdateOne) Exec added in v0.0.5

func (fuo *FeedUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FeedUpdateOne) ExecX added in v0.0.5

func (fuo *FeedUpdateOne) ExecX(ctx context.Context)

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

func (*FeedUpdateOne) Mutation added in v0.0.5

func (fuo *FeedUpdateOne) Mutation() *FeedMutation

Mutation returns the FeedMutation object of the builder.

func (*FeedUpdateOne) RemoveItem added in v0.0.6

func (fuo *FeedUpdateOne) RemoveItem(f ...*FeedItem) *FeedUpdateOne

RemoveItem removes "item" edges to FeedItem entities.

func (*FeedUpdateOne) RemoveItemIDs added in v0.0.6

func (fuo *FeedUpdateOne) RemoveItemIDs(ids ...int64) *FeedUpdateOne

RemoveItemIDs removes the "item" edge to FeedItem entities by IDs.

func (*FeedUpdateOne) Save added in v0.0.5

func (fuo *FeedUpdateOne) Save(ctx context.Context) (*Feed, error)

Save executes the query and returns the updated Feed entity.

func (*FeedUpdateOne) SaveX added in v0.0.5

func (fuo *FeedUpdateOne) SaveX(ctx context.Context) *Feed

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

func (*FeedUpdateOne) Select added in v0.0.5

func (fuo *FeedUpdateOne) Select(field string, fields ...string) *FeedUpdateOne

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

func (*FeedUpdateOne) SetAuthors added in v0.0.5

func (fuo *FeedUpdateOne) SetAuthors(m []*modelfeed.Person) *FeedUpdateOne

SetAuthors sets the "authors" field.

func (*FeedUpdateOne) SetConfig added in v0.0.5

func (fuo *FeedUpdateOne) SetConfig(f *FeedConfig) *FeedUpdateOne

SetConfig sets the "config" edge to the FeedConfig entity.

func (*FeedUpdateOne) SetConfigID added in v0.0.5

func (fuo *FeedUpdateOne) SetConfigID(id int64) *FeedUpdateOne

SetConfigID sets the "config" edge to the FeedConfig entity by ID.

func (*FeedUpdateOne) SetCreatedAt added in v0.0.5

func (fuo *FeedUpdateOne) SetCreatedAt(t time.Time) *FeedUpdateOne

SetCreatedAt sets the "created_at" field.

func (*FeedUpdateOne) SetDescription added in v0.0.5

func (fuo *FeedUpdateOne) SetDescription(s string) *FeedUpdateOne

SetDescription sets the "description" field.

func (*FeedUpdateOne) SetImage added in v0.0.5

func (fuo *FeedUpdateOne) SetImage(m *modelfeed.Image) *FeedUpdateOne

SetImage sets the "image" field.

func (*FeedUpdateOne) SetLanguage added in v0.0.5

func (fuo *FeedUpdateOne) SetLanguage(s string) *FeedUpdateOne

SetLanguage sets the "language" field.

func (fuo *FeedUpdateOne) SetLink(s string) *FeedUpdateOne

SetLink sets the "link" field.

func (*FeedUpdateOne) SetNillableCreatedAt added in v0.0.5

func (fuo *FeedUpdateOne) SetNillableCreatedAt(t *time.Time) *FeedUpdateOne

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

func (*FeedUpdateOne) SetTitle added in v0.0.5

func (fuo *FeedUpdateOne) SetTitle(s string) *FeedUpdateOne

SetTitle sets the "title" field.

func (*FeedUpdateOne) SetUpdatedAt added in v0.0.5

func (fuo *FeedUpdateOne) SetUpdatedAt(t time.Time) *FeedUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*FeedUpdateOne) Where added in v0.0.5

func (fuo *FeedUpdateOne) Where(ps ...predicate.Feed) *FeedUpdateOne

Where appends a list predicates to the FeedUpdate builder.

type FeedUpsert added in v0.0.5

type FeedUpsert struct {
	*sql.UpdateSet
}

FeedUpsert is the "OnConflict" setter.

func (*FeedUpsert) SetAuthors added in v0.0.5

func (u *FeedUpsert) SetAuthors(v []*modelfeed.Person) *FeedUpsert

SetAuthors sets the "authors" field.

func (*FeedUpsert) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedUpsert) SetDescription added in v0.0.5

func (u *FeedUpsert) SetDescription(v string) *FeedUpsert

SetDescription sets the "description" field.

func (*FeedUpsert) SetImage added in v0.0.5

func (u *FeedUpsert) SetImage(v *modelfeed.Image) *FeedUpsert

SetImage sets the "image" field.

func (*FeedUpsert) SetLanguage added in v0.0.5

func (u *FeedUpsert) SetLanguage(v string) *FeedUpsert

SetLanguage sets the "language" field.

func (u *FeedUpsert) SetLink(v string) *FeedUpsert

SetLink sets the "link" field.

func (*FeedUpsert) SetTitle added in v0.0.5

func (u *FeedUpsert) SetTitle(v string) *FeedUpsert

SetTitle sets the "title" field.

func (*FeedUpsert) SetUpdatedAt added in v0.0.5

func (u *FeedUpsert) SetUpdatedAt(v time.Time) *FeedUpsert

SetUpdatedAt sets the "updated_at" field.

func (*FeedUpsert) UpdateAuthors added in v0.0.5

func (u *FeedUpsert) UpdateAuthors() *FeedUpsert

UpdateAuthors sets the "authors" field to the value that was provided on create.

func (*FeedUpsert) UpdateCreatedAt added in v0.0.5

func (u *FeedUpsert) UpdateCreatedAt() *FeedUpsert

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

func (*FeedUpsert) UpdateDescription added in v0.0.5

func (u *FeedUpsert) UpdateDescription() *FeedUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*FeedUpsert) UpdateImage added in v0.0.5

func (u *FeedUpsert) UpdateImage() *FeedUpsert

UpdateImage sets the "image" field to the value that was provided on create.

func (*FeedUpsert) UpdateLanguage added in v0.0.5

func (u *FeedUpsert) UpdateLanguage() *FeedUpsert

UpdateLanguage sets the "language" field to the value that was provided on create.

func (u *FeedUpsert) UpdateLink() *FeedUpsert

UpdateLink sets the "link" field to the value that was provided on create.

func (*FeedUpsert) UpdateTitle added in v0.0.5

func (u *FeedUpsert) UpdateTitle() *FeedUpsert

UpdateTitle sets the "title" field to the value that was provided on create.

func (*FeedUpsert) UpdateUpdatedAt added in v0.0.5

func (u *FeedUpsert) UpdateUpdatedAt() *FeedUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type FeedUpsertBulk added in v0.0.5

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

FeedUpsertBulk is the builder for "upsert"-ing a bulk of Feed nodes.

func (*FeedUpsertBulk) DoNothing added in v0.0.5

func (u *FeedUpsertBulk) DoNothing() *FeedUpsertBulk

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

func (*FeedUpsertBulk) Exec added in v0.0.5

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

Exec executes the query.

func (*FeedUpsertBulk) ExecX added in v0.0.5

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

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

func (*FeedUpsertBulk) Ignore added in v0.0.5

func (u *FeedUpsertBulk) Ignore() *FeedUpsertBulk

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

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

func (*FeedUpsertBulk) SetAuthors added in v0.0.5

func (u *FeedUpsertBulk) SetAuthors(v []*modelfeed.Person) *FeedUpsertBulk

SetAuthors sets the "authors" field.

func (*FeedUpsertBulk) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedUpsertBulk) SetDescription added in v0.0.5

func (u *FeedUpsertBulk) SetDescription(v string) *FeedUpsertBulk

SetDescription sets the "description" field.

func (*FeedUpsertBulk) SetImage added in v0.0.5

func (u *FeedUpsertBulk) SetImage(v *modelfeed.Image) *FeedUpsertBulk

SetImage sets the "image" field.

func (*FeedUpsertBulk) SetLanguage added in v0.0.5

func (u *FeedUpsertBulk) SetLanguage(v string) *FeedUpsertBulk

SetLanguage sets the "language" field.

func (u *FeedUpsertBulk) SetLink(v string) *FeedUpsertBulk

SetLink sets the "link" field.

func (*FeedUpsertBulk) SetTitle added in v0.0.5

func (u *FeedUpsertBulk) SetTitle(v string) *FeedUpsertBulk

SetTitle sets the "title" field.

func (*FeedUpsertBulk) SetUpdatedAt added in v0.0.5

func (u *FeedUpsertBulk) SetUpdatedAt(v time.Time) *FeedUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*FeedUpsertBulk) Update added in v0.0.5

func (u *FeedUpsertBulk) Update(set func(*FeedUpsert)) *FeedUpsertBulk

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

func (*FeedUpsertBulk) UpdateAuthors added in v0.0.5

func (u *FeedUpsertBulk) UpdateAuthors() *FeedUpsertBulk

UpdateAuthors sets the "authors" field to the value that was provided on create.

func (*FeedUpsertBulk) UpdateCreatedAt added in v0.0.5

func (u *FeedUpsertBulk) UpdateCreatedAt() *FeedUpsertBulk

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

func (*FeedUpsertBulk) UpdateDescription added in v0.0.5

func (u *FeedUpsertBulk) UpdateDescription() *FeedUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*FeedUpsertBulk) UpdateImage added in v0.0.5

func (u *FeedUpsertBulk) UpdateImage() *FeedUpsertBulk

UpdateImage sets the "image" field to the value that was provided on create.

func (*FeedUpsertBulk) UpdateLanguage added in v0.0.5

func (u *FeedUpsertBulk) UpdateLanguage() *FeedUpsertBulk

UpdateLanguage sets the "language" field to the value that was provided on create.

func (u *FeedUpsertBulk) UpdateLink() *FeedUpsertBulk

UpdateLink sets the "link" field to the value that was provided on create.

func (*FeedUpsertBulk) UpdateNewValues added in v0.0.5

func (u *FeedUpsertBulk) UpdateNewValues() *FeedUpsertBulk

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

client.Feed.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(feed.FieldID)
		}),
	).
	Exec(ctx)

func (*FeedUpsertBulk) UpdateTitle added in v0.0.5

func (u *FeedUpsertBulk) UpdateTitle() *FeedUpsertBulk

UpdateTitle sets the "title" field to the value that was provided on create.

func (*FeedUpsertBulk) UpdateUpdatedAt added in v0.0.5

func (u *FeedUpsertBulk) UpdateUpdatedAt() *FeedUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type FeedUpsertOne added in v0.0.5

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

FeedUpsertOne is the builder for "upsert"-ing

one Feed node.

func (*FeedUpsertOne) DoNothing added in v0.0.5

func (u *FeedUpsertOne) DoNothing() *FeedUpsertOne

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

func (*FeedUpsertOne) Exec added in v0.0.5

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

Exec executes the query.

func (*FeedUpsertOne) ExecX added in v0.0.5

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

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

func (*FeedUpsertOne) ID added in v0.0.5

func (u *FeedUpsertOne) ID(ctx context.Context) (id int64, err error)

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

func (*FeedUpsertOne) IDX added in v0.0.5

func (u *FeedUpsertOne) IDX(ctx context.Context) int64

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

func (*FeedUpsertOne) Ignore added in v0.0.5

func (u *FeedUpsertOne) Ignore() *FeedUpsertOne

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

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

func (*FeedUpsertOne) SetAuthors added in v0.0.5

func (u *FeedUpsertOne) SetAuthors(v []*modelfeed.Person) *FeedUpsertOne

SetAuthors sets the "authors" field.

func (*FeedUpsertOne) SetCreatedAt added in v0.0.5

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

SetCreatedAt sets the "created_at" field.

func (*FeedUpsertOne) SetDescription added in v0.0.5

func (u *FeedUpsertOne) SetDescription(v string) *FeedUpsertOne

SetDescription sets the "description" field.

func (*FeedUpsertOne) SetImage added in v0.0.5

func (u *FeedUpsertOne) SetImage(v *modelfeed.Image) *FeedUpsertOne

SetImage sets the "image" field.

func (*FeedUpsertOne) SetLanguage added in v0.0.5

func (u *FeedUpsertOne) SetLanguage(v string) *FeedUpsertOne

SetLanguage sets the "language" field.

func (u *FeedUpsertOne) SetLink(v string) *FeedUpsertOne

SetLink sets the "link" field.

func (*FeedUpsertOne) SetTitle added in v0.0.5

func (u *FeedUpsertOne) SetTitle(v string) *FeedUpsertOne

SetTitle sets the "title" field.

func (*FeedUpsertOne) SetUpdatedAt added in v0.0.5

func (u *FeedUpsertOne) SetUpdatedAt(v time.Time) *FeedUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*FeedUpsertOne) Update added in v0.0.5

func (u *FeedUpsertOne) Update(set func(*FeedUpsert)) *FeedUpsertOne

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

func (*FeedUpsertOne) UpdateAuthors added in v0.0.5

func (u *FeedUpsertOne) UpdateAuthors() *FeedUpsertOne

UpdateAuthors sets the "authors" field to the value that was provided on create.

func (*FeedUpsertOne) UpdateCreatedAt added in v0.0.5

func (u *FeedUpsertOne) UpdateCreatedAt() *FeedUpsertOne

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

func (*FeedUpsertOne) UpdateDescription added in v0.0.5

func (u *FeedUpsertOne) UpdateDescription() *FeedUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*FeedUpsertOne) UpdateImage added in v0.0.5

func (u *FeedUpsertOne) UpdateImage() *FeedUpsertOne

UpdateImage sets the "image" field to the value that was provided on create.

func (*FeedUpsertOne) UpdateLanguage added in v0.0.5

func (u *FeedUpsertOne) UpdateLanguage() *FeedUpsertOne

UpdateLanguage sets the "language" field to the value that was provided on create.

func (u *FeedUpsertOne) UpdateLink() *FeedUpsertOne

UpdateLink sets the "link" field to the value that was provided on create.

func (*FeedUpsertOne) UpdateNewValues added in v0.0.5

func (u *FeedUpsertOne) UpdateNewValues() *FeedUpsertOne

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

client.Feed.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(feed.FieldID)
		}),
	).
	Exec(ctx)

func (*FeedUpsertOne) UpdateTitle added in v0.0.5

func (u *FeedUpsertOne) UpdateTitle() *FeedUpsertOne

UpdateTitle sets the "title" field to the value that was provided on create.

func (*FeedUpsertOne) UpdateUpdatedAt added in v0.0.5

func (u *FeedUpsertOne) UpdateUpdatedAt() *FeedUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Feeds added in v0.0.5

type Feeds []*Feed

Feeds is a parsable slice of Feed.

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
	// Feed is the client for interacting with the Feed builders.
	Feed *FeedClient
	// FeedConfig is the client for interacting with the FeedConfig builders.
	FeedConfig *FeedConfigClient
	// FeedItem is the client for interacting with the FeedItem builders.
	FeedItem *FeedItemClient
	// 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 int64 `json:"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"`
	// 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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) QueryAccount added in v0.0.6

func (u *User) QueryAccount() *AccountQuery

QueryAccount queries the "account" edge of the User entity.

func (*User) QueryApp added in v0.0.6

func (u *User) QueryApp() *AppQuery

QueryApp queries the "app" edge of the User entity.

func (*User) QueryCreate added in v0.0.6

func (u *User) QueryCreate() *UserQuery

QueryCreate queries the "create" edge of the User entity.

func (*User) QueryCreator added in v0.0.6

func (u *User) QueryCreator() *UserQuery

QueryCreator queries the "creator" edge of the User entity.

func (*User) QueryFeedConfig added in v0.0.6

func (u *User) QueryFeedConfig() *FeedConfigQuery

QueryFeedConfig queries the "feed_config" edge of the User entity.

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 int64) *UserDeleteOne

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

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int64) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int64) *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)

Intercept 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) QueryAccount added in v0.0.6

func (c *UserClient) QueryAccount(u *User) *AccountQuery

QueryAccount queries the account edge of a User.

func (*UserClient) QueryApp added in v0.0.6

func (c *UserClient) QueryApp(u *User) *AppQuery

QueryApp queries the app edge of a User.

func (*UserClient) QueryCreate added in v0.0.6

func (c *UserClient) QueryCreate(u *User) *UserQuery

QueryCreate queries the create edge of a User.

func (*UserClient) QueryCreator added in v0.0.6

func (c *UserClient) QueryCreator(u *User) *UserQuery

QueryCreator queries the creator edge of a User.

func (*UserClient) QueryFeedConfig added in v0.0.6

func (c *UserClient) QueryFeedConfig(u *User) *FeedConfigQuery

QueryFeedConfig queries the feed_config edge of a 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 int64) *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) AddAccount added in v0.0.6

func (uc *UserCreate) AddAccount(a ...*Account) *UserCreate

AddAccount adds the "account" edges to the Account entity.

func (*UserCreate) AddAccountIDs added in v0.0.6

func (uc *UserCreate) AddAccountIDs(ids ...int64) *UserCreate

AddAccountIDs adds the "account" edge to the Account entity by IDs.

func (*UserCreate) AddApp added in v0.0.6

func (uc *UserCreate) AddApp(a ...*App) *UserCreate

AddApp adds the "app" edges to the App entity.

func (*UserCreate) AddAppIDs added in v0.0.6

func (uc *UserCreate) AddAppIDs(ids ...int64) *UserCreate

AddAppIDs adds the "app" edge to the App entity by IDs.

func (*UserCreate) AddCreate added in v0.0.6

func (uc *UserCreate) AddCreate(u ...*User) *UserCreate

AddCreate adds the "create" edges to the User entity.

func (*UserCreate) AddCreateIDs added in v0.0.6

func (uc *UserCreate) AddCreateIDs(ids ...int64) *UserCreate

AddCreateIDs adds the "create" edge to the User entity by IDs.

func (*UserCreate) AddFeedConfig added in v0.0.6

func (uc *UserCreate) AddFeedConfig(f ...*FeedConfig) *UserCreate

AddFeedConfig adds the "feed_config" edges to the FeedConfig entity.

func (*UserCreate) AddFeedConfigIDs added in v0.0.6

func (uc *UserCreate) AddFeedConfigIDs(ids ...int64) *UserCreate

AddFeedConfigIDs adds the "feed_config" edge to the FeedConfig entity by IDs.

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().
	SetUsername(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) {
		SetUsername(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) SetCreator added in v0.0.6

func (uc *UserCreate) SetCreator(u *User) *UserCreate

SetCreator sets the "creator" edge to the User entity.

func (*UserCreate) SetCreatorID added in v0.0.6

func (uc *UserCreate) SetCreatorID(id int64) *UserCreate

SetCreatorID sets the "creator" edge to the User entity by ID.

func (*UserCreate) SetID added in v0.0.6

func (uc *UserCreate) SetID(i int64) *UserCreate

SetID sets the "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) SetNillableUpdatedAt added in v0.0.5

func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate

SetNillableUpdatedAt sets the "updated_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) SetUpdatedAt added in v0.0.5

func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate

SetUpdatedAt sets the "updated_at" 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) {
		SetUsername(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 UserEdges added in v0.0.6

type UserEdges struct {
	// Account holds the value of the account edge.
	Account []*Account `json:"account,omitempty"`
	// App holds the value of the app edge.
	App []*App `json:"app,omitempty"`
	// FeedConfig holds the value of the feed_config edge.
	FeedConfig []*FeedConfig `json:"feed_config,omitempty"`
	// Creator holds the value of the creator edge.
	Creator *User `json:"creator,omitempty"`
	// Create holds the value of the create edge.
	Create []*User `json:"create,omitempty"`
	// contains filtered or unexported fields
}

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

func (UserEdges) AccountOrErr added in v0.0.6

func (e UserEdges) AccountOrErr() ([]*Account, error)

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

func (UserEdges) AppOrErr added in v0.0.6

func (e UserEdges) AppOrErr() ([]*App, error)

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

func (UserEdges) CreateOrErr added in v0.0.6

func (e UserEdges) CreateOrErr() ([]*User, error)

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

func (UserEdges) CreatorOrErr added in v0.0.6

func (e UserEdges) CreatorOrErr() (*User, error)

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

func (UserEdges) FeedConfigOrErr added in v0.0.6

func (e UserEdges) FeedConfigOrErr() ([]*FeedConfig, error)

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

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) AccountCleared added in v0.0.6

func (m *UserMutation) AccountCleared() bool

AccountCleared reports if the "account" edge to the Account entity was cleared.

func (*UserMutation) AccountIDs added in v0.0.6

func (m *UserMutation) AccountIDs() (ids []int64)

AccountIDs returns the "account" edge IDs in the mutation.

func (*UserMutation) AddAccountIDs added in v0.0.6

func (m *UserMutation) AddAccountIDs(ids ...int64)

AddAccountIDs adds the "account" edge to the Account entity by ids.

func (*UserMutation) AddAppIDs added in v0.0.6

func (m *UserMutation) AddAppIDs(ids ...int64)

AddAppIDs adds the "app" edge to the App entity by ids.

func (*UserMutation) AddCreateIDs added in v0.0.6

func (m *UserMutation) AddCreateIDs(ids ...int64)

AddCreateIDs adds the "create" edge to the User entity by ids.

func (*UserMutation) AddFeedConfigIDs added in v0.0.6

func (m *UserMutation) AddFeedConfigIDs(ids ...int64)

AddFeedConfigIDs adds the "feed_config" edge to the FeedConfig entity by ids.

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) 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) AppCleared added in v0.0.6

func (m *UserMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

func (*UserMutation) AppIDs added in v0.0.6

func (m *UserMutation) AppIDs() (ids []int64)

AppIDs returns the "app" edge IDs in the mutation.

func (*UserMutation) ClearAccount added in v0.0.6

func (m *UserMutation) ClearAccount()

ClearAccount clears the "account" edge to the Account entity.

func (*UserMutation) ClearApp added in v0.0.6

func (m *UserMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

func (*UserMutation) ClearCreate added in v0.0.6

func (m *UserMutation) ClearCreate()

ClearCreate clears the "create" edge to the User entity.

func (*UserMutation) ClearCreator added in v0.0.6

func (m *UserMutation) ClearCreator()

ClearCreator clears the "creator" edge to the User entity.

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) ClearFeedConfig added in v0.0.6

func (m *UserMutation) ClearFeedConfig()

ClearFeedConfig clears the "feed_config" edge to the FeedConfig entity.

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) CreateCleared added in v0.0.6

func (m *UserMutation) CreateCleared() bool

CreateCleared reports if the "create" edge to the User entity was cleared.

func (*UserMutation) CreateIDs added in v0.0.6

func (m *UserMutation) CreateIDs() (ids []int64)

CreateIDs returns the "create" edge IDs in the mutation.

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) CreatorCleared added in v0.0.6

func (m *UserMutation) CreatorCleared() bool

CreatorCleared reports if the "creator" edge to the User entity was cleared.

func (*UserMutation) CreatorID added in v0.0.6

func (m *UserMutation) CreatorID() (id int64, exists bool)

CreatorID returns the "creator" edge ID in the mutation.

func (*UserMutation) CreatorIDs added in v0.0.6

func (m *UserMutation) CreatorIDs() (ids []int64)

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

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) FeedConfigCleared added in v0.0.6

func (m *UserMutation) FeedConfigCleared() bool

FeedConfigCleared reports if the "feed_config" edge to the FeedConfig entity was cleared.

func (*UserMutation) FeedConfigIDs added in v0.0.6

func (m *UserMutation) FeedConfigIDs() (ids []int64)

FeedConfigIDs returns the "feed_config" edge IDs in the 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 int64, exists bool)

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

func (*UserMutation) IDs

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

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

func (*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) 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) OldUpdatedAt added in v0.0.5

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

OldUpdatedAt returns the old "updated_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) 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) RemoveAccountIDs added in v0.0.6

func (m *UserMutation) RemoveAccountIDs(ids ...int64)

RemoveAccountIDs removes the "account" edge to the Account entity by IDs.

func (*UserMutation) RemoveAppIDs added in v0.0.6

func (m *UserMutation) RemoveAppIDs(ids ...int64)

RemoveAppIDs removes the "app" edge to the App entity by IDs.

func (*UserMutation) RemoveCreateIDs added in v0.0.6

func (m *UserMutation) RemoveCreateIDs(ids ...int64)

RemoveCreateIDs removes the "create" edge to the User entity by IDs.

func (*UserMutation) RemoveFeedConfigIDs added in v0.0.6

func (m *UserMutation) RemoveFeedConfigIDs(ids ...int64)

RemoveFeedConfigIDs removes the "feed_config" edge to the FeedConfig entity by IDs.

func (*UserMutation) RemovedAccountIDs added in v0.0.6

func (m *UserMutation) RemovedAccountIDs() (ids []int64)

RemovedAccount returns the removed IDs of the "account" edge to the Account entity.

func (*UserMutation) RemovedAppIDs added in v0.0.6

func (m *UserMutation) RemovedAppIDs() (ids []int64)

RemovedApp returns the removed IDs of the "app" edge to the App entity.

func (*UserMutation) RemovedCreateIDs added in v0.0.6

func (m *UserMutation) RemovedCreateIDs() (ids []int64)

RemovedCreate returns the removed IDs of the "create" edge to the User entity.

func (*UserMutation) RemovedEdges

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

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

func (*UserMutation) RemovedFeedConfigIDs added in v0.0.6

func (m *UserMutation) RemovedFeedConfigIDs() (ids []int64)

RemovedFeedConfig returns the removed IDs of the "feed_config" edge to the FeedConfig entity.

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) ResetAccount added in v0.0.6

func (m *UserMutation) ResetAccount()

ResetAccount resets all changes to the "account" edge.

func (*UserMutation) ResetApp added in v0.0.6

func (m *UserMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*UserMutation) ResetCreate added in v0.0.6

func (m *UserMutation) ResetCreate()

ResetCreate resets all changes to the "create" edge.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetCreator added in v0.0.6

func (m *UserMutation) ResetCreator()

ResetCreator resets all changes to the "creator" edge.

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) ResetFeedConfig added in v0.0.6

func (m *UserMutation) ResetFeedConfig()

ResetFeedConfig resets all changes to the "feed_config" edge.

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) 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) ResetUpdatedAt added in v0.0.5

func (m *UserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" 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) SetCreatorID added in v0.0.6

func (m *UserMutation) SetCreatorID(id int64)

SetCreatorID sets the "creator" edge to the User entity by id.

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) SetID added in v0.0.6

func (m *UserMutation) SetID(id int64)

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

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) SetUpdatedAt added in v0.0.5

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

SetUpdatedAt sets the "updated_at" 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) UpdatedAt added in v0.0.5

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

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

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 int64, 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) int64

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 {
	Username string `json:"username,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldUsername).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

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

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

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int64

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 int64, 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) int64

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) QueryAccount added in v0.0.6

func (uq *UserQuery) QueryAccount() *AccountQuery

QueryAccount chains the current query on the "account" edge.

func (*UserQuery) QueryApp added in v0.0.6

func (uq *UserQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

func (*UserQuery) QueryCreate added in v0.0.6

func (uq *UserQuery) QueryCreate() *UserQuery

QueryCreate chains the current query on the "create" edge.

func (*UserQuery) QueryCreator added in v0.0.6

func (uq *UserQuery) QueryCreator() *UserQuery

QueryCreator chains the current query on the "creator" edge.

func (*UserQuery) QueryFeedConfig added in v0.0.6

func (uq *UserQuery) QueryFeedConfig() *FeedConfigQuery

QueryFeedConfig chains the current query on the "feed_config" edge.

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 {
	Username string `json:"username,omitempty"`
}

client.User.Query().
	Select(user.FieldUsername).
	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.

func (*UserQuery) WithAccount added in v0.0.6

func (uq *UserQuery) WithAccount(opts ...func(*AccountQuery)) *UserQuery

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

func (*UserQuery) WithApp added in v0.0.6

func (uq *UserQuery) WithApp(opts ...func(*AppQuery)) *UserQuery

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

func (*UserQuery) WithCreate added in v0.0.6

func (uq *UserQuery) WithCreate(opts ...func(*UserQuery)) *UserQuery

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

func (*UserQuery) WithCreator added in v0.0.6

func (uq *UserQuery) WithCreator(opts ...func(*UserQuery)) *UserQuery

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

func (*UserQuery) WithFeedConfig added in v0.0.6

func (uq *UserQuery) WithFeedConfig(opts ...func(*FeedConfigQuery)) *UserQuery

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

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) AddAccount added in v0.0.6

func (uu *UserUpdate) AddAccount(a ...*Account) *UserUpdate

AddAccount adds the "account" edges to the Account entity.

func (*UserUpdate) AddAccountIDs added in v0.0.6

func (uu *UserUpdate) AddAccountIDs(ids ...int64) *UserUpdate

AddAccountIDs adds the "account" edge to the Account entity by IDs.

func (*UserUpdate) AddApp added in v0.0.6

func (uu *UserUpdate) AddApp(a ...*App) *UserUpdate

AddApp adds the "app" edges to the App entity.

func (*UserUpdate) AddAppIDs added in v0.0.6

func (uu *UserUpdate) AddAppIDs(ids ...int64) *UserUpdate

AddAppIDs adds the "app" edge to the App entity by IDs.

func (*UserUpdate) AddCreate added in v0.0.6

func (uu *UserUpdate) AddCreate(u ...*User) *UserUpdate

AddCreate adds the "create" edges to the User entity.

func (*UserUpdate) AddCreateIDs added in v0.0.6

func (uu *UserUpdate) AddCreateIDs(ids ...int64) *UserUpdate

AddCreateIDs adds the "create" edge to the User entity by IDs.

func (*UserUpdate) AddFeedConfig added in v0.0.6

func (uu *UserUpdate) AddFeedConfig(f ...*FeedConfig) *UserUpdate

AddFeedConfig adds the "feed_config" edges to the FeedConfig entity.

func (*UserUpdate) AddFeedConfigIDs added in v0.0.6

func (uu *UserUpdate) AddFeedConfigIDs(ids ...int64) *UserUpdate

AddFeedConfigIDs adds the "feed_config" edge to the FeedConfig entity by IDs.

func (*UserUpdate) ClearAccount added in v0.0.6

func (uu *UserUpdate) ClearAccount() *UserUpdate

ClearAccount clears all "account" edges to the Account entity.

func (*UserUpdate) ClearApp added in v0.0.6

func (uu *UserUpdate) ClearApp() *UserUpdate

ClearApp clears all "app" edges to the App entity.

func (*UserUpdate) ClearCreate added in v0.0.6

func (uu *UserUpdate) ClearCreate() *UserUpdate

ClearCreate clears all "create" edges to the User entity.

func (*UserUpdate) ClearCreator added in v0.0.6

func (uu *UserUpdate) ClearCreator() *UserUpdate

ClearCreator clears the "creator" edge to the User entity.

func (*UserUpdate) ClearFeedConfig added in v0.0.6

func (uu *UserUpdate) ClearFeedConfig() *UserUpdate

ClearFeedConfig clears all "feed_config" edges to the FeedConfig entity.

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) RemoveAccount added in v0.0.6

func (uu *UserUpdate) RemoveAccount(a ...*Account) *UserUpdate

RemoveAccount removes "account" edges to Account entities.

func (*UserUpdate) RemoveAccountIDs added in v0.0.6

func (uu *UserUpdate) RemoveAccountIDs(ids ...int64) *UserUpdate

RemoveAccountIDs removes the "account" edge to Account entities by IDs.

func (*UserUpdate) RemoveApp added in v0.0.6

func (uu *UserUpdate) RemoveApp(a ...*App) *UserUpdate

RemoveApp removes "app" edges to App entities.

func (*UserUpdate) RemoveAppIDs added in v0.0.6

func (uu *UserUpdate) RemoveAppIDs(ids ...int64) *UserUpdate

RemoveAppIDs removes the "app" edge to App entities by IDs.

func (*UserUpdate) RemoveCreate added in v0.0.6

func (uu *UserUpdate) RemoveCreate(u ...*User) *UserUpdate

RemoveCreate removes "create" edges to User entities.

func (*UserUpdate) RemoveCreateIDs added in v0.0.6

func (uu *UserUpdate) RemoveCreateIDs(ids ...int64) *UserUpdate

RemoveCreateIDs removes the "create" edge to User entities by IDs.

func (*UserUpdate) RemoveFeedConfig added in v0.0.6

func (uu *UserUpdate) RemoveFeedConfig(f ...*FeedConfig) *UserUpdate

RemoveFeedConfig removes "feed_config" edges to FeedConfig entities.

func (*UserUpdate) RemoveFeedConfigIDs added in v0.0.6

func (uu *UserUpdate) RemoveFeedConfigIDs(ids ...int64) *UserUpdate

RemoveFeedConfigIDs removes the "feed_config" edge to FeedConfig entities by IDs.

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) SetCreator added in v0.0.6

func (uu *UserUpdate) SetCreator(u *User) *UserUpdate

SetCreator sets the "creator" edge to the User entity.

func (*UserUpdate) SetCreatorID added in v0.0.6

func (uu *UserUpdate) SetCreatorID(id int64) *UserUpdate

SetCreatorID sets the "creator" edge to the User entity by ID.

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) SetUpdatedAt added in v0.0.5

func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate

SetUpdatedAt sets the "updated_at" 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) AddAccount added in v0.0.6

func (uuo *UserUpdateOne) AddAccount(a ...*Account) *UserUpdateOne

AddAccount adds the "account" edges to the Account entity.

func (*UserUpdateOne) AddAccountIDs added in v0.0.6

func (uuo *UserUpdateOne) AddAccountIDs(ids ...int64) *UserUpdateOne

AddAccountIDs adds the "account" edge to the Account entity by IDs.

func (*UserUpdateOne) AddApp added in v0.0.6

func (uuo *UserUpdateOne) AddApp(a ...*App) *UserUpdateOne

AddApp adds the "app" edges to the App entity.

func (*UserUpdateOne) AddAppIDs added in v0.0.6

func (uuo *UserUpdateOne) AddAppIDs(ids ...int64) *UserUpdateOne

AddAppIDs adds the "app" edge to the App entity by IDs.

func (*UserUpdateOne) AddCreate added in v0.0.6

func (uuo *UserUpdateOne) AddCreate(u ...*User) *UserUpdateOne

AddCreate adds the "create" edges to the User entity.

func (*UserUpdateOne) AddCreateIDs added in v0.0.6

func (uuo *UserUpdateOne) AddCreateIDs(ids ...int64) *UserUpdateOne

AddCreateIDs adds the "create" edge to the User entity by IDs.

func (*UserUpdateOne) AddFeedConfig added in v0.0.6

func (uuo *UserUpdateOne) AddFeedConfig(f ...*FeedConfig) *UserUpdateOne

AddFeedConfig adds the "feed_config" edges to the FeedConfig entity.

func (*UserUpdateOne) AddFeedConfigIDs added in v0.0.6

func (uuo *UserUpdateOne) AddFeedConfigIDs(ids ...int64) *UserUpdateOne

AddFeedConfigIDs adds the "feed_config" edge to the FeedConfig entity by IDs.

func (*UserUpdateOne) ClearAccount added in v0.0.6

func (uuo *UserUpdateOne) ClearAccount() *UserUpdateOne

ClearAccount clears all "account" edges to the Account entity.

func (*UserUpdateOne) ClearApp added in v0.0.6

func (uuo *UserUpdateOne) ClearApp() *UserUpdateOne

ClearApp clears all "app" edges to the App entity.

func (*UserUpdateOne) ClearCreate added in v0.0.6

func (uuo *UserUpdateOne) ClearCreate() *UserUpdateOne

ClearCreate clears all "create" edges to the User entity.

func (*UserUpdateOne) ClearCreator added in v0.0.6

func (uuo *UserUpdateOne) ClearCreator() *UserUpdateOne

ClearCreator clears the "creator" edge to the User entity.

func (*UserUpdateOne) ClearFeedConfig added in v0.0.6

func (uuo *UserUpdateOne) ClearFeedConfig() *UserUpdateOne

ClearFeedConfig clears all "feed_config" edges to the FeedConfig entity.

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) RemoveAccount added in v0.0.6

func (uuo *UserUpdateOne) RemoveAccount(a ...*Account) *UserUpdateOne

RemoveAccount removes "account" edges to Account entities.

func (*UserUpdateOne) RemoveAccountIDs added in v0.0.6

func (uuo *UserUpdateOne) RemoveAccountIDs(ids ...int64) *UserUpdateOne

RemoveAccountIDs removes the "account" edge to Account entities by IDs.

func (*UserUpdateOne) RemoveApp added in v0.0.6

func (uuo *UserUpdateOne) RemoveApp(a ...*App) *UserUpdateOne

RemoveApp removes "app" edges to App entities.

func (*UserUpdateOne) RemoveAppIDs added in v0.0.6

func (uuo *UserUpdateOne) RemoveAppIDs(ids ...int64) *UserUpdateOne

RemoveAppIDs removes the "app" edge to App entities by IDs.

func (*UserUpdateOne) RemoveCreate added in v0.0.6

func (uuo *UserUpdateOne) RemoveCreate(u ...*User) *UserUpdateOne

RemoveCreate removes "create" edges to User entities.

func (*UserUpdateOne) RemoveCreateIDs added in v0.0.6

func (uuo *UserUpdateOne) RemoveCreateIDs(ids ...int64) *UserUpdateOne

RemoveCreateIDs removes the "create" edge to User entities by IDs.

func (*UserUpdateOne) RemoveFeedConfig added in v0.0.6

func (uuo *UserUpdateOne) RemoveFeedConfig(f ...*FeedConfig) *UserUpdateOne

RemoveFeedConfig removes "feed_config" edges to FeedConfig entities.

func (*UserUpdateOne) RemoveFeedConfigIDs added in v0.0.6

func (uuo *UserUpdateOne) RemoveFeedConfigIDs(ids ...int64) *UserUpdateOne

RemoveFeedConfigIDs removes the "feed_config" edge to FeedConfig entities by IDs.

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) SetCreator added in v0.0.6

func (uuo *UserUpdateOne) SetCreator(u *User) *UserUpdateOne

SetCreator sets the "creator" edge to the User entity.

func (*UserUpdateOne) SetCreatorID added in v0.0.6

func (uuo *UserUpdateOne) SetCreatorID(id int64) *UserUpdateOne

SetCreatorID sets the "creator" edge to the User entity by ID.

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) SetUpdatedAt added in v0.0.5

func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdateOne) SetUsername

func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne

SetUsername sets the "username" field.

func (*UserUpdateOne) Where added in v0.0.5

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type UserUpsert added in v0.0.2

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) SetCreatedAt added in v0.0.2

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

SetCreatedAt sets the "created_at" 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) SetUpdatedAt added in v0.0.5

func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert

SetUpdatedAt sets the "updated_at" 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) 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) UpdateUpdatedAt added in v0.0.5

func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert

UpdateUpdatedAt sets the "updated_at" 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) 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) 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) SetUpdatedAt added in v0.0.5

func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk

SetUpdatedAt sets the "updated_at" 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) 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(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	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) UpdateUpdatedAt added in v0.0.5

func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk

UpdateUpdatedAt sets the "updated_at" 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) 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 int64, 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) int64

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) 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) SetUpdatedAt added in v0.0.5

func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne

SetUpdatedAt sets the "updated_at" 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) 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 except the ID field. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	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) UpdateUpdatedAt added in v0.0.5

func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne

UpdateUpdatedAt sets the "updated_at" 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