model

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

README

model

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.
	TypeMember            = "Member"
	TypeMemberSecurityLog = "MemberSecurityLog"
	TypeSysSetting        = "SysSetting"
)

Variables

This section is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

GroupBy(field1, field2).
Aggregate(model.As(model.Sum(field1), "sum_field1"), (model.As(model.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
	// Member is the client for interacting with the Member builders.
	Member *MemberClient
	// MemberSecurityLog is the client for interacting with the MemberSecurityLog builders.
	MemberSecurityLog *MemberSecurityLogClient
	// SysSetting is the client for interacting with the SysSetting builders.
	SysSetting *SysSettingClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

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

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

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

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

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

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

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

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	Member.
	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 conflicts in user's code.

type Member

type Member struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Nickname holds the value of the "nickname" field.
	Nickname string `json:"nickname,omitempty"`
	// Email holds the value of the "email" field.
	Email *string `json:"email,omitempty"`
	// Phone holds the value of the "phone" field.
	Phone *string `json:"phone,omitempty"`
	// Password holds the value of the "password" field.
	Password string `json:"-"`
	// Status holds the value of the "status" field.
	Status *member.Status `json:"-"`
	// Signature holds the value of the "signature" field.
	Signature string `json:"-"`
	// LastPwdAuth holds the value of the "last_pwd_auth" field.
	LastPwdAuth *time.Time `json:"last_pwd_auth,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"-"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"-"`
	// DeleteTime holds the value of the "delete_time" field.
	DeleteTime *time.Time `json:"-"`
	// contains filtered or unexported fields
}

Member is the model entity for the Member schema.

func (*Member) String

func (m *Member) String() string

String implements the fmt.Stringer.

func (*Member) Unwrap

func (m *Member) Unwrap() *Member

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

func (*Member) Update

func (m *Member) Update() *MemberUpdateOne

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

type MemberClient

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

MemberClient is a client for the Member schema.

func NewMemberClient

func NewMemberClient(c config) *MemberClient

NewMemberClient returns a client for the Member from the given config.

func (*MemberClient) Create

func (c *MemberClient) Create() *MemberCreate

Create returns a create builder for Member.

func (*MemberClient) CreateBulk

func (c *MemberClient) CreateBulk(builders ...*MemberCreate) *MemberCreateBulk

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

func (*MemberClient) Delete

func (c *MemberClient) Delete() *MemberDelete

Delete returns a delete builder for Member.

func (*MemberClient) DeleteOne

func (c *MemberClient) DeleteOne(m *Member) *MemberDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*MemberClient) DeleteOneID

func (c *MemberClient) DeleteOneID(id uuid.UUID) *MemberDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*MemberClient) Get

func (c *MemberClient) Get(ctx context.Context, id uuid.UUID) (*Member, error)

Get returns a Member entity by its id.

func (*MemberClient) GetX

func (c *MemberClient) GetX(ctx context.Context, id uuid.UUID) *Member

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

func (*MemberClient) Hooks

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

Hooks returns the client hooks.

func (*MemberClient) Query

func (c *MemberClient) Query() *MemberQuery

Query returns a query builder for Member.

func (*MemberClient) Update

func (c *MemberClient) Update() *MemberUpdate

Update returns an update builder for Member.

func (*MemberClient) UpdateOne

func (c *MemberClient) UpdateOne(m *Member) *MemberUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MemberClient) UpdateOneID

func (c *MemberClient) UpdateOneID(id uuid.UUID) *MemberUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MemberClient) Use

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

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

type MemberCreate

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

MemberCreate is the builder for creating a Member entity.

func (*MemberCreate) Exec

func (mc *MemberCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberCreate) ExecX

func (mc *MemberCreate) ExecX(ctx context.Context)

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

func (*MemberCreate) Mutation

func (mc *MemberCreate) Mutation() *MemberMutation

Mutation returns the MemberMutation object of the builder.

func (*MemberCreate) Save

func (mc *MemberCreate) Save(ctx context.Context) (*Member, error)

Save creates the Member in the database.

func (*MemberCreate) SaveX

func (mc *MemberCreate) SaveX(ctx context.Context) *Member

SaveX calls Save and panics if Save returns an error.

func (*MemberCreate) SetCreateTime

func (mc *MemberCreate) SetCreateTime(t time.Time) *MemberCreate

SetCreateTime sets the "create_time" field.

func (*MemberCreate) SetDeleteTime

func (mc *MemberCreate) SetDeleteTime(t time.Time) *MemberCreate

SetDeleteTime sets the "delete_time" field.

func (*MemberCreate) SetEmail

func (mc *MemberCreate) SetEmail(s string) *MemberCreate

SetEmail sets the "email" field.

func (*MemberCreate) SetID

func (mc *MemberCreate) SetID(u uuid.UUID) *MemberCreate

SetID sets the "id" field.

func (*MemberCreate) SetLastPwdAuth

func (mc *MemberCreate) SetLastPwdAuth(t time.Time) *MemberCreate

SetLastPwdAuth sets the "last_pwd_auth" field.

func (*MemberCreate) SetNickname

func (mc *MemberCreate) SetNickname(s string) *MemberCreate

SetNickname sets the "nickname" field.

func (*MemberCreate) SetNillableCreateTime

func (mc *MemberCreate) SetNillableCreateTime(t *time.Time) *MemberCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*MemberCreate) SetNillableDeleteTime

func (mc *MemberCreate) SetNillableDeleteTime(t *time.Time) *MemberCreate

SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.

func (*MemberCreate) SetNillableEmail

func (mc *MemberCreate) SetNillableEmail(s *string) *MemberCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*MemberCreate) SetNillableLastPwdAuth

func (mc *MemberCreate) SetNillableLastPwdAuth(t *time.Time) *MemberCreate

SetNillableLastPwdAuth sets the "last_pwd_auth" field if the given value is not nil.

func (*MemberCreate) SetNillablePhone

func (mc *MemberCreate) SetNillablePhone(s *string) *MemberCreate

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

func (*MemberCreate) SetNillableStatus

func (mc *MemberCreate) SetNillableStatus(m *member.Status) *MemberCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MemberCreate) SetNillableUpdateTime

func (mc *MemberCreate) SetNillableUpdateTime(t *time.Time) *MemberCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*MemberCreate) SetPassword

func (mc *MemberCreate) SetPassword(s string) *MemberCreate

SetPassword sets the "password" field.

func (*MemberCreate) SetPhone

func (mc *MemberCreate) SetPhone(s string) *MemberCreate

SetPhone sets the "phone" field.

func (*MemberCreate) SetSignature

func (mc *MemberCreate) SetSignature(s string) *MemberCreate

SetSignature sets the "signature" field.

func (*MemberCreate) SetStatus

func (mc *MemberCreate) SetStatus(m member.Status) *MemberCreate

SetStatus sets the "status" field.

func (*MemberCreate) SetUpdateTime

func (mc *MemberCreate) SetUpdateTime(t time.Time) *MemberCreate

SetUpdateTime sets the "update_time" field.

type MemberCreateBulk

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

MemberCreateBulk is the builder for creating many Member entities in bulk.

func (*MemberCreateBulk) Exec

func (mcb *MemberCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberCreateBulk) ExecX

func (mcb *MemberCreateBulk) ExecX(ctx context.Context)

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

func (*MemberCreateBulk) Save

func (mcb *MemberCreateBulk) Save(ctx context.Context) ([]*Member, error)

Save creates the Member entities in the database.

func (*MemberCreateBulk) SaveX

func (mcb *MemberCreateBulk) SaveX(ctx context.Context) []*Member

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

type MemberDelete

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

MemberDelete is the builder for deleting a Member entity.

func (*MemberDelete) Exec

func (md *MemberDelete) Exec(ctx context.Context) (int, error)

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

func (*MemberDelete) ExecX

func (md *MemberDelete) ExecX(ctx context.Context) int

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

func (*MemberDelete) Where

func (md *MemberDelete) Where(ps ...predicate.Member) *MemberDelete

Where appends a list predicates to the MemberDelete builder.

type MemberDeleteOne

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

MemberDeleteOne is the builder for deleting a single Member entity.

func (*MemberDeleteOne) Exec

func (mdo *MemberDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MemberDeleteOne) ExecX

func (mdo *MemberDeleteOne) ExecX(ctx context.Context)

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

type MemberGroupBy

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

MemberGroupBy is the group-by builder for Member entities.

func (*MemberGroupBy) Aggregate

func (mgb *MemberGroupBy) Aggregate(fns ...AggregateFunc) *MemberGroupBy

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

func (*MemberGroupBy) Bool

func (mgb *MemberGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*MemberGroupBy) BoolX

func (mgb *MemberGroupBy) BoolX(ctx context.Context) bool

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

func (*MemberGroupBy) Bools

func (mgb *MemberGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*MemberGroupBy) BoolsX

func (mgb *MemberGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MemberGroupBy) Float64

func (mgb *MemberGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*MemberGroupBy) Float64X

func (mgb *MemberGroupBy) Float64X(ctx context.Context) float64

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

func (*MemberGroupBy) Float64s

func (mgb *MemberGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*MemberGroupBy) Float64sX

func (mgb *MemberGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MemberGroupBy) Int

func (mgb *MemberGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*MemberGroupBy) IntX

func (mgb *MemberGroupBy) IntX(ctx context.Context) int

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

func (*MemberGroupBy) Ints

func (mgb *MemberGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*MemberGroupBy) IntsX

func (mgb *MemberGroupBy) IntsX(ctx context.Context) []int

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

func (*MemberGroupBy) Scan

func (mgb *MemberGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*MemberGroupBy) ScanX

func (mgb *MemberGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MemberGroupBy) String

func (mgb *MemberGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*MemberGroupBy) StringX

func (mgb *MemberGroupBy) StringX(ctx context.Context) string

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

func (*MemberGroupBy) Strings

func (mgb *MemberGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*MemberGroupBy) StringsX

func (mgb *MemberGroupBy) StringsX(ctx context.Context) []string

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

type MemberMutation

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

MemberMutation represents an operation that mutates the Member nodes in the graph.

func (*MemberMutation) AddField

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

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

func (*MemberMutation) AddedEdges

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

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

func (*MemberMutation) AddedField

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

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MemberMutation) AddedFields

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

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

func (*MemberMutation) AddedIDs

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

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

func (*MemberMutation) ClearDeleteTime

func (m *MemberMutation) ClearDeleteTime()

ClearDeleteTime clears the value of the "delete_time" field.

func (*MemberMutation) ClearEdge

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

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

func (*MemberMutation) ClearEmail

func (m *MemberMutation) ClearEmail()

ClearEmail clears the value of the "email" field.

func (*MemberMutation) ClearField

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

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

func (*MemberMutation) ClearLastPwdAuth

func (m *MemberMutation) ClearLastPwdAuth()

ClearLastPwdAuth clears the value of the "last_pwd_auth" field.

func (*MemberMutation) ClearPhone

func (m *MemberMutation) ClearPhone()

ClearPhone clears the value of the "phone" field.

func (*MemberMutation) ClearStatus

func (m *MemberMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*MemberMutation) ClearedEdges

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

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

func (*MemberMutation) ClearedFields

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

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

func (MemberMutation) Client

func (m MemberMutation) 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 (*MemberMutation) CreateTime

func (m *MemberMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*MemberMutation) DeleteTime

func (m *MemberMutation) DeleteTime() (r time.Time, exists bool)

DeleteTime returns the value of the "delete_time" field in the mutation.

func (*MemberMutation) DeleteTimeCleared

func (m *MemberMutation) DeleteTimeCleared() bool

DeleteTimeCleared returns if the "delete_time" field was cleared in this mutation.

func (*MemberMutation) EdgeCleared

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

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

func (*MemberMutation) Email

func (m *MemberMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*MemberMutation) EmailCleared

func (m *MemberMutation) EmailCleared() bool

EmailCleared returns if the "email" field was cleared in this mutation.

func (*MemberMutation) Field

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

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

func (*MemberMutation) FieldCleared

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

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

func (*MemberMutation) Fields

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

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

func (*MemberMutation) ID

func (m *MemberMutation) ID() (id uuid.UUID, exists bool)

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

func (*MemberMutation) LastPwdAuth

func (m *MemberMutation) LastPwdAuth() (r time.Time, exists bool)

LastPwdAuth returns the value of the "last_pwd_auth" field in the mutation.

func (*MemberMutation) LastPwdAuthCleared

func (m *MemberMutation) LastPwdAuthCleared() bool

LastPwdAuthCleared returns if the "last_pwd_auth" field was cleared in this mutation.

func (*MemberMutation) Nickname

func (m *MemberMutation) Nickname() (r string, exists bool)

Nickname returns the value of the "nickname" field in the mutation.

func (*MemberMutation) OldCreateTime

func (m *MemberMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldDeleteTime

func (m *MemberMutation) OldDeleteTime(ctx context.Context) (v *time.Time, err error)

OldDeleteTime returns the old "delete_time" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldEmail

func (m *MemberMutation) OldEmail(ctx context.Context) (v *string, err error)

OldEmail returns the old "email" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldField

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

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*MemberMutation) OldLastPwdAuth

func (m *MemberMutation) OldLastPwdAuth(ctx context.Context) (v *time.Time, err error)

OldLastPwdAuth returns the old "last_pwd_auth" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldNickname

func (m *MemberMutation) OldNickname(ctx context.Context) (v string, err error)

OldNickname returns the old "nickname" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldPassword

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

OldPassword returns the old "password" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldPhone

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

OldPhone returns the old "phone" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldSignature

func (m *MemberMutation) OldSignature(ctx context.Context) (v string, err error)

OldSignature returns the old "signature" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldStatus

func (m *MemberMutation) OldStatus(ctx context.Context) (v *member.Status, err error)

OldStatus returns the old "status" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldUpdateTime

func (m *MemberMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) Op

func (m *MemberMutation) Op() Op

Op returns the operation name.

func (*MemberMutation) Password

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

Password returns the value of the "password" field in the mutation.

func (*MemberMutation) Phone

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

Phone returns the value of the "phone" field in the mutation.

func (*MemberMutation) PhoneCleared

func (m *MemberMutation) PhoneCleared() bool

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

func (*MemberMutation) RemovedEdges

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

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

func (*MemberMutation) RemovedIDs

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

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*MemberMutation) ResetCreateTime

func (m *MemberMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*MemberMutation) ResetDeleteTime

func (m *MemberMutation) ResetDeleteTime()

ResetDeleteTime resets all changes to the "delete_time" field.

func (*MemberMutation) ResetEdge

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

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

func (*MemberMutation) ResetEmail

func (m *MemberMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*MemberMutation) ResetField

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

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

func (*MemberMutation) ResetLastPwdAuth

func (m *MemberMutation) ResetLastPwdAuth()

ResetLastPwdAuth resets all changes to the "last_pwd_auth" field.

func (*MemberMutation) ResetNickname

func (m *MemberMutation) ResetNickname()

ResetNickname resets all changes to the "nickname" field.

func (*MemberMutation) ResetPassword

func (m *MemberMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*MemberMutation) ResetPhone

func (m *MemberMutation) ResetPhone()

ResetPhone resets all changes to the "phone" field.

func (*MemberMutation) ResetSignature

func (m *MemberMutation) ResetSignature()

ResetSignature resets all changes to the "signature" field.

func (*MemberMutation) ResetStatus

func (m *MemberMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*MemberMutation) ResetUpdateTime

func (m *MemberMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*MemberMutation) SetCreateTime

func (m *MemberMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*MemberMutation) SetDeleteTime

func (m *MemberMutation) SetDeleteTime(t time.Time)

SetDeleteTime sets the "delete_time" field.

func (*MemberMutation) SetEmail

func (m *MemberMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*MemberMutation) SetField

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

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MemberMutation) SetID

func (m *MemberMutation) SetID(id uuid.UUID)

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

func (*MemberMutation) SetLastPwdAuth

func (m *MemberMutation) SetLastPwdAuth(t time.Time)

SetLastPwdAuth sets the "last_pwd_auth" field.

func (*MemberMutation) SetNickname

func (m *MemberMutation) SetNickname(s string)

SetNickname sets the "nickname" field.

func (*MemberMutation) SetPassword

func (m *MemberMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*MemberMutation) SetPhone

func (m *MemberMutation) SetPhone(s string)

SetPhone sets the "phone" field.

func (*MemberMutation) SetSignature

func (m *MemberMutation) SetSignature(s string)

SetSignature sets the "signature" field.

func (*MemberMutation) SetStatus

func (m *MemberMutation) SetStatus(value member.Status)

SetStatus sets the "status" field.

func (*MemberMutation) SetUpdateTime

func (m *MemberMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*MemberMutation) Signature

func (m *MemberMutation) Signature() (r string, exists bool)

Signature returns the value of the "signature" field in the mutation.

func (*MemberMutation) Status

func (m *MemberMutation) Status() (r member.Status, exists bool)

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

func (*MemberMutation) StatusCleared

func (m *MemberMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (MemberMutation) Tx

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

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

func (*MemberMutation) Type

func (m *MemberMutation) Type() string

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

func (*MemberMutation) UpdateTime

func (m *MemberMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*MemberMutation) Where

func (m *MemberMutation) Where(ps ...predicate.Member)

Where appends a list predicates to the MemberMutation builder.

type MemberQuery

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

MemberQuery is the builder for querying Member entities.

func (*MemberQuery) All

func (mq *MemberQuery) All(ctx context.Context) ([]*Member, error)

All executes the query and returns a list of Members.

func (*MemberQuery) AllX

func (mq *MemberQuery) AllX(ctx context.Context) []*Member

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

func (*MemberQuery) Clone

func (mq *MemberQuery) Clone() *MemberQuery

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

func (*MemberQuery) Count

func (mq *MemberQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MemberQuery) CountX

func (mq *MemberQuery) CountX(ctx context.Context) int

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

func (*MemberQuery) Exist

func (mq *MemberQuery) Exist(ctx context.Context) (bool, error)

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

func (*MemberQuery) ExistX

func (mq *MemberQuery) ExistX(ctx context.Context) bool

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

func (*MemberQuery) First

func (mq *MemberQuery) First(ctx context.Context) (*Member, error)

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

func (*MemberQuery) FirstID

func (mq *MemberQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*MemberQuery) FirstIDX

func (mq *MemberQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*MemberQuery) FirstX

func (mq *MemberQuery) FirstX(ctx context.Context) *Member

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

func (*MemberQuery) GroupBy

func (mq *MemberQuery) GroupBy(field string, fields ...string) *MemberGroupBy

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

Example:

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

client.Member.Query().
	GroupBy(member.FieldNickname).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*MemberQuery) IDs

func (mq *MemberQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*MemberQuery) IDsX

func (mq *MemberQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*MemberQuery) Limit

func (mq *MemberQuery) Limit(limit int) *MemberQuery

Limit adds a limit step to the query.

func (*MemberQuery) Offset

func (mq *MemberQuery) Offset(offset int) *MemberQuery

Offset adds an offset step to the query.

func (*MemberQuery) Only

func (mq *MemberQuery) Only(ctx context.Context) (*Member, error)

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

func (*MemberQuery) OnlyID

func (mq *MemberQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*MemberQuery) OnlyIDX

func (mq *MemberQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*MemberQuery) OnlyX

func (mq *MemberQuery) OnlyX(ctx context.Context) *Member

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

func (*MemberQuery) Order

func (mq *MemberQuery) Order(o ...OrderFunc) *MemberQuery

Order adds an order step to the query.

func (*MemberQuery) Select

func (mq *MemberQuery) Select(fields ...string) *MemberSelect

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

Example:

var v []struct {
	Nickname string `json:"nickname,omitempty"`
}

client.Member.Query().
	Select(member.FieldNickname).
	Scan(ctx, &v)

func (*MemberQuery) Unique

func (mq *MemberQuery) Unique(unique bool) *MemberQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*MemberQuery) Where

func (mq *MemberQuery) Where(ps ...predicate.Member) *MemberQuery

Where adds a new predicate for the MemberQuery builder.

type MemberSecurityLog

type MemberSecurityLog struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// UID holds the value of the "uid" field.
	UID string `json:"uid,omitempty"`
	// Action holds the value of the "action" field.
	Action membersecuritylog.Action `json:"action,omitempty"`
	// IP holds the value of the "ip" field.
	IP *string `json:"ip,omitempty"`
	// RequestID holds the value of the "request_id" field.
	RequestID *string `json:"request_id,omitempty"`
	// ServerVersion holds the value of the "server_version" field.
	ServerVersion *string `json:"server_version,omitempty"`
	// Description holds the value of the "description" field.
	Description *string `json:"description,omitempty"`
	// Remark holds the value of the "remark" field.
	Remark *string `json:"remark,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"-"`
	// contains filtered or unexported fields
}

MemberSecurityLog is the model entity for the MemberSecurityLog schema.

func (*MemberSecurityLog) String

func (msl *MemberSecurityLog) String() string

String implements the fmt.Stringer.

func (*MemberSecurityLog) Unwrap

func (msl *MemberSecurityLog) Unwrap() *MemberSecurityLog

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

func (*MemberSecurityLog) Update

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

type MemberSecurityLogClient

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

MemberSecurityLogClient is a client for the MemberSecurityLog schema.

func NewMemberSecurityLogClient

func NewMemberSecurityLogClient(c config) *MemberSecurityLogClient

NewMemberSecurityLogClient returns a client for the MemberSecurityLog from the given config.

func (*MemberSecurityLogClient) Create

Create returns a create builder for MemberSecurityLog.

func (*MemberSecurityLogClient) CreateBulk

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

func (*MemberSecurityLogClient) Delete

Delete returns a delete builder for MemberSecurityLog.

func (*MemberSecurityLogClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*MemberSecurityLogClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*MemberSecurityLogClient) Get

Get returns a MemberSecurityLog entity by its id.

func (*MemberSecurityLogClient) GetX

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

func (*MemberSecurityLogClient) Hooks

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

Hooks returns the client hooks.

func (*MemberSecurityLogClient) Query

Query returns a query builder for MemberSecurityLog.

func (*MemberSecurityLogClient) Update

Update returns an update builder for MemberSecurityLog.

func (*MemberSecurityLogClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MemberSecurityLogClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*MemberSecurityLogClient) Use

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

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

type MemberSecurityLogCreate

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

MemberSecurityLogCreate is the builder for creating a MemberSecurityLog entity.

func (*MemberSecurityLogCreate) Exec

func (mslc *MemberSecurityLogCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberSecurityLogCreate) ExecX

func (mslc *MemberSecurityLogCreate) ExecX(ctx context.Context)

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

func (*MemberSecurityLogCreate) Mutation

Mutation returns the MemberSecurityLogMutation object of the builder.

func (*MemberSecurityLogCreate) Save

Save creates the MemberSecurityLog in the database.

func (*MemberSecurityLogCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MemberSecurityLogCreate) SetAction

SetAction sets the "action" field.

func (*MemberSecurityLogCreate) SetCreateTime

func (mslc *MemberSecurityLogCreate) SetCreateTime(t time.Time) *MemberSecurityLogCreate

SetCreateTime sets the "create_time" field.

func (*MemberSecurityLogCreate) SetDescription

func (mslc *MemberSecurityLogCreate) SetDescription(s string) *MemberSecurityLogCreate

SetDescription sets the "description" field.

func (*MemberSecurityLogCreate) SetID

SetID sets the "id" field.

func (*MemberSecurityLogCreate) SetIP

SetIP sets the "ip" field.

func (*MemberSecurityLogCreate) SetNillableAction

SetNillableAction sets the "action" field if the given value is not nil.

func (*MemberSecurityLogCreate) SetNillableCreateTime

func (mslc *MemberSecurityLogCreate) SetNillableCreateTime(t *time.Time) *MemberSecurityLogCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*MemberSecurityLogCreate) SetNillableDescription

func (mslc *MemberSecurityLogCreate) SetNillableDescription(s *string) *MemberSecurityLogCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*MemberSecurityLogCreate) SetNillableIP

func (mslc *MemberSecurityLogCreate) SetNillableIP(s *string) *MemberSecurityLogCreate

SetNillableIP sets the "ip" field if the given value is not nil.

func (*MemberSecurityLogCreate) SetNillableRemark

func (mslc *MemberSecurityLogCreate) SetNillableRemark(s *string) *MemberSecurityLogCreate

SetNillableRemark sets the "remark" field if the given value is not nil.

func (*MemberSecurityLogCreate) SetNillableRequestID

func (mslc *MemberSecurityLogCreate) SetNillableRequestID(s *string) *MemberSecurityLogCreate

SetNillableRequestID sets the "request_id" field if the given value is not nil.

func (*MemberSecurityLogCreate) SetNillableServerVersion

func (mslc *MemberSecurityLogCreate) SetNillableServerVersion(s *string) *MemberSecurityLogCreate

SetNillableServerVersion sets the "server_version" field if the given value is not nil.

func (*MemberSecurityLogCreate) SetRemark

SetRemark sets the "remark" field.

func (*MemberSecurityLogCreate) SetRequestID

SetRequestID sets the "request_id" field.

func (*MemberSecurityLogCreate) SetServerVersion

func (mslc *MemberSecurityLogCreate) SetServerVersion(s string) *MemberSecurityLogCreate

SetServerVersion sets the "server_version" field.

func (*MemberSecurityLogCreate) SetUID

SetUID sets the "uid" field.

type MemberSecurityLogCreateBulk

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

MemberSecurityLogCreateBulk is the builder for creating many MemberSecurityLog entities in bulk.

func (*MemberSecurityLogCreateBulk) Exec

Exec executes the query.

func (*MemberSecurityLogCreateBulk) ExecX

func (mslcb *MemberSecurityLogCreateBulk) ExecX(ctx context.Context)

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

func (*MemberSecurityLogCreateBulk) Save

Save creates the MemberSecurityLog entities in the database.

func (*MemberSecurityLogCreateBulk) SaveX

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

type MemberSecurityLogDelete

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

MemberSecurityLogDelete is the builder for deleting a MemberSecurityLog entity.

func (*MemberSecurityLogDelete) Exec

func (msld *MemberSecurityLogDelete) Exec(ctx context.Context) (int, error)

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

func (*MemberSecurityLogDelete) ExecX

func (msld *MemberSecurityLogDelete) ExecX(ctx context.Context) int

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

func (*MemberSecurityLogDelete) Where

Where appends a list predicates to the MemberSecurityLogDelete builder.

type MemberSecurityLogDeleteOne

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

MemberSecurityLogDeleteOne is the builder for deleting a single MemberSecurityLog entity.

func (*MemberSecurityLogDeleteOne) Exec

Exec executes the deletion query.

func (*MemberSecurityLogDeleteOne) ExecX

func (msldo *MemberSecurityLogDeleteOne) ExecX(ctx context.Context)

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

type MemberSecurityLogGroupBy

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

MemberSecurityLogGroupBy is the group-by builder for MemberSecurityLog entities.

func (*MemberSecurityLogGroupBy) Aggregate

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

func (*MemberSecurityLogGroupBy) Bool

func (mslgb *MemberSecurityLogGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*MemberSecurityLogGroupBy) BoolX

func (mslgb *MemberSecurityLogGroupBy) BoolX(ctx context.Context) bool

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

func (*MemberSecurityLogGroupBy) Bools

func (mslgb *MemberSecurityLogGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*MemberSecurityLogGroupBy) BoolsX

func (mslgb *MemberSecurityLogGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MemberSecurityLogGroupBy) Float64

func (mslgb *MemberSecurityLogGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*MemberSecurityLogGroupBy) Float64X

func (mslgb *MemberSecurityLogGroupBy) Float64X(ctx context.Context) float64

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

func (*MemberSecurityLogGroupBy) Float64s

func (mslgb *MemberSecurityLogGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*MemberSecurityLogGroupBy) Float64sX

func (mslgb *MemberSecurityLogGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MemberSecurityLogGroupBy) Int

func (mslgb *MemberSecurityLogGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*MemberSecurityLogGroupBy) IntX

func (mslgb *MemberSecurityLogGroupBy) IntX(ctx context.Context) int

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

func (*MemberSecurityLogGroupBy) Ints

func (mslgb *MemberSecurityLogGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*MemberSecurityLogGroupBy) IntsX

func (mslgb *MemberSecurityLogGroupBy) IntsX(ctx context.Context) []int

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

func (*MemberSecurityLogGroupBy) Scan

func (mslgb *MemberSecurityLogGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*MemberSecurityLogGroupBy) ScanX

func (mslgb *MemberSecurityLogGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MemberSecurityLogGroupBy) String

func (mslgb *MemberSecurityLogGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*MemberSecurityLogGroupBy) StringX

func (mslgb *MemberSecurityLogGroupBy) StringX(ctx context.Context) string

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

func (*MemberSecurityLogGroupBy) Strings

func (mslgb *MemberSecurityLogGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*MemberSecurityLogGroupBy) StringsX

func (mslgb *MemberSecurityLogGroupBy) StringsX(ctx context.Context) []string

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

type MemberSecurityLogMutation

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

MemberSecurityLogMutation represents an operation that mutates the MemberSecurityLog nodes in the graph.

func (*MemberSecurityLogMutation) Action

func (m *MemberSecurityLogMutation) Action() (r membersecuritylog.Action, exists bool)

Action returns the value of the "action" field in the mutation.

func (*MemberSecurityLogMutation) AddField

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

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

func (*MemberSecurityLogMutation) AddedEdges

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

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

func (*MemberSecurityLogMutation) AddedField

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

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MemberSecurityLogMutation) AddedFields

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

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

func (*MemberSecurityLogMutation) AddedIDs

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

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

func (*MemberSecurityLogMutation) ClearDescription

func (m *MemberSecurityLogMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*MemberSecurityLogMutation) ClearEdge

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

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

func (*MemberSecurityLogMutation) ClearField

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

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

func (*MemberSecurityLogMutation) ClearIP

func (m *MemberSecurityLogMutation) ClearIP()

ClearIP clears the value of the "ip" field.

func (*MemberSecurityLogMutation) ClearRemark

func (m *MemberSecurityLogMutation) ClearRemark()

ClearRemark clears the value of the "remark" field.

func (*MemberSecurityLogMutation) ClearRequestID

func (m *MemberSecurityLogMutation) ClearRequestID()

ClearRequestID clears the value of the "request_id" field.

func (*MemberSecurityLogMutation) ClearServerVersion

func (m *MemberSecurityLogMutation) ClearServerVersion()

ClearServerVersion clears the value of the "server_version" field.

func (*MemberSecurityLogMutation) ClearedEdges

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

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

func (*MemberSecurityLogMutation) ClearedFields

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

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

func (MemberSecurityLogMutation) Client

func (m MemberSecurityLogMutation) 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 (*MemberSecurityLogMutation) CreateTime

func (m *MemberSecurityLogMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*MemberSecurityLogMutation) Description

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

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

func (*MemberSecurityLogMutation) DescriptionCleared

func (m *MemberSecurityLogMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*MemberSecurityLogMutation) EdgeCleared

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

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

func (*MemberSecurityLogMutation) Field

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

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

func (*MemberSecurityLogMutation) FieldCleared

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

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

func (*MemberSecurityLogMutation) Fields

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

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

func (*MemberSecurityLogMutation) ID

func (m *MemberSecurityLogMutation) ID() (id int, exists bool)

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

func (*MemberSecurityLogMutation) IP

func (m *MemberSecurityLogMutation) IP() (r string, exists bool)

IP returns the value of the "ip" field in the mutation.

func (*MemberSecurityLogMutation) IPCleared

func (m *MemberSecurityLogMutation) IPCleared() bool

IPCleared returns if the "ip" field was cleared in this mutation.

func (*MemberSecurityLogMutation) OldAction

OldAction returns the old "action" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberSecurityLogMutation) OldCreateTime

func (m *MemberSecurityLogMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberSecurityLogMutation) OldDescription

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

OldDescription returns the old "description" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberSecurityLogMutation) OldField

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

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*MemberSecurityLogMutation) OldIP

func (m *MemberSecurityLogMutation) OldIP(ctx context.Context) (v *string, err error)

OldIP returns the old "ip" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberSecurityLogMutation) OldRemark

func (m *MemberSecurityLogMutation) OldRemark(ctx context.Context) (v *string, err error)

OldRemark returns the old "remark" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberSecurityLogMutation) OldRequestID

func (m *MemberSecurityLogMutation) OldRequestID(ctx context.Context) (v *string, err error)

OldRequestID returns the old "request_id" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberSecurityLogMutation) OldServerVersion

func (m *MemberSecurityLogMutation) OldServerVersion(ctx context.Context) (v *string, err error)

OldServerVersion returns the old "server_version" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberSecurityLogMutation) OldUID

func (m *MemberSecurityLogMutation) OldUID(ctx context.Context) (v string, err error)

OldUID returns the old "uid" field's value of the MemberSecurityLog entity. If the MemberSecurityLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberSecurityLogMutation) Op

func (m *MemberSecurityLogMutation) Op() Op

Op returns the operation name.

func (*MemberSecurityLogMutation) Remark

func (m *MemberSecurityLogMutation) Remark() (r string, exists bool)

Remark returns the value of the "remark" field in the mutation.

func (*MemberSecurityLogMutation) RemarkCleared

func (m *MemberSecurityLogMutation) RemarkCleared() bool

RemarkCleared returns if the "remark" field was cleared in this mutation.

func (*MemberSecurityLogMutation) RemovedEdges

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

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

func (*MemberSecurityLogMutation) RemovedIDs

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

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*MemberSecurityLogMutation) RequestID

func (m *MemberSecurityLogMutation) RequestID() (r string, exists bool)

RequestID returns the value of the "request_id" field in the mutation.

func (*MemberSecurityLogMutation) RequestIDCleared

func (m *MemberSecurityLogMutation) RequestIDCleared() bool

RequestIDCleared returns if the "request_id" field was cleared in this mutation.

func (*MemberSecurityLogMutation) ResetAction

func (m *MemberSecurityLogMutation) ResetAction()

ResetAction resets all changes to the "action" field.

func (*MemberSecurityLogMutation) ResetCreateTime

func (m *MemberSecurityLogMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*MemberSecurityLogMutation) ResetDescription

func (m *MemberSecurityLogMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*MemberSecurityLogMutation) ResetEdge

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

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

func (*MemberSecurityLogMutation) ResetField

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

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

func (*MemberSecurityLogMutation) ResetIP

func (m *MemberSecurityLogMutation) ResetIP()

ResetIP resets all changes to the "ip" field.

func (*MemberSecurityLogMutation) ResetRemark

func (m *MemberSecurityLogMutation) ResetRemark()

ResetRemark resets all changes to the "remark" field.

func (*MemberSecurityLogMutation) ResetRequestID

func (m *MemberSecurityLogMutation) ResetRequestID()

ResetRequestID resets all changes to the "request_id" field.

func (*MemberSecurityLogMutation) ResetServerVersion

func (m *MemberSecurityLogMutation) ResetServerVersion()

ResetServerVersion resets all changes to the "server_version" field.

func (*MemberSecurityLogMutation) ResetUID

func (m *MemberSecurityLogMutation) ResetUID()

ResetUID resets all changes to the "uid" field.

func (*MemberSecurityLogMutation) ServerVersion

func (m *MemberSecurityLogMutation) ServerVersion() (r string, exists bool)

ServerVersion returns the value of the "server_version" field in the mutation.

func (*MemberSecurityLogMutation) ServerVersionCleared

func (m *MemberSecurityLogMutation) ServerVersionCleared() bool

ServerVersionCleared returns if the "server_version" field was cleared in this mutation.

func (*MemberSecurityLogMutation) SetAction

SetAction sets the "action" field.

func (*MemberSecurityLogMutation) SetCreateTime

func (m *MemberSecurityLogMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*MemberSecurityLogMutation) SetDescription

func (m *MemberSecurityLogMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*MemberSecurityLogMutation) SetField

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

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MemberSecurityLogMutation) SetID

func (m *MemberSecurityLogMutation) SetID(id int)

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

func (*MemberSecurityLogMutation) SetIP

func (m *MemberSecurityLogMutation) SetIP(s string)

SetIP sets the "ip" field.

func (*MemberSecurityLogMutation) SetRemark

func (m *MemberSecurityLogMutation) SetRemark(s string)

SetRemark sets the "remark" field.

func (*MemberSecurityLogMutation) SetRequestID

func (m *MemberSecurityLogMutation) SetRequestID(s string)

SetRequestID sets the "request_id" field.

func (*MemberSecurityLogMutation) SetServerVersion

func (m *MemberSecurityLogMutation) SetServerVersion(s string)

SetServerVersion sets the "server_version" field.

func (*MemberSecurityLogMutation) SetUID

func (m *MemberSecurityLogMutation) SetUID(s string)

SetUID sets the "uid" field.

func (MemberSecurityLogMutation) Tx

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

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

func (*MemberSecurityLogMutation) Type

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

func (*MemberSecurityLogMutation) UID

func (m *MemberSecurityLogMutation) UID() (r string, exists bool)

UID returns the value of the "uid" field in the mutation.

func (*MemberSecurityLogMutation) Where

Where appends a list predicates to the MemberSecurityLogMutation builder.

type MemberSecurityLogQuery

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

MemberSecurityLogQuery is the builder for querying MemberSecurityLog entities.

func (*MemberSecurityLogQuery) All

All executes the query and returns a list of MemberSecurityLogs.

func (*MemberSecurityLogQuery) AllX

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

func (*MemberSecurityLogQuery) Clone

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

func (*MemberSecurityLogQuery) Count

func (mslq *MemberSecurityLogQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MemberSecurityLogQuery) CountX

func (mslq *MemberSecurityLogQuery) CountX(ctx context.Context) int

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

func (*MemberSecurityLogQuery) Exist

func (mslq *MemberSecurityLogQuery) Exist(ctx context.Context) (bool, error)

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

func (*MemberSecurityLogQuery) ExistX

func (mslq *MemberSecurityLogQuery) ExistX(ctx context.Context) bool

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

func (*MemberSecurityLogQuery) First

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

func (*MemberSecurityLogQuery) FirstID

func (mslq *MemberSecurityLogQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*MemberSecurityLogQuery) FirstIDX

func (mslq *MemberSecurityLogQuery) FirstIDX(ctx context.Context) int

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

func (*MemberSecurityLogQuery) FirstX

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

func (*MemberSecurityLogQuery) GroupBy

func (mslq *MemberSecurityLogQuery) GroupBy(field string, fields ...string) *MemberSecurityLogGroupBy

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

Example:

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

client.MemberSecurityLog.Query().
	GroupBy(membersecuritylog.FieldUID).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*MemberSecurityLogQuery) IDs

func (mslq *MemberSecurityLogQuery) IDs(ctx context.Context) ([]int, error)

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

func (*MemberSecurityLogQuery) IDsX

func (mslq *MemberSecurityLogQuery) IDsX(ctx context.Context) []int

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

func (*MemberSecurityLogQuery) Limit

Limit adds a limit step to the query.

func (*MemberSecurityLogQuery) Offset

func (mslq *MemberSecurityLogQuery) Offset(offset int) *MemberSecurityLogQuery

Offset adds an offset step to the query.

func (*MemberSecurityLogQuery) Only

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

func (*MemberSecurityLogQuery) OnlyID

func (mslq *MemberSecurityLogQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*MemberSecurityLogQuery) OnlyIDX

func (mslq *MemberSecurityLogQuery) OnlyIDX(ctx context.Context) int

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

func (*MemberSecurityLogQuery) OnlyX

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

func (*MemberSecurityLogQuery) Order

Order adds an order step to the query.

func (*MemberSecurityLogQuery) Select

func (mslq *MemberSecurityLogQuery) Select(fields ...string) *MemberSecurityLogSelect

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

Example:

var v []struct {
	UID string `json:"uid,omitempty"`
}

client.MemberSecurityLog.Query().
	Select(membersecuritylog.FieldUID).
	Scan(ctx, &v)

func (*MemberSecurityLogQuery) Unique

func (mslq *MemberSecurityLogQuery) Unique(unique bool) *MemberSecurityLogQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*MemberSecurityLogQuery) Where

Where adds a new predicate for the MemberSecurityLogQuery builder.

type MemberSecurityLogSelect

type MemberSecurityLogSelect struct {
	*MemberSecurityLogQuery
	// contains filtered or unexported fields
}

MemberSecurityLogSelect is the builder for selecting fields of MemberSecurityLog entities.

func (*MemberSecurityLogSelect) Bool

func (msls *MemberSecurityLogSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*MemberSecurityLogSelect) BoolX

func (msls *MemberSecurityLogSelect) BoolX(ctx context.Context) bool

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

func (*MemberSecurityLogSelect) Bools

func (msls *MemberSecurityLogSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*MemberSecurityLogSelect) BoolsX

func (msls *MemberSecurityLogSelect) BoolsX(ctx context.Context) []bool

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

func (*MemberSecurityLogSelect) Float64

func (msls *MemberSecurityLogSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*MemberSecurityLogSelect) Float64X

func (msls *MemberSecurityLogSelect) Float64X(ctx context.Context) float64

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

func (*MemberSecurityLogSelect) Float64s

func (msls *MemberSecurityLogSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*MemberSecurityLogSelect) Float64sX

func (msls *MemberSecurityLogSelect) Float64sX(ctx context.Context) []float64

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

func (*MemberSecurityLogSelect) Int

func (msls *MemberSecurityLogSelect) Int(ctx context.Context) (_ int, err error)

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

func (*MemberSecurityLogSelect) IntX

func (msls *MemberSecurityLogSelect) IntX(ctx context.Context) int

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

func (*MemberSecurityLogSelect) Ints

func (msls *MemberSecurityLogSelect) Ints(ctx context.Context) ([]int, error)

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

func (*MemberSecurityLogSelect) IntsX

func (msls *MemberSecurityLogSelect) IntsX(ctx context.Context) []int

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

func (*MemberSecurityLogSelect) Scan

func (msls *MemberSecurityLogSelect) Scan(ctx context.Context, v interface{}) error

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

func (*MemberSecurityLogSelect) ScanX

func (msls *MemberSecurityLogSelect) ScanX(ctx context.Context, v interface{})

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

func (*MemberSecurityLogSelect) String

func (msls *MemberSecurityLogSelect) String(ctx context.Context) (_ string, err error)

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

func (*MemberSecurityLogSelect) StringX

func (msls *MemberSecurityLogSelect) StringX(ctx context.Context) string

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

func (*MemberSecurityLogSelect) Strings

func (msls *MemberSecurityLogSelect) Strings(ctx context.Context) ([]string, error)

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

func (*MemberSecurityLogSelect) StringsX

func (msls *MemberSecurityLogSelect) StringsX(ctx context.Context) []string

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

type MemberSecurityLogUpdate

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

MemberSecurityLogUpdate is the builder for updating MemberSecurityLog entities.

func (*MemberSecurityLogUpdate) ClearDescription

func (mslu *MemberSecurityLogUpdate) ClearDescription() *MemberSecurityLogUpdate

ClearDescription clears the value of the "description" field.

func (*MemberSecurityLogUpdate) ClearIP

ClearIP clears the value of the "ip" field.

func (*MemberSecurityLogUpdate) ClearRemark

func (mslu *MemberSecurityLogUpdate) ClearRemark() *MemberSecurityLogUpdate

ClearRemark clears the value of the "remark" field.

func (*MemberSecurityLogUpdate) ClearRequestID

func (mslu *MemberSecurityLogUpdate) ClearRequestID() *MemberSecurityLogUpdate

ClearRequestID clears the value of the "request_id" field.

func (*MemberSecurityLogUpdate) ClearServerVersion

func (mslu *MemberSecurityLogUpdate) ClearServerVersion() *MemberSecurityLogUpdate

ClearServerVersion clears the value of the "server_version" field.

func (*MemberSecurityLogUpdate) Exec

func (mslu *MemberSecurityLogUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberSecurityLogUpdate) ExecX

func (mslu *MemberSecurityLogUpdate) ExecX(ctx context.Context)

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

func (*MemberSecurityLogUpdate) Mutation

Mutation returns the MemberSecurityLogMutation object of the builder.

func (*MemberSecurityLogUpdate) Save

func (mslu *MemberSecurityLogUpdate) Save(ctx context.Context) (int, error)

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

func (*MemberSecurityLogUpdate) SaveX

func (mslu *MemberSecurityLogUpdate) SaveX(ctx context.Context) int

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

func (*MemberSecurityLogUpdate) SetAction

SetAction sets the "action" field.

func (*MemberSecurityLogUpdate) SetDescription

func (mslu *MemberSecurityLogUpdate) SetDescription(s string) *MemberSecurityLogUpdate

SetDescription sets the "description" field.

func (*MemberSecurityLogUpdate) SetIP

SetIP sets the "ip" field.

func (*MemberSecurityLogUpdate) SetNillableAction

SetNillableAction sets the "action" field if the given value is not nil.

func (*MemberSecurityLogUpdate) SetNillableDescription

func (mslu *MemberSecurityLogUpdate) SetNillableDescription(s *string) *MemberSecurityLogUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*MemberSecurityLogUpdate) SetNillableIP

func (mslu *MemberSecurityLogUpdate) SetNillableIP(s *string) *MemberSecurityLogUpdate

SetNillableIP sets the "ip" field if the given value is not nil.

func (*MemberSecurityLogUpdate) SetNillableRemark

func (mslu *MemberSecurityLogUpdate) SetNillableRemark(s *string) *MemberSecurityLogUpdate

SetNillableRemark sets the "remark" field if the given value is not nil.

func (*MemberSecurityLogUpdate) SetNillableRequestID

func (mslu *MemberSecurityLogUpdate) SetNillableRequestID(s *string) *MemberSecurityLogUpdate

SetNillableRequestID sets the "request_id" field if the given value is not nil.

func (*MemberSecurityLogUpdate) SetNillableServerVersion

func (mslu *MemberSecurityLogUpdate) SetNillableServerVersion(s *string) *MemberSecurityLogUpdate

SetNillableServerVersion sets the "server_version" field if the given value is not nil.

func (*MemberSecurityLogUpdate) SetRemark

SetRemark sets the "remark" field.

func (*MemberSecurityLogUpdate) SetRequestID

SetRequestID sets the "request_id" field.

func (*MemberSecurityLogUpdate) SetServerVersion

func (mslu *MemberSecurityLogUpdate) SetServerVersion(s string) *MemberSecurityLogUpdate

SetServerVersion sets the "server_version" field.

func (*MemberSecurityLogUpdate) SetUID

SetUID sets the "uid" field.

func (*MemberSecurityLogUpdate) Where

Where appends a list predicates to the MemberSecurityLogUpdate builder.

type MemberSecurityLogUpdateOne

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

MemberSecurityLogUpdateOne is the builder for updating a single MemberSecurityLog entity.

func (*MemberSecurityLogUpdateOne) ClearDescription

func (msluo *MemberSecurityLogUpdateOne) ClearDescription() *MemberSecurityLogUpdateOne

ClearDescription clears the value of the "description" field.

func (*MemberSecurityLogUpdateOne) ClearIP

ClearIP clears the value of the "ip" field.

func (*MemberSecurityLogUpdateOne) ClearRemark

ClearRemark clears the value of the "remark" field.

func (*MemberSecurityLogUpdateOne) ClearRequestID

func (msluo *MemberSecurityLogUpdateOne) ClearRequestID() *MemberSecurityLogUpdateOne

ClearRequestID clears the value of the "request_id" field.

func (*MemberSecurityLogUpdateOne) ClearServerVersion

func (msluo *MemberSecurityLogUpdateOne) ClearServerVersion() *MemberSecurityLogUpdateOne

ClearServerVersion clears the value of the "server_version" field.

func (*MemberSecurityLogUpdateOne) Exec

Exec executes the query on the entity.

func (*MemberSecurityLogUpdateOne) ExecX

func (msluo *MemberSecurityLogUpdateOne) ExecX(ctx context.Context)

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

func (*MemberSecurityLogUpdateOne) Mutation

Mutation returns the MemberSecurityLogMutation object of the builder.

func (*MemberSecurityLogUpdateOne) Save

Save executes the query and returns the updated MemberSecurityLog entity.

func (*MemberSecurityLogUpdateOne) SaveX

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

func (*MemberSecurityLogUpdateOne) Select

func (msluo *MemberSecurityLogUpdateOne) Select(field string, fields ...string) *MemberSecurityLogUpdateOne

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

func (*MemberSecurityLogUpdateOne) SetAction

SetAction sets the "action" field.

func (*MemberSecurityLogUpdateOne) SetDescription

SetDescription sets the "description" field.

func (*MemberSecurityLogUpdateOne) SetIP

SetIP sets the "ip" field.

func (*MemberSecurityLogUpdateOne) SetNillableAction

SetNillableAction sets the "action" field if the given value is not nil.

func (*MemberSecurityLogUpdateOne) SetNillableDescription

func (msluo *MemberSecurityLogUpdateOne) SetNillableDescription(s *string) *MemberSecurityLogUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*MemberSecurityLogUpdateOne) SetNillableIP

SetNillableIP sets the "ip" field if the given value is not nil.

func (*MemberSecurityLogUpdateOne) SetNillableRemark

func (msluo *MemberSecurityLogUpdateOne) SetNillableRemark(s *string) *MemberSecurityLogUpdateOne

SetNillableRemark sets the "remark" field if the given value is not nil.

func (*MemberSecurityLogUpdateOne) SetNillableRequestID

func (msluo *MemberSecurityLogUpdateOne) SetNillableRequestID(s *string) *MemberSecurityLogUpdateOne

SetNillableRequestID sets the "request_id" field if the given value is not nil.

func (*MemberSecurityLogUpdateOne) SetNillableServerVersion

func (msluo *MemberSecurityLogUpdateOne) SetNillableServerVersion(s *string) *MemberSecurityLogUpdateOne

SetNillableServerVersion sets the "server_version" field if the given value is not nil.

func (*MemberSecurityLogUpdateOne) SetRemark

SetRemark sets the "remark" field.

func (*MemberSecurityLogUpdateOne) SetRequestID

SetRequestID sets the "request_id" field.

func (*MemberSecurityLogUpdateOne) SetServerVersion

func (msluo *MemberSecurityLogUpdateOne) SetServerVersion(s string) *MemberSecurityLogUpdateOne

SetServerVersion sets the "server_version" field.

func (*MemberSecurityLogUpdateOne) SetUID

SetUID sets the "uid" field.

type MemberSecurityLogs

type MemberSecurityLogs []*MemberSecurityLog

MemberSecurityLogs is a parsable slice of MemberSecurityLog.

type MemberSelect

type MemberSelect struct {
	*MemberQuery
	// contains filtered or unexported fields
}

MemberSelect is the builder for selecting fields of Member entities.

func (*MemberSelect) Bool

func (ms *MemberSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*MemberSelect) BoolX

func (ms *MemberSelect) BoolX(ctx context.Context) bool

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

func (*MemberSelect) Bools

func (ms *MemberSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*MemberSelect) BoolsX

func (ms *MemberSelect) BoolsX(ctx context.Context) []bool

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

func (*MemberSelect) Float64

func (ms *MemberSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*MemberSelect) Float64X

func (ms *MemberSelect) Float64X(ctx context.Context) float64

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

func (*MemberSelect) Float64s

func (ms *MemberSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*MemberSelect) Float64sX

func (ms *MemberSelect) Float64sX(ctx context.Context) []float64

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

func (*MemberSelect) Int

func (ms *MemberSelect) Int(ctx context.Context) (_ int, err error)

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

func (*MemberSelect) IntX

func (ms *MemberSelect) IntX(ctx context.Context) int

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

func (*MemberSelect) Ints

func (ms *MemberSelect) Ints(ctx context.Context) ([]int, error)

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

func (*MemberSelect) IntsX

func (ms *MemberSelect) IntsX(ctx context.Context) []int

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

func (*MemberSelect) Scan

func (ms *MemberSelect) Scan(ctx context.Context, v interface{}) error

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

func (*MemberSelect) ScanX

func (ms *MemberSelect) ScanX(ctx context.Context, v interface{})

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

func (*MemberSelect) String

func (ms *MemberSelect) String(ctx context.Context) (_ string, err error)

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

func (*MemberSelect) StringX

func (ms *MemberSelect) StringX(ctx context.Context) string

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

func (*MemberSelect) Strings

func (ms *MemberSelect) Strings(ctx context.Context) ([]string, error)

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

func (*MemberSelect) StringsX

func (ms *MemberSelect) StringsX(ctx context.Context) []string

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

type MemberUpdate

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

MemberUpdate is the builder for updating Member entities.

func (*MemberUpdate) ClearDeleteTime

func (mu *MemberUpdate) ClearDeleteTime() *MemberUpdate

ClearDeleteTime clears the value of the "delete_time" field.

func (*MemberUpdate) ClearEmail

func (mu *MemberUpdate) ClearEmail() *MemberUpdate

ClearEmail clears the value of the "email" field.

func (*MemberUpdate) ClearLastPwdAuth

func (mu *MemberUpdate) ClearLastPwdAuth() *MemberUpdate

ClearLastPwdAuth clears the value of the "last_pwd_auth" field.

func (*MemberUpdate) ClearPhone

func (mu *MemberUpdate) ClearPhone() *MemberUpdate

ClearPhone clears the value of the "phone" field.

func (*MemberUpdate) ClearStatus

func (mu *MemberUpdate) ClearStatus() *MemberUpdate

ClearStatus clears the value of the "status" field.

func (*MemberUpdate) Exec

func (mu *MemberUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberUpdate) ExecX

func (mu *MemberUpdate) ExecX(ctx context.Context)

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

func (*MemberUpdate) Mutation

func (mu *MemberUpdate) Mutation() *MemberMutation

Mutation returns the MemberMutation object of the builder.

func (*MemberUpdate) Save

func (mu *MemberUpdate) Save(ctx context.Context) (int, error)

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

func (*MemberUpdate) SaveX

func (mu *MemberUpdate) SaveX(ctx context.Context) int

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

func (*MemberUpdate) SetDeleteTime

func (mu *MemberUpdate) SetDeleteTime(t time.Time) *MemberUpdate

SetDeleteTime sets the "delete_time" field.

func (*MemberUpdate) SetEmail

func (mu *MemberUpdate) SetEmail(s string) *MemberUpdate

SetEmail sets the "email" field.

func (*MemberUpdate) SetLastPwdAuth

func (mu *MemberUpdate) SetLastPwdAuth(t time.Time) *MemberUpdate

SetLastPwdAuth sets the "last_pwd_auth" field.

func (*MemberUpdate) SetNickname

func (mu *MemberUpdate) SetNickname(s string) *MemberUpdate

SetNickname sets the "nickname" field.

func (*MemberUpdate) SetNillableDeleteTime

func (mu *MemberUpdate) SetNillableDeleteTime(t *time.Time) *MemberUpdate

SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.

func (*MemberUpdate) SetNillableEmail

func (mu *MemberUpdate) SetNillableEmail(s *string) *MemberUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*MemberUpdate) SetNillableLastPwdAuth

func (mu *MemberUpdate) SetNillableLastPwdAuth(t *time.Time) *MemberUpdate

SetNillableLastPwdAuth sets the "last_pwd_auth" field if the given value is not nil.

func (*MemberUpdate) SetNillablePhone

func (mu *MemberUpdate) SetNillablePhone(s *string) *MemberUpdate

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

func (*MemberUpdate) SetNillableStatus

func (mu *MemberUpdate) SetNillableStatus(m *member.Status) *MemberUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MemberUpdate) SetPassword

func (mu *MemberUpdate) SetPassword(s string) *MemberUpdate

SetPassword sets the "password" field.

func (*MemberUpdate) SetPhone

func (mu *MemberUpdate) SetPhone(s string) *MemberUpdate

SetPhone sets the "phone" field.

func (*MemberUpdate) SetSignature

func (mu *MemberUpdate) SetSignature(s string) *MemberUpdate

SetSignature sets the "signature" field.

func (*MemberUpdate) SetStatus

func (mu *MemberUpdate) SetStatus(m member.Status) *MemberUpdate

SetStatus sets the "status" field.

func (*MemberUpdate) SetUpdateTime

func (mu *MemberUpdate) SetUpdateTime(t time.Time) *MemberUpdate

SetUpdateTime sets the "update_time" field.

func (*MemberUpdate) Where

func (mu *MemberUpdate) Where(ps ...predicate.Member) *MemberUpdate

Where appends a list predicates to the MemberUpdate builder.

type MemberUpdateOne

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

MemberUpdateOne is the builder for updating a single Member entity.

func (*MemberUpdateOne) ClearDeleteTime

func (muo *MemberUpdateOne) ClearDeleteTime() *MemberUpdateOne

ClearDeleteTime clears the value of the "delete_time" field.

func (*MemberUpdateOne) ClearEmail

func (muo *MemberUpdateOne) ClearEmail() *MemberUpdateOne

ClearEmail clears the value of the "email" field.

func (*MemberUpdateOne) ClearLastPwdAuth

func (muo *MemberUpdateOne) ClearLastPwdAuth() *MemberUpdateOne

ClearLastPwdAuth clears the value of the "last_pwd_auth" field.

func (*MemberUpdateOne) ClearPhone

func (muo *MemberUpdateOne) ClearPhone() *MemberUpdateOne

ClearPhone clears the value of the "phone" field.

func (*MemberUpdateOne) ClearStatus

func (muo *MemberUpdateOne) ClearStatus() *MemberUpdateOne

ClearStatus clears the value of the "status" field.

func (*MemberUpdateOne) Exec

func (muo *MemberUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MemberUpdateOne) ExecX

func (muo *MemberUpdateOne) ExecX(ctx context.Context)

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

func (*MemberUpdateOne) Mutation

func (muo *MemberUpdateOne) Mutation() *MemberMutation

Mutation returns the MemberMutation object of the builder.

func (*MemberUpdateOne) Save

func (muo *MemberUpdateOne) Save(ctx context.Context) (*Member, error)

Save executes the query and returns the updated Member entity.

func (*MemberUpdateOne) SaveX

func (muo *MemberUpdateOne) SaveX(ctx context.Context) *Member

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

func (*MemberUpdateOne) Select

func (muo *MemberUpdateOne) Select(field string, fields ...string) *MemberUpdateOne

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

func (*MemberUpdateOne) SetDeleteTime

func (muo *MemberUpdateOne) SetDeleteTime(t time.Time) *MemberUpdateOne

SetDeleteTime sets the "delete_time" field.

func (*MemberUpdateOne) SetEmail

func (muo *MemberUpdateOne) SetEmail(s string) *MemberUpdateOne

SetEmail sets the "email" field.

func (*MemberUpdateOne) SetLastPwdAuth

func (muo *MemberUpdateOne) SetLastPwdAuth(t time.Time) *MemberUpdateOne

SetLastPwdAuth sets the "last_pwd_auth" field.

func (*MemberUpdateOne) SetNickname

func (muo *MemberUpdateOne) SetNickname(s string) *MemberUpdateOne

SetNickname sets the "nickname" field.

func (*MemberUpdateOne) SetNillableDeleteTime

func (muo *MemberUpdateOne) SetNillableDeleteTime(t *time.Time) *MemberUpdateOne

SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.

func (*MemberUpdateOne) SetNillableEmail

func (muo *MemberUpdateOne) SetNillableEmail(s *string) *MemberUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*MemberUpdateOne) SetNillableLastPwdAuth

func (muo *MemberUpdateOne) SetNillableLastPwdAuth(t *time.Time) *MemberUpdateOne

SetNillableLastPwdAuth sets the "last_pwd_auth" field if the given value is not nil.

func (*MemberUpdateOne) SetNillablePhone

func (muo *MemberUpdateOne) SetNillablePhone(s *string) *MemberUpdateOne

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

func (*MemberUpdateOne) SetNillableStatus

func (muo *MemberUpdateOne) SetNillableStatus(m *member.Status) *MemberUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MemberUpdateOne) SetPassword

func (muo *MemberUpdateOne) SetPassword(s string) *MemberUpdateOne

SetPassword sets the "password" field.

func (*MemberUpdateOne) SetPhone

func (muo *MemberUpdateOne) SetPhone(s string) *MemberUpdateOne

SetPhone sets the "phone" field.

func (*MemberUpdateOne) SetSignature

func (muo *MemberUpdateOne) SetSignature(s string) *MemberUpdateOne

SetSignature sets the "signature" field.

func (*MemberUpdateOne) SetStatus

func (muo *MemberUpdateOne) SetStatus(m member.Status) *MemberUpdateOne

SetStatus sets the "status" field.

func (*MemberUpdateOne) SetUpdateTime

func (muo *MemberUpdateOne) SetUpdateTime(t time.Time) *MemberUpdateOne

SetUpdateTime sets the "update_time" field.

type Members

type Members []*Member

Members is a parsable slice of Member.

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Policy

type Policy = ent.Policy

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

type Query

type Query = ent.Query

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

type RollbackFunc

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

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

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

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(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 SysSetting

type SysSetting struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Value holds the value of the "value" field.
	Value string `json:"value,omitempty"`
	// Typeof holds the value of the "typeof" field.
	Typeof syssetting.Typeof `json:"typeof,omitempty"`
	// contains filtered or unexported fields
}

SysSetting is the model entity for the SysSetting schema.

func (*SysSetting) String

func (ss *SysSetting) String() string

String implements the fmt.Stringer.

func (*SysSetting) Unwrap

func (ss *SysSetting) Unwrap() *SysSetting

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

func (*SysSetting) Update

func (ss *SysSetting) Update() *SysSettingUpdateOne

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

type SysSettingClient

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

SysSettingClient is a client for the SysSetting schema.

func NewSysSettingClient

func NewSysSettingClient(c config) *SysSettingClient

NewSysSettingClient returns a client for the SysSetting from the given config.

func (*SysSettingClient) Create

func (c *SysSettingClient) Create() *SysSettingCreate

Create returns a create builder for SysSetting.

func (*SysSettingClient) CreateBulk

func (c *SysSettingClient) CreateBulk(builders ...*SysSettingCreate) *SysSettingCreateBulk

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

func (*SysSettingClient) Delete

func (c *SysSettingClient) Delete() *SysSettingDelete

Delete returns a delete builder for SysSetting.

func (*SysSettingClient) DeleteOne

func (c *SysSettingClient) DeleteOne(ss *SysSetting) *SysSettingDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysSettingClient) DeleteOneID

func (c *SysSettingClient) DeleteOneID(id int) *SysSettingDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysSettingClient) Get

func (c *SysSettingClient) Get(ctx context.Context, id int) (*SysSetting, error)

Get returns a SysSetting entity by its id.

func (*SysSettingClient) GetX

func (c *SysSettingClient) GetX(ctx context.Context, id int) *SysSetting

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

func (*SysSettingClient) Hooks

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

Hooks returns the client hooks.

func (*SysSettingClient) Query

func (c *SysSettingClient) Query() *SysSettingQuery

Query returns a query builder for SysSetting.

func (*SysSettingClient) Update

func (c *SysSettingClient) Update() *SysSettingUpdate

Update returns an update builder for SysSetting.

func (*SysSettingClient) UpdateOne

func (c *SysSettingClient) UpdateOne(ss *SysSetting) *SysSettingUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysSettingClient) UpdateOneID

func (c *SysSettingClient) UpdateOneID(id int) *SysSettingUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysSettingClient) Use

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

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

type SysSettingCreate

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

SysSettingCreate is the builder for creating a SysSetting entity.

func (*SysSettingCreate) Exec

func (ssc *SysSettingCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysSettingCreate) ExecX

func (ssc *SysSettingCreate) ExecX(ctx context.Context)

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

func (*SysSettingCreate) Mutation

func (ssc *SysSettingCreate) Mutation() *SysSettingMutation

Mutation returns the SysSettingMutation object of the builder.

func (*SysSettingCreate) Save

func (ssc *SysSettingCreate) Save(ctx context.Context) (*SysSetting, error)

Save creates the SysSetting in the database.

func (*SysSettingCreate) SaveX

func (ssc *SysSettingCreate) SaveX(ctx context.Context) *SysSetting

SaveX calls Save and panics if Save returns an error.

func (*SysSettingCreate) SetKey

func (ssc *SysSettingCreate) SetKey(s string) *SysSettingCreate

SetKey sets the "key" field.

func (*SysSettingCreate) SetNillableTypeof

func (ssc *SysSettingCreate) SetNillableTypeof(s *syssetting.Typeof) *SysSettingCreate

SetNillableTypeof sets the "typeof" field if the given value is not nil.

func (*SysSettingCreate) SetTypeof

SetTypeof sets the "typeof" field.

func (*SysSettingCreate) SetValue

func (ssc *SysSettingCreate) SetValue(s string) *SysSettingCreate

SetValue sets the "value" field.

type SysSettingCreateBulk

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

SysSettingCreateBulk is the builder for creating many SysSetting entities in bulk.

func (*SysSettingCreateBulk) Exec

func (sscb *SysSettingCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SysSettingCreateBulk) ExecX

func (sscb *SysSettingCreateBulk) ExecX(ctx context.Context)

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

func (*SysSettingCreateBulk) Save

func (sscb *SysSettingCreateBulk) Save(ctx context.Context) ([]*SysSetting, error)

Save creates the SysSetting entities in the database.

func (*SysSettingCreateBulk) SaveX

func (sscb *SysSettingCreateBulk) SaveX(ctx context.Context) []*SysSetting

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

type SysSettingDelete

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

SysSettingDelete is the builder for deleting a SysSetting entity.

func (*SysSettingDelete) Exec

func (ssd *SysSettingDelete) Exec(ctx context.Context) (int, error)

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

func (*SysSettingDelete) ExecX

func (ssd *SysSettingDelete) ExecX(ctx context.Context) int

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

func (*SysSettingDelete) Where

Where appends a list predicates to the SysSettingDelete builder.

type SysSettingDeleteOne

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

SysSettingDeleteOne is the builder for deleting a single SysSetting entity.

func (*SysSettingDeleteOne) Exec

func (ssdo *SysSettingDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysSettingDeleteOne) ExecX

func (ssdo *SysSettingDeleteOne) ExecX(ctx context.Context)

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

type SysSettingGroupBy

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

SysSettingGroupBy is the group-by builder for SysSetting entities.

func (*SysSettingGroupBy) Aggregate

func (ssgb *SysSettingGroupBy) Aggregate(fns ...AggregateFunc) *SysSettingGroupBy

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

func (*SysSettingGroupBy) Bool

func (ssgb *SysSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*SysSettingGroupBy) BoolX

func (ssgb *SysSettingGroupBy) BoolX(ctx context.Context) bool

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

func (*SysSettingGroupBy) Bools

func (ssgb *SysSettingGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*SysSettingGroupBy) BoolsX

func (ssgb *SysSettingGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SysSettingGroupBy) Float64

func (ssgb *SysSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*SysSettingGroupBy) Float64X

func (ssgb *SysSettingGroupBy) Float64X(ctx context.Context) float64

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

func (*SysSettingGroupBy) Float64s

func (ssgb *SysSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*SysSettingGroupBy) Float64sX

func (ssgb *SysSettingGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SysSettingGroupBy) Int

func (ssgb *SysSettingGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*SysSettingGroupBy) IntX

func (ssgb *SysSettingGroupBy) IntX(ctx context.Context) int

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

func (*SysSettingGroupBy) Ints

func (ssgb *SysSettingGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*SysSettingGroupBy) IntsX

func (ssgb *SysSettingGroupBy) IntsX(ctx context.Context) []int

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

func (*SysSettingGroupBy) Scan

func (ssgb *SysSettingGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*SysSettingGroupBy) ScanX

func (ssgb *SysSettingGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SysSettingGroupBy) String

func (ssgb *SysSettingGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*SysSettingGroupBy) StringX

func (ssgb *SysSettingGroupBy) StringX(ctx context.Context) string

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

func (*SysSettingGroupBy) Strings

func (ssgb *SysSettingGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*SysSettingGroupBy) StringsX

func (ssgb *SysSettingGroupBy) StringsX(ctx context.Context) []string

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

type SysSettingMutation

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

SysSettingMutation represents an operation that mutates the SysSetting nodes in the graph.

func (*SysSettingMutation) AddField

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

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

func (*SysSettingMutation) AddedEdges

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

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

func (*SysSettingMutation) AddedField

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

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SysSettingMutation) AddedFields

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

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

func (*SysSettingMutation) AddedIDs

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

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

func (*SysSettingMutation) ClearEdge

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

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

func (*SysSettingMutation) ClearField

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

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

func (*SysSettingMutation) ClearedEdges

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

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

func (*SysSettingMutation) ClearedFields

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

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

func (SysSettingMutation) Client

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

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

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

func (*SysSettingMutation) Field

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

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

func (*SysSettingMutation) FieldCleared

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

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

func (*SysSettingMutation) Fields

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

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

func (*SysSettingMutation) ID

func (m *SysSettingMutation) ID() (id int, exists bool)

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

func (*SysSettingMutation) Key

func (m *SysSettingMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*SysSettingMutation) OldField

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

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*SysSettingMutation) OldKey

func (m *SysSettingMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the SysSetting entity. If the SysSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysSettingMutation) OldTypeof

func (m *SysSettingMutation) OldTypeof(ctx context.Context) (v syssetting.Typeof, err error)

OldTypeof returns the old "typeof" field's value of the SysSetting entity. If the SysSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysSettingMutation) OldValue

func (m *SysSettingMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the SysSetting entity. If the SysSetting object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysSettingMutation) Op

func (m *SysSettingMutation) Op() Op

Op returns the operation name.

func (*SysSettingMutation) RemovedEdges

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

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

func (*SysSettingMutation) RemovedIDs

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

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*SysSettingMutation) ResetEdge

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

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

func (*SysSettingMutation) ResetField

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

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

func (*SysSettingMutation) ResetKey

func (m *SysSettingMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*SysSettingMutation) ResetTypeof

func (m *SysSettingMutation) ResetTypeof()

ResetTypeof resets all changes to the "typeof" field.

func (*SysSettingMutation) ResetValue

func (m *SysSettingMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*SysSettingMutation) SetField

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

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SysSettingMutation) SetKey

func (m *SysSettingMutation) SetKey(s string)

SetKey sets the "key" field.

func (*SysSettingMutation) SetTypeof

func (m *SysSettingMutation) SetTypeof(s syssetting.Typeof)

SetTypeof sets the "typeof" field.

func (*SysSettingMutation) SetValue

func (m *SysSettingMutation) SetValue(s string)

SetValue sets the "value" field.

func (SysSettingMutation) Tx

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

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

func (*SysSettingMutation) Type

func (m *SysSettingMutation) Type() string

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

func (*SysSettingMutation) Typeof

func (m *SysSettingMutation) Typeof() (r syssetting.Typeof, exists bool)

Typeof returns the value of the "typeof" field in the mutation.

func (*SysSettingMutation) Value

func (m *SysSettingMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

func (*SysSettingMutation) Where

func (m *SysSettingMutation) Where(ps ...predicate.SysSetting)

Where appends a list predicates to the SysSettingMutation builder.

type SysSettingQuery

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

SysSettingQuery is the builder for querying SysSetting entities.

func (*SysSettingQuery) All

func (ssq *SysSettingQuery) All(ctx context.Context) ([]*SysSetting, error)

All executes the query and returns a list of SysSettings.

func (*SysSettingQuery) AllX

func (ssq *SysSettingQuery) AllX(ctx context.Context) []*SysSetting

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

func (*SysSettingQuery) Clone

func (ssq *SysSettingQuery) Clone() *SysSettingQuery

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

func (*SysSettingQuery) Count

func (ssq *SysSettingQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysSettingQuery) CountX

func (ssq *SysSettingQuery) CountX(ctx context.Context) int

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

func (*SysSettingQuery) Exist

func (ssq *SysSettingQuery) Exist(ctx context.Context) (bool, error)

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

func (*SysSettingQuery) ExistX

func (ssq *SysSettingQuery) ExistX(ctx context.Context) bool

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

func (*SysSettingQuery) First

func (ssq *SysSettingQuery) First(ctx context.Context) (*SysSetting, error)

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

func (*SysSettingQuery) FirstID

func (ssq *SysSettingQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*SysSettingQuery) FirstIDX

func (ssq *SysSettingQuery) FirstIDX(ctx context.Context) int

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

func (*SysSettingQuery) FirstX

func (ssq *SysSettingQuery) FirstX(ctx context.Context) *SysSetting

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

func (*SysSettingQuery) GroupBy

func (ssq *SysSettingQuery) GroupBy(field string, fields ...string) *SysSettingGroupBy

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

Example:

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

client.SysSetting.Query().
	GroupBy(syssetting.FieldKey).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*SysSettingQuery) IDs

func (ssq *SysSettingQuery) IDs(ctx context.Context) ([]int, error)

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

func (*SysSettingQuery) IDsX

func (ssq *SysSettingQuery) IDsX(ctx context.Context) []int

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

func (*SysSettingQuery) Limit

func (ssq *SysSettingQuery) Limit(limit int) *SysSettingQuery

Limit adds a limit step to the query.

func (*SysSettingQuery) Offset

func (ssq *SysSettingQuery) Offset(offset int) *SysSettingQuery

Offset adds an offset step to the query.

func (*SysSettingQuery) Only

func (ssq *SysSettingQuery) Only(ctx context.Context) (*SysSetting, error)

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

func (*SysSettingQuery) OnlyID

func (ssq *SysSettingQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*SysSettingQuery) OnlyIDX

func (ssq *SysSettingQuery) OnlyIDX(ctx context.Context) int

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

func (*SysSettingQuery) OnlyX

func (ssq *SysSettingQuery) OnlyX(ctx context.Context) *SysSetting

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

func (*SysSettingQuery) Order

func (ssq *SysSettingQuery) Order(o ...OrderFunc) *SysSettingQuery

Order adds an order step to the query.

func (*SysSettingQuery) Select

func (ssq *SysSettingQuery) Select(fields ...string) *SysSettingSelect

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

Example:

var v []struct {
	Key string `json:"key,omitempty"`
}

client.SysSetting.Query().
	Select(syssetting.FieldKey).
	Scan(ctx, &v)

func (*SysSettingQuery) Unique

func (ssq *SysSettingQuery) Unique(unique bool) *SysSettingQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SysSettingQuery) Where

Where adds a new predicate for the SysSettingQuery builder.

type SysSettingSelect

type SysSettingSelect struct {
	*SysSettingQuery
	// contains filtered or unexported fields
}

SysSettingSelect is the builder for selecting fields of SysSetting entities.

func (*SysSettingSelect) Bool

func (sss *SysSettingSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*SysSettingSelect) BoolX

func (sss *SysSettingSelect) BoolX(ctx context.Context) bool

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

func (*SysSettingSelect) Bools

func (sss *SysSettingSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*SysSettingSelect) BoolsX

func (sss *SysSettingSelect) BoolsX(ctx context.Context) []bool

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

func (*SysSettingSelect) Float64

func (sss *SysSettingSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*SysSettingSelect) Float64X

func (sss *SysSettingSelect) Float64X(ctx context.Context) float64

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

func (*SysSettingSelect) Float64s

func (sss *SysSettingSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*SysSettingSelect) Float64sX

func (sss *SysSettingSelect) Float64sX(ctx context.Context) []float64

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

func (*SysSettingSelect) Int

func (sss *SysSettingSelect) Int(ctx context.Context) (_ int, err error)

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

func (*SysSettingSelect) IntX

func (sss *SysSettingSelect) IntX(ctx context.Context) int

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

func (*SysSettingSelect) Ints

func (sss *SysSettingSelect) Ints(ctx context.Context) ([]int, error)

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

func (*SysSettingSelect) IntsX

func (sss *SysSettingSelect) IntsX(ctx context.Context) []int

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

func (*SysSettingSelect) Scan

func (sss *SysSettingSelect) Scan(ctx context.Context, v interface{}) error

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

func (*SysSettingSelect) ScanX

func (sss *SysSettingSelect) ScanX(ctx context.Context, v interface{})

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

func (*SysSettingSelect) String

func (sss *SysSettingSelect) String(ctx context.Context) (_ string, err error)

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

func (*SysSettingSelect) StringX

func (sss *SysSettingSelect) StringX(ctx context.Context) string

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

func (*SysSettingSelect) Strings

func (sss *SysSettingSelect) Strings(ctx context.Context) ([]string, error)

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

func (*SysSettingSelect) StringsX

func (sss *SysSettingSelect) StringsX(ctx context.Context) []string

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

type SysSettingUpdate

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

SysSettingUpdate is the builder for updating SysSetting entities.

func (*SysSettingUpdate) Exec

func (ssu *SysSettingUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysSettingUpdate) ExecX

func (ssu *SysSettingUpdate) ExecX(ctx context.Context)

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

func (*SysSettingUpdate) Mutation

func (ssu *SysSettingUpdate) Mutation() *SysSettingMutation

Mutation returns the SysSettingMutation object of the builder.

func (*SysSettingUpdate) Save

func (ssu *SysSettingUpdate) Save(ctx context.Context) (int, error)

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

func (*SysSettingUpdate) SaveX

func (ssu *SysSettingUpdate) SaveX(ctx context.Context) int

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

func (*SysSettingUpdate) SetKey

func (ssu *SysSettingUpdate) SetKey(s string) *SysSettingUpdate

SetKey sets the "key" field.

func (*SysSettingUpdate) SetNillableTypeof

func (ssu *SysSettingUpdate) SetNillableTypeof(s *syssetting.Typeof) *SysSettingUpdate

SetNillableTypeof sets the "typeof" field if the given value is not nil.

func (*SysSettingUpdate) SetTypeof

SetTypeof sets the "typeof" field.

func (*SysSettingUpdate) SetValue

func (ssu *SysSettingUpdate) SetValue(s string) *SysSettingUpdate

SetValue sets the "value" field.

func (*SysSettingUpdate) Where

Where appends a list predicates to the SysSettingUpdate builder.

type SysSettingUpdateOne

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

SysSettingUpdateOne is the builder for updating a single SysSetting entity.

func (*SysSettingUpdateOne) Exec

func (ssuo *SysSettingUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysSettingUpdateOne) ExecX

func (ssuo *SysSettingUpdateOne) ExecX(ctx context.Context)

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

func (*SysSettingUpdateOne) Mutation

func (ssuo *SysSettingUpdateOne) Mutation() *SysSettingMutation

Mutation returns the SysSettingMutation object of the builder.

func (*SysSettingUpdateOne) Save

func (ssuo *SysSettingUpdateOne) Save(ctx context.Context) (*SysSetting, error)

Save executes the query and returns the updated SysSetting entity.

func (*SysSettingUpdateOne) SaveX

func (ssuo *SysSettingUpdateOne) SaveX(ctx context.Context) *SysSetting

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

func (*SysSettingUpdateOne) Select

func (ssuo *SysSettingUpdateOne) Select(field string, fields ...string) *SysSettingUpdateOne

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

func (*SysSettingUpdateOne) SetKey

SetKey sets the "key" field.

func (*SysSettingUpdateOne) SetNillableTypeof

func (ssuo *SysSettingUpdateOne) SetNillableTypeof(s *syssetting.Typeof) *SysSettingUpdateOne

SetNillableTypeof sets the "typeof" field if the given value is not nil.

func (*SysSettingUpdateOne) SetTypeof

SetTypeof sets the "typeof" field.

func (*SysSettingUpdateOne) SetValue

func (ssuo *SysSettingUpdateOne) SetValue(s string) *SysSettingUpdateOne

SetValue sets the "value" field.

type SysSettings

type SysSettings []*SysSetting

SysSettings is a parsable slice of SysSetting.

type Tx

type Tx struct {

	// Member is the client for interacting with the Member builders.
	Member *MemberClient
	// MemberSecurityLog is the client for interacting with the MemberSecurityLog builders.
	MemberSecurityLog *MemberSecurityLogClient
	// SysSetting is the client for interacting with the SysSetting builders.
	SysSetting *SysSettingClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

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

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

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

ValidationError returns when validating a field fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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