ent

package
v0.0.0-...-dfe096b Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: MIT Imports: 22 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.
	TypeMiniProgramAccount = "MiniProgramAccount"
	TypePhoneAccount       = "PhoneAccount"
	TypeUser               = "User"
	TypeUserAccount        = "UserAccount"
	TypeUserExtend         = "UserExtend"
	TypeUserInfo           = "UserInfo"
)

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 validaton error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks nor 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 Client attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector, func(string) bool) string

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

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// MiniProgramAccount is the client for interacting with the MiniProgramAccount builders.
	MiniProgramAccount *MiniProgramAccountClient
	// PhoneAccount is the client for interacting with the PhoneAccount builders.
	PhoneAccount *PhoneAccountClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UserAccount is the client for interacting with the UserAccount builders.
	UserAccount *UserAccountClient
	// UserExtend is the client for interacting with the UserExtend builders.
	UserExtend *UserExtendClient
	// UserInfo is the client for interacting with the UserInfo builders.
	UserInfo *UserInfoClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns the Client stored in 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 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().
	MiniProgramAccount.
	Query().
	Count(ctx)

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(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 Committer method.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Hook

type Hook = ent.Hook

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

type MiniProgramAccount

type MiniProgramAccount struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// UserIdentity holds the value of the "user_identity" field.
	UserIdentity string `json:"user_identity,omitempty"`
	// OpenID holds the value of the "open_id" field.
	OpenID string `json:"open_id,omitempty"`
	// NickName holds the value of the "nick_name" field.
	NickName string `json:"nick_name,omitempty"`
	// AvatarURL holds the value of the "avatar_url" field.
	AvatarURL string `json:"avatar_url,omitempty"`
	// Gender holds the value of the "gender" field.
	Gender int32 `json:"gender,omitempty"`
	// Country holds the value of the "country" field.
	Country string `json:"country,omitempty"`
	// Province holds the value of the "province" field.
	Province string `json:"province,omitempty"`
	// City holds the value of the "city" field.
	City string `json:"city,omitempty"`
	// Language holds the value of the "language" field.
	Language string `json:"language,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

MiniProgramAccount is the model entity for the MiniProgramAccount schema.

func (*MiniProgramAccount) String

func (mpa *MiniProgramAccount) String() string

String implements the fmt.Stringer.

func (*MiniProgramAccount) Unwrap

func (mpa *MiniProgramAccount) Unwrap() *MiniProgramAccount

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*MiniProgramAccount) Update

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

type MiniProgramAccountClient

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

MiniProgramAccountClient is a client for the MiniProgramAccount schema.

func NewMiniProgramAccountClient

func NewMiniProgramAccountClient(c config) *MiniProgramAccountClient

NewMiniProgramAccountClient returns a client for the MiniProgramAccount from the given config.

func (*MiniProgramAccountClient) Create

Create returns a create builder for MiniProgramAccount.

func (*MiniProgramAccountClient) CreateBulk

BulkCreate returns a builder for creating a bulk of MiniProgramAccount entities.

func (*MiniProgramAccountClient) Delete

Delete returns a delete builder for MiniProgramAccount.

func (*MiniProgramAccountClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*MiniProgramAccountClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*MiniProgramAccountClient) Get

Get returns a MiniProgramAccount entity by its id.

func (*MiniProgramAccountClient) GetX

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

func (*MiniProgramAccountClient) Hooks

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

Hooks returns the client hooks.

func (*MiniProgramAccountClient) Query

Query returns a query builder for MiniProgramAccount.

func (*MiniProgramAccountClient) Update

Update returns an update builder for MiniProgramAccount.

func (*MiniProgramAccountClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MiniProgramAccountClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*MiniProgramAccountClient) Use

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

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

type MiniProgramAccountCreate

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

MiniProgramAccountCreate is the builder for creating a MiniProgramAccount entity.

func (*MiniProgramAccountCreate) Mutation

Mutation returns the MiniProgramAccountMutation object of the builder.

func (*MiniProgramAccountCreate) Save

Save creates the MiniProgramAccount in the database.

func (*MiniProgramAccountCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MiniProgramAccountCreate) SetAvatarURL

SetAvatarURL sets the avatar_url field.

func (*MiniProgramAccountCreate) SetCity

SetCity sets the city field.

func (*MiniProgramAccountCreate) SetCountry

SetCountry sets the country field.

func (*MiniProgramAccountCreate) SetCreatedAt

SetCreatedAt sets the created_at field.

func (*MiniProgramAccountCreate) SetDeletedAt

SetDeletedAt sets the deleted_at field.

func (*MiniProgramAccountCreate) SetGender

SetGender sets the gender field.

func (*MiniProgramAccountCreate) SetID

SetID sets the id field.

func (*MiniProgramAccountCreate) SetLanguage

SetLanguage sets the language field.

func (*MiniProgramAccountCreate) SetNickName

SetNickName sets the nick_name field.

func (*MiniProgramAccountCreate) SetNillableAvatarURL

func (mpac *MiniProgramAccountCreate) SetNillableAvatarURL(s *string) *MiniProgramAccountCreate

SetNillableAvatarURL sets the avatar_url field if the given value is not nil.

func (*MiniProgramAccountCreate) SetNillableCity

func (mpac *MiniProgramAccountCreate) SetNillableCity(s *string) *MiniProgramAccountCreate

SetNillableCity sets the city field if the given value is not nil.

func (*MiniProgramAccountCreate) SetNillableCountry

func (mpac *MiniProgramAccountCreate) SetNillableCountry(s *string) *MiniProgramAccountCreate

SetNillableCountry sets the country field if the given value is not nil.

func (*MiniProgramAccountCreate) SetNillableCreatedAt

func (mpac *MiniProgramAccountCreate) SetNillableCreatedAt(t *time.Time) *MiniProgramAccountCreate

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

func (*MiniProgramAccountCreate) SetNillableDeletedAt

func (mpac *MiniProgramAccountCreate) SetNillableDeletedAt(t *time.Time) *MiniProgramAccountCreate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*MiniProgramAccountCreate) SetNillableGender

func (mpac *MiniProgramAccountCreate) SetNillableGender(i *int32) *MiniProgramAccountCreate

SetNillableGender sets the gender field if the given value is not nil.

func (*MiniProgramAccountCreate) SetNillableLanguage

func (mpac *MiniProgramAccountCreate) SetNillableLanguage(s *string) *MiniProgramAccountCreate

SetNillableLanguage sets the language field if the given value is not nil.

func (*MiniProgramAccountCreate) SetNillableNickName

func (mpac *MiniProgramAccountCreate) SetNillableNickName(s *string) *MiniProgramAccountCreate

SetNillableNickName sets the nick_name field if the given value is not nil.

func (*MiniProgramAccountCreate) SetNillableOpenID

func (mpac *MiniProgramAccountCreate) SetNillableOpenID(s *string) *MiniProgramAccountCreate

SetNillableOpenID sets the open_id field if the given value is not nil.

func (*MiniProgramAccountCreate) SetNillableProvince

func (mpac *MiniProgramAccountCreate) SetNillableProvince(s *string) *MiniProgramAccountCreate

SetNillableProvince sets the province field if the given value is not nil.

func (*MiniProgramAccountCreate) SetNillableUpdatedAt

func (mpac *MiniProgramAccountCreate) SetNillableUpdatedAt(t *time.Time) *MiniProgramAccountCreate

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

func (*MiniProgramAccountCreate) SetNillableUserIdentity

func (mpac *MiniProgramAccountCreate) SetNillableUserIdentity(s *string) *MiniProgramAccountCreate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*MiniProgramAccountCreate) SetOpenID

SetOpenID sets the open_id field.

func (*MiniProgramAccountCreate) SetProvince

SetProvince sets the province field.

func (*MiniProgramAccountCreate) SetUpdatedAt

SetUpdatedAt sets the updated_at field.

func (*MiniProgramAccountCreate) SetUserIdentity

func (mpac *MiniProgramAccountCreate) SetUserIdentity(s string) *MiniProgramAccountCreate

SetUserIdentity sets the user_identity field.

type MiniProgramAccountCreateBulk

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

MiniProgramAccountCreateBulk is the builder for creating a bulk of MiniProgramAccount entities.

func (*MiniProgramAccountCreateBulk) Save

Save creates the MiniProgramAccount entities in the database.

func (*MiniProgramAccountCreateBulk) SaveX

SaveX calls Save and panics if Save returns an error.

type MiniProgramAccountDelete

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

MiniProgramAccountDelete is the builder for deleting a MiniProgramAccount entity.

func (*MiniProgramAccountDelete) Exec

func (mpad *MiniProgramAccountDelete) Exec(ctx context.Context) (int, error)

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

func (*MiniProgramAccountDelete) ExecX

func (mpad *MiniProgramAccountDelete) ExecX(ctx context.Context) int

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

func (*MiniProgramAccountDelete) Where

Where adds a new predicate to the delete builder.

type MiniProgramAccountDeleteOne

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

MiniProgramAccountDeleteOne is the builder for deleting a single MiniProgramAccount entity.

func (*MiniProgramAccountDeleteOne) Exec

Exec executes the deletion query.

func (*MiniProgramAccountDeleteOne) ExecX

func (mpado *MiniProgramAccountDeleteOne) ExecX(ctx context.Context)

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

type MiniProgramAccountGroupBy

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

MiniProgramAccountGroupBy is the builder for group-by MiniProgramAccount entities.

func (*MiniProgramAccountGroupBy) Aggregate

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

func (*MiniProgramAccountGroupBy) Bool

func (mpagb *MiniProgramAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.

func (*MiniProgramAccountGroupBy) BoolX

func (mpagb *MiniProgramAccountGroupBy) BoolX(ctx context.Context) bool

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

func (*MiniProgramAccountGroupBy) Bools

func (mpagb *MiniProgramAccountGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*MiniProgramAccountGroupBy) BoolsX

func (mpagb *MiniProgramAccountGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MiniProgramAccountGroupBy) Float64

func (mpagb *MiniProgramAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.

func (*MiniProgramAccountGroupBy) Float64X

func (mpagb *MiniProgramAccountGroupBy) Float64X(ctx context.Context) float64

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

func (*MiniProgramAccountGroupBy) Float64s

func (mpagb *MiniProgramAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*MiniProgramAccountGroupBy) Float64sX

func (mpagb *MiniProgramAccountGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MiniProgramAccountGroupBy) Int

func (mpagb *MiniProgramAccountGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*MiniProgramAccountGroupBy) IntX

func (mpagb *MiniProgramAccountGroupBy) IntX(ctx context.Context) int

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

func (*MiniProgramAccountGroupBy) Ints

func (mpagb *MiniProgramAccountGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*MiniProgramAccountGroupBy) IntsX

func (mpagb *MiniProgramAccountGroupBy) IntsX(ctx context.Context) []int

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

func (*MiniProgramAccountGroupBy) Scan

func (mpagb *MiniProgramAccountGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*MiniProgramAccountGroupBy) ScanX

func (mpagb *MiniProgramAccountGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MiniProgramAccountGroupBy) String

func (mpagb *MiniProgramAccountGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*MiniProgramAccountGroupBy) StringX

func (mpagb *MiniProgramAccountGroupBy) StringX(ctx context.Context) string

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

func (*MiniProgramAccountGroupBy) Strings

func (mpagb *MiniProgramAccountGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*MiniProgramAccountGroupBy) StringsX

func (mpagb *MiniProgramAccountGroupBy) StringsX(ctx context.Context) []string

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

type MiniProgramAccountMutation

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

MiniProgramAccountMutation represents an operation that mutate the MiniProgramAccounts nodes in the graph.

func (*MiniProgramAccountMutation) AddField

func (m *MiniProgramAccountMutation) AddField(name string, value ent.Value) error

AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*MiniProgramAccountMutation) AddGender

func (m *MiniProgramAccountMutation) AddGender(i int32)

AddGender adds i to gender.

func (*MiniProgramAccountMutation) AddedEdges

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

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

func (*MiniProgramAccountMutation) AddedField

func (m *MiniProgramAccountMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.

func (*MiniProgramAccountMutation) AddedFields

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

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

func (*MiniProgramAccountMutation) AddedGender

func (m *MiniProgramAccountMutation) AddedGender() (r int32, exists bool)

AddedGender returns the value that was added to the gender field in this mutation.

func (*MiniProgramAccountMutation) AddedIDs

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

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*MiniProgramAccountMutation) AvatarURL

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

AvatarURL returns the avatar_url value in the mutation.

func (*MiniProgramAccountMutation) City

func (m *MiniProgramAccountMutation) City() (r string, exists bool)

City returns the city value in the mutation.

func (*MiniProgramAccountMutation) ClearCreatedAt

func (m *MiniProgramAccountMutation) ClearCreatedAt()

ClearCreatedAt clears the value of created_at.

func (*MiniProgramAccountMutation) ClearDeletedAt

func (m *MiniProgramAccountMutation) ClearDeletedAt()

ClearDeletedAt clears the value of deleted_at.

func (*MiniProgramAccountMutation) ClearEdge

func (m *MiniProgramAccountMutation) ClearEdge(name string) error

ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.

func (*MiniProgramAccountMutation) ClearField

func (m *MiniProgramAccountMutation) ClearField(name string) error

ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.

func (*MiniProgramAccountMutation) ClearOpenID

func (m *MiniProgramAccountMutation) ClearOpenID()

ClearOpenID clears the value of open_id.

func (*MiniProgramAccountMutation) ClearUpdatedAt

func (m *MiniProgramAccountMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of updated_at.

func (*MiniProgramAccountMutation) ClearUserIdentity

func (m *MiniProgramAccountMutation) ClearUserIdentity()

ClearUserIdentity clears the value of user_identity.

func (*MiniProgramAccountMutation) ClearedEdges

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

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

func (*MiniProgramAccountMutation) ClearedFields

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

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

func (MiniProgramAccountMutation) Client

func (m MiniProgramAccountMutation) 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 (*MiniProgramAccountMutation) Country

func (m *MiniProgramAccountMutation) Country() (r string, exists bool)

Country returns the country value in the mutation.

func (*MiniProgramAccountMutation) CreatedAt

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

CreatedAt returns the created_at value in the mutation.

func (*MiniProgramAccountMutation) CreatedAtCleared

func (m *MiniProgramAccountMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the field created_at was cleared in this mutation.

func (*MiniProgramAccountMutation) DeletedAt

func (m *MiniProgramAccountMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the deleted_at value in the mutation.

func (*MiniProgramAccountMutation) DeletedAtCleared

func (m *MiniProgramAccountMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the field deleted_at was cleared in this mutation.

func (*MiniProgramAccountMutation) EdgeCleared

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

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*MiniProgramAccountMutation) Field

func (m *MiniProgramAccountMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.

func (*MiniProgramAccountMutation) FieldCleared

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

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*MiniProgramAccountMutation) Fields

func (m *MiniProgramAccountMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().

func (*MiniProgramAccountMutation) Gender

func (m *MiniProgramAccountMutation) Gender() (r int32, exists bool)

Gender returns the gender value in the mutation.

func (*MiniProgramAccountMutation) ID

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

ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.

func (*MiniProgramAccountMutation) Language

func (m *MiniProgramAccountMutation) Language() (r string, exists bool)

Language returns the language value in the mutation.

func (*MiniProgramAccountMutation) NickName

func (m *MiniProgramAccountMutation) NickName() (r string, exists bool)

NickName returns the nick_name value in the mutation.

func (*MiniProgramAccountMutation) OldAvatarURL

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

OldAvatarURL returns the old avatar_url value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldCity

func (m *MiniProgramAccountMutation) OldCity(ctx context.Context) (v string, err error)

OldCity returns the old city value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldCountry

func (m *MiniProgramAccountMutation) OldCountry(ctx context.Context) (v string, err error)

OldCountry returns the old country value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldCreatedAt

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

OldCreatedAt returns the old created_at value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldDeletedAt

func (m *MiniProgramAccountMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old deleted_at value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldField

func (m *MiniProgramAccountMutation) 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 was failed.

func (*MiniProgramAccountMutation) OldGender

func (m *MiniProgramAccountMutation) OldGender(ctx context.Context) (v int32, err error)

OldGender returns the old gender value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldLanguage

func (m *MiniProgramAccountMutation) OldLanguage(ctx context.Context) (v string, err error)

OldLanguage returns the old language value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldNickName

func (m *MiniProgramAccountMutation) OldNickName(ctx context.Context) (v string, err error)

OldNickName returns the old nick_name value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldOpenID

func (m *MiniProgramAccountMutation) OldOpenID(ctx context.Context) (v string, err error)

OldOpenID returns the old open_id value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldProvince

func (m *MiniProgramAccountMutation) OldProvince(ctx context.Context) (v string, err error)

OldProvince returns the old province value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldUpdatedAt

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

OldUpdatedAt returns the old updated_at value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) OldUserIdentity

func (m *MiniProgramAccountMutation) OldUserIdentity(ctx context.Context) (v string, err error)

OldUserIdentity returns the old user_identity value of the MiniProgramAccount. If the MiniProgramAccount 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 database query fails.

func (*MiniProgramAccountMutation) Op

Op returns the operation name.

func (*MiniProgramAccountMutation) OpenID

func (m *MiniProgramAccountMutation) OpenID() (r string, exists bool)

OpenID returns the open_id value in the mutation.

func (*MiniProgramAccountMutation) OpenIDCleared

func (m *MiniProgramAccountMutation) OpenIDCleared() bool

OpenIDCleared returns if the field open_id was cleared in this mutation.

func (*MiniProgramAccountMutation) Province

func (m *MiniProgramAccountMutation) Province() (r string, exists bool)

Province returns the province value in the mutation.

func (*MiniProgramAccountMutation) RemovedEdges

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

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

func (*MiniProgramAccountMutation) RemovedIDs

func (m *MiniProgramAccountMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*MiniProgramAccountMutation) ResetAvatarURL

func (m *MiniProgramAccountMutation) ResetAvatarURL()

ResetAvatarURL reset all changes of the "avatar_url" field.

func (*MiniProgramAccountMutation) ResetCity

func (m *MiniProgramAccountMutation) ResetCity()

ResetCity reset all changes of the "city" field.

func (*MiniProgramAccountMutation) ResetCountry

func (m *MiniProgramAccountMutation) ResetCountry()

ResetCountry reset all changes of the "country" field.

func (*MiniProgramAccountMutation) ResetCreatedAt

func (m *MiniProgramAccountMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*MiniProgramAccountMutation) ResetDeletedAt

func (m *MiniProgramAccountMutation) ResetDeletedAt()

ResetDeletedAt reset all changes of the "deleted_at" field.

func (*MiniProgramAccountMutation) ResetEdge

func (m *MiniProgramAccountMutation) ResetEdge(name string) error

ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.

func (*MiniProgramAccountMutation) ResetField

func (m *MiniProgramAccountMutation) ResetField(name string) error

ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.

func (*MiniProgramAccountMutation) ResetGender

func (m *MiniProgramAccountMutation) ResetGender()

ResetGender reset all changes of the "gender" field.

func (*MiniProgramAccountMutation) ResetLanguage

func (m *MiniProgramAccountMutation) ResetLanguage()

ResetLanguage reset all changes of the "language" field.

func (*MiniProgramAccountMutation) ResetNickName

func (m *MiniProgramAccountMutation) ResetNickName()

ResetNickName reset all changes of the "nick_name" field.

func (*MiniProgramAccountMutation) ResetOpenID

func (m *MiniProgramAccountMutation) ResetOpenID()

ResetOpenID reset all changes of the "open_id" field.

func (*MiniProgramAccountMutation) ResetProvince

func (m *MiniProgramAccountMutation) ResetProvince()

ResetProvince reset all changes of the "province" field.

func (*MiniProgramAccountMutation) ResetUpdatedAt

func (m *MiniProgramAccountMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*MiniProgramAccountMutation) ResetUserIdentity

func (m *MiniProgramAccountMutation) ResetUserIdentity()

ResetUserIdentity reset all changes of the "user_identity" field.

func (*MiniProgramAccountMutation) SetAvatarURL

func (m *MiniProgramAccountMutation) SetAvatarURL(s string)

SetAvatarURL sets the avatar_url field.

func (*MiniProgramAccountMutation) SetCity

func (m *MiniProgramAccountMutation) SetCity(s string)

SetCity sets the city field.

func (*MiniProgramAccountMutation) SetCountry

func (m *MiniProgramAccountMutation) SetCountry(s string)

SetCountry sets the country field.

func (*MiniProgramAccountMutation) SetCreatedAt

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

SetCreatedAt sets the created_at field.

func (*MiniProgramAccountMutation) SetDeletedAt

func (m *MiniProgramAccountMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the deleted_at field.

func (*MiniProgramAccountMutation) SetField

func (m *MiniProgramAccountMutation) SetField(name string, value ent.Value) error

SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*MiniProgramAccountMutation) SetGender

func (m *MiniProgramAccountMutation) SetGender(i int32)

SetGender sets the gender field.

func (*MiniProgramAccountMutation) SetID

func (m *MiniProgramAccountMutation) SetID(id int64)

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

func (*MiniProgramAccountMutation) SetLanguage

func (m *MiniProgramAccountMutation) SetLanguage(s string)

SetLanguage sets the language field.

func (*MiniProgramAccountMutation) SetNickName

func (m *MiniProgramAccountMutation) SetNickName(s string)

SetNickName sets the nick_name field.

func (*MiniProgramAccountMutation) SetOpenID

func (m *MiniProgramAccountMutation) SetOpenID(s string)

SetOpenID sets the open_id field.

func (*MiniProgramAccountMutation) SetProvince

func (m *MiniProgramAccountMutation) SetProvince(s string)

SetProvince sets the province field.

func (*MiniProgramAccountMutation) SetUpdatedAt

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

SetUpdatedAt sets the updated_at field.

func (*MiniProgramAccountMutation) SetUserIdentity

func (m *MiniProgramAccountMutation) SetUserIdentity(s string)

SetUserIdentity sets the user_identity field.

func (MiniProgramAccountMutation) Tx

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

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

func (*MiniProgramAccountMutation) Type

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

func (*MiniProgramAccountMutation) UpdatedAt

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

UpdatedAt returns the updated_at value in the mutation.

func (*MiniProgramAccountMutation) UpdatedAtCleared

func (m *MiniProgramAccountMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the field updated_at was cleared in this mutation.

func (*MiniProgramAccountMutation) UserIdentity

func (m *MiniProgramAccountMutation) UserIdentity() (r string, exists bool)

UserIdentity returns the user_identity value in the mutation.

func (*MiniProgramAccountMutation) UserIdentityCleared

func (m *MiniProgramAccountMutation) UserIdentityCleared() bool

UserIdentityCleared returns if the field user_identity was cleared in this mutation.

type MiniProgramAccountQuery

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

MiniProgramAccountQuery is the builder for querying MiniProgramAccount entities.

func (*MiniProgramAccountQuery) All

All executes the query and returns a list of MiniProgramAccounts.

func (*MiniProgramAccountQuery) AllX

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

func (*MiniProgramAccountQuery) Clone

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

func (*MiniProgramAccountQuery) Count

func (mpaq *MiniProgramAccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MiniProgramAccountQuery) CountX

func (mpaq *MiniProgramAccountQuery) CountX(ctx context.Context) int

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

func (*MiniProgramAccountQuery) Exist

func (mpaq *MiniProgramAccountQuery) Exist(ctx context.Context) (bool, error)

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

func (*MiniProgramAccountQuery) ExistX

func (mpaq *MiniProgramAccountQuery) ExistX(ctx context.Context) bool

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

func (*MiniProgramAccountQuery) First

First returns the first MiniProgramAccount entity in the query. Returns *NotFoundError when no miniprogramaccount was found.

func (*MiniProgramAccountQuery) FirstID

func (mpaq *MiniProgramAccountQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first MiniProgramAccount id in the query. Returns *NotFoundError when no id was found.

func (*MiniProgramAccountQuery) FirstX

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

func (*MiniProgramAccountQuery) FirstXID

func (mpaq *MiniProgramAccountQuery) FirstXID(ctx context.Context) int64

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

func (*MiniProgramAccountQuery) GroupBy

func (mpaq *MiniProgramAccountQuery) GroupBy(field string, fields ...string) *MiniProgramAccountGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MiniProgramAccount.Query().
	GroupBy(miniprogramaccount.FieldUserIdentity).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MiniProgramAccountQuery) IDs

func (mpaq *MiniProgramAccountQuery) IDs(ctx context.Context) ([]int64, error)

IDs executes the query and returns a list of MiniProgramAccount ids.

func (*MiniProgramAccountQuery) IDsX

func (mpaq *MiniProgramAccountQuery) IDsX(ctx context.Context) []int64

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

func (*MiniProgramAccountQuery) Limit

Limit adds a limit step to the query.

func (*MiniProgramAccountQuery) Offset

func (mpaq *MiniProgramAccountQuery) Offset(offset int) *MiniProgramAccountQuery

Offset adds an offset step to the query.

func (*MiniProgramAccountQuery) Only

Only returns the only MiniProgramAccount entity in the query, returns an error if not exactly one entity was returned.

func (*MiniProgramAccountQuery) OnlyID

func (mpaq *MiniProgramAccountQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID returns the only MiniProgramAccount id in the query, returns an error if not exactly one id was returned.

func (*MiniProgramAccountQuery) OnlyIDX

func (mpaq *MiniProgramAccountQuery) OnlyIDX(ctx context.Context) int64

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

func (*MiniProgramAccountQuery) OnlyX

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

func (*MiniProgramAccountQuery) Order

Order adds an order step to the query.

func (*MiniProgramAccountQuery) Select

func (mpaq *MiniProgramAccountQuery) Select(field string, fields ...string) *MiniProgramAccountSelect

Select one or more fields from the given query.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
}

client.MiniProgramAccount.Query().
	Select(miniprogramaccount.FieldUserIdentity).
	Scan(ctx, &v)

func (*MiniProgramAccountQuery) Where

Where adds a new predicate for the builder.

type MiniProgramAccountSelect

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

MiniProgramAccountSelect is the builder for select fields of MiniProgramAccount entities.

func (*MiniProgramAccountSelect) Bool

func (mpas *MiniProgramAccountSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*MiniProgramAccountSelect) BoolX

func (mpas *MiniProgramAccountSelect) BoolX(ctx context.Context) bool

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

func (*MiniProgramAccountSelect) Bools

func (mpas *MiniProgramAccountSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*MiniProgramAccountSelect) BoolsX

func (mpas *MiniProgramAccountSelect) BoolsX(ctx context.Context) []bool

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

func (*MiniProgramAccountSelect) Float64

func (mpas *MiniProgramAccountSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*MiniProgramAccountSelect) Float64X

func (mpas *MiniProgramAccountSelect) Float64X(ctx context.Context) float64

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

func (*MiniProgramAccountSelect) Float64s

func (mpas *MiniProgramAccountSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*MiniProgramAccountSelect) Float64sX

func (mpas *MiniProgramAccountSelect) Float64sX(ctx context.Context) []float64

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

func (*MiniProgramAccountSelect) Int

func (mpas *MiniProgramAccountSelect) Int(ctx context.Context) (_ int, err error)

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

func (*MiniProgramAccountSelect) IntX

func (mpas *MiniProgramAccountSelect) IntX(ctx context.Context) int

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

func (*MiniProgramAccountSelect) Ints

func (mpas *MiniProgramAccountSelect) Ints(ctx context.Context) ([]int, error)

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

func (*MiniProgramAccountSelect) IntsX

func (mpas *MiniProgramAccountSelect) IntsX(ctx context.Context) []int

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

func (*MiniProgramAccountSelect) Scan

func (mpas *MiniProgramAccountSelect) Scan(ctx context.Context, v interface{}) error

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

func (*MiniProgramAccountSelect) ScanX

func (mpas *MiniProgramAccountSelect) ScanX(ctx context.Context, v interface{})

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

func (*MiniProgramAccountSelect) String

func (mpas *MiniProgramAccountSelect) String(ctx context.Context) (_ string, err error)

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

func (*MiniProgramAccountSelect) StringX

func (mpas *MiniProgramAccountSelect) StringX(ctx context.Context) string

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

func (*MiniProgramAccountSelect) Strings

func (mpas *MiniProgramAccountSelect) Strings(ctx context.Context) ([]string, error)

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

func (*MiniProgramAccountSelect) StringsX

func (mpas *MiniProgramAccountSelect) StringsX(ctx context.Context) []string

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

type MiniProgramAccountUpdate

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

MiniProgramAccountUpdate is the builder for updating MiniProgramAccount entities.

func (*MiniProgramAccountUpdate) AddGender

AddGender adds i to gender.

func (*MiniProgramAccountUpdate) ClearCreatedAt

func (mpau *MiniProgramAccountUpdate) ClearCreatedAt() *MiniProgramAccountUpdate

ClearCreatedAt clears the value of created_at.

func (*MiniProgramAccountUpdate) ClearDeletedAt

func (mpau *MiniProgramAccountUpdate) ClearDeletedAt() *MiniProgramAccountUpdate

ClearDeletedAt clears the value of deleted_at.

func (*MiniProgramAccountUpdate) ClearOpenID

ClearOpenID clears the value of open_id.

func (*MiniProgramAccountUpdate) ClearUpdatedAt

func (mpau *MiniProgramAccountUpdate) ClearUpdatedAt() *MiniProgramAccountUpdate

ClearUpdatedAt clears the value of updated_at.

func (*MiniProgramAccountUpdate) ClearUserIdentity

func (mpau *MiniProgramAccountUpdate) ClearUserIdentity() *MiniProgramAccountUpdate

ClearUserIdentity clears the value of user_identity.

func (*MiniProgramAccountUpdate) Exec

Exec executes the query.

func (*MiniProgramAccountUpdate) ExecX

func (mpau *MiniProgramAccountUpdate) ExecX(ctx context.Context)

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

func (*MiniProgramAccountUpdate) Mutation

Mutation returns the MiniProgramAccountMutation object of the builder.

func (*MiniProgramAccountUpdate) Save

func (mpau *MiniProgramAccountUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*MiniProgramAccountUpdate) SaveX

func (mpau *MiniProgramAccountUpdate) SaveX(ctx context.Context) int

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

func (*MiniProgramAccountUpdate) SetAvatarURL

SetAvatarURL sets the avatar_url field.

func (*MiniProgramAccountUpdate) SetCity

SetCity sets the city field.

func (*MiniProgramAccountUpdate) SetCountry

SetCountry sets the country field.

func (*MiniProgramAccountUpdate) SetCreatedAt

SetCreatedAt sets the created_at field.

func (*MiniProgramAccountUpdate) SetDeletedAt

SetDeletedAt sets the deleted_at field.

func (*MiniProgramAccountUpdate) SetGender

SetGender sets the gender field.

func (*MiniProgramAccountUpdate) SetLanguage

SetLanguage sets the language field.

func (*MiniProgramAccountUpdate) SetNickName

SetNickName sets the nick_name field.

func (*MiniProgramAccountUpdate) SetNillableAvatarURL

func (mpau *MiniProgramAccountUpdate) SetNillableAvatarURL(s *string) *MiniProgramAccountUpdate

SetNillableAvatarURL sets the avatar_url field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetNillableCity

func (mpau *MiniProgramAccountUpdate) SetNillableCity(s *string) *MiniProgramAccountUpdate

SetNillableCity sets the city field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetNillableCountry

func (mpau *MiniProgramAccountUpdate) SetNillableCountry(s *string) *MiniProgramAccountUpdate

SetNillableCountry sets the country field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetNillableCreatedAt

func (mpau *MiniProgramAccountUpdate) SetNillableCreatedAt(t *time.Time) *MiniProgramAccountUpdate

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

func (*MiniProgramAccountUpdate) SetNillableDeletedAt

func (mpau *MiniProgramAccountUpdate) SetNillableDeletedAt(t *time.Time) *MiniProgramAccountUpdate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetNillableGender

func (mpau *MiniProgramAccountUpdate) SetNillableGender(i *int32) *MiniProgramAccountUpdate

SetNillableGender sets the gender field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetNillableLanguage

func (mpau *MiniProgramAccountUpdate) SetNillableLanguage(s *string) *MiniProgramAccountUpdate

SetNillableLanguage sets the language field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetNillableNickName

func (mpau *MiniProgramAccountUpdate) SetNillableNickName(s *string) *MiniProgramAccountUpdate

SetNillableNickName sets the nick_name field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetNillableOpenID

func (mpau *MiniProgramAccountUpdate) SetNillableOpenID(s *string) *MiniProgramAccountUpdate

SetNillableOpenID sets the open_id field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetNillableProvince

func (mpau *MiniProgramAccountUpdate) SetNillableProvince(s *string) *MiniProgramAccountUpdate

SetNillableProvince sets the province field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetNillableUpdatedAt

func (mpau *MiniProgramAccountUpdate) SetNillableUpdatedAt(t *time.Time) *MiniProgramAccountUpdate

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

func (*MiniProgramAccountUpdate) SetNillableUserIdentity

func (mpau *MiniProgramAccountUpdate) SetNillableUserIdentity(s *string) *MiniProgramAccountUpdate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*MiniProgramAccountUpdate) SetOpenID

SetOpenID sets the open_id field.

func (*MiniProgramAccountUpdate) SetProvince

SetProvince sets the province field.

func (*MiniProgramAccountUpdate) SetUpdatedAt

SetUpdatedAt sets the updated_at field.

func (*MiniProgramAccountUpdate) SetUserIdentity

func (mpau *MiniProgramAccountUpdate) SetUserIdentity(s string) *MiniProgramAccountUpdate

SetUserIdentity sets the user_identity field.

func (*MiniProgramAccountUpdate) Where

Where adds a new predicate for the builder.

type MiniProgramAccountUpdateOne

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

MiniProgramAccountUpdateOne is the builder for updating a single MiniProgramAccount entity.

func (*MiniProgramAccountUpdateOne) AddGender

AddGender adds i to gender.

func (*MiniProgramAccountUpdateOne) ClearCreatedAt

ClearCreatedAt clears the value of created_at.

func (*MiniProgramAccountUpdateOne) ClearDeletedAt

ClearDeletedAt clears the value of deleted_at.

func (*MiniProgramAccountUpdateOne) ClearOpenID

ClearOpenID clears the value of open_id.

func (*MiniProgramAccountUpdateOne) ClearUpdatedAt

ClearUpdatedAt clears the value of updated_at.

func (*MiniProgramAccountUpdateOne) ClearUserIdentity

func (mpauo *MiniProgramAccountUpdateOne) ClearUserIdentity() *MiniProgramAccountUpdateOne

ClearUserIdentity clears the value of user_identity.

func (*MiniProgramAccountUpdateOne) Exec

Exec executes the query on the entity.

func (*MiniProgramAccountUpdateOne) ExecX

func (mpauo *MiniProgramAccountUpdateOne) ExecX(ctx context.Context)

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

func (*MiniProgramAccountUpdateOne) Mutation

Mutation returns the MiniProgramAccountMutation object of the builder.

func (*MiniProgramAccountUpdateOne) Save

Save executes the query and returns the updated entity.

func (*MiniProgramAccountUpdateOne) SaveX

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

func (*MiniProgramAccountUpdateOne) SetAvatarURL

SetAvatarURL sets the avatar_url field.

func (*MiniProgramAccountUpdateOne) SetCity

SetCity sets the city field.

func (*MiniProgramAccountUpdateOne) SetCountry

SetCountry sets the country field.

func (*MiniProgramAccountUpdateOne) SetCreatedAt

SetCreatedAt sets the created_at field.

func (*MiniProgramAccountUpdateOne) SetDeletedAt

SetDeletedAt sets the deleted_at field.

func (*MiniProgramAccountUpdateOne) SetGender

SetGender sets the gender field.

func (*MiniProgramAccountUpdateOne) SetLanguage

SetLanguage sets the language field.

func (*MiniProgramAccountUpdateOne) SetNickName

SetNickName sets the nick_name field.

func (*MiniProgramAccountUpdateOne) SetNillableAvatarURL

func (mpauo *MiniProgramAccountUpdateOne) SetNillableAvatarURL(s *string) *MiniProgramAccountUpdateOne

SetNillableAvatarURL sets the avatar_url field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetNillableCity

SetNillableCity sets the city field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetNillableCountry

func (mpauo *MiniProgramAccountUpdateOne) SetNillableCountry(s *string) *MiniProgramAccountUpdateOne

SetNillableCountry sets the country field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetNillableCreatedAt

func (mpauo *MiniProgramAccountUpdateOne) SetNillableCreatedAt(t *time.Time) *MiniProgramAccountUpdateOne

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

func (*MiniProgramAccountUpdateOne) SetNillableDeletedAt

func (mpauo *MiniProgramAccountUpdateOne) SetNillableDeletedAt(t *time.Time) *MiniProgramAccountUpdateOne

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetNillableGender

func (mpauo *MiniProgramAccountUpdateOne) SetNillableGender(i *int32) *MiniProgramAccountUpdateOne

SetNillableGender sets the gender field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetNillableLanguage

func (mpauo *MiniProgramAccountUpdateOne) SetNillableLanguage(s *string) *MiniProgramAccountUpdateOne

SetNillableLanguage sets the language field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetNillableNickName

func (mpauo *MiniProgramAccountUpdateOne) SetNillableNickName(s *string) *MiniProgramAccountUpdateOne

SetNillableNickName sets the nick_name field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetNillableOpenID

func (mpauo *MiniProgramAccountUpdateOne) SetNillableOpenID(s *string) *MiniProgramAccountUpdateOne

SetNillableOpenID sets the open_id field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetNillableProvince

func (mpauo *MiniProgramAccountUpdateOne) SetNillableProvince(s *string) *MiniProgramAccountUpdateOne

SetNillableProvince sets the province field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetNillableUpdatedAt

func (mpauo *MiniProgramAccountUpdateOne) SetNillableUpdatedAt(t *time.Time) *MiniProgramAccountUpdateOne

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

func (*MiniProgramAccountUpdateOne) SetNillableUserIdentity

func (mpauo *MiniProgramAccountUpdateOne) SetNillableUserIdentity(s *string) *MiniProgramAccountUpdateOne

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*MiniProgramAccountUpdateOne) SetOpenID

SetOpenID sets the open_id field.

func (*MiniProgramAccountUpdateOne) SetProvince

SetProvince sets the province field.

func (*MiniProgramAccountUpdateOne) SetUpdatedAt

SetUpdatedAt sets the updated_at field.

func (*MiniProgramAccountUpdateOne) SetUserIdentity

SetUserIdentity sets the user_identity field.

type MiniProgramAccounts

type MiniProgramAccounts []*MiniProgramAccount

MiniProgramAccounts is a parsable slice of MiniProgramAccount.

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflict 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 conflict 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(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector, func(string) bool)

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 PhoneAccount

type PhoneAccount struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// UserIdentity holds the value of the "user_identity" field.
	UserIdentity string `json:"user_identity,omitempty"`
	// Phone holds the value of the "phone" field.
	Phone string `json:"phone,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

PhoneAccount is the model entity for the PhoneAccount schema.

func (*PhoneAccount) String

func (pa *PhoneAccount) String() string

String implements the fmt.Stringer.

func (*PhoneAccount) Unwrap

func (pa *PhoneAccount) Unwrap() *PhoneAccount

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*PhoneAccount) Update

func (pa *PhoneAccount) Update() *PhoneAccountUpdateOne

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

type PhoneAccountClient

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

PhoneAccountClient is a client for the PhoneAccount schema.

func NewPhoneAccountClient

func NewPhoneAccountClient(c config) *PhoneAccountClient

NewPhoneAccountClient returns a client for the PhoneAccount from the given config.

func (*PhoneAccountClient) Create

Create returns a create builder for PhoneAccount.

func (*PhoneAccountClient) CreateBulk

func (c *PhoneAccountClient) CreateBulk(builders ...*PhoneAccountCreate) *PhoneAccountCreateBulk

BulkCreate returns a builder for creating a bulk of PhoneAccount entities.

func (*PhoneAccountClient) Delete

Delete returns a delete builder for PhoneAccount.

func (*PhoneAccountClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*PhoneAccountClient) DeleteOneID

func (c *PhoneAccountClient) DeleteOneID(id int64) *PhoneAccountDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*PhoneAccountClient) Get

Get returns a PhoneAccount entity by its id.

func (*PhoneAccountClient) GetX

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

func (*PhoneAccountClient) Hooks

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

Hooks returns the client hooks.

func (*PhoneAccountClient) Query

Query returns a query builder for PhoneAccount.

func (*PhoneAccountClient) Update

Update returns an update builder for PhoneAccount.

func (*PhoneAccountClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PhoneAccountClient) UpdateOneID

func (c *PhoneAccountClient) UpdateOneID(id int64) *PhoneAccountUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PhoneAccountClient) Use

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

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

type PhoneAccountCreate

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

PhoneAccountCreate is the builder for creating a PhoneAccount entity.

func (*PhoneAccountCreate) Mutation

func (pac *PhoneAccountCreate) Mutation() *PhoneAccountMutation

Mutation returns the PhoneAccountMutation object of the builder.

func (*PhoneAccountCreate) Save

Save creates the PhoneAccount in the database.

func (*PhoneAccountCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*PhoneAccountCreate) SetCreatedAt

func (pac *PhoneAccountCreate) SetCreatedAt(t time.Time) *PhoneAccountCreate

SetCreatedAt sets the created_at field.

func (*PhoneAccountCreate) SetDeletedAt

func (pac *PhoneAccountCreate) SetDeletedAt(t time.Time) *PhoneAccountCreate

SetDeletedAt sets the deleted_at field.

func (*PhoneAccountCreate) SetID

SetID sets the id field.

func (*PhoneAccountCreate) SetNillableCreatedAt

func (pac *PhoneAccountCreate) SetNillableCreatedAt(t *time.Time) *PhoneAccountCreate

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

func (*PhoneAccountCreate) SetNillableDeletedAt

func (pac *PhoneAccountCreate) SetNillableDeletedAt(t *time.Time) *PhoneAccountCreate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*PhoneAccountCreate) SetNillablePhone

func (pac *PhoneAccountCreate) SetNillablePhone(s *string) *PhoneAccountCreate

SetNillablePhone sets the phone field if the given value is not nil.

func (*PhoneAccountCreate) SetNillableUpdatedAt

func (pac *PhoneAccountCreate) SetNillableUpdatedAt(t *time.Time) *PhoneAccountCreate

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

func (*PhoneAccountCreate) SetNillableUserIdentity

func (pac *PhoneAccountCreate) SetNillableUserIdentity(s *string) *PhoneAccountCreate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*PhoneAccountCreate) SetPhone

func (pac *PhoneAccountCreate) SetPhone(s string) *PhoneAccountCreate

SetPhone sets the phone field.

func (*PhoneAccountCreate) SetUpdatedAt

func (pac *PhoneAccountCreate) SetUpdatedAt(t time.Time) *PhoneAccountCreate

SetUpdatedAt sets the updated_at field.

func (*PhoneAccountCreate) SetUserIdentity

func (pac *PhoneAccountCreate) SetUserIdentity(s string) *PhoneAccountCreate

SetUserIdentity sets the user_identity field.

type PhoneAccountCreateBulk

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

PhoneAccountCreateBulk is the builder for creating a bulk of PhoneAccount entities.

func (*PhoneAccountCreateBulk) Save

Save creates the PhoneAccount entities in the database.

func (*PhoneAccountCreateBulk) SaveX

func (pacb *PhoneAccountCreateBulk) SaveX(ctx context.Context) []*PhoneAccount

SaveX calls Save and panics if Save returns an error.

type PhoneAccountDelete

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

PhoneAccountDelete is the builder for deleting a PhoneAccount entity.

func (*PhoneAccountDelete) Exec

func (pad *PhoneAccountDelete) Exec(ctx context.Context) (int, error)

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

func (*PhoneAccountDelete) ExecX

func (pad *PhoneAccountDelete) ExecX(ctx context.Context) int

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

func (*PhoneAccountDelete) Where

Where adds a new predicate to the delete builder.

type PhoneAccountDeleteOne

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

PhoneAccountDeleteOne is the builder for deleting a single PhoneAccount entity.

func (*PhoneAccountDeleteOne) Exec

func (pado *PhoneAccountDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PhoneAccountDeleteOne) ExecX

func (pado *PhoneAccountDeleteOne) ExecX(ctx context.Context)

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

type PhoneAccountGroupBy

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

PhoneAccountGroupBy is the builder for group-by PhoneAccount entities.

func (*PhoneAccountGroupBy) Aggregate

func (pagb *PhoneAccountGroupBy) Aggregate(fns ...AggregateFunc) *PhoneAccountGroupBy

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

func (*PhoneAccountGroupBy) Bool

func (pagb *PhoneAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.

func (*PhoneAccountGroupBy) BoolX

func (pagb *PhoneAccountGroupBy) BoolX(ctx context.Context) bool

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

func (*PhoneAccountGroupBy) Bools

func (pagb *PhoneAccountGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*PhoneAccountGroupBy) BoolsX

func (pagb *PhoneAccountGroupBy) BoolsX(ctx context.Context) []bool

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

func (*PhoneAccountGroupBy) Float64

func (pagb *PhoneAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.

func (*PhoneAccountGroupBy) Float64X

func (pagb *PhoneAccountGroupBy) Float64X(ctx context.Context) float64

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

func (*PhoneAccountGroupBy) Float64s

func (pagb *PhoneAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*PhoneAccountGroupBy) Float64sX

func (pagb *PhoneAccountGroupBy) Float64sX(ctx context.Context) []float64

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

func (*PhoneAccountGroupBy) Int

func (pagb *PhoneAccountGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*PhoneAccountGroupBy) IntX

func (pagb *PhoneAccountGroupBy) IntX(ctx context.Context) int

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

func (*PhoneAccountGroupBy) Ints

func (pagb *PhoneAccountGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*PhoneAccountGroupBy) IntsX

func (pagb *PhoneAccountGroupBy) IntsX(ctx context.Context) []int

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

func (*PhoneAccountGroupBy) Scan

func (pagb *PhoneAccountGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*PhoneAccountGroupBy) ScanX

func (pagb *PhoneAccountGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*PhoneAccountGroupBy) String

func (pagb *PhoneAccountGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*PhoneAccountGroupBy) StringX

func (pagb *PhoneAccountGroupBy) StringX(ctx context.Context) string

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

func (*PhoneAccountGroupBy) Strings

func (pagb *PhoneAccountGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*PhoneAccountGroupBy) StringsX

func (pagb *PhoneAccountGroupBy) StringsX(ctx context.Context) []string

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

type PhoneAccountMutation

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

PhoneAccountMutation represents an operation that mutate the PhoneAccounts nodes in the graph.

func (*PhoneAccountMutation) AddField

func (m *PhoneAccountMutation) AddField(name string, value ent.Value) error

AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*PhoneAccountMutation) AddedEdges

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

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

func (*PhoneAccountMutation) AddedField

func (m *PhoneAccountMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.

func (*PhoneAccountMutation) AddedFields

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

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

func (*PhoneAccountMutation) AddedIDs

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

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*PhoneAccountMutation) ClearCreatedAt

func (m *PhoneAccountMutation) ClearCreatedAt()

ClearCreatedAt clears the value of created_at.

func (*PhoneAccountMutation) ClearDeletedAt

func (m *PhoneAccountMutation) ClearDeletedAt()

ClearDeletedAt clears the value of deleted_at.

func (*PhoneAccountMutation) ClearEdge

func (m *PhoneAccountMutation) ClearEdge(name string) error

ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.

func (*PhoneAccountMutation) ClearField

func (m *PhoneAccountMutation) ClearField(name string) error

ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.

func (*PhoneAccountMutation) ClearPhone

func (m *PhoneAccountMutation) ClearPhone()

ClearPhone clears the value of phone.

func (*PhoneAccountMutation) ClearUpdatedAt

func (m *PhoneAccountMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of updated_at.

func (*PhoneAccountMutation) ClearUserIdentity

func (m *PhoneAccountMutation) ClearUserIdentity()

ClearUserIdentity clears the value of user_identity.

func (*PhoneAccountMutation) ClearedEdges

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

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

func (*PhoneAccountMutation) ClearedFields

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

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

func (PhoneAccountMutation) Client

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

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

CreatedAt returns the created_at value in the mutation.

func (*PhoneAccountMutation) CreatedAtCleared

func (m *PhoneAccountMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the field created_at was cleared in this mutation.

func (*PhoneAccountMutation) DeletedAt

func (m *PhoneAccountMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the deleted_at value in the mutation.

func (*PhoneAccountMutation) DeletedAtCleared

func (m *PhoneAccountMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the field deleted_at was cleared in this mutation.

func (*PhoneAccountMutation) EdgeCleared

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

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*PhoneAccountMutation) Field

func (m *PhoneAccountMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.

func (*PhoneAccountMutation) FieldCleared

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

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*PhoneAccountMutation) Fields

func (m *PhoneAccountMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().

func (*PhoneAccountMutation) ID

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

ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.

func (*PhoneAccountMutation) OldCreatedAt

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

OldCreatedAt returns the old created_at value of the PhoneAccount. If the PhoneAccount 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 database query fails.

func (*PhoneAccountMutation) OldDeletedAt

func (m *PhoneAccountMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old deleted_at value of the PhoneAccount. If the PhoneAccount 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 database query fails.

func (*PhoneAccountMutation) OldField

func (m *PhoneAccountMutation) 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 was failed.

func (*PhoneAccountMutation) OldPhone

func (m *PhoneAccountMutation) OldPhone(ctx context.Context) (v string, err error)

OldPhone returns the old phone value of the PhoneAccount. If the PhoneAccount 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 database query fails.

func (*PhoneAccountMutation) OldUpdatedAt

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

OldUpdatedAt returns the old updated_at value of the PhoneAccount. If the PhoneAccount 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 database query fails.

func (*PhoneAccountMutation) OldUserIdentity

func (m *PhoneAccountMutation) OldUserIdentity(ctx context.Context) (v string, err error)

OldUserIdentity returns the old user_identity value of the PhoneAccount. If the PhoneAccount 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 database query fails.

func (*PhoneAccountMutation) Op

func (m *PhoneAccountMutation) Op() Op

Op returns the operation name.

func (*PhoneAccountMutation) Phone

func (m *PhoneAccountMutation) Phone() (r string, exists bool)

Phone returns the phone value in the mutation.

func (*PhoneAccountMutation) PhoneCleared

func (m *PhoneAccountMutation) PhoneCleared() bool

PhoneCleared returns if the field phone was cleared in this mutation.

func (*PhoneAccountMutation) RemovedEdges

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

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

func (*PhoneAccountMutation) RemovedIDs

func (m *PhoneAccountMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*PhoneAccountMutation) ResetCreatedAt

func (m *PhoneAccountMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*PhoneAccountMutation) ResetDeletedAt

func (m *PhoneAccountMutation) ResetDeletedAt()

ResetDeletedAt reset all changes of the "deleted_at" field.

func (*PhoneAccountMutation) ResetEdge

func (m *PhoneAccountMutation) ResetEdge(name string) error

ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.

func (*PhoneAccountMutation) ResetField

func (m *PhoneAccountMutation) ResetField(name string) error

ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.

func (*PhoneAccountMutation) ResetPhone

func (m *PhoneAccountMutation) ResetPhone()

ResetPhone reset all changes of the "phone" field.

func (*PhoneAccountMutation) ResetUpdatedAt

func (m *PhoneAccountMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*PhoneAccountMutation) ResetUserIdentity

func (m *PhoneAccountMutation) ResetUserIdentity()

ResetUserIdentity reset all changes of the "user_identity" field.

func (*PhoneAccountMutation) SetCreatedAt

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

SetCreatedAt sets the created_at field.

func (*PhoneAccountMutation) SetDeletedAt

func (m *PhoneAccountMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the deleted_at field.

func (*PhoneAccountMutation) SetField

func (m *PhoneAccountMutation) SetField(name string, value ent.Value) error

SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*PhoneAccountMutation) SetID

func (m *PhoneAccountMutation) SetID(id int64)

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

func (*PhoneAccountMutation) SetPhone

func (m *PhoneAccountMutation) SetPhone(s string)

SetPhone sets the phone field.

func (*PhoneAccountMutation) SetUpdatedAt

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

SetUpdatedAt sets the updated_at field.

func (*PhoneAccountMutation) SetUserIdentity

func (m *PhoneAccountMutation) SetUserIdentity(s string)

SetUserIdentity sets the user_identity field.

func (PhoneAccountMutation) Tx

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

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

func (*PhoneAccountMutation) Type

func (m *PhoneAccountMutation) Type() string

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

func (*PhoneAccountMutation) UpdatedAt

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

UpdatedAt returns the updated_at value in the mutation.

func (*PhoneAccountMutation) UpdatedAtCleared

func (m *PhoneAccountMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the field updated_at was cleared in this mutation.

func (*PhoneAccountMutation) UserIdentity

func (m *PhoneAccountMutation) UserIdentity() (r string, exists bool)

UserIdentity returns the user_identity value in the mutation.

func (*PhoneAccountMutation) UserIdentityCleared

func (m *PhoneAccountMutation) UserIdentityCleared() bool

UserIdentityCleared returns if the field user_identity was cleared in this mutation.

type PhoneAccountQuery

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

PhoneAccountQuery is the builder for querying PhoneAccount entities.

func (*PhoneAccountQuery) All

func (paq *PhoneAccountQuery) All(ctx context.Context) ([]*PhoneAccount, error)

All executes the query and returns a list of PhoneAccounts.

func (*PhoneAccountQuery) AllX

func (paq *PhoneAccountQuery) AllX(ctx context.Context) []*PhoneAccount

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

func (*PhoneAccountQuery) Clone

func (paq *PhoneAccountQuery) Clone() *PhoneAccountQuery

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

func (*PhoneAccountQuery) Count

func (paq *PhoneAccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PhoneAccountQuery) CountX

func (paq *PhoneAccountQuery) CountX(ctx context.Context) int

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

func (*PhoneAccountQuery) Exist

func (paq *PhoneAccountQuery) Exist(ctx context.Context) (bool, error)

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

func (*PhoneAccountQuery) ExistX

func (paq *PhoneAccountQuery) ExistX(ctx context.Context) bool

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

func (*PhoneAccountQuery) First

func (paq *PhoneAccountQuery) First(ctx context.Context) (*PhoneAccount, error)

First returns the first PhoneAccount entity in the query. Returns *NotFoundError when no phoneaccount was found.

func (*PhoneAccountQuery) FirstID

func (paq *PhoneAccountQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first PhoneAccount id in the query. Returns *NotFoundError when no id was found.

func (*PhoneAccountQuery) FirstX

func (paq *PhoneAccountQuery) FirstX(ctx context.Context) *PhoneAccount

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

func (*PhoneAccountQuery) FirstXID

func (paq *PhoneAccountQuery) FirstXID(ctx context.Context) int64

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

func (*PhoneAccountQuery) GroupBy

func (paq *PhoneAccountQuery) GroupBy(field string, fields ...string) *PhoneAccountGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PhoneAccount.Query().
	GroupBy(phoneaccount.FieldUserIdentity).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PhoneAccountQuery) IDs

func (paq *PhoneAccountQuery) IDs(ctx context.Context) ([]int64, error)

IDs executes the query and returns a list of PhoneAccount ids.

func (*PhoneAccountQuery) IDsX

func (paq *PhoneAccountQuery) IDsX(ctx context.Context) []int64

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

func (*PhoneAccountQuery) Limit

func (paq *PhoneAccountQuery) Limit(limit int) *PhoneAccountQuery

Limit adds a limit step to the query.

func (*PhoneAccountQuery) Offset

func (paq *PhoneAccountQuery) Offset(offset int) *PhoneAccountQuery

Offset adds an offset step to the query.

func (*PhoneAccountQuery) Only

func (paq *PhoneAccountQuery) Only(ctx context.Context) (*PhoneAccount, error)

Only returns the only PhoneAccount entity in the query, returns an error if not exactly one entity was returned.

func (*PhoneAccountQuery) OnlyID

func (paq *PhoneAccountQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID returns the only PhoneAccount id in the query, returns an error if not exactly one id was returned.

func (*PhoneAccountQuery) OnlyIDX

func (paq *PhoneAccountQuery) OnlyIDX(ctx context.Context) int64

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

func (*PhoneAccountQuery) OnlyX

func (paq *PhoneAccountQuery) OnlyX(ctx context.Context) *PhoneAccount

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

func (*PhoneAccountQuery) Order

func (paq *PhoneAccountQuery) Order(o ...OrderFunc) *PhoneAccountQuery

Order adds an order step to the query.

func (*PhoneAccountQuery) Select

func (paq *PhoneAccountQuery) Select(field string, fields ...string) *PhoneAccountSelect

Select one or more fields from the given query.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
}

client.PhoneAccount.Query().
	Select(phoneaccount.FieldUserIdentity).
	Scan(ctx, &v)

func (*PhoneAccountQuery) Where

Where adds a new predicate for the builder.

type PhoneAccountSelect

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

PhoneAccountSelect is the builder for select fields of PhoneAccount entities.

func (*PhoneAccountSelect) Bool

func (pas *PhoneAccountSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*PhoneAccountSelect) BoolX

func (pas *PhoneAccountSelect) BoolX(ctx context.Context) bool

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

func (*PhoneAccountSelect) Bools

func (pas *PhoneAccountSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*PhoneAccountSelect) BoolsX

func (pas *PhoneAccountSelect) BoolsX(ctx context.Context) []bool

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

func (*PhoneAccountSelect) Float64

func (pas *PhoneAccountSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*PhoneAccountSelect) Float64X

func (pas *PhoneAccountSelect) Float64X(ctx context.Context) float64

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

func (*PhoneAccountSelect) Float64s

func (pas *PhoneAccountSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*PhoneAccountSelect) Float64sX

func (pas *PhoneAccountSelect) Float64sX(ctx context.Context) []float64

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

func (*PhoneAccountSelect) Int

func (pas *PhoneAccountSelect) Int(ctx context.Context) (_ int, err error)

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

func (*PhoneAccountSelect) IntX

func (pas *PhoneAccountSelect) IntX(ctx context.Context) int

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

func (*PhoneAccountSelect) Ints

func (pas *PhoneAccountSelect) Ints(ctx context.Context) ([]int, error)

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

func (*PhoneAccountSelect) IntsX

func (pas *PhoneAccountSelect) IntsX(ctx context.Context) []int

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

func (*PhoneAccountSelect) Scan

func (pas *PhoneAccountSelect) Scan(ctx context.Context, v interface{}) error

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

func (*PhoneAccountSelect) ScanX

func (pas *PhoneAccountSelect) ScanX(ctx context.Context, v interface{})

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

func (*PhoneAccountSelect) String

func (pas *PhoneAccountSelect) String(ctx context.Context) (_ string, err error)

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

func (*PhoneAccountSelect) StringX

func (pas *PhoneAccountSelect) StringX(ctx context.Context) string

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

func (*PhoneAccountSelect) Strings

func (pas *PhoneAccountSelect) Strings(ctx context.Context) ([]string, error)

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

func (*PhoneAccountSelect) StringsX

func (pas *PhoneAccountSelect) StringsX(ctx context.Context) []string

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

type PhoneAccountUpdate

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

PhoneAccountUpdate is the builder for updating PhoneAccount entities.

func (*PhoneAccountUpdate) ClearCreatedAt

func (pau *PhoneAccountUpdate) ClearCreatedAt() *PhoneAccountUpdate

ClearCreatedAt clears the value of created_at.

func (*PhoneAccountUpdate) ClearDeletedAt

func (pau *PhoneAccountUpdate) ClearDeletedAt() *PhoneAccountUpdate

ClearDeletedAt clears the value of deleted_at.

func (*PhoneAccountUpdate) ClearPhone

func (pau *PhoneAccountUpdate) ClearPhone() *PhoneAccountUpdate

ClearPhone clears the value of phone.

func (*PhoneAccountUpdate) ClearUpdatedAt

func (pau *PhoneAccountUpdate) ClearUpdatedAt() *PhoneAccountUpdate

ClearUpdatedAt clears the value of updated_at.

func (*PhoneAccountUpdate) ClearUserIdentity

func (pau *PhoneAccountUpdate) ClearUserIdentity() *PhoneAccountUpdate

ClearUserIdentity clears the value of user_identity.

func (*PhoneAccountUpdate) Exec

func (pau *PhoneAccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PhoneAccountUpdate) ExecX

func (pau *PhoneAccountUpdate) ExecX(ctx context.Context)

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

func (*PhoneAccountUpdate) Mutation

func (pau *PhoneAccountUpdate) Mutation() *PhoneAccountMutation

Mutation returns the PhoneAccountMutation object of the builder.

func (*PhoneAccountUpdate) Save

func (pau *PhoneAccountUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*PhoneAccountUpdate) SaveX

func (pau *PhoneAccountUpdate) SaveX(ctx context.Context) int

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

func (*PhoneAccountUpdate) SetCreatedAt

func (pau *PhoneAccountUpdate) SetCreatedAt(t time.Time) *PhoneAccountUpdate

SetCreatedAt sets the created_at field.

func (*PhoneAccountUpdate) SetDeletedAt

func (pau *PhoneAccountUpdate) SetDeletedAt(t time.Time) *PhoneAccountUpdate

SetDeletedAt sets the deleted_at field.

func (*PhoneAccountUpdate) SetNillableCreatedAt

func (pau *PhoneAccountUpdate) SetNillableCreatedAt(t *time.Time) *PhoneAccountUpdate

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

func (*PhoneAccountUpdate) SetNillableDeletedAt

func (pau *PhoneAccountUpdate) SetNillableDeletedAt(t *time.Time) *PhoneAccountUpdate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*PhoneAccountUpdate) SetNillablePhone

func (pau *PhoneAccountUpdate) SetNillablePhone(s *string) *PhoneAccountUpdate

SetNillablePhone sets the phone field if the given value is not nil.

func (*PhoneAccountUpdate) SetNillableUpdatedAt

func (pau *PhoneAccountUpdate) SetNillableUpdatedAt(t *time.Time) *PhoneAccountUpdate

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

func (*PhoneAccountUpdate) SetNillableUserIdentity

func (pau *PhoneAccountUpdate) SetNillableUserIdentity(s *string) *PhoneAccountUpdate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*PhoneAccountUpdate) SetPhone

func (pau *PhoneAccountUpdate) SetPhone(s string) *PhoneAccountUpdate

SetPhone sets the phone field.

func (*PhoneAccountUpdate) SetUpdatedAt

func (pau *PhoneAccountUpdate) SetUpdatedAt(t time.Time) *PhoneAccountUpdate

SetUpdatedAt sets the updated_at field.

func (*PhoneAccountUpdate) SetUserIdentity

func (pau *PhoneAccountUpdate) SetUserIdentity(s string) *PhoneAccountUpdate

SetUserIdentity sets the user_identity field.

func (*PhoneAccountUpdate) Where

Where adds a new predicate for the builder.

type PhoneAccountUpdateOne

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

PhoneAccountUpdateOne is the builder for updating a single PhoneAccount entity.

func (*PhoneAccountUpdateOne) ClearCreatedAt

func (pauo *PhoneAccountUpdateOne) ClearCreatedAt() *PhoneAccountUpdateOne

ClearCreatedAt clears the value of created_at.

func (*PhoneAccountUpdateOne) ClearDeletedAt

func (pauo *PhoneAccountUpdateOne) ClearDeletedAt() *PhoneAccountUpdateOne

ClearDeletedAt clears the value of deleted_at.

func (*PhoneAccountUpdateOne) ClearPhone

func (pauo *PhoneAccountUpdateOne) ClearPhone() *PhoneAccountUpdateOne

ClearPhone clears the value of phone.

func (*PhoneAccountUpdateOne) ClearUpdatedAt

func (pauo *PhoneAccountUpdateOne) ClearUpdatedAt() *PhoneAccountUpdateOne

ClearUpdatedAt clears the value of updated_at.

func (*PhoneAccountUpdateOne) ClearUserIdentity

func (pauo *PhoneAccountUpdateOne) ClearUserIdentity() *PhoneAccountUpdateOne

ClearUserIdentity clears the value of user_identity.

func (*PhoneAccountUpdateOne) Exec

func (pauo *PhoneAccountUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PhoneAccountUpdateOne) ExecX

func (pauo *PhoneAccountUpdateOne) ExecX(ctx context.Context)

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

func (*PhoneAccountUpdateOne) Mutation

func (pauo *PhoneAccountUpdateOne) Mutation() *PhoneAccountMutation

Mutation returns the PhoneAccountMutation object of the builder.

func (*PhoneAccountUpdateOne) Save

Save executes the query and returns the updated entity.

func (*PhoneAccountUpdateOne) SaveX

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

func (*PhoneAccountUpdateOne) SetCreatedAt

func (pauo *PhoneAccountUpdateOne) SetCreatedAt(t time.Time) *PhoneAccountUpdateOne

SetCreatedAt sets the created_at field.

func (*PhoneAccountUpdateOne) SetDeletedAt

func (pauo *PhoneAccountUpdateOne) SetDeletedAt(t time.Time) *PhoneAccountUpdateOne

SetDeletedAt sets the deleted_at field.

func (*PhoneAccountUpdateOne) SetNillableCreatedAt

func (pauo *PhoneAccountUpdateOne) SetNillableCreatedAt(t *time.Time) *PhoneAccountUpdateOne

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

func (*PhoneAccountUpdateOne) SetNillableDeletedAt

func (pauo *PhoneAccountUpdateOne) SetNillableDeletedAt(t *time.Time) *PhoneAccountUpdateOne

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*PhoneAccountUpdateOne) SetNillablePhone

func (pauo *PhoneAccountUpdateOne) SetNillablePhone(s *string) *PhoneAccountUpdateOne

SetNillablePhone sets the phone field if the given value is not nil.

func (*PhoneAccountUpdateOne) SetNillableUpdatedAt

func (pauo *PhoneAccountUpdateOne) SetNillableUpdatedAt(t *time.Time) *PhoneAccountUpdateOne

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

func (*PhoneAccountUpdateOne) SetNillableUserIdentity

func (pauo *PhoneAccountUpdateOne) SetNillableUserIdentity(s *string) *PhoneAccountUpdateOne

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*PhoneAccountUpdateOne) SetPhone

SetPhone sets the phone field.

func (*PhoneAccountUpdateOne) SetUpdatedAt

func (pauo *PhoneAccountUpdateOne) SetUpdatedAt(t time.Time) *PhoneAccountUpdateOne

SetUpdatedAt sets the updated_at field.

func (*PhoneAccountUpdateOne) SetUserIdentity

func (pauo *PhoneAccountUpdateOne) SetUserIdentity(s string) *PhoneAccountUpdateOne

SetUserIdentity sets the user_identity field.

type PhoneAccounts

type PhoneAccounts []*PhoneAccount

PhoneAccounts is a parsable slice of PhoneAccount.

type Policy

type Policy = ent.Policy

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

type Query

type Query = ent.Query

ent aliases to avoid import conflict 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(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 Rollbacker method.

type Tx

type Tx struct {

	// MiniProgramAccount is the client for interacting with the MiniProgramAccount builders.
	MiniProgramAccount *MiniProgramAccountClient
	// PhoneAccount is the client for interacting with the PhoneAccount builders.
	PhoneAccount *PhoneAccountClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UserAccount is the client for interacting with the UserAccount builders.
	UserAccount *UserAccountClient
	// UserExtend is the client for interacting with the UserExtend builders.
	UserExtend *UserExtendClient
	// UserInfo is the client for interacting with the UserInfo builders.
	UserInfo *UserInfoClient
	// 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 the Tx stored in 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"`
	// Identity holds the value of the "identity" field.
	Identity string `json:"identity,omitempty"`
	// Type holds the value of the "type" field.
	Type int32 `json:"type,omitempty"`
	// IsDisable holds the value of the "is_disable" field.
	IsDisable int32 `json:"is_disable,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next 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 UserAccount

type UserAccount struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// UserIdentity holds the value of the "user_identity" field.
	UserIdentity string `json:"user_identity,omitempty"`
	// Account holds the value of the "account" field.
	Account int64 `json:"account,omitempty"`
	// Password holds the value of the "password" field.
	Password string `json:"password,omitempty"`
	// Salt holds the value of the "salt" field.
	Salt string `json:"salt,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

UserAccount is the model entity for the UserAccount schema.

func (*UserAccount) String

func (ua *UserAccount) String() string

String implements the fmt.Stringer.

func (*UserAccount) Unwrap

func (ua *UserAccount) Unwrap() *UserAccount

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*UserAccount) Update

func (ua *UserAccount) Update() *UserAccountUpdateOne

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

type UserAccountClient

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

UserAccountClient is a client for the UserAccount schema.

func NewUserAccountClient

func NewUserAccountClient(c config) *UserAccountClient

NewUserAccountClient returns a client for the UserAccount from the given config.

func (*UserAccountClient) Create

func (c *UserAccountClient) Create() *UserAccountCreate

Create returns a create builder for UserAccount.

func (*UserAccountClient) CreateBulk

func (c *UserAccountClient) CreateBulk(builders ...*UserAccountCreate) *UserAccountCreateBulk

BulkCreate returns a builder for creating a bulk of UserAccount entities.

func (*UserAccountClient) Delete

func (c *UserAccountClient) Delete() *UserAccountDelete

Delete returns a delete builder for UserAccount.

func (*UserAccountClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*UserAccountClient) DeleteOneID

func (c *UserAccountClient) DeleteOneID(id int64) *UserAccountDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*UserAccountClient) Get

Get returns a UserAccount entity by its id.

func (*UserAccountClient) GetX

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

func (*UserAccountClient) Hooks

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

Hooks returns the client hooks.

func (*UserAccountClient) Query

func (c *UserAccountClient) Query() *UserAccountQuery

Query returns a query builder for UserAccount.

func (*UserAccountClient) Update

func (c *UserAccountClient) Update() *UserAccountUpdate

Update returns an update builder for UserAccount.

func (*UserAccountClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserAccountClient) UpdateOneID

func (c *UserAccountClient) UpdateOneID(id int64) *UserAccountUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserAccountClient) Use

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

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

type UserAccountCreate

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

UserAccountCreate is the builder for creating a UserAccount entity.

func (*UserAccountCreate) Mutation

func (uac *UserAccountCreate) Mutation() *UserAccountMutation

Mutation returns the UserAccountMutation object of the builder.

func (*UserAccountCreate) Save

func (uac *UserAccountCreate) Save(ctx context.Context) (*UserAccount, error)

Save creates the UserAccount in the database.

func (*UserAccountCreate) SaveX

func (uac *UserAccountCreate) SaveX(ctx context.Context) *UserAccount

SaveX calls Save and panics if Save returns an error.

func (*UserAccountCreate) SetAccount

func (uac *UserAccountCreate) SetAccount(i int64) *UserAccountCreate

SetAccount sets the account field.

func (*UserAccountCreate) SetCreatedAt

func (uac *UserAccountCreate) SetCreatedAt(t time.Time) *UserAccountCreate

SetCreatedAt sets the created_at field.

func (*UserAccountCreate) SetDeletedAt

func (uac *UserAccountCreate) SetDeletedAt(t time.Time) *UserAccountCreate

SetDeletedAt sets the deleted_at field.

func (*UserAccountCreate) SetID

func (uac *UserAccountCreate) SetID(i int64) *UserAccountCreate

SetID sets the id field.

func (*UserAccountCreate) SetNillableAccount

func (uac *UserAccountCreate) SetNillableAccount(i *int64) *UserAccountCreate

SetNillableAccount sets the account field if the given value is not nil.

func (*UserAccountCreate) SetNillableCreatedAt

func (uac *UserAccountCreate) SetNillableCreatedAt(t *time.Time) *UserAccountCreate

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

func (*UserAccountCreate) SetNillableDeletedAt

func (uac *UserAccountCreate) SetNillableDeletedAt(t *time.Time) *UserAccountCreate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserAccountCreate) SetNillablePassword

func (uac *UserAccountCreate) SetNillablePassword(s *string) *UserAccountCreate

SetNillablePassword sets the password field if the given value is not nil.

func (*UserAccountCreate) SetNillableSalt

func (uac *UserAccountCreate) SetNillableSalt(s *string) *UserAccountCreate

SetNillableSalt sets the salt field if the given value is not nil.

func (*UserAccountCreate) SetNillableUpdatedAt

func (uac *UserAccountCreate) SetNillableUpdatedAt(t *time.Time) *UserAccountCreate

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

func (*UserAccountCreate) SetNillableUserIdentity

func (uac *UserAccountCreate) SetNillableUserIdentity(s *string) *UserAccountCreate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*UserAccountCreate) SetPassword

func (uac *UserAccountCreate) SetPassword(s string) *UserAccountCreate

SetPassword sets the password field.

func (*UserAccountCreate) SetSalt

func (uac *UserAccountCreate) SetSalt(s string) *UserAccountCreate

SetSalt sets the salt field.

func (*UserAccountCreate) SetUpdatedAt

func (uac *UserAccountCreate) SetUpdatedAt(t time.Time) *UserAccountCreate

SetUpdatedAt sets the updated_at field.

func (*UserAccountCreate) SetUserIdentity

func (uac *UserAccountCreate) SetUserIdentity(s string) *UserAccountCreate

SetUserIdentity sets the user_identity field.

type UserAccountCreateBulk

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

UserAccountCreateBulk is the builder for creating a bulk of UserAccount entities.

func (*UserAccountCreateBulk) Save

func (uacb *UserAccountCreateBulk) Save(ctx context.Context) ([]*UserAccount, error)

Save creates the UserAccount entities in the database.

func (*UserAccountCreateBulk) SaveX

func (uacb *UserAccountCreateBulk) SaveX(ctx context.Context) []*UserAccount

SaveX calls Save and panics if Save returns an error.

type UserAccountDelete

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

UserAccountDelete is the builder for deleting a UserAccount entity.

func (*UserAccountDelete) Exec

func (uad *UserAccountDelete) Exec(ctx context.Context) (int, error)

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

func (*UserAccountDelete) ExecX

func (uad *UserAccountDelete) ExecX(ctx context.Context) int

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

func (*UserAccountDelete) Where

Where adds a new predicate to the delete builder.

type UserAccountDeleteOne

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

UserAccountDeleteOne is the builder for deleting a single UserAccount entity.

func (*UserAccountDeleteOne) Exec

func (uado *UserAccountDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserAccountDeleteOne) ExecX

func (uado *UserAccountDeleteOne) ExecX(ctx context.Context)

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

type UserAccountGroupBy

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

UserAccountGroupBy is the builder for group-by UserAccount entities.

func (*UserAccountGroupBy) Aggregate

func (uagb *UserAccountGroupBy) Aggregate(fns ...AggregateFunc) *UserAccountGroupBy

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

func (*UserAccountGroupBy) Bool

func (uagb *UserAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.

func (*UserAccountGroupBy) BoolX

func (uagb *UserAccountGroupBy) BoolX(ctx context.Context) bool

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

func (*UserAccountGroupBy) Bools

func (uagb *UserAccountGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*UserAccountGroupBy) BoolsX

func (uagb *UserAccountGroupBy) BoolsX(ctx context.Context) []bool

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

func (*UserAccountGroupBy) Float64

func (uagb *UserAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.

func (*UserAccountGroupBy) Float64X

func (uagb *UserAccountGroupBy) Float64X(ctx context.Context) float64

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

func (*UserAccountGroupBy) Float64s

func (uagb *UserAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*UserAccountGroupBy) Float64sX

func (uagb *UserAccountGroupBy) Float64sX(ctx context.Context) []float64

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

func (*UserAccountGroupBy) Int

func (uagb *UserAccountGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*UserAccountGroupBy) IntX

func (uagb *UserAccountGroupBy) IntX(ctx context.Context) int

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

func (*UserAccountGroupBy) Ints

func (uagb *UserAccountGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*UserAccountGroupBy) IntsX

func (uagb *UserAccountGroupBy) IntsX(ctx context.Context) []int

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

func (*UserAccountGroupBy) Scan

func (uagb *UserAccountGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*UserAccountGroupBy) ScanX

func (uagb *UserAccountGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*UserAccountGroupBy) String

func (uagb *UserAccountGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*UserAccountGroupBy) StringX

func (uagb *UserAccountGroupBy) StringX(ctx context.Context) string

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

func (*UserAccountGroupBy) Strings

func (uagb *UserAccountGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*UserAccountGroupBy) StringsX

func (uagb *UserAccountGroupBy) StringsX(ctx context.Context) []string

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

type UserAccountMutation

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

UserAccountMutation represents an operation that mutate the UserAccounts nodes in the graph.

func (*UserAccountMutation) Account

func (m *UserAccountMutation) Account() (r int64, exists bool)

Account returns the account value in the mutation.

func (*UserAccountMutation) AccountCleared

func (m *UserAccountMutation) AccountCleared() bool

AccountCleared returns if the field account was cleared in this mutation.

func (*UserAccountMutation) AddAccount

func (m *UserAccountMutation) AddAccount(i int64)

AddAccount adds i to account.

func (*UserAccountMutation) AddField

func (m *UserAccountMutation) AddField(name string, value ent.Value) error

AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*UserAccountMutation) AddedAccount

func (m *UserAccountMutation) AddedAccount() (r int64, exists bool)

AddedAccount returns the value that was added to the account field in this mutation.

func (*UserAccountMutation) AddedEdges

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

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

func (*UserAccountMutation) AddedField

func (m *UserAccountMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.

func (*UserAccountMutation) AddedFields

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

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

func (*UserAccountMutation) AddedIDs

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

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*UserAccountMutation) ClearAccount

func (m *UserAccountMutation) ClearAccount()

ClearAccount clears the value of account.

func (*UserAccountMutation) ClearCreatedAt

func (m *UserAccountMutation) ClearCreatedAt()

ClearCreatedAt clears the value of created_at.

func (*UserAccountMutation) ClearDeletedAt

func (m *UserAccountMutation) ClearDeletedAt()

ClearDeletedAt clears the value of deleted_at.

func (*UserAccountMutation) ClearEdge

func (m *UserAccountMutation) ClearEdge(name string) error

ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.

func (*UserAccountMutation) ClearField

func (m *UserAccountMutation) ClearField(name string) error

ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.

func (*UserAccountMutation) ClearUpdatedAt

func (m *UserAccountMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of updated_at.

func (*UserAccountMutation) ClearUserIdentity

func (m *UserAccountMutation) ClearUserIdentity()

ClearUserIdentity clears the value of user_identity.

func (*UserAccountMutation) ClearedEdges

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

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

func (*UserAccountMutation) ClearedFields

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

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

func (UserAccountMutation) Client

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

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

CreatedAt returns the created_at value in the mutation.

func (*UserAccountMutation) CreatedAtCleared

func (m *UserAccountMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the field created_at was cleared in this mutation.

func (*UserAccountMutation) DeletedAt

func (m *UserAccountMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the deleted_at value in the mutation.

func (*UserAccountMutation) DeletedAtCleared

func (m *UserAccountMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the field deleted_at was cleared in this mutation.

func (*UserAccountMutation) EdgeCleared

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

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*UserAccountMutation) Field

func (m *UserAccountMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.

func (*UserAccountMutation) FieldCleared

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

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*UserAccountMutation) Fields

func (m *UserAccountMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().

func (*UserAccountMutation) ID

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

ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.

func (*UserAccountMutation) OldAccount

func (m *UserAccountMutation) OldAccount(ctx context.Context) (v int64, err error)

OldAccount returns the old account value of the UserAccount. If the UserAccount 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 database query fails.

func (*UserAccountMutation) OldCreatedAt

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

OldCreatedAt returns the old created_at value of the UserAccount. If the UserAccount 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 database query fails.

func (*UserAccountMutation) OldDeletedAt

func (m *UserAccountMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old deleted_at value of the UserAccount. If the UserAccount 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 database query fails.

func (*UserAccountMutation) OldField

func (m *UserAccountMutation) 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 was failed.

func (*UserAccountMutation) OldPassword

func (m *UserAccountMutation) OldPassword(ctx context.Context) (v string, err error)

OldPassword returns the old password value of the UserAccount. If the UserAccount 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 database query fails.

func (*UserAccountMutation) OldSalt

func (m *UserAccountMutation) OldSalt(ctx context.Context) (v string, err error)

OldSalt returns the old salt value of the UserAccount. If the UserAccount 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 database query fails.

func (*UserAccountMutation) OldUpdatedAt

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

OldUpdatedAt returns the old updated_at value of the UserAccount. If the UserAccount 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 database query fails.

func (*UserAccountMutation) OldUserIdentity

func (m *UserAccountMutation) OldUserIdentity(ctx context.Context) (v string, err error)

OldUserIdentity returns the old user_identity value of the UserAccount. If the UserAccount 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 database query fails.

func (*UserAccountMutation) Op

func (m *UserAccountMutation) Op() Op

Op returns the operation name.

func (*UserAccountMutation) Password

func (m *UserAccountMutation) Password() (r string, exists bool)

Password returns the password value in the mutation.

func (*UserAccountMutation) RemovedEdges

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

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

func (*UserAccountMutation) RemovedIDs

func (m *UserAccountMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*UserAccountMutation) ResetAccount

func (m *UserAccountMutation) ResetAccount()

ResetAccount reset all changes of the "account" field.

func (*UserAccountMutation) ResetCreatedAt

func (m *UserAccountMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*UserAccountMutation) ResetDeletedAt

func (m *UserAccountMutation) ResetDeletedAt()

ResetDeletedAt reset all changes of the "deleted_at" field.

func (*UserAccountMutation) ResetEdge

func (m *UserAccountMutation) ResetEdge(name string) error

ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.

func (*UserAccountMutation) ResetField

func (m *UserAccountMutation) ResetField(name string) error

ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.

func (*UserAccountMutation) ResetPassword

func (m *UserAccountMutation) ResetPassword()

ResetPassword reset all changes of the "password" field.

func (*UserAccountMutation) ResetSalt

func (m *UserAccountMutation) ResetSalt()

ResetSalt reset all changes of the "salt" field.

func (*UserAccountMutation) ResetUpdatedAt

func (m *UserAccountMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*UserAccountMutation) ResetUserIdentity

func (m *UserAccountMutation) ResetUserIdentity()

ResetUserIdentity reset all changes of the "user_identity" field.

func (*UserAccountMutation) Salt

func (m *UserAccountMutation) Salt() (r string, exists bool)

Salt returns the salt value in the mutation.

func (*UserAccountMutation) SetAccount

func (m *UserAccountMutation) SetAccount(i int64)

SetAccount sets the account field.

func (*UserAccountMutation) SetCreatedAt

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

SetCreatedAt sets the created_at field.

func (*UserAccountMutation) SetDeletedAt

func (m *UserAccountMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the deleted_at field.

func (*UserAccountMutation) SetField

func (m *UserAccountMutation) SetField(name string, value ent.Value) error

SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*UserAccountMutation) SetID

func (m *UserAccountMutation) SetID(id int64)

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

func (*UserAccountMutation) SetPassword

func (m *UserAccountMutation) SetPassword(s string)

SetPassword sets the password field.

func (*UserAccountMutation) SetSalt

func (m *UserAccountMutation) SetSalt(s string)

SetSalt sets the salt field.

func (*UserAccountMutation) SetUpdatedAt

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

SetUpdatedAt sets the updated_at field.

func (*UserAccountMutation) SetUserIdentity

func (m *UserAccountMutation) SetUserIdentity(s string)

SetUserIdentity sets the user_identity field.

func (UserAccountMutation) Tx

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

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

func (*UserAccountMutation) Type

func (m *UserAccountMutation) Type() string

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

func (*UserAccountMutation) UpdatedAt

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

UpdatedAt returns the updated_at value in the mutation.

func (*UserAccountMutation) UpdatedAtCleared

func (m *UserAccountMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the field updated_at was cleared in this mutation.

func (*UserAccountMutation) UserIdentity

func (m *UserAccountMutation) UserIdentity() (r string, exists bool)

UserIdentity returns the user_identity value in the mutation.

func (*UserAccountMutation) UserIdentityCleared

func (m *UserAccountMutation) UserIdentityCleared() bool

UserIdentityCleared returns if the field user_identity was cleared in this mutation.

type UserAccountQuery

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

UserAccountQuery is the builder for querying UserAccount entities.

func (*UserAccountQuery) All

func (uaq *UserAccountQuery) All(ctx context.Context) ([]*UserAccount, error)

All executes the query and returns a list of UserAccounts.

func (*UserAccountQuery) AllX

func (uaq *UserAccountQuery) AllX(ctx context.Context) []*UserAccount

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

func (*UserAccountQuery) Clone

func (uaq *UserAccountQuery) Clone() *UserAccountQuery

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

func (*UserAccountQuery) Count

func (uaq *UserAccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserAccountQuery) CountX

func (uaq *UserAccountQuery) CountX(ctx context.Context) int

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

func (*UserAccountQuery) Exist

func (uaq *UserAccountQuery) Exist(ctx context.Context) (bool, error)

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

func (*UserAccountQuery) ExistX

func (uaq *UserAccountQuery) ExistX(ctx context.Context) bool

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

func (*UserAccountQuery) First

func (uaq *UserAccountQuery) First(ctx context.Context) (*UserAccount, error)

First returns the first UserAccount entity in the query. Returns *NotFoundError when no useraccount was found.

func (*UserAccountQuery) FirstID

func (uaq *UserAccountQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first UserAccount id in the query. Returns *NotFoundError when no id was found.

func (*UserAccountQuery) FirstX

func (uaq *UserAccountQuery) FirstX(ctx context.Context) *UserAccount

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

func (*UserAccountQuery) FirstXID

func (uaq *UserAccountQuery) FirstXID(ctx context.Context) int64

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

func (*UserAccountQuery) GroupBy

func (uaq *UserAccountQuery) GroupBy(field string, fields ...string) *UserAccountGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserAccount.Query().
	GroupBy(useraccount.FieldUserIdentity).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserAccountQuery) IDs

func (uaq *UserAccountQuery) IDs(ctx context.Context) ([]int64, error)

IDs executes the query and returns a list of UserAccount ids.

func (*UserAccountQuery) IDsX

func (uaq *UserAccountQuery) IDsX(ctx context.Context) []int64

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

func (*UserAccountQuery) Limit

func (uaq *UserAccountQuery) Limit(limit int) *UserAccountQuery

Limit adds a limit step to the query.

func (*UserAccountQuery) Offset

func (uaq *UserAccountQuery) Offset(offset int) *UserAccountQuery

Offset adds an offset step to the query.

func (*UserAccountQuery) Only

func (uaq *UserAccountQuery) Only(ctx context.Context) (*UserAccount, error)

Only returns the only UserAccount entity in the query, returns an error if not exactly one entity was returned.

func (*UserAccountQuery) OnlyID

func (uaq *UserAccountQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID returns the only UserAccount id in the query, returns an error if not exactly one id was returned.

func (*UserAccountQuery) OnlyIDX

func (uaq *UserAccountQuery) OnlyIDX(ctx context.Context) int64

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

func (*UserAccountQuery) OnlyX

func (uaq *UserAccountQuery) OnlyX(ctx context.Context) *UserAccount

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

func (*UserAccountQuery) Order

func (uaq *UserAccountQuery) Order(o ...OrderFunc) *UserAccountQuery

Order adds an order step to the query.

func (*UserAccountQuery) Select

func (uaq *UserAccountQuery) Select(field string, fields ...string) *UserAccountSelect

Select one or more fields from the given query.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
}

client.UserAccount.Query().
	Select(useraccount.FieldUserIdentity).
	Scan(ctx, &v)

func (*UserAccountQuery) Where

Where adds a new predicate for the builder.

type UserAccountSelect

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

UserAccountSelect is the builder for select fields of UserAccount entities.

func (*UserAccountSelect) Bool

func (uas *UserAccountSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*UserAccountSelect) BoolX

func (uas *UserAccountSelect) BoolX(ctx context.Context) bool

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

func (*UserAccountSelect) Bools

func (uas *UserAccountSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*UserAccountSelect) BoolsX

func (uas *UserAccountSelect) BoolsX(ctx context.Context) []bool

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

func (*UserAccountSelect) Float64

func (uas *UserAccountSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*UserAccountSelect) Float64X

func (uas *UserAccountSelect) Float64X(ctx context.Context) float64

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

func (*UserAccountSelect) Float64s

func (uas *UserAccountSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*UserAccountSelect) Float64sX

func (uas *UserAccountSelect) Float64sX(ctx context.Context) []float64

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

func (*UserAccountSelect) Int

func (uas *UserAccountSelect) Int(ctx context.Context) (_ int, err error)

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

func (*UserAccountSelect) IntX

func (uas *UserAccountSelect) IntX(ctx context.Context) int

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

func (*UserAccountSelect) Ints

func (uas *UserAccountSelect) Ints(ctx context.Context) ([]int, error)

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

func (*UserAccountSelect) IntsX

func (uas *UserAccountSelect) IntsX(ctx context.Context) []int

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

func (*UserAccountSelect) Scan

func (uas *UserAccountSelect) Scan(ctx context.Context, v interface{}) error

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

func (*UserAccountSelect) ScanX

func (uas *UserAccountSelect) ScanX(ctx context.Context, v interface{})

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

func (*UserAccountSelect) String

func (uas *UserAccountSelect) String(ctx context.Context) (_ string, err error)

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

func (*UserAccountSelect) StringX

func (uas *UserAccountSelect) StringX(ctx context.Context) string

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

func (*UserAccountSelect) Strings

func (uas *UserAccountSelect) Strings(ctx context.Context) ([]string, error)

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

func (*UserAccountSelect) StringsX

func (uas *UserAccountSelect) StringsX(ctx context.Context) []string

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

type UserAccountUpdate

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

UserAccountUpdate is the builder for updating UserAccount entities.

func (*UserAccountUpdate) AddAccount

func (uau *UserAccountUpdate) AddAccount(i int64) *UserAccountUpdate

AddAccount adds i to account.

func (*UserAccountUpdate) ClearAccount

func (uau *UserAccountUpdate) ClearAccount() *UserAccountUpdate

ClearAccount clears the value of account.

func (*UserAccountUpdate) ClearCreatedAt

func (uau *UserAccountUpdate) ClearCreatedAt() *UserAccountUpdate

ClearCreatedAt clears the value of created_at.

func (*UserAccountUpdate) ClearDeletedAt

func (uau *UserAccountUpdate) ClearDeletedAt() *UserAccountUpdate

ClearDeletedAt clears the value of deleted_at.

func (*UserAccountUpdate) ClearUpdatedAt

func (uau *UserAccountUpdate) ClearUpdatedAt() *UserAccountUpdate

ClearUpdatedAt clears the value of updated_at.

func (*UserAccountUpdate) ClearUserIdentity

func (uau *UserAccountUpdate) ClearUserIdentity() *UserAccountUpdate

ClearUserIdentity clears the value of user_identity.

func (*UserAccountUpdate) Exec

func (uau *UserAccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserAccountUpdate) ExecX

func (uau *UserAccountUpdate) ExecX(ctx context.Context)

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

func (*UserAccountUpdate) Mutation

func (uau *UserAccountUpdate) Mutation() *UserAccountMutation

Mutation returns the UserAccountMutation object of the builder.

func (*UserAccountUpdate) Save

func (uau *UserAccountUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*UserAccountUpdate) SaveX

func (uau *UserAccountUpdate) SaveX(ctx context.Context) int

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

func (*UserAccountUpdate) SetAccount

func (uau *UserAccountUpdate) SetAccount(i int64) *UserAccountUpdate

SetAccount sets the account field.

func (*UserAccountUpdate) SetCreatedAt

func (uau *UserAccountUpdate) SetCreatedAt(t time.Time) *UserAccountUpdate

SetCreatedAt sets the created_at field.

func (*UserAccountUpdate) SetDeletedAt

func (uau *UserAccountUpdate) SetDeletedAt(t time.Time) *UserAccountUpdate

SetDeletedAt sets the deleted_at field.

func (*UserAccountUpdate) SetNillableAccount

func (uau *UserAccountUpdate) SetNillableAccount(i *int64) *UserAccountUpdate

SetNillableAccount sets the account field if the given value is not nil.

func (*UserAccountUpdate) SetNillableCreatedAt

func (uau *UserAccountUpdate) SetNillableCreatedAt(t *time.Time) *UserAccountUpdate

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

func (*UserAccountUpdate) SetNillableDeletedAt

func (uau *UserAccountUpdate) SetNillableDeletedAt(t *time.Time) *UserAccountUpdate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserAccountUpdate) SetNillablePassword

func (uau *UserAccountUpdate) SetNillablePassword(s *string) *UserAccountUpdate

SetNillablePassword sets the password field if the given value is not nil.

func (*UserAccountUpdate) SetNillableSalt

func (uau *UserAccountUpdate) SetNillableSalt(s *string) *UserAccountUpdate

SetNillableSalt sets the salt field if the given value is not nil.

func (*UserAccountUpdate) SetNillableUpdatedAt

func (uau *UserAccountUpdate) SetNillableUpdatedAt(t *time.Time) *UserAccountUpdate

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

func (*UserAccountUpdate) SetNillableUserIdentity

func (uau *UserAccountUpdate) SetNillableUserIdentity(s *string) *UserAccountUpdate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*UserAccountUpdate) SetPassword

func (uau *UserAccountUpdate) SetPassword(s string) *UserAccountUpdate

SetPassword sets the password field.

func (*UserAccountUpdate) SetSalt

func (uau *UserAccountUpdate) SetSalt(s string) *UserAccountUpdate

SetSalt sets the salt field.

func (*UserAccountUpdate) SetUpdatedAt

func (uau *UserAccountUpdate) SetUpdatedAt(t time.Time) *UserAccountUpdate

SetUpdatedAt sets the updated_at field.

func (*UserAccountUpdate) SetUserIdentity

func (uau *UserAccountUpdate) SetUserIdentity(s string) *UserAccountUpdate

SetUserIdentity sets the user_identity field.

func (*UserAccountUpdate) Where

Where adds a new predicate for the builder.

type UserAccountUpdateOne

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

UserAccountUpdateOne is the builder for updating a single UserAccount entity.

func (*UserAccountUpdateOne) AddAccount

func (uauo *UserAccountUpdateOne) AddAccount(i int64) *UserAccountUpdateOne

AddAccount adds i to account.

func (*UserAccountUpdateOne) ClearAccount

func (uauo *UserAccountUpdateOne) ClearAccount() *UserAccountUpdateOne

ClearAccount clears the value of account.

func (*UserAccountUpdateOne) ClearCreatedAt

func (uauo *UserAccountUpdateOne) ClearCreatedAt() *UserAccountUpdateOne

ClearCreatedAt clears the value of created_at.

func (*UserAccountUpdateOne) ClearDeletedAt

func (uauo *UserAccountUpdateOne) ClearDeletedAt() *UserAccountUpdateOne

ClearDeletedAt clears the value of deleted_at.

func (*UserAccountUpdateOne) ClearUpdatedAt

func (uauo *UserAccountUpdateOne) ClearUpdatedAt() *UserAccountUpdateOne

ClearUpdatedAt clears the value of updated_at.

func (*UserAccountUpdateOne) ClearUserIdentity

func (uauo *UserAccountUpdateOne) ClearUserIdentity() *UserAccountUpdateOne

ClearUserIdentity clears the value of user_identity.

func (*UserAccountUpdateOne) Exec

func (uauo *UserAccountUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserAccountUpdateOne) ExecX

func (uauo *UserAccountUpdateOne) ExecX(ctx context.Context)

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

func (*UserAccountUpdateOne) Mutation

func (uauo *UserAccountUpdateOne) Mutation() *UserAccountMutation

Mutation returns the UserAccountMutation object of the builder.

func (*UserAccountUpdateOne) Save

Save executes the query and returns the updated entity.

func (*UserAccountUpdateOne) SaveX

func (uauo *UserAccountUpdateOne) SaveX(ctx context.Context) *UserAccount

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

func (*UserAccountUpdateOne) SetAccount

func (uauo *UserAccountUpdateOne) SetAccount(i int64) *UserAccountUpdateOne

SetAccount sets the account field.

func (*UserAccountUpdateOne) SetCreatedAt

func (uauo *UserAccountUpdateOne) SetCreatedAt(t time.Time) *UserAccountUpdateOne

SetCreatedAt sets the created_at field.

func (*UserAccountUpdateOne) SetDeletedAt

func (uauo *UserAccountUpdateOne) SetDeletedAt(t time.Time) *UserAccountUpdateOne

SetDeletedAt sets the deleted_at field.

func (*UserAccountUpdateOne) SetNillableAccount

func (uauo *UserAccountUpdateOne) SetNillableAccount(i *int64) *UserAccountUpdateOne

SetNillableAccount sets the account field if the given value is not nil.

func (*UserAccountUpdateOne) SetNillableCreatedAt

func (uauo *UserAccountUpdateOne) SetNillableCreatedAt(t *time.Time) *UserAccountUpdateOne

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

func (*UserAccountUpdateOne) SetNillableDeletedAt

func (uauo *UserAccountUpdateOne) SetNillableDeletedAt(t *time.Time) *UserAccountUpdateOne

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserAccountUpdateOne) SetNillablePassword

func (uauo *UserAccountUpdateOne) SetNillablePassword(s *string) *UserAccountUpdateOne

SetNillablePassword sets the password field if the given value is not nil.

func (*UserAccountUpdateOne) SetNillableSalt

func (uauo *UserAccountUpdateOne) SetNillableSalt(s *string) *UserAccountUpdateOne

SetNillableSalt sets the salt field if the given value is not nil.

func (*UserAccountUpdateOne) SetNillableUpdatedAt

func (uauo *UserAccountUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserAccountUpdateOne

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

func (*UserAccountUpdateOne) SetNillableUserIdentity

func (uauo *UserAccountUpdateOne) SetNillableUserIdentity(s *string) *UserAccountUpdateOne

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*UserAccountUpdateOne) SetPassword

func (uauo *UserAccountUpdateOne) SetPassword(s string) *UserAccountUpdateOne

SetPassword sets the password field.

func (*UserAccountUpdateOne) SetSalt

SetSalt sets the salt field.

func (*UserAccountUpdateOne) SetUpdatedAt

func (uauo *UserAccountUpdateOne) SetUpdatedAt(t time.Time) *UserAccountUpdateOne

SetUpdatedAt sets the updated_at field.

func (*UserAccountUpdateOne) SetUserIdentity

func (uauo *UserAccountUpdateOne) SetUserIdentity(s string) *UserAccountUpdateOne

SetUserIdentity sets the user_identity field.

type UserAccounts

type UserAccounts []*UserAccount

UserAccounts is a parsable slice of UserAccount.

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 create builder for User.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

BulkCreate 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 delete builder for the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int64) *UserDeleteOne

DeleteOneID returns a delete builder for the given 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) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id 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) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

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

func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate

SetDeletedAt sets the deleted_at field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(i int64) *UserCreate

SetID sets the id field.

func (*UserCreate) SetIdentity

func (uc *UserCreate) SetIdentity(s string) *UserCreate

SetIdentity sets the identity field.

func (*UserCreate) SetIsDisable

func (uc *UserCreate) SetIsDisable(i int32) *UserCreate

SetIsDisable sets the is_disable 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) SetNillableDeletedAt

func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserCreate) SetNillableIdentity

func (uc *UserCreate) SetNillableIdentity(s *string) *UserCreate

SetNillableIdentity sets the identity field if the given value is not nil.

func (*UserCreate) SetNillableIsDisable

func (uc *UserCreate) SetNillableIsDisable(i *int32) *UserCreate

SetNillableIsDisable sets the is_disable field if the given value is not nil.

func (*UserCreate) SetNillableType

func (uc *UserCreate) SetNillableType(i *int32) *UserCreate

SetNillableType sets the type field if the given value is not nil.

func (*UserCreate) SetNillableUpdatedAt

func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate

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

func (*UserCreate) SetType

func (uc *UserCreate) SetType(i int32) *UserCreate

SetType sets the type field.

func (*UserCreate) SetUpdatedAt

func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate

SetUpdatedAt sets the updated_at field.

type UserCreateBulk

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

UserCreateBulk is the builder for creating a bulk of User entities.

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 calls Save and panics if Save returns an error.

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 adds a new predicate to the delete 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.

type UserExtend

type UserExtend struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// UserIdentity holds the value of the "user_identity" field.
	UserIdentity string `json:"user_identity,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

UserExtend is the model entity for the UserExtend schema.

func (*UserExtend) String

func (ue *UserExtend) String() string

String implements the fmt.Stringer.

func (*UserExtend) Unwrap

func (ue *UserExtend) Unwrap() *UserExtend

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*UserExtend) Update

func (ue *UserExtend) Update() *UserExtendUpdateOne

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

type UserExtendClient

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

UserExtendClient is a client for the UserExtend schema.

func NewUserExtendClient

func NewUserExtendClient(c config) *UserExtendClient

NewUserExtendClient returns a client for the UserExtend from the given config.

func (*UserExtendClient) Create

func (c *UserExtendClient) Create() *UserExtendCreate

Create returns a create builder for UserExtend.

func (*UserExtendClient) CreateBulk

func (c *UserExtendClient) CreateBulk(builders ...*UserExtendCreate) *UserExtendCreateBulk

BulkCreate returns a builder for creating a bulk of UserExtend entities.

func (*UserExtendClient) Delete

func (c *UserExtendClient) Delete() *UserExtendDelete

Delete returns a delete builder for UserExtend.

func (*UserExtendClient) DeleteOne

func (c *UserExtendClient) DeleteOne(ue *UserExtend) *UserExtendDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*UserExtendClient) DeleteOneID

func (c *UserExtendClient) DeleteOneID(id int64) *UserExtendDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*UserExtendClient) Get

func (c *UserExtendClient) Get(ctx context.Context, id int64) (*UserExtend, error)

Get returns a UserExtend entity by its id.

func (*UserExtendClient) GetX

func (c *UserExtendClient) GetX(ctx context.Context, id int64) *UserExtend

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

func (*UserExtendClient) Hooks

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

Hooks returns the client hooks.

func (*UserExtendClient) Query

func (c *UserExtendClient) Query() *UserExtendQuery

Query returns a query builder for UserExtend.

func (*UserExtendClient) Update

func (c *UserExtendClient) Update() *UserExtendUpdate

Update returns an update builder for UserExtend.

func (*UserExtendClient) UpdateOne

func (c *UserExtendClient) UpdateOne(ue *UserExtend) *UserExtendUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserExtendClient) UpdateOneID

func (c *UserExtendClient) UpdateOneID(id int64) *UserExtendUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserExtendClient) Use

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

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

type UserExtendCreate

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

UserExtendCreate is the builder for creating a UserExtend entity.

func (*UserExtendCreate) Mutation

func (uec *UserExtendCreate) Mutation() *UserExtendMutation

Mutation returns the UserExtendMutation object of the builder.

func (*UserExtendCreate) Save

func (uec *UserExtendCreate) Save(ctx context.Context) (*UserExtend, error)

Save creates the UserExtend in the database.

func (*UserExtendCreate) SaveX

func (uec *UserExtendCreate) SaveX(ctx context.Context) *UserExtend

SaveX calls Save and panics if Save returns an error.

func (*UserExtendCreate) SetCreatedAt

func (uec *UserExtendCreate) SetCreatedAt(t time.Time) *UserExtendCreate

SetCreatedAt sets the created_at field.

func (*UserExtendCreate) SetDeletedAt

func (uec *UserExtendCreate) SetDeletedAt(t time.Time) *UserExtendCreate

SetDeletedAt sets the deleted_at field.

func (*UserExtendCreate) SetID

func (uec *UserExtendCreate) SetID(i int64) *UserExtendCreate

SetID sets the id field.

func (*UserExtendCreate) SetNillableCreatedAt

func (uec *UserExtendCreate) SetNillableCreatedAt(t *time.Time) *UserExtendCreate

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

func (*UserExtendCreate) SetNillableDeletedAt

func (uec *UserExtendCreate) SetNillableDeletedAt(t *time.Time) *UserExtendCreate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserExtendCreate) SetNillableUpdatedAt

func (uec *UserExtendCreate) SetNillableUpdatedAt(t *time.Time) *UserExtendCreate

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

func (*UserExtendCreate) SetNillableUserIdentity

func (uec *UserExtendCreate) SetNillableUserIdentity(s *string) *UserExtendCreate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*UserExtendCreate) SetUpdatedAt

func (uec *UserExtendCreate) SetUpdatedAt(t time.Time) *UserExtendCreate

SetUpdatedAt sets the updated_at field.

func (*UserExtendCreate) SetUserIdentity

func (uec *UserExtendCreate) SetUserIdentity(s string) *UserExtendCreate

SetUserIdentity sets the user_identity field.

type UserExtendCreateBulk

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

UserExtendCreateBulk is the builder for creating a bulk of UserExtend entities.

func (*UserExtendCreateBulk) Save

func (uecb *UserExtendCreateBulk) Save(ctx context.Context) ([]*UserExtend, error)

Save creates the UserExtend entities in the database.

func (*UserExtendCreateBulk) SaveX

func (uecb *UserExtendCreateBulk) SaveX(ctx context.Context) []*UserExtend

SaveX calls Save and panics if Save returns an error.

type UserExtendDelete

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

UserExtendDelete is the builder for deleting a UserExtend entity.

func (*UserExtendDelete) Exec

func (ued *UserExtendDelete) Exec(ctx context.Context) (int, error)

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

func (*UserExtendDelete) ExecX

func (ued *UserExtendDelete) ExecX(ctx context.Context) int

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

func (*UserExtendDelete) Where

Where adds a new predicate to the delete builder.

type UserExtendDeleteOne

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

UserExtendDeleteOne is the builder for deleting a single UserExtend entity.

func (*UserExtendDeleteOne) Exec

func (uedo *UserExtendDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserExtendDeleteOne) ExecX

func (uedo *UserExtendDeleteOne) ExecX(ctx context.Context)

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

type UserExtendGroupBy

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

UserExtendGroupBy is the builder for group-by UserExtend entities.

func (*UserExtendGroupBy) Aggregate

func (uegb *UserExtendGroupBy) Aggregate(fns ...AggregateFunc) *UserExtendGroupBy

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

func (*UserExtendGroupBy) Bool

func (uegb *UserExtendGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.

func (*UserExtendGroupBy) BoolX

func (uegb *UserExtendGroupBy) BoolX(ctx context.Context) bool

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

func (*UserExtendGroupBy) Bools

func (uegb *UserExtendGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*UserExtendGroupBy) BoolsX

func (uegb *UserExtendGroupBy) BoolsX(ctx context.Context) []bool

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

func (*UserExtendGroupBy) Float64

func (uegb *UserExtendGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.

func (*UserExtendGroupBy) Float64X

func (uegb *UserExtendGroupBy) Float64X(ctx context.Context) float64

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

func (*UserExtendGroupBy) Float64s

func (uegb *UserExtendGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*UserExtendGroupBy) Float64sX

func (uegb *UserExtendGroupBy) Float64sX(ctx context.Context) []float64

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

func (*UserExtendGroupBy) Int

func (uegb *UserExtendGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*UserExtendGroupBy) IntX

func (uegb *UserExtendGroupBy) IntX(ctx context.Context) int

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

func (*UserExtendGroupBy) Ints

func (uegb *UserExtendGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*UserExtendGroupBy) IntsX

func (uegb *UserExtendGroupBy) IntsX(ctx context.Context) []int

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

func (*UserExtendGroupBy) Scan

func (uegb *UserExtendGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*UserExtendGroupBy) ScanX

func (uegb *UserExtendGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*UserExtendGroupBy) String

func (uegb *UserExtendGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*UserExtendGroupBy) StringX

func (uegb *UserExtendGroupBy) StringX(ctx context.Context) string

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

func (*UserExtendGroupBy) Strings

func (uegb *UserExtendGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*UserExtendGroupBy) StringsX

func (uegb *UserExtendGroupBy) StringsX(ctx context.Context) []string

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

type UserExtendMutation

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

UserExtendMutation represents an operation that mutate the UserExtends nodes in the graph.

func (*UserExtendMutation) AddField

func (m *UserExtendMutation) AddField(name string, value ent.Value) error

AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*UserExtendMutation) AddedEdges

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

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

func (*UserExtendMutation) AddedField

func (m *UserExtendMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.

func (*UserExtendMutation) AddedFields

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

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

func (*UserExtendMutation) AddedIDs

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

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*UserExtendMutation) ClearCreatedAt

func (m *UserExtendMutation) ClearCreatedAt()

ClearCreatedAt clears the value of created_at.

func (*UserExtendMutation) ClearDeletedAt

func (m *UserExtendMutation) ClearDeletedAt()

ClearDeletedAt clears the value of deleted_at.

func (*UserExtendMutation) ClearEdge

func (m *UserExtendMutation) ClearEdge(name string) error

ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.

func (*UserExtendMutation) ClearField

func (m *UserExtendMutation) ClearField(name string) error

ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.

func (*UserExtendMutation) ClearUpdatedAt

func (m *UserExtendMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of updated_at.

func (*UserExtendMutation) ClearUserIdentity

func (m *UserExtendMutation) ClearUserIdentity()

ClearUserIdentity clears the value of user_identity.

func (*UserExtendMutation) ClearedEdges

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

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

func (*UserExtendMutation) ClearedFields

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

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

func (UserExtendMutation) Client

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

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

CreatedAt returns the created_at value in the mutation.

func (*UserExtendMutation) CreatedAtCleared

func (m *UserExtendMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the field created_at was cleared in this mutation.

func (*UserExtendMutation) DeletedAt

func (m *UserExtendMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the deleted_at value in the mutation.

func (*UserExtendMutation) DeletedAtCleared

func (m *UserExtendMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the field deleted_at was cleared in this mutation.

func (*UserExtendMutation) EdgeCleared

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

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*UserExtendMutation) Field

func (m *UserExtendMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.

func (*UserExtendMutation) FieldCleared

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

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*UserExtendMutation) Fields

func (m *UserExtendMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().

func (*UserExtendMutation) ID

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

ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.

func (*UserExtendMutation) OldCreatedAt

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

OldCreatedAt returns the old created_at value of the UserExtend. If the UserExtend 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 database query fails.

func (*UserExtendMutation) OldDeletedAt

func (m *UserExtendMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old deleted_at value of the UserExtend. If the UserExtend 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 database query fails.

func (*UserExtendMutation) OldField

func (m *UserExtendMutation) 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 was failed.

func (*UserExtendMutation) OldUpdatedAt

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

OldUpdatedAt returns the old updated_at value of the UserExtend. If the UserExtend 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 database query fails.

func (*UserExtendMutation) OldUserIdentity

func (m *UserExtendMutation) OldUserIdentity(ctx context.Context) (v string, err error)

OldUserIdentity returns the old user_identity value of the UserExtend. If the UserExtend 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 database query fails.

func (*UserExtendMutation) Op

func (m *UserExtendMutation) Op() Op

Op returns the operation name.

func (*UserExtendMutation) RemovedEdges

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

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

func (*UserExtendMutation) RemovedIDs

func (m *UserExtendMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*UserExtendMutation) ResetCreatedAt

func (m *UserExtendMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*UserExtendMutation) ResetDeletedAt

func (m *UserExtendMutation) ResetDeletedAt()

ResetDeletedAt reset all changes of the "deleted_at" field.

func (*UserExtendMutation) ResetEdge

func (m *UserExtendMutation) ResetEdge(name string) error

ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.

func (*UserExtendMutation) ResetField

func (m *UserExtendMutation) ResetField(name string) error

ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.

func (*UserExtendMutation) ResetUpdatedAt

func (m *UserExtendMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*UserExtendMutation) ResetUserIdentity

func (m *UserExtendMutation) ResetUserIdentity()

ResetUserIdentity reset all changes of the "user_identity" field.

func (*UserExtendMutation) SetCreatedAt

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

SetCreatedAt sets the created_at field.

func (*UserExtendMutation) SetDeletedAt

func (m *UserExtendMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the deleted_at field.

func (*UserExtendMutation) SetField

func (m *UserExtendMutation) SetField(name string, value ent.Value) error

SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*UserExtendMutation) SetID

func (m *UserExtendMutation) SetID(id int64)

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

func (*UserExtendMutation) SetUpdatedAt

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

SetUpdatedAt sets the updated_at field.

func (*UserExtendMutation) SetUserIdentity

func (m *UserExtendMutation) SetUserIdentity(s string)

SetUserIdentity sets the user_identity field.

func (UserExtendMutation) Tx

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

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

func (*UserExtendMutation) Type

func (m *UserExtendMutation) Type() string

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

func (*UserExtendMutation) UpdatedAt

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

UpdatedAt returns the updated_at value in the mutation.

func (*UserExtendMutation) UpdatedAtCleared

func (m *UserExtendMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the field updated_at was cleared in this mutation.

func (*UserExtendMutation) UserIdentity

func (m *UserExtendMutation) UserIdentity() (r string, exists bool)

UserIdentity returns the user_identity value in the mutation.

func (*UserExtendMutation) UserIdentityCleared

func (m *UserExtendMutation) UserIdentityCleared() bool

UserIdentityCleared returns if the field user_identity was cleared in this mutation.

type UserExtendQuery

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

UserExtendQuery is the builder for querying UserExtend entities.

func (*UserExtendQuery) All

func (ueq *UserExtendQuery) All(ctx context.Context) ([]*UserExtend, error)

All executes the query and returns a list of UserExtends.

func (*UserExtendQuery) AllX

func (ueq *UserExtendQuery) AllX(ctx context.Context) []*UserExtend

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

func (*UserExtendQuery) Clone

func (ueq *UserExtendQuery) Clone() *UserExtendQuery

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

func (*UserExtendQuery) Count

func (ueq *UserExtendQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserExtendQuery) CountX

func (ueq *UserExtendQuery) CountX(ctx context.Context) int

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

func (*UserExtendQuery) Exist

func (ueq *UserExtendQuery) Exist(ctx context.Context) (bool, error)

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

func (*UserExtendQuery) ExistX

func (ueq *UserExtendQuery) ExistX(ctx context.Context) bool

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

func (*UserExtendQuery) First

func (ueq *UserExtendQuery) First(ctx context.Context) (*UserExtend, error)

First returns the first UserExtend entity in the query. Returns *NotFoundError when no userextend was found.

func (*UserExtendQuery) FirstID

func (ueq *UserExtendQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first UserExtend id in the query. Returns *NotFoundError when no id was found.

func (*UserExtendQuery) FirstX

func (ueq *UserExtendQuery) FirstX(ctx context.Context) *UserExtend

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

func (*UserExtendQuery) FirstXID

func (ueq *UserExtendQuery) FirstXID(ctx context.Context) int64

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

func (*UserExtendQuery) GroupBy

func (ueq *UserExtendQuery) GroupBy(field string, fields ...string) *UserExtendGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserExtend.Query().
	GroupBy(userextend.FieldUserIdentity).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserExtendQuery) IDs

func (ueq *UserExtendQuery) IDs(ctx context.Context) ([]int64, error)

IDs executes the query and returns a list of UserExtend ids.

func (*UserExtendQuery) IDsX

func (ueq *UserExtendQuery) IDsX(ctx context.Context) []int64

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

func (*UserExtendQuery) Limit

func (ueq *UserExtendQuery) Limit(limit int) *UserExtendQuery

Limit adds a limit step to the query.

func (*UserExtendQuery) Offset

func (ueq *UserExtendQuery) Offset(offset int) *UserExtendQuery

Offset adds an offset step to the query.

func (*UserExtendQuery) Only

func (ueq *UserExtendQuery) Only(ctx context.Context) (*UserExtend, error)

Only returns the only UserExtend entity in the query, returns an error if not exactly one entity was returned.

func (*UserExtendQuery) OnlyID

func (ueq *UserExtendQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID returns the only UserExtend id in the query, returns an error if not exactly one id was returned.

func (*UserExtendQuery) OnlyIDX

func (ueq *UserExtendQuery) OnlyIDX(ctx context.Context) int64

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

func (*UserExtendQuery) OnlyX

func (ueq *UserExtendQuery) OnlyX(ctx context.Context) *UserExtend

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

func (*UserExtendQuery) Order

func (ueq *UserExtendQuery) Order(o ...OrderFunc) *UserExtendQuery

Order adds an order step to the query.

func (*UserExtendQuery) Select

func (ueq *UserExtendQuery) Select(field string, fields ...string) *UserExtendSelect

Select one or more fields from the given query.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
}

client.UserExtend.Query().
	Select(userextend.FieldUserIdentity).
	Scan(ctx, &v)

func (*UserExtendQuery) Where

Where adds a new predicate for the builder.

type UserExtendSelect

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

UserExtendSelect is the builder for select fields of UserExtend entities.

func (*UserExtendSelect) Bool

func (ues *UserExtendSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*UserExtendSelect) BoolX

func (ues *UserExtendSelect) BoolX(ctx context.Context) bool

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

func (*UserExtendSelect) Bools

func (ues *UserExtendSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*UserExtendSelect) BoolsX

func (ues *UserExtendSelect) BoolsX(ctx context.Context) []bool

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

func (*UserExtendSelect) Float64

func (ues *UserExtendSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*UserExtendSelect) Float64X

func (ues *UserExtendSelect) Float64X(ctx context.Context) float64

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

func (*UserExtendSelect) Float64s

func (ues *UserExtendSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*UserExtendSelect) Float64sX

func (ues *UserExtendSelect) Float64sX(ctx context.Context) []float64

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

func (*UserExtendSelect) Int

func (ues *UserExtendSelect) Int(ctx context.Context) (_ int, err error)

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

func (*UserExtendSelect) IntX

func (ues *UserExtendSelect) IntX(ctx context.Context) int

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

func (*UserExtendSelect) Ints

func (ues *UserExtendSelect) Ints(ctx context.Context) ([]int, error)

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

func (*UserExtendSelect) IntsX

func (ues *UserExtendSelect) IntsX(ctx context.Context) []int

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

func (*UserExtendSelect) Scan

func (ues *UserExtendSelect) Scan(ctx context.Context, v interface{}) error

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

func (*UserExtendSelect) ScanX

func (ues *UserExtendSelect) ScanX(ctx context.Context, v interface{})

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

func (*UserExtendSelect) String

func (ues *UserExtendSelect) String(ctx context.Context) (_ string, err error)

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

func (*UserExtendSelect) StringX

func (ues *UserExtendSelect) StringX(ctx context.Context) string

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

func (*UserExtendSelect) Strings

func (ues *UserExtendSelect) Strings(ctx context.Context) ([]string, error)

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

func (*UserExtendSelect) StringsX

func (ues *UserExtendSelect) StringsX(ctx context.Context) []string

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

type UserExtendUpdate

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

UserExtendUpdate is the builder for updating UserExtend entities.

func (*UserExtendUpdate) ClearCreatedAt

func (ueu *UserExtendUpdate) ClearCreatedAt() *UserExtendUpdate

ClearCreatedAt clears the value of created_at.

func (*UserExtendUpdate) ClearDeletedAt

func (ueu *UserExtendUpdate) ClearDeletedAt() *UserExtendUpdate

ClearDeletedAt clears the value of deleted_at.

func (*UserExtendUpdate) ClearUpdatedAt

func (ueu *UserExtendUpdate) ClearUpdatedAt() *UserExtendUpdate

ClearUpdatedAt clears the value of updated_at.

func (*UserExtendUpdate) ClearUserIdentity

func (ueu *UserExtendUpdate) ClearUserIdentity() *UserExtendUpdate

ClearUserIdentity clears the value of user_identity.

func (*UserExtendUpdate) Exec

func (ueu *UserExtendUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserExtendUpdate) ExecX

func (ueu *UserExtendUpdate) ExecX(ctx context.Context)

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

func (*UserExtendUpdate) Mutation

func (ueu *UserExtendUpdate) Mutation() *UserExtendMutation

Mutation returns the UserExtendMutation object of the builder.

func (*UserExtendUpdate) Save

func (ueu *UserExtendUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*UserExtendUpdate) SaveX

func (ueu *UserExtendUpdate) SaveX(ctx context.Context) int

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

func (*UserExtendUpdate) SetCreatedAt

func (ueu *UserExtendUpdate) SetCreatedAt(t time.Time) *UserExtendUpdate

SetCreatedAt sets the created_at field.

func (*UserExtendUpdate) SetDeletedAt

func (ueu *UserExtendUpdate) SetDeletedAt(t time.Time) *UserExtendUpdate

SetDeletedAt sets the deleted_at field.

func (*UserExtendUpdate) SetNillableCreatedAt

func (ueu *UserExtendUpdate) SetNillableCreatedAt(t *time.Time) *UserExtendUpdate

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

func (*UserExtendUpdate) SetNillableDeletedAt

func (ueu *UserExtendUpdate) SetNillableDeletedAt(t *time.Time) *UserExtendUpdate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserExtendUpdate) SetNillableUpdatedAt

func (ueu *UserExtendUpdate) SetNillableUpdatedAt(t *time.Time) *UserExtendUpdate

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

func (*UserExtendUpdate) SetNillableUserIdentity

func (ueu *UserExtendUpdate) SetNillableUserIdentity(s *string) *UserExtendUpdate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*UserExtendUpdate) SetUpdatedAt

func (ueu *UserExtendUpdate) SetUpdatedAt(t time.Time) *UserExtendUpdate

SetUpdatedAt sets the updated_at field.

func (*UserExtendUpdate) SetUserIdentity

func (ueu *UserExtendUpdate) SetUserIdentity(s string) *UserExtendUpdate

SetUserIdentity sets the user_identity field.

func (*UserExtendUpdate) Where

Where adds a new predicate for the builder.

type UserExtendUpdateOne

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

UserExtendUpdateOne is the builder for updating a single UserExtend entity.

func (*UserExtendUpdateOne) ClearCreatedAt

func (ueuo *UserExtendUpdateOne) ClearCreatedAt() *UserExtendUpdateOne

ClearCreatedAt clears the value of created_at.

func (*UserExtendUpdateOne) ClearDeletedAt

func (ueuo *UserExtendUpdateOne) ClearDeletedAt() *UserExtendUpdateOne

ClearDeletedAt clears the value of deleted_at.

func (*UserExtendUpdateOne) ClearUpdatedAt

func (ueuo *UserExtendUpdateOne) ClearUpdatedAt() *UserExtendUpdateOne

ClearUpdatedAt clears the value of updated_at.

func (*UserExtendUpdateOne) ClearUserIdentity

func (ueuo *UserExtendUpdateOne) ClearUserIdentity() *UserExtendUpdateOne

ClearUserIdentity clears the value of user_identity.

func (*UserExtendUpdateOne) Exec

func (ueuo *UserExtendUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserExtendUpdateOne) ExecX

func (ueuo *UserExtendUpdateOne) ExecX(ctx context.Context)

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

func (*UserExtendUpdateOne) Mutation

func (ueuo *UserExtendUpdateOne) Mutation() *UserExtendMutation

Mutation returns the UserExtendMutation object of the builder.

func (*UserExtendUpdateOne) Save

func (ueuo *UserExtendUpdateOne) Save(ctx context.Context) (*UserExtend, error)

Save executes the query and returns the updated entity.

func (*UserExtendUpdateOne) SaveX

func (ueuo *UserExtendUpdateOne) SaveX(ctx context.Context) *UserExtend

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

func (*UserExtendUpdateOne) SetCreatedAt

func (ueuo *UserExtendUpdateOne) SetCreatedAt(t time.Time) *UserExtendUpdateOne

SetCreatedAt sets the created_at field.

func (*UserExtendUpdateOne) SetDeletedAt

func (ueuo *UserExtendUpdateOne) SetDeletedAt(t time.Time) *UserExtendUpdateOne

SetDeletedAt sets the deleted_at field.

func (*UserExtendUpdateOne) SetNillableCreatedAt

func (ueuo *UserExtendUpdateOne) SetNillableCreatedAt(t *time.Time) *UserExtendUpdateOne

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

func (*UserExtendUpdateOne) SetNillableDeletedAt

func (ueuo *UserExtendUpdateOne) SetNillableDeletedAt(t *time.Time) *UserExtendUpdateOne

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserExtendUpdateOne) SetNillableUpdatedAt

func (ueuo *UserExtendUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserExtendUpdateOne

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

func (*UserExtendUpdateOne) SetNillableUserIdentity

func (ueuo *UserExtendUpdateOne) SetNillableUserIdentity(s *string) *UserExtendUpdateOne

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*UserExtendUpdateOne) SetUpdatedAt

func (ueuo *UserExtendUpdateOne) SetUpdatedAt(t time.Time) *UserExtendUpdateOne

SetUpdatedAt sets the updated_at field.

func (*UserExtendUpdateOne) SetUserIdentity

func (ueuo *UserExtendUpdateOne) SetUserIdentity(s string) *UserExtendUpdateOne

SetUserIdentity sets the user_identity field.

type UserExtends

type UserExtends []*UserExtend

UserExtends is a parsable slice of UserExtend.

type UserGroupBy

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

UserGroupBy is the builder for group-by 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 (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.

func (*UserGroupBy) BoolX

func (ugb *UserGroupBy) BoolX(ctx context.Context) bool

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

func (*UserGroupBy) Bools

func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*UserGroupBy) BoolsX

func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool

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

func (*UserGroupBy) Float64

func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.

func (*UserGroupBy) Float64X

func (ugb *UserGroupBy) Float64X(ctx context.Context) float64

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

func (*UserGroupBy) Float64s

func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*UserGroupBy) Float64sX

func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64

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

func (*UserGroupBy) Int

func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*UserGroupBy) IntX

func (ugb *UserGroupBy) IntX(ctx context.Context) int

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

func (*UserGroupBy) Ints

func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*UserGroupBy) IntsX

func (ugb *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 interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*UserGroupBy) ScanX

func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*UserGroupBy) String

func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*UserGroupBy) StringX

func (ugb *UserGroupBy) StringX(ctx context.Context) string

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

func (*UserGroupBy) Strings

func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*UserGroupBy) StringsX

func (ugb *UserGroupBy) StringsX(ctx context.Context) []string

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

type UserInfo

type UserInfo struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// UserIdentity holds the value of the "user_identity" field.
	UserIdentity string `json:"user_identity,omitempty"`
	// Channel holds the value of the "channel" field.
	Channel int32 `json:"channel,omitempty"`
	// Form holds the value of the "form" field.
	Form int32 `json:"form,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

UserInfo is the model entity for the UserInfo schema.

func (*UserInfo) String

func (ui *UserInfo) String() string

String implements the fmt.Stringer.

func (*UserInfo) Unwrap

func (ui *UserInfo) Unwrap() *UserInfo

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*UserInfo) Update

func (ui *UserInfo) Update() *UserInfoUpdateOne

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

type UserInfoClient

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

UserInfoClient is a client for the UserInfo schema.

func NewUserInfoClient

func NewUserInfoClient(c config) *UserInfoClient

NewUserInfoClient returns a client for the UserInfo from the given config.

func (*UserInfoClient) Create

func (c *UserInfoClient) Create() *UserInfoCreate

Create returns a create builder for UserInfo.

func (*UserInfoClient) CreateBulk

func (c *UserInfoClient) CreateBulk(builders ...*UserInfoCreate) *UserInfoCreateBulk

BulkCreate returns a builder for creating a bulk of UserInfo entities.

func (*UserInfoClient) Delete

func (c *UserInfoClient) Delete() *UserInfoDelete

Delete returns a delete builder for UserInfo.

func (*UserInfoClient) DeleteOne

func (c *UserInfoClient) DeleteOne(ui *UserInfo) *UserInfoDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*UserInfoClient) DeleteOneID

func (c *UserInfoClient) DeleteOneID(id int64) *UserInfoDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*UserInfoClient) Get

func (c *UserInfoClient) Get(ctx context.Context, id int64) (*UserInfo, error)

Get returns a UserInfo entity by its id.

func (*UserInfoClient) GetX

func (c *UserInfoClient) GetX(ctx context.Context, id int64) *UserInfo

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

func (*UserInfoClient) Hooks

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

Hooks returns the client hooks.

func (*UserInfoClient) Query

func (c *UserInfoClient) Query() *UserInfoQuery

Query returns a query builder for UserInfo.

func (*UserInfoClient) Update

func (c *UserInfoClient) Update() *UserInfoUpdate

Update returns an update builder for UserInfo.

func (*UserInfoClient) UpdateOne

func (c *UserInfoClient) UpdateOne(ui *UserInfo) *UserInfoUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserInfoClient) UpdateOneID

func (c *UserInfoClient) UpdateOneID(id int64) *UserInfoUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserInfoClient) Use

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

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

type UserInfoCreate

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

UserInfoCreate is the builder for creating a UserInfo entity.

func (*UserInfoCreate) Mutation

func (uic *UserInfoCreate) Mutation() *UserInfoMutation

Mutation returns the UserInfoMutation object of the builder.

func (*UserInfoCreate) Save

func (uic *UserInfoCreate) Save(ctx context.Context) (*UserInfo, error)

Save creates the UserInfo in the database.

func (*UserInfoCreate) SaveX

func (uic *UserInfoCreate) SaveX(ctx context.Context) *UserInfo

SaveX calls Save and panics if Save returns an error.

func (*UserInfoCreate) SetChannel

func (uic *UserInfoCreate) SetChannel(i int32) *UserInfoCreate

SetChannel sets the channel field.

func (*UserInfoCreate) SetCreatedAt

func (uic *UserInfoCreate) SetCreatedAt(t time.Time) *UserInfoCreate

SetCreatedAt sets the created_at field.

func (*UserInfoCreate) SetDeletedAt

func (uic *UserInfoCreate) SetDeletedAt(t time.Time) *UserInfoCreate

SetDeletedAt sets the deleted_at field.

func (*UserInfoCreate) SetForm

func (uic *UserInfoCreate) SetForm(i int32) *UserInfoCreate

SetForm sets the form field.

func (*UserInfoCreate) SetID

func (uic *UserInfoCreate) SetID(i int64) *UserInfoCreate

SetID sets the id field.

func (*UserInfoCreate) SetNillableChannel

func (uic *UserInfoCreate) SetNillableChannel(i *int32) *UserInfoCreate

SetNillableChannel sets the channel field if the given value is not nil.

func (*UserInfoCreate) SetNillableCreatedAt

func (uic *UserInfoCreate) SetNillableCreatedAt(t *time.Time) *UserInfoCreate

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

func (*UserInfoCreate) SetNillableDeletedAt

func (uic *UserInfoCreate) SetNillableDeletedAt(t *time.Time) *UserInfoCreate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserInfoCreate) SetNillableForm

func (uic *UserInfoCreate) SetNillableForm(i *int32) *UserInfoCreate

SetNillableForm sets the form field if the given value is not nil.

func (*UserInfoCreate) SetNillableUpdatedAt

func (uic *UserInfoCreate) SetNillableUpdatedAt(t *time.Time) *UserInfoCreate

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

func (*UserInfoCreate) SetNillableUserIdentity

func (uic *UserInfoCreate) SetNillableUserIdentity(s *string) *UserInfoCreate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*UserInfoCreate) SetUpdatedAt

func (uic *UserInfoCreate) SetUpdatedAt(t time.Time) *UserInfoCreate

SetUpdatedAt sets the updated_at field.

func (*UserInfoCreate) SetUserIdentity

func (uic *UserInfoCreate) SetUserIdentity(s string) *UserInfoCreate

SetUserIdentity sets the user_identity field.

type UserInfoCreateBulk

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

UserInfoCreateBulk is the builder for creating a bulk of UserInfo entities.

func (*UserInfoCreateBulk) Save

func (uicb *UserInfoCreateBulk) Save(ctx context.Context) ([]*UserInfo, error)

Save creates the UserInfo entities in the database.

func (*UserInfoCreateBulk) SaveX

func (uicb *UserInfoCreateBulk) SaveX(ctx context.Context) []*UserInfo

SaveX calls Save and panics if Save returns an error.

type UserInfoDelete

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

UserInfoDelete is the builder for deleting a UserInfo entity.

func (*UserInfoDelete) Exec

func (uid *UserInfoDelete) Exec(ctx context.Context) (int, error)

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

func (*UserInfoDelete) ExecX

func (uid *UserInfoDelete) ExecX(ctx context.Context) int

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

func (*UserInfoDelete) Where

func (uid *UserInfoDelete) Where(ps ...predicate.UserInfo) *UserInfoDelete

Where adds a new predicate to the delete builder.

type UserInfoDeleteOne

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

UserInfoDeleteOne is the builder for deleting a single UserInfo entity.

func (*UserInfoDeleteOne) Exec

func (uido *UserInfoDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserInfoDeleteOne) ExecX

func (uido *UserInfoDeleteOne) ExecX(ctx context.Context)

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

type UserInfoGroupBy

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

UserInfoGroupBy is the builder for group-by UserInfo entities.

func (*UserInfoGroupBy) Aggregate

func (uigb *UserInfoGroupBy) Aggregate(fns ...AggregateFunc) *UserInfoGroupBy

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

func (*UserInfoGroupBy) Bool

func (uigb *UserInfoGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.

func (*UserInfoGroupBy) BoolX

func (uigb *UserInfoGroupBy) BoolX(ctx context.Context) bool

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

func (*UserInfoGroupBy) Bools

func (uigb *UserInfoGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*UserInfoGroupBy) BoolsX

func (uigb *UserInfoGroupBy) BoolsX(ctx context.Context) []bool

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

func (*UserInfoGroupBy) Float64

func (uigb *UserInfoGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.

func (*UserInfoGroupBy) Float64X

func (uigb *UserInfoGroupBy) Float64X(ctx context.Context) float64

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

func (*UserInfoGroupBy) Float64s

func (uigb *UserInfoGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*UserInfoGroupBy) Float64sX

func (uigb *UserInfoGroupBy) Float64sX(ctx context.Context) []float64

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

func (*UserInfoGroupBy) Int

func (uigb *UserInfoGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*UserInfoGroupBy) IntX

func (uigb *UserInfoGroupBy) IntX(ctx context.Context) int

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

func (*UserInfoGroupBy) Ints

func (uigb *UserInfoGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*UserInfoGroupBy) IntsX

func (uigb *UserInfoGroupBy) IntsX(ctx context.Context) []int

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

func (*UserInfoGroupBy) Scan

func (uigb *UserInfoGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*UserInfoGroupBy) ScanX

func (uigb *UserInfoGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*UserInfoGroupBy) String

func (uigb *UserInfoGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*UserInfoGroupBy) StringX

func (uigb *UserInfoGroupBy) StringX(ctx context.Context) string

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

func (*UserInfoGroupBy) Strings

func (uigb *UserInfoGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*UserInfoGroupBy) StringsX

func (uigb *UserInfoGroupBy) StringsX(ctx context.Context) []string

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

type UserInfoMutation

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

UserInfoMutation represents an operation that mutate the UserInfos nodes in the graph.

func (*UserInfoMutation) AddChannel

func (m *UserInfoMutation) AddChannel(i int32)

AddChannel adds i to channel.

func (*UserInfoMutation) AddField

func (m *UserInfoMutation) AddField(name string, value ent.Value) error

AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*UserInfoMutation) AddForm

func (m *UserInfoMutation) AddForm(i int32)

AddForm adds i to form.

func (*UserInfoMutation) AddedChannel

func (m *UserInfoMutation) AddedChannel() (r int32, exists bool)

AddedChannel returns the value that was added to the channel field in this mutation.

func (*UserInfoMutation) AddedEdges

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

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

func (*UserInfoMutation) AddedField

func (m *UserInfoMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.

func (*UserInfoMutation) AddedFields

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

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

func (*UserInfoMutation) AddedForm

func (m *UserInfoMutation) AddedForm() (r int32, exists bool)

AddedForm returns the value that was added to the form field in this mutation.

func (*UserInfoMutation) AddedIDs

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

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*UserInfoMutation) Channel

func (m *UserInfoMutation) Channel() (r int32, exists bool)

Channel returns the channel value in the mutation.

func (*UserInfoMutation) ClearCreatedAt

func (m *UserInfoMutation) ClearCreatedAt()

ClearCreatedAt clears the value of created_at.

func (*UserInfoMutation) ClearDeletedAt

func (m *UserInfoMutation) ClearDeletedAt()

ClearDeletedAt clears the value of deleted_at.

func (*UserInfoMutation) ClearEdge

func (m *UserInfoMutation) ClearEdge(name string) error

ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.

func (*UserInfoMutation) ClearField

func (m *UserInfoMutation) ClearField(name string) error

ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.

func (*UserInfoMutation) ClearUpdatedAt

func (m *UserInfoMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of updated_at.

func (*UserInfoMutation) ClearUserIdentity

func (m *UserInfoMutation) ClearUserIdentity()

ClearUserIdentity clears the value of user_identity.

func (*UserInfoMutation) ClearedEdges

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

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

func (*UserInfoMutation) ClearedFields

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

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

func (UserInfoMutation) Client

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

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

CreatedAt returns the created_at value in the mutation.

func (*UserInfoMutation) CreatedAtCleared

func (m *UserInfoMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the field created_at was cleared in this mutation.

func (*UserInfoMutation) DeletedAt

func (m *UserInfoMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the deleted_at value in the mutation.

func (*UserInfoMutation) DeletedAtCleared

func (m *UserInfoMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the field deleted_at was cleared in this mutation.

func (*UserInfoMutation) EdgeCleared

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

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*UserInfoMutation) Field

func (m *UserInfoMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.

func (*UserInfoMutation) FieldCleared

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

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*UserInfoMutation) Fields

func (m *UserInfoMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().

func (*UserInfoMutation) Form

func (m *UserInfoMutation) Form() (r int32, exists bool)

Form returns the form value in the mutation.

func (*UserInfoMutation) ID

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

ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.

func (*UserInfoMutation) OldChannel

func (m *UserInfoMutation) OldChannel(ctx context.Context) (v int32, err error)

OldChannel returns the old channel value of the UserInfo. If the UserInfo 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 database query fails.

func (*UserInfoMutation) OldCreatedAt

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

OldCreatedAt returns the old created_at value of the UserInfo. If the UserInfo 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 database query fails.

func (*UserInfoMutation) OldDeletedAt

func (m *UserInfoMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old deleted_at value of the UserInfo. If the UserInfo 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 database query fails.

func (*UserInfoMutation) OldField

func (m *UserInfoMutation) 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 was failed.

func (*UserInfoMutation) OldForm

func (m *UserInfoMutation) OldForm(ctx context.Context) (v int32, err error)

OldForm returns the old form value of the UserInfo. If the UserInfo 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 database query fails.

func (*UserInfoMutation) OldUpdatedAt

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

OldUpdatedAt returns the old updated_at value of the UserInfo. If the UserInfo 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 database query fails.

func (*UserInfoMutation) OldUserIdentity

func (m *UserInfoMutation) OldUserIdentity(ctx context.Context) (v string, err error)

OldUserIdentity returns the old user_identity value of the UserInfo. If the UserInfo 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 database query fails.

func (*UserInfoMutation) Op

func (m *UserInfoMutation) Op() Op

Op returns the operation name.

func (*UserInfoMutation) RemovedEdges

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

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

func (*UserInfoMutation) RemovedIDs

func (m *UserInfoMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*UserInfoMutation) ResetChannel

func (m *UserInfoMutation) ResetChannel()

ResetChannel reset all changes of the "channel" field.

func (*UserInfoMutation) ResetCreatedAt

func (m *UserInfoMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*UserInfoMutation) ResetDeletedAt

func (m *UserInfoMutation) ResetDeletedAt()

ResetDeletedAt reset all changes of the "deleted_at" field.

func (*UserInfoMutation) ResetEdge

func (m *UserInfoMutation) ResetEdge(name string) error

ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.

func (*UserInfoMutation) ResetField

func (m *UserInfoMutation) ResetField(name string) error

ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.

func (*UserInfoMutation) ResetForm

func (m *UserInfoMutation) ResetForm()

ResetForm reset all changes of the "form" field.

func (*UserInfoMutation) ResetUpdatedAt

func (m *UserInfoMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*UserInfoMutation) ResetUserIdentity

func (m *UserInfoMutation) ResetUserIdentity()

ResetUserIdentity reset all changes of the "user_identity" field.

func (*UserInfoMutation) SetChannel

func (m *UserInfoMutation) SetChannel(i int32)

SetChannel sets the channel field.

func (*UserInfoMutation) SetCreatedAt

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

SetCreatedAt sets the created_at field.

func (*UserInfoMutation) SetDeletedAt

func (m *UserInfoMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the deleted_at field.

func (*UserInfoMutation) SetField

func (m *UserInfoMutation) SetField(name string, value ent.Value) error

SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*UserInfoMutation) SetForm

func (m *UserInfoMutation) SetForm(i int32)

SetForm sets the form field.

func (*UserInfoMutation) SetID

func (m *UserInfoMutation) SetID(id int64)

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

func (*UserInfoMutation) SetUpdatedAt

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

SetUpdatedAt sets the updated_at field.

func (*UserInfoMutation) SetUserIdentity

func (m *UserInfoMutation) SetUserIdentity(s string)

SetUserIdentity sets the user_identity field.

func (UserInfoMutation) Tx

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

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

func (*UserInfoMutation) Type

func (m *UserInfoMutation) Type() string

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

func (*UserInfoMutation) UpdatedAt

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

UpdatedAt returns the updated_at value in the mutation.

func (*UserInfoMutation) UpdatedAtCleared

func (m *UserInfoMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the field updated_at was cleared in this mutation.

func (*UserInfoMutation) UserIdentity

func (m *UserInfoMutation) UserIdentity() (r string, exists bool)

UserIdentity returns the user_identity value in the mutation.

func (*UserInfoMutation) UserIdentityCleared

func (m *UserInfoMutation) UserIdentityCleared() bool

UserIdentityCleared returns if the field user_identity was cleared in this mutation.

type UserInfoQuery

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

UserInfoQuery is the builder for querying UserInfo entities.

func (*UserInfoQuery) All

func (uiq *UserInfoQuery) All(ctx context.Context) ([]*UserInfo, error)

All executes the query and returns a list of UserInfos.

func (*UserInfoQuery) AllX

func (uiq *UserInfoQuery) AllX(ctx context.Context) []*UserInfo

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

func (*UserInfoQuery) Clone

func (uiq *UserInfoQuery) Clone() *UserInfoQuery

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

func (*UserInfoQuery) Count

func (uiq *UserInfoQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserInfoQuery) CountX

func (uiq *UserInfoQuery) CountX(ctx context.Context) int

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

func (*UserInfoQuery) Exist

func (uiq *UserInfoQuery) Exist(ctx context.Context) (bool, error)

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

func (*UserInfoQuery) ExistX

func (uiq *UserInfoQuery) ExistX(ctx context.Context) bool

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

func (*UserInfoQuery) First

func (uiq *UserInfoQuery) First(ctx context.Context) (*UserInfo, error)

First returns the first UserInfo entity in the query. Returns *NotFoundError when no userinfo was found.

func (*UserInfoQuery) FirstID

func (uiq *UserInfoQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first UserInfo id in the query. Returns *NotFoundError when no id was found.

func (*UserInfoQuery) FirstX

func (uiq *UserInfoQuery) FirstX(ctx context.Context) *UserInfo

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

func (*UserInfoQuery) FirstXID

func (uiq *UserInfoQuery) FirstXID(ctx context.Context) int64

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

func (*UserInfoQuery) GroupBy

func (uiq *UserInfoQuery) GroupBy(field string, fields ...string) *UserInfoGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserInfo.Query().
	GroupBy(userinfo.FieldUserIdentity).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserInfoQuery) IDs

func (uiq *UserInfoQuery) IDs(ctx context.Context) ([]int64, error)

IDs executes the query and returns a list of UserInfo ids.

func (*UserInfoQuery) IDsX

func (uiq *UserInfoQuery) IDsX(ctx context.Context) []int64

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

func (*UserInfoQuery) Limit

func (uiq *UserInfoQuery) Limit(limit int) *UserInfoQuery

Limit adds a limit step to the query.

func (*UserInfoQuery) Offset

func (uiq *UserInfoQuery) Offset(offset int) *UserInfoQuery

Offset adds an offset step to the query.

func (*UserInfoQuery) Only

func (uiq *UserInfoQuery) Only(ctx context.Context) (*UserInfo, error)

Only returns the only UserInfo entity in the query, returns an error if not exactly one entity was returned.

func (*UserInfoQuery) OnlyID

func (uiq *UserInfoQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID returns the only UserInfo id in the query, returns an error if not exactly one id was returned.

func (*UserInfoQuery) OnlyIDX

func (uiq *UserInfoQuery) OnlyIDX(ctx context.Context) int64

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

func (*UserInfoQuery) OnlyX

func (uiq *UserInfoQuery) OnlyX(ctx context.Context) *UserInfo

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

func (*UserInfoQuery) Order

func (uiq *UserInfoQuery) Order(o ...OrderFunc) *UserInfoQuery

Order adds an order step to the query.

func (*UserInfoQuery) Select

func (uiq *UserInfoQuery) Select(field string, fields ...string) *UserInfoSelect

Select one or more fields from the given query.

PostExample:

var v []struct {
	UserIdentity string `json:"user_identity,omitempty"`
}

client.UserInfo.Query().
	Select(userinfo.FieldUserIdentity).
	Scan(ctx, &v)

func (*UserInfoQuery) Where

func (uiq *UserInfoQuery) Where(ps ...predicate.UserInfo) *UserInfoQuery

Where adds a new predicate for the builder.

type UserInfoSelect

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

UserInfoSelect is the builder for select fields of UserInfo entities.

func (*UserInfoSelect) Bool

func (uis *UserInfoSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*UserInfoSelect) BoolX

func (uis *UserInfoSelect) BoolX(ctx context.Context) bool

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

func (*UserInfoSelect) Bools

func (uis *UserInfoSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*UserInfoSelect) BoolsX

func (uis *UserInfoSelect) BoolsX(ctx context.Context) []bool

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

func (*UserInfoSelect) Float64

func (uis *UserInfoSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*UserInfoSelect) Float64X

func (uis *UserInfoSelect) Float64X(ctx context.Context) float64

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

func (*UserInfoSelect) Float64s

func (uis *UserInfoSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*UserInfoSelect) Float64sX

func (uis *UserInfoSelect) Float64sX(ctx context.Context) []float64

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

func (*UserInfoSelect) Int

func (uis *UserInfoSelect) Int(ctx context.Context) (_ int, err error)

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

func (*UserInfoSelect) IntX

func (uis *UserInfoSelect) IntX(ctx context.Context) int

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

func (*UserInfoSelect) Ints

func (uis *UserInfoSelect) Ints(ctx context.Context) ([]int, error)

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

func (*UserInfoSelect) IntsX

func (uis *UserInfoSelect) IntsX(ctx context.Context) []int

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

func (*UserInfoSelect) Scan

func (uis *UserInfoSelect) Scan(ctx context.Context, v interface{}) error

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

func (*UserInfoSelect) ScanX

func (uis *UserInfoSelect) ScanX(ctx context.Context, v interface{})

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

func (*UserInfoSelect) String

func (uis *UserInfoSelect) String(ctx context.Context) (_ string, err error)

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

func (*UserInfoSelect) StringX

func (uis *UserInfoSelect) StringX(ctx context.Context) string

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

func (*UserInfoSelect) Strings

func (uis *UserInfoSelect) Strings(ctx context.Context) ([]string, error)

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

func (*UserInfoSelect) StringsX

func (uis *UserInfoSelect) StringsX(ctx context.Context) []string

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

type UserInfoUpdate

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

UserInfoUpdate is the builder for updating UserInfo entities.

func (*UserInfoUpdate) AddChannel

func (uiu *UserInfoUpdate) AddChannel(i int32) *UserInfoUpdate

AddChannel adds i to channel.

func (*UserInfoUpdate) AddForm

func (uiu *UserInfoUpdate) AddForm(i int32) *UserInfoUpdate

AddForm adds i to form.

func (*UserInfoUpdate) ClearCreatedAt

func (uiu *UserInfoUpdate) ClearCreatedAt() *UserInfoUpdate

ClearCreatedAt clears the value of created_at.

func (*UserInfoUpdate) ClearDeletedAt

func (uiu *UserInfoUpdate) ClearDeletedAt() *UserInfoUpdate

ClearDeletedAt clears the value of deleted_at.

func (*UserInfoUpdate) ClearUpdatedAt

func (uiu *UserInfoUpdate) ClearUpdatedAt() *UserInfoUpdate

ClearUpdatedAt clears the value of updated_at.

func (*UserInfoUpdate) ClearUserIdentity

func (uiu *UserInfoUpdate) ClearUserIdentity() *UserInfoUpdate

ClearUserIdentity clears the value of user_identity.

func (*UserInfoUpdate) Exec

func (uiu *UserInfoUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserInfoUpdate) ExecX

func (uiu *UserInfoUpdate) ExecX(ctx context.Context)

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

func (*UserInfoUpdate) Mutation

func (uiu *UserInfoUpdate) Mutation() *UserInfoMutation

Mutation returns the UserInfoMutation object of the builder.

func (*UserInfoUpdate) Save

func (uiu *UserInfoUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*UserInfoUpdate) SaveX

func (uiu *UserInfoUpdate) SaveX(ctx context.Context) int

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

func (*UserInfoUpdate) SetChannel

func (uiu *UserInfoUpdate) SetChannel(i int32) *UserInfoUpdate

SetChannel sets the channel field.

func (*UserInfoUpdate) SetCreatedAt

func (uiu *UserInfoUpdate) SetCreatedAt(t time.Time) *UserInfoUpdate

SetCreatedAt sets the created_at field.

func (*UserInfoUpdate) SetDeletedAt

func (uiu *UserInfoUpdate) SetDeletedAt(t time.Time) *UserInfoUpdate

SetDeletedAt sets the deleted_at field.

func (*UserInfoUpdate) SetForm

func (uiu *UserInfoUpdate) SetForm(i int32) *UserInfoUpdate

SetForm sets the form field.

func (*UserInfoUpdate) SetNillableChannel

func (uiu *UserInfoUpdate) SetNillableChannel(i *int32) *UserInfoUpdate

SetNillableChannel sets the channel field if the given value is not nil.

func (*UserInfoUpdate) SetNillableCreatedAt

func (uiu *UserInfoUpdate) SetNillableCreatedAt(t *time.Time) *UserInfoUpdate

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

func (*UserInfoUpdate) SetNillableDeletedAt

func (uiu *UserInfoUpdate) SetNillableDeletedAt(t *time.Time) *UserInfoUpdate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserInfoUpdate) SetNillableForm

func (uiu *UserInfoUpdate) SetNillableForm(i *int32) *UserInfoUpdate

SetNillableForm sets the form field if the given value is not nil.

func (*UserInfoUpdate) SetNillableUpdatedAt

func (uiu *UserInfoUpdate) SetNillableUpdatedAt(t *time.Time) *UserInfoUpdate

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

func (*UserInfoUpdate) SetNillableUserIdentity

func (uiu *UserInfoUpdate) SetNillableUserIdentity(s *string) *UserInfoUpdate

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*UserInfoUpdate) SetUpdatedAt

func (uiu *UserInfoUpdate) SetUpdatedAt(t time.Time) *UserInfoUpdate

SetUpdatedAt sets the updated_at field.

func (*UserInfoUpdate) SetUserIdentity

func (uiu *UserInfoUpdate) SetUserIdentity(s string) *UserInfoUpdate

SetUserIdentity sets the user_identity field.

func (*UserInfoUpdate) Where

func (uiu *UserInfoUpdate) Where(ps ...predicate.UserInfo) *UserInfoUpdate

Where adds a new predicate for the builder.

type UserInfoUpdateOne

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

UserInfoUpdateOne is the builder for updating a single UserInfo entity.

func (*UserInfoUpdateOne) AddChannel

func (uiuo *UserInfoUpdateOne) AddChannel(i int32) *UserInfoUpdateOne

AddChannel adds i to channel.

func (*UserInfoUpdateOne) AddForm

func (uiuo *UserInfoUpdateOne) AddForm(i int32) *UserInfoUpdateOne

AddForm adds i to form.

func (*UserInfoUpdateOne) ClearCreatedAt

func (uiuo *UserInfoUpdateOne) ClearCreatedAt() *UserInfoUpdateOne

ClearCreatedAt clears the value of created_at.

func (*UserInfoUpdateOne) ClearDeletedAt

func (uiuo *UserInfoUpdateOne) ClearDeletedAt() *UserInfoUpdateOne

ClearDeletedAt clears the value of deleted_at.

func (*UserInfoUpdateOne) ClearUpdatedAt

func (uiuo *UserInfoUpdateOne) ClearUpdatedAt() *UserInfoUpdateOne

ClearUpdatedAt clears the value of updated_at.

func (*UserInfoUpdateOne) ClearUserIdentity

func (uiuo *UserInfoUpdateOne) ClearUserIdentity() *UserInfoUpdateOne

ClearUserIdentity clears the value of user_identity.

func (*UserInfoUpdateOne) Exec

func (uiuo *UserInfoUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserInfoUpdateOne) ExecX

func (uiuo *UserInfoUpdateOne) ExecX(ctx context.Context)

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

func (*UserInfoUpdateOne) Mutation

func (uiuo *UserInfoUpdateOne) Mutation() *UserInfoMutation

Mutation returns the UserInfoMutation object of the builder.

func (*UserInfoUpdateOne) Save

func (uiuo *UserInfoUpdateOne) Save(ctx context.Context) (*UserInfo, error)

Save executes the query and returns the updated entity.

func (*UserInfoUpdateOne) SaveX

func (uiuo *UserInfoUpdateOne) SaveX(ctx context.Context) *UserInfo

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

func (*UserInfoUpdateOne) SetChannel

func (uiuo *UserInfoUpdateOne) SetChannel(i int32) *UserInfoUpdateOne

SetChannel sets the channel field.

func (*UserInfoUpdateOne) SetCreatedAt

func (uiuo *UserInfoUpdateOne) SetCreatedAt(t time.Time) *UserInfoUpdateOne

SetCreatedAt sets the created_at field.

func (*UserInfoUpdateOne) SetDeletedAt

func (uiuo *UserInfoUpdateOne) SetDeletedAt(t time.Time) *UserInfoUpdateOne

SetDeletedAt sets the deleted_at field.

func (*UserInfoUpdateOne) SetForm

func (uiuo *UserInfoUpdateOne) SetForm(i int32) *UserInfoUpdateOne

SetForm sets the form field.

func (*UserInfoUpdateOne) SetNillableChannel

func (uiuo *UserInfoUpdateOne) SetNillableChannel(i *int32) *UserInfoUpdateOne

SetNillableChannel sets the channel field if the given value is not nil.

func (*UserInfoUpdateOne) SetNillableCreatedAt

func (uiuo *UserInfoUpdateOne) SetNillableCreatedAt(t *time.Time) *UserInfoUpdateOne

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

func (*UserInfoUpdateOne) SetNillableDeletedAt

func (uiuo *UserInfoUpdateOne) SetNillableDeletedAt(t *time.Time) *UserInfoUpdateOne

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserInfoUpdateOne) SetNillableForm

func (uiuo *UserInfoUpdateOne) SetNillableForm(i *int32) *UserInfoUpdateOne

SetNillableForm sets the form field if the given value is not nil.

func (*UserInfoUpdateOne) SetNillableUpdatedAt

func (uiuo *UserInfoUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserInfoUpdateOne

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

func (*UserInfoUpdateOne) SetNillableUserIdentity

func (uiuo *UserInfoUpdateOne) SetNillableUserIdentity(s *string) *UserInfoUpdateOne

SetNillableUserIdentity sets the user_identity field if the given value is not nil.

func (*UserInfoUpdateOne) SetUpdatedAt

func (uiuo *UserInfoUpdateOne) SetUpdatedAt(t time.Time) *UserInfoUpdateOne

SetUpdatedAt sets the updated_at field.

func (*UserInfoUpdateOne) SetUserIdentity

func (uiuo *UserInfoUpdateOne) SetUserIdentity(s string) *UserInfoUpdateOne

SetUserIdentity sets the user_identity field.

type UserInfos

type UserInfos []*UserInfo

UserInfos is a parsable slice of UserInfo.

type UserMutation

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

UserMutation represents an operation that mutate the Users nodes in the graph.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*UserMutation) AddIsDisable

func (m *UserMutation) AddIsDisable(i int32)

AddIsDisable adds i to is_disable.

func (*UserMutation) AddType

func (m *UserMutation) AddType(i int32)

AddType adds i to 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 in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.

func (*UserMutation) AddedFields

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

AddedFields returns all numeric fields that were incremented or 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.

func (*UserMutation) AddedIsDisable

func (m *UserMutation) AddedIsDisable() (r int32, exists bool)

AddedIsDisable returns the value that was added to the is_disable field in this mutation.

func (*UserMutation) AddedType

func (m *UserMutation) AddedType() (r int32, exists bool)

AddedType returns the value that was added to the type field in this mutation.

func (*UserMutation) ClearCreatedAt

func (m *UserMutation) ClearCreatedAt()

ClearCreatedAt clears the value of created_at.

func (*UserMutation) ClearDeletedAt

func (m *UserMutation) ClearDeletedAt()

ClearDeletedAt clears the value of deleted_at.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearIdentity

func (m *UserMutation) ClearIdentity()

ClearIdentity clears the value of identity.

func (*UserMutation) ClearUpdatedAt

func (m *UserMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of updated_at.

func (*UserMutation) ClearedEdges

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

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

func (*UserMutation) ClearedFields

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

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

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreatedAt

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

CreatedAt returns the created_at value in the mutation.

func (*UserMutation) CreatedAtCleared

func (m *UserMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the field created_at was cleared in this mutation.

func (*UserMutation) DeletedAt

func (m *UserMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the deleted_at value in the mutation.

func (*UserMutation) DeletedAtCleared

func (m *UserMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the field deleted_at was cleared in this mutation.

func (*UserMutation) EdgeCleared

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

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.

func (*UserMutation) FieldCleared

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

FieldCleared returns a boolean indicates if this field 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 in/decremented, call AddedFields().

func (*UserMutation) GetType

func (m *UserMutation) GetType() (r int32, exists bool)

GetType returns the type value 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 available only if it was provided to the builder.

func (*UserMutation) Identity

func (m *UserMutation) Identity() (r string, exists bool)

Identity returns the identity value in the mutation.

func (*UserMutation) IdentityCleared

func (m *UserMutation) IdentityCleared() bool

IdentityCleared returns if the field identity was cleared in this mutation.

func (*UserMutation) IsDisable

func (m *UserMutation) IsDisable() (r int32, exists bool)

IsDisable returns the is_disable value in the mutation.

func (*UserMutation) OldCreatedAt

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

OldCreatedAt returns the old created_at value of the User. 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 database query fails.

func (*UserMutation) OldDeletedAt

func (m *UserMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old deleted_at value of the User. 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 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 was failed.

func (*UserMutation) OldIdentity

func (m *UserMutation) OldIdentity(ctx context.Context) (v string, err error)

OldIdentity returns the old identity value of the User. 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 database query fails.

func (*UserMutation) OldIsDisable

func (m *UserMutation) OldIsDisable(ctx context.Context) (v int32, err error)

OldIsDisable returns the old is_disable value of the User. 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 database query fails.

func (*UserMutation) OldType

func (m *UserMutation) OldType(ctx context.Context) (v int32, err error)

OldType returns the old type value of the User. 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 database query fails.

func (*UserMutation) OldUpdatedAt

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

OldUpdatedAt returns the old updated_at value of the User. 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 database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) RemovedEdges

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

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

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*UserMutation) ResetDeletedAt

func (m *UserMutation) ResetDeletedAt()

ResetDeletedAt reset all changes of the "deleted_at" field.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetIdentity

func (m *UserMutation) ResetIdentity()

ResetIdentity reset all changes of the "identity" field.

func (*UserMutation) ResetIsDisable

func (m *UserMutation) ResetIsDisable()

ResetIsDisable reset all changes of the "is_disable" field.

func (*UserMutation) ResetType

func (m *UserMutation) ResetType()

ResetType reset all changes of the "type" field.

func (*UserMutation) ResetUpdatedAt

func (m *UserMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*UserMutation) SetCreatedAt

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

SetCreatedAt sets the created_at field.

func (*UserMutation) SetDeletedAt

func (m *UserMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the deleted_at field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id int64)

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

func (*UserMutation) SetIdentity

func (m *UserMutation) SetIdentity(s string)

SetIdentity sets the identity field.

func (*UserMutation) SetIsDisable

func (m *UserMutation) SetIsDisable(i int32)

SetIsDisable sets the is_disable field.

func (*UserMutation) SetType

func (m *UserMutation) SetType(i int32)

SetType sets the type field.

func (*UserMutation) SetUpdatedAt

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

SetUpdatedAt sets the updated_at field.

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

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

UpdatedAt returns the updated_at value in the mutation.

func (*UserMutation) UpdatedAtCleared

func (m *UserMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the field updated_at was cleared in this mutation.

type UserQuery

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

UserQuery is the builder for querying User entities.

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 query 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 in the query. Returns *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 in the query. Returns *NotFoundError when no id was found.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

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

func (*UserQuery) FirstXID

func (uq *UserQuery) FirstXID(ctx context.Context) int64

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

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

PostExample:

var v []struct {
	Identity string `json:"identity,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldIdentity).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]int64, 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 adds a limit step to the query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset adds an offset step to the query.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns the only User entity in the query, returns an error if not exactly one entity was returned.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID returns the only User id in the query, returns an error if not exactly one id was returned.

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 adds an order step to the query.

func (*UserQuery) Select

func (uq *UserQuery) Select(field string, fields ...string) *UserSelect

Select one or more fields from the given query.

PostExample:

var v []struct {
	Identity string `json:"identity,omitempty"`
}

client.User.Query().
	Select(user.FieldIdentity).
	Scan(ctx, &v)

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the builder.

type UserSelect

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

UserSelect is the builder for select fields of User entities.

func (*UserSelect) Bool

func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*UserSelect) BoolX

func (us *UserSelect) BoolX(ctx context.Context) bool

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

func (*UserSelect) Bools

func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*UserSelect) BoolsX

func (us *UserSelect) BoolsX(ctx context.Context) []bool

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

func (*UserSelect) Float64

func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*UserSelect) Float64X

func (us *UserSelect) Float64X(ctx context.Context) float64

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

func (*UserSelect) Float64s

func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*UserSelect) Float64sX

func (us *UserSelect) Float64sX(ctx context.Context) []float64

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

func (*UserSelect) Int

func (us *UserSelect) Int(ctx context.Context) (_ int, err error)

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

func (*UserSelect) IntX

func (us *UserSelect) IntX(ctx context.Context) int

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

func (*UserSelect) Ints

func (us *UserSelect) Ints(ctx context.Context) ([]int, error)

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

func (*UserSelect) IntsX

func (us *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 interface{}) error

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

func (*UserSelect) ScanX

func (us *UserSelect) ScanX(ctx context.Context, v interface{})

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

func (*UserSelect) String

func (us *UserSelect) String(ctx context.Context) (_ string, err error)

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

func (*UserSelect) StringX

func (us *UserSelect) StringX(ctx context.Context) string

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

func (*UserSelect) Strings

func (us *UserSelect) Strings(ctx context.Context) ([]string, error)

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

func (*UserSelect) StringsX

func (us *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) AddIsDisable

func (uu *UserUpdate) AddIsDisable(i int32) *UserUpdate

AddIsDisable adds i to is_disable.

func (*UserUpdate) AddType

func (uu *UserUpdate) AddType(i int32) *UserUpdate

AddType adds i to type.

func (*UserUpdate) ClearCreatedAt

func (uu *UserUpdate) ClearCreatedAt() *UserUpdate

ClearCreatedAt clears the value of created_at.

func (*UserUpdate) ClearDeletedAt

func (uu *UserUpdate) ClearDeletedAt() *UserUpdate

ClearDeletedAt clears the value of deleted_at.

func (*UserUpdate) ClearIdentity

func (uu *UserUpdate) ClearIdentity() *UserUpdate

ClearIdentity clears the value of identity.

func (*UserUpdate) ClearUpdatedAt

func (uu *UserUpdate) ClearUpdatedAt() *UserUpdate

ClearUpdatedAt clears the value of updated_at.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

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

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this 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) SetDeletedAt

func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate

SetDeletedAt sets the deleted_at field.

func (*UserUpdate) SetIdentity

func (uu *UserUpdate) SetIdentity(s string) *UserUpdate

SetIdentity sets the identity field.

func (*UserUpdate) SetIsDisable

func (uu *UserUpdate) SetIsDisable(i int32) *UserUpdate

SetIsDisable sets the is_disable field.

func (*UserUpdate) SetNillableCreatedAt

func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate

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

func (*UserUpdate) SetNillableDeletedAt

func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserUpdate) SetNillableIdentity

func (uu *UserUpdate) SetNillableIdentity(s *string) *UserUpdate

SetNillableIdentity sets the identity field if the given value is not nil.

func (*UserUpdate) SetNillableIsDisable

func (uu *UserUpdate) SetNillableIsDisable(i *int32) *UserUpdate

SetNillableIsDisable sets the is_disable field if the given value is not nil.

func (*UserUpdate) SetNillableType

func (uu *UserUpdate) SetNillableType(i *int32) *UserUpdate

SetNillableType sets the type field if the given value is not nil.

func (*UserUpdate) SetNillableUpdatedAt

func (uu *UserUpdate) SetNillableUpdatedAt(t *time.Time) *UserUpdate

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

func (*UserUpdate) SetType

func (uu *UserUpdate) SetType(i int32) *UserUpdate

SetType sets the type field.

func (*UserUpdate) SetUpdatedAt

func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate

SetUpdatedAt sets the updated_at field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where adds a new predicate for the builder.

type UserUpdateOne

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

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddIsDisable

func (uuo *UserUpdateOne) AddIsDisable(i int32) *UserUpdateOne

AddIsDisable adds i to is_disable.

func (*UserUpdateOne) AddType

func (uuo *UserUpdateOne) AddType(i int32) *UserUpdateOne

AddType adds i to type.

func (*UserUpdateOne) ClearCreatedAt

func (uuo *UserUpdateOne) ClearCreatedAt() *UserUpdateOne

ClearCreatedAt clears the value of created_at.

func (*UserUpdateOne) ClearDeletedAt

func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne

ClearDeletedAt clears the value of deleted_at.

func (*UserUpdateOne) ClearIdentity

func (uuo *UserUpdateOne) ClearIdentity() *UserUpdateOne

ClearIdentity clears the value of identity.

func (*UserUpdateOne) ClearUpdatedAt

func (uuo *UserUpdateOne) ClearUpdatedAt() *UserUpdateOne

ClearUpdatedAt clears the value of updated_at.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

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

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

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

func (*UserUpdateOne) SetCreatedAt

func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne

SetCreatedAt sets the created_at field.

func (*UserUpdateOne) SetDeletedAt

func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne

SetDeletedAt sets the deleted_at field.

func (*UserUpdateOne) SetIdentity

func (uuo *UserUpdateOne) SetIdentity(s string) *UserUpdateOne

SetIdentity sets the identity field.

func (*UserUpdateOne) SetIsDisable

func (uuo *UserUpdateOne) SetIsDisable(i int32) *UserUpdateOne

SetIsDisable sets the is_disable field.

func (*UserUpdateOne) SetNillableCreatedAt

func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne

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

func (*UserUpdateOne) SetNillableDeletedAt

func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne

SetNillableDeletedAt sets the deleted_at field if the given value is not nil.

func (*UserUpdateOne) SetNillableIdentity

func (uuo *UserUpdateOne) SetNillableIdentity(s *string) *UserUpdateOne

SetNillableIdentity sets the identity field if the given value is not nil.

func (*UserUpdateOne) SetNillableIsDisable

func (uuo *UserUpdateOne) SetNillableIsDisable(i *int32) *UserUpdateOne

SetNillableIsDisable sets the is_disable field if the given value is not nil.

func (*UserUpdateOne) SetNillableType

func (uuo *UserUpdateOne) SetNillableType(i *int32) *UserUpdateOne

SetNillableType sets the type field if the given value is not nil.

func (*UserUpdateOne) SetNillableUpdatedAt

func (uuo *UserUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserUpdateOne

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

func (*UserUpdateOne) SetType

func (uuo *UserUpdateOne) SetType(i int32) *UserUpdateOne

SetType sets the type field.

func (*UserUpdateOne) SetUpdatedAt

func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne

SetUpdatedAt sets the updated_at field.

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 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 conflict in user's code.

Jump to

Keyboard shortcuts

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