model

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 24 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.
	TypeGroup             = "Group"
	TypeMember            = "Member"
	TypeMemberEmail       = "MemberEmail"
	TypeMemberSecurityLog = "MemberSecurityLog"
	TypeMemberSetting     = "MemberSetting"
	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 validaton 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
	// Group is the client for interacting with the Group builders.
	Group *GroupClient
	// Member is the client for interacting with the Member builders.
	Member *MemberClient
	// MemberEmail is the client for interacting with the MemberEmail builders.
	MemberEmail *MemberEmailClient
	// MemberSecurityLog is the client for interacting with the MemberSecurityLog builders.
	MemberSecurityLog *MemberSecurityLogClient
	// MemberSetting is the client for interacting with the MemberSetting builders.
	MemberSetting *MemberSettingClient
	// 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().
	Group.
	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 Group added in v1.0.2

type Group struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Sn holds the value of the "sn" field.
	Sn string `json:"sn,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,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:"-"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GroupQuery when eager-loading is set.
	Edges GroupEdges `json:"edges"`
	// contains filtered or unexported fields
}

Group is the model entity for the Group schema.

func (*Group) QueryMembers added in v1.0.2

func (gr *Group) QueryMembers() *MemberQuery

QueryMembers queries the "members" edge of the Group entity.

func (*Group) String added in v1.0.2

func (gr *Group) String() string

String implements the fmt.Stringer.

func (*Group) Unwrap added in v1.0.2

func (gr *Group) Unwrap() *Group

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

func (gr *Group) Update() *GroupUpdateOne

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

type GroupClient added in v1.0.2

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

GroupClient is a client for the Group schema.

func NewGroupClient added in v1.0.2

func NewGroupClient(c config) *GroupClient

NewGroupClient returns a client for the Group from the given config.

func (*GroupClient) Create added in v1.0.2

func (c *GroupClient) Create() *GroupCreate

Create returns a create builder for Group.

func (*GroupClient) CreateBulk added in v1.0.2

func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk

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

func (*GroupClient) Delete added in v1.0.2

func (c *GroupClient) Delete() *GroupDelete

Delete returns a delete builder for Group.

func (*GroupClient) DeleteOne added in v1.0.2

func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*GroupClient) DeleteOneID added in v1.0.2

func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*GroupClient) Get added in v1.0.2

func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error)

Get returns a Group entity by its id.

func (*GroupClient) GetX added in v1.0.2

func (c *GroupClient) GetX(ctx context.Context, id int) *Group

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

func (*GroupClient) Hooks added in v1.0.2

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

Hooks returns the client hooks.

func (*GroupClient) Query added in v1.0.2

func (c *GroupClient) Query() *GroupQuery

Query returns a query builder for Group.

func (*GroupClient) QueryMembers added in v1.0.2

func (c *GroupClient) QueryMembers(gr *Group) *MemberQuery

QueryMembers queries the members edge of a Group.

func (*GroupClient) Update added in v1.0.2

func (c *GroupClient) Update() *GroupUpdate

Update returns an update builder for Group.

func (*GroupClient) UpdateOne added in v1.0.2

func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GroupClient) UpdateOneID added in v1.0.2

func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GroupClient) Use added in v1.0.2

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

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

type GroupCreate added in v1.0.2

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

GroupCreate is the builder for creating a Group entity.

func (*GroupCreate) AddMemberIDs added in v1.0.2

func (gc *GroupCreate) AddMemberIDs(ids ...int) *GroupCreate

AddMemberIDs adds the "members" edge to the Member entity by IDs.

func (*GroupCreate) AddMembers added in v1.0.2

func (gc *GroupCreate) AddMembers(m ...*Member) *GroupCreate

AddMembers adds the "members" edges to the Member entity.

func (*GroupCreate) Mutation added in v1.0.2

func (gc *GroupCreate) Mutation() *GroupMutation

Mutation returns the GroupMutation object of the builder.

func (*GroupCreate) Save added in v1.0.2

func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)

Save creates the Group in the database.

func (*GroupCreate) SaveX added in v1.0.2

func (gc *GroupCreate) SaveX(ctx context.Context) *Group

SaveX calls Save and panics if Save returns an error.

func (*GroupCreate) SetCreateTime added in v1.0.2

func (gc *GroupCreate) SetCreateTime(t time.Time) *GroupCreate

SetCreateTime sets the "create_time" field.

func (*GroupCreate) SetDeleteTime added in v1.0.2

func (gc *GroupCreate) SetDeleteTime(t time.Time) *GroupCreate

SetDeleteTime sets the "delete_time" field.

func (*GroupCreate) SetID added in v1.0.2

func (gc *GroupCreate) SetID(i int) *GroupCreate

SetID sets the "id" field.

func (*GroupCreate) SetName added in v1.0.2

func (gc *GroupCreate) SetName(s string) *GroupCreate

SetName sets the "name" field.

func (*GroupCreate) SetNillableCreateTime added in v1.0.2

func (gc *GroupCreate) SetNillableCreateTime(t *time.Time) *GroupCreate

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

func (*GroupCreate) SetNillableDeleteTime added in v1.0.2

func (gc *GroupCreate) SetNillableDeleteTime(t *time.Time) *GroupCreate

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

func (*GroupCreate) SetNillableSn added in v1.0.2

func (gc *GroupCreate) SetNillableSn(s *string) *GroupCreate

SetNillableSn sets the "sn" field if the given value is not nil.

func (*GroupCreate) SetNillableUpdateTime added in v1.0.2

func (gc *GroupCreate) SetNillableUpdateTime(t *time.Time) *GroupCreate

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

func (*GroupCreate) SetSn added in v1.0.2

func (gc *GroupCreate) SetSn(s string) *GroupCreate

SetSn sets the "sn" field.

func (*GroupCreate) SetUpdateTime added in v1.0.2

func (gc *GroupCreate) SetUpdateTime(t time.Time) *GroupCreate

SetUpdateTime sets the "update_time" field.

type GroupCreateBulk added in v1.0.2

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

GroupCreateBulk is the builder for creating many Group entities in bulk.

func (*GroupCreateBulk) Save added in v1.0.2

func (gcb *GroupCreateBulk) Save(ctx context.Context) ([]*Group, error)

Save creates the Group entities in the database.

func (*GroupCreateBulk) SaveX added in v1.0.2

func (gcb *GroupCreateBulk) SaveX(ctx context.Context) []*Group

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

type GroupDelete added in v1.0.2

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

GroupDelete is the builder for deleting a Group entity.

func (*GroupDelete) Exec added in v1.0.2

func (gd *GroupDelete) Exec(ctx context.Context) (int, error)

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

func (*GroupDelete) ExecX added in v1.0.2

func (gd *GroupDelete) ExecX(ctx context.Context) int

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

func (*GroupDelete) Where added in v1.0.2

func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete

Where adds a new predicate to the GroupDelete builder.

type GroupDeleteOne added in v1.0.2

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

GroupDeleteOne is the builder for deleting a single Group entity.

func (*GroupDeleteOne) Exec added in v1.0.2

func (gdo *GroupDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GroupDeleteOne) ExecX added in v1.0.2

func (gdo *GroupDeleteOne) ExecX(ctx context.Context)

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

type GroupEdges added in v1.0.2

type GroupEdges struct {
	// Members holds the value of the members edge.
	Members []*Member `json:"members,omitempty"`
	// contains filtered or unexported fields
}

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

func (GroupEdges) MembersOrErr added in v1.0.2

func (e GroupEdges) MembersOrErr() ([]*Member, error)

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

type GroupGroupBy added in v1.0.2

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

GroupGroupBy is the group-by builder for Group entities.

func (*GroupGroupBy) Aggregate added in v1.0.2

func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy

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

func (*GroupGroupBy) Bool added in v1.0.2

func (ggb *GroupGroupBy) 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 (*GroupGroupBy) BoolX added in v1.0.2

func (ggb *GroupGroupBy) BoolX(ctx context.Context) bool

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

func (*GroupGroupBy) Bools added in v1.0.2

func (ggb *GroupGroupBy) 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 (*GroupGroupBy) BoolsX added in v1.0.2

func (ggb *GroupGroupBy) BoolsX(ctx context.Context) []bool

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

func (*GroupGroupBy) Float64 added in v1.0.2

func (ggb *GroupGroupBy) 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 (*GroupGroupBy) Float64X added in v1.0.2

func (ggb *GroupGroupBy) Float64X(ctx context.Context) float64

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

func (*GroupGroupBy) Float64s added in v1.0.2

func (ggb *GroupGroupBy) 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 (*GroupGroupBy) Float64sX added in v1.0.2

func (ggb *GroupGroupBy) Float64sX(ctx context.Context) []float64

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

func (*GroupGroupBy) Int added in v1.0.2

func (ggb *GroupGroupBy) 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 (*GroupGroupBy) IntX added in v1.0.2

func (ggb *GroupGroupBy) IntX(ctx context.Context) int

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

func (*GroupGroupBy) Ints added in v1.0.2

func (ggb *GroupGroupBy) 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 (*GroupGroupBy) IntsX added in v1.0.2

func (ggb *GroupGroupBy) IntsX(ctx context.Context) []int

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

func (*GroupGroupBy) Scan added in v1.0.2

func (ggb *GroupGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*GroupGroupBy) ScanX added in v1.0.2

func (ggb *GroupGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*GroupGroupBy) String added in v1.0.2

func (ggb *GroupGroupBy) 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 (*GroupGroupBy) StringX added in v1.0.2

func (ggb *GroupGroupBy) StringX(ctx context.Context) string

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

func (*GroupGroupBy) Strings added in v1.0.2

func (ggb *GroupGroupBy) 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 (*GroupGroupBy) StringsX added in v1.0.2

func (ggb *GroupGroupBy) StringsX(ctx context.Context) []string

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

type GroupMutation added in v1.0.2

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

GroupMutation represents an operation that mutates the Group nodes in the graph.

func (*GroupMutation) AddField added in v1.0.2

func (m *GroupMutation) 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 (*GroupMutation) AddMemberIDs added in v1.0.2

func (m *GroupMutation) AddMemberIDs(ids ...int)

AddMemberIDs adds the "members" edge to the Member entity by ids.

func (*GroupMutation) AddedEdges added in v1.0.2

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

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

func (*GroupMutation) AddedField added in v1.0.2

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

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

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

func (*GroupMutation) AddedIDs added in v1.0.2

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

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

func (*GroupMutation) ClearDeleteTime added in v1.0.2

func (m *GroupMutation) ClearDeleteTime()

ClearDeleteTime clears the value of the "delete_time" field.

func (*GroupMutation) ClearEdge added in v1.0.2

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

func (m *GroupMutation) 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 (*GroupMutation) ClearMembers added in v1.0.2

func (m *GroupMutation) ClearMembers()

ClearMembers clears the "members" edge to the Member entity.

func (*GroupMutation) ClearedEdges added in v1.0.2

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

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

func (*GroupMutation) ClearedFields added in v1.0.2

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

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

func (GroupMutation) Client added in v1.0.2

func (m GroupMutation) 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 (*GroupMutation) CreateTime added in v1.0.2

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

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

func (*GroupMutation) DeleteTime added in v1.0.2

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

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

func (*GroupMutation) DeleteTimeCleared added in v1.0.2

func (m *GroupMutation) DeleteTimeCleared() bool

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

func (*GroupMutation) EdgeCleared added in v1.0.2

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

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

func (*GroupMutation) Field added in v1.0.2

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

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

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

func (*GroupMutation) Fields added in v1.0.2

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

func (m *GroupMutation) 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.

func (*GroupMutation) MembersCleared added in v1.0.2

func (m *GroupMutation) MembersCleared() bool

MembersCleared reports if the "members" edge to the Member entity was cleared.

func (*GroupMutation) MembersIDs added in v1.0.2

func (m *GroupMutation) MembersIDs() (ids []int)

MembersIDs returns the "members" edge IDs in the mutation.

func (*GroupMutation) Name added in v1.0.2

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

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

func (*GroupMutation) OldCreateTime added in v1.0.2

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

OldCreateTime returns the old "create_time" field's value of the Group entity. If the Group 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 (*GroupMutation) OldDeleteTime added in v1.0.2

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

OldDeleteTime returns the old "delete_time" field's value of the Group entity. If the Group 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 (*GroupMutation) OldField added in v1.0.2

func (m *GroupMutation) 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 (*GroupMutation) OldName added in v1.0.2

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

OldName returns the old "name" field's value of the Group entity. If the Group 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 (*GroupMutation) OldSn added in v1.0.2

func (m *GroupMutation) OldSn(ctx context.Context) (v string, err error)

OldSn returns the old "sn" field's value of the Group entity. If the Group 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 (*GroupMutation) OldUpdateTime added in v1.0.2

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

OldUpdateTime returns the old "update_time" field's value of the Group entity. If the Group 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 (*GroupMutation) Op added in v1.0.2

func (m *GroupMutation) Op() Op

Op returns the operation name.

func (*GroupMutation) RemoveMemberIDs added in v1.0.2

func (m *GroupMutation) RemoveMemberIDs(ids ...int)

RemoveMemberIDs removes the "members" edge to the Member entity by IDs.

func (*GroupMutation) RemovedEdges added in v1.0.2

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

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

func (*GroupMutation) RemovedIDs added in v1.0.2

func (m *GroupMutation) 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 (*GroupMutation) RemovedMembersIDs added in v1.0.2

func (m *GroupMutation) RemovedMembersIDs() (ids []int)

RemovedMembers returns the removed IDs of the "members" edge to the Member entity.

func (*GroupMutation) ResetCreateTime added in v1.0.2

func (m *GroupMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*GroupMutation) ResetDeleteTime added in v1.0.2

func (m *GroupMutation) ResetDeleteTime()

ResetDeleteTime resets all changes to the "delete_time" field.

func (*GroupMutation) ResetEdge added in v1.0.2

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

func (m *GroupMutation) 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 (*GroupMutation) ResetMembers added in v1.0.2

func (m *GroupMutation) ResetMembers()

ResetMembers resets all changes to the "members" edge.

func (*GroupMutation) ResetName added in v1.0.2

func (m *GroupMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*GroupMutation) ResetSn added in v1.0.2

func (m *GroupMutation) ResetSn()

ResetSn resets all changes to the "sn" field.

func (*GroupMutation) ResetUpdateTime added in v1.0.2

func (m *GroupMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*GroupMutation) SetCreateTime added in v1.0.2

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

SetCreateTime sets the "create_time" field.

func (*GroupMutation) SetDeleteTime added in v1.0.2

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

SetDeleteTime sets the "delete_time" field.

func (*GroupMutation) SetField added in v1.0.2

func (m *GroupMutation) 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 (*GroupMutation) SetID added in v1.0.2

func (m *GroupMutation) SetID(id int)

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

func (*GroupMutation) SetName added in v1.0.2

func (m *GroupMutation) SetName(s string)

SetName sets the "name" field.

func (*GroupMutation) SetSn added in v1.0.2

func (m *GroupMutation) SetSn(s string)

SetSn sets the "sn" field.

func (*GroupMutation) SetUpdateTime added in v1.0.2

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

SetUpdateTime sets the "update_time" field.

func (*GroupMutation) Sn added in v1.0.2

func (m *GroupMutation) Sn() (r string, exists bool)

Sn returns the value of the "sn" field in the mutation.

func (GroupMutation) Tx added in v1.0.2

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

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

func (*GroupMutation) Type added in v1.0.2

func (m *GroupMutation) Type() string

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

func (*GroupMutation) UpdateTime added in v1.0.2

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

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

type GroupQuery added in v1.0.2

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

GroupQuery is the builder for querying Group entities.

func (*GroupQuery) All added in v1.0.2

func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)

All executes the query and returns a list of Groups.

func (*GroupQuery) AllX added in v1.0.2

func (gq *GroupQuery) AllX(ctx context.Context) []*Group

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

func (*GroupQuery) Clone added in v1.0.2

func (gq *GroupQuery) Clone() *GroupQuery

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

func (*GroupQuery) Count added in v1.0.2

func (gq *GroupQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GroupQuery) CountX added in v1.0.2

func (gq *GroupQuery) CountX(ctx context.Context) int

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

func (*GroupQuery) Exist added in v1.0.2

func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)

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

func (*GroupQuery) ExistX added in v1.0.2

func (gq *GroupQuery) ExistX(ctx context.Context) bool

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

func (*GroupQuery) First added in v1.0.2

func (gq *GroupQuery) First(ctx context.Context) (*Group, error)

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

func (*GroupQuery) FirstID added in v1.0.2

func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*GroupQuery) FirstIDX added in v1.0.2

func (gq *GroupQuery) FirstIDX(ctx context.Context) int

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

func (*GroupQuery) FirstX added in v1.0.2

func (gq *GroupQuery) FirstX(ctx context.Context) *Group

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

func (*GroupQuery) GroupBy added in v1.0.2

func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy

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

client.Group.Query().
	GroupBy(group.FieldSn).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*GroupQuery) IDs added in v1.0.2

func (gq *GroupQuery) IDs(ctx context.Context) ([]int, error)

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

func (*GroupQuery) IDsX added in v1.0.2

func (gq *GroupQuery) IDsX(ctx context.Context) []int

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

func (*GroupQuery) Limit added in v1.0.2

func (gq *GroupQuery) Limit(limit int) *GroupQuery

Limit adds a limit step to the query.

func (*GroupQuery) Offset added in v1.0.2

func (gq *GroupQuery) Offset(offset int) *GroupQuery

Offset adds an offset step to the query.

func (*GroupQuery) Only added in v1.0.2

func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)

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

func (*GroupQuery) OnlyID added in v1.0.2

func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*GroupQuery) OnlyIDX added in v1.0.2

func (gq *GroupQuery) OnlyIDX(ctx context.Context) int

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

func (*GroupQuery) OnlyX added in v1.0.2

func (gq *GroupQuery) OnlyX(ctx context.Context) *Group

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

func (*GroupQuery) Order added in v1.0.2

func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery

Order adds an order step to the query.

func (*GroupQuery) QueryMembers added in v1.0.2

func (gq *GroupQuery) QueryMembers() *MemberQuery

QueryMembers chains the current query on the "members" edge.

func (*GroupQuery) Select added in v1.0.2

func (gq *GroupQuery) Select(field string, fields ...string) *GroupSelect

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

client.Group.Query().
	Select(group.FieldSn).
	Scan(ctx, &v)

func (*GroupQuery) Unique added in v1.0.2

func (gq *GroupQuery) Unique(unique bool) *GroupQuery

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

func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery

Where adds a new predicate for the GroupQuery builder.

func (*GroupQuery) WithMembers added in v1.0.2

func (gq *GroupQuery) WithMembers(opts ...func(*MemberQuery)) *GroupQuery

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

type GroupSelect added in v1.0.2

type GroupSelect struct {
	*GroupQuery
	// contains filtered or unexported fields
}

GroupSelect is the builder for selecting fields of Group entities.

func (*GroupSelect) Bool added in v1.0.2

func (gs *GroupSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*GroupSelect) BoolX added in v1.0.2

func (gs *GroupSelect) BoolX(ctx context.Context) bool

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

func (*GroupSelect) Bools added in v1.0.2

func (gs *GroupSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*GroupSelect) BoolsX added in v1.0.2

func (gs *GroupSelect) BoolsX(ctx context.Context) []bool

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

func (*GroupSelect) Float64 added in v1.0.2

func (gs *GroupSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*GroupSelect) Float64X added in v1.0.2

func (gs *GroupSelect) Float64X(ctx context.Context) float64

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

func (*GroupSelect) Float64s added in v1.0.2

func (gs *GroupSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*GroupSelect) Float64sX added in v1.0.2

func (gs *GroupSelect) Float64sX(ctx context.Context) []float64

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

func (*GroupSelect) Int added in v1.0.2

func (gs *GroupSelect) Int(ctx context.Context) (_ int, err error)

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

func (*GroupSelect) IntX added in v1.0.2

func (gs *GroupSelect) IntX(ctx context.Context) int

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

func (*GroupSelect) Ints added in v1.0.2

func (gs *GroupSelect) Ints(ctx context.Context) ([]int, error)

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

func (*GroupSelect) IntsX added in v1.0.2

func (gs *GroupSelect) IntsX(ctx context.Context) []int

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

func (*GroupSelect) Scan added in v1.0.2

func (gs *GroupSelect) Scan(ctx context.Context, v interface{}) error

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

func (*GroupSelect) ScanX added in v1.0.2

func (gs *GroupSelect) ScanX(ctx context.Context, v interface{})

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

func (*GroupSelect) String added in v1.0.2

func (gs *GroupSelect) String(ctx context.Context) (_ string, err error)

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

func (*GroupSelect) StringX added in v1.0.2

func (gs *GroupSelect) StringX(ctx context.Context) string

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

func (*GroupSelect) Strings added in v1.0.2

func (gs *GroupSelect) Strings(ctx context.Context) ([]string, error)

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

func (*GroupSelect) StringsX added in v1.0.2

func (gs *GroupSelect) StringsX(ctx context.Context) []string

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

type GroupUpdate added in v1.0.2

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

GroupUpdate is the builder for updating Group entities.

func (*GroupUpdate) AddMemberIDs added in v1.0.2

func (gu *GroupUpdate) AddMemberIDs(ids ...int) *GroupUpdate

AddMemberIDs adds the "members" edge to the Member entity by IDs.

func (*GroupUpdate) AddMembers added in v1.0.2

func (gu *GroupUpdate) AddMembers(m ...*Member) *GroupUpdate

AddMembers adds the "members" edges to the Member entity.

func (*GroupUpdate) ClearDeleteTime added in v1.0.2

func (gu *GroupUpdate) ClearDeleteTime() *GroupUpdate

ClearDeleteTime clears the value of the "delete_time" field.

func (*GroupUpdate) ClearMembers added in v1.0.2

func (gu *GroupUpdate) ClearMembers() *GroupUpdate

ClearMembers clears all "members" edges to the Member entity.

func (*GroupUpdate) Exec added in v1.0.2

func (gu *GroupUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupUpdate) ExecX added in v1.0.2

func (gu *GroupUpdate) ExecX(ctx context.Context)

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

func (*GroupUpdate) Mutation added in v1.0.2

func (gu *GroupUpdate) Mutation() *GroupMutation

Mutation returns the GroupMutation object of the builder.

func (*GroupUpdate) RemoveMemberIDs added in v1.0.2

func (gu *GroupUpdate) RemoveMemberIDs(ids ...int) *GroupUpdate

RemoveMemberIDs removes the "members" edge to Member entities by IDs.

func (*GroupUpdate) RemoveMembers added in v1.0.2

func (gu *GroupUpdate) RemoveMembers(m ...*Member) *GroupUpdate

RemoveMembers removes "members" edges to Member entities.

func (*GroupUpdate) Save added in v1.0.2

func (gu *GroupUpdate) Save(ctx context.Context) (int, error)

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

func (*GroupUpdate) SaveX added in v1.0.2

func (gu *GroupUpdate) SaveX(ctx context.Context) int

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

func (*GroupUpdate) SetDeleteTime added in v1.0.2

func (gu *GroupUpdate) SetDeleteTime(t time.Time) *GroupUpdate

SetDeleteTime sets the "delete_time" field.

func (*GroupUpdate) SetName added in v1.0.2

func (gu *GroupUpdate) SetName(s string) *GroupUpdate

SetName sets the "name" field.

func (*GroupUpdate) SetNillableDeleteTime added in v1.0.2

func (gu *GroupUpdate) SetNillableDeleteTime(t *time.Time) *GroupUpdate

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

func (*GroupUpdate) SetUpdateTime added in v1.0.2

func (gu *GroupUpdate) SetUpdateTime(t time.Time) *GroupUpdate

SetUpdateTime sets the "update_time" field.

func (*GroupUpdate) Where added in v1.0.2

func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate

Where adds a new predicate for the GroupUpdate builder.

type GroupUpdateOne added in v1.0.2

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

GroupUpdateOne is the builder for updating a single Group entity.

func (*GroupUpdateOne) AddMemberIDs added in v1.0.2

func (guo *GroupUpdateOne) AddMemberIDs(ids ...int) *GroupUpdateOne

AddMemberIDs adds the "members" edge to the Member entity by IDs.

func (*GroupUpdateOne) AddMembers added in v1.0.2

func (guo *GroupUpdateOne) AddMembers(m ...*Member) *GroupUpdateOne

AddMembers adds the "members" edges to the Member entity.

func (*GroupUpdateOne) ClearDeleteTime added in v1.0.2

func (guo *GroupUpdateOne) ClearDeleteTime() *GroupUpdateOne

ClearDeleteTime clears the value of the "delete_time" field.

func (*GroupUpdateOne) ClearMembers added in v1.0.2

func (guo *GroupUpdateOne) ClearMembers() *GroupUpdateOne

ClearMembers clears all "members" edges to the Member entity.

func (*GroupUpdateOne) Exec added in v1.0.2

func (guo *GroupUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GroupUpdateOne) ExecX added in v1.0.2

func (guo *GroupUpdateOne) ExecX(ctx context.Context)

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

func (*GroupUpdateOne) Mutation added in v1.0.2

func (guo *GroupUpdateOne) Mutation() *GroupMutation

Mutation returns the GroupMutation object of the builder.

func (*GroupUpdateOne) RemoveMemberIDs added in v1.0.2

func (guo *GroupUpdateOne) RemoveMemberIDs(ids ...int) *GroupUpdateOne

RemoveMemberIDs removes the "members" edge to Member entities by IDs.

func (*GroupUpdateOne) RemoveMembers added in v1.0.2

func (guo *GroupUpdateOne) RemoveMembers(m ...*Member) *GroupUpdateOne

RemoveMembers removes "members" edges to Member entities.

func (*GroupUpdateOne) Save added in v1.0.2

func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)

Save executes the query and returns the updated Group entity.

func (*GroupUpdateOne) SaveX added in v1.0.2

func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group

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

func (*GroupUpdateOne) Select added in v1.0.2

func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne

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

func (*GroupUpdateOne) SetDeleteTime added in v1.0.2

func (guo *GroupUpdateOne) SetDeleteTime(t time.Time) *GroupUpdateOne

SetDeleteTime sets the "delete_time" field.

func (*GroupUpdateOne) SetName added in v1.0.2

func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne

SetName sets the "name" field.

func (*GroupUpdateOne) SetNillableDeleteTime added in v1.0.2

func (guo *GroupUpdateOne) SetNillableDeleteTime(t *time.Time) *GroupUpdateOne

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

func (*GroupUpdateOne) SetUpdateTime added in v1.0.2

func (guo *GroupUpdateOne) SetUpdateTime(t time.Time) *GroupUpdateOne

SetUpdateTime sets the "update_time" field.

type Groups added in v1.0.2

type Groups []*Group

Groups is a parsable slice of Group.

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 int `json:"id,omitempty"`
	// Sn holds the value of the "sn" field.
	Sn string `json:"sn,omitempty"`
	// Nickname holds the value of the "nickname" field.
	Nickname string `json:"nickname,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"`
	// GroupID holds the value of the "group_id" field.
	GroupID *int `json:"group_id,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:"-"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MemberQuery when eager-loading is set.
	Edges MemberEdges `json:"edges"`
	// contains filtered or unexported fields
}

Member is the model entity for the Member schema.

func (*Member) QueryEmails added in v1.0.2

func (m *Member) QueryEmails() *MemberEmailQuery

QueryEmails queries the "emails" edge of the Member entity.

func (*Member) QueryOwner added in v1.0.2

func (m *Member) QueryOwner() *GroupQuery

QueryOwner queries the "owner" edge of the Member entity.

func (*Member) QuerySettings added in v1.0.2

func (m *Member) QuerySettings() *MemberSettingQuery

QuerySettings queries the "settings" edge of the Member entity.

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 int) *MemberDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*MemberClient) Get

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

Get returns a Member entity by its id.

func (*MemberClient) GetX

func (c *MemberClient) GetX(ctx context.Context, id int) *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) QueryEmails added in v1.0.2

func (c *MemberClient) QueryEmails(m *Member) *MemberEmailQuery

QueryEmails queries the emails edge of a Member.

func (*MemberClient) QueryOwner added in v1.0.2

func (c *MemberClient) QueryOwner(m *Member) *GroupQuery

QueryOwner queries the owner edge of a Member.

func (*MemberClient) QuerySettings added in v1.0.2

func (c *MemberClient) QuerySettings(m *Member) *MemberSettingQuery

QuerySettings queries the settings edge of a 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 int) *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) AddEmailIDs added in v1.0.2

func (mc *MemberCreate) AddEmailIDs(ids ...int) *MemberCreate

AddEmailIDs adds the "emails" edge to the MemberEmail entity by IDs.

func (*MemberCreate) AddEmails added in v1.0.2

func (mc *MemberCreate) AddEmails(m ...*MemberEmail) *MemberCreate

AddEmails adds the "emails" edges to the MemberEmail entity.

func (*MemberCreate) AddSettingIDs added in v1.0.2

func (mc *MemberCreate) AddSettingIDs(ids ...int) *MemberCreate

AddSettingIDs adds the "settings" edge to the MemberSetting entity by IDs.

func (*MemberCreate) AddSettings added in v1.0.2

func (mc *MemberCreate) AddSettings(m ...*MemberSetting) *MemberCreate

AddSettings adds the "settings" edges to the MemberSetting entity.

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) SetGroupID added in v1.0.2

func (mc *MemberCreate) SetGroupID(i int) *MemberCreate

SetGroupID sets the "group_id" field.

func (*MemberCreate) SetID

func (mc *MemberCreate) SetID(i int) *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) SetNillableGroupID added in v1.0.2

func (mc *MemberCreate) SetNillableGroupID(i *int) *MemberCreate

SetNillableGroupID sets the "group_id" 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) SetNillableOwnerID added in v1.0.2

func (mc *MemberCreate) SetNillableOwnerID(id *int) *MemberCreate

SetNillableOwnerID sets the "owner" edge to the Group entity by ID 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) SetNillableSn added in v1.0.2

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

SetNillableSn sets the "sn" 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) SetOwner added in v1.0.2

func (mc *MemberCreate) SetOwner(g *Group) *MemberCreate

SetOwner sets the "owner" edge to the Group entity.

func (*MemberCreate) SetOwnerID added in v1.0.2

func (mc *MemberCreate) SetOwnerID(id int) *MemberCreate

SetOwnerID sets the "owner" edge to the Group entity by ID.

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) SetSn added in v1.0.2

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

SetSn sets the "sn" 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) 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 adds a new predicate 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 MemberEdges added in v1.0.2

type MemberEdges struct {
	// Emails holds the value of the emails edge.
	Emails []*MemberEmail `json:"emails,omitempty"`
	// Settings holds the value of the settings edge.
	Settings []*MemberSetting `json:"settings,omitempty"`
	// Owner holds the value of the owner edge.
	Owner *Group `json:"owner,omitempty"`
	// contains filtered or unexported fields
}

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

func (MemberEdges) EmailsOrErr added in v1.0.2

func (e MemberEdges) EmailsOrErr() ([]*MemberEmail, error)

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

func (MemberEdges) OwnerOrErr added in v1.0.2

func (e MemberEdges) OwnerOrErr() (*Group, error)

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

func (MemberEdges) SettingsOrErr added in v1.0.2

func (e MemberEdges) SettingsOrErr() ([]*MemberSetting, error)

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

type MemberEmail added in v1.0.2

type MemberEmail struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Owner holds the value of the "owner" field.
	Owner string `json:"owner,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Verify holds the value of the "verify" field.
	Verify bool `json:"-"`
	// VerifyTicker holds the value of the "verify_ticker" field.
	VerifyTicker *string `json:"verify_ticker,omitempty"`
	// VerifyTime holds the value of the "verify_time" field.
	VerifyTime time.Time `json:"-"`
	// IsPrimary holds the value of the "is_primary" field.
	IsPrimary bool `json:"is_primary,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:"-"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MemberEmailQuery when eager-loading is set.
	Edges MemberEmailEdges `json:"edges"`
	// contains filtered or unexported fields
}

MemberEmail is the model entity for the MemberEmail schema.

func (*MemberEmail) QueryOwner1 added in v1.0.2

func (me *MemberEmail) QueryOwner1() *MemberQuery

QueryOwner1 queries the "owner1" edge of the MemberEmail entity.

func (*MemberEmail) String added in v1.0.2

func (me *MemberEmail) String() string

String implements the fmt.Stringer.

func (*MemberEmail) Unwrap added in v1.0.2

func (me *MemberEmail) Unwrap() *MemberEmail

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

func (me *MemberEmail) Update() *MemberEmailUpdateOne

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

type MemberEmailClient added in v1.0.2

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

MemberEmailClient is a client for the MemberEmail schema.

func NewMemberEmailClient added in v1.0.2

func NewMemberEmailClient(c config) *MemberEmailClient

NewMemberEmailClient returns a client for the MemberEmail from the given config.

func (*MemberEmailClient) Create added in v1.0.2

func (c *MemberEmailClient) Create() *MemberEmailCreate

Create returns a create builder for MemberEmail.

func (*MemberEmailClient) CreateBulk added in v1.0.2

func (c *MemberEmailClient) CreateBulk(builders ...*MemberEmailCreate) *MemberEmailCreateBulk

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

func (*MemberEmailClient) Delete added in v1.0.2

func (c *MemberEmailClient) Delete() *MemberEmailDelete

Delete returns a delete builder for MemberEmail.

func (*MemberEmailClient) DeleteOne added in v1.0.2

DeleteOne returns a delete builder for the given entity.

func (*MemberEmailClient) DeleteOneID added in v1.0.2

func (c *MemberEmailClient) DeleteOneID(id int) *MemberEmailDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*MemberEmailClient) Get added in v1.0.2

func (c *MemberEmailClient) Get(ctx context.Context, id int) (*MemberEmail, error)

Get returns a MemberEmail entity by its id.

func (*MemberEmailClient) GetX added in v1.0.2

func (c *MemberEmailClient) GetX(ctx context.Context, id int) *MemberEmail

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

func (*MemberEmailClient) Hooks added in v1.0.2

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

Hooks returns the client hooks.

func (*MemberEmailClient) Query added in v1.0.2

func (c *MemberEmailClient) Query() *MemberEmailQuery

Query returns a query builder for MemberEmail.

func (*MemberEmailClient) QueryOwner1 added in v1.0.2

func (c *MemberEmailClient) QueryOwner1(me *MemberEmail) *MemberQuery

QueryOwner1 queries the owner1 edge of a MemberEmail.

func (*MemberEmailClient) Update added in v1.0.2

func (c *MemberEmailClient) Update() *MemberEmailUpdate

Update returns an update builder for MemberEmail.

func (*MemberEmailClient) UpdateOne added in v1.0.2

UpdateOne returns an update builder for the given entity.

func (*MemberEmailClient) UpdateOneID added in v1.0.2

func (c *MemberEmailClient) UpdateOneID(id int) *MemberEmailUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MemberEmailClient) Use added in v1.0.2

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

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

type MemberEmailCreate added in v1.0.2

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

MemberEmailCreate is the builder for creating a MemberEmail entity.

func (*MemberEmailCreate) AddOwner1 added in v1.0.2

func (mec *MemberEmailCreate) AddOwner1(m ...*Member) *MemberEmailCreate

AddOwner1 adds the "owner1" edges to the Member entity.

func (*MemberEmailCreate) AddOwner1IDs added in v1.0.2

func (mec *MemberEmailCreate) AddOwner1IDs(ids ...int) *MemberEmailCreate

AddOwner1IDs adds the "owner1" edge to the Member entity by IDs.

func (*MemberEmailCreate) Mutation added in v1.0.2

func (mec *MemberEmailCreate) Mutation() *MemberEmailMutation

Mutation returns the MemberEmailMutation object of the builder.

func (*MemberEmailCreate) Save added in v1.0.2

func (mec *MemberEmailCreate) Save(ctx context.Context) (*MemberEmail, error)

Save creates the MemberEmail in the database.

func (*MemberEmailCreate) SaveX added in v1.0.2

func (mec *MemberEmailCreate) SaveX(ctx context.Context) *MemberEmail

SaveX calls Save and panics if Save returns an error.

func (*MemberEmailCreate) SetCreateTime added in v1.0.2

func (mec *MemberEmailCreate) SetCreateTime(t time.Time) *MemberEmailCreate

SetCreateTime sets the "create_time" field.

func (*MemberEmailCreate) SetEmail added in v1.0.2

func (mec *MemberEmailCreate) SetEmail(s string) *MemberEmailCreate

SetEmail sets the "email" field.

func (*MemberEmailCreate) SetID added in v1.0.2

func (mec *MemberEmailCreate) SetID(i int) *MemberEmailCreate

SetID sets the "id" field.

func (*MemberEmailCreate) SetIsPrimary added in v1.0.2

func (mec *MemberEmailCreate) SetIsPrimary(b bool) *MemberEmailCreate

SetIsPrimary sets the "is_primary" field.

func (*MemberEmailCreate) SetNillableCreateTime added in v1.0.2

func (mec *MemberEmailCreate) SetNillableCreateTime(t *time.Time) *MemberEmailCreate

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

func (*MemberEmailCreate) SetNillableIsPrimary added in v1.0.2

func (mec *MemberEmailCreate) SetNillableIsPrimary(b *bool) *MemberEmailCreate

SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.

func (*MemberEmailCreate) SetNillableUpdateTime added in v1.0.2

func (mec *MemberEmailCreate) SetNillableUpdateTime(t *time.Time) *MemberEmailCreate

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

func (*MemberEmailCreate) SetNillableVerify added in v1.0.2

func (mec *MemberEmailCreate) SetNillableVerify(b *bool) *MemberEmailCreate

SetNillableVerify sets the "verify" field if the given value is not nil.

func (*MemberEmailCreate) SetNillableVerifyTicker added in v1.0.3

func (mec *MemberEmailCreate) SetNillableVerifyTicker(s *string) *MemberEmailCreate

SetNillableVerifyTicker sets the "verify_ticker" field if the given value is not nil.

func (*MemberEmailCreate) SetNillableVerifyTime added in v1.0.2

func (mec *MemberEmailCreate) SetNillableVerifyTime(t *time.Time) *MemberEmailCreate

SetNillableVerifyTime sets the "verify_time" field if the given value is not nil.

func (*MemberEmailCreate) SetOwner added in v1.0.2

func (mec *MemberEmailCreate) SetOwner(s string) *MemberEmailCreate

SetOwner sets the "owner" field.

func (*MemberEmailCreate) SetUpdateTime added in v1.0.2

func (mec *MemberEmailCreate) SetUpdateTime(t time.Time) *MemberEmailCreate

SetUpdateTime sets the "update_time" field.

func (*MemberEmailCreate) SetVerify added in v1.0.2

func (mec *MemberEmailCreate) SetVerify(b bool) *MemberEmailCreate

SetVerify sets the "verify" field.

func (*MemberEmailCreate) SetVerifyTicker added in v1.0.3

func (mec *MemberEmailCreate) SetVerifyTicker(s string) *MemberEmailCreate

SetVerifyTicker sets the "verify_ticker" field.

func (*MemberEmailCreate) SetVerifyTime added in v1.0.2

func (mec *MemberEmailCreate) SetVerifyTime(t time.Time) *MemberEmailCreate

SetVerifyTime sets the "verify_time" field.

type MemberEmailCreateBulk added in v1.0.2

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

MemberEmailCreateBulk is the builder for creating many MemberEmail entities in bulk.

func (*MemberEmailCreateBulk) Save added in v1.0.2

func (mecb *MemberEmailCreateBulk) Save(ctx context.Context) ([]*MemberEmail, error)

Save creates the MemberEmail entities in the database.

func (*MemberEmailCreateBulk) SaveX added in v1.0.2

func (mecb *MemberEmailCreateBulk) SaveX(ctx context.Context) []*MemberEmail

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

type MemberEmailDelete added in v1.0.2

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

MemberEmailDelete is the builder for deleting a MemberEmail entity.

func (*MemberEmailDelete) Exec added in v1.0.2

func (med *MemberEmailDelete) Exec(ctx context.Context) (int, error)

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

func (*MemberEmailDelete) ExecX added in v1.0.2

func (med *MemberEmailDelete) ExecX(ctx context.Context) int

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

func (*MemberEmailDelete) Where added in v1.0.2

Where adds a new predicate to the MemberEmailDelete builder.

type MemberEmailDeleteOne added in v1.0.2

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

MemberEmailDeleteOne is the builder for deleting a single MemberEmail entity.

func (*MemberEmailDeleteOne) Exec added in v1.0.2

func (medo *MemberEmailDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MemberEmailDeleteOne) ExecX added in v1.0.2

func (medo *MemberEmailDeleteOne) ExecX(ctx context.Context)

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

type MemberEmailEdges added in v1.0.2

type MemberEmailEdges struct {
	// Owner1 holds the value of the owner1 edge.
	Owner1 []*Member `json:"owner1,omitempty"`
	// contains filtered or unexported fields
}

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

func (MemberEmailEdges) Owner1OrErr added in v1.0.2

func (e MemberEmailEdges) Owner1OrErr() ([]*Member, error)

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

type MemberEmailGroupBy added in v1.0.2

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

MemberEmailGroupBy is the group-by builder for MemberEmail entities.

func (*MemberEmailGroupBy) Aggregate added in v1.0.2

func (megb *MemberEmailGroupBy) Aggregate(fns ...AggregateFunc) *MemberEmailGroupBy

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

func (*MemberEmailGroupBy) Bool added in v1.0.2

func (megb *MemberEmailGroupBy) 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 (*MemberEmailGroupBy) BoolX added in v1.0.2

func (megb *MemberEmailGroupBy) BoolX(ctx context.Context) bool

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

func (*MemberEmailGroupBy) Bools added in v1.0.2

func (megb *MemberEmailGroupBy) 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 (*MemberEmailGroupBy) BoolsX added in v1.0.2

func (megb *MemberEmailGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MemberEmailGroupBy) Float64 added in v1.0.2

func (megb *MemberEmailGroupBy) 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 (*MemberEmailGroupBy) Float64X added in v1.0.2

func (megb *MemberEmailGroupBy) Float64X(ctx context.Context) float64

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

func (*MemberEmailGroupBy) Float64s added in v1.0.2

func (megb *MemberEmailGroupBy) 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 (*MemberEmailGroupBy) Float64sX added in v1.0.2

func (megb *MemberEmailGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MemberEmailGroupBy) Int added in v1.0.2

func (megb *MemberEmailGroupBy) 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 (*MemberEmailGroupBy) IntX added in v1.0.2

func (megb *MemberEmailGroupBy) IntX(ctx context.Context) int

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

func (*MemberEmailGroupBy) Ints added in v1.0.2

func (megb *MemberEmailGroupBy) 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 (*MemberEmailGroupBy) IntsX added in v1.0.2

func (megb *MemberEmailGroupBy) IntsX(ctx context.Context) []int

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

func (*MemberEmailGroupBy) Scan added in v1.0.2

func (megb *MemberEmailGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*MemberEmailGroupBy) ScanX added in v1.0.2

func (megb *MemberEmailGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MemberEmailGroupBy) String added in v1.0.2

func (megb *MemberEmailGroupBy) 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 (*MemberEmailGroupBy) StringX added in v1.0.2

func (megb *MemberEmailGroupBy) StringX(ctx context.Context) string

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

func (*MemberEmailGroupBy) Strings added in v1.0.2

func (megb *MemberEmailGroupBy) 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 (*MemberEmailGroupBy) StringsX added in v1.0.2

func (megb *MemberEmailGroupBy) StringsX(ctx context.Context) []string

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

type MemberEmailMutation added in v1.0.2

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

MemberEmailMutation represents an operation that mutates the MemberEmail nodes in the graph.

func (*MemberEmailMutation) AddField added in v1.0.2

func (m *MemberEmailMutation) 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 (*MemberEmailMutation) AddOwner1IDs added in v1.0.2

func (m *MemberEmailMutation) AddOwner1IDs(ids ...int)

AddOwner1IDs adds the "owner1" edge to the Member entity by ids.

func (*MemberEmailMutation) AddedEdges added in v1.0.2

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

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

func (*MemberEmailMutation) AddedField added in v1.0.2

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

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

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

func (*MemberEmailMutation) AddedIDs added in v1.0.2

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

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

func (*MemberEmailMutation) ClearEdge added in v1.0.2

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

func (m *MemberEmailMutation) 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 (*MemberEmailMutation) ClearOwner1 added in v1.0.2

func (m *MemberEmailMutation) ClearOwner1()

ClearOwner1 clears the "owner1" edge to the Member entity.

func (*MemberEmailMutation) ClearVerifyTicker added in v1.0.3

func (m *MemberEmailMutation) ClearVerifyTicker()

ClearVerifyTicker clears the value of the "verify_ticker" field.

func (*MemberEmailMutation) ClearedEdges added in v1.0.2

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

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

func (*MemberEmailMutation) ClearedFields added in v1.0.2

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

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

func (MemberEmailMutation) Client added in v1.0.2

func (m MemberEmailMutation) 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 (*MemberEmailMutation) CreateTime added in v1.0.2

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

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

func (*MemberEmailMutation) EdgeCleared added in v1.0.2

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

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

func (*MemberEmailMutation) Email added in v1.0.2

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

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

func (*MemberEmailMutation) Field added in v1.0.2

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

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

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

func (*MemberEmailMutation) Fields added in v1.0.2

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

func (m *MemberEmailMutation) 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.

func (*MemberEmailMutation) IsPrimary added in v1.0.2

func (m *MemberEmailMutation) IsPrimary() (r bool, exists bool)

IsPrimary returns the value of the "is_primary" field in the mutation.

func (*MemberEmailMutation) OldCreateTime added in v1.0.2

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

OldCreateTime returns the old "create_time" field's value of the MemberEmail entity. If the MemberEmail 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 (*MemberEmailMutation) OldEmail added in v1.0.2

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

OldEmail returns the old "email" field's value of the MemberEmail entity. If the MemberEmail 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 (*MemberEmailMutation) OldField added in v1.0.2

func (m *MemberEmailMutation) 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 (*MemberEmailMutation) OldIsPrimary added in v1.0.2

func (m *MemberEmailMutation) OldIsPrimary(ctx context.Context) (v bool, err error)

OldIsPrimary returns the old "is_primary" field's value of the MemberEmail entity. If the MemberEmail 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 (*MemberEmailMutation) OldOwner added in v1.0.2

func (m *MemberEmailMutation) OldOwner(ctx context.Context) (v string, err error)

OldOwner returns the old "owner" field's value of the MemberEmail entity. If the MemberEmail 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 (*MemberEmailMutation) OldUpdateTime added in v1.0.2

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

OldUpdateTime returns the old "update_time" field's value of the MemberEmail entity. If the MemberEmail 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 (*MemberEmailMutation) OldVerify added in v1.0.2

func (m *MemberEmailMutation) OldVerify(ctx context.Context) (v bool, err error)

OldVerify returns the old "verify" field's value of the MemberEmail entity. If the MemberEmail 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 (*MemberEmailMutation) OldVerifyTicker added in v1.0.3

func (m *MemberEmailMutation) OldVerifyTicker(ctx context.Context) (v *string, err error)

OldVerifyTicker returns the old "verify_ticker" field's value of the MemberEmail entity. If the MemberEmail 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 (*MemberEmailMutation) OldVerifyTime added in v1.0.2

func (m *MemberEmailMutation) OldVerifyTime(ctx context.Context) (v time.Time, err error)

OldVerifyTime returns the old "verify_time" field's value of the MemberEmail entity. If the MemberEmail 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 (*MemberEmailMutation) Op added in v1.0.2

func (m *MemberEmailMutation) Op() Op

Op returns the operation name.

func (*MemberEmailMutation) Owner added in v1.0.2

func (m *MemberEmailMutation) Owner() (r string, exists bool)

Owner returns the value of the "owner" field in the mutation.

func (*MemberEmailMutation) Owner1Cleared added in v1.0.2

func (m *MemberEmailMutation) Owner1Cleared() bool

Owner1Cleared reports if the "owner1" edge to the Member entity was cleared.

func (*MemberEmailMutation) Owner1IDs added in v1.0.2

func (m *MemberEmailMutation) Owner1IDs() (ids []int)

Owner1IDs returns the "owner1" edge IDs in the mutation.

func (*MemberEmailMutation) RemoveOwner1IDs added in v1.0.2

func (m *MemberEmailMutation) RemoveOwner1IDs(ids ...int)

RemoveOwner1IDs removes the "owner1" edge to the Member entity by IDs.

func (*MemberEmailMutation) RemovedEdges added in v1.0.2

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

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

func (*MemberEmailMutation) RemovedIDs added in v1.0.2

func (m *MemberEmailMutation) 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 (*MemberEmailMutation) RemovedOwner1IDs added in v1.0.2

func (m *MemberEmailMutation) RemovedOwner1IDs() (ids []int)

RemovedOwner1 returns the removed IDs of the "owner1" edge to the Member entity.

func (*MemberEmailMutation) ResetCreateTime added in v1.0.2

func (m *MemberEmailMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*MemberEmailMutation) ResetEdge added in v1.0.2

func (m *MemberEmailMutation) 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 (*MemberEmailMutation) ResetEmail added in v1.0.2

func (m *MemberEmailMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*MemberEmailMutation) ResetField added in v1.0.2

func (m *MemberEmailMutation) 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 (*MemberEmailMutation) ResetIsPrimary added in v1.0.2

func (m *MemberEmailMutation) ResetIsPrimary()

ResetIsPrimary resets all changes to the "is_primary" field.

func (*MemberEmailMutation) ResetOwner added in v1.0.2

func (m *MemberEmailMutation) ResetOwner()

ResetOwner resets all changes to the "owner" field.

func (*MemberEmailMutation) ResetOwner1 added in v1.0.2

func (m *MemberEmailMutation) ResetOwner1()

ResetOwner1 resets all changes to the "owner1" edge.

func (*MemberEmailMutation) ResetUpdateTime added in v1.0.2

func (m *MemberEmailMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*MemberEmailMutation) ResetVerify added in v1.0.2

func (m *MemberEmailMutation) ResetVerify()

ResetVerify resets all changes to the "verify" field.

func (*MemberEmailMutation) ResetVerifyTicker added in v1.0.3

func (m *MemberEmailMutation) ResetVerifyTicker()

ResetVerifyTicker resets all changes to the "verify_ticker" field.

func (*MemberEmailMutation) ResetVerifyTime added in v1.0.2

func (m *MemberEmailMutation) ResetVerifyTime()

ResetVerifyTime resets all changes to the "verify_time" field.

func (*MemberEmailMutation) SetCreateTime added in v1.0.2

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

SetCreateTime sets the "create_time" field.

func (*MemberEmailMutation) SetEmail added in v1.0.2

func (m *MemberEmailMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*MemberEmailMutation) SetField added in v1.0.2

func (m *MemberEmailMutation) 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 (*MemberEmailMutation) SetID added in v1.0.2

func (m *MemberEmailMutation) SetID(id int)

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

func (*MemberEmailMutation) SetIsPrimary added in v1.0.2

func (m *MemberEmailMutation) SetIsPrimary(b bool)

SetIsPrimary sets the "is_primary" field.

func (*MemberEmailMutation) SetOwner added in v1.0.2

func (m *MemberEmailMutation) SetOwner(s string)

SetOwner sets the "owner" field.

func (*MemberEmailMutation) SetUpdateTime added in v1.0.2

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

SetUpdateTime sets the "update_time" field.

func (*MemberEmailMutation) SetVerify added in v1.0.2

func (m *MemberEmailMutation) SetVerify(b bool)

SetVerify sets the "verify" field.

func (*MemberEmailMutation) SetVerifyTicker added in v1.0.3

func (m *MemberEmailMutation) SetVerifyTicker(s string)

SetVerifyTicker sets the "verify_ticker" field.

func (*MemberEmailMutation) SetVerifyTime added in v1.0.2

func (m *MemberEmailMutation) SetVerifyTime(t time.Time)

SetVerifyTime sets the "verify_time" field.

func (MemberEmailMutation) Tx added in v1.0.2

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

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

func (*MemberEmailMutation) Type added in v1.0.2

func (m *MemberEmailMutation) Type() string

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

func (*MemberEmailMutation) UpdateTime added in v1.0.2

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

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

func (*MemberEmailMutation) Verify added in v1.0.2

func (m *MemberEmailMutation) Verify() (r bool, exists bool)

Verify returns the value of the "verify" field in the mutation.

func (*MemberEmailMutation) VerifyTicker added in v1.0.3

func (m *MemberEmailMutation) VerifyTicker() (r string, exists bool)

VerifyTicker returns the value of the "verify_ticker" field in the mutation.

func (*MemberEmailMutation) VerifyTickerCleared added in v1.0.3

func (m *MemberEmailMutation) VerifyTickerCleared() bool

VerifyTickerCleared returns if the "verify_ticker" field was cleared in this mutation.

func (*MemberEmailMutation) VerifyTime added in v1.0.2

func (m *MemberEmailMutation) VerifyTime() (r time.Time, exists bool)

VerifyTime returns the value of the "verify_time" field in the mutation.

type MemberEmailQuery added in v1.0.2

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

MemberEmailQuery is the builder for querying MemberEmail entities.

func (*MemberEmailQuery) All added in v1.0.2

func (meq *MemberEmailQuery) All(ctx context.Context) ([]*MemberEmail, error)

All executes the query and returns a list of MemberEmails.

func (*MemberEmailQuery) AllX added in v1.0.2

func (meq *MemberEmailQuery) AllX(ctx context.Context) []*MemberEmail

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

func (*MemberEmailQuery) Clone added in v1.0.2

func (meq *MemberEmailQuery) Clone() *MemberEmailQuery

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

func (*MemberEmailQuery) Count added in v1.0.2

func (meq *MemberEmailQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MemberEmailQuery) CountX added in v1.0.2

func (meq *MemberEmailQuery) CountX(ctx context.Context) int

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

func (*MemberEmailQuery) Exist added in v1.0.2

func (meq *MemberEmailQuery) Exist(ctx context.Context) (bool, error)

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

func (*MemberEmailQuery) ExistX added in v1.0.2

func (meq *MemberEmailQuery) ExistX(ctx context.Context) bool

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

func (*MemberEmailQuery) First added in v1.0.2

func (meq *MemberEmailQuery) First(ctx context.Context) (*MemberEmail, error)

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

func (*MemberEmailQuery) FirstID added in v1.0.2

func (meq *MemberEmailQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*MemberEmailQuery) FirstIDX added in v1.0.2

func (meq *MemberEmailQuery) FirstIDX(ctx context.Context) int

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

func (*MemberEmailQuery) FirstX added in v1.0.2

func (meq *MemberEmailQuery) FirstX(ctx context.Context) *MemberEmail

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

func (*MemberEmailQuery) GroupBy added in v1.0.2

func (meq *MemberEmailQuery) GroupBy(field string, fields ...string) *MemberEmailGroupBy

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

client.MemberEmail.Query().
	GroupBy(memberemail.FieldOwner).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*MemberEmailQuery) IDs added in v1.0.2

func (meq *MemberEmailQuery) IDs(ctx context.Context) ([]int, error)

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

func (*MemberEmailQuery) IDsX added in v1.0.2

func (meq *MemberEmailQuery) IDsX(ctx context.Context) []int

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

func (*MemberEmailQuery) Limit added in v1.0.2

func (meq *MemberEmailQuery) Limit(limit int) *MemberEmailQuery

Limit adds a limit step to the query.

func (*MemberEmailQuery) Offset added in v1.0.2

func (meq *MemberEmailQuery) Offset(offset int) *MemberEmailQuery

Offset adds an offset step to the query.

func (*MemberEmailQuery) Only added in v1.0.2

func (meq *MemberEmailQuery) Only(ctx context.Context) (*MemberEmail, error)

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

func (*MemberEmailQuery) OnlyID added in v1.0.2

func (meq *MemberEmailQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*MemberEmailQuery) OnlyIDX added in v1.0.2

func (meq *MemberEmailQuery) OnlyIDX(ctx context.Context) int

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

func (*MemberEmailQuery) OnlyX added in v1.0.2

func (meq *MemberEmailQuery) OnlyX(ctx context.Context) *MemberEmail

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

func (*MemberEmailQuery) Order added in v1.0.2

func (meq *MemberEmailQuery) Order(o ...OrderFunc) *MemberEmailQuery

Order adds an order step to the query.

func (*MemberEmailQuery) QueryOwner1 added in v1.0.2

func (meq *MemberEmailQuery) QueryOwner1() *MemberQuery

QueryOwner1 chains the current query on the "owner1" edge.

func (*MemberEmailQuery) Select added in v1.0.2

func (meq *MemberEmailQuery) Select(field string, fields ...string) *MemberEmailSelect

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

client.MemberEmail.Query().
	Select(memberemail.FieldOwner).
	Scan(ctx, &v)

func (*MemberEmailQuery) Unique added in v1.0.2

func (meq *MemberEmailQuery) Unique(unique bool) *MemberEmailQuery

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

Where adds a new predicate for the MemberEmailQuery builder.

func (*MemberEmailQuery) WithOwner1 added in v1.0.2

func (meq *MemberEmailQuery) WithOwner1(opts ...func(*MemberQuery)) *MemberEmailQuery

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

type MemberEmailSelect added in v1.0.2

type MemberEmailSelect struct {
	*MemberEmailQuery
	// contains filtered or unexported fields
}

MemberEmailSelect is the builder for selecting fields of MemberEmail entities.

func (*MemberEmailSelect) Bool added in v1.0.2

func (mes *MemberEmailSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*MemberEmailSelect) BoolX added in v1.0.2

func (mes *MemberEmailSelect) BoolX(ctx context.Context) bool

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

func (*MemberEmailSelect) Bools added in v1.0.2

func (mes *MemberEmailSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*MemberEmailSelect) BoolsX added in v1.0.2

func (mes *MemberEmailSelect) BoolsX(ctx context.Context) []bool

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

func (*MemberEmailSelect) Float64 added in v1.0.2

func (mes *MemberEmailSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*MemberEmailSelect) Float64X added in v1.0.2

func (mes *MemberEmailSelect) Float64X(ctx context.Context) float64

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

func (*MemberEmailSelect) Float64s added in v1.0.2

func (mes *MemberEmailSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*MemberEmailSelect) Float64sX added in v1.0.2

func (mes *MemberEmailSelect) Float64sX(ctx context.Context) []float64

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

func (*MemberEmailSelect) Int added in v1.0.2

func (mes *MemberEmailSelect) Int(ctx context.Context) (_ int, err error)

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

func (*MemberEmailSelect) IntX added in v1.0.2

func (mes *MemberEmailSelect) IntX(ctx context.Context) int

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

func (*MemberEmailSelect) Ints added in v1.0.2

func (mes *MemberEmailSelect) Ints(ctx context.Context) ([]int, error)

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

func (*MemberEmailSelect) IntsX added in v1.0.2

func (mes *MemberEmailSelect) IntsX(ctx context.Context) []int

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

func (*MemberEmailSelect) Scan added in v1.0.2

func (mes *MemberEmailSelect) Scan(ctx context.Context, v interface{}) error

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

func (*MemberEmailSelect) ScanX added in v1.0.2

func (mes *MemberEmailSelect) ScanX(ctx context.Context, v interface{})

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

func (*MemberEmailSelect) String added in v1.0.2

func (mes *MemberEmailSelect) String(ctx context.Context) (_ string, err error)

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

func (*MemberEmailSelect) StringX added in v1.0.2

func (mes *MemberEmailSelect) StringX(ctx context.Context) string

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

func (*MemberEmailSelect) Strings added in v1.0.2

func (mes *MemberEmailSelect) Strings(ctx context.Context) ([]string, error)

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

func (*MemberEmailSelect) StringsX added in v1.0.2

func (mes *MemberEmailSelect) StringsX(ctx context.Context) []string

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

type MemberEmailUpdate added in v1.0.2

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

MemberEmailUpdate is the builder for updating MemberEmail entities.

func (*MemberEmailUpdate) AddOwner1 added in v1.0.2

func (meu *MemberEmailUpdate) AddOwner1(m ...*Member) *MemberEmailUpdate

AddOwner1 adds the "owner1" edges to the Member entity.

func (*MemberEmailUpdate) AddOwner1IDs added in v1.0.2

func (meu *MemberEmailUpdate) AddOwner1IDs(ids ...int) *MemberEmailUpdate

AddOwner1IDs adds the "owner1" edge to the Member entity by IDs.

func (*MemberEmailUpdate) ClearOwner1 added in v1.0.2

func (meu *MemberEmailUpdate) ClearOwner1() *MemberEmailUpdate

ClearOwner1 clears all "owner1" edges to the Member entity.

func (*MemberEmailUpdate) ClearVerifyTicker added in v1.0.3

func (meu *MemberEmailUpdate) ClearVerifyTicker() *MemberEmailUpdate

ClearVerifyTicker clears the value of the "verify_ticker" field.

func (*MemberEmailUpdate) Exec added in v1.0.2

func (meu *MemberEmailUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberEmailUpdate) ExecX added in v1.0.2

func (meu *MemberEmailUpdate) ExecX(ctx context.Context)

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

func (*MemberEmailUpdate) Mutation added in v1.0.2

func (meu *MemberEmailUpdate) Mutation() *MemberEmailMutation

Mutation returns the MemberEmailMutation object of the builder.

func (*MemberEmailUpdate) RemoveOwner1 added in v1.0.2

func (meu *MemberEmailUpdate) RemoveOwner1(m ...*Member) *MemberEmailUpdate

RemoveOwner1 removes "owner1" edges to Member entities.

func (*MemberEmailUpdate) RemoveOwner1IDs added in v1.0.2

func (meu *MemberEmailUpdate) RemoveOwner1IDs(ids ...int) *MemberEmailUpdate

RemoveOwner1IDs removes the "owner1" edge to Member entities by IDs.

func (*MemberEmailUpdate) Save added in v1.0.2

func (meu *MemberEmailUpdate) Save(ctx context.Context) (int, error)

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

func (*MemberEmailUpdate) SaveX added in v1.0.2

func (meu *MemberEmailUpdate) SaveX(ctx context.Context) int

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

func (*MemberEmailUpdate) SetEmail added in v1.0.2

func (meu *MemberEmailUpdate) SetEmail(s string) *MemberEmailUpdate

SetEmail sets the "email" field.

func (*MemberEmailUpdate) SetIsPrimary added in v1.0.2

func (meu *MemberEmailUpdate) SetIsPrimary(b bool) *MemberEmailUpdate

SetIsPrimary sets the "is_primary" field.

func (*MemberEmailUpdate) SetNillableIsPrimary added in v1.0.2

func (meu *MemberEmailUpdate) SetNillableIsPrimary(b *bool) *MemberEmailUpdate

SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.

func (*MemberEmailUpdate) SetNillableVerify added in v1.0.2

func (meu *MemberEmailUpdate) SetNillableVerify(b *bool) *MemberEmailUpdate

SetNillableVerify sets the "verify" field if the given value is not nil.

func (*MemberEmailUpdate) SetNillableVerifyTicker added in v1.0.3

func (meu *MemberEmailUpdate) SetNillableVerifyTicker(s *string) *MemberEmailUpdate

SetNillableVerifyTicker sets the "verify_ticker" field if the given value is not nil.

func (*MemberEmailUpdate) SetUpdateTime added in v1.0.2

func (meu *MemberEmailUpdate) SetUpdateTime(t time.Time) *MemberEmailUpdate

SetUpdateTime sets the "update_time" field.

func (*MemberEmailUpdate) SetVerify added in v1.0.2

func (meu *MemberEmailUpdate) SetVerify(b bool) *MemberEmailUpdate

SetVerify sets the "verify" field.

func (*MemberEmailUpdate) SetVerifyTicker added in v1.0.3

func (meu *MemberEmailUpdate) SetVerifyTicker(s string) *MemberEmailUpdate

SetVerifyTicker sets the "verify_ticker" field.

func (*MemberEmailUpdate) SetVerifyTime added in v1.0.2

func (meu *MemberEmailUpdate) SetVerifyTime(t time.Time) *MemberEmailUpdate

SetVerifyTime sets the "verify_time" field.

func (*MemberEmailUpdate) Where added in v1.0.2

Where adds a new predicate for the MemberEmailUpdate builder.

type MemberEmailUpdateOne added in v1.0.2

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

MemberEmailUpdateOne is the builder for updating a single MemberEmail entity.

func (*MemberEmailUpdateOne) AddOwner1 added in v1.0.2

func (meuo *MemberEmailUpdateOne) AddOwner1(m ...*Member) *MemberEmailUpdateOne

AddOwner1 adds the "owner1" edges to the Member entity.

func (*MemberEmailUpdateOne) AddOwner1IDs added in v1.0.2

func (meuo *MemberEmailUpdateOne) AddOwner1IDs(ids ...int) *MemberEmailUpdateOne

AddOwner1IDs adds the "owner1" edge to the Member entity by IDs.

func (*MemberEmailUpdateOne) ClearOwner1 added in v1.0.2

func (meuo *MemberEmailUpdateOne) ClearOwner1() *MemberEmailUpdateOne

ClearOwner1 clears all "owner1" edges to the Member entity.

func (*MemberEmailUpdateOne) ClearVerifyTicker added in v1.0.3

func (meuo *MemberEmailUpdateOne) ClearVerifyTicker() *MemberEmailUpdateOne

ClearVerifyTicker clears the value of the "verify_ticker" field.

func (*MemberEmailUpdateOne) Exec added in v1.0.2

func (meuo *MemberEmailUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MemberEmailUpdateOne) ExecX added in v1.0.2

func (meuo *MemberEmailUpdateOne) ExecX(ctx context.Context)

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

func (*MemberEmailUpdateOne) Mutation added in v1.0.2

func (meuo *MemberEmailUpdateOne) Mutation() *MemberEmailMutation

Mutation returns the MemberEmailMutation object of the builder.

func (*MemberEmailUpdateOne) RemoveOwner1 added in v1.0.2

func (meuo *MemberEmailUpdateOne) RemoveOwner1(m ...*Member) *MemberEmailUpdateOne

RemoveOwner1 removes "owner1" edges to Member entities.

func (*MemberEmailUpdateOne) RemoveOwner1IDs added in v1.0.2

func (meuo *MemberEmailUpdateOne) RemoveOwner1IDs(ids ...int) *MemberEmailUpdateOne

RemoveOwner1IDs removes the "owner1" edge to Member entities by IDs.

func (*MemberEmailUpdateOne) Save added in v1.0.2

Save executes the query and returns the updated MemberEmail entity.

func (*MemberEmailUpdateOne) SaveX added in v1.0.2

func (meuo *MemberEmailUpdateOne) SaveX(ctx context.Context) *MemberEmail

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

func (*MemberEmailUpdateOne) Select added in v1.0.2

func (meuo *MemberEmailUpdateOne) Select(field string, fields ...string) *MemberEmailUpdateOne

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

func (*MemberEmailUpdateOne) SetEmail added in v1.0.2

SetEmail sets the "email" field.

func (*MemberEmailUpdateOne) SetIsPrimary added in v1.0.2

func (meuo *MemberEmailUpdateOne) SetIsPrimary(b bool) *MemberEmailUpdateOne

SetIsPrimary sets the "is_primary" field.

func (*MemberEmailUpdateOne) SetNillableIsPrimary added in v1.0.2

func (meuo *MemberEmailUpdateOne) SetNillableIsPrimary(b *bool) *MemberEmailUpdateOne

SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.

func (*MemberEmailUpdateOne) SetNillableVerify added in v1.0.2

func (meuo *MemberEmailUpdateOne) SetNillableVerify(b *bool) *MemberEmailUpdateOne

SetNillableVerify sets the "verify" field if the given value is not nil.

func (*MemberEmailUpdateOne) SetNillableVerifyTicker added in v1.0.3

func (meuo *MemberEmailUpdateOne) SetNillableVerifyTicker(s *string) *MemberEmailUpdateOne

SetNillableVerifyTicker sets the "verify_ticker" field if the given value is not nil.

func (*MemberEmailUpdateOne) SetUpdateTime added in v1.0.2

func (meuo *MemberEmailUpdateOne) SetUpdateTime(t time.Time) *MemberEmailUpdateOne

SetUpdateTime sets the "update_time" field.

func (*MemberEmailUpdateOne) SetVerify added in v1.0.2

func (meuo *MemberEmailUpdateOne) SetVerify(b bool) *MemberEmailUpdateOne

SetVerify sets the "verify" field.

func (*MemberEmailUpdateOne) SetVerifyTicker added in v1.0.3

func (meuo *MemberEmailUpdateOne) SetVerifyTicker(s string) *MemberEmailUpdateOne

SetVerifyTicker sets the "verify_ticker" field.

func (*MemberEmailUpdateOne) SetVerifyTime added in v1.0.2

func (meuo *MemberEmailUpdateOne) SetVerifyTime(t time.Time) *MemberEmailUpdateOne

SetVerifyTime sets the "verify_time" field.

type MemberEmails added in v1.0.2

type MemberEmails []*MemberEmail

MemberEmails is a parsable slice of MemberEmail.

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) AddEmailIDs added in v1.0.2

func (m *MemberMutation) AddEmailIDs(ids ...int)

AddEmailIDs adds the "emails" edge to the MemberEmail entity by ids.

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) AddGroupID added in v1.0.2

func (m *MemberMutation) AddGroupID(i int)

AddGroupID adds i to the "group_id" field.

func (*MemberMutation) AddSettingIDs added in v1.0.2

func (m *MemberMutation) AddSettingIDs(ids ...int)

AddSettingIDs adds the "settings" edge to the MemberSetting entity by ids.

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) AddedGroupID added in v1.0.2

func (m *MemberMutation) AddedGroupID() (r int, exists bool)

AddedGroupID returns the value that was added to the "group_id" field in 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) ClearEmails added in v1.0.2

func (m *MemberMutation) ClearEmails()

ClearEmails clears the "emails" edge to the MemberEmail entity.

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) ClearGroupID added in v1.0.2

func (m *MemberMutation) ClearGroupID()

ClearGroupID clears the value of the "group_id" field.

func (*MemberMutation) ClearLastPwdAuth

func (m *MemberMutation) ClearLastPwdAuth()

ClearLastPwdAuth clears the value of the "last_pwd_auth" field.

func (*MemberMutation) ClearOwner added in v1.0.2

func (m *MemberMutation) ClearOwner()

ClearOwner clears the "owner" edge to the Group entity.

func (*MemberMutation) ClearPhone

func (m *MemberMutation) ClearPhone()

ClearPhone clears the value of the "phone" field.

func (*MemberMutation) ClearSettings added in v1.0.2

func (m *MemberMutation) ClearSettings()

ClearSettings clears the "settings" edge to the MemberSetting entity.

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) EmailsCleared added in v1.0.2

func (m *MemberMutation) EmailsCleared() bool

EmailsCleared reports if the "emails" edge to the MemberEmail entity was cleared.

func (*MemberMutation) EmailsIDs added in v1.0.2

func (m *MemberMutation) EmailsIDs() (ids []int)

EmailsIDs returns the "emails" edge IDs in the 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) GroupID added in v1.0.2

func (m *MemberMutation) GroupID() (r int, exists bool)

GroupID returns the value of the "group_id" field in the mutation.

func (*MemberMutation) GroupIDCleared added in v1.0.2

func (m *MemberMutation) GroupIDCleared() bool

GroupIDCleared returns if the "group_id" field was cleared in this mutation.

func (*MemberMutation) ID

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

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) 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) OldGroupID added in v1.0.2

func (m *MemberMutation) OldGroupID(ctx context.Context) (v *int, err error)

OldGroupID returns the old "group_id" 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) 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) OldSn added in v1.0.2

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

OldSn returns the old "sn" 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) OwnerCleared added in v1.0.2

func (m *MemberMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the Group entity was cleared.

func (*MemberMutation) OwnerID added in v1.0.2

func (m *MemberMutation) OwnerID() (id int, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*MemberMutation) OwnerIDs added in v1.0.2

func (m *MemberMutation) OwnerIDs() (ids []int)

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

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) RemoveEmailIDs added in v1.0.2

func (m *MemberMutation) RemoveEmailIDs(ids ...int)

RemoveEmailIDs removes the "emails" edge to the MemberEmail entity by IDs.

func (*MemberMutation) RemoveSettingIDs added in v1.0.2

func (m *MemberMutation) RemoveSettingIDs(ids ...int)

RemoveSettingIDs removes the "settings" edge to the MemberSetting entity by IDs.

func (*MemberMutation) RemovedEdges

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

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

func (*MemberMutation) RemovedEmailsIDs added in v1.0.2

func (m *MemberMutation) RemovedEmailsIDs() (ids []int)

RemovedEmails returns the removed IDs of the "emails" edge to the MemberEmail entity.

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) RemovedSettingsIDs added in v1.0.2

func (m *MemberMutation) RemovedSettingsIDs() (ids []int)

RemovedSettings returns the removed IDs of the "settings" edge to the MemberSetting entity.

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) ResetEmails added in v1.0.2

func (m *MemberMutation) ResetEmails()

ResetEmails resets all changes to the "emails" edge.

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) ResetGroupID added in v1.0.2

func (m *MemberMutation) ResetGroupID()

ResetGroupID resets all changes to the "group_id" field.

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) ResetOwner added in v1.0.2

func (m *MemberMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

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) ResetSettings added in v1.0.2

func (m *MemberMutation) ResetSettings()

ResetSettings resets all changes to the "settings" edge.

func (*MemberMutation) ResetSignature

func (m *MemberMutation) ResetSignature()

ResetSignature resets all changes to the "signature" field.

func (*MemberMutation) ResetSn added in v1.0.2

func (m *MemberMutation) ResetSn()

ResetSn resets all changes to the "sn" 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) 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) SetGroupID added in v1.0.2

func (m *MemberMutation) SetGroupID(i int)

SetGroupID sets the "group_id" field.

func (*MemberMutation) SetID

func (m *MemberMutation) SetID(id int)

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) SetOwnerID added in v1.0.2

func (m *MemberMutation) SetOwnerID(id int)

SetOwnerID sets the "owner" edge to the Group entity by id.

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) SetSn added in v1.0.2

func (m *MemberMutation) SetSn(s string)

SetSn sets the "sn" 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) SettingsCleared added in v1.0.2

func (m *MemberMutation) SettingsCleared() bool

SettingsCleared reports if the "settings" edge to the MemberSetting entity was cleared.

func (*MemberMutation) SettingsIDs added in v1.0.2

func (m *MemberMutation) SettingsIDs() (ids []int)

SettingsIDs returns the "settings" edge IDs in the mutation.

func (*MemberMutation) Signature

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

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

func (*MemberMutation) Sn added in v1.0.2

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

Sn returns the value of the "sn" 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.

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

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

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

func (*MemberQuery) IDs

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

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

func (*MemberQuery) IDsX

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

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

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) QueryEmails added in v1.0.2

func (mq *MemberQuery) QueryEmails() *MemberEmailQuery

QueryEmails chains the current query on the "emails" edge.

func (*MemberQuery) QueryOwner added in v1.0.2

func (mq *MemberQuery) QueryOwner() *GroupQuery

QueryOwner chains the current query on the "owner" edge.

func (*MemberQuery) QuerySettings added in v1.0.2

func (mq *MemberQuery) QuerySettings() *MemberSettingQuery

QuerySettings chains the current query on the "settings" edge.

func (*MemberQuery) Select

func (mq *MemberQuery) Select(field string, 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 {
	Sn string `json:"sn,omitempty"`
}

client.Member.Query().
	Select(member.FieldSn).
	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.

func (*MemberQuery) WithEmails added in v1.0.2

func (mq *MemberQuery) WithEmails(opts ...func(*MemberEmailQuery)) *MemberQuery

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

func (*MemberQuery) WithOwner added in v1.0.2

func (mq *MemberQuery) WithOwner(opts ...func(*GroupQuery)) *MemberQuery

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

func (*MemberQuery) WithSettings added in v1.0.2

func (mq *MemberQuery) WithSettings(opts ...func(*MemberSettingQuery)) *MemberQuery

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

type MemberSecurityLog

type MemberSecurityLog struct {

	// ID of the ent.
	ID uuid.UUID `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) 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) 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 adds a new predicate 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 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.

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

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.

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 uuid.UUID, 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) uuid.UUID

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) ([]uuid.UUID, error)

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

func (*MemberSecurityLogQuery) IDsX

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

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 uuid.UUID, 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) uuid.UUID

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(field string, 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 adds a new predicate for 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 MemberSetting added in v1.0.2

type MemberSetting struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// MemberID holds the value of the "member_id" field.
	MemberID string `json:"member_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 membersetting.Typeof `json:"typeof,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MemberSettingQuery when eager-loading is set.
	Edges MemberSettingEdges `json:"edges"`
	// contains filtered or unexported fields
}

MemberSetting is the model entity for the MemberSetting schema.

func (*MemberSetting) QueryOwner added in v1.0.2

func (ms *MemberSetting) QueryOwner() *MemberQuery

QueryOwner queries the "owner" edge of the MemberSetting entity.

func (*MemberSetting) String added in v1.0.2

func (ms *MemberSetting) String() string

String implements the fmt.Stringer.

func (*MemberSetting) Unwrap added in v1.0.2

func (ms *MemberSetting) Unwrap() *MemberSetting

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

func (ms *MemberSetting) Update() *MemberSettingUpdateOne

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

type MemberSettingClient added in v1.0.2

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

MemberSettingClient is a client for the MemberSetting schema.

func NewMemberSettingClient added in v1.0.2

func NewMemberSettingClient(c config) *MemberSettingClient

NewMemberSettingClient returns a client for the MemberSetting from the given config.

func (*MemberSettingClient) Create added in v1.0.2

Create returns a create builder for MemberSetting.

func (*MemberSettingClient) CreateBulk added in v1.0.2

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

func (*MemberSettingClient) Delete added in v1.0.2

Delete returns a delete builder for MemberSetting.

func (*MemberSettingClient) DeleteOne added in v1.0.2

DeleteOne returns a delete builder for the given entity.

func (*MemberSettingClient) DeleteOneID added in v1.0.2

func (c *MemberSettingClient) DeleteOneID(id int) *MemberSettingDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*MemberSettingClient) Get added in v1.0.2

Get returns a MemberSetting entity by its id.

func (*MemberSettingClient) GetX added in v1.0.2

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

func (*MemberSettingClient) Hooks added in v1.0.2

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

Hooks returns the client hooks.

func (*MemberSettingClient) Query added in v1.0.2

Query returns a query builder for MemberSetting.

func (*MemberSettingClient) QueryOwner added in v1.0.2

func (c *MemberSettingClient) QueryOwner(ms *MemberSetting) *MemberQuery

QueryOwner queries the owner edge of a MemberSetting.

func (*MemberSettingClient) Update added in v1.0.2

Update returns an update builder for MemberSetting.

func (*MemberSettingClient) UpdateOne added in v1.0.2

UpdateOne returns an update builder for the given entity.

func (*MemberSettingClient) UpdateOneID added in v1.0.2

func (c *MemberSettingClient) UpdateOneID(id int) *MemberSettingUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MemberSettingClient) Use added in v1.0.2

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

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

type MemberSettingCreate added in v1.0.2

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

MemberSettingCreate is the builder for creating a MemberSetting entity.

func (*MemberSettingCreate) AddOwner added in v1.0.2

func (msc *MemberSettingCreate) AddOwner(m ...*Member) *MemberSettingCreate

AddOwner adds the "owner" edges to the Member entity.

func (*MemberSettingCreate) AddOwnerIDs added in v1.0.2

func (msc *MemberSettingCreate) AddOwnerIDs(ids ...int) *MemberSettingCreate

AddOwnerIDs adds the "owner" edge to the Member entity by IDs.

func (*MemberSettingCreate) Mutation added in v1.0.2

func (msc *MemberSettingCreate) Mutation() *MemberSettingMutation

Mutation returns the MemberSettingMutation object of the builder.

func (*MemberSettingCreate) Save added in v1.0.2

Save creates the MemberSetting in the database.

func (*MemberSettingCreate) SaveX added in v1.0.2

SaveX calls Save and panics if Save returns an error.

func (*MemberSettingCreate) SetID added in v1.0.2

SetID sets the "id" field.

func (*MemberSettingCreate) SetKey added in v1.0.2

SetKey sets the "key" field.

func (*MemberSettingCreate) SetMemberID added in v1.0.2

func (msc *MemberSettingCreate) SetMemberID(s string) *MemberSettingCreate

SetMemberID sets the "member_id" field.

func (*MemberSettingCreate) SetNillableTypeof added in v1.0.2

func (msc *MemberSettingCreate) SetNillableTypeof(m *membersetting.Typeof) *MemberSettingCreate

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

func (*MemberSettingCreate) SetTypeof added in v1.0.2

SetTypeof sets the "typeof" field.

func (*MemberSettingCreate) SetValue added in v1.0.2

SetValue sets the "value" field.

type MemberSettingCreateBulk added in v1.0.2

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

MemberSettingCreateBulk is the builder for creating many MemberSetting entities in bulk.

func (*MemberSettingCreateBulk) Save added in v1.0.2

Save creates the MemberSetting entities in the database.

func (*MemberSettingCreateBulk) SaveX added in v1.0.2

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

type MemberSettingDelete added in v1.0.2

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

MemberSettingDelete is the builder for deleting a MemberSetting entity.

func (*MemberSettingDelete) Exec added in v1.0.2

func (msd *MemberSettingDelete) Exec(ctx context.Context) (int, error)

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

func (*MemberSettingDelete) ExecX added in v1.0.2

func (msd *MemberSettingDelete) ExecX(ctx context.Context) int

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

func (*MemberSettingDelete) Where added in v1.0.2

Where adds a new predicate to the MemberSettingDelete builder.

type MemberSettingDeleteOne added in v1.0.2

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

MemberSettingDeleteOne is the builder for deleting a single MemberSetting entity.

func (*MemberSettingDeleteOne) Exec added in v1.0.2

func (msdo *MemberSettingDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MemberSettingDeleteOne) ExecX added in v1.0.2

func (msdo *MemberSettingDeleteOne) ExecX(ctx context.Context)

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

type MemberSettingEdges added in v1.0.2

type MemberSettingEdges struct {
	// Owner holds the value of the owner edge.
	Owner []*Member `json:"owner,omitempty"`
	// contains filtered or unexported fields
}

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

func (MemberSettingEdges) OwnerOrErr added in v1.0.2

func (e MemberSettingEdges) OwnerOrErr() ([]*Member, error)

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

type MemberSettingGroupBy added in v1.0.2

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

MemberSettingGroupBy is the group-by builder for MemberSetting entities.

func (*MemberSettingGroupBy) Aggregate added in v1.0.2

func (msgb *MemberSettingGroupBy) Aggregate(fns ...AggregateFunc) *MemberSettingGroupBy

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

func (*MemberSettingGroupBy) Bool added in v1.0.2

func (msgb *MemberSettingGroupBy) 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 (*MemberSettingGroupBy) BoolX added in v1.0.2

func (msgb *MemberSettingGroupBy) BoolX(ctx context.Context) bool

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

func (*MemberSettingGroupBy) Bools added in v1.0.2

func (msgb *MemberSettingGroupBy) 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 (*MemberSettingGroupBy) BoolsX added in v1.0.2

func (msgb *MemberSettingGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MemberSettingGroupBy) Float64 added in v1.0.2

func (msgb *MemberSettingGroupBy) 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 (*MemberSettingGroupBy) Float64X added in v1.0.2

func (msgb *MemberSettingGroupBy) Float64X(ctx context.Context) float64

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

func (*MemberSettingGroupBy) Float64s added in v1.0.2

func (msgb *MemberSettingGroupBy) 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 (*MemberSettingGroupBy) Float64sX added in v1.0.2

func (msgb *MemberSettingGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MemberSettingGroupBy) Int added in v1.0.2

func (msgb *MemberSettingGroupBy) 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 (*MemberSettingGroupBy) IntX added in v1.0.2

func (msgb *MemberSettingGroupBy) IntX(ctx context.Context) int

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

func (*MemberSettingGroupBy) Ints added in v1.0.2

func (msgb *MemberSettingGroupBy) 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 (*MemberSettingGroupBy) IntsX added in v1.0.2

func (msgb *MemberSettingGroupBy) IntsX(ctx context.Context) []int

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

func (*MemberSettingGroupBy) Scan added in v1.0.2

func (msgb *MemberSettingGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*MemberSettingGroupBy) ScanX added in v1.0.2

func (msgb *MemberSettingGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MemberSettingGroupBy) String added in v1.0.2

func (msgb *MemberSettingGroupBy) 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 (*MemberSettingGroupBy) StringX added in v1.0.2

func (msgb *MemberSettingGroupBy) StringX(ctx context.Context) string

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

func (*MemberSettingGroupBy) Strings added in v1.0.2

func (msgb *MemberSettingGroupBy) 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 (*MemberSettingGroupBy) StringsX added in v1.0.2

func (msgb *MemberSettingGroupBy) StringsX(ctx context.Context) []string

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

type MemberSettingMutation added in v1.0.2

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

MemberSettingMutation represents an operation that mutates the MemberSetting nodes in the graph.

func (*MemberSettingMutation) AddField added in v1.0.2

func (m *MemberSettingMutation) 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 (*MemberSettingMutation) AddOwnerIDs added in v1.0.2

func (m *MemberSettingMutation) AddOwnerIDs(ids ...int)

AddOwnerIDs adds the "owner" edge to the Member entity by ids.

func (*MemberSettingMutation) AddedEdges added in v1.0.2

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

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

func (*MemberSettingMutation) AddedField added in v1.0.2

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

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

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

func (*MemberSettingMutation) AddedIDs added in v1.0.2

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

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

func (*MemberSettingMutation) ClearEdge added in v1.0.2

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

func (m *MemberSettingMutation) 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 (*MemberSettingMutation) ClearOwner added in v1.0.2

func (m *MemberSettingMutation) ClearOwner()

ClearOwner clears the "owner" edge to the Member entity.

func (*MemberSettingMutation) ClearedEdges added in v1.0.2

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

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

func (*MemberSettingMutation) ClearedFields added in v1.0.2

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

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

func (MemberSettingMutation) Client added in v1.0.2

func (m MemberSettingMutation) 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 (*MemberSettingMutation) EdgeCleared added in v1.0.2

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

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

func (*MemberSettingMutation) Field added in v1.0.2

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

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

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

func (*MemberSettingMutation) Fields added in v1.0.2

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

func (m *MemberSettingMutation) 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.

func (*MemberSettingMutation) Key added in v1.0.2

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

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

func (*MemberSettingMutation) MemberID added in v1.0.2

func (m *MemberSettingMutation) MemberID() (r string, exists bool)

MemberID returns the value of the "member_id" field in the mutation.

func (*MemberSettingMutation) OldField added in v1.0.2

func (m *MemberSettingMutation) 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 (*MemberSettingMutation) OldKey added in v1.0.2

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

OldKey returns the old "key" field's value of the MemberSetting entity. If the MemberSetting 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 (*MemberSettingMutation) OldMemberID added in v1.0.2

func (m *MemberSettingMutation) OldMemberID(ctx context.Context) (v string, err error)

OldMemberID returns the old "member_id" field's value of the MemberSetting entity. If the MemberSetting 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 (*MemberSettingMutation) OldTypeof added in v1.0.2

func (m *MemberSettingMutation) OldTypeof(ctx context.Context) (v membersetting.Typeof, err error)

OldTypeof returns the old "typeof" field's value of the MemberSetting entity. If the MemberSetting 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 (*MemberSettingMutation) OldValue added in v1.0.2

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

OldValue returns the old "value" field's value of the MemberSetting entity. If the MemberSetting 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 (*MemberSettingMutation) Op added in v1.0.2

func (m *MemberSettingMutation) Op() Op

Op returns the operation name.

func (*MemberSettingMutation) OwnerCleared added in v1.0.2

func (m *MemberSettingMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the Member entity was cleared.

func (*MemberSettingMutation) OwnerIDs added in v1.0.2

func (m *MemberSettingMutation) OwnerIDs() (ids []int)

OwnerIDs returns the "owner" edge IDs in the mutation.

func (*MemberSettingMutation) RemoveOwnerIDs added in v1.0.2

func (m *MemberSettingMutation) RemoveOwnerIDs(ids ...int)

RemoveOwnerIDs removes the "owner" edge to the Member entity by IDs.

func (*MemberSettingMutation) RemovedEdges added in v1.0.2

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

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

func (*MemberSettingMutation) RemovedIDs added in v1.0.2

func (m *MemberSettingMutation) 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 (*MemberSettingMutation) RemovedOwnerIDs added in v1.0.2

func (m *MemberSettingMutation) RemovedOwnerIDs() (ids []int)

RemovedOwner returns the removed IDs of the "owner" edge to the Member entity.

func (*MemberSettingMutation) ResetEdge added in v1.0.2

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

func (m *MemberSettingMutation) 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 (*MemberSettingMutation) ResetKey added in v1.0.2

func (m *MemberSettingMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*MemberSettingMutation) ResetMemberID added in v1.0.2

func (m *MemberSettingMutation) ResetMemberID()

ResetMemberID resets all changes to the "member_id" field.

func (*MemberSettingMutation) ResetOwner added in v1.0.2

func (m *MemberSettingMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*MemberSettingMutation) ResetTypeof added in v1.0.2

func (m *MemberSettingMutation) ResetTypeof()

ResetTypeof resets all changes to the "typeof" field.

func (*MemberSettingMutation) ResetValue added in v1.0.2

func (m *MemberSettingMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*MemberSettingMutation) SetField added in v1.0.2

func (m *MemberSettingMutation) 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 (*MemberSettingMutation) SetID added in v1.0.2

func (m *MemberSettingMutation) SetID(id int)

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

func (*MemberSettingMutation) SetKey added in v1.0.2

func (m *MemberSettingMutation) SetKey(s string)

SetKey sets the "key" field.

func (*MemberSettingMutation) SetMemberID added in v1.0.2

func (m *MemberSettingMutation) SetMemberID(s string)

SetMemberID sets the "member_id" field.

func (*MemberSettingMutation) SetTypeof added in v1.0.2

func (m *MemberSettingMutation) SetTypeof(value membersetting.Typeof)

SetTypeof sets the "typeof" field.

func (*MemberSettingMutation) SetValue added in v1.0.2

func (m *MemberSettingMutation) SetValue(s string)

SetValue sets the "value" field.

func (MemberSettingMutation) Tx added in v1.0.2

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

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

func (*MemberSettingMutation) Type added in v1.0.2

func (m *MemberSettingMutation) Type() string

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

func (*MemberSettingMutation) Typeof added in v1.0.2

func (m *MemberSettingMutation) Typeof() (r membersetting.Typeof, exists bool)

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

func (*MemberSettingMutation) Value added in v1.0.2

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

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

type MemberSettingQuery added in v1.0.2

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

MemberSettingQuery is the builder for querying MemberSetting entities.

func (*MemberSettingQuery) All added in v1.0.2

All executes the query and returns a list of MemberSettings.

func (*MemberSettingQuery) AllX added in v1.0.2

func (msq *MemberSettingQuery) AllX(ctx context.Context) []*MemberSetting

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

func (*MemberSettingQuery) Clone added in v1.0.2

func (msq *MemberSettingQuery) Clone() *MemberSettingQuery

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

func (*MemberSettingQuery) Count added in v1.0.2

func (msq *MemberSettingQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MemberSettingQuery) CountX added in v1.0.2

func (msq *MemberSettingQuery) CountX(ctx context.Context) int

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

func (*MemberSettingQuery) Exist added in v1.0.2

func (msq *MemberSettingQuery) Exist(ctx context.Context) (bool, error)

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

func (*MemberSettingQuery) ExistX added in v1.0.2

func (msq *MemberSettingQuery) ExistX(ctx context.Context) bool

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

func (*MemberSettingQuery) First added in v1.0.2

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

func (*MemberSettingQuery) FirstID added in v1.0.2

func (msq *MemberSettingQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*MemberSettingQuery) FirstIDX added in v1.0.2

func (msq *MemberSettingQuery) FirstIDX(ctx context.Context) int

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

func (*MemberSettingQuery) FirstX added in v1.0.2

func (msq *MemberSettingQuery) FirstX(ctx context.Context) *MemberSetting

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

func (*MemberSettingQuery) GroupBy added in v1.0.2

func (msq *MemberSettingQuery) GroupBy(field string, fields ...string) *MemberSettingGroupBy

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

client.MemberSetting.Query().
	GroupBy(membersetting.FieldMemberID).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*MemberSettingQuery) IDs added in v1.0.2

func (msq *MemberSettingQuery) IDs(ctx context.Context) ([]int, error)

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

func (*MemberSettingQuery) IDsX added in v1.0.2

func (msq *MemberSettingQuery) IDsX(ctx context.Context) []int

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

func (*MemberSettingQuery) Limit added in v1.0.2

func (msq *MemberSettingQuery) Limit(limit int) *MemberSettingQuery

Limit adds a limit step to the query.

func (*MemberSettingQuery) Offset added in v1.0.2

func (msq *MemberSettingQuery) Offset(offset int) *MemberSettingQuery

Offset adds an offset step to the query.

func (*MemberSettingQuery) Only added in v1.0.2

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

func (*MemberSettingQuery) OnlyID added in v1.0.2

func (msq *MemberSettingQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*MemberSettingQuery) OnlyIDX added in v1.0.2

func (msq *MemberSettingQuery) OnlyIDX(ctx context.Context) int

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

func (*MemberSettingQuery) OnlyX added in v1.0.2

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

func (*MemberSettingQuery) Order added in v1.0.2

Order adds an order step to the query.

func (*MemberSettingQuery) QueryOwner added in v1.0.2

func (msq *MemberSettingQuery) QueryOwner() *MemberQuery

QueryOwner chains the current query on the "owner" edge.

func (*MemberSettingQuery) Select added in v1.0.2

func (msq *MemberSettingQuery) Select(field string, fields ...string) *MemberSettingSelect

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

client.MemberSetting.Query().
	Select(membersetting.FieldMemberID).
	Scan(ctx, &v)

func (*MemberSettingQuery) Unique added in v1.0.2

func (msq *MemberSettingQuery) Unique(unique bool) *MemberSettingQuery

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

Where adds a new predicate for the MemberSettingQuery builder.

func (*MemberSettingQuery) WithOwner added in v1.0.2

func (msq *MemberSettingQuery) WithOwner(opts ...func(*MemberQuery)) *MemberSettingQuery

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

type MemberSettingSelect added in v1.0.2

type MemberSettingSelect struct {
	*MemberSettingQuery
	// contains filtered or unexported fields
}

MemberSettingSelect is the builder for selecting fields of MemberSetting entities.

func (*MemberSettingSelect) Bool added in v1.0.2

func (mss *MemberSettingSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*MemberSettingSelect) BoolX added in v1.0.2

func (mss *MemberSettingSelect) BoolX(ctx context.Context) bool

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

func (*MemberSettingSelect) Bools added in v1.0.2

func (mss *MemberSettingSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*MemberSettingSelect) BoolsX added in v1.0.2

func (mss *MemberSettingSelect) BoolsX(ctx context.Context) []bool

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

func (*MemberSettingSelect) Float64 added in v1.0.2

func (mss *MemberSettingSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*MemberSettingSelect) Float64X added in v1.0.2

func (mss *MemberSettingSelect) Float64X(ctx context.Context) float64

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

func (*MemberSettingSelect) Float64s added in v1.0.2

func (mss *MemberSettingSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*MemberSettingSelect) Float64sX added in v1.0.2

func (mss *MemberSettingSelect) Float64sX(ctx context.Context) []float64

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

func (*MemberSettingSelect) Int added in v1.0.2

func (mss *MemberSettingSelect) Int(ctx context.Context) (_ int, err error)

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

func (*MemberSettingSelect) IntX added in v1.0.2

func (mss *MemberSettingSelect) IntX(ctx context.Context) int

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

func (*MemberSettingSelect) Ints added in v1.0.2

func (mss *MemberSettingSelect) Ints(ctx context.Context) ([]int, error)

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

func (*MemberSettingSelect) IntsX added in v1.0.2

func (mss *MemberSettingSelect) IntsX(ctx context.Context) []int

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

func (*MemberSettingSelect) Scan added in v1.0.2

func (mss *MemberSettingSelect) Scan(ctx context.Context, v interface{}) error

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

func (*MemberSettingSelect) ScanX added in v1.0.2

func (mss *MemberSettingSelect) ScanX(ctx context.Context, v interface{})

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

func (*MemberSettingSelect) String added in v1.0.2

func (mss *MemberSettingSelect) String(ctx context.Context) (_ string, err error)

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

func (*MemberSettingSelect) StringX added in v1.0.2

func (mss *MemberSettingSelect) StringX(ctx context.Context) string

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

func (*MemberSettingSelect) Strings added in v1.0.2

func (mss *MemberSettingSelect) Strings(ctx context.Context) ([]string, error)

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

func (*MemberSettingSelect) StringsX added in v1.0.2

func (mss *MemberSettingSelect) StringsX(ctx context.Context) []string

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

type MemberSettingUpdate added in v1.0.2

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

MemberSettingUpdate is the builder for updating MemberSetting entities.

func (*MemberSettingUpdate) AddOwner added in v1.0.2

func (msu *MemberSettingUpdate) AddOwner(m ...*Member) *MemberSettingUpdate

AddOwner adds the "owner" edges to the Member entity.

func (*MemberSettingUpdate) AddOwnerIDs added in v1.0.2

func (msu *MemberSettingUpdate) AddOwnerIDs(ids ...int) *MemberSettingUpdate

AddOwnerIDs adds the "owner" edge to the Member entity by IDs.

func (*MemberSettingUpdate) ClearOwner added in v1.0.2

func (msu *MemberSettingUpdate) ClearOwner() *MemberSettingUpdate

ClearOwner clears all "owner" edges to the Member entity.

func (*MemberSettingUpdate) Exec added in v1.0.2

func (msu *MemberSettingUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberSettingUpdate) ExecX added in v1.0.2

func (msu *MemberSettingUpdate) ExecX(ctx context.Context)

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

func (*MemberSettingUpdate) Mutation added in v1.0.2

func (msu *MemberSettingUpdate) Mutation() *MemberSettingMutation

Mutation returns the MemberSettingMutation object of the builder.

func (*MemberSettingUpdate) RemoveOwner added in v1.0.2

func (msu *MemberSettingUpdate) RemoveOwner(m ...*Member) *MemberSettingUpdate

RemoveOwner removes "owner" edges to Member entities.

func (*MemberSettingUpdate) RemoveOwnerIDs added in v1.0.2

func (msu *MemberSettingUpdate) RemoveOwnerIDs(ids ...int) *MemberSettingUpdate

RemoveOwnerIDs removes the "owner" edge to Member entities by IDs.

func (*MemberSettingUpdate) Save added in v1.0.2

func (msu *MemberSettingUpdate) Save(ctx context.Context) (int, error)

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

func (*MemberSettingUpdate) SaveX added in v1.0.2

func (msu *MemberSettingUpdate) SaveX(ctx context.Context) int

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

func (*MemberSettingUpdate) SetKey added in v1.0.2

SetKey sets the "key" field.

func (*MemberSettingUpdate) SetNillableTypeof added in v1.0.2

func (msu *MemberSettingUpdate) SetNillableTypeof(m *membersetting.Typeof) *MemberSettingUpdate

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

func (*MemberSettingUpdate) SetTypeof added in v1.0.2

SetTypeof sets the "typeof" field.

func (*MemberSettingUpdate) SetValue added in v1.0.2

SetValue sets the "value" field.

func (*MemberSettingUpdate) Where added in v1.0.2

Where adds a new predicate for the MemberSettingUpdate builder.

type MemberSettingUpdateOne added in v1.0.2

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

MemberSettingUpdateOne is the builder for updating a single MemberSetting entity.

func (*MemberSettingUpdateOne) AddOwner added in v1.0.2

func (msuo *MemberSettingUpdateOne) AddOwner(m ...*Member) *MemberSettingUpdateOne

AddOwner adds the "owner" edges to the Member entity.

func (*MemberSettingUpdateOne) AddOwnerIDs added in v1.0.2

func (msuo *MemberSettingUpdateOne) AddOwnerIDs(ids ...int) *MemberSettingUpdateOne

AddOwnerIDs adds the "owner" edge to the Member entity by IDs.

func (*MemberSettingUpdateOne) ClearOwner added in v1.0.2

func (msuo *MemberSettingUpdateOne) ClearOwner() *MemberSettingUpdateOne

ClearOwner clears all "owner" edges to the Member entity.

func (*MemberSettingUpdateOne) Exec added in v1.0.2

func (msuo *MemberSettingUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MemberSettingUpdateOne) ExecX added in v1.0.2

func (msuo *MemberSettingUpdateOne) ExecX(ctx context.Context)

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

func (*MemberSettingUpdateOne) Mutation added in v1.0.2

Mutation returns the MemberSettingMutation object of the builder.

func (*MemberSettingUpdateOne) RemoveOwner added in v1.0.2

func (msuo *MemberSettingUpdateOne) RemoveOwner(m ...*Member) *MemberSettingUpdateOne

RemoveOwner removes "owner" edges to Member entities.

func (*MemberSettingUpdateOne) RemoveOwnerIDs added in v1.0.2

func (msuo *MemberSettingUpdateOne) RemoveOwnerIDs(ids ...int) *MemberSettingUpdateOne

RemoveOwnerIDs removes the "owner" edge to Member entities by IDs.

func (*MemberSettingUpdateOne) Save added in v1.0.2

Save executes the query and returns the updated MemberSetting entity.

func (*MemberSettingUpdateOne) SaveX added in v1.0.2

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

func (*MemberSettingUpdateOne) Select added in v1.0.2

func (msuo *MemberSettingUpdateOne) Select(field string, fields ...string) *MemberSettingUpdateOne

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

func (*MemberSettingUpdateOne) SetKey added in v1.0.2

SetKey sets the "key" field.

func (*MemberSettingUpdateOne) SetNillableTypeof added in v1.0.2

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

func (*MemberSettingUpdateOne) SetTypeof added in v1.0.2

SetTypeof sets the "typeof" field.

func (*MemberSettingUpdateOne) SetValue added in v1.0.2

SetValue sets the "value" field.

type MemberSettings added in v1.0.2

type MemberSettings []*MemberSetting

MemberSettings is a parsable slice of MemberSetting.

type MemberUpdate

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

MemberUpdate is the builder for updating Member entities.

func (*MemberUpdate) AddEmailIDs added in v1.0.2

func (mu *MemberUpdate) AddEmailIDs(ids ...int) *MemberUpdate

AddEmailIDs adds the "emails" edge to the MemberEmail entity by IDs.

func (*MemberUpdate) AddEmails added in v1.0.2

func (mu *MemberUpdate) AddEmails(m ...*MemberEmail) *MemberUpdate

AddEmails adds the "emails" edges to the MemberEmail entity.

func (*MemberUpdate) AddGroupID added in v1.0.2

func (mu *MemberUpdate) AddGroupID(i int) *MemberUpdate

AddGroupID adds i to the "group_id" field.

func (*MemberUpdate) AddSettingIDs added in v1.0.2

func (mu *MemberUpdate) AddSettingIDs(ids ...int) *MemberUpdate

AddSettingIDs adds the "settings" edge to the MemberSetting entity by IDs.

func (*MemberUpdate) AddSettings added in v1.0.2

func (mu *MemberUpdate) AddSettings(m ...*MemberSetting) *MemberUpdate

AddSettings adds the "settings" edges to the MemberSetting entity.

func (*MemberUpdate) ClearDeleteTime

func (mu *MemberUpdate) ClearDeleteTime() *MemberUpdate

ClearDeleteTime clears the value of the "delete_time" field.

func (*MemberUpdate) ClearEmails added in v1.0.2

func (mu *MemberUpdate) ClearEmails() *MemberUpdate

ClearEmails clears all "emails" edges to the MemberEmail entity.

func (*MemberUpdate) ClearGroupID added in v1.0.2

func (mu *MemberUpdate) ClearGroupID() *MemberUpdate

ClearGroupID clears the value of the "group_id" field.

func (*MemberUpdate) ClearLastPwdAuth

func (mu *MemberUpdate) ClearLastPwdAuth() *MemberUpdate

ClearLastPwdAuth clears the value of the "last_pwd_auth" field.

func (*MemberUpdate) ClearOwner added in v1.0.2

func (mu *MemberUpdate) ClearOwner() *MemberUpdate

ClearOwner clears the "owner" edge to the Group entity.

func (*MemberUpdate) ClearPhone

func (mu *MemberUpdate) ClearPhone() *MemberUpdate

ClearPhone clears the value of the "phone" field.

func (*MemberUpdate) ClearSettings added in v1.0.2

func (mu *MemberUpdate) ClearSettings() *MemberUpdate

ClearSettings clears all "settings" edges to the MemberSetting entity.

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) RemoveEmailIDs added in v1.0.2

func (mu *MemberUpdate) RemoveEmailIDs(ids ...int) *MemberUpdate

RemoveEmailIDs removes the "emails" edge to MemberEmail entities by IDs.

func (*MemberUpdate) RemoveEmails added in v1.0.2

func (mu *MemberUpdate) RemoveEmails(m ...*MemberEmail) *MemberUpdate

RemoveEmails removes "emails" edges to MemberEmail entities.

func (*MemberUpdate) RemoveSettingIDs added in v1.0.2

func (mu *MemberUpdate) RemoveSettingIDs(ids ...int) *MemberUpdate

RemoveSettingIDs removes the "settings" edge to MemberSetting entities by IDs.

func (*MemberUpdate) RemoveSettings added in v1.0.2

func (mu *MemberUpdate) RemoveSettings(m ...*MemberSetting) *MemberUpdate

RemoveSettings removes "settings" edges to MemberSetting entities.

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) SetGroupID added in v1.0.2

func (mu *MemberUpdate) SetGroupID(i int) *MemberUpdate

SetGroupID sets the "group_id" 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) SetNillableGroupID added in v1.0.2

func (mu *MemberUpdate) SetNillableGroupID(i *int) *MemberUpdate

SetNillableGroupID sets the "group_id" 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) SetNillableOwnerID added in v1.0.2

func (mu *MemberUpdate) SetNillableOwnerID(id *int) *MemberUpdate

SetNillableOwnerID sets the "owner" edge to the Group entity by ID 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) SetOwner added in v1.0.2

func (mu *MemberUpdate) SetOwner(g *Group) *MemberUpdate

SetOwner sets the "owner" edge to the Group entity.

func (*MemberUpdate) SetOwnerID added in v1.0.2

func (mu *MemberUpdate) SetOwnerID(id int) *MemberUpdate

SetOwnerID sets the "owner" edge to the Group entity by ID.

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 adds a new predicate for 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) AddEmailIDs added in v1.0.2

func (muo *MemberUpdateOne) AddEmailIDs(ids ...int) *MemberUpdateOne

AddEmailIDs adds the "emails" edge to the MemberEmail entity by IDs.

func (*MemberUpdateOne) AddEmails added in v1.0.2

func (muo *MemberUpdateOne) AddEmails(m ...*MemberEmail) *MemberUpdateOne

AddEmails adds the "emails" edges to the MemberEmail entity.

func (*MemberUpdateOne) AddGroupID added in v1.0.2

func (muo *MemberUpdateOne) AddGroupID(i int) *MemberUpdateOne

AddGroupID adds i to the "group_id" field.

func (*MemberUpdateOne) AddSettingIDs added in v1.0.2

func (muo *MemberUpdateOne) AddSettingIDs(ids ...int) *MemberUpdateOne

AddSettingIDs adds the "settings" edge to the MemberSetting entity by IDs.

func (*MemberUpdateOne) AddSettings added in v1.0.2

func (muo *MemberUpdateOne) AddSettings(m ...*MemberSetting) *MemberUpdateOne

AddSettings adds the "settings" edges to the MemberSetting entity.

func (*MemberUpdateOne) ClearDeleteTime

func (muo *MemberUpdateOne) ClearDeleteTime() *MemberUpdateOne

ClearDeleteTime clears the value of the "delete_time" field.

func (*MemberUpdateOne) ClearEmails added in v1.0.2

func (muo *MemberUpdateOne) ClearEmails() *MemberUpdateOne

ClearEmails clears all "emails" edges to the MemberEmail entity.

func (*MemberUpdateOne) ClearGroupID added in v1.0.2

func (muo *MemberUpdateOne) ClearGroupID() *MemberUpdateOne

ClearGroupID clears the value of the "group_id" field.

func (*MemberUpdateOne) ClearLastPwdAuth

func (muo *MemberUpdateOne) ClearLastPwdAuth() *MemberUpdateOne

ClearLastPwdAuth clears the value of the "last_pwd_auth" field.

func (*MemberUpdateOne) ClearOwner added in v1.0.2

func (muo *MemberUpdateOne) ClearOwner() *MemberUpdateOne

ClearOwner clears the "owner" edge to the Group entity.

func (*MemberUpdateOne) ClearPhone

func (muo *MemberUpdateOne) ClearPhone() *MemberUpdateOne

ClearPhone clears the value of the "phone" field.

func (*MemberUpdateOne) ClearSettings added in v1.0.2

func (muo *MemberUpdateOne) ClearSettings() *MemberUpdateOne

ClearSettings clears all "settings" edges to the MemberSetting entity.

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) RemoveEmailIDs added in v1.0.2

func (muo *MemberUpdateOne) RemoveEmailIDs(ids ...int) *MemberUpdateOne

RemoveEmailIDs removes the "emails" edge to MemberEmail entities by IDs.

func (*MemberUpdateOne) RemoveEmails added in v1.0.2

func (muo *MemberUpdateOne) RemoveEmails(m ...*MemberEmail) *MemberUpdateOne

RemoveEmails removes "emails" edges to MemberEmail entities.

func (*MemberUpdateOne) RemoveSettingIDs added in v1.0.2

func (muo *MemberUpdateOne) RemoveSettingIDs(ids ...int) *MemberUpdateOne

RemoveSettingIDs removes the "settings" edge to MemberSetting entities by IDs.

func (*MemberUpdateOne) RemoveSettings added in v1.0.2

func (muo *MemberUpdateOne) RemoveSettings(m ...*MemberSetting) *MemberUpdateOne

RemoveSettings removes "settings" edges to MemberSetting entities.

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) SetGroupID added in v1.0.2

func (muo *MemberUpdateOne) SetGroupID(i int) *MemberUpdateOne

SetGroupID sets the "group_id" 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) SetNillableGroupID added in v1.0.2

func (muo *MemberUpdateOne) SetNillableGroupID(i *int) *MemberUpdateOne

SetNillableGroupID sets the "group_id" 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) SetNillableOwnerID added in v1.0.2

func (muo *MemberUpdateOne) SetNillableOwnerID(id *int) *MemberUpdateOne

SetNillableOwnerID sets the "owner" edge to the Group entity by ID 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) SetOwner added in v1.0.2

func (muo *MemberUpdateOne) SetOwner(g *Group) *MemberUpdateOne

SetOwner sets the "owner" edge to the Group entity.

func (*MemberUpdateOne) SetOwnerID added in v1.0.2

func (muo *MemberUpdateOne) SetOwnerID(id int) *MemberUpdateOne

SetOwnerID sets the "owner" edge to the Group entity by ID.

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) 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) 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 adds a new predicate 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.

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.

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(field string, 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 adds a new predicate for 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 {

	// Group is the client for interacting with the Group builders.
	Group *GroupClient
	// Member is the client for interacting with the Member builders.
	Member *MemberClient
	// MemberEmail is the client for interacting with the MemberEmail builders.
	MemberEmail *MemberEmailClient
	// MemberSecurityLog is the client for interacting with the MemberSecurityLog builders.
	MemberSecurityLog *MemberSecurityLogClient
	// MemberSetting is the client for interacting with the MemberSetting builders.
	MemberSetting *MemberSettingClient
	// 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL