ent

package
v0.0.0-...-d1147f9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeGuild            = "Guild"
	TypeGuildAdminConfig = "GuildAdminConfig"
	TypeGuildConfig      = "GuildConfig"
	TypeGuildEvent       = "GuildEvent"
	TypeUser             = "User"
)

Variables

View Source
var (
	// GuildOrderFieldName orders Guild by name.
	GuildOrderFieldName = &GuildOrderField{
		Value: func(gu *Guild) (ent.Value, error) {
			return gu.Name, nil
		},
		column: guild.FieldName,
		toTerm: guild.ByName,
		toCursor: func(gu *Guild) Cursor {
			return Cursor{
				ID:    gu.ID,
				Value: gu.Name,
			}
		},
	}
	// GuildOrderFieldJoinedAt orders Guild by joined_at.
	GuildOrderFieldJoinedAt = &GuildOrderField{
		Value: func(gu *Guild) (ent.Value, error) {
			return gu.JoinedAt, nil
		},
		column: guild.FieldJoinedAt,
		toTerm: guild.ByJoinedAt,
		toCursor: func(gu *Guild) Cursor {
			return Cursor{
				ID:    gu.ID,
				Value: gu.JoinedAt,
			}
		},
	}
)
View Source
var (
	// GuildEventOrderFieldCreateTime orders GuildEvent by create_time.
	GuildEventOrderFieldCreateTime = &GuildEventOrderField{
		Value: func(ge *GuildEvent) (ent.Value, error) {
			return ge.CreateTime, nil
		},
		column: guildevent.FieldCreateTime,
		toTerm: guildevent.ByCreateTime,
		toCursor: func(ge *GuildEvent) Cursor {
			return Cursor{
				ID:    ge.ID,
				Value: ge.CreateTime,
			}
		},
	}
	// GuildEventOrderFieldUpdateTime orders GuildEvent by update_time.
	GuildEventOrderFieldUpdateTime = &GuildEventOrderField{
		Value: func(ge *GuildEvent) (ent.Value, error) {
			return ge.UpdateTime, nil
		},
		column: guildevent.FieldUpdateTime,
		toTerm: guildevent.ByUpdateTime,
		toCursor: func(ge *GuildEvent) Cursor {
			return Cursor{
				ID:    ge.ID,
				Value: ge.UpdateTime,
			}
		},
	}
)
View Source
var (
	// UserOrderFieldUsername orders User by username.
	UserOrderFieldUsername = &UserOrderField{
		Value: func(u *User) (ent.Value, error) {
			return u.Username, nil
		},
		column: user.FieldUsername,
		toTerm: user.ByUsername,
		toCursor: func(u *User) Cursor {
			return Cursor{
				ID:    u.ID,
				Value: u.Username,
			}
		},
	}
	// UserOrderFieldDiscriminator orders User by discriminator.
	UserOrderFieldDiscriminator = &UserOrderField{
		Value: func(u *User) (ent.Value, error) {
			return u.Discriminator, nil
		},
		column: user.FieldDiscriminator,
		toTerm: user.ByDiscriminator,
		toCursor: func(u *User) Cursor {
			return Cursor{
				ID:    u.ID,
				Value: u.Discriminator,
			}
		},
	}
	// UserOrderFieldEmail orders User by email.
	UserOrderFieldEmail = &UserOrderField{
		Value: func(u *User) (ent.Value, error) {
			return u.Email, nil
		},
		column: user.FieldEmail,
		toTerm: user.ByEmail,
		toCursor: func(u *User) Cursor {
			return Cursor{
				ID:    u.ID,
				Value: u.Email,
			}
		},
	}
)
View Source
var DefaultGuildAdminConfigOrder = &GuildAdminConfigOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &GuildAdminConfigOrderField{
		Value: func(gac *GuildAdminConfig) (ent.Value, error) {
			return gac.ID, nil
		},
		column: guildadminconfig.FieldID,
		toTerm: guildadminconfig.ByID,
		toCursor: func(gac *GuildAdminConfig) Cursor {
			return Cursor{ID: gac.ID}
		},
	},
}

DefaultGuildAdminConfigOrder is the default ordering of GuildAdminConfig.

View Source
var DefaultGuildConfigOrder = &GuildConfigOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &GuildConfigOrderField{
		Value: func(gc *GuildConfig) (ent.Value, error) {
			return gc.ID, nil
		},
		column: guildconfig.FieldID,
		toTerm: guildconfig.ByID,
		toCursor: func(gc *GuildConfig) Cursor {
			return Cursor{ID: gc.ID}
		},
	},
}

DefaultGuildConfigOrder is the default ordering of GuildConfig.

View Source
var DefaultGuildEventOrder = &GuildEventOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &GuildEventOrderField{
		Value: func(ge *GuildEvent) (ent.Value, error) {
			return ge.ID, nil
		},
		column: guildevent.FieldID,
		toTerm: guildevent.ByID,
		toCursor: func(ge *GuildEvent) Cursor {
			return Cursor{ID: ge.ID}
		},
	},
}

DefaultGuildEventOrder is the default ordering of GuildEvent.

View Source
var DefaultGuildOrder = &GuildOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &GuildOrderField{
		Value: func(gu *Guild) (ent.Value, error) {
			return gu.ID, nil
		},
		column: guild.FieldID,
		toTerm: guild.ByID,
		toCursor: func(gu *Guild) Cursor {
			return Cursor{ID: gu.ID}
		},
	},
}

DefaultGuildOrder is the default ordering of Guild.

View Source
var DefaultUserOrder = &UserOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &UserOrderField{
		Value: func(u *User) (ent.Value, error) {
			return u.ID, nil
		},
		column: user.FieldID,
		toTerm: user.ByID,
		toCursor: func(u *User) Cursor {
			return Cursor{ID: u.ID}
		},
	},
}

DefaultUserOrder is the default ordering of User.

View Source
var ErrEmptyGuildAdminConfigWhereInput = errors.New("ent: empty predicate GuildAdminConfigWhereInput")

ErrEmptyGuildAdminConfigWhereInput is returned in case the GuildAdminConfigWhereInput is empty.

View Source
var ErrEmptyGuildConfigWhereInput = errors.New("ent: empty predicate GuildConfigWhereInput")

ErrEmptyGuildConfigWhereInput is returned in case the GuildConfigWhereInput is empty.

View Source
var ErrEmptyGuildEventWhereInput = errors.New("ent: empty predicate GuildEventWhereInput")

ErrEmptyGuildEventWhereInput is returned in case the GuildEventWhereInput is empty.

View Source
var ErrEmptyGuildWhereInput = errors.New("ent: empty predicate GuildWhereInput")

ErrEmptyGuildWhereInput is returned in case the GuildWhereInput is empty.

View Source
var ErrEmptyUserWhereInput = errors.New("ent: empty predicate UserWhereInput")

ErrEmptyUserWhereInput is returned in case the UserWhereInput is empty.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

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(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Guild is the client for interacting with the Guild builders.
	Guild *GuildClient
	// GuildAdminConfig is the client for interacting with the GuildAdminConfig builders.
	GuildAdminConfig *GuildAdminConfigClient
	// GuildConfig is the client for interacting with the GuildConfig builders.
	GuildConfig *GuildConfigClient
	// GuildEvent is the client for interacting with the GuildEvent builders.
	GuildEvent *GuildEventClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

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

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

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

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

func (*Client) BeginTx

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

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

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

func (*Client) Debug

func (c *Client) Debug() *Client

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

client.Debug().
	Guild.
	Query().
	Count(ctx)

func (*Client) Intercept

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

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Noder

func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

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

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

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

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

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Cursor

type Cursor = entgql.Cursor[int]

Common entgql types.

type Guild

type Guild struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Guild id.
	GuildID string `json:"guild_id,omitempty"`
	// Guild name (2-100 chars, excl. trailing/leading spaces).
	Name string `json:"name,omitempty"`
	// Enabled guild features.
	Features []string `json:"features,omitempty"`
	// Icon hash.
	IconHash string `json:"icon_hash,omitempty"`
	// IconURL holds the value of the "icon_url" field.
	IconURL string `json:"icon_url,omitempty"`
	// When the bot joined the guild.
	JoinedAt *time.Time `json:"joined_at,omitempty"`
	// True if the guild is considered large (according to Discord standards).
	Large bool `json:"large,omitempty"`
	// Total number of members in the guild.
	MemberCount int `json:"member_count,omitempty"`
	// Discord snowflake ID of the user that owns the guild.
	OwnerID string `json:"owner_id,omitempty"`
	// Permissions of the bot on this guild (excludes overrides).
	Permissions uint64 `json:"permissions,omitempty"`
	// System channel flags.
	SystemChannelFlags string `json:"system_channel_flags,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GuildQuery when eager-loading is set.
	Edges GuildEdges `json:"edges"`
	// contains filtered or unexported fields
}

Guild is the model entity for the Guild schema.

func (*Guild) Admins

func (gu *Guild) Admins(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *UserOrder, where *UserWhereInput,
) (*UserConnection, error)

func (*Guild) GuildAdminConfig

func (gu *Guild) GuildAdminConfig(ctx context.Context) (*GuildAdminConfig, error)

func (*Guild) GuildConfig

func (gu *Guild) GuildConfig(ctx context.Context) (*GuildConfig, error)

func (*Guild) GuildEvents

func (gu *Guild) GuildEvents(ctx context.Context) (result []*GuildEvent, err error)

func (*Guild) IsNode

func (n *Guild) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Guild) NamedAdmins

func (gu *Guild) NamedAdmins(name string) ([]*User, error)

NamedAdmins returns the Admins named value or an error if the edge was not loaded in eager-loading with this name.

func (*Guild) NamedGuildEvents

func (gu *Guild) NamedGuildEvents(name string) ([]*GuildEvent, error)

NamedGuildEvents returns the GuildEvents named value or an error if the edge was not loaded in eager-loading with this name.

func (*Guild) QueryAdmins

func (gu *Guild) QueryAdmins() *UserQuery

QueryAdmins queries the "admins" edge of the Guild entity.

func (*Guild) QueryGuildAdminConfig

func (gu *Guild) QueryGuildAdminConfig() *GuildAdminConfigQuery

QueryGuildAdminConfig queries the "guild_admin_config" edge of the Guild entity.

func (*Guild) QueryGuildConfig

func (gu *Guild) QueryGuildConfig() *GuildConfigQuery

QueryGuildConfig queries the "guild_config" edge of the Guild entity.

func (*Guild) QueryGuildEvents

func (gu *Guild) QueryGuildEvents() *GuildEventQuery

QueryGuildEvents queries the "guild_events" edge of the Guild entity.

func (*Guild) String

func (gu *Guild) String() string

String implements the fmt.Stringer.

func (*Guild) ToEdge

func (gu *Guild) ToEdge(order *GuildOrder) *GuildEdge

ToEdge converts Guild into GuildEdge.

func (*Guild) Unwrap

func (gu *Guild) Unwrap() *Guild

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

func (gu *Guild) Update() *GuildUpdateOne

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

func (*Guild) Value

func (gu *Guild) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Guild. This includes values selected through modifiers, order, etc.

type GuildAdminConfig

type GuildAdminConfig struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// True if the guild should be monitored/acted upon (overrides user-defined settings).
	Enabled bool `json:"enabled,omitempty"`
	// Default max channels for the guild (overrides user-defined settings).
	DefaultMaxChannels int `json:"default_max_channels,omitempty"`
	// Default max clones for the guild (overrides user-defined settings).
	DefaultMaxClones int `json:"default_max_clones,omitempty"`
	// Admin comment for the guild.
	Comment string `json:"comment,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GuildAdminConfigQuery when eager-loading is set.
	Edges GuildAdminConfigEdges `json:"edges"`
	// contains filtered or unexported fields
}

GuildAdminConfig is the model entity for the GuildAdminConfig schema.

func (*GuildAdminConfig) Guild

func (gac *GuildAdminConfig) Guild(ctx context.Context) (*Guild, error)

func (*GuildAdminConfig) IsNode

func (n *GuildAdminConfig) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*GuildAdminConfig) QueryGuild

func (gac *GuildAdminConfig) QueryGuild() *GuildQuery

QueryGuild queries the "guild" edge of the GuildAdminConfig entity.

func (*GuildAdminConfig) String

func (gac *GuildAdminConfig) String() string

String implements the fmt.Stringer.

func (*GuildAdminConfig) ToEdge

ToEdge converts GuildAdminConfig into GuildAdminConfigEdge.

func (*GuildAdminConfig) Unwrap

func (gac *GuildAdminConfig) Unwrap() *GuildAdminConfig

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

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

func (*GuildAdminConfig) Value

func (gac *GuildAdminConfig) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the GuildAdminConfig. This includes values selected through modifiers, order, etc.

type GuildAdminConfigClient

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

GuildAdminConfigClient is a client for the GuildAdminConfig schema.

func NewGuildAdminConfigClient

func NewGuildAdminConfigClient(c config) *GuildAdminConfigClient

NewGuildAdminConfigClient returns a client for the GuildAdminConfig from the given config.

func (*GuildAdminConfigClient) Create

Create returns a builder for creating a GuildAdminConfig entity.

func (*GuildAdminConfigClient) CreateBulk

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

func (*GuildAdminConfigClient) Delete

Delete returns a delete builder for GuildAdminConfig.

func (*GuildAdminConfigClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GuildAdminConfigClient) DeleteOneID

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

func (*GuildAdminConfigClient) Get

Get returns a GuildAdminConfig entity by its id.

func (*GuildAdminConfigClient) GetX

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

func (*GuildAdminConfigClient) Hooks

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

Hooks returns the client hooks.

func (*GuildAdminConfigClient) Intercept

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

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

func (*GuildAdminConfigClient) Interceptors

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

Interceptors returns the client interceptors.

func (*GuildAdminConfigClient) Query

Query returns a query builder for GuildAdminConfig.

func (*GuildAdminConfigClient) QueryGuild

func (c *GuildAdminConfigClient) QueryGuild(gac *GuildAdminConfig) *GuildQuery

QueryGuild queries the guild edge of a GuildAdminConfig.

func (*GuildAdminConfigClient) Update

Update returns an update builder for GuildAdminConfig.

func (*GuildAdminConfigClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GuildAdminConfigClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*GuildAdminConfigClient) Use

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

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

type GuildAdminConfigConnection

type GuildAdminConfigConnection struct {
	Edges      []*GuildAdminConfigEdge `json:"edges"`
	PageInfo   PageInfo                `json:"pageInfo"`
	TotalCount int                     `json:"totalCount"`
}

GuildAdminConfigConnection is the connection containing edges to GuildAdminConfig.

type GuildAdminConfigCreate

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

GuildAdminConfigCreate is the builder for creating a GuildAdminConfig entity.

func (*GuildAdminConfigCreate) Exec

func (gacc *GuildAdminConfigCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildAdminConfigCreate) ExecX

func (gacc *GuildAdminConfigCreate) ExecX(ctx context.Context)

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

func (*GuildAdminConfigCreate) Mutation

Mutation returns the GuildAdminConfigMutation object of the builder.

func (*GuildAdminConfigCreate) OnConflict

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

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

func (*GuildAdminConfigCreate) OnConflictColumns

func (gacc *GuildAdminConfigCreate) OnConflictColumns(columns ...string) *GuildAdminConfigUpsertOne

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

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

func (*GuildAdminConfigCreate) Save

Save creates the GuildAdminConfig in the database.

func (*GuildAdminConfigCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*GuildAdminConfigCreate) SetComment

SetComment sets the "comment" field.

func (*GuildAdminConfigCreate) SetCreateTime

func (gacc *GuildAdminConfigCreate) SetCreateTime(t time.Time) *GuildAdminConfigCreate

SetCreateTime sets the "create_time" field.

func (*GuildAdminConfigCreate) SetDefaultMaxChannels

func (gacc *GuildAdminConfigCreate) SetDefaultMaxChannels(i int) *GuildAdminConfigCreate

SetDefaultMaxChannels sets the "default_max_channels" field.

func (*GuildAdminConfigCreate) SetDefaultMaxClones

func (gacc *GuildAdminConfigCreate) SetDefaultMaxClones(i int) *GuildAdminConfigCreate

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildAdminConfigCreate) SetEnabled

func (gacc *GuildAdminConfigCreate) SetEnabled(b bool) *GuildAdminConfigCreate

SetEnabled sets the "enabled" field.

func (*GuildAdminConfigCreate) SetGuild

SetGuild sets the "guild" edge to the Guild entity.

func (*GuildAdminConfigCreate) SetGuildID

func (gacc *GuildAdminConfigCreate) SetGuildID(id int) *GuildAdminConfigCreate

SetGuildID sets the "guild" edge to the Guild entity by ID.

func (*GuildAdminConfigCreate) SetNillableComment

func (gacc *GuildAdminConfigCreate) SetNillableComment(s *string) *GuildAdminConfigCreate

SetNillableComment sets the "comment" field if the given value is not nil.

func (*GuildAdminConfigCreate) SetNillableCreateTime

func (gacc *GuildAdminConfigCreate) SetNillableCreateTime(t *time.Time) *GuildAdminConfigCreate

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

func (*GuildAdminConfigCreate) SetNillableDefaultMaxChannels

func (gacc *GuildAdminConfigCreate) SetNillableDefaultMaxChannels(i *int) *GuildAdminConfigCreate

SetNillableDefaultMaxChannels sets the "default_max_channels" field if the given value is not nil.

func (*GuildAdminConfigCreate) SetNillableDefaultMaxClones

func (gacc *GuildAdminConfigCreate) SetNillableDefaultMaxClones(i *int) *GuildAdminConfigCreate

SetNillableDefaultMaxClones sets the "default_max_clones" field if the given value is not nil.

func (*GuildAdminConfigCreate) SetNillableEnabled

func (gacc *GuildAdminConfigCreate) SetNillableEnabled(b *bool) *GuildAdminConfigCreate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*GuildAdminConfigCreate) SetNillableUpdateTime

func (gacc *GuildAdminConfigCreate) SetNillableUpdateTime(t *time.Time) *GuildAdminConfigCreate

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

func (*GuildAdminConfigCreate) SetUpdateTime

func (gacc *GuildAdminConfigCreate) SetUpdateTime(t time.Time) *GuildAdminConfigCreate

SetUpdateTime sets the "update_time" field.

type GuildAdminConfigCreateBulk

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

GuildAdminConfigCreateBulk is the builder for creating many GuildAdminConfig entities in bulk.

func (*GuildAdminConfigCreateBulk) Exec

Exec executes the query.

func (*GuildAdminConfigCreateBulk) ExecX

func (gaccb *GuildAdminConfigCreateBulk) ExecX(ctx context.Context)

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

func (*GuildAdminConfigCreateBulk) OnConflict

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

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

func (*GuildAdminConfigCreateBulk) OnConflictColumns

func (gaccb *GuildAdminConfigCreateBulk) OnConflictColumns(columns ...string) *GuildAdminConfigUpsertBulk

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

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

func (*GuildAdminConfigCreateBulk) Save

Save creates the GuildAdminConfig entities in the database.

func (*GuildAdminConfigCreateBulk) SaveX

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

type GuildAdminConfigDelete

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

GuildAdminConfigDelete is the builder for deleting a GuildAdminConfig entity.

func (*GuildAdminConfigDelete) Exec

func (gacd *GuildAdminConfigDelete) Exec(ctx context.Context) (int, error)

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

func (*GuildAdminConfigDelete) ExecX

func (gacd *GuildAdminConfigDelete) ExecX(ctx context.Context) int

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

func (*GuildAdminConfigDelete) Where

Where appends a list predicates to the GuildAdminConfigDelete builder.

type GuildAdminConfigDeleteOne

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

GuildAdminConfigDeleteOne is the builder for deleting a single GuildAdminConfig entity.

func (*GuildAdminConfigDeleteOne) Exec

Exec executes the deletion query.

func (*GuildAdminConfigDeleteOne) ExecX

func (gacdo *GuildAdminConfigDeleteOne) ExecX(ctx context.Context)

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

func (*GuildAdminConfigDeleteOne) Where

Where appends a list predicates to the GuildAdminConfigDelete builder.

type GuildAdminConfigEdge

type GuildAdminConfigEdge struct {
	Node   *GuildAdminConfig `json:"node"`
	Cursor Cursor            `json:"cursor"`
}

GuildAdminConfigEdge is the edge representation of GuildAdminConfig.

type GuildAdminConfigEdges

type GuildAdminConfigEdges struct {
	// The guild these settings belong to.
	Guild *Guild `json:"guild,omitempty"`
	// contains filtered or unexported fields
}

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

func (GuildAdminConfigEdges) GuildOrErr

func (e GuildAdminConfigEdges) GuildOrErr() (*Guild, error)

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

type GuildAdminConfigFilter

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

GuildAdminConfigFilter provides a generic filtering capability at runtime for GuildAdminConfigQuery.

func (*GuildAdminConfigFilter) Where

func (f *GuildAdminConfigFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*GuildAdminConfigFilter) WhereComment

func (f *GuildAdminConfigFilter) WhereComment(p entql.StringP)

WhereComment applies the entql string predicate on the comment field.

func (*GuildAdminConfigFilter) WhereCreateTime

func (f *GuildAdminConfigFilter) WhereCreateTime(p entql.TimeP)

WhereCreateTime applies the entql time.Time predicate on the create_time field.

func (*GuildAdminConfigFilter) WhereDefaultMaxChannels

func (f *GuildAdminConfigFilter) WhereDefaultMaxChannels(p entql.IntP)

WhereDefaultMaxChannels applies the entql int predicate on the default_max_channels field.

func (*GuildAdminConfigFilter) WhereDefaultMaxClones

func (f *GuildAdminConfigFilter) WhereDefaultMaxClones(p entql.IntP)

WhereDefaultMaxClones applies the entql int predicate on the default_max_clones field.

func (*GuildAdminConfigFilter) WhereEnabled

func (f *GuildAdminConfigFilter) WhereEnabled(p entql.BoolP)

WhereEnabled applies the entql bool predicate on the enabled field.

func (*GuildAdminConfigFilter) WhereHasGuild

func (f *GuildAdminConfigFilter) WhereHasGuild()

WhereHasGuild applies a predicate to check if query has an edge guild.

func (*GuildAdminConfigFilter) WhereHasGuildWith

func (f *GuildAdminConfigFilter) WhereHasGuildWith(preds ...predicate.Guild)

WhereHasGuildWith applies a predicate to check if query has an edge guild with a given conditions (other predicates).

func (*GuildAdminConfigFilter) WhereID

func (f *GuildAdminConfigFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*GuildAdminConfigFilter) WhereUpdateTime

func (f *GuildAdminConfigFilter) WhereUpdateTime(p entql.TimeP)

WhereUpdateTime applies the entql time.Time predicate on the update_time field.

type GuildAdminConfigGroupBy

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

GuildAdminConfigGroupBy is the group-by builder for GuildAdminConfig entities.

func (*GuildAdminConfigGroupBy) Aggregate

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

func (*GuildAdminConfigGroupBy) Bool

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

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

func (*GuildAdminConfigGroupBy) BoolX

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

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

func (*GuildAdminConfigGroupBy) Bools

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

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

func (*GuildAdminConfigGroupBy) BoolsX

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

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

func (*GuildAdminConfigGroupBy) Float64

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

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

func (*GuildAdminConfigGroupBy) Float64X

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

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

func (*GuildAdminConfigGroupBy) Float64s

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

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

func (*GuildAdminConfigGroupBy) Float64sX

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

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

func (*GuildAdminConfigGroupBy) Int

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

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

func (*GuildAdminConfigGroupBy) IntX

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

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

func (*GuildAdminConfigGroupBy) Ints

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

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

func (*GuildAdminConfigGroupBy) IntsX

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

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

func (*GuildAdminConfigGroupBy) Scan

func (gacgb *GuildAdminConfigGroupBy) Scan(ctx context.Context, v any) error

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

func (*GuildAdminConfigGroupBy) ScanX

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

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

func (*GuildAdminConfigGroupBy) String

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

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

func (*GuildAdminConfigGroupBy) StringX

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

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

func (*GuildAdminConfigGroupBy) Strings

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

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

func (*GuildAdminConfigGroupBy) StringsX

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

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

type GuildAdminConfigMutation

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

GuildAdminConfigMutation represents an operation that mutates the GuildAdminConfig nodes in the graph.

func (*GuildAdminConfigMutation) AddDefaultMaxChannels

func (m *GuildAdminConfigMutation) AddDefaultMaxChannels(i int)

AddDefaultMaxChannels adds i to the "default_max_channels" field.

func (*GuildAdminConfigMutation) AddDefaultMaxClones

func (m *GuildAdminConfigMutation) AddDefaultMaxClones(i int)

AddDefaultMaxClones adds i to the "default_max_clones" field.

func (*GuildAdminConfigMutation) AddField

func (m *GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) AddedDefaultMaxChannels

func (m *GuildAdminConfigMutation) AddedDefaultMaxChannels() (r int, exists bool)

AddedDefaultMaxChannels returns the value that was added to the "default_max_channels" field in this mutation.

func (*GuildAdminConfigMutation) AddedDefaultMaxClones

func (m *GuildAdminConfigMutation) AddedDefaultMaxClones() (r int, exists bool)

AddedDefaultMaxClones returns the value that was added to the "default_max_clones" field in this mutation.

func (*GuildAdminConfigMutation) AddedEdges

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

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

func (*GuildAdminConfigMutation) AddedField

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

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

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

func (*GuildAdminConfigMutation) AddedIDs

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

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

func (*GuildAdminConfigMutation) ClearComment

func (m *GuildAdminConfigMutation) ClearComment()

ClearComment clears the value of the "comment" field.

func (*GuildAdminConfigMutation) ClearDefaultMaxChannels

func (m *GuildAdminConfigMutation) ClearDefaultMaxChannels()

ClearDefaultMaxChannels clears the value of the "default_max_channels" field.

func (*GuildAdminConfigMutation) ClearDefaultMaxClones

func (m *GuildAdminConfigMutation) ClearDefaultMaxClones()

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildAdminConfigMutation) ClearEdge

func (m *GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) ClearEnabled

func (m *GuildAdminConfigMutation) ClearEnabled()

ClearEnabled clears the value of the "enabled" field.

func (*GuildAdminConfigMutation) ClearField

func (m *GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) ClearGuild

func (m *GuildAdminConfigMutation) ClearGuild()

ClearGuild clears the "guild" edge to the Guild entity.

func (*GuildAdminConfigMutation) ClearedEdges

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

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

func (*GuildAdminConfigMutation) ClearedFields

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

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

func (GuildAdminConfigMutation) Client

func (m GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) Comment

func (m *GuildAdminConfigMutation) Comment() (r string, exists bool)

Comment returns the value of the "comment" field in the mutation.

func (*GuildAdminConfigMutation) CommentCleared

func (m *GuildAdminConfigMutation) CommentCleared() bool

CommentCleared returns if the "comment" field was cleared in this mutation.

func (*GuildAdminConfigMutation) CreateTime

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

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

func (*GuildAdminConfigMutation) DefaultMaxChannels

func (m *GuildAdminConfigMutation) DefaultMaxChannels() (r int, exists bool)

DefaultMaxChannels returns the value of the "default_max_channels" field in the mutation.

func (*GuildAdminConfigMutation) DefaultMaxChannelsCleared

func (m *GuildAdminConfigMutation) DefaultMaxChannelsCleared() bool

DefaultMaxChannelsCleared returns if the "default_max_channels" field was cleared in this mutation.

func (*GuildAdminConfigMutation) DefaultMaxClones

func (m *GuildAdminConfigMutation) DefaultMaxClones() (r int, exists bool)

DefaultMaxClones returns the value of the "default_max_clones" field in the mutation.

func (*GuildAdminConfigMutation) DefaultMaxClonesCleared

func (m *GuildAdminConfigMutation) DefaultMaxClonesCleared() bool

DefaultMaxClonesCleared returns if the "default_max_clones" field was cleared in this mutation.

func (*GuildAdminConfigMutation) EdgeCleared

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

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

func (*GuildAdminConfigMutation) Enabled

func (m *GuildAdminConfigMutation) Enabled() (r bool, exists bool)

Enabled returns the value of the "enabled" field in the mutation.

func (*GuildAdminConfigMutation) EnabledCleared

func (m *GuildAdminConfigMutation) EnabledCleared() bool

EnabledCleared returns if the "enabled" field was cleared in this mutation.

func (*GuildAdminConfigMutation) Field

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

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

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

func (*GuildAdminConfigMutation) Fields

func (m *GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) Filter

Filter returns an entql.Where implementation to apply filters on the GuildAdminConfigMutation builder.

func (*GuildAdminConfigMutation) GuildCleared

func (m *GuildAdminConfigMutation) GuildCleared() bool

GuildCleared reports if the "guild" edge to the Guild entity was cleared.

func (*GuildAdminConfigMutation) GuildID

func (m *GuildAdminConfigMutation) GuildID() (id int, exists bool)

GuildID returns the "guild" edge ID in the mutation.

func (*GuildAdminConfigMutation) GuildIDs

func (m *GuildAdminConfigMutation) GuildIDs() (ids []int)

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

func (*GuildAdminConfigMutation) ID

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

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

func (*GuildAdminConfigMutation) IDs

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

func (*GuildAdminConfigMutation) OldComment

func (m *GuildAdminConfigMutation) OldComment(ctx context.Context) (v string, err error)

OldComment returns the old "comment" field's value of the GuildAdminConfig entity. If the GuildAdminConfig 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 (*GuildAdminConfigMutation) OldCreateTime

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

OldCreateTime returns the old "create_time" field's value of the GuildAdminConfig entity. If the GuildAdminConfig 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 (*GuildAdminConfigMutation) OldDefaultMaxChannels

func (m *GuildAdminConfigMutation) OldDefaultMaxChannels(ctx context.Context) (v int, err error)

OldDefaultMaxChannels returns the old "default_max_channels" field's value of the GuildAdminConfig entity. If the GuildAdminConfig 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 (*GuildAdminConfigMutation) OldDefaultMaxClones

func (m *GuildAdminConfigMutation) OldDefaultMaxClones(ctx context.Context) (v int, err error)

OldDefaultMaxClones returns the old "default_max_clones" field's value of the GuildAdminConfig entity. If the GuildAdminConfig 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 (*GuildAdminConfigMutation) OldEnabled

func (m *GuildAdminConfigMutation) OldEnabled(ctx context.Context) (v bool, err error)

OldEnabled returns the old "enabled" field's value of the GuildAdminConfig entity. If the GuildAdminConfig 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 (*GuildAdminConfigMutation) OldField

func (m *GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) OldUpdateTime

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

OldUpdateTime returns the old "update_time" field's value of the GuildAdminConfig entity. If the GuildAdminConfig 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 (*GuildAdminConfigMutation) Op

func (m *GuildAdminConfigMutation) Op() Op

Op returns the operation name.

func (*GuildAdminConfigMutation) RemovedEdges

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

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

func (*GuildAdminConfigMutation) RemovedIDs

func (m *GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) ResetComment

func (m *GuildAdminConfigMutation) ResetComment()

ResetComment resets all changes to the "comment" field.

func (*GuildAdminConfigMutation) ResetCreateTime

func (m *GuildAdminConfigMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*GuildAdminConfigMutation) ResetDefaultMaxChannels

func (m *GuildAdminConfigMutation) ResetDefaultMaxChannels()

ResetDefaultMaxChannels resets all changes to the "default_max_channels" field.

func (*GuildAdminConfigMutation) ResetDefaultMaxClones

func (m *GuildAdminConfigMutation) ResetDefaultMaxClones()

ResetDefaultMaxClones resets all changes to the "default_max_clones" field.

func (*GuildAdminConfigMutation) ResetEdge

func (m *GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) ResetEnabled

func (m *GuildAdminConfigMutation) ResetEnabled()

ResetEnabled resets all changes to the "enabled" field.

func (*GuildAdminConfigMutation) ResetField

func (m *GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) ResetGuild

func (m *GuildAdminConfigMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*GuildAdminConfigMutation) ResetUpdateTime

func (m *GuildAdminConfigMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*GuildAdminConfigMutation) SetComment

func (m *GuildAdminConfigMutation) SetComment(s string)

SetComment sets the "comment" field.

func (*GuildAdminConfigMutation) SetCreateTime

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

SetCreateTime sets the "create_time" field.

func (*GuildAdminConfigMutation) SetDefaultMaxChannels

func (m *GuildAdminConfigMutation) SetDefaultMaxChannels(i int)

SetDefaultMaxChannels sets the "default_max_channels" field.

func (*GuildAdminConfigMutation) SetDefaultMaxClones

func (m *GuildAdminConfigMutation) SetDefaultMaxClones(i int)

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildAdminConfigMutation) SetEnabled

func (m *GuildAdminConfigMutation) SetEnabled(b bool)

SetEnabled sets the "enabled" field.

func (*GuildAdminConfigMutation) SetField

func (m *GuildAdminConfigMutation) 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 (*GuildAdminConfigMutation) SetGuildID

func (m *GuildAdminConfigMutation) SetGuildID(id int)

SetGuildID sets the "guild" edge to the Guild entity by id.

func (*GuildAdminConfigMutation) SetOp

func (m *GuildAdminConfigMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GuildAdminConfigMutation) SetUpdateTime

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

SetUpdateTime sets the "update_time" field.

func (GuildAdminConfigMutation) Tx

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

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

func (*GuildAdminConfigMutation) Type

func (m *GuildAdminConfigMutation) Type() string

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

func (*GuildAdminConfigMutation) UpdateTime

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

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

func (*GuildAdminConfigMutation) Where

Where appends a list predicates to the GuildAdminConfigMutation builder.

func (*GuildAdminConfigMutation) WhereP

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

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

type GuildAdminConfigOrder

type GuildAdminConfigOrder struct {
	Direction OrderDirection              `json:"direction"`
	Field     *GuildAdminConfigOrderField `json:"field"`
}

GuildAdminConfigOrder defines the ordering of GuildAdminConfig.

type GuildAdminConfigOrderField

type GuildAdminConfigOrderField struct {
	// Value extracts the ordering value from the given GuildAdminConfig.
	Value func(*GuildAdminConfig) (ent.Value, error)
	// contains filtered or unexported fields
}

GuildAdminConfigOrderField defines the ordering field of GuildAdminConfig.

type GuildAdminConfigPaginateOption

type GuildAdminConfigPaginateOption func(*guildadminconfigPager) error

GuildAdminConfigPaginateOption enables pagination customization.

func WithGuildAdminConfigFilter

func WithGuildAdminConfigFilter(filter func(*GuildAdminConfigQuery) (*GuildAdminConfigQuery, error)) GuildAdminConfigPaginateOption

WithGuildAdminConfigFilter configures pagination filter.

func WithGuildAdminConfigOrder

func WithGuildAdminConfigOrder(order *GuildAdminConfigOrder) GuildAdminConfigPaginateOption

WithGuildAdminConfigOrder configures pagination ordering.

type GuildAdminConfigQuery

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

GuildAdminConfigQuery is the builder for querying GuildAdminConfig entities.

func (*GuildAdminConfigQuery) Aggregate

Aggregate returns a GuildAdminConfigSelect configured with the given aggregations.

func (*GuildAdminConfigQuery) All

All executes the query and returns a list of GuildAdminConfigs.

func (*GuildAdminConfigQuery) AllX

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

func (*GuildAdminConfigQuery) Clone

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

func (*GuildAdminConfigQuery) CollectFields

func (gac *GuildAdminConfigQuery) CollectFields(ctx context.Context, satisfies ...string) (*GuildAdminConfigQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*GuildAdminConfigQuery) Count

func (gacq *GuildAdminConfigQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GuildAdminConfigQuery) CountX

func (gacq *GuildAdminConfigQuery) CountX(ctx context.Context) int

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

func (*GuildAdminConfigQuery) Exist

func (gacq *GuildAdminConfigQuery) Exist(ctx context.Context) (bool, error)

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

func (*GuildAdminConfigQuery) ExistX

func (gacq *GuildAdminConfigQuery) ExistX(ctx context.Context) bool

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

func (*GuildAdminConfigQuery) Filter

Filter returns a Filter implementation to apply filters on the GuildAdminConfigQuery builder.

func (*GuildAdminConfigQuery) First

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

func (*GuildAdminConfigQuery) FirstID

func (gacq *GuildAdminConfigQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*GuildAdminConfigQuery) FirstIDX

func (gacq *GuildAdminConfigQuery) FirstIDX(ctx context.Context) int

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

func (*GuildAdminConfigQuery) FirstX

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

func (*GuildAdminConfigQuery) GroupBy

func (gacq *GuildAdminConfigQuery) GroupBy(field string, fields ...string) *GuildAdminConfigGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GuildAdminConfig.Query().
	GroupBy(guildadminconfig.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GuildAdminConfigQuery) IDs

func (gacq *GuildAdminConfigQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*GuildAdminConfigQuery) IDsX

func (gacq *GuildAdminConfigQuery) IDsX(ctx context.Context) []int

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

func (*GuildAdminConfigQuery) Limit

func (gacq *GuildAdminConfigQuery) Limit(limit int) *GuildAdminConfigQuery

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

func (*GuildAdminConfigQuery) Offset

func (gacq *GuildAdminConfigQuery) Offset(offset int) *GuildAdminConfigQuery

Offset to start from.

func (*GuildAdminConfigQuery) Only

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

func (*GuildAdminConfigQuery) OnlyID

func (gacq *GuildAdminConfigQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*GuildAdminConfigQuery) OnlyIDX

func (gacq *GuildAdminConfigQuery) OnlyIDX(ctx context.Context) int

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

func (*GuildAdminConfigQuery) OnlyX

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

func (*GuildAdminConfigQuery) Order

Order specifies how the records should be ordered.

func (*GuildAdminConfigQuery) Paginate

func (gac *GuildAdminConfigQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...GuildAdminConfigPaginateOption,
) (*GuildAdminConfigConnection, error)

Paginate executes the query and returns a relay based cursor connection to GuildAdminConfig.

func (*GuildAdminConfigQuery) QueryGuild

func (gacq *GuildAdminConfigQuery) QueryGuild() *GuildQuery

QueryGuild chains the current query on the "guild" edge.

func (*GuildAdminConfigQuery) Select

func (gacq *GuildAdminConfigQuery) Select(fields ...string) *GuildAdminConfigSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.GuildAdminConfig.Query().
	Select(guildadminconfig.FieldCreateTime).
	Scan(ctx, &v)

func (*GuildAdminConfigQuery) Unique

func (gacq *GuildAdminConfigQuery) Unique(unique bool) *GuildAdminConfigQuery

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 (*GuildAdminConfigQuery) Where

Where adds a new predicate for the GuildAdminConfigQuery builder.

func (*GuildAdminConfigQuery) WithGuild

func (gacq *GuildAdminConfigQuery) WithGuild(opts ...func(*GuildQuery)) *GuildAdminConfigQuery

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

type GuildAdminConfigSelect

type GuildAdminConfigSelect struct {
	*GuildAdminConfigQuery
	// contains filtered or unexported fields
}

GuildAdminConfigSelect is the builder for selecting fields of GuildAdminConfig entities.

func (*GuildAdminConfigSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*GuildAdminConfigSelect) Bool

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

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

func (*GuildAdminConfigSelect) BoolX

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

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

func (*GuildAdminConfigSelect) Bools

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

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

func (*GuildAdminConfigSelect) BoolsX

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

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

func (*GuildAdminConfigSelect) Float64

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

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

func (*GuildAdminConfigSelect) Float64X

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

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

func (*GuildAdminConfigSelect) Float64s

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

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

func (*GuildAdminConfigSelect) Float64sX

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

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

func (*GuildAdminConfigSelect) Int

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

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

func (*GuildAdminConfigSelect) IntX

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

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

func (*GuildAdminConfigSelect) Ints

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

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

func (*GuildAdminConfigSelect) IntsX

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

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

func (*GuildAdminConfigSelect) Scan

func (gacs *GuildAdminConfigSelect) Scan(ctx context.Context, v any) error

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

func (*GuildAdminConfigSelect) ScanX

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

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

func (*GuildAdminConfigSelect) String

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

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

func (*GuildAdminConfigSelect) StringX

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

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

func (*GuildAdminConfigSelect) Strings

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

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

func (*GuildAdminConfigSelect) StringsX

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

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

type GuildAdminConfigUpdate

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

GuildAdminConfigUpdate is the builder for updating GuildAdminConfig entities.

func (*GuildAdminConfigUpdate) AddDefaultMaxChannels

func (gacu *GuildAdminConfigUpdate) AddDefaultMaxChannels(i int) *GuildAdminConfigUpdate

AddDefaultMaxChannels adds i to the "default_max_channels" field.

func (*GuildAdminConfigUpdate) AddDefaultMaxClones

func (gacu *GuildAdminConfigUpdate) AddDefaultMaxClones(i int) *GuildAdminConfigUpdate

AddDefaultMaxClones adds i to the "default_max_clones" field.

func (*GuildAdminConfigUpdate) ClearComment

func (gacu *GuildAdminConfigUpdate) ClearComment() *GuildAdminConfigUpdate

ClearComment clears the value of the "comment" field.

func (*GuildAdminConfigUpdate) ClearDefaultMaxChannels

func (gacu *GuildAdminConfigUpdate) ClearDefaultMaxChannels() *GuildAdminConfigUpdate

ClearDefaultMaxChannels clears the value of the "default_max_channels" field.

func (*GuildAdminConfigUpdate) ClearDefaultMaxClones

func (gacu *GuildAdminConfigUpdate) ClearDefaultMaxClones() *GuildAdminConfigUpdate

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildAdminConfigUpdate) ClearEnabled

func (gacu *GuildAdminConfigUpdate) ClearEnabled() *GuildAdminConfigUpdate

ClearEnabled clears the value of the "enabled" field.

func (*GuildAdminConfigUpdate) Exec

func (gacu *GuildAdminConfigUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildAdminConfigUpdate) ExecX

func (gacu *GuildAdminConfigUpdate) ExecX(ctx context.Context)

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

func (*GuildAdminConfigUpdate) Mutation

Mutation returns the GuildAdminConfigMutation object of the builder.

func (*GuildAdminConfigUpdate) Save

func (gacu *GuildAdminConfigUpdate) Save(ctx context.Context) (int, error)

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

func (*GuildAdminConfigUpdate) SaveX

func (gacu *GuildAdminConfigUpdate) SaveX(ctx context.Context) int

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

func (*GuildAdminConfigUpdate) SetComment

SetComment sets the "comment" field.

func (*GuildAdminConfigUpdate) SetDefaultMaxChannels

func (gacu *GuildAdminConfigUpdate) SetDefaultMaxChannels(i int) *GuildAdminConfigUpdate

SetDefaultMaxChannels sets the "default_max_channels" field.

func (*GuildAdminConfigUpdate) SetDefaultMaxClones

func (gacu *GuildAdminConfigUpdate) SetDefaultMaxClones(i int) *GuildAdminConfigUpdate

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildAdminConfigUpdate) SetEnabled

func (gacu *GuildAdminConfigUpdate) SetEnabled(b bool) *GuildAdminConfigUpdate

SetEnabled sets the "enabled" field.

func (*GuildAdminConfigUpdate) SetInput

SetInput applies the change-set in the UpdateGuildAdminConfigInput on the GuildAdminConfigUpdate builder.

func (*GuildAdminConfigUpdate) SetNillableComment

func (gacu *GuildAdminConfigUpdate) SetNillableComment(s *string) *GuildAdminConfigUpdate

SetNillableComment sets the "comment" field if the given value is not nil.

func (*GuildAdminConfigUpdate) SetNillableDefaultMaxChannels

func (gacu *GuildAdminConfigUpdate) SetNillableDefaultMaxChannels(i *int) *GuildAdminConfigUpdate

SetNillableDefaultMaxChannels sets the "default_max_channels" field if the given value is not nil.

func (*GuildAdminConfigUpdate) SetNillableDefaultMaxClones

func (gacu *GuildAdminConfigUpdate) SetNillableDefaultMaxClones(i *int) *GuildAdminConfigUpdate

SetNillableDefaultMaxClones sets the "default_max_clones" field if the given value is not nil.

func (*GuildAdminConfigUpdate) SetNillableEnabled

func (gacu *GuildAdminConfigUpdate) SetNillableEnabled(b *bool) *GuildAdminConfigUpdate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*GuildAdminConfigUpdate) SetUpdateTime

func (gacu *GuildAdminConfigUpdate) SetUpdateTime(t time.Time) *GuildAdminConfigUpdate

SetUpdateTime sets the "update_time" field.

func (*GuildAdminConfigUpdate) Where

Where appends a list predicates to the GuildAdminConfigUpdate builder.

type GuildAdminConfigUpdateOne

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

GuildAdminConfigUpdateOne is the builder for updating a single GuildAdminConfig entity.

func (*GuildAdminConfigUpdateOne) AddDefaultMaxChannels

func (gacuo *GuildAdminConfigUpdateOne) AddDefaultMaxChannels(i int) *GuildAdminConfigUpdateOne

AddDefaultMaxChannels adds i to the "default_max_channels" field.

func (*GuildAdminConfigUpdateOne) AddDefaultMaxClones

func (gacuo *GuildAdminConfigUpdateOne) AddDefaultMaxClones(i int) *GuildAdminConfigUpdateOne

AddDefaultMaxClones adds i to the "default_max_clones" field.

func (*GuildAdminConfigUpdateOne) ClearComment

ClearComment clears the value of the "comment" field.

func (*GuildAdminConfigUpdateOne) ClearDefaultMaxChannels

func (gacuo *GuildAdminConfigUpdateOne) ClearDefaultMaxChannels() *GuildAdminConfigUpdateOne

ClearDefaultMaxChannels clears the value of the "default_max_channels" field.

func (*GuildAdminConfigUpdateOne) ClearDefaultMaxClones

func (gacuo *GuildAdminConfigUpdateOne) ClearDefaultMaxClones() *GuildAdminConfigUpdateOne

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildAdminConfigUpdateOne) ClearEnabled

ClearEnabled clears the value of the "enabled" field.

func (*GuildAdminConfigUpdateOne) Exec

Exec executes the query on the entity.

func (*GuildAdminConfigUpdateOne) ExecX

func (gacuo *GuildAdminConfigUpdateOne) ExecX(ctx context.Context)

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

func (*GuildAdminConfigUpdateOne) Mutation

Mutation returns the GuildAdminConfigMutation object of the builder.

func (*GuildAdminConfigUpdateOne) Save

Save executes the query and returns the updated GuildAdminConfig entity.

func (*GuildAdminConfigUpdateOne) SaveX

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

func (*GuildAdminConfigUpdateOne) Select

func (gacuo *GuildAdminConfigUpdateOne) Select(field string, fields ...string) *GuildAdminConfigUpdateOne

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

func (*GuildAdminConfigUpdateOne) SetComment

SetComment sets the "comment" field.

func (*GuildAdminConfigUpdateOne) SetDefaultMaxChannels

func (gacuo *GuildAdminConfigUpdateOne) SetDefaultMaxChannels(i int) *GuildAdminConfigUpdateOne

SetDefaultMaxChannels sets the "default_max_channels" field.

func (*GuildAdminConfigUpdateOne) SetDefaultMaxClones

func (gacuo *GuildAdminConfigUpdateOne) SetDefaultMaxClones(i int) *GuildAdminConfigUpdateOne

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildAdminConfigUpdateOne) SetEnabled

SetEnabled sets the "enabled" field.

func (*GuildAdminConfigUpdateOne) SetInput

SetInput applies the change-set in the UpdateGuildAdminConfigInput on the GuildAdminConfigUpdateOne builder.

func (*GuildAdminConfigUpdateOne) SetNillableComment

func (gacuo *GuildAdminConfigUpdateOne) SetNillableComment(s *string) *GuildAdminConfigUpdateOne

SetNillableComment sets the "comment" field if the given value is not nil.

func (*GuildAdminConfigUpdateOne) SetNillableDefaultMaxChannels

func (gacuo *GuildAdminConfigUpdateOne) SetNillableDefaultMaxChannels(i *int) *GuildAdminConfigUpdateOne

SetNillableDefaultMaxChannels sets the "default_max_channels" field if the given value is not nil.

func (*GuildAdminConfigUpdateOne) SetNillableDefaultMaxClones

func (gacuo *GuildAdminConfigUpdateOne) SetNillableDefaultMaxClones(i *int) *GuildAdminConfigUpdateOne

SetNillableDefaultMaxClones sets the "default_max_clones" field if the given value is not nil.

func (*GuildAdminConfigUpdateOne) SetNillableEnabled

func (gacuo *GuildAdminConfigUpdateOne) SetNillableEnabled(b *bool) *GuildAdminConfigUpdateOne

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*GuildAdminConfigUpdateOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*GuildAdminConfigUpdateOne) Where

Where appends a list predicates to the GuildAdminConfigUpdate builder.

type GuildAdminConfigUpsert

type GuildAdminConfigUpsert struct {
	*sql.UpdateSet
}

GuildAdminConfigUpsert is the "OnConflict" setter.

func (*GuildAdminConfigUpsert) AddDefaultMaxChannels

func (u *GuildAdminConfigUpsert) AddDefaultMaxChannels(v int) *GuildAdminConfigUpsert

AddDefaultMaxChannels adds v to the "default_max_channels" field.

func (*GuildAdminConfigUpsert) AddDefaultMaxClones

func (u *GuildAdminConfigUpsert) AddDefaultMaxClones(v int) *GuildAdminConfigUpsert

AddDefaultMaxClones adds v to the "default_max_clones" field.

func (*GuildAdminConfigUpsert) ClearComment

ClearComment clears the value of the "comment" field.

func (*GuildAdminConfigUpsert) ClearDefaultMaxChannels

func (u *GuildAdminConfigUpsert) ClearDefaultMaxChannels() *GuildAdminConfigUpsert

ClearDefaultMaxChannels clears the value of the "default_max_channels" field.

func (*GuildAdminConfigUpsert) ClearDefaultMaxClones

func (u *GuildAdminConfigUpsert) ClearDefaultMaxClones() *GuildAdminConfigUpsert

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildAdminConfigUpsert) ClearEnabled

ClearEnabled clears the value of the "enabled" field.

func (*GuildAdminConfigUpsert) SetComment

SetComment sets the "comment" field.

func (*GuildAdminConfigUpsert) SetDefaultMaxChannels

func (u *GuildAdminConfigUpsert) SetDefaultMaxChannels(v int) *GuildAdminConfigUpsert

SetDefaultMaxChannels sets the "default_max_channels" field.

func (*GuildAdminConfigUpsert) SetDefaultMaxClones

func (u *GuildAdminConfigUpsert) SetDefaultMaxClones(v int) *GuildAdminConfigUpsert

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildAdminConfigUpsert) SetEnabled

SetEnabled sets the "enabled" field.

func (*GuildAdminConfigUpsert) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*GuildAdminConfigUpsert) UpdateComment

func (u *GuildAdminConfigUpsert) UpdateComment() *GuildAdminConfigUpsert

UpdateComment sets the "comment" field to the value that was provided on create.

func (*GuildAdminConfigUpsert) UpdateDefaultMaxChannels

func (u *GuildAdminConfigUpsert) UpdateDefaultMaxChannels() *GuildAdminConfigUpsert

UpdateDefaultMaxChannels sets the "default_max_channels" field to the value that was provided on create.

func (*GuildAdminConfigUpsert) UpdateDefaultMaxClones

func (u *GuildAdminConfigUpsert) UpdateDefaultMaxClones() *GuildAdminConfigUpsert

UpdateDefaultMaxClones sets the "default_max_clones" field to the value that was provided on create.

func (*GuildAdminConfigUpsert) UpdateEnabled

func (u *GuildAdminConfigUpsert) UpdateEnabled() *GuildAdminConfigUpsert

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*GuildAdminConfigUpsert) UpdateUpdateTime

func (u *GuildAdminConfigUpsert) UpdateUpdateTime() *GuildAdminConfigUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildAdminConfigUpsertBulk

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

GuildAdminConfigUpsertBulk is the builder for "upsert"-ing a bulk of GuildAdminConfig nodes.

func (*GuildAdminConfigUpsertBulk) AddDefaultMaxChannels

func (u *GuildAdminConfigUpsertBulk) AddDefaultMaxChannels(v int) *GuildAdminConfigUpsertBulk

AddDefaultMaxChannels adds v to the "default_max_channels" field.

func (*GuildAdminConfigUpsertBulk) AddDefaultMaxClones

func (u *GuildAdminConfigUpsertBulk) AddDefaultMaxClones(v int) *GuildAdminConfigUpsertBulk

AddDefaultMaxClones adds v to the "default_max_clones" field.

func (*GuildAdminConfigUpsertBulk) ClearComment

ClearComment clears the value of the "comment" field.

func (*GuildAdminConfigUpsertBulk) ClearDefaultMaxChannels

func (u *GuildAdminConfigUpsertBulk) ClearDefaultMaxChannels() *GuildAdminConfigUpsertBulk

ClearDefaultMaxChannels clears the value of the "default_max_channels" field.

func (*GuildAdminConfigUpsertBulk) ClearDefaultMaxClones

func (u *GuildAdminConfigUpsertBulk) ClearDefaultMaxClones() *GuildAdminConfigUpsertBulk

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildAdminConfigUpsertBulk) ClearEnabled

ClearEnabled clears the value of the "enabled" field.

func (*GuildAdminConfigUpsertBulk) DoNothing

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

func (*GuildAdminConfigUpsertBulk) Exec

Exec executes the query.

func (*GuildAdminConfigUpsertBulk) ExecX

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

func (*GuildAdminConfigUpsertBulk) Ignore

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

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

func (*GuildAdminConfigUpsertBulk) SetComment

SetComment sets the "comment" field.

func (*GuildAdminConfigUpsertBulk) SetDefaultMaxChannels

func (u *GuildAdminConfigUpsertBulk) SetDefaultMaxChannels(v int) *GuildAdminConfigUpsertBulk

SetDefaultMaxChannels sets the "default_max_channels" field.

func (*GuildAdminConfigUpsertBulk) SetDefaultMaxClones

func (u *GuildAdminConfigUpsertBulk) SetDefaultMaxClones(v int) *GuildAdminConfigUpsertBulk

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildAdminConfigUpsertBulk) SetEnabled

SetEnabled sets the "enabled" field.

func (*GuildAdminConfigUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*GuildAdminConfigUpsertBulk) Update

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

func (*GuildAdminConfigUpsertBulk) UpdateComment

UpdateComment sets the "comment" field to the value that was provided on create.

func (*GuildAdminConfigUpsertBulk) UpdateDefaultMaxChannels

func (u *GuildAdminConfigUpsertBulk) UpdateDefaultMaxChannels() *GuildAdminConfigUpsertBulk

UpdateDefaultMaxChannels sets the "default_max_channels" field to the value that was provided on create.

func (*GuildAdminConfigUpsertBulk) UpdateDefaultMaxClones

func (u *GuildAdminConfigUpsertBulk) UpdateDefaultMaxClones() *GuildAdminConfigUpsertBulk

UpdateDefaultMaxClones sets the "default_max_clones" field to the value that was provided on create.

func (*GuildAdminConfigUpsertBulk) UpdateEnabled

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*GuildAdminConfigUpsertBulk) UpdateNewValues

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

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

func (*GuildAdminConfigUpsertBulk) UpdateUpdateTime

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildAdminConfigUpsertOne

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

GuildAdminConfigUpsertOne is the builder for "upsert"-ing

one GuildAdminConfig node.

func (*GuildAdminConfigUpsertOne) AddDefaultMaxChannels

func (u *GuildAdminConfigUpsertOne) AddDefaultMaxChannels(v int) *GuildAdminConfigUpsertOne

AddDefaultMaxChannels adds v to the "default_max_channels" field.

func (*GuildAdminConfigUpsertOne) AddDefaultMaxClones

func (u *GuildAdminConfigUpsertOne) AddDefaultMaxClones(v int) *GuildAdminConfigUpsertOne

AddDefaultMaxClones adds v to the "default_max_clones" field.

func (*GuildAdminConfigUpsertOne) ClearComment

ClearComment clears the value of the "comment" field.

func (*GuildAdminConfigUpsertOne) ClearDefaultMaxChannels

func (u *GuildAdminConfigUpsertOne) ClearDefaultMaxChannels() *GuildAdminConfigUpsertOne

ClearDefaultMaxChannels clears the value of the "default_max_channels" field.

func (*GuildAdminConfigUpsertOne) ClearDefaultMaxClones

func (u *GuildAdminConfigUpsertOne) ClearDefaultMaxClones() *GuildAdminConfigUpsertOne

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildAdminConfigUpsertOne) ClearEnabled

ClearEnabled clears the value of the "enabled" field.

func (*GuildAdminConfigUpsertOne) DoNothing

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

func (*GuildAdminConfigUpsertOne) Exec

Exec executes the query.

func (*GuildAdminConfigUpsertOne) ExecX

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

func (*GuildAdminConfigUpsertOne) ID

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

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

func (*GuildAdminConfigUpsertOne) IDX

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

func (*GuildAdminConfigUpsertOne) Ignore

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

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

func (*GuildAdminConfigUpsertOne) SetComment

SetComment sets the "comment" field.

func (*GuildAdminConfigUpsertOne) SetDefaultMaxChannels

func (u *GuildAdminConfigUpsertOne) SetDefaultMaxChannels(v int) *GuildAdminConfigUpsertOne

SetDefaultMaxChannels sets the "default_max_channels" field.

func (*GuildAdminConfigUpsertOne) SetDefaultMaxClones

func (u *GuildAdminConfigUpsertOne) SetDefaultMaxClones(v int) *GuildAdminConfigUpsertOne

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildAdminConfigUpsertOne) SetEnabled

SetEnabled sets the "enabled" field.

func (*GuildAdminConfigUpsertOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*GuildAdminConfigUpsertOne) Update

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

func (*GuildAdminConfigUpsertOne) UpdateComment

UpdateComment sets the "comment" field to the value that was provided on create.

func (*GuildAdminConfigUpsertOne) UpdateDefaultMaxChannels

func (u *GuildAdminConfigUpsertOne) UpdateDefaultMaxChannels() *GuildAdminConfigUpsertOne

UpdateDefaultMaxChannels sets the "default_max_channels" field to the value that was provided on create.

func (*GuildAdminConfigUpsertOne) UpdateDefaultMaxClones

func (u *GuildAdminConfigUpsertOne) UpdateDefaultMaxClones() *GuildAdminConfigUpsertOne

UpdateDefaultMaxClones sets the "default_max_clones" field to the value that was provided on create.

func (*GuildAdminConfigUpsertOne) UpdateEnabled

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*GuildAdminConfigUpsertOne) UpdateNewValues

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

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

func (*GuildAdminConfigUpsertOne) UpdateUpdateTime

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildAdminConfigWhereInput

type GuildAdminConfigWhereInput struct {
	Predicates []predicate.GuildAdminConfig  `json:"-"`
	Not        *GuildAdminConfigWhereInput   `json:"not,omitempty"`
	Or         []*GuildAdminConfigWhereInput `json:"or,omitempty"`
	And        []*GuildAdminConfigWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "create_time" field predicates.
	CreateTime      *time.Time  `json:"createTime,omitempty"`
	CreateTimeNEQ   *time.Time  `json:"createTimeNEQ,omitempty"`
	CreateTimeIn    []time.Time `json:"createTimeIn,omitempty"`
	CreateTimeNotIn []time.Time `json:"createTimeNotIn,omitempty"`
	CreateTimeGT    *time.Time  `json:"createTimeGT,omitempty"`
	CreateTimeGTE   *time.Time  `json:"createTimeGTE,omitempty"`
	CreateTimeLT    *time.Time  `json:"createTimeLT,omitempty"`
	CreateTimeLTE   *time.Time  `json:"createTimeLTE,omitempty"`

	// "update_time" field predicates.
	UpdateTime      *time.Time  `json:"updateTime,omitempty"`
	UpdateTimeNEQ   *time.Time  `json:"updateTimeNEQ,omitempty"`
	UpdateTimeIn    []time.Time `json:"updateTimeIn,omitempty"`
	UpdateTimeNotIn []time.Time `json:"updateTimeNotIn,omitempty"`
	UpdateTimeGT    *time.Time  `json:"updateTimeGT,omitempty"`
	UpdateTimeGTE   *time.Time  `json:"updateTimeGTE,omitempty"`
	UpdateTimeLT    *time.Time  `json:"updateTimeLT,omitempty"`
	UpdateTimeLTE   *time.Time  `json:"updateTimeLTE,omitempty"`

	// "enabled" field predicates.
	Enabled       *bool `json:"enabled,omitempty"`
	EnabledNEQ    *bool `json:"enabledNEQ,omitempty"`
	EnabledIsNil  bool  `json:"enabledIsNil,omitempty"`
	EnabledNotNil bool  `json:"enabledNotNil,omitempty"`

	// "default_max_channels" field predicates.
	DefaultMaxChannels       *int  `json:"defaultMaxChannels,omitempty"`
	DefaultMaxChannelsNEQ    *int  `json:"defaultMaxChannelsNEQ,omitempty"`
	DefaultMaxChannelsIn     []int `json:"defaultMaxChannelsIn,omitempty"`
	DefaultMaxChannelsNotIn  []int `json:"defaultMaxChannelsNotIn,omitempty"`
	DefaultMaxChannelsGT     *int  `json:"defaultMaxChannelsGT,omitempty"`
	DefaultMaxChannelsGTE    *int  `json:"defaultMaxChannelsGTE,omitempty"`
	DefaultMaxChannelsLT     *int  `json:"defaultMaxChannelsLT,omitempty"`
	DefaultMaxChannelsLTE    *int  `json:"defaultMaxChannelsLTE,omitempty"`
	DefaultMaxChannelsIsNil  bool  `json:"defaultMaxChannelsIsNil,omitempty"`
	DefaultMaxChannelsNotNil bool  `json:"defaultMaxChannelsNotNil,omitempty"`

	// "default_max_clones" field predicates.
	DefaultMaxClones       *int  `json:"defaultMaxClones,omitempty"`
	DefaultMaxClonesNEQ    *int  `json:"defaultMaxClonesNEQ,omitempty"`
	DefaultMaxClonesIn     []int `json:"defaultMaxClonesIn,omitempty"`
	DefaultMaxClonesNotIn  []int `json:"defaultMaxClonesNotIn,omitempty"`
	DefaultMaxClonesGT     *int  `json:"defaultMaxClonesGT,omitempty"`
	DefaultMaxClonesGTE    *int  `json:"defaultMaxClonesGTE,omitempty"`
	DefaultMaxClonesLT     *int  `json:"defaultMaxClonesLT,omitempty"`
	DefaultMaxClonesLTE    *int  `json:"defaultMaxClonesLTE,omitempty"`
	DefaultMaxClonesIsNil  bool  `json:"defaultMaxClonesIsNil,omitempty"`
	DefaultMaxClonesNotNil bool  `json:"defaultMaxClonesNotNil,omitempty"`

	// "comment" field predicates.
	Comment             *string  `json:"comment,omitempty"`
	CommentNEQ          *string  `json:"commentNEQ,omitempty"`
	CommentIn           []string `json:"commentIn,omitempty"`
	CommentNotIn        []string `json:"commentNotIn,omitempty"`
	CommentGT           *string  `json:"commentGT,omitempty"`
	CommentGTE          *string  `json:"commentGTE,omitempty"`
	CommentLT           *string  `json:"commentLT,omitempty"`
	CommentLTE          *string  `json:"commentLTE,omitempty"`
	CommentContains     *string  `json:"commentContains,omitempty"`
	CommentHasPrefix    *string  `json:"commentHasPrefix,omitempty"`
	CommentHasSuffix    *string  `json:"commentHasSuffix,omitempty"`
	CommentIsNil        bool     `json:"commentIsNil,omitempty"`
	CommentNotNil       bool     `json:"commentNotNil,omitempty"`
	CommentEqualFold    *string  `json:"commentEqualFold,omitempty"`
	CommentContainsFold *string  `json:"commentContainsFold,omitempty"`

	// "guild" edge predicates.
	HasGuild     *bool              `json:"hasGuild,omitempty"`
	HasGuildWith []*GuildWhereInput `json:"hasGuildWith,omitempty"`
}

GuildAdminConfigWhereInput represents a where input for filtering GuildAdminConfig queries.

func (*GuildAdminConfigWhereInput) AddPredicates

func (i *GuildAdminConfigWhereInput) AddPredicates(predicates ...predicate.GuildAdminConfig)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*GuildAdminConfigWhereInput) Filter

Filter applies the GuildAdminConfigWhereInput filter on the GuildAdminConfigQuery builder.

func (*GuildAdminConfigWhereInput) P

P returns a predicate for filtering guildadminconfigs. An error is returned if the input is empty or invalid.

type GuildAdminConfigs

type GuildAdminConfigs []*GuildAdminConfig

GuildAdminConfigs is a parsable slice of GuildAdminConfig.

type GuildClient

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

GuildClient is a client for the Guild schema.

func NewGuildClient

func NewGuildClient(c config) *GuildClient

NewGuildClient returns a client for the Guild from the given config.

func (*GuildClient) Create

func (c *GuildClient) Create() *GuildCreate

Create returns a builder for creating a Guild entity.

func (*GuildClient) CreateBulk

func (c *GuildClient) CreateBulk(builders ...*GuildCreate) *GuildCreateBulk

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

func (*GuildClient) Delete

func (c *GuildClient) Delete() *GuildDelete

Delete returns a delete builder for Guild.

func (*GuildClient) DeleteOne

func (c *GuildClient) DeleteOne(gu *Guild) *GuildDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GuildClient) DeleteOneID

func (c *GuildClient) DeleteOneID(id int) *GuildDeleteOne

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

func (*GuildClient) Get

func (c *GuildClient) Get(ctx context.Context, id int) (*Guild, error)

Get returns a Guild entity by its id.

func (*GuildClient) GetX

func (c *GuildClient) GetX(ctx context.Context, id int) *Guild

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

func (*GuildClient) Hooks

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

Hooks returns the client hooks.

func (*GuildClient) Intercept

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

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

func (*GuildClient) Interceptors

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

Interceptors returns the client interceptors.

func (*GuildClient) Query

func (c *GuildClient) Query() *GuildQuery

Query returns a query builder for Guild.

func (*GuildClient) QueryAdmins

func (c *GuildClient) QueryAdmins(gu *Guild) *UserQuery

QueryAdmins queries the admins edge of a Guild.

func (*GuildClient) QueryGuildAdminConfig

func (c *GuildClient) QueryGuildAdminConfig(gu *Guild) *GuildAdminConfigQuery

QueryGuildAdminConfig queries the guild_admin_config edge of a Guild.

func (*GuildClient) QueryGuildConfig

func (c *GuildClient) QueryGuildConfig(gu *Guild) *GuildConfigQuery

QueryGuildConfig queries the guild_config edge of a Guild.

func (*GuildClient) QueryGuildEvents

func (c *GuildClient) QueryGuildEvents(gu *Guild) *GuildEventQuery

QueryGuildEvents queries the guild_events edge of a Guild.

func (*GuildClient) Update

func (c *GuildClient) Update() *GuildUpdate

Update returns an update builder for Guild.

func (*GuildClient) UpdateOne

func (c *GuildClient) UpdateOne(gu *Guild) *GuildUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GuildClient) UpdateOneID

func (c *GuildClient) UpdateOneID(id int) *GuildUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GuildClient) Use

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

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

type GuildConfig

type GuildConfig struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// True if the guild should be monitored/acted upon.
	Enabled bool `json:"enabled,omitempty"`
	// Default max cloned channels for the guild.
	DefaultMaxClones int `json:"default_max_clones,omitempty"`
	// Regex match for channel names.
	RegexMatch string `json:"regex_match,omitempty"`
	// Contact email for the guild.
	ContactEmail string `json:"contact_email,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GuildConfigQuery when eager-loading is set.
	Edges GuildConfigEdges `json:"edges"`
	// contains filtered or unexported fields
}

GuildConfig is the model entity for the GuildConfig schema.

func (*GuildConfig) Guild

func (gc *GuildConfig) Guild(ctx context.Context) (*Guild, error)

func (*GuildConfig) IsNode

func (n *GuildConfig) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*GuildConfig) QueryGuild

func (gc *GuildConfig) QueryGuild() *GuildQuery

QueryGuild queries the "guild" edge of the GuildConfig entity.

func (*GuildConfig) String

func (gc *GuildConfig) String() string

String implements the fmt.Stringer.

func (*GuildConfig) ToEdge

func (gc *GuildConfig) ToEdge(order *GuildConfigOrder) *GuildConfigEdge

ToEdge converts GuildConfig into GuildConfigEdge.

func (*GuildConfig) Unwrap

func (gc *GuildConfig) Unwrap() *GuildConfig

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

func (gc *GuildConfig) Update() *GuildConfigUpdateOne

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

func (*GuildConfig) Value

func (gc *GuildConfig) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the GuildConfig. This includes values selected through modifiers, order, etc.

type GuildConfigClient

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

GuildConfigClient is a client for the GuildConfig schema.

func NewGuildConfigClient

func NewGuildConfigClient(c config) *GuildConfigClient

NewGuildConfigClient returns a client for the GuildConfig from the given config.

func (*GuildConfigClient) Create

func (c *GuildConfigClient) Create() *GuildConfigCreate

Create returns a builder for creating a GuildConfig entity.

func (*GuildConfigClient) CreateBulk

func (c *GuildConfigClient) CreateBulk(builders ...*GuildConfigCreate) *GuildConfigCreateBulk

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

func (*GuildConfigClient) Delete

func (c *GuildConfigClient) Delete() *GuildConfigDelete

Delete returns a delete builder for GuildConfig.

func (*GuildConfigClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GuildConfigClient) DeleteOneID

func (c *GuildConfigClient) DeleteOneID(id int) *GuildConfigDeleteOne

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

func (*GuildConfigClient) Get

func (c *GuildConfigClient) Get(ctx context.Context, id int) (*GuildConfig, error)

Get returns a GuildConfig entity by its id.

func (*GuildConfigClient) GetX

func (c *GuildConfigClient) GetX(ctx context.Context, id int) *GuildConfig

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

func (*GuildConfigClient) Hooks

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

Hooks returns the client hooks.

func (*GuildConfigClient) Intercept

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

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

func (*GuildConfigClient) Interceptors

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

Interceptors returns the client interceptors.

func (*GuildConfigClient) Query

func (c *GuildConfigClient) Query() *GuildConfigQuery

Query returns a query builder for GuildConfig.

func (*GuildConfigClient) QueryGuild

func (c *GuildConfigClient) QueryGuild(gc *GuildConfig) *GuildQuery

QueryGuild queries the guild edge of a GuildConfig.

func (*GuildConfigClient) Update

func (c *GuildConfigClient) Update() *GuildConfigUpdate

Update returns an update builder for GuildConfig.

func (*GuildConfigClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GuildConfigClient) UpdateOneID

func (c *GuildConfigClient) UpdateOneID(id int) *GuildConfigUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GuildConfigClient) Use

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

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

type GuildConfigConnection

type GuildConfigConnection struct {
	Edges      []*GuildConfigEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

GuildConfigConnection is the connection containing edges to GuildConfig.

type GuildConfigCreate

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

GuildConfigCreate is the builder for creating a GuildConfig entity.

func (*GuildConfigCreate) Exec

func (gcc *GuildConfigCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildConfigCreate) ExecX

func (gcc *GuildConfigCreate) ExecX(ctx context.Context)

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

func (*GuildConfigCreate) Mutation

func (gcc *GuildConfigCreate) Mutation() *GuildConfigMutation

Mutation returns the GuildConfigMutation object of the builder.

func (*GuildConfigCreate) OnConflict

func (gcc *GuildConfigCreate) OnConflict(opts ...sql.ConflictOption) *GuildConfigUpsertOne

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

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

func (*GuildConfigCreate) OnConflictColumns

func (gcc *GuildConfigCreate) OnConflictColumns(columns ...string) *GuildConfigUpsertOne

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

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

func (*GuildConfigCreate) Save

func (gcc *GuildConfigCreate) Save(ctx context.Context) (*GuildConfig, error)

Save creates the GuildConfig in the database.

func (*GuildConfigCreate) SaveX

func (gcc *GuildConfigCreate) SaveX(ctx context.Context) *GuildConfig

SaveX calls Save and panics if Save returns an error.

func (*GuildConfigCreate) SetContactEmail

func (gcc *GuildConfigCreate) SetContactEmail(s string) *GuildConfigCreate

SetContactEmail sets the "contact_email" field.

func (*GuildConfigCreate) SetCreateTime

func (gcc *GuildConfigCreate) SetCreateTime(t time.Time) *GuildConfigCreate

SetCreateTime sets the "create_time" field.

func (*GuildConfigCreate) SetDefaultMaxClones

func (gcc *GuildConfigCreate) SetDefaultMaxClones(i int) *GuildConfigCreate

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildConfigCreate) SetEnabled

func (gcc *GuildConfigCreate) SetEnabled(b bool) *GuildConfigCreate

SetEnabled sets the "enabled" field.

func (*GuildConfigCreate) SetGuild

func (gcc *GuildConfigCreate) SetGuild(g *Guild) *GuildConfigCreate

SetGuild sets the "guild" edge to the Guild entity.

func (*GuildConfigCreate) SetGuildID

func (gcc *GuildConfigCreate) SetGuildID(id int) *GuildConfigCreate

SetGuildID sets the "guild" edge to the Guild entity by ID.

func (*GuildConfigCreate) SetNillableContactEmail

func (gcc *GuildConfigCreate) SetNillableContactEmail(s *string) *GuildConfigCreate

SetNillableContactEmail sets the "contact_email" field if the given value is not nil.

func (*GuildConfigCreate) SetNillableCreateTime

func (gcc *GuildConfigCreate) SetNillableCreateTime(t *time.Time) *GuildConfigCreate

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

func (*GuildConfigCreate) SetNillableDefaultMaxClones

func (gcc *GuildConfigCreate) SetNillableDefaultMaxClones(i *int) *GuildConfigCreate

SetNillableDefaultMaxClones sets the "default_max_clones" field if the given value is not nil.

func (*GuildConfigCreate) SetNillableEnabled

func (gcc *GuildConfigCreate) SetNillableEnabled(b *bool) *GuildConfigCreate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*GuildConfigCreate) SetNillableRegexMatch

func (gcc *GuildConfigCreate) SetNillableRegexMatch(s *string) *GuildConfigCreate

SetNillableRegexMatch sets the "regex_match" field if the given value is not nil.

func (*GuildConfigCreate) SetNillableUpdateTime

func (gcc *GuildConfigCreate) SetNillableUpdateTime(t *time.Time) *GuildConfigCreate

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

func (*GuildConfigCreate) SetRegexMatch

func (gcc *GuildConfigCreate) SetRegexMatch(s string) *GuildConfigCreate

SetRegexMatch sets the "regex_match" field.

func (*GuildConfigCreate) SetUpdateTime

func (gcc *GuildConfigCreate) SetUpdateTime(t time.Time) *GuildConfigCreate

SetUpdateTime sets the "update_time" field.

type GuildConfigCreateBulk

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

GuildConfigCreateBulk is the builder for creating many GuildConfig entities in bulk.

func (*GuildConfigCreateBulk) Exec

func (gccb *GuildConfigCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildConfigCreateBulk) ExecX

func (gccb *GuildConfigCreateBulk) ExecX(ctx context.Context)

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

func (*GuildConfigCreateBulk) OnConflict

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

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

func (*GuildConfigCreateBulk) OnConflictColumns

func (gccb *GuildConfigCreateBulk) OnConflictColumns(columns ...string) *GuildConfigUpsertBulk

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

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

func (*GuildConfigCreateBulk) Save

func (gccb *GuildConfigCreateBulk) Save(ctx context.Context) ([]*GuildConfig, error)

Save creates the GuildConfig entities in the database.

func (*GuildConfigCreateBulk) SaveX

func (gccb *GuildConfigCreateBulk) SaveX(ctx context.Context) []*GuildConfig

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

type GuildConfigDelete

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

GuildConfigDelete is the builder for deleting a GuildConfig entity.

func (*GuildConfigDelete) Exec

func (gcd *GuildConfigDelete) Exec(ctx context.Context) (int, error)

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

func (*GuildConfigDelete) ExecX

func (gcd *GuildConfigDelete) ExecX(ctx context.Context) int

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

func (*GuildConfigDelete) Where

Where appends a list predicates to the GuildConfigDelete builder.

type GuildConfigDeleteOne

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

GuildConfigDeleteOne is the builder for deleting a single GuildConfig entity.

func (*GuildConfigDeleteOne) Exec

func (gcdo *GuildConfigDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GuildConfigDeleteOne) ExecX

func (gcdo *GuildConfigDeleteOne) ExecX(ctx context.Context)

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

func (*GuildConfigDeleteOne) Where

Where appends a list predicates to the GuildConfigDelete builder.

type GuildConfigEdge

type GuildConfigEdge struct {
	Node   *GuildConfig `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

GuildConfigEdge is the edge representation of GuildConfig.

type GuildConfigEdges

type GuildConfigEdges struct {
	// The guild these settings belong to.
	Guild *Guild `json:"guild,omitempty"`
	// contains filtered or unexported fields
}

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

func (GuildConfigEdges) GuildOrErr

func (e GuildConfigEdges) GuildOrErr() (*Guild, error)

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

type GuildConfigFilter

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

GuildConfigFilter provides a generic filtering capability at runtime for GuildConfigQuery.

func (*GuildConfigFilter) Where

func (f *GuildConfigFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*GuildConfigFilter) WhereContactEmail

func (f *GuildConfigFilter) WhereContactEmail(p entql.StringP)

WhereContactEmail applies the entql string predicate on the contact_email field.

func (*GuildConfigFilter) WhereCreateTime

func (f *GuildConfigFilter) WhereCreateTime(p entql.TimeP)

WhereCreateTime applies the entql time.Time predicate on the create_time field.

func (*GuildConfigFilter) WhereDefaultMaxClones

func (f *GuildConfigFilter) WhereDefaultMaxClones(p entql.IntP)

WhereDefaultMaxClones applies the entql int predicate on the default_max_clones field.

func (*GuildConfigFilter) WhereEnabled

func (f *GuildConfigFilter) WhereEnabled(p entql.BoolP)

WhereEnabled applies the entql bool predicate on the enabled field.

func (*GuildConfigFilter) WhereHasGuild

func (f *GuildConfigFilter) WhereHasGuild()

WhereHasGuild applies a predicate to check if query has an edge guild.

func (*GuildConfigFilter) WhereHasGuildWith

func (f *GuildConfigFilter) WhereHasGuildWith(preds ...predicate.Guild)

WhereHasGuildWith applies a predicate to check if query has an edge guild with a given conditions (other predicates).

func (*GuildConfigFilter) WhereID

func (f *GuildConfigFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*GuildConfigFilter) WhereRegexMatch

func (f *GuildConfigFilter) WhereRegexMatch(p entql.StringP)

WhereRegexMatch applies the entql string predicate on the regex_match field.

func (*GuildConfigFilter) WhereUpdateTime

func (f *GuildConfigFilter) WhereUpdateTime(p entql.TimeP)

WhereUpdateTime applies the entql time.Time predicate on the update_time field.

type GuildConfigGroupBy

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

GuildConfigGroupBy is the group-by builder for GuildConfig entities.

func (*GuildConfigGroupBy) Aggregate

func (gcgb *GuildConfigGroupBy) Aggregate(fns ...AggregateFunc) *GuildConfigGroupBy

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

func (*GuildConfigGroupBy) Bool

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

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

func (*GuildConfigGroupBy) BoolX

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

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

func (*GuildConfigGroupBy) Bools

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

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

func (*GuildConfigGroupBy) BoolsX

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

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

func (*GuildConfigGroupBy) Float64

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

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

func (*GuildConfigGroupBy) Float64X

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

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

func (*GuildConfigGroupBy) Float64s

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

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

func (*GuildConfigGroupBy) Float64sX

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

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

func (*GuildConfigGroupBy) Int

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

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

func (*GuildConfigGroupBy) IntX

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

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

func (*GuildConfigGroupBy) Ints

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

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

func (*GuildConfigGroupBy) IntsX

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

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

func (*GuildConfigGroupBy) Scan

func (gcgb *GuildConfigGroupBy) Scan(ctx context.Context, v any) error

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

func (*GuildConfigGroupBy) ScanX

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

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

func (*GuildConfigGroupBy) String

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

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

func (*GuildConfigGroupBy) StringX

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

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

func (*GuildConfigGroupBy) Strings

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

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

func (*GuildConfigGroupBy) StringsX

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

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

type GuildConfigMutation

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

GuildConfigMutation represents an operation that mutates the GuildConfig nodes in the graph.

func (*GuildConfigMutation) AddDefaultMaxClones

func (m *GuildConfigMutation) AddDefaultMaxClones(i int)

AddDefaultMaxClones adds i to the "default_max_clones" field.

func (*GuildConfigMutation) AddField

func (m *GuildConfigMutation) 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 (*GuildConfigMutation) AddedDefaultMaxClones

func (m *GuildConfigMutation) AddedDefaultMaxClones() (r int, exists bool)

AddedDefaultMaxClones returns the value that was added to the "default_max_clones" field in this mutation.

func (*GuildConfigMutation) AddedEdges

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

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

func (*GuildConfigMutation) AddedField

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

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

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

func (*GuildConfigMutation) AddedIDs

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

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

func (*GuildConfigMutation) ClearContactEmail

func (m *GuildConfigMutation) ClearContactEmail()

ClearContactEmail clears the value of the "contact_email" field.

func (*GuildConfigMutation) ClearDefaultMaxClones

func (m *GuildConfigMutation) ClearDefaultMaxClones()

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildConfigMutation) ClearEdge

func (m *GuildConfigMutation) 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 (*GuildConfigMutation) ClearEnabled

func (m *GuildConfigMutation) ClearEnabled()

ClearEnabled clears the value of the "enabled" field.

func (*GuildConfigMutation) ClearField

func (m *GuildConfigMutation) 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 (*GuildConfigMutation) ClearGuild

func (m *GuildConfigMutation) ClearGuild()

ClearGuild clears the "guild" edge to the Guild entity.

func (*GuildConfigMutation) ClearRegexMatch

func (m *GuildConfigMutation) ClearRegexMatch()

ClearRegexMatch clears the value of the "regex_match" field.

func (*GuildConfigMutation) ClearedEdges

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

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

func (*GuildConfigMutation) ClearedFields

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

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

func (GuildConfigMutation) Client

func (m GuildConfigMutation) 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 (*GuildConfigMutation) ContactEmail

func (m *GuildConfigMutation) ContactEmail() (r string, exists bool)

ContactEmail returns the value of the "contact_email" field in the mutation.

func (*GuildConfigMutation) ContactEmailCleared

func (m *GuildConfigMutation) ContactEmailCleared() bool

ContactEmailCleared returns if the "contact_email" field was cleared in this mutation.

func (*GuildConfigMutation) CreateTime

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

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

func (*GuildConfigMutation) DefaultMaxClones

func (m *GuildConfigMutation) DefaultMaxClones() (r int, exists bool)

DefaultMaxClones returns the value of the "default_max_clones" field in the mutation.

func (*GuildConfigMutation) DefaultMaxClonesCleared

func (m *GuildConfigMutation) DefaultMaxClonesCleared() bool

DefaultMaxClonesCleared returns if the "default_max_clones" field was cleared in this mutation.

func (*GuildConfigMutation) EdgeCleared

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

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

func (*GuildConfigMutation) Enabled

func (m *GuildConfigMutation) Enabled() (r bool, exists bool)

Enabled returns the value of the "enabled" field in the mutation.

func (*GuildConfigMutation) EnabledCleared

func (m *GuildConfigMutation) EnabledCleared() bool

EnabledCleared returns if the "enabled" field was cleared in this mutation.

func (*GuildConfigMutation) Field

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

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

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

func (*GuildConfigMutation) Fields

func (m *GuildConfigMutation) 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 (*GuildConfigMutation) Filter

Filter returns an entql.Where implementation to apply filters on the GuildConfigMutation builder.

func (*GuildConfigMutation) GuildCleared

func (m *GuildConfigMutation) GuildCleared() bool

GuildCleared reports if the "guild" edge to the Guild entity was cleared.

func (*GuildConfigMutation) GuildID

func (m *GuildConfigMutation) GuildID() (id int, exists bool)

GuildID returns the "guild" edge ID in the mutation.

func (*GuildConfigMutation) GuildIDs

func (m *GuildConfigMutation) GuildIDs() (ids []int)

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

func (*GuildConfigMutation) ID

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

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

func (*GuildConfigMutation) IDs

func (m *GuildConfigMutation) IDs(ctx context.Context) ([]int, error)

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

func (*GuildConfigMutation) OldContactEmail

func (m *GuildConfigMutation) OldContactEmail(ctx context.Context) (v string, err error)

OldContactEmail returns the old "contact_email" field's value of the GuildConfig entity. If the GuildConfig 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 (*GuildConfigMutation) OldCreateTime

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

OldCreateTime returns the old "create_time" field's value of the GuildConfig entity. If the GuildConfig 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 (*GuildConfigMutation) OldDefaultMaxClones

func (m *GuildConfigMutation) OldDefaultMaxClones(ctx context.Context) (v int, err error)

OldDefaultMaxClones returns the old "default_max_clones" field's value of the GuildConfig entity. If the GuildConfig 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 (*GuildConfigMutation) OldEnabled

func (m *GuildConfigMutation) OldEnabled(ctx context.Context) (v bool, err error)

OldEnabled returns the old "enabled" field's value of the GuildConfig entity. If the GuildConfig 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 (*GuildConfigMutation) OldField

func (m *GuildConfigMutation) 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 (*GuildConfigMutation) OldRegexMatch

func (m *GuildConfigMutation) OldRegexMatch(ctx context.Context) (v string, err error)

OldRegexMatch returns the old "regex_match" field's value of the GuildConfig entity. If the GuildConfig 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 (*GuildConfigMutation) OldUpdateTime

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

OldUpdateTime returns the old "update_time" field's value of the GuildConfig entity. If the GuildConfig 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 (*GuildConfigMutation) Op

func (m *GuildConfigMutation) Op() Op

Op returns the operation name.

func (*GuildConfigMutation) RegexMatch

func (m *GuildConfigMutation) RegexMatch() (r string, exists bool)

RegexMatch returns the value of the "regex_match" field in the mutation.

func (*GuildConfigMutation) RegexMatchCleared

func (m *GuildConfigMutation) RegexMatchCleared() bool

RegexMatchCleared returns if the "regex_match" field was cleared in this mutation.

func (*GuildConfigMutation) RemovedEdges

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

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

func (*GuildConfigMutation) RemovedIDs

func (m *GuildConfigMutation) 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 (*GuildConfigMutation) ResetContactEmail

func (m *GuildConfigMutation) ResetContactEmail()

ResetContactEmail resets all changes to the "contact_email" field.

func (*GuildConfigMutation) ResetCreateTime

func (m *GuildConfigMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*GuildConfigMutation) ResetDefaultMaxClones

func (m *GuildConfigMutation) ResetDefaultMaxClones()

ResetDefaultMaxClones resets all changes to the "default_max_clones" field.

func (*GuildConfigMutation) ResetEdge

func (m *GuildConfigMutation) 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 (*GuildConfigMutation) ResetEnabled

func (m *GuildConfigMutation) ResetEnabled()

ResetEnabled resets all changes to the "enabled" field.

func (*GuildConfigMutation) ResetField

func (m *GuildConfigMutation) 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 (*GuildConfigMutation) ResetGuild

func (m *GuildConfigMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*GuildConfigMutation) ResetRegexMatch

func (m *GuildConfigMutation) ResetRegexMatch()

ResetRegexMatch resets all changes to the "regex_match" field.

func (*GuildConfigMutation) ResetUpdateTime

func (m *GuildConfigMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*GuildConfigMutation) SetContactEmail

func (m *GuildConfigMutation) SetContactEmail(s string)

SetContactEmail sets the "contact_email" field.

func (*GuildConfigMutation) SetCreateTime

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

SetCreateTime sets the "create_time" field.

func (*GuildConfigMutation) SetDefaultMaxClones

func (m *GuildConfigMutation) SetDefaultMaxClones(i int)

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildConfigMutation) SetEnabled

func (m *GuildConfigMutation) SetEnabled(b bool)

SetEnabled sets the "enabled" field.

func (*GuildConfigMutation) SetField

func (m *GuildConfigMutation) 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 (*GuildConfigMutation) SetGuildID

func (m *GuildConfigMutation) SetGuildID(id int)

SetGuildID sets the "guild" edge to the Guild entity by id.

func (*GuildConfigMutation) SetOp

func (m *GuildConfigMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GuildConfigMutation) SetRegexMatch

func (m *GuildConfigMutation) SetRegexMatch(s string)

SetRegexMatch sets the "regex_match" field.

func (*GuildConfigMutation) SetUpdateTime

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

SetUpdateTime sets the "update_time" field.

func (GuildConfigMutation) Tx

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

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

func (*GuildConfigMutation) Type

func (m *GuildConfigMutation) Type() string

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

func (*GuildConfigMutation) UpdateTime

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

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

func (*GuildConfigMutation) Where

func (m *GuildConfigMutation) Where(ps ...predicate.GuildConfig)

Where appends a list predicates to the GuildConfigMutation builder.

func (*GuildConfigMutation) WhereP

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

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

type GuildConfigOrder

type GuildConfigOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *GuildConfigOrderField `json:"field"`
}

GuildConfigOrder defines the ordering of GuildConfig.

type GuildConfigOrderField

type GuildConfigOrderField struct {
	// Value extracts the ordering value from the given GuildConfig.
	Value func(*GuildConfig) (ent.Value, error)
	// contains filtered or unexported fields
}

GuildConfigOrderField defines the ordering field of GuildConfig.

type GuildConfigPaginateOption

type GuildConfigPaginateOption func(*guildconfigPager) error

GuildConfigPaginateOption enables pagination customization.

func WithGuildConfigFilter

func WithGuildConfigFilter(filter func(*GuildConfigQuery) (*GuildConfigQuery, error)) GuildConfigPaginateOption

WithGuildConfigFilter configures pagination filter.

func WithGuildConfigOrder

func WithGuildConfigOrder(order *GuildConfigOrder) GuildConfigPaginateOption

WithGuildConfigOrder configures pagination ordering.

type GuildConfigQuery

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

GuildConfigQuery is the builder for querying GuildConfig entities.

func (*GuildConfigQuery) Aggregate

func (gcq *GuildConfigQuery) Aggregate(fns ...AggregateFunc) *GuildConfigSelect

Aggregate returns a GuildConfigSelect configured with the given aggregations.

func (*GuildConfigQuery) All

func (gcq *GuildConfigQuery) All(ctx context.Context) ([]*GuildConfig, error)

All executes the query and returns a list of GuildConfigs.

func (*GuildConfigQuery) AllX

func (gcq *GuildConfigQuery) AllX(ctx context.Context) []*GuildConfig

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

func (*GuildConfigQuery) Clone

func (gcq *GuildConfigQuery) Clone() *GuildConfigQuery

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

func (*GuildConfigQuery) CollectFields

func (gc *GuildConfigQuery) CollectFields(ctx context.Context, satisfies ...string) (*GuildConfigQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*GuildConfigQuery) Count

func (gcq *GuildConfigQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GuildConfigQuery) CountX

func (gcq *GuildConfigQuery) CountX(ctx context.Context) int

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

func (*GuildConfigQuery) Exist

func (gcq *GuildConfigQuery) Exist(ctx context.Context) (bool, error)

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

func (*GuildConfigQuery) ExistX

func (gcq *GuildConfigQuery) ExistX(ctx context.Context) bool

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

func (*GuildConfigQuery) Filter

func (gcq *GuildConfigQuery) Filter() *GuildConfigFilter

Filter returns a Filter implementation to apply filters on the GuildConfigQuery builder.

func (*GuildConfigQuery) First

func (gcq *GuildConfigQuery) First(ctx context.Context) (*GuildConfig, error)

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

func (*GuildConfigQuery) FirstID

func (gcq *GuildConfigQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*GuildConfigQuery) FirstIDX

func (gcq *GuildConfigQuery) FirstIDX(ctx context.Context) int

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

func (*GuildConfigQuery) FirstX

func (gcq *GuildConfigQuery) FirstX(ctx context.Context) *GuildConfig

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

func (*GuildConfigQuery) GroupBy

func (gcq *GuildConfigQuery) GroupBy(field string, fields ...string) *GuildConfigGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GuildConfig.Query().
	GroupBy(guildconfig.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GuildConfigQuery) IDs

func (gcq *GuildConfigQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*GuildConfigQuery) IDsX

func (gcq *GuildConfigQuery) IDsX(ctx context.Context) []int

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

func (*GuildConfigQuery) Limit

func (gcq *GuildConfigQuery) Limit(limit int) *GuildConfigQuery

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

func (*GuildConfigQuery) Offset

func (gcq *GuildConfigQuery) Offset(offset int) *GuildConfigQuery

Offset to start from.

func (*GuildConfigQuery) Only

func (gcq *GuildConfigQuery) Only(ctx context.Context) (*GuildConfig, error)

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

func (*GuildConfigQuery) OnlyID

func (gcq *GuildConfigQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*GuildConfigQuery) OnlyIDX

func (gcq *GuildConfigQuery) OnlyIDX(ctx context.Context) int

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

func (*GuildConfigQuery) OnlyX

func (gcq *GuildConfigQuery) OnlyX(ctx context.Context) *GuildConfig

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

func (*GuildConfigQuery) Order

Order specifies how the records should be ordered.

func (*GuildConfigQuery) Paginate

func (gc *GuildConfigQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...GuildConfigPaginateOption,
) (*GuildConfigConnection, error)

Paginate executes the query and returns a relay based cursor connection to GuildConfig.

func (*GuildConfigQuery) QueryGuild

func (gcq *GuildConfigQuery) QueryGuild() *GuildQuery

QueryGuild chains the current query on the "guild" edge.

func (*GuildConfigQuery) Select

func (gcq *GuildConfigQuery) Select(fields ...string) *GuildConfigSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.GuildConfig.Query().
	Select(guildconfig.FieldCreateTime).
	Scan(ctx, &v)

func (*GuildConfigQuery) Unique

func (gcq *GuildConfigQuery) Unique(unique bool) *GuildConfigQuery

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 (*GuildConfigQuery) Where

Where adds a new predicate for the GuildConfigQuery builder.

func (*GuildConfigQuery) WithGuild

func (gcq *GuildConfigQuery) WithGuild(opts ...func(*GuildQuery)) *GuildConfigQuery

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

type GuildConfigSelect

type GuildConfigSelect struct {
	*GuildConfigQuery
	// contains filtered or unexported fields
}

GuildConfigSelect is the builder for selecting fields of GuildConfig entities.

func (*GuildConfigSelect) Aggregate

func (gcs *GuildConfigSelect) Aggregate(fns ...AggregateFunc) *GuildConfigSelect

Aggregate adds the given aggregation functions to the selector query.

func (*GuildConfigSelect) Bool

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

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

func (*GuildConfigSelect) BoolX

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

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

func (*GuildConfigSelect) Bools

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

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

func (*GuildConfigSelect) BoolsX

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

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

func (*GuildConfigSelect) Float64

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

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

func (*GuildConfigSelect) Float64X

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

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

func (*GuildConfigSelect) Float64s

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

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

func (*GuildConfigSelect) Float64sX

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

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

func (*GuildConfigSelect) Int

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

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

func (*GuildConfigSelect) IntX

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

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

func (*GuildConfigSelect) Ints

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

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

func (*GuildConfigSelect) IntsX

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

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

func (*GuildConfigSelect) Scan

func (gcs *GuildConfigSelect) Scan(ctx context.Context, v any) error

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

func (*GuildConfigSelect) ScanX

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

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

func (*GuildConfigSelect) String

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

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

func (*GuildConfigSelect) StringX

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

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

func (*GuildConfigSelect) Strings

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

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

func (*GuildConfigSelect) StringsX

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

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

type GuildConfigUpdate

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

GuildConfigUpdate is the builder for updating GuildConfig entities.

func (*GuildConfigUpdate) AddDefaultMaxClones

func (gcu *GuildConfigUpdate) AddDefaultMaxClones(i int) *GuildConfigUpdate

AddDefaultMaxClones adds i to the "default_max_clones" field.

func (*GuildConfigUpdate) ClearContactEmail

func (gcu *GuildConfigUpdate) ClearContactEmail() *GuildConfigUpdate

ClearContactEmail clears the value of the "contact_email" field.

func (*GuildConfigUpdate) ClearDefaultMaxClones

func (gcu *GuildConfigUpdate) ClearDefaultMaxClones() *GuildConfigUpdate

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildConfigUpdate) ClearEnabled

func (gcu *GuildConfigUpdate) ClearEnabled() *GuildConfigUpdate

ClearEnabled clears the value of the "enabled" field.

func (*GuildConfigUpdate) ClearRegexMatch

func (gcu *GuildConfigUpdate) ClearRegexMatch() *GuildConfigUpdate

ClearRegexMatch clears the value of the "regex_match" field.

func (*GuildConfigUpdate) Exec

func (gcu *GuildConfigUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildConfigUpdate) ExecX

func (gcu *GuildConfigUpdate) ExecX(ctx context.Context)

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

func (*GuildConfigUpdate) Mutation

func (gcu *GuildConfigUpdate) Mutation() *GuildConfigMutation

Mutation returns the GuildConfigMutation object of the builder.

func (*GuildConfigUpdate) Save

func (gcu *GuildConfigUpdate) Save(ctx context.Context) (int, error)

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

func (*GuildConfigUpdate) SaveX

func (gcu *GuildConfigUpdate) SaveX(ctx context.Context) int

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

func (*GuildConfigUpdate) SetContactEmail

func (gcu *GuildConfigUpdate) SetContactEmail(s string) *GuildConfigUpdate

SetContactEmail sets the "contact_email" field.

func (*GuildConfigUpdate) SetDefaultMaxClones

func (gcu *GuildConfigUpdate) SetDefaultMaxClones(i int) *GuildConfigUpdate

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildConfigUpdate) SetEnabled

func (gcu *GuildConfigUpdate) SetEnabled(b bool) *GuildConfigUpdate

SetEnabled sets the "enabled" field.

func (*GuildConfigUpdate) SetInput

SetInput applies the change-set in the UpdateGuildConfigInput on the GuildConfigUpdate builder.

func (*GuildConfigUpdate) SetNillableContactEmail

func (gcu *GuildConfigUpdate) SetNillableContactEmail(s *string) *GuildConfigUpdate

SetNillableContactEmail sets the "contact_email" field if the given value is not nil.

func (*GuildConfigUpdate) SetNillableDefaultMaxClones

func (gcu *GuildConfigUpdate) SetNillableDefaultMaxClones(i *int) *GuildConfigUpdate

SetNillableDefaultMaxClones sets the "default_max_clones" field if the given value is not nil.

func (*GuildConfigUpdate) SetNillableEnabled

func (gcu *GuildConfigUpdate) SetNillableEnabled(b *bool) *GuildConfigUpdate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*GuildConfigUpdate) SetNillableRegexMatch

func (gcu *GuildConfigUpdate) SetNillableRegexMatch(s *string) *GuildConfigUpdate

SetNillableRegexMatch sets the "regex_match" field if the given value is not nil.

func (*GuildConfigUpdate) SetRegexMatch

func (gcu *GuildConfigUpdate) SetRegexMatch(s string) *GuildConfigUpdate

SetRegexMatch sets the "regex_match" field.

func (*GuildConfigUpdate) SetUpdateTime

func (gcu *GuildConfigUpdate) SetUpdateTime(t time.Time) *GuildConfigUpdate

SetUpdateTime sets the "update_time" field.

func (*GuildConfigUpdate) Where

Where appends a list predicates to the GuildConfigUpdate builder.

type GuildConfigUpdateOne

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

GuildConfigUpdateOne is the builder for updating a single GuildConfig entity.

func (*GuildConfigUpdateOne) AddDefaultMaxClones

func (gcuo *GuildConfigUpdateOne) AddDefaultMaxClones(i int) *GuildConfigUpdateOne

AddDefaultMaxClones adds i to the "default_max_clones" field.

func (*GuildConfigUpdateOne) ClearContactEmail

func (gcuo *GuildConfigUpdateOne) ClearContactEmail() *GuildConfigUpdateOne

ClearContactEmail clears the value of the "contact_email" field.

func (*GuildConfigUpdateOne) ClearDefaultMaxClones

func (gcuo *GuildConfigUpdateOne) ClearDefaultMaxClones() *GuildConfigUpdateOne

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildConfigUpdateOne) ClearEnabled

func (gcuo *GuildConfigUpdateOne) ClearEnabled() *GuildConfigUpdateOne

ClearEnabled clears the value of the "enabled" field.

func (*GuildConfigUpdateOne) ClearRegexMatch

func (gcuo *GuildConfigUpdateOne) ClearRegexMatch() *GuildConfigUpdateOne

ClearRegexMatch clears the value of the "regex_match" field.

func (*GuildConfigUpdateOne) Exec

func (gcuo *GuildConfigUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GuildConfigUpdateOne) ExecX

func (gcuo *GuildConfigUpdateOne) ExecX(ctx context.Context)

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

func (*GuildConfigUpdateOne) Mutation

func (gcuo *GuildConfigUpdateOne) Mutation() *GuildConfigMutation

Mutation returns the GuildConfigMutation object of the builder.

func (*GuildConfigUpdateOne) Save

Save executes the query and returns the updated GuildConfig entity.

func (*GuildConfigUpdateOne) SaveX

func (gcuo *GuildConfigUpdateOne) SaveX(ctx context.Context) *GuildConfig

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

func (*GuildConfigUpdateOne) Select

func (gcuo *GuildConfigUpdateOne) Select(field string, fields ...string) *GuildConfigUpdateOne

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

func (*GuildConfigUpdateOne) SetContactEmail

func (gcuo *GuildConfigUpdateOne) SetContactEmail(s string) *GuildConfigUpdateOne

SetContactEmail sets the "contact_email" field.

func (*GuildConfigUpdateOne) SetDefaultMaxClones

func (gcuo *GuildConfigUpdateOne) SetDefaultMaxClones(i int) *GuildConfigUpdateOne

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildConfigUpdateOne) SetEnabled

func (gcuo *GuildConfigUpdateOne) SetEnabled(b bool) *GuildConfigUpdateOne

SetEnabled sets the "enabled" field.

func (*GuildConfigUpdateOne) SetInput

SetInput applies the change-set in the UpdateGuildConfigInput on the GuildConfigUpdateOne builder.

func (*GuildConfigUpdateOne) SetNillableContactEmail

func (gcuo *GuildConfigUpdateOne) SetNillableContactEmail(s *string) *GuildConfigUpdateOne

SetNillableContactEmail sets the "contact_email" field if the given value is not nil.

func (*GuildConfigUpdateOne) SetNillableDefaultMaxClones

func (gcuo *GuildConfigUpdateOne) SetNillableDefaultMaxClones(i *int) *GuildConfigUpdateOne

SetNillableDefaultMaxClones sets the "default_max_clones" field if the given value is not nil.

func (*GuildConfigUpdateOne) SetNillableEnabled

func (gcuo *GuildConfigUpdateOne) SetNillableEnabled(b *bool) *GuildConfigUpdateOne

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*GuildConfigUpdateOne) SetNillableRegexMatch

func (gcuo *GuildConfigUpdateOne) SetNillableRegexMatch(s *string) *GuildConfigUpdateOne

SetNillableRegexMatch sets the "regex_match" field if the given value is not nil.

func (*GuildConfigUpdateOne) SetRegexMatch

func (gcuo *GuildConfigUpdateOne) SetRegexMatch(s string) *GuildConfigUpdateOne

SetRegexMatch sets the "regex_match" field.

func (*GuildConfigUpdateOne) SetUpdateTime

func (gcuo *GuildConfigUpdateOne) SetUpdateTime(t time.Time) *GuildConfigUpdateOne

SetUpdateTime sets the "update_time" field.

func (*GuildConfigUpdateOne) Where

Where appends a list predicates to the GuildConfigUpdate builder.

type GuildConfigUpsert

type GuildConfigUpsert struct {
	*sql.UpdateSet
}

GuildConfigUpsert is the "OnConflict" setter.

func (*GuildConfigUpsert) AddDefaultMaxClones

func (u *GuildConfigUpsert) AddDefaultMaxClones(v int) *GuildConfigUpsert

AddDefaultMaxClones adds v to the "default_max_clones" field.

func (*GuildConfigUpsert) ClearContactEmail

func (u *GuildConfigUpsert) ClearContactEmail() *GuildConfigUpsert

ClearContactEmail clears the value of the "contact_email" field.

func (*GuildConfigUpsert) ClearDefaultMaxClones

func (u *GuildConfigUpsert) ClearDefaultMaxClones() *GuildConfigUpsert

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildConfigUpsert) ClearEnabled

func (u *GuildConfigUpsert) ClearEnabled() *GuildConfigUpsert

ClearEnabled clears the value of the "enabled" field.

func (*GuildConfigUpsert) ClearRegexMatch

func (u *GuildConfigUpsert) ClearRegexMatch() *GuildConfigUpsert

ClearRegexMatch clears the value of the "regex_match" field.

func (*GuildConfigUpsert) SetContactEmail

func (u *GuildConfigUpsert) SetContactEmail(v string) *GuildConfigUpsert

SetContactEmail sets the "contact_email" field.

func (*GuildConfigUpsert) SetDefaultMaxClones

func (u *GuildConfigUpsert) SetDefaultMaxClones(v int) *GuildConfigUpsert

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildConfigUpsert) SetEnabled

func (u *GuildConfigUpsert) SetEnabled(v bool) *GuildConfigUpsert

SetEnabled sets the "enabled" field.

func (*GuildConfigUpsert) SetRegexMatch

func (u *GuildConfigUpsert) SetRegexMatch(v string) *GuildConfigUpsert

SetRegexMatch sets the "regex_match" field.

func (*GuildConfigUpsert) SetUpdateTime

func (u *GuildConfigUpsert) SetUpdateTime(v time.Time) *GuildConfigUpsert

SetUpdateTime sets the "update_time" field.

func (*GuildConfigUpsert) UpdateContactEmail

func (u *GuildConfigUpsert) UpdateContactEmail() *GuildConfigUpsert

UpdateContactEmail sets the "contact_email" field to the value that was provided on create.

func (*GuildConfigUpsert) UpdateDefaultMaxClones

func (u *GuildConfigUpsert) UpdateDefaultMaxClones() *GuildConfigUpsert

UpdateDefaultMaxClones sets the "default_max_clones" field to the value that was provided on create.

func (*GuildConfigUpsert) UpdateEnabled

func (u *GuildConfigUpsert) UpdateEnabled() *GuildConfigUpsert

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*GuildConfigUpsert) UpdateRegexMatch

func (u *GuildConfigUpsert) UpdateRegexMatch() *GuildConfigUpsert

UpdateRegexMatch sets the "regex_match" field to the value that was provided on create.

func (*GuildConfigUpsert) UpdateUpdateTime

func (u *GuildConfigUpsert) UpdateUpdateTime() *GuildConfigUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildConfigUpsertBulk

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

GuildConfigUpsertBulk is the builder for "upsert"-ing a bulk of GuildConfig nodes.

func (*GuildConfigUpsertBulk) AddDefaultMaxClones

func (u *GuildConfigUpsertBulk) AddDefaultMaxClones(v int) *GuildConfigUpsertBulk

AddDefaultMaxClones adds v to the "default_max_clones" field.

func (*GuildConfigUpsertBulk) ClearContactEmail

func (u *GuildConfigUpsertBulk) ClearContactEmail() *GuildConfigUpsertBulk

ClearContactEmail clears the value of the "contact_email" field.

func (*GuildConfigUpsertBulk) ClearDefaultMaxClones

func (u *GuildConfigUpsertBulk) ClearDefaultMaxClones() *GuildConfigUpsertBulk

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildConfigUpsertBulk) ClearEnabled

func (u *GuildConfigUpsertBulk) ClearEnabled() *GuildConfigUpsertBulk

ClearEnabled clears the value of the "enabled" field.

func (*GuildConfigUpsertBulk) ClearRegexMatch

func (u *GuildConfigUpsertBulk) ClearRegexMatch() *GuildConfigUpsertBulk

ClearRegexMatch clears the value of the "regex_match" field.

func (*GuildConfigUpsertBulk) DoNothing

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

func (*GuildConfigUpsertBulk) Exec

Exec executes the query.

func (*GuildConfigUpsertBulk) ExecX

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

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

func (*GuildConfigUpsertBulk) Ignore

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

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

func (*GuildConfigUpsertBulk) SetContactEmail

func (u *GuildConfigUpsertBulk) SetContactEmail(v string) *GuildConfigUpsertBulk

SetContactEmail sets the "contact_email" field.

func (*GuildConfigUpsertBulk) SetDefaultMaxClones

func (u *GuildConfigUpsertBulk) SetDefaultMaxClones(v int) *GuildConfigUpsertBulk

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildConfigUpsertBulk) SetEnabled

SetEnabled sets the "enabled" field.

func (*GuildConfigUpsertBulk) SetRegexMatch

func (u *GuildConfigUpsertBulk) SetRegexMatch(v string) *GuildConfigUpsertBulk

SetRegexMatch sets the "regex_match" field.

func (*GuildConfigUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*GuildConfigUpsertBulk) Update

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

func (*GuildConfigUpsertBulk) UpdateContactEmail

func (u *GuildConfigUpsertBulk) UpdateContactEmail() *GuildConfigUpsertBulk

UpdateContactEmail sets the "contact_email" field to the value that was provided on create.

func (*GuildConfigUpsertBulk) UpdateDefaultMaxClones

func (u *GuildConfigUpsertBulk) UpdateDefaultMaxClones() *GuildConfigUpsertBulk

UpdateDefaultMaxClones sets the "default_max_clones" field to the value that was provided on create.

func (*GuildConfigUpsertBulk) UpdateEnabled

func (u *GuildConfigUpsertBulk) UpdateEnabled() *GuildConfigUpsertBulk

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*GuildConfigUpsertBulk) UpdateNewValues

func (u *GuildConfigUpsertBulk) UpdateNewValues() *GuildConfigUpsertBulk

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

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

func (*GuildConfigUpsertBulk) UpdateRegexMatch

func (u *GuildConfigUpsertBulk) UpdateRegexMatch() *GuildConfigUpsertBulk

UpdateRegexMatch sets the "regex_match" field to the value that was provided on create.

func (*GuildConfigUpsertBulk) UpdateUpdateTime

func (u *GuildConfigUpsertBulk) UpdateUpdateTime() *GuildConfigUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildConfigUpsertOne

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

GuildConfigUpsertOne is the builder for "upsert"-ing

one GuildConfig node.

func (*GuildConfigUpsertOne) AddDefaultMaxClones

func (u *GuildConfigUpsertOne) AddDefaultMaxClones(v int) *GuildConfigUpsertOne

AddDefaultMaxClones adds v to the "default_max_clones" field.

func (*GuildConfigUpsertOne) ClearContactEmail

func (u *GuildConfigUpsertOne) ClearContactEmail() *GuildConfigUpsertOne

ClearContactEmail clears the value of the "contact_email" field.

func (*GuildConfigUpsertOne) ClearDefaultMaxClones

func (u *GuildConfigUpsertOne) ClearDefaultMaxClones() *GuildConfigUpsertOne

ClearDefaultMaxClones clears the value of the "default_max_clones" field.

func (*GuildConfigUpsertOne) ClearEnabled

func (u *GuildConfigUpsertOne) ClearEnabled() *GuildConfigUpsertOne

ClearEnabled clears the value of the "enabled" field.

func (*GuildConfigUpsertOne) ClearRegexMatch

func (u *GuildConfigUpsertOne) ClearRegexMatch() *GuildConfigUpsertOne

ClearRegexMatch clears the value of the "regex_match" field.

func (*GuildConfigUpsertOne) DoNothing

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

func (*GuildConfigUpsertOne) Exec

Exec executes the query.

func (*GuildConfigUpsertOne) ExecX

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

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

func (*GuildConfigUpsertOne) ID

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

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

func (*GuildConfigUpsertOne) IDX

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

func (*GuildConfigUpsertOne) Ignore

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

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

func (*GuildConfigUpsertOne) SetContactEmail

func (u *GuildConfigUpsertOne) SetContactEmail(v string) *GuildConfigUpsertOne

SetContactEmail sets the "contact_email" field.

func (*GuildConfigUpsertOne) SetDefaultMaxClones

func (u *GuildConfigUpsertOne) SetDefaultMaxClones(v int) *GuildConfigUpsertOne

SetDefaultMaxClones sets the "default_max_clones" field.

func (*GuildConfigUpsertOne) SetEnabled

SetEnabled sets the "enabled" field.

func (*GuildConfigUpsertOne) SetRegexMatch

func (u *GuildConfigUpsertOne) SetRegexMatch(v string) *GuildConfigUpsertOne

SetRegexMatch sets the "regex_match" field.

func (*GuildConfigUpsertOne) SetUpdateTime

func (u *GuildConfigUpsertOne) SetUpdateTime(v time.Time) *GuildConfigUpsertOne

SetUpdateTime sets the "update_time" field.

func (*GuildConfigUpsertOne) Update

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

func (*GuildConfigUpsertOne) UpdateContactEmail

func (u *GuildConfigUpsertOne) UpdateContactEmail() *GuildConfigUpsertOne

UpdateContactEmail sets the "contact_email" field to the value that was provided on create.

func (*GuildConfigUpsertOne) UpdateDefaultMaxClones

func (u *GuildConfigUpsertOne) UpdateDefaultMaxClones() *GuildConfigUpsertOne

UpdateDefaultMaxClones sets the "default_max_clones" field to the value that was provided on create.

func (*GuildConfigUpsertOne) UpdateEnabled

func (u *GuildConfigUpsertOne) UpdateEnabled() *GuildConfigUpsertOne

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*GuildConfigUpsertOne) UpdateNewValues

func (u *GuildConfigUpsertOne) UpdateNewValues() *GuildConfigUpsertOne

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

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

func (*GuildConfigUpsertOne) UpdateRegexMatch

func (u *GuildConfigUpsertOne) UpdateRegexMatch() *GuildConfigUpsertOne

UpdateRegexMatch sets the "regex_match" field to the value that was provided on create.

func (*GuildConfigUpsertOne) UpdateUpdateTime

func (u *GuildConfigUpsertOne) UpdateUpdateTime() *GuildConfigUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildConfigWhereInput

type GuildConfigWhereInput struct {
	Predicates []predicate.GuildConfig  `json:"-"`
	Not        *GuildConfigWhereInput   `json:"not,omitempty"`
	Or         []*GuildConfigWhereInput `json:"or,omitempty"`
	And        []*GuildConfigWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "create_time" field predicates.
	CreateTime      *time.Time  `json:"createTime,omitempty"`
	CreateTimeNEQ   *time.Time  `json:"createTimeNEQ,omitempty"`
	CreateTimeIn    []time.Time `json:"createTimeIn,omitempty"`
	CreateTimeNotIn []time.Time `json:"createTimeNotIn,omitempty"`
	CreateTimeGT    *time.Time  `json:"createTimeGT,omitempty"`
	CreateTimeGTE   *time.Time  `json:"createTimeGTE,omitempty"`
	CreateTimeLT    *time.Time  `json:"createTimeLT,omitempty"`
	CreateTimeLTE   *time.Time  `json:"createTimeLTE,omitempty"`

	// "update_time" field predicates.
	UpdateTime      *time.Time  `json:"updateTime,omitempty"`
	UpdateTimeNEQ   *time.Time  `json:"updateTimeNEQ,omitempty"`
	UpdateTimeIn    []time.Time `json:"updateTimeIn,omitempty"`
	UpdateTimeNotIn []time.Time `json:"updateTimeNotIn,omitempty"`
	UpdateTimeGT    *time.Time  `json:"updateTimeGT,omitempty"`
	UpdateTimeGTE   *time.Time  `json:"updateTimeGTE,omitempty"`
	UpdateTimeLT    *time.Time  `json:"updateTimeLT,omitempty"`
	UpdateTimeLTE   *time.Time  `json:"updateTimeLTE,omitempty"`

	// "enabled" field predicates.
	Enabled       *bool `json:"enabled,omitempty"`
	EnabledNEQ    *bool `json:"enabledNEQ,omitempty"`
	EnabledIsNil  bool  `json:"enabledIsNil,omitempty"`
	EnabledNotNil bool  `json:"enabledNotNil,omitempty"`

	// "default_max_clones" field predicates.
	DefaultMaxClones       *int  `json:"defaultMaxClones,omitempty"`
	DefaultMaxClonesNEQ    *int  `json:"defaultMaxClonesNEQ,omitempty"`
	DefaultMaxClonesIn     []int `json:"defaultMaxClonesIn,omitempty"`
	DefaultMaxClonesNotIn  []int `json:"defaultMaxClonesNotIn,omitempty"`
	DefaultMaxClonesGT     *int  `json:"defaultMaxClonesGT,omitempty"`
	DefaultMaxClonesGTE    *int  `json:"defaultMaxClonesGTE,omitempty"`
	DefaultMaxClonesLT     *int  `json:"defaultMaxClonesLT,omitempty"`
	DefaultMaxClonesLTE    *int  `json:"defaultMaxClonesLTE,omitempty"`
	DefaultMaxClonesIsNil  bool  `json:"defaultMaxClonesIsNil,omitempty"`
	DefaultMaxClonesNotNil bool  `json:"defaultMaxClonesNotNil,omitempty"`

	// "regex_match" field predicates.
	RegexMatch             *string  `json:"regexMatch,omitempty"`
	RegexMatchNEQ          *string  `json:"regexMatchNEQ,omitempty"`
	RegexMatchIn           []string `json:"regexMatchIn,omitempty"`
	RegexMatchNotIn        []string `json:"regexMatchNotIn,omitempty"`
	RegexMatchGT           *string  `json:"regexMatchGT,omitempty"`
	RegexMatchGTE          *string  `json:"regexMatchGTE,omitempty"`
	RegexMatchLT           *string  `json:"regexMatchLT,omitempty"`
	RegexMatchLTE          *string  `json:"regexMatchLTE,omitempty"`
	RegexMatchContains     *string  `json:"regexMatchContains,omitempty"`
	RegexMatchHasPrefix    *string  `json:"regexMatchHasPrefix,omitempty"`
	RegexMatchHasSuffix    *string  `json:"regexMatchHasSuffix,omitempty"`
	RegexMatchIsNil        bool     `json:"regexMatchIsNil,omitempty"`
	RegexMatchNotNil       bool     `json:"regexMatchNotNil,omitempty"`
	RegexMatchEqualFold    *string  `json:"regexMatchEqualFold,omitempty"`
	RegexMatchContainsFold *string  `json:"regexMatchContainsFold,omitempty"`

	// "contact_email" field predicates.
	ContactEmail             *string  `json:"contactEmail,omitempty"`
	ContactEmailNEQ          *string  `json:"contactEmailNEQ,omitempty"`
	ContactEmailIn           []string `json:"contactEmailIn,omitempty"`
	ContactEmailNotIn        []string `json:"contactEmailNotIn,omitempty"`
	ContactEmailGT           *string  `json:"contactEmailGT,omitempty"`
	ContactEmailGTE          *string  `json:"contactEmailGTE,omitempty"`
	ContactEmailLT           *string  `json:"contactEmailLT,omitempty"`
	ContactEmailLTE          *string  `json:"contactEmailLTE,omitempty"`
	ContactEmailContains     *string  `json:"contactEmailContains,omitempty"`
	ContactEmailHasPrefix    *string  `json:"contactEmailHasPrefix,omitempty"`
	ContactEmailHasSuffix    *string  `json:"contactEmailHasSuffix,omitempty"`
	ContactEmailIsNil        bool     `json:"contactEmailIsNil,omitempty"`
	ContactEmailNotNil       bool     `json:"contactEmailNotNil,omitempty"`
	ContactEmailEqualFold    *string  `json:"contactEmailEqualFold,omitempty"`
	ContactEmailContainsFold *string  `json:"contactEmailContainsFold,omitempty"`

	// "guild" edge predicates.
	HasGuild     *bool              `json:"hasGuild,omitempty"`
	HasGuildWith []*GuildWhereInput `json:"hasGuildWith,omitempty"`
}

GuildConfigWhereInput represents a where input for filtering GuildConfig queries.

func (*GuildConfigWhereInput) AddPredicates

func (i *GuildConfigWhereInput) AddPredicates(predicates ...predicate.GuildConfig)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*GuildConfigWhereInput) Filter

Filter applies the GuildConfigWhereInput filter on the GuildConfigQuery builder.

func (*GuildConfigWhereInput) P

P returns a predicate for filtering guildconfigs. An error is returned if the input is empty or invalid.

type GuildConfigs

type GuildConfigs []*GuildConfig

GuildConfigs is a parsable slice of GuildConfig.

type GuildConnection

type GuildConnection struct {
	Edges      []*GuildEdge `json:"edges"`
	PageInfo   PageInfo     `json:"pageInfo"`
	TotalCount int          `json:"totalCount"`
}

GuildConnection is the connection containing edges to Guild.

type GuildCreate

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

GuildCreate is the builder for creating a Guild entity.

func (*GuildCreate) AddAdminIDs

func (gc *GuildCreate) AddAdminIDs(ids ...int) *GuildCreate

AddAdminIDs adds the "admins" edge to the User entity by IDs.

func (*GuildCreate) AddAdmins

func (gc *GuildCreate) AddAdmins(u ...*User) *GuildCreate

AddAdmins adds the "admins" edges to the User entity.

func (*GuildCreate) AddGuildEventIDs

func (gc *GuildCreate) AddGuildEventIDs(ids ...int) *GuildCreate

AddGuildEventIDs adds the "guild_events" edge to the GuildEvent entity by IDs.

func (*GuildCreate) AddGuildEvents

func (gc *GuildCreate) AddGuildEvents(g ...*GuildEvent) *GuildCreate

AddGuildEvents adds the "guild_events" edges to the GuildEvent entity.

func (*GuildCreate) Exec

func (gc *GuildCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildCreate) ExecX

func (gc *GuildCreate) ExecX(ctx context.Context)

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

func (*GuildCreate) Mutation

func (gc *GuildCreate) Mutation() *GuildMutation

Mutation returns the GuildMutation object of the builder.

func (*GuildCreate) OnConflict

func (gc *GuildCreate) OnConflict(opts ...sql.ConflictOption) *GuildUpsertOne

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

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

func (*GuildCreate) OnConflictColumns

func (gc *GuildCreate) OnConflictColumns(columns ...string) *GuildUpsertOne

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

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

func (*GuildCreate) Save

func (gc *GuildCreate) Save(ctx context.Context) (*Guild, error)

Save creates the Guild in the database.

func (*GuildCreate) SaveX

func (gc *GuildCreate) SaveX(ctx context.Context) *Guild

SaveX calls Save and panics if Save returns an error.

func (*GuildCreate) SetCreateTime

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

SetCreateTime sets the "create_time" field.

func (*GuildCreate) SetFeatures

func (gc *GuildCreate) SetFeatures(s []string) *GuildCreate

SetFeatures sets the "features" field.

func (*GuildCreate) SetGuildAdminConfig

func (gc *GuildCreate) SetGuildAdminConfig(g *GuildAdminConfig) *GuildCreate

SetGuildAdminConfig sets the "guild_admin_config" edge to the GuildAdminConfig entity.

func (*GuildCreate) SetGuildAdminConfigID

func (gc *GuildCreate) SetGuildAdminConfigID(id int) *GuildCreate

SetGuildAdminConfigID sets the "guild_admin_config" edge to the GuildAdminConfig entity by ID.

func (*GuildCreate) SetGuildConfig

func (gc *GuildCreate) SetGuildConfig(g *GuildConfig) *GuildCreate

SetGuildConfig sets the "guild_config" edge to the GuildConfig entity.

func (*GuildCreate) SetGuildConfigID

func (gc *GuildCreate) SetGuildConfigID(id int) *GuildCreate

SetGuildConfigID sets the "guild_config" edge to the GuildConfig entity by ID.

func (*GuildCreate) SetGuildID

func (gc *GuildCreate) SetGuildID(s string) *GuildCreate

SetGuildID sets the "guild_id" field.

func (*GuildCreate) SetIconHash

func (gc *GuildCreate) SetIconHash(s string) *GuildCreate

SetIconHash sets the "icon_hash" field.

func (*GuildCreate) SetIconURL

func (gc *GuildCreate) SetIconURL(s string) *GuildCreate

SetIconURL sets the "icon_url" field.

func (*GuildCreate) SetJoinedAt

func (gc *GuildCreate) SetJoinedAt(t time.Time) *GuildCreate

SetJoinedAt sets the "joined_at" field.

func (*GuildCreate) SetLarge

func (gc *GuildCreate) SetLarge(b bool) *GuildCreate

SetLarge sets the "large" field.

func (*GuildCreate) SetMemberCount

func (gc *GuildCreate) SetMemberCount(i int) *GuildCreate

SetMemberCount sets the "member_count" field.

func (*GuildCreate) SetName

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

SetName sets the "name" field.

func (*GuildCreate) SetNillableCreateTime

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

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

func (*GuildCreate) SetNillableGuildAdminConfigID

func (gc *GuildCreate) SetNillableGuildAdminConfigID(id *int) *GuildCreate

SetNillableGuildAdminConfigID sets the "guild_admin_config" edge to the GuildAdminConfig entity by ID if the given value is not nil.

func (*GuildCreate) SetNillableGuildConfigID

func (gc *GuildCreate) SetNillableGuildConfigID(id *int) *GuildCreate

SetNillableGuildConfigID sets the "guild_config" edge to the GuildConfig entity by ID if the given value is not nil.

func (*GuildCreate) SetNillableIconHash

func (gc *GuildCreate) SetNillableIconHash(s *string) *GuildCreate

SetNillableIconHash sets the "icon_hash" field if the given value is not nil.

func (*GuildCreate) SetNillableJoinedAt

func (gc *GuildCreate) SetNillableJoinedAt(t *time.Time) *GuildCreate

SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.

func (*GuildCreate) SetNillableLarge

func (gc *GuildCreate) SetNillableLarge(b *bool) *GuildCreate

SetNillableLarge sets the "large" field if the given value is not nil.

func (*GuildCreate) SetNillableMemberCount

func (gc *GuildCreate) SetNillableMemberCount(i *int) *GuildCreate

SetNillableMemberCount sets the "member_count" field if the given value is not nil.

func (*GuildCreate) SetNillableOwnerID

func (gc *GuildCreate) SetNillableOwnerID(s *string) *GuildCreate

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*GuildCreate) SetNillablePermissions

func (gc *GuildCreate) SetNillablePermissions(u *uint64) *GuildCreate

SetNillablePermissions sets the "permissions" field if the given value is not nil.

func (*GuildCreate) SetNillableSystemChannelFlags

func (gc *GuildCreate) SetNillableSystemChannelFlags(s *string) *GuildCreate

SetNillableSystemChannelFlags sets the "system_channel_flags" field if the given value is not nil.

func (*GuildCreate) SetNillableUpdateTime

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

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

func (*GuildCreate) SetOwnerID

func (gc *GuildCreate) SetOwnerID(s string) *GuildCreate

SetOwnerID sets the "owner_id" field.

func (*GuildCreate) SetPermissions

func (gc *GuildCreate) SetPermissions(u uint64) *GuildCreate

SetPermissions sets the "permissions" field.

func (*GuildCreate) SetSystemChannelFlags

func (gc *GuildCreate) SetSystemChannelFlags(s string) *GuildCreate

SetSystemChannelFlags sets the "system_channel_flags" field.

func (*GuildCreate) SetUpdateTime

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

SetUpdateTime sets the "update_time" field.

type GuildCreateBulk

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

GuildCreateBulk is the builder for creating many Guild entities in bulk.

func (*GuildCreateBulk) Exec

func (gcb *GuildCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildCreateBulk) ExecX

func (gcb *GuildCreateBulk) ExecX(ctx context.Context)

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

func (*GuildCreateBulk) OnConflict

func (gcb *GuildCreateBulk) OnConflict(opts ...sql.ConflictOption) *GuildUpsertBulk

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

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

func (*GuildCreateBulk) OnConflictColumns

func (gcb *GuildCreateBulk) OnConflictColumns(columns ...string) *GuildUpsertBulk

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

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

func (*GuildCreateBulk) Save

func (gcb *GuildCreateBulk) Save(ctx context.Context) ([]*Guild, error)

Save creates the Guild entities in the database.

func (*GuildCreateBulk) SaveX

func (gcb *GuildCreateBulk) SaveX(ctx context.Context) []*Guild

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

type GuildDelete

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

GuildDelete is the builder for deleting a Guild entity.

func (*GuildDelete) Exec

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

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

func (*GuildDelete) ExecX

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

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

func (*GuildDelete) Where

func (gd *GuildDelete) Where(ps ...predicate.Guild) *GuildDelete

Where appends a list predicates to the GuildDelete builder.

type GuildDeleteOne

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

GuildDeleteOne is the builder for deleting a single Guild entity.

func (*GuildDeleteOne) Exec

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

Exec executes the deletion query.

func (*GuildDeleteOne) ExecX

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

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

func (*GuildDeleteOne) Where

func (gdo *GuildDeleteOne) Where(ps ...predicate.Guild) *GuildDeleteOne

Where appends a list predicates to the GuildDelete builder.

type GuildEdge

type GuildEdge struct {
	Node   *Guild `json:"node"`
	Cursor Cursor `json:"cursor"`
}

GuildEdge is the edge representation of Guild.

type GuildEdges

type GuildEdges struct {
	// GuildConfig holds the value of the guild_config edge.
	GuildConfig *GuildConfig `json:"guild_config,omitempty"`
	// GuildAdminConfig holds the value of the guild_admin_config edge.
	GuildAdminConfig *GuildAdminConfig `json:"guild_admin_config,omitempty"`
	// GuildEvents holds the value of the guild_events edge.
	GuildEvents []*GuildEvent `json:"guild_events,omitempty"`
	// The users that are an admin (or owner) of this guild.
	Admins []*User `json:"admins,omitempty"`
	// contains filtered or unexported fields
}

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

func (GuildEdges) AdminsOrErr

func (e GuildEdges) AdminsOrErr() ([]*User, error)

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

func (GuildEdges) GuildAdminConfigOrErr

func (e GuildEdges) GuildAdminConfigOrErr() (*GuildAdminConfig, error)

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

func (GuildEdges) GuildConfigOrErr

func (e GuildEdges) GuildConfigOrErr() (*GuildConfig, error)

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

func (GuildEdges) GuildEventsOrErr

func (e GuildEdges) GuildEventsOrErr() ([]*GuildEvent, error)

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

type GuildEvent

type GuildEvent struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// The type of event that occurred.
	Type guildevent.Type `json:"type,omitempty"`
	// The message associated with the event.
	Message string `json:"message,omitempty"`
	// Additional metadata associated with the event.
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GuildEventQuery when eager-loading is set.
	Edges GuildEventEdges `json:"edges"`
	// contains filtered or unexported fields
}

GuildEvent is the model entity for the GuildEvent schema.

func (*GuildEvent) Guild

func (ge *GuildEvent) Guild(ctx context.Context) (*Guild, error)

func (*GuildEvent) IsNode

func (n *GuildEvent) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*GuildEvent) QueryGuild

func (ge *GuildEvent) QueryGuild() *GuildQuery

QueryGuild queries the "guild" edge of the GuildEvent entity.

func (*GuildEvent) String

func (ge *GuildEvent) String() string

String implements the fmt.Stringer.

func (*GuildEvent) ToEdge

func (ge *GuildEvent) ToEdge(order *GuildEventOrder) *GuildEventEdge

ToEdge converts GuildEvent into GuildEventEdge.

func (*GuildEvent) Unwrap

func (ge *GuildEvent) Unwrap() *GuildEvent

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

func (ge *GuildEvent) Update() *GuildEventUpdateOne

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

func (*GuildEvent) Value

func (ge *GuildEvent) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the GuildEvent. This includes values selected through modifiers, order, etc.

type GuildEventClient

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

GuildEventClient is a client for the GuildEvent schema.

func NewGuildEventClient

func NewGuildEventClient(c config) *GuildEventClient

NewGuildEventClient returns a client for the GuildEvent from the given config.

func (*GuildEventClient) Create

func (c *GuildEventClient) Create() *GuildEventCreate

Create returns a builder for creating a GuildEvent entity.

func (*GuildEventClient) CreateBulk

func (c *GuildEventClient) CreateBulk(builders ...*GuildEventCreate) *GuildEventCreateBulk

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

func (*GuildEventClient) Delete

func (c *GuildEventClient) Delete() *GuildEventDelete

Delete returns a delete builder for GuildEvent.

func (*GuildEventClient) DeleteOne

func (c *GuildEventClient) DeleteOne(ge *GuildEvent) *GuildEventDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GuildEventClient) DeleteOneID

func (c *GuildEventClient) DeleteOneID(id int) *GuildEventDeleteOne

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

func (*GuildEventClient) Get

func (c *GuildEventClient) Get(ctx context.Context, id int) (*GuildEvent, error)

Get returns a GuildEvent entity by its id.

func (*GuildEventClient) GetX

func (c *GuildEventClient) GetX(ctx context.Context, id int) *GuildEvent

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

func (*GuildEventClient) Hooks

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

Hooks returns the client hooks.

func (*GuildEventClient) Intercept

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

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

func (*GuildEventClient) Interceptors

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

Interceptors returns the client interceptors.

func (*GuildEventClient) Query

func (c *GuildEventClient) Query() *GuildEventQuery

Query returns a query builder for GuildEvent.

func (*GuildEventClient) QueryGuild

func (c *GuildEventClient) QueryGuild(ge *GuildEvent) *GuildQuery

QueryGuild queries the guild edge of a GuildEvent.

func (*GuildEventClient) Update

func (c *GuildEventClient) Update() *GuildEventUpdate

Update returns an update builder for GuildEvent.

func (*GuildEventClient) UpdateOne

func (c *GuildEventClient) UpdateOne(ge *GuildEvent) *GuildEventUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GuildEventClient) UpdateOneID

func (c *GuildEventClient) UpdateOneID(id int) *GuildEventUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GuildEventClient) Use

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

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

type GuildEventConnection

type GuildEventConnection struct {
	Edges      []*GuildEventEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

GuildEventConnection is the connection containing edges to GuildEvent.

type GuildEventCreate

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

GuildEventCreate is the builder for creating a GuildEvent entity.

func (*GuildEventCreate) Exec

func (gec *GuildEventCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildEventCreate) ExecX

func (gec *GuildEventCreate) ExecX(ctx context.Context)

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

func (*GuildEventCreate) Mutation

func (gec *GuildEventCreate) Mutation() *GuildEventMutation

Mutation returns the GuildEventMutation object of the builder.

func (*GuildEventCreate) OnConflict

func (gec *GuildEventCreate) OnConflict(opts ...sql.ConflictOption) *GuildEventUpsertOne

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

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

func (*GuildEventCreate) OnConflictColumns

func (gec *GuildEventCreate) OnConflictColumns(columns ...string) *GuildEventUpsertOne

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

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

func (*GuildEventCreate) Save

func (gec *GuildEventCreate) Save(ctx context.Context) (*GuildEvent, error)

Save creates the GuildEvent in the database.

func (*GuildEventCreate) SaveX

func (gec *GuildEventCreate) SaveX(ctx context.Context) *GuildEvent

SaveX calls Save and panics if Save returns an error.

func (*GuildEventCreate) SetCreateTime

func (gec *GuildEventCreate) SetCreateTime(t time.Time) *GuildEventCreate

SetCreateTime sets the "create_time" field.

func (*GuildEventCreate) SetGuild

func (gec *GuildEventCreate) SetGuild(g *Guild) *GuildEventCreate

SetGuild sets the "guild" edge to the Guild entity.

func (*GuildEventCreate) SetGuildID

func (gec *GuildEventCreate) SetGuildID(id int) *GuildEventCreate

SetGuildID sets the "guild" edge to the Guild entity by ID.

func (*GuildEventCreate) SetMessage

func (gec *GuildEventCreate) SetMessage(s string) *GuildEventCreate

SetMessage sets the "message" field.

func (*GuildEventCreate) SetMetadata

func (gec *GuildEventCreate) SetMetadata(m map[string]interface{}) *GuildEventCreate

SetMetadata sets the "metadata" field.

func (*GuildEventCreate) SetNillableCreateTime

func (gec *GuildEventCreate) SetNillableCreateTime(t *time.Time) *GuildEventCreate

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

func (*GuildEventCreate) SetNillableUpdateTime

func (gec *GuildEventCreate) SetNillableUpdateTime(t *time.Time) *GuildEventCreate

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

func (*GuildEventCreate) SetType

SetType sets the "type" field.

func (*GuildEventCreate) SetUpdateTime

func (gec *GuildEventCreate) SetUpdateTime(t time.Time) *GuildEventCreate

SetUpdateTime sets the "update_time" field.

type GuildEventCreateBulk

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

GuildEventCreateBulk is the builder for creating many GuildEvent entities in bulk.

func (*GuildEventCreateBulk) Exec

func (gecb *GuildEventCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildEventCreateBulk) ExecX

func (gecb *GuildEventCreateBulk) ExecX(ctx context.Context)

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

func (*GuildEventCreateBulk) OnConflict

func (gecb *GuildEventCreateBulk) OnConflict(opts ...sql.ConflictOption) *GuildEventUpsertBulk

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

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

func (*GuildEventCreateBulk) OnConflictColumns

func (gecb *GuildEventCreateBulk) OnConflictColumns(columns ...string) *GuildEventUpsertBulk

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

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

func (*GuildEventCreateBulk) Save

func (gecb *GuildEventCreateBulk) Save(ctx context.Context) ([]*GuildEvent, error)

Save creates the GuildEvent entities in the database.

func (*GuildEventCreateBulk) SaveX

func (gecb *GuildEventCreateBulk) SaveX(ctx context.Context) []*GuildEvent

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

type GuildEventDelete

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

GuildEventDelete is the builder for deleting a GuildEvent entity.

func (*GuildEventDelete) Exec

func (ged *GuildEventDelete) Exec(ctx context.Context) (int, error)

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

func (*GuildEventDelete) ExecX

func (ged *GuildEventDelete) ExecX(ctx context.Context) int

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

func (*GuildEventDelete) Where

Where appends a list predicates to the GuildEventDelete builder.

type GuildEventDeleteOne

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

GuildEventDeleteOne is the builder for deleting a single GuildEvent entity.

func (*GuildEventDeleteOne) Exec

func (gedo *GuildEventDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GuildEventDeleteOne) ExecX

func (gedo *GuildEventDeleteOne) ExecX(ctx context.Context)

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

func (*GuildEventDeleteOne) Where

Where appends a list predicates to the GuildEventDelete builder.

type GuildEventEdge

type GuildEventEdge struct {
	Node   *GuildEvent `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

GuildEventEdge is the edge representation of GuildEvent.

type GuildEventEdges

type GuildEventEdges struct {
	// The guild these events belong to.
	Guild *Guild `json:"guild,omitempty"`
	// contains filtered or unexported fields
}

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

func (GuildEventEdges) GuildOrErr

func (e GuildEventEdges) GuildOrErr() (*Guild, error)

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

type GuildEventFilter

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

GuildEventFilter provides a generic filtering capability at runtime for GuildEventQuery.

func (*GuildEventFilter) Where

func (f *GuildEventFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*GuildEventFilter) WhereCreateTime

func (f *GuildEventFilter) WhereCreateTime(p entql.TimeP)

WhereCreateTime applies the entql time.Time predicate on the create_time field.

func (*GuildEventFilter) WhereHasGuild

func (f *GuildEventFilter) WhereHasGuild()

WhereHasGuild applies a predicate to check if query has an edge guild.

func (*GuildEventFilter) WhereHasGuildWith

func (f *GuildEventFilter) WhereHasGuildWith(preds ...predicate.Guild)

WhereHasGuildWith applies a predicate to check if query has an edge guild with a given conditions (other predicates).

func (*GuildEventFilter) WhereID

func (f *GuildEventFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*GuildEventFilter) WhereMessage

func (f *GuildEventFilter) WhereMessage(p entql.StringP)

WhereMessage applies the entql string predicate on the message field.

func (*GuildEventFilter) WhereMetadata

func (f *GuildEventFilter) WhereMetadata(p entql.BytesP)

WhereMetadata applies the entql json.RawMessage predicate on the metadata field.

func (*GuildEventFilter) WhereType

func (f *GuildEventFilter) WhereType(p entql.StringP)

WhereType applies the entql string predicate on the type field.

func (*GuildEventFilter) WhereUpdateTime

func (f *GuildEventFilter) WhereUpdateTime(p entql.TimeP)

WhereUpdateTime applies the entql time.Time predicate on the update_time field.

type GuildEventGroupBy

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

GuildEventGroupBy is the group-by builder for GuildEvent entities.

func (*GuildEventGroupBy) Aggregate

func (gegb *GuildEventGroupBy) Aggregate(fns ...AggregateFunc) *GuildEventGroupBy

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

func (*GuildEventGroupBy) Bool

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

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

func (*GuildEventGroupBy) BoolX

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

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

func (*GuildEventGroupBy) Bools

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

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

func (*GuildEventGroupBy) BoolsX

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

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

func (*GuildEventGroupBy) Float64

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

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

func (*GuildEventGroupBy) Float64X

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

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

func (*GuildEventGroupBy) Float64s

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

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

func (*GuildEventGroupBy) Float64sX

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

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

func (*GuildEventGroupBy) Int

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

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

func (*GuildEventGroupBy) IntX

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

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

func (*GuildEventGroupBy) Ints

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

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

func (*GuildEventGroupBy) IntsX

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

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

func (*GuildEventGroupBy) Scan

func (gegb *GuildEventGroupBy) Scan(ctx context.Context, v any) error

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

func (*GuildEventGroupBy) ScanX

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

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

func (*GuildEventGroupBy) String

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

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

func (*GuildEventGroupBy) StringX

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

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

func (*GuildEventGroupBy) Strings

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

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

func (*GuildEventGroupBy) StringsX

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

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

type GuildEventMutation

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

GuildEventMutation represents an operation that mutates the GuildEvent nodes in the graph.

func (*GuildEventMutation) AddField

func (m *GuildEventMutation) 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 (*GuildEventMutation) AddedEdges

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

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

func (*GuildEventMutation) AddedField

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

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

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

func (*GuildEventMutation) AddedIDs

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

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

func (*GuildEventMutation) ClearEdge

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

func (m *GuildEventMutation) 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 (*GuildEventMutation) ClearGuild

func (m *GuildEventMutation) ClearGuild()

ClearGuild clears the "guild" edge to the Guild entity.

func (*GuildEventMutation) ClearMetadata

func (m *GuildEventMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*GuildEventMutation) ClearedEdges

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

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

func (*GuildEventMutation) ClearedFields

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

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

func (GuildEventMutation) Client

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

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

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

func (*GuildEventMutation) EdgeCleared

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

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

func (*GuildEventMutation) Field

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

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

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

func (*GuildEventMutation) Fields

func (m *GuildEventMutation) 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 (*GuildEventMutation) Filter

func (m *GuildEventMutation) Filter() *GuildEventFilter

Filter returns an entql.Where implementation to apply filters on the GuildEventMutation builder.

func (*GuildEventMutation) GetType

func (m *GuildEventMutation) GetType() (r guildevent.Type, exists bool)

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

func (*GuildEventMutation) GuildCleared

func (m *GuildEventMutation) GuildCleared() bool

GuildCleared reports if the "guild" edge to the Guild entity was cleared.

func (*GuildEventMutation) GuildID

func (m *GuildEventMutation) GuildID() (id int, exists bool)

GuildID returns the "guild" edge ID in the mutation.

func (*GuildEventMutation) GuildIDs

func (m *GuildEventMutation) GuildIDs() (ids []int)

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

func (*GuildEventMutation) ID

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

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

func (*GuildEventMutation) IDs

func (m *GuildEventMutation) IDs(ctx context.Context) ([]int, error)

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

func (*GuildEventMutation) Message

func (m *GuildEventMutation) Message() (r string, exists bool)

Message returns the value of the "message" field in the mutation.

func (*GuildEventMutation) Metadata

func (m *GuildEventMutation) Metadata() (r map[string]interface{}, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*GuildEventMutation) MetadataCleared

func (m *GuildEventMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*GuildEventMutation) OldCreateTime

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

OldCreateTime returns the old "create_time" field's value of the GuildEvent entity. If the GuildEvent 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 (*GuildEventMutation) OldField

func (m *GuildEventMutation) 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 (*GuildEventMutation) OldMessage

func (m *GuildEventMutation) OldMessage(ctx context.Context) (v string, err error)

OldMessage returns the old "message" field's value of the GuildEvent entity. If the GuildEvent 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 (*GuildEventMutation) OldMetadata

func (m *GuildEventMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)

OldMetadata returns the old "metadata" field's value of the GuildEvent entity. If the GuildEvent 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 (*GuildEventMutation) OldType

func (m *GuildEventMutation) OldType(ctx context.Context) (v guildevent.Type, err error)

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

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

OldUpdateTime returns the old "update_time" field's value of the GuildEvent entity. If the GuildEvent 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 (*GuildEventMutation) Op

func (m *GuildEventMutation) Op() Op

Op returns the operation name.

func (*GuildEventMutation) RemovedEdges

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

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

func (*GuildEventMutation) RemovedIDs

func (m *GuildEventMutation) 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 (*GuildEventMutation) ResetCreateTime

func (m *GuildEventMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*GuildEventMutation) ResetEdge

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

func (m *GuildEventMutation) 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 (*GuildEventMutation) ResetGuild

func (m *GuildEventMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*GuildEventMutation) ResetMessage

func (m *GuildEventMutation) ResetMessage()

ResetMessage resets all changes to the "message" field.

func (*GuildEventMutation) ResetMetadata

func (m *GuildEventMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*GuildEventMutation) ResetType

func (m *GuildEventMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*GuildEventMutation) ResetUpdateTime

func (m *GuildEventMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*GuildEventMutation) SetCreateTime

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

SetCreateTime sets the "create_time" field.

func (*GuildEventMutation) SetField

func (m *GuildEventMutation) 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 (*GuildEventMutation) SetGuildID

func (m *GuildEventMutation) SetGuildID(id int)

SetGuildID sets the "guild" edge to the Guild entity by id.

func (*GuildEventMutation) SetMessage

func (m *GuildEventMutation) SetMessage(s string)

SetMessage sets the "message" field.

func (*GuildEventMutation) SetMetadata

func (m *GuildEventMutation) SetMetadata(value map[string]interface{})

SetMetadata sets the "metadata" field.

func (*GuildEventMutation) SetOp

func (m *GuildEventMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GuildEventMutation) SetType

func (m *GuildEventMutation) SetType(gu guildevent.Type)

SetType sets the "type" field.

func (*GuildEventMutation) SetUpdateTime

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

SetUpdateTime sets the "update_time" field.

func (GuildEventMutation) Tx

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

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

func (*GuildEventMutation) Type

func (m *GuildEventMutation) Type() string

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

func (*GuildEventMutation) UpdateTime

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

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

func (*GuildEventMutation) Where

func (m *GuildEventMutation) Where(ps ...predicate.GuildEvent)

Where appends a list predicates to the GuildEventMutation builder.

func (*GuildEventMutation) WhereP

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

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

type GuildEventOrder

type GuildEventOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *GuildEventOrderField `json:"field"`
}

GuildEventOrder defines the ordering of GuildEvent.

type GuildEventOrderField

type GuildEventOrderField struct {
	// Value extracts the ordering value from the given GuildEvent.
	Value func(*GuildEvent) (ent.Value, error)
	// contains filtered or unexported fields
}

GuildEventOrderField defines the ordering field of GuildEvent.

func (GuildEventOrderField) MarshalGQL

func (f GuildEventOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (GuildEventOrderField) String

func (f GuildEventOrderField) String() string

String implement fmt.Stringer interface.

func (*GuildEventOrderField) UnmarshalGQL

func (f *GuildEventOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type GuildEventPaginateOption

type GuildEventPaginateOption func(*guildeventPager) error

GuildEventPaginateOption enables pagination customization.

func WithGuildEventFilter

func WithGuildEventFilter(filter func(*GuildEventQuery) (*GuildEventQuery, error)) GuildEventPaginateOption

WithGuildEventFilter configures pagination filter.

func WithGuildEventOrder

func WithGuildEventOrder(order *GuildEventOrder) GuildEventPaginateOption

WithGuildEventOrder configures pagination ordering.

type GuildEventQuery

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

GuildEventQuery is the builder for querying GuildEvent entities.

func (*GuildEventQuery) Aggregate

func (geq *GuildEventQuery) Aggregate(fns ...AggregateFunc) *GuildEventSelect

Aggregate returns a GuildEventSelect configured with the given aggregations.

func (*GuildEventQuery) All

func (geq *GuildEventQuery) All(ctx context.Context) ([]*GuildEvent, error)

All executes the query and returns a list of GuildEvents.

func (*GuildEventQuery) AllX

func (geq *GuildEventQuery) AllX(ctx context.Context) []*GuildEvent

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

func (*GuildEventQuery) Clone

func (geq *GuildEventQuery) Clone() *GuildEventQuery

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

func (*GuildEventQuery) CollectFields

func (ge *GuildEventQuery) CollectFields(ctx context.Context, satisfies ...string) (*GuildEventQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*GuildEventQuery) Count

func (geq *GuildEventQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GuildEventQuery) CountX

func (geq *GuildEventQuery) CountX(ctx context.Context) int

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

func (*GuildEventQuery) Exist

func (geq *GuildEventQuery) Exist(ctx context.Context) (bool, error)

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

func (*GuildEventQuery) ExistX

func (geq *GuildEventQuery) ExistX(ctx context.Context) bool

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

func (*GuildEventQuery) Filter

func (geq *GuildEventQuery) Filter() *GuildEventFilter

Filter returns a Filter implementation to apply filters on the GuildEventQuery builder.

func (*GuildEventQuery) First

func (geq *GuildEventQuery) First(ctx context.Context) (*GuildEvent, error)

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

func (*GuildEventQuery) FirstID

func (geq *GuildEventQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*GuildEventQuery) FirstIDX

func (geq *GuildEventQuery) FirstIDX(ctx context.Context) int

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

func (*GuildEventQuery) FirstX

func (geq *GuildEventQuery) FirstX(ctx context.Context) *GuildEvent

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

func (*GuildEventQuery) GroupBy

func (geq *GuildEventQuery) GroupBy(field string, fields ...string) *GuildEventGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GuildEvent.Query().
	GroupBy(guildevent.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GuildEventQuery) IDs

func (geq *GuildEventQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*GuildEventQuery) IDsX

func (geq *GuildEventQuery) IDsX(ctx context.Context) []int

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

func (*GuildEventQuery) Limit

func (geq *GuildEventQuery) Limit(limit int) *GuildEventQuery

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

func (*GuildEventQuery) Offset

func (geq *GuildEventQuery) Offset(offset int) *GuildEventQuery

Offset to start from.

func (*GuildEventQuery) Only

func (geq *GuildEventQuery) Only(ctx context.Context) (*GuildEvent, error)

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

func (*GuildEventQuery) OnlyID

func (geq *GuildEventQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*GuildEventQuery) OnlyIDX

func (geq *GuildEventQuery) OnlyIDX(ctx context.Context) int

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

func (*GuildEventQuery) OnlyX

func (geq *GuildEventQuery) OnlyX(ctx context.Context) *GuildEvent

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

func (*GuildEventQuery) Order

Order specifies how the records should be ordered.

func (*GuildEventQuery) Paginate

func (ge *GuildEventQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...GuildEventPaginateOption,
) (*GuildEventConnection, error)

Paginate executes the query and returns a relay based cursor connection to GuildEvent.

func (*GuildEventQuery) QueryGuild

func (geq *GuildEventQuery) QueryGuild() *GuildQuery

QueryGuild chains the current query on the "guild" edge.

func (*GuildEventQuery) Select

func (geq *GuildEventQuery) Select(fields ...string) *GuildEventSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.GuildEvent.Query().
	Select(guildevent.FieldCreateTime).
	Scan(ctx, &v)

func (*GuildEventQuery) Unique

func (geq *GuildEventQuery) Unique(unique bool) *GuildEventQuery

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 (*GuildEventQuery) Where

Where adds a new predicate for the GuildEventQuery builder.

func (*GuildEventQuery) WithGuild

func (geq *GuildEventQuery) WithGuild(opts ...func(*GuildQuery)) *GuildEventQuery

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

type GuildEventSelect

type GuildEventSelect struct {
	*GuildEventQuery
	// contains filtered or unexported fields
}

GuildEventSelect is the builder for selecting fields of GuildEvent entities.

func (*GuildEventSelect) Aggregate

func (ges *GuildEventSelect) Aggregate(fns ...AggregateFunc) *GuildEventSelect

Aggregate adds the given aggregation functions to the selector query.

func (*GuildEventSelect) Bool

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

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

func (*GuildEventSelect) BoolX

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

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

func (*GuildEventSelect) Bools

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

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

func (*GuildEventSelect) BoolsX

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

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

func (*GuildEventSelect) Float64

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

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

func (*GuildEventSelect) Float64X

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

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

func (*GuildEventSelect) Float64s

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

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

func (*GuildEventSelect) Float64sX

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

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

func (*GuildEventSelect) Int

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

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

func (*GuildEventSelect) IntX

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

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

func (*GuildEventSelect) Ints

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

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

func (*GuildEventSelect) IntsX

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

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

func (*GuildEventSelect) Scan

func (ges *GuildEventSelect) Scan(ctx context.Context, v any) error

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

func (*GuildEventSelect) ScanX

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

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

func (*GuildEventSelect) String

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

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

func (*GuildEventSelect) StringX

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

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

func (*GuildEventSelect) Strings

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

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

func (*GuildEventSelect) StringsX

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

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

type GuildEventUpdate

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

GuildEventUpdate is the builder for updating GuildEvent entities.

func (*GuildEventUpdate) ClearMetadata

func (geu *GuildEventUpdate) ClearMetadata() *GuildEventUpdate

ClearMetadata clears the value of the "metadata" field.

func (*GuildEventUpdate) Exec

func (geu *GuildEventUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildEventUpdate) ExecX

func (geu *GuildEventUpdate) ExecX(ctx context.Context)

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

func (*GuildEventUpdate) Mutation

func (geu *GuildEventUpdate) Mutation() *GuildEventMutation

Mutation returns the GuildEventMutation object of the builder.

func (*GuildEventUpdate) Save

func (geu *GuildEventUpdate) Save(ctx context.Context) (int, error)

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

func (*GuildEventUpdate) SaveX

func (geu *GuildEventUpdate) SaveX(ctx context.Context) int

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

func (*GuildEventUpdate) SetMessage

func (geu *GuildEventUpdate) SetMessage(s string) *GuildEventUpdate

SetMessage sets the "message" field.

func (*GuildEventUpdate) SetMetadata

func (geu *GuildEventUpdate) SetMetadata(m map[string]interface{}) *GuildEventUpdate

SetMetadata sets the "metadata" field.

func (*GuildEventUpdate) SetType

SetType sets the "type" field.

func (*GuildEventUpdate) SetUpdateTime

func (geu *GuildEventUpdate) SetUpdateTime(t time.Time) *GuildEventUpdate

SetUpdateTime sets the "update_time" field.

func (*GuildEventUpdate) Where

Where appends a list predicates to the GuildEventUpdate builder.

type GuildEventUpdateOne

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

GuildEventUpdateOne is the builder for updating a single GuildEvent entity.

func (*GuildEventUpdateOne) ClearMetadata

func (geuo *GuildEventUpdateOne) ClearMetadata() *GuildEventUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*GuildEventUpdateOne) Exec

func (geuo *GuildEventUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GuildEventUpdateOne) ExecX

func (geuo *GuildEventUpdateOne) ExecX(ctx context.Context)

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

func (*GuildEventUpdateOne) Mutation

func (geuo *GuildEventUpdateOne) Mutation() *GuildEventMutation

Mutation returns the GuildEventMutation object of the builder.

func (*GuildEventUpdateOne) Save

func (geuo *GuildEventUpdateOne) Save(ctx context.Context) (*GuildEvent, error)

Save executes the query and returns the updated GuildEvent entity.

func (*GuildEventUpdateOne) SaveX

func (geuo *GuildEventUpdateOne) SaveX(ctx context.Context) *GuildEvent

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

func (*GuildEventUpdateOne) Select

func (geuo *GuildEventUpdateOne) Select(field string, fields ...string) *GuildEventUpdateOne

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

func (*GuildEventUpdateOne) SetMessage

func (geuo *GuildEventUpdateOne) SetMessage(s string) *GuildEventUpdateOne

SetMessage sets the "message" field.

func (*GuildEventUpdateOne) SetMetadata

func (geuo *GuildEventUpdateOne) SetMetadata(m map[string]interface{}) *GuildEventUpdateOne

SetMetadata sets the "metadata" field.

func (*GuildEventUpdateOne) SetType

SetType sets the "type" field.

func (*GuildEventUpdateOne) SetUpdateTime

func (geuo *GuildEventUpdateOne) SetUpdateTime(t time.Time) *GuildEventUpdateOne

SetUpdateTime sets the "update_time" field.

func (*GuildEventUpdateOne) Where

Where appends a list predicates to the GuildEventUpdate builder.

type GuildEventUpsert

type GuildEventUpsert struct {
	*sql.UpdateSet
}

GuildEventUpsert is the "OnConflict" setter.

func (*GuildEventUpsert) ClearMetadata

func (u *GuildEventUpsert) ClearMetadata() *GuildEventUpsert

ClearMetadata clears the value of the "metadata" field.

func (*GuildEventUpsert) SetMessage

func (u *GuildEventUpsert) SetMessage(v string) *GuildEventUpsert

SetMessage sets the "message" field.

func (*GuildEventUpsert) SetMetadata

func (u *GuildEventUpsert) SetMetadata(v map[string]interface{}) *GuildEventUpsert

SetMetadata sets the "metadata" field.

func (*GuildEventUpsert) SetType

SetType sets the "type" field.

func (*GuildEventUpsert) SetUpdateTime

func (u *GuildEventUpsert) SetUpdateTime(v time.Time) *GuildEventUpsert

SetUpdateTime sets the "update_time" field.

func (*GuildEventUpsert) UpdateMessage

func (u *GuildEventUpsert) UpdateMessage() *GuildEventUpsert

UpdateMessage sets the "message" field to the value that was provided on create.

func (*GuildEventUpsert) UpdateMetadata

func (u *GuildEventUpsert) UpdateMetadata() *GuildEventUpsert

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*GuildEventUpsert) UpdateType

func (u *GuildEventUpsert) UpdateType() *GuildEventUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*GuildEventUpsert) UpdateUpdateTime

func (u *GuildEventUpsert) UpdateUpdateTime() *GuildEventUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildEventUpsertBulk

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

GuildEventUpsertBulk is the builder for "upsert"-ing a bulk of GuildEvent nodes.

func (*GuildEventUpsertBulk) ClearMetadata

func (u *GuildEventUpsertBulk) ClearMetadata() *GuildEventUpsertBulk

ClearMetadata clears the value of the "metadata" field.

func (*GuildEventUpsertBulk) DoNothing

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

func (*GuildEventUpsertBulk) Exec

Exec executes the query.

func (*GuildEventUpsertBulk) ExecX

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

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

func (*GuildEventUpsertBulk) Ignore

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

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

func (*GuildEventUpsertBulk) SetMessage

SetMessage sets the "message" field.

func (*GuildEventUpsertBulk) SetMetadata

func (u *GuildEventUpsertBulk) SetMetadata(v map[string]interface{}) *GuildEventUpsertBulk

SetMetadata sets the "metadata" field.

func (*GuildEventUpsertBulk) SetType

SetType sets the "type" field.

func (*GuildEventUpsertBulk) SetUpdateTime

func (u *GuildEventUpsertBulk) SetUpdateTime(v time.Time) *GuildEventUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*GuildEventUpsertBulk) Update

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

func (*GuildEventUpsertBulk) UpdateMessage

func (u *GuildEventUpsertBulk) UpdateMessage() *GuildEventUpsertBulk

UpdateMessage sets the "message" field to the value that was provided on create.

func (*GuildEventUpsertBulk) UpdateMetadata

func (u *GuildEventUpsertBulk) UpdateMetadata() *GuildEventUpsertBulk

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*GuildEventUpsertBulk) UpdateNewValues

func (u *GuildEventUpsertBulk) UpdateNewValues() *GuildEventUpsertBulk

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

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

func (*GuildEventUpsertBulk) UpdateType

func (u *GuildEventUpsertBulk) UpdateType() *GuildEventUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

func (*GuildEventUpsertBulk) UpdateUpdateTime

func (u *GuildEventUpsertBulk) UpdateUpdateTime() *GuildEventUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildEventUpsertOne

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

GuildEventUpsertOne is the builder for "upsert"-ing

one GuildEvent node.

func (*GuildEventUpsertOne) ClearMetadata

func (u *GuildEventUpsertOne) ClearMetadata() *GuildEventUpsertOne

ClearMetadata clears the value of the "metadata" field.

func (*GuildEventUpsertOne) DoNothing

func (u *GuildEventUpsertOne) DoNothing() *GuildEventUpsertOne

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

func (*GuildEventUpsertOne) Exec

Exec executes the query.

func (*GuildEventUpsertOne) ExecX

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

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

func (*GuildEventUpsertOne) ID

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

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

func (*GuildEventUpsertOne) IDX

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

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

func (*GuildEventUpsertOne) Ignore

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

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

func (*GuildEventUpsertOne) SetMessage

SetMessage sets the "message" field.

func (*GuildEventUpsertOne) SetMetadata

func (u *GuildEventUpsertOne) SetMetadata(v map[string]interface{}) *GuildEventUpsertOne

SetMetadata sets the "metadata" field.

func (*GuildEventUpsertOne) SetType

SetType sets the "type" field.

func (*GuildEventUpsertOne) SetUpdateTime

func (u *GuildEventUpsertOne) SetUpdateTime(v time.Time) *GuildEventUpsertOne

SetUpdateTime sets the "update_time" field.

func (*GuildEventUpsertOne) Update

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

func (*GuildEventUpsertOne) UpdateMessage

func (u *GuildEventUpsertOne) UpdateMessage() *GuildEventUpsertOne

UpdateMessage sets the "message" field to the value that was provided on create.

func (*GuildEventUpsertOne) UpdateMetadata

func (u *GuildEventUpsertOne) UpdateMetadata() *GuildEventUpsertOne

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*GuildEventUpsertOne) UpdateNewValues

func (u *GuildEventUpsertOne) UpdateNewValues() *GuildEventUpsertOne

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

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

func (*GuildEventUpsertOne) UpdateType

func (u *GuildEventUpsertOne) UpdateType() *GuildEventUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*GuildEventUpsertOne) UpdateUpdateTime

func (u *GuildEventUpsertOne) UpdateUpdateTime() *GuildEventUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildEventWhereInput

type GuildEventWhereInput struct {
	Predicates []predicate.GuildEvent  `json:"-"`
	Not        *GuildEventWhereInput   `json:"not,omitempty"`
	Or         []*GuildEventWhereInput `json:"or,omitempty"`
	And        []*GuildEventWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "create_time" field predicates.
	CreateTime      *time.Time  `json:"createTime,omitempty"`
	CreateTimeNEQ   *time.Time  `json:"createTimeNEQ,omitempty"`
	CreateTimeIn    []time.Time `json:"createTimeIn,omitempty"`
	CreateTimeNotIn []time.Time `json:"createTimeNotIn,omitempty"`
	CreateTimeGT    *time.Time  `json:"createTimeGT,omitempty"`
	CreateTimeGTE   *time.Time  `json:"createTimeGTE,omitempty"`
	CreateTimeLT    *time.Time  `json:"createTimeLT,omitempty"`
	CreateTimeLTE   *time.Time  `json:"createTimeLTE,omitempty"`

	// "update_time" field predicates.
	UpdateTime      *time.Time  `json:"updateTime,omitempty"`
	UpdateTimeNEQ   *time.Time  `json:"updateTimeNEQ,omitempty"`
	UpdateTimeIn    []time.Time `json:"updateTimeIn,omitempty"`
	UpdateTimeNotIn []time.Time `json:"updateTimeNotIn,omitempty"`
	UpdateTimeGT    *time.Time  `json:"updateTimeGT,omitempty"`
	UpdateTimeGTE   *time.Time  `json:"updateTimeGTE,omitempty"`
	UpdateTimeLT    *time.Time  `json:"updateTimeLT,omitempty"`
	UpdateTimeLTE   *time.Time  `json:"updateTimeLTE,omitempty"`

	// "type" field predicates.
	Type      *guildevent.Type  `json:"type,omitempty"`
	TypeNEQ   *guildevent.Type  `json:"typeNEQ,omitempty"`
	TypeIn    []guildevent.Type `json:"typeIn,omitempty"`
	TypeNotIn []guildevent.Type `json:"typeNotIn,omitempty"`

	// "message" field predicates.
	Message             *string  `json:"message,omitempty"`
	MessageNEQ          *string  `json:"messageNEQ,omitempty"`
	MessageIn           []string `json:"messageIn,omitempty"`
	MessageNotIn        []string `json:"messageNotIn,omitempty"`
	MessageGT           *string  `json:"messageGT,omitempty"`
	MessageGTE          *string  `json:"messageGTE,omitempty"`
	MessageLT           *string  `json:"messageLT,omitempty"`
	MessageLTE          *string  `json:"messageLTE,omitempty"`
	MessageContains     *string  `json:"messageContains,omitempty"`
	MessageHasPrefix    *string  `json:"messageHasPrefix,omitempty"`
	MessageHasSuffix    *string  `json:"messageHasSuffix,omitempty"`
	MessageEqualFold    *string  `json:"messageEqualFold,omitempty"`
	MessageContainsFold *string  `json:"messageContainsFold,omitempty"`

	// "guild" edge predicates.
	HasGuild     *bool              `json:"hasGuild,omitempty"`
	HasGuildWith []*GuildWhereInput `json:"hasGuildWith,omitempty"`
}

GuildEventWhereInput represents a where input for filtering GuildEvent queries.

func (*GuildEventWhereInput) AddPredicates

func (i *GuildEventWhereInput) AddPredicates(predicates ...predicate.GuildEvent)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*GuildEventWhereInput) Filter

Filter applies the GuildEventWhereInput filter on the GuildEventQuery builder.

func (*GuildEventWhereInput) P

P returns a predicate for filtering guildevents. An error is returned if the input is empty or invalid.

type GuildEvents

type GuildEvents []*GuildEvent

GuildEvents is a parsable slice of GuildEvent.

type GuildFilter

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

GuildFilter provides a generic filtering capability at runtime for GuildQuery.

func (*GuildFilter) Where

func (f *GuildFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*GuildFilter) WhereCreateTime

func (f *GuildFilter) WhereCreateTime(p entql.TimeP)

WhereCreateTime applies the entql time.Time predicate on the create_time field.

func (*GuildFilter) WhereFeatures

func (f *GuildFilter) WhereFeatures(p entql.BytesP)

WhereFeatures applies the entql json.RawMessage predicate on the features field.

func (*GuildFilter) WhereGuildID

func (f *GuildFilter) WhereGuildID(p entql.StringP)

WhereGuildID applies the entql string predicate on the guild_id field.

func (*GuildFilter) WhereHasAdmins

func (f *GuildFilter) WhereHasAdmins()

WhereHasAdmins applies a predicate to check if query has an edge admins.

func (*GuildFilter) WhereHasAdminsWith

func (f *GuildFilter) WhereHasAdminsWith(preds ...predicate.User)

WhereHasAdminsWith applies a predicate to check if query has an edge admins with a given conditions (other predicates).

func (*GuildFilter) WhereHasGuildAdminConfig

func (f *GuildFilter) WhereHasGuildAdminConfig()

WhereHasGuildAdminConfig applies a predicate to check if query has an edge guild_admin_config.

func (*GuildFilter) WhereHasGuildAdminConfigWith

func (f *GuildFilter) WhereHasGuildAdminConfigWith(preds ...predicate.GuildAdminConfig)

WhereHasGuildAdminConfigWith applies a predicate to check if query has an edge guild_admin_config with a given conditions (other predicates).

func (*GuildFilter) WhereHasGuildConfig

func (f *GuildFilter) WhereHasGuildConfig()

WhereHasGuildConfig applies a predicate to check if query has an edge guild_config.

func (*GuildFilter) WhereHasGuildConfigWith

func (f *GuildFilter) WhereHasGuildConfigWith(preds ...predicate.GuildConfig)

WhereHasGuildConfigWith applies a predicate to check if query has an edge guild_config with a given conditions (other predicates).

func (*GuildFilter) WhereHasGuildEvents

func (f *GuildFilter) WhereHasGuildEvents()

WhereHasGuildEvents applies a predicate to check if query has an edge guild_events.

func (*GuildFilter) WhereHasGuildEventsWith

func (f *GuildFilter) WhereHasGuildEventsWith(preds ...predicate.GuildEvent)

WhereHasGuildEventsWith applies a predicate to check if query has an edge guild_events with a given conditions (other predicates).

func (*GuildFilter) WhereID

func (f *GuildFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*GuildFilter) WhereIconHash

func (f *GuildFilter) WhereIconHash(p entql.StringP)

WhereIconHash applies the entql string predicate on the icon_hash field.

func (*GuildFilter) WhereIconURL

func (f *GuildFilter) WhereIconURL(p entql.StringP)

WhereIconURL applies the entql string predicate on the icon_url field.

func (*GuildFilter) WhereJoinedAt

func (f *GuildFilter) WhereJoinedAt(p entql.TimeP)

WhereJoinedAt applies the entql time.Time predicate on the joined_at field.

func (*GuildFilter) WhereLarge

func (f *GuildFilter) WhereLarge(p entql.BoolP)

WhereLarge applies the entql bool predicate on the large field.

func (*GuildFilter) WhereMemberCount

func (f *GuildFilter) WhereMemberCount(p entql.IntP)

WhereMemberCount applies the entql int predicate on the member_count field.

func (*GuildFilter) WhereName

func (f *GuildFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*GuildFilter) WhereOwnerID

func (f *GuildFilter) WhereOwnerID(p entql.StringP)

WhereOwnerID applies the entql string predicate on the owner_id field.

func (*GuildFilter) WherePermissions

func (f *GuildFilter) WherePermissions(p entql.Uint64P)

WherePermissions applies the entql uint64 predicate on the permissions field.

func (*GuildFilter) WhereSystemChannelFlags

func (f *GuildFilter) WhereSystemChannelFlags(p entql.StringP)

WhereSystemChannelFlags applies the entql string predicate on the system_channel_flags field.

func (*GuildFilter) WhereUpdateTime

func (f *GuildFilter) WhereUpdateTime(p entql.TimeP)

WhereUpdateTime applies the entql time.Time predicate on the update_time field.

type GuildGroupBy

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

GuildGroupBy is the group-by builder for Guild entities.

func (*GuildGroupBy) Aggregate

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

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

func (*GuildGroupBy) Bool

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

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

func (*GuildGroupBy) BoolX

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

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

func (*GuildGroupBy) Bools

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

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

func (*GuildGroupBy) BoolsX

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

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

func (*GuildGroupBy) Float64

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

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

func (*GuildGroupBy) Float64X

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

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

func (*GuildGroupBy) Float64s

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

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

func (*GuildGroupBy) Float64sX

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

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

func (*GuildGroupBy) Int

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

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

func (*GuildGroupBy) IntX

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

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

func (*GuildGroupBy) Ints

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

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

func (*GuildGroupBy) IntsX

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

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

func (*GuildGroupBy) Scan

func (ggb *GuildGroupBy) Scan(ctx context.Context, v any) error

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

func (*GuildGroupBy) ScanX

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

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

func (*GuildGroupBy) String

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

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

func (*GuildGroupBy) StringX

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

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

func (*GuildGroupBy) Strings

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

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

func (*GuildGroupBy) StringsX

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

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

type GuildMutation

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

GuildMutation represents an operation that mutates the Guild nodes in the graph.

func (*GuildMutation) AddAdminIDs

func (m *GuildMutation) AddAdminIDs(ids ...int)

AddAdminIDs adds the "admins" edge to the User entity by ids.

func (*GuildMutation) AddField

func (m *GuildMutation) 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 (*GuildMutation) AddGuildEventIDs

func (m *GuildMutation) AddGuildEventIDs(ids ...int)

AddGuildEventIDs adds the "guild_events" edge to the GuildEvent entity by ids.

func (*GuildMutation) AddMemberCount

func (m *GuildMutation) AddMemberCount(i int)

AddMemberCount adds i to the "member_count" field.

func (*GuildMutation) AddPermissions

func (m *GuildMutation) AddPermissions(u int64)

AddPermissions adds u to the "permissions" field.

func (*GuildMutation) AddedEdges

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

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

func (*GuildMutation) AddedField

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

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

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

func (*GuildMutation) AddedIDs

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

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

func (*GuildMutation) AddedMemberCount

func (m *GuildMutation) AddedMemberCount() (r int, exists bool)

AddedMemberCount returns the value that was added to the "member_count" field in this mutation.

func (*GuildMutation) AddedPermissions

func (m *GuildMutation) AddedPermissions() (r int64, exists bool)

AddedPermissions returns the value that was added to the "permissions" field in this mutation.

func (*GuildMutation) AdminsCleared

func (m *GuildMutation) AdminsCleared() bool

AdminsCleared reports if the "admins" edge to the User entity was cleared.

func (*GuildMutation) AdminsIDs

func (m *GuildMutation) AdminsIDs() (ids []int)

AdminsIDs returns the "admins" edge IDs in the mutation.

func (*GuildMutation) AppendFeatures

func (m *GuildMutation) AppendFeatures(s []string)

AppendFeatures adds s to the "features" field.

func (*GuildMutation) AppendedFeatures

func (m *GuildMutation) AppendedFeatures() ([]string, bool)

AppendedFeatures returns the list of values that were appended to the "features" field in this mutation.

func (*GuildMutation) ClearAdmins

func (m *GuildMutation) ClearAdmins()

ClearAdmins clears the "admins" edge to the User entity.

func (*GuildMutation) ClearEdge

func (m *GuildMutation) 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 (*GuildMutation) ClearFeatures

func (m *GuildMutation) ClearFeatures()

ClearFeatures clears the value of the "features" field.

func (*GuildMutation) ClearField

func (m *GuildMutation) 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 (*GuildMutation) ClearGuildAdminConfig

func (m *GuildMutation) ClearGuildAdminConfig()

ClearGuildAdminConfig clears the "guild_admin_config" edge to the GuildAdminConfig entity.

func (*GuildMutation) ClearGuildConfig

func (m *GuildMutation) ClearGuildConfig()

ClearGuildConfig clears the "guild_config" edge to the GuildConfig entity.

func (*GuildMutation) ClearGuildEvents

func (m *GuildMutation) ClearGuildEvents()

ClearGuildEvents clears the "guild_events" edge to the GuildEvent entity.

func (*GuildMutation) ClearIconHash

func (m *GuildMutation) ClearIconHash()

ClearIconHash clears the value of the "icon_hash" field.

func (*GuildMutation) ClearJoinedAt

func (m *GuildMutation) ClearJoinedAt()

ClearJoinedAt clears the value of the "joined_at" field.

func (*GuildMutation) ClearLarge

func (m *GuildMutation) ClearLarge()

ClearLarge clears the value of the "large" field.

func (*GuildMutation) ClearMemberCount

func (m *GuildMutation) ClearMemberCount()

ClearMemberCount clears the value of the "member_count" field.

func (*GuildMutation) ClearOwnerID

func (m *GuildMutation) ClearOwnerID()

ClearOwnerID clears the value of the "owner_id" field.

func (*GuildMutation) ClearPermissions

func (m *GuildMutation) ClearPermissions()

ClearPermissions clears the value of the "permissions" field.

func (*GuildMutation) ClearSystemChannelFlags

func (m *GuildMutation) ClearSystemChannelFlags()

ClearSystemChannelFlags clears the value of the "system_channel_flags" field.

func (*GuildMutation) ClearedEdges

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

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

func (*GuildMutation) ClearedFields

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

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

func (GuildMutation) Client

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

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

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

func (*GuildMutation) EdgeCleared

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

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

func (*GuildMutation) Features

func (m *GuildMutation) Features() (r []string, exists bool)

Features returns the value of the "features" field in the mutation.

func (*GuildMutation) FeaturesCleared

func (m *GuildMutation) FeaturesCleared() bool

FeaturesCleared returns if the "features" field was cleared in this mutation.

func (*GuildMutation) Field

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

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

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

func (*GuildMutation) Fields

func (m *GuildMutation) 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 (*GuildMutation) Filter

func (m *GuildMutation) Filter() *GuildFilter

Filter returns an entql.Where implementation to apply filters on the GuildMutation builder.

func (*GuildMutation) GuildAdminConfigCleared

func (m *GuildMutation) GuildAdminConfigCleared() bool

GuildAdminConfigCleared reports if the "guild_admin_config" edge to the GuildAdminConfig entity was cleared.

func (*GuildMutation) GuildAdminConfigID

func (m *GuildMutation) GuildAdminConfigID() (id int, exists bool)

GuildAdminConfigID returns the "guild_admin_config" edge ID in the mutation.

func (*GuildMutation) GuildAdminConfigIDs

func (m *GuildMutation) GuildAdminConfigIDs() (ids []int)

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

func (*GuildMutation) GuildConfigCleared

func (m *GuildMutation) GuildConfigCleared() bool

GuildConfigCleared reports if the "guild_config" edge to the GuildConfig entity was cleared.

func (*GuildMutation) GuildConfigID

func (m *GuildMutation) GuildConfigID() (id int, exists bool)

GuildConfigID returns the "guild_config" edge ID in the mutation.

func (*GuildMutation) GuildConfigIDs

func (m *GuildMutation) GuildConfigIDs() (ids []int)

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

func (*GuildMutation) GuildEventsCleared

func (m *GuildMutation) GuildEventsCleared() bool

GuildEventsCleared reports if the "guild_events" edge to the GuildEvent entity was cleared.

func (*GuildMutation) GuildEventsIDs

func (m *GuildMutation) GuildEventsIDs() (ids []int)

GuildEventsIDs returns the "guild_events" edge IDs in the mutation.

func (*GuildMutation) GuildID

func (m *GuildMutation) GuildID() (r string, exists bool)

GuildID returns the value of the "guild_id" field in the mutation.

func (*GuildMutation) ID

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

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

func (*GuildMutation) IDs

func (m *GuildMutation) IDs(ctx context.Context) ([]int, error)

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

func (*GuildMutation) IconHash

func (m *GuildMutation) IconHash() (r string, exists bool)

IconHash returns the value of the "icon_hash" field in the mutation.

func (*GuildMutation) IconHashCleared

func (m *GuildMutation) IconHashCleared() bool

IconHashCleared returns if the "icon_hash" field was cleared in this mutation.

func (*GuildMutation) IconURL

func (m *GuildMutation) IconURL() (r string, exists bool)

IconURL returns the value of the "icon_url" field in the mutation.

func (*GuildMutation) JoinedAt

func (m *GuildMutation) JoinedAt() (r time.Time, exists bool)

JoinedAt returns the value of the "joined_at" field in the mutation.

func (*GuildMutation) JoinedAtCleared

func (m *GuildMutation) JoinedAtCleared() bool

JoinedAtCleared returns if the "joined_at" field was cleared in this mutation.

func (*GuildMutation) Large

func (m *GuildMutation) Large() (r bool, exists bool)

Large returns the value of the "large" field in the mutation.

func (*GuildMutation) LargeCleared

func (m *GuildMutation) LargeCleared() bool

LargeCleared returns if the "large" field was cleared in this mutation.

func (*GuildMutation) MemberCount

func (m *GuildMutation) MemberCount() (r int, exists bool)

MemberCount returns the value of the "member_count" field in the mutation.

func (*GuildMutation) MemberCountCleared

func (m *GuildMutation) MemberCountCleared() bool

MemberCountCleared returns if the "member_count" field was cleared in this mutation.

func (*GuildMutation) Name

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

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

func (*GuildMutation) OldCreateTime

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

OldCreateTime returns the old "create_time" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldFeatures

func (m *GuildMutation) OldFeatures(ctx context.Context) (v []string, err error)

OldFeatures returns the old "features" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldField

func (m *GuildMutation) 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 (*GuildMutation) OldGuildID

func (m *GuildMutation) OldGuildID(ctx context.Context) (v string, err error)

OldGuildID returns the old "guild_id" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldIconHash

func (m *GuildMutation) OldIconHash(ctx context.Context) (v string, err error)

OldIconHash returns the old "icon_hash" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldIconURL

func (m *GuildMutation) OldIconURL(ctx context.Context) (v string, err error)

OldIconURL returns the old "icon_url" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldJoinedAt

func (m *GuildMutation) OldJoinedAt(ctx context.Context) (v *time.Time, err error)

OldJoinedAt returns the old "joined_at" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldLarge

func (m *GuildMutation) OldLarge(ctx context.Context) (v bool, err error)

OldLarge returns the old "large" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldMemberCount

func (m *GuildMutation) OldMemberCount(ctx context.Context) (v int, err error)

OldMemberCount returns the old "member_count" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldName

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

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

func (m *GuildMutation) OldOwnerID(ctx context.Context) (v string, err error)

OldOwnerID returns the old "owner_id" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldPermissions

func (m *GuildMutation) OldPermissions(ctx context.Context) (v uint64, err error)

OldPermissions returns the old "permissions" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldSystemChannelFlags

func (m *GuildMutation) OldSystemChannelFlags(ctx context.Context) (v string, err error)

OldSystemChannelFlags returns the old "system_channel_flags" field's value of the Guild entity. If the Guild 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 (*GuildMutation) OldUpdateTime

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

OldUpdateTime returns the old "update_time" field's value of the Guild entity. If the Guild 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 (*GuildMutation) Op

func (m *GuildMutation) Op() Op

Op returns the operation name.

func (*GuildMutation) OwnerID

func (m *GuildMutation) OwnerID() (r string, exists bool)

OwnerID returns the value of the "owner_id" field in the mutation.

func (*GuildMutation) OwnerIDCleared

func (m *GuildMutation) OwnerIDCleared() bool

OwnerIDCleared returns if the "owner_id" field was cleared in this mutation.

func (*GuildMutation) Permissions

func (m *GuildMutation) Permissions() (r uint64, exists bool)

Permissions returns the value of the "permissions" field in the mutation.

func (*GuildMutation) PermissionsCleared

func (m *GuildMutation) PermissionsCleared() bool

PermissionsCleared returns if the "permissions" field was cleared in this mutation.

func (*GuildMutation) RemoveAdminIDs

func (m *GuildMutation) RemoveAdminIDs(ids ...int)

RemoveAdminIDs removes the "admins" edge to the User entity by IDs.

func (*GuildMutation) RemoveGuildEventIDs

func (m *GuildMutation) RemoveGuildEventIDs(ids ...int)

RemoveGuildEventIDs removes the "guild_events" edge to the GuildEvent entity by IDs.

func (*GuildMutation) RemovedAdminsIDs

func (m *GuildMutation) RemovedAdminsIDs() (ids []int)

RemovedAdmins returns the removed IDs of the "admins" edge to the User entity.

func (*GuildMutation) RemovedEdges

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

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

func (*GuildMutation) RemovedGuildEventsIDs

func (m *GuildMutation) RemovedGuildEventsIDs() (ids []int)

RemovedGuildEvents returns the removed IDs of the "guild_events" edge to the GuildEvent entity.

func (*GuildMutation) RemovedIDs

func (m *GuildMutation) 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 (*GuildMutation) ResetAdmins

func (m *GuildMutation) ResetAdmins()

ResetAdmins resets all changes to the "admins" edge.

func (*GuildMutation) ResetCreateTime

func (m *GuildMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*GuildMutation) ResetEdge

func (m *GuildMutation) 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 (*GuildMutation) ResetFeatures

func (m *GuildMutation) ResetFeatures()

ResetFeatures resets all changes to the "features" field.

func (*GuildMutation) ResetField

func (m *GuildMutation) 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 (*GuildMutation) ResetGuildAdminConfig

func (m *GuildMutation) ResetGuildAdminConfig()

ResetGuildAdminConfig resets all changes to the "guild_admin_config" edge.

func (*GuildMutation) ResetGuildConfig

func (m *GuildMutation) ResetGuildConfig()

ResetGuildConfig resets all changes to the "guild_config" edge.

func (*GuildMutation) ResetGuildEvents

func (m *GuildMutation) ResetGuildEvents()

ResetGuildEvents resets all changes to the "guild_events" edge.

func (*GuildMutation) ResetGuildID

func (m *GuildMutation) ResetGuildID()

ResetGuildID resets all changes to the "guild_id" field.

func (*GuildMutation) ResetIconHash

func (m *GuildMutation) ResetIconHash()

ResetIconHash resets all changes to the "icon_hash" field.

func (*GuildMutation) ResetIconURL

func (m *GuildMutation) ResetIconURL()

ResetIconURL resets all changes to the "icon_url" field.

func (*GuildMutation) ResetJoinedAt

func (m *GuildMutation) ResetJoinedAt()

ResetJoinedAt resets all changes to the "joined_at" field.

func (*GuildMutation) ResetLarge

func (m *GuildMutation) ResetLarge()

ResetLarge resets all changes to the "large" field.

func (*GuildMutation) ResetMemberCount

func (m *GuildMutation) ResetMemberCount()

ResetMemberCount resets all changes to the "member_count" field.

func (*GuildMutation) ResetName

func (m *GuildMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*GuildMutation) ResetOwnerID

func (m *GuildMutation) ResetOwnerID()

ResetOwnerID resets all changes to the "owner_id" field.

func (*GuildMutation) ResetPermissions

func (m *GuildMutation) ResetPermissions()

ResetPermissions resets all changes to the "permissions" field.

func (*GuildMutation) ResetSystemChannelFlags

func (m *GuildMutation) ResetSystemChannelFlags()

ResetSystemChannelFlags resets all changes to the "system_channel_flags" field.

func (*GuildMutation) ResetUpdateTime

func (m *GuildMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*GuildMutation) SetCreateTime

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

SetCreateTime sets the "create_time" field.

func (*GuildMutation) SetFeatures

func (m *GuildMutation) SetFeatures(s []string)

SetFeatures sets the "features" field.

func (*GuildMutation) SetField

func (m *GuildMutation) 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 (*GuildMutation) SetGuildAdminConfigID

func (m *GuildMutation) SetGuildAdminConfigID(id int)

SetGuildAdminConfigID sets the "guild_admin_config" edge to the GuildAdminConfig entity by id.

func (*GuildMutation) SetGuildConfigID

func (m *GuildMutation) SetGuildConfigID(id int)

SetGuildConfigID sets the "guild_config" edge to the GuildConfig entity by id.

func (*GuildMutation) SetGuildID

func (m *GuildMutation) SetGuildID(s string)

SetGuildID sets the "guild_id" field.

func (*GuildMutation) SetIconHash

func (m *GuildMutation) SetIconHash(s string)

SetIconHash sets the "icon_hash" field.

func (*GuildMutation) SetIconURL

func (m *GuildMutation) SetIconURL(s string)

SetIconURL sets the "icon_url" field.

func (*GuildMutation) SetJoinedAt

func (m *GuildMutation) SetJoinedAt(t time.Time)

SetJoinedAt sets the "joined_at" field.

func (*GuildMutation) SetLarge

func (m *GuildMutation) SetLarge(b bool)

SetLarge sets the "large" field.

func (*GuildMutation) SetMemberCount

func (m *GuildMutation) SetMemberCount(i int)

SetMemberCount sets the "member_count" field.

func (*GuildMutation) SetName

func (m *GuildMutation) SetName(s string)

SetName sets the "name" field.

func (*GuildMutation) SetOp

func (m *GuildMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GuildMutation) SetOwnerID

func (m *GuildMutation) SetOwnerID(s string)

SetOwnerID sets the "owner_id" field.

func (*GuildMutation) SetPermissions

func (m *GuildMutation) SetPermissions(u uint64)

SetPermissions sets the "permissions" field.

func (*GuildMutation) SetSystemChannelFlags

func (m *GuildMutation) SetSystemChannelFlags(s string)

SetSystemChannelFlags sets the "system_channel_flags" field.

func (*GuildMutation) SetUpdateTime

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

SetUpdateTime sets the "update_time" field.

func (*GuildMutation) SystemChannelFlags

func (m *GuildMutation) SystemChannelFlags() (r string, exists bool)

SystemChannelFlags returns the value of the "system_channel_flags" field in the mutation.

func (*GuildMutation) SystemChannelFlagsCleared

func (m *GuildMutation) SystemChannelFlagsCleared() bool

SystemChannelFlagsCleared returns if the "system_channel_flags" field was cleared in this mutation.

func (GuildMutation) Tx

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

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

func (*GuildMutation) Type

func (m *GuildMutation) Type() string

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

func (*GuildMutation) UpdateTime

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

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

func (*GuildMutation) Where

func (m *GuildMutation) Where(ps ...predicate.Guild)

Where appends a list predicates to the GuildMutation builder.

func (*GuildMutation) WhereP

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

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

type GuildOrder

type GuildOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *GuildOrderField `json:"field"`
}

GuildOrder defines the ordering of Guild.

type GuildOrderField

type GuildOrderField struct {
	// Value extracts the ordering value from the given Guild.
	Value func(*Guild) (ent.Value, error)
	// contains filtered or unexported fields
}

GuildOrderField defines the ordering field of Guild.

func (GuildOrderField) MarshalGQL

func (f GuildOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (GuildOrderField) String

func (f GuildOrderField) String() string

String implement fmt.Stringer interface.

func (*GuildOrderField) UnmarshalGQL

func (f *GuildOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type GuildPaginateOption

type GuildPaginateOption func(*guildPager) error

GuildPaginateOption enables pagination customization.

func WithGuildFilter

func WithGuildFilter(filter func(*GuildQuery) (*GuildQuery, error)) GuildPaginateOption

WithGuildFilter configures pagination filter.

func WithGuildOrder

func WithGuildOrder(order *GuildOrder) GuildPaginateOption

WithGuildOrder configures pagination ordering.

type GuildQuery

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

GuildQuery is the builder for querying Guild entities.

func (*GuildQuery) Aggregate

func (gq *GuildQuery) Aggregate(fns ...AggregateFunc) *GuildSelect

Aggregate returns a GuildSelect configured with the given aggregations.

func (*GuildQuery) All

func (gq *GuildQuery) All(ctx context.Context) ([]*Guild, error)

All executes the query and returns a list of Guilds.

func (*GuildQuery) AllX

func (gq *GuildQuery) AllX(ctx context.Context) []*Guild

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

func (*GuildQuery) Clone

func (gq *GuildQuery) Clone() *GuildQuery

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

func (*GuildQuery) CollectFields

func (gu *GuildQuery) CollectFields(ctx context.Context, satisfies ...string) (*GuildQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*GuildQuery) Count

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

Count returns the count of the given query.

func (*GuildQuery) CountX

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

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

func (*GuildQuery) Exist

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

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

func (*GuildQuery) ExistX

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

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

func (*GuildQuery) Filter

func (gq *GuildQuery) Filter() *GuildFilter

Filter returns a Filter implementation to apply filters on the GuildQuery builder.

func (*GuildQuery) First

func (gq *GuildQuery) First(ctx context.Context) (*Guild, error)

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

func (*GuildQuery) FirstID

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

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

func (*GuildQuery) FirstIDX

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

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

func (*GuildQuery) FirstX

func (gq *GuildQuery) FirstX(ctx context.Context) *Guild

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

func (*GuildQuery) GroupBy

func (gq *GuildQuery) GroupBy(field string, fields ...string) *GuildGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Guild.Query().
	GroupBy(guild.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GuildQuery) IDs

func (gq *GuildQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*GuildQuery) IDsX

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

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

func (*GuildQuery) Limit

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

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

func (*GuildQuery) Offset

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

Offset to start from.

func (*GuildQuery) Only

func (gq *GuildQuery) Only(ctx context.Context) (*Guild, error)

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

func (*GuildQuery) OnlyID

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

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

func (*GuildQuery) OnlyIDX

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

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

func (*GuildQuery) OnlyX

func (gq *GuildQuery) OnlyX(ctx context.Context) *Guild

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

func (*GuildQuery) Order

func (gq *GuildQuery) Order(o ...guild.OrderOption) *GuildQuery

Order specifies how the records should be ordered.

func (*GuildQuery) Paginate

func (gu *GuildQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...GuildPaginateOption,
) (*GuildConnection, error)

Paginate executes the query and returns a relay based cursor connection to Guild.

func (*GuildQuery) QueryAdmins

func (gq *GuildQuery) QueryAdmins() *UserQuery

QueryAdmins chains the current query on the "admins" edge.

func (*GuildQuery) QueryGuildAdminConfig

func (gq *GuildQuery) QueryGuildAdminConfig() *GuildAdminConfigQuery

QueryGuildAdminConfig chains the current query on the "guild_admin_config" edge.

func (*GuildQuery) QueryGuildConfig

func (gq *GuildQuery) QueryGuildConfig() *GuildConfigQuery

QueryGuildConfig chains the current query on the "guild_config" edge.

func (*GuildQuery) QueryGuildEvents

func (gq *GuildQuery) QueryGuildEvents() *GuildEventQuery

QueryGuildEvents chains the current query on the "guild_events" edge.

func (*GuildQuery) Select

func (gq *GuildQuery) Select(fields ...string) *GuildSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Guild.Query().
	Select(guild.FieldCreateTime).
	Scan(ctx, &v)

func (*GuildQuery) Unique

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

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 (*GuildQuery) Where

func (gq *GuildQuery) Where(ps ...predicate.Guild) *GuildQuery

Where adds a new predicate for the GuildQuery builder.

func (*GuildQuery) WithAdmins

func (gq *GuildQuery) WithAdmins(opts ...func(*UserQuery)) *GuildQuery

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

func (*GuildQuery) WithGuildAdminConfig

func (gq *GuildQuery) WithGuildAdminConfig(opts ...func(*GuildAdminConfigQuery)) *GuildQuery

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

func (*GuildQuery) WithGuildConfig

func (gq *GuildQuery) WithGuildConfig(opts ...func(*GuildConfigQuery)) *GuildQuery

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

func (*GuildQuery) WithGuildEvents

func (gq *GuildQuery) WithGuildEvents(opts ...func(*GuildEventQuery)) *GuildQuery

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

func (*GuildQuery) WithNamedAdmins

func (gq *GuildQuery) WithNamedAdmins(name string, opts ...func(*UserQuery)) *GuildQuery

WithNamedAdmins tells the query-builder to eager-load the nodes that are connected to the "admins" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*GuildQuery) WithNamedGuildEvents

func (gq *GuildQuery) WithNamedGuildEvents(name string, opts ...func(*GuildEventQuery)) *GuildQuery

WithNamedGuildEvents tells the query-builder to eager-load the nodes that are connected to the "guild_events" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type GuildSelect

type GuildSelect struct {
	*GuildQuery
	// contains filtered or unexported fields
}

GuildSelect is the builder for selecting fields of Guild entities.

func (*GuildSelect) Aggregate

func (gs *GuildSelect) Aggregate(fns ...AggregateFunc) *GuildSelect

Aggregate adds the given aggregation functions to the selector query.

func (*GuildSelect) Bool

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

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

func (*GuildSelect) BoolX

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

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

func (*GuildSelect) Bools

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

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

func (*GuildSelect) BoolsX

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

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

func (*GuildSelect) Float64

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

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

func (*GuildSelect) Float64X

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

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

func (*GuildSelect) Float64s

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

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

func (*GuildSelect) Float64sX

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

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

func (*GuildSelect) Int

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

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

func (*GuildSelect) IntX

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

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

func (*GuildSelect) Ints

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

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

func (*GuildSelect) IntsX

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

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

func (*GuildSelect) Scan

func (gs *GuildSelect) Scan(ctx context.Context, v any) error

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

func (*GuildSelect) ScanX

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

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

func (*GuildSelect) String

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

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

func (*GuildSelect) StringX

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

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

func (*GuildSelect) Strings

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

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

func (*GuildSelect) StringsX

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

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

type GuildUpdate

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

GuildUpdate is the builder for updating Guild entities.

func (*GuildUpdate) AddAdminIDs

func (gu *GuildUpdate) AddAdminIDs(ids ...int) *GuildUpdate

AddAdminIDs adds the "admins" edge to the User entity by IDs.

func (*GuildUpdate) AddAdmins

func (gu *GuildUpdate) AddAdmins(u ...*User) *GuildUpdate

AddAdmins adds the "admins" edges to the User entity.

func (*GuildUpdate) AddGuildEventIDs

func (gu *GuildUpdate) AddGuildEventIDs(ids ...int) *GuildUpdate

AddGuildEventIDs adds the "guild_events" edge to the GuildEvent entity by IDs.

func (*GuildUpdate) AddGuildEvents

func (gu *GuildUpdate) AddGuildEvents(g ...*GuildEvent) *GuildUpdate

AddGuildEvents adds the "guild_events" edges to the GuildEvent entity.

func (*GuildUpdate) AddMemberCount

func (gu *GuildUpdate) AddMemberCount(i int) *GuildUpdate

AddMemberCount adds i to the "member_count" field.

func (*GuildUpdate) AddPermissions

func (gu *GuildUpdate) AddPermissions(u int64) *GuildUpdate

AddPermissions adds u to the "permissions" field.

func (*GuildUpdate) AppendFeatures

func (gu *GuildUpdate) AppendFeatures(s []string) *GuildUpdate

AppendFeatures appends s to the "features" field.

func (*GuildUpdate) ClearAdmins

func (gu *GuildUpdate) ClearAdmins() *GuildUpdate

ClearAdmins clears all "admins" edges to the User entity.

func (*GuildUpdate) ClearFeatures

func (gu *GuildUpdate) ClearFeatures() *GuildUpdate

ClearFeatures clears the value of the "features" field.

func (*GuildUpdate) ClearGuildAdminConfig

func (gu *GuildUpdate) ClearGuildAdminConfig() *GuildUpdate

ClearGuildAdminConfig clears the "guild_admin_config" edge to the GuildAdminConfig entity.

func (*GuildUpdate) ClearGuildConfig

func (gu *GuildUpdate) ClearGuildConfig() *GuildUpdate

ClearGuildConfig clears the "guild_config" edge to the GuildConfig entity.

func (*GuildUpdate) ClearGuildEvents

func (gu *GuildUpdate) ClearGuildEvents() *GuildUpdate

ClearGuildEvents clears all "guild_events" edges to the GuildEvent entity.

func (*GuildUpdate) ClearIconHash

func (gu *GuildUpdate) ClearIconHash() *GuildUpdate

ClearIconHash clears the value of the "icon_hash" field.

func (*GuildUpdate) ClearJoinedAt

func (gu *GuildUpdate) ClearJoinedAt() *GuildUpdate

ClearJoinedAt clears the value of the "joined_at" field.

func (*GuildUpdate) ClearLarge

func (gu *GuildUpdate) ClearLarge() *GuildUpdate

ClearLarge clears the value of the "large" field.

func (*GuildUpdate) ClearMemberCount

func (gu *GuildUpdate) ClearMemberCount() *GuildUpdate

ClearMemberCount clears the value of the "member_count" field.

func (*GuildUpdate) ClearOwnerID

func (gu *GuildUpdate) ClearOwnerID() *GuildUpdate

ClearOwnerID clears the value of the "owner_id" field.

func (*GuildUpdate) ClearPermissions

func (gu *GuildUpdate) ClearPermissions() *GuildUpdate

ClearPermissions clears the value of the "permissions" field.

func (*GuildUpdate) ClearSystemChannelFlags

func (gu *GuildUpdate) ClearSystemChannelFlags() *GuildUpdate

ClearSystemChannelFlags clears the value of the "system_channel_flags" field.

func (*GuildUpdate) Exec

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

Exec executes the query.

func (*GuildUpdate) ExecX

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

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

func (*GuildUpdate) Mutation

func (gu *GuildUpdate) Mutation() *GuildMutation

Mutation returns the GuildMutation object of the builder.

func (*GuildUpdate) RemoveAdminIDs

func (gu *GuildUpdate) RemoveAdminIDs(ids ...int) *GuildUpdate

RemoveAdminIDs removes the "admins" edge to User entities by IDs.

func (*GuildUpdate) RemoveAdmins

func (gu *GuildUpdate) RemoveAdmins(u ...*User) *GuildUpdate

RemoveAdmins removes "admins" edges to User entities.

func (*GuildUpdate) RemoveGuildEventIDs

func (gu *GuildUpdate) RemoveGuildEventIDs(ids ...int) *GuildUpdate

RemoveGuildEventIDs removes the "guild_events" edge to GuildEvent entities by IDs.

func (*GuildUpdate) RemoveGuildEvents

func (gu *GuildUpdate) RemoveGuildEvents(g ...*GuildEvent) *GuildUpdate

RemoveGuildEvents removes "guild_events" edges to GuildEvent entities.

func (*GuildUpdate) Save

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

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

func (*GuildUpdate) SaveX

func (gu *GuildUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GuildUpdate) SetFeatures

func (gu *GuildUpdate) SetFeatures(s []string) *GuildUpdate

SetFeatures sets the "features" field.

func (*GuildUpdate) SetGuildAdminConfig

func (gu *GuildUpdate) SetGuildAdminConfig(g *GuildAdminConfig) *GuildUpdate

SetGuildAdminConfig sets the "guild_admin_config" edge to the GuildAdminConfig entity.

func (*GuildUpdate) SetGuildAdminConfigID

func (gu *GuildUpdate) SetGuildAdminConfigID(id int) *GuildUpdate

SetGuildAdminConfigID sets the "guild_admin_config" edge to the GuildAdminConfig entity by ID.

func (*GuildUpdate) SetGuildConfig

func (gu *GuildUpdate) SetGuildConfig(g *GuildConfig) *GuildUpdate

SetGuildConfig sets the "guild_config" edge to the GuildConfig entity.

func (*GuildUpdate) SetGuildConfigID

func (gu *GuildUpdate) SetGuildConfigID(id int) *GuildUpdate

SetGuildConfigID sets the "guild_config" edge to the GuildConfig entity by ID.

func (*GuildUpdate) SetIconHash

func (gu *GuildUpdate) SetIconHash(s string) *GuildUpdate

SetIconHash sets the "icon_hash" field.

func (*GuildUpdate) SetIconURL

func (gu *GuildUpdate) SetIconURL(s string) *GuildUpdate

SetIconURL sets the "icon_url" field.

func (*GuildUpdate) SetJoinedAt

func (gu *GuildUpdate) SetJoinedAt(t time.Time) *GuildUpdate

SetJoinedAt sets the "joined_at" field.

func (*GuildUpdate) SetLarge

func (gu *GuildUpdate) SetLarge(b bool) *GuildUpdate

SetLarge sets the "large" field.

func (*GuildUpdate) SetMemberCount

func (gu *GuildUpdate) SetMemberCount(i int) *GuildUpdate

SetMemberCount sets the "member_count" field.

func (*GuildUpdate) SetName

func (gu *GuildUpdate) SetName(s string) *GuildUpdate

SetName sets the "name" field.

func (*GuildUpdate) SetNillableGuildAdminConfigID

func (gu *GuildUpdate) SetNillableGuildAdminConfigID(id *int) *GuildUpdate

SetNillableGuildAdminConfigID sets the "guild_admin_config" edge to the GuildAdminConfig entity by ID if the given value is not nil.

func (*GuildUpdate) SetNillableGuildConfigID

func (gu *GuildUpdate) SetNillableGuildConfigID(id *int) *GuildUpdate

SetNillableGuildConfigID sets the "guild_config" edge to the GuildConfig entity by ID if the given value is not nil.

func (*GuildUpdate) SetNillableIconHash

func (gu *GuildUpdate) SetNillableIconHash(s *string) *GuildUpdate

SetNillableIconHash sets the "icon_hash" field if the given value is not nil.

func (*GuildUpdate) SetNillableJoinedAt

func (gu *GuildUpdate) SetNillableJoinedAt(t *time.Time) *GuildUpdate

SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.

func (*GuildUpdate) SetNillableLarge

func (gu *GuildUpdate) SetNillableLarge(b *bool) *GuildUpdate

SetNillableLarge sets the "large" field if the given value is not nil.

func (*GuildUpdate) SetNillableMemberCount

func (gu *GuildUpdate) SetNillableMemberCount(i *int) *GuildUpdate

SetNillableMemberCount sets the "member_count" field if the given value is not nil.

func (*GuildUpdate) SetNillableOwnerID

func (gu *GuildUpdate) SetNillableOwnerID(s *string) *GuildUpdate

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*GuildUpdate) SetNillablePermissions

func (gu *GuildUpdate) SetNillablePermissions(u *uint64) *GuildUpdate

SetNillablePermissions sets the "permissions" field if the given value is not nil.

func (*GuildUpdate) SetNillableSystemChannelFlags

func (gu *GuildUpdate) SetNillableSystemChannelFlags(s *string) *GuildUpdate

SetNillableSystemChannelFlags sets the "system_channel_flags" field if the given value is not nil.

func (*GuildUpdate) SetOwnerID

func (gu *GuildUpdate) SetOwnerID(s string) *GuildUpdate

SetOwnerID sets the "owner_id" field.

func (*GuildUpdate) SetPermissions

func (gu *GuildUpdate) SetPermissions(u uint64) *GuildUpdate

SetPermissions sets the "permissions" field.

func (*GuildUpdate) SetSystemChannelFlags

func (gu *GuildUpdate) SetSystemChannelFlags(s string) *GuildUpdate

SetSystemChannelFlags sets the "system_channel_flags" field.

func (*GuildUpdate) SetUpdateTime

func (gu *GuildUpdate) SetUpdateTime(t time.Time) *GuildUpdate

SetUpdateTime sets the "update_time" field.

func (*GuildUpdate) Where

func (gu *GuildUpdate) Where(ps ...predicate.Guild) *GuildUpdate

Where appends a list predicates to the GuildUpdate builder.

type GuildUpdateOne

type GuildUpdateOne struct {
	// contains filtered or unexported fields
}

GuildUpdateOne is the builder for updating a single Guild entity.

func (*GuildUpdateOne) AddAdminIDs

func (guo *GuildUpdateOne) AddAdminIDs(ids ...int) *GuildUpdateOne

AddAdminIDs adds the "admins" edge to the User entity by IDs.

func (*GuildUpdateOne) AddAdmins

func (guo *GuildUpdateOne) AddAdmins(u ...*User) *GuildUpdateOne

AddAdmins adds the "admins" edges to the User entity.

func (*GuildUpdateOne) AddGuildEventIDs

func (guo *GuildUpdateOne) AddGuildEventIDs(ids ...int) *GuildUpdateOne

AddGuildEventIDs adds the "guild_events" edge to the GuildEvent entity by IDs.

func (*GuildUpdateOne) AddGuildEvents

func (guo *GuildUpdateOne) AddGuildEvents(g ...*GuildEvent) *GuildUpdateOne

AddGuildEvents adds the "guild_events" edges to the GuildEvent entity.

func (*GuildUpdateOne) AddMemberCount

func (guo *GuildUpdateOne) AddMemberCount(i int) *GuildUpdateOne

AddMemberCount adds i to the "member_count" field.

func (*GuildUpdateOne) AddPermissions

func (guo *GuildUpdateOne) AddPermissions(u int64) *GuildUpdateOne

AddPermissions adds u to the "permissions" field.

func (*GuildUpdateOne) AppendFeatures

func (guo *GuildUpdateOne) AppendFeatures(s []string) *GuildUpdateOne

AppendFeatures appends s to the "features" field.

func (*GuildUpdateOne) ClearAdmins

func (guo *GuildUpdateOne) ClearAdmins() *GuildUpdateOne

ClearAdmins clears all "admins" edges to the User entity.

func (*GuildUpdateOne) ClearFeatures

func (guo *GuildUpdateOne) ClearFeatures() *GuildUpdateOne

ClearFeatures clears the value of the "features" field.

func (*GuildUpdateOne) ClearGuildAdminConfig

func (guo *GuildUpdateOne) ClearGuildAdminConfig() *GuildUpdateOne

ClearGuildAdminConfig clears the "guild_admin_config" edge to the GuildAdminConfig entity.

func (*GuildUpdateOne) ClearGuildConfig

func (guo *GuildUpdateOne) ClearGuildConfig() *GuildUpdateOne

ClearGuildConfig clears the "guild_config" edge to the GuildConfig entity.

func (*GuildUpdateOne) ClearGuildEvents

func (guo *GuildUpdateOne) ClearGuildEvents() *GuildUpdateOne

ClearGuildEvents clears all "guild_events" edges to the GuildEvent entity.

func (*GuildUpdateOne) ClearIconHash

func (guo *GuildUpdateOne) ClearIconHash() *GuildUpdateOne

ClearIconHash clears the value of the "icon_hash" field.

func (*GuildUpdateOne) ClearJoinedAt

func (guo *GuildUpdateOne) ClearJoinedAt() *GuildUpdateOne

ClearJoinedAt clears the value of the "joined_at" field.

func (*GuildUpdateOne) ClearLarge

func (guo *GuildUpdateOne) ClearLarge() *GuildUpdateOne

ClearLarge clears the value of the "large" field.

func (*GuildUpdateOne) ClearMemberCount

func (guo *GuildUpdateOne) ClearMemberCount() *GuildUpdateOne

ClearMemberCount clears the value of the "member_count" field.

func (*GuildUpdateOne) ClearOwnerID

func (guo *GuildUpdateOne) ClearOwnerID() *GuildUpdateOne

ClearOwnerID clears the value of the "owner_id" field.

func (*GuildUpdateOne) ClearPermissions

func (guo *GuildUpdateOne) ClearPermissions() *GuildUpdateOne

ClearPermissions clears the value of the "permissions" field.

func (*GuildUpdateOne) ClearSystemChannelFlags

func (guo *GuildUpdateOne) ClearSystemChannelFlags() *GuildUpdateOne

ClearSystemChannelFlags clears the value of the "system_channel_flags" field.

func (*GuildUpdateOne) Exec

func (guo *GuildUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GuildUpdateOne) ExecX

func (guo *GuildUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GuildUpdateOne) Mutation

func (guo *GuildUpdateOne) Mutation() *GuildMutation

Mutation returns the GuildMutation object of the builder.

func (*GuildUpdateOne) RemoveAdminIDs

func (guo *GuildUpdateOne) RemoveAdminIDs(ids ...int) *GuildUpdateOne

RemoveAdminIDs removes the "admins" edge to User entities by IDs.

func (*GuildUpdateOne) RemoveAdmins

func (guo *GuildUpdateOne) RemoveAdmins(u ...*User) *GuildUpdateOne

RemoveAdmins removes "admins" edges to User entities.

func (*GuildUpdateOne) RemoveGuildEventIDs

func (guo *GuildUpdateOne) RemoveGuildEventIDs(ids ...int) *GuildUpdateOne

RemoveGuildEventIDs removes the "guild_events" edge to GuildEvent entities by IDs.

func (*GuildUpdateOne) RemoveGuildEvents

func (guo *GuildUpdateOne) RemoveGuildEvents(g ...*GuildEvent) *GuildUpdateOne

RemoveGuildEvents removes "guild_events" edges to GuildEvent entities.

func (*GuildUpdateOne) Save

func (guo *GuildUpdateOne) Save(ctx context.Context) (*Guild, error)

Save executes the query and returns the updated Guild entity.

func (*GuildUpdateOne) SaveX

func (guo *GuildUpdateOne) SaveX(ctx context.Context) *Guild

SaveX is like Save, but panics if an error occurs.

func (*GuildUpdateOne) Select

func (guo *GuildUpdateOne) Select(field string, fields ...string) *GuildUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GuildUpdateOne) SetFeatures

func (guo *GuildUpdateOne) SetFeatures(s []string) *GuildUpdateOne

SetFeatures sets the "features" field.

func (*GuildUpdateOne) SetGuildAdminConfig

func (guo *GuildUpdateOne) SetGuildAdminConfig(g *GuildAdminConfig) *GuildUpdateOne

SetGuildAdminConfig sets the "guild_admin_config" edge to the GuildAdminConfig entity.

func (*GuildUpdateOne) SetGuildAdminConfigID

func (guo *GuildUpdateOne) SetGuildAdminConfigID(id int) *GuildUpdateOne

SetGuildAdminConfigID sets the "guild_admin_config" edge to the GuildAdminConfig entity by ID.

func (*GuildUpdateOne) SetGuildConfig

func (guo *GuildUpdateOne) SetGuildConfig(g *GuildConfig) *GuildUpdateOne

SetGuildConfig sets the "guild_config" edge to the GuildConfig entity.

func (*GuildUpdateOne) SetGuildConfigID

func (guo *GuildUpdateOne) SetGuildConfigID(id int) *GuildUpdateOne

SetGuildConfigID sets the "guild_config" edge to the GuildConfig entity by ID.

func (*GuildUpdateOne) SetIconHash

func (guo *GuildUpdateOne) SetIconHash(s string) *GuildUpdateOne

SetIconHash sets the "icon_hash" field.

func (*GuildUpdateOne) SetIconURL

func (guo *GuildUpdateOne) SetIconURL(s string) *GuildUpdateOne

SetIconURL sets the "icon_url" field.

func (*GuildUpdateOne) SetJoinedAt

func (guo *GuildUpdateOne) SetJoinedAt(t time.Time) *GuildUpdateOne

SetJoinedAt sets the "joined_at" field.

func (*GuildUpdateOne) SetLarge

func (guo *GuildUpdateOne) SetLarge(b bool) *GuildUpdateOne

SetLarge sets the "large" field.

func (*GuildUpdateOne) SetMemberCount

func (guo *GuildUpdateOne) SetMemberCount(i int) *GuildUpdateOne

SetMemberCount sets the "member_count" field.

func (*GuildUpdateOne) SetName

func (guo *GuildUpdateOne) SetName(s string) *GuildUpdateOne

SetName sets the "name" field.

func (*GuildUpdateOne) SetNillableGuildAdminConfigID

func (guo *GuildUpdateOne) SetNillableGuildAdminConfigID(id *int) *GuildUpdateOne

SetNillableGuildAdminConfigID sets the "guild_admin_config" edge to the GuildAdminConfig entity by ID if the given value is not nil.

func (*GuildUpdateOne) SetNillableGuildConfigID

func (guo *GuildUpdateOne) SetNillableGuildConfigID(id *int) *GuildUpdateOne

SetNillableGuildConfigID sets the "guild_config" edge to the GuildConfig entity by ID if the given value is not nil.

func (*GuildUpdateOne) SetNillableIconHash

func (guo *GuildUpdateOne) SetNillableIconHash(s *string) *GuildUpdateOne

SetNillableIconHash sets the "icon_hash" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableJoinedAt

func (guo *GuildUpdateOne) SetNillableJoinedAt(t *time.Time) *GuildUpdateOne

SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableLarge

func (guo *GuildUpdateOne) SetNillableLarge(b *bool) *GuildUpdateOne

SetNillableLarge sets the "large" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableMemberCount

func (guo *GuildUpdateOne) SetNillableMemberCount(i *int) *GuildUpdateOne

SetNillableMemberCount sets the "member_count" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableOwnerID

func (guo *GuildUpdateOne) SetNillableOwnerID(s *string) *GuildUpdateOne

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*GuildUpdateOne) SetNillablePermissions

func (guo *GuildUpdateOne) SetNillablePermissions(u *uint64) *GuildUpdateOne

SetNillablePermissions sets the "permissions" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableSystemChannelFlags

func (guo *GuildUpdateOne) SetNillableSystemChannelFlags(s *string) *GuildUpdateOne

SetNillableSystemChannelFlags sets the "system_channel_flags" field if the given value is not nil.

func (*GuildUpdateOne) SetOwnerID

func (guo *GuildUpdateOne) SetOwnerID(s string) *GuildUpdateOne

SetOwnerID sets the "owner_id" field.

func (*GuildUpdateOne) SetPermissions

func (guo *GuildUpdateOne) SetPermissions(u uint64) *GuildUpdateOne

SetPermissions sets the "permissions" field.

func (*GuildUpdateOne) SetSystemChannelFlags

func (guo *GuildUpdateOne) SetSystemChannelFlags(s string) *GuildUpdateOne

SetSystemChannelFlags sets the "system_channel_flags" field.

func (*GuildUpdateOne) SetUpdateTime

func (guo *GuildUpdateOne) SetUpdateTime(t time.Time) *GuildUpdateOne

SetUpdateTime sets the "update_time" field.

func (*GuildUpdateOne) Where

func (guo *GuildUpdateOne) Where(ps ...predicate.Guild) *GuildUpdateOne

Where appends a list predicates to the GuildUpdate builder.

type GuildUpsert

type GuildUpsert struct {
	*sql.UpdateSet
}

GuildUpsert is the "OnConflict" setter.

func (*GuildUpsert) AddMemberCount

func (u *GuildUpsert) AddMemberCount(v int) *GuildUpsert

AddMemberCount adds v to the "member_count" field.

func (*GuildUpsert) AddPermissions

func (u *GuildUpsert) AddPermissions(v uint64) *GuildUpsert

AddPermissions adds v to the "permissions" field.

func (*GuildUpsert) ClearFeatures

func (u *GuildUpsert) ClearFeatures() *GuildUpsert

ClearFeatures clears the value of the "features" field.

func (*GuildUpsert) ClearIconHash

func (u *GuildUpsert) ClearIconHash() *GuildUpsert

ClearIconHash clears the value of the "icon_hash" field.

func (*GuildUpsert) ClearJoinedAt

func (u *GuildUpsert) ClearJoinedAt() *GuildUpsert

ClearJoinedAt clears the value of the "joined_at" field.

func (*GuildUpsert) ClearLarge

func (u *GuildUpsert) ClearLarge() *GuildUpsert

ClearLarge clears the value of the "large" field.

func (*GuildUpsert) ClearMemberCount

func (u *GuildUpsert) ClearMemberCount() *GuildUpsert

ClearMemberCount clears the value of the "member_count" field.

func (*GuildUpsert) ClearOwnerID

func (u *GuildUpsert) ClearOwnerID() *GuildUpsert

ClearOwnerID clears the value of the "owner_id" field.

func (*GuildUpsert) ClearPermissions

func (u *GuildUpsert) ClearPermissions() *GuildUpsert

ClearPermissions clears the value of the "permissions" field.

func (*GuildUpsert) ClearSystemChannelFlags

func (u *GuildUpsert) ClearSystemChannelFlags() *GuildUpsert

ClearSystemChannelFlags clears the value of the "system_channel_flags" field.

func (*GuildUpsert) SetFeatures

func (u *GuildUpsert) SetFeatures(v []string) *GuildUpsert

SetFeatures sets the "features" field.

func (*GuildUpsert) SetIconHash

func (u *GuildUpsert) SetIconHash(v string) *GuildUpsert

SetIconHash sets the "icon_hash" field.

func (*GuildUpsert) SetIconURL

func (u *GuildUpsert) SetIconURL(v string) *GuildUpsert

SetIconURL sets the "icon_url" field.

func (*GuildUpsert) SetJoinedAt

func (u *GuildUpsert) SetJoinedAt(v time.Time) *GuildUpsert

SetJoinedAt sets the "joined_at" field.

func (*GuildUpsert) SetLarge

func (u *GuildUpsert) SetLarge(v bool) *GuildUpsert

SetLarge sets the "large" field.

func (*GuildUpsert) SetMemberCount

func (u *GuildUpsert) SetMemberCount(v int) *GuildUpsert

SetMemberCount sets the "member_count" field.

func (*GuildUpsert) SetName

func (u *GuildUpsert) SetName(v string) *GuildUpsert

SetName sets the "name" field.

func (*GuildUpsert) SetOwnerID

func (u *GuildUpsert) SetOwnerID(v string) *GuildUpsert

SetOwnerID sets the "owner_id" field.

func (*GuildUpsert) SetPermissions

func (u *GuildUpsert) SetPermissions(v uint64) *GuildUpsert

SetPermissions sets the "permissions" field.

func (*GuildUpsert) SetSystemChannelFlags

func (u *GuildUpsert) SetSystemChannelFlags(v string) *GuildUpsert

SetSystemChannelFlags sets the "system_channel_flags" field.

func (*GuildUpsert) SetUpdateTime

func (u *GuildUpsert) SetUpdateTime(v time.Time) *GuildUpsert

SetUpdateTime sets the "update_time" field.

func (*GuildUpsert) UpdateFeatures

func (u *GuildUpsert) UpdateFeatures() *GuildUpsert

UpdateFeatures sets the "features" field to the value that was provided on create.

func (*GuildUpsert) UpdateIconHash

func (u *GuildUpsert) UpdateIconHash() *GuildUpsert

UpdateIconHash sets the "icon_hash" field to the value that was provided on create.

func (*GuildUpsert) UpdateIconURL

func (u *GuildUpsert) UpdateIconURL() *GuildUpsert

UpdateIconURL sets the "icon_url" field to the value that was provided on create.

func (*GuildUpsert) UpdateJoinedAt

func (u *GuildUpsert) UpdateJoinedAt() *GuildUpsert

UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.

func (*GuildUpsert) UpdateLarge

func (u *GuildUpsert) UpdateLarge() *GuildUpsert

UpdateLarge sets the "large" field to the value that was provided on create.

func (*GuildUpsert) UpdateMemberCount

func (u *GuildUpsert) UpdateMemberCount() *GuildUpsert

UpdateMemberCount sets the "member_count" field to the value that was provided on create.

func (*GuildUpsert) UpdateName

func (u *GuildUpsert) UpdateName() *GuildUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*GuildUpsert) UpdateOwnerID

func (u *GuildUpsert) UpdateOwnerID() *GuildUpsert

UpdateOwnerID sets the "owner_id" field to the value that was provided on create.

func (*GuildUpsert) UpdatePermissions

func (u *GuildUpsert) UpdatePermissions() *GuildUpsert

UpdatePermissions sets the "permissions" field to the value that was provided on create.

func (*GuildUpsert) UpdateSystemChannelFlags

func (u *GuildUpsert) UpdateSystemChannelFlags() *GuildUpsert

UpdateSystemChannelFlags sets the "system_channel_flags" field to the value that was provided on create.

func (*GuildUpsert) UpdateUpdateTime

func (u *GuildUpsert) UpdateUpdateTime() *GuildUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildUpsertBulk

type GuildUpsertBulk struct {
	// contains filtered or unexported fields
}

GuildUpsertBulk is the builder for "upsert"-ing a bulk of Guild nodes.

func (*GuildUpsertBulk) AddMemberCount

func (u *GuildUpsertBulk) AddMemberCount(v int) *GuildUpsertBulk

AddMemberCount adds v to the "member_count" field.

func (*GuildUpsertBulk) AddPermissions

func (u *GuildUpsertBulk) AddPermissions(v uint64) *GuildUpsertBulk

AddPermissions adds v to the "permissions" field.

func (*GuildUpsertBulk) ClearFeatures

func (u *GuildUpsertBulk) ClearFeatures() *GuildUpsertBulk

ClearFeatures clears the value of the "features" field.

func (*GuildUpsertBulk) ClearIconHash

func (u *GuildUpsertBulk) ClearIconHash() *GuildUpsertBulk

ClearIconHash clears the value of the "icon_hash" field.

func (*GuildUpsertBulk) ClearJoinedAt

func (u *GuildUpsertBulk) ClearJoinedAt() *GuildUpsertBulk

ClearJoinedAt clears the value of the "joined_at" field.

func (*GuildUpsertBulk) ClearLarge

func (u *GuildUpsertBulk) ClearLarge() *GuildUpsertBulk

ClearLarge clears the value of the "large" field.

func (*GuildUpsertBulk) ClearMemberCount

func (u *GuildUpsertBulk) ClearMemberCount() *GuildUpsertBulk

ClearMemberCount clears the value of the "member_count" field.

func (*GuildUpsertBulk) ClearOwnerID

func (u *GuildUpsertBulk) ClearOwnerID() *GuildUpsertBulk

ClearOwnerID clears the value of the "owner_id" field.

func (*GuildUpsertBulk) ClearPermissions

func (u *GuildUpsertBulk) ClearPermissions() *GuildUpsertBulk

ClearPermissions clears the value of the "permissions" field.

func (*GuildUpsertBulk) ClearSystemChannelFlags

func (u *GuildUpsertBulk) ClearSystemChannelFlags() *GuildUpsertBulk

ClearSystemChannelFlags clears the value of the "system_channel_flags" field.

func (*GuildUpsertBulk) DoNothing

func (u *GuildUpsertBulk) DoNothing() *GuildUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GuildUpsertBulk) Exec

func (u *GuildUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildUpsertBulk) ExecX

func (u *GuildUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GuildUpsertBulk) Ignore

func (u *GuildUpsertBulk) Ignore() *GuildUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Guild.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GuildUpsertBulk) SetFeatures

func (u *GuildUpsertBulk) SetFeatures(v []string) *GuildUpsertBulk

SetFeatures sets the "features" field.

func (*GuildUpsertBulk) SetIconHash

func (u *GuildUpsertBulk) SetIconHash(v string) *GuildUpsertBulk

SetIconHash sets the "icon_hash" field.

func (*GuildUpsertBulk) SetIconURL

func (u *GuildUpsertBulk) SetIconURL(v string) *GuildUpsertBulk

SetIconURL sets the "icon_url" field.

func (*GuildUpsertBulk) SetJoinedAt

func (u *GuildUpsertBulk) SetJoinedAt(v time.Time) *GuildUpsertBulk

SetJoinedAt sets the "joined_at" field.

func (*GuildUpsertBulk) SetLarge

func (u *GuildUpsertBulk) SetLarge(v bool) *GuildUpsertBulk

SetLarge sets the "large" field.

func (*GuildUpsertBulk) SetMemberCount

func (u *GuildUpsertBulk) SetMemberCount(v int) *GuildUpsertBulk

SetMemberCount sets the "member_count" field.

func (*GuildUpsertBulk) SetName

func (u *GuildUpsertBulk) SetName(v string) *GuildUpsertBulk

SetName sets the "name" field.

func (*GuildUpsertBulk) SetOwnerID

func (u *GuildUpsertBulk) SetOwnerID(v string) *GuildUpsertBulk

SetOwnerID sets the "owner_id" field.

func (*GuildUpsertBulk) SetPermissions

func (u *GuildUpsertBulk) SetPermissions(v uint64) *GuildUpsertBulk

SetPermissions sets the "permissions" field.

func (*GuildUpsertBulk) SetSystemChannelFlags

func (u *GuildUpsertBulk) SetSystemChannelFlags(v string) *GuildUpsertBulk

SetSystemChannelFlags sets the "system_channel_flags" field.

func (*GuildUpsertBulk) SetUpdateTime

func (u *GuildUpsertBulk) SetUpdateTime(v time.Time) *GuildUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*GuildUpsertBulk) Update

func (u *GuildUpsertBulk) Update(set func(*GuildUpsert)) *GuildUpsertBulk

Update allows overriding fields `UPDATE` values. See the GuildCreateBulk.OnConflict documentation for more info.

func (*GuildUpsertBulk) UpdateFeatures

func (u *GuildUpsertBulk) UpdateFeatures() *GuildUpsertBulk

UpdateFeatures sets the "features" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdateIconHash

func (u *GuildUpsertBulk) UpdateIconHash() *GuildUpsertBulk

UpdateIconHash sets the "icon_hash" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdateIconURL

func (u *GuildUpsertBulk) UpdateIconURL() *GuildUpsertBulk

UpdateIconURL sets the "icon_url" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdateJoinedAt

func (u *GuildUpsertBulk) UpdateJoinedAt() *GuildUpsertBulk

UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdateLarge

func (u *GuildUpsertBulk) UpdateLarge() *GuildUpsertBulk

UpdateLarge sets the "large" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdateMemberCount

func (u *GuildUpsertBulk) UpdateMemberCount() *GuildUpsertBulk

UpdateMemberCount sets the "member_count" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdateName

func (u *GuildUpsertBulk) UpdateName() *GuildUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdateNewValues

func (u *GuildUpsertBulk) UpdateNewValues() *GuildUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Guild.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*GuildUpsertBulk) UpdateOwnerID

func (u *GuildUpsertBulk) UpdateOwnerID() *GuildUpsertBulk

UpdateOwnerID sets the "owner_id" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdatePermissions

func (u *GuildUpsertBulk) UpdatePermissions() *GuildUpsertBulk

UpdatePermissions sets the "permissions" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdateSystemChannelFlags

func (u *GuildUpsertBulk) UpdateSystemChannelFlags() *GuildUpsertBulk

UpdateSystemChannelFlags sets the "system_channel_flags" field to the value that was provided on create.

func (*GuildUpsertBulk) UpdateUpdateTime

func (u *GuildUpsertBulk) UpdateUpdateTime() *GuildUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildUpsertOne

type GuildUpsertOne struct {
	// contains filtered or unexported fields
}

GuildUpsertOne is the builder for "upsert"-ing

one Guild node.

func (*GuildUpsertOne) AddMemberCount

func (u *GuildUpsertOne) AddMemberCount(v int) *GuildUpsertOne

AddMemberCount adds v to the "member_count" field.

func (*GuildUpsertOne) AddPermissions

func (u *GuildUpsertOne) AddPermissions(v uint64) *GuildUpsertOne

AddPermissions adds v to the "permissions" field.

func (*GuildUpsertOne) ClearFeatures

func (u *GuildUpsertOne) ClearFeatures() *GuildUpsertOne

ClearFeatures clears the value of the "features" field.

func (*GuildUpsertOne) ClearIconHash

func (u *GuildUpsertOne) ClearIconHash() *GuildUpsertOne

ClearIconHash clears the value of the "icon_hash" field.

func (*GuildUpsertOne) ClearJoinedAt

func (u *GuildUpsertOne) ClearJoinedAt() *GuildUpsertOne

ClearJoinedAt clears the value of the "joined_at" field.

func (*GuildUpsertOne) ClearLarge

func (u *GuildUpsertOne) ClearLarge() *GuildUpsertOne

ClearLarge clears the value of the "large" field.

func (*GuildUpsertOne) ClearMemberCount

func (u *GuildUpsertOne) ClearMemberCount() *GuildUpsertOne

ClearMemberCount clears the value of the "member_count" field.

func (*GuildUpsertOne) ClearOwnerID

func (u *GuildUpsertOne) ClearOwnerID() *GuildUpsertOne

ClearOwnerID clears the value of the "owner_id" field.

func (*GuildUpsertOne) ClearPermissions

func (u *GuildUpsertOne) ClearPermissions() *GuildUpsertOne

ClearPermissions clears the value of the "permissions" field.

func (*GuildUpsertOne) ClearSystemChannelFlags

func (u *GuildUpsertOne) ClearSystemChannelFlags() *GuildUpsertOne

ClearSystemChannelFlags clears the value of the "system_channel_flags" field.

func (*GuildUpsertOne) DoNothing

func (u *GuildUpsertOne) DoNothing() *GuildUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GuildUpsertOne) Exec

func (u *GuildUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*GuildUpsertOne) ExecX

func (u *GuildUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GuildUpsertOne) ID

func (u *GuildUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GuildUpsertOne) IDX

func (u *GuildUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*GuildUpsertOne) Ignore

func (u *GuildUpsertOne) Ignore() *GuildUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Guild.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GuildUpsertOne) SetFeatures

func (u *GuildUpsertOne) SetFeatures(v []string) *GuildUpsertOne

SetFeatures sets the "features" field.

func (*GuildUpsertOne) SetIconHash

func (u *GuildUpsertOne) SetIconHash(v string) *GuildUpsertOne

SetIconHash sets the "icon_hash" field.

func (*GuildUpsertOne) SetIconURL

func (u *GuildUpsertOne) SetIconURL(v string) *GuildUpsertOne

SetIconURL sets the "icon_url" field.

func (*GuildUpsertOne) SetJoinedAt

func (u *GuildUpsertOne) SetJoinedAt(v time.Time) *GuildUpsertOne

SetJoinedAt sets the "joined_at" field.

func (*GuildUpsertOne) SetLarge

func (u *GuildUpsertOne) SetLarge(v bool) *GuildUpsertOne

SetLarge sets the "large" field.

func (*GuildUpsertOne) SetMemberCount

func (u *GuildUpsertOne) SetMemberCount(v int) *GuildUpsertOne

SetMemberCount sets the "member_count" field.

func (*GuildUpsertOne) SetName

func (u *GuildUpsertOne) SetName(v string) *GuildUpsertOne

SetName sets the "name" field.

func (*GuildUpsertOne) SetOwnerID

func (u *GuildUpsertOne) SetOwnerID(v string) *GuildUpsertOne

SetOwnerID sets the "owner_id" field.

func (*GuildUpsertOne) SetPermissions

func (u *GuildUpsertOne) SetPermissions(v uint64) *GuildUpsertOne

SetPermissions sets the "permissions" field.

func (*GuildUpsertOne) SetSystemChannelFlags

func (u *GuildUpsertOne) SetSystemChannelFlags(v string) *GuildUpsertOne

SetSystemChannelFlags sets the "system_channel_flags" field.

func (*GuildUpsertOne) SetUpdateTime

func (u *GuildUpsertOne) SetUpdateTime(v time.Time) *GuildUpsertOne

SetUpdateTime sets the "update_time" field.

func (*GuildUpsertOne) Update

func (u *GuildUpsertOne) Update(set func(*GuildUpsert)) *GuildUpsertOne

Update allows overriding fields `UPDATE` values. See the GuildCreate.OnConflict documentation for more info.

func (*GuildUpsertOne) UpdateFeatures

func (u *GuildUpsertOne) UpdateFeatures() *GuildUpsertOne

UpdateFeatures sets the "features" field to the value that was provided on create.

func (*GuildUpsertOne) UpdateIconHash

func (u *GuildUpsertOne) UpdateIconHash() *GuildUpsertOne

UpdateIconHash sets the "icon_hash" field to the value that was provided on create.

func (*GuildUpsertOne) UpdateIconURL

func (u *GuildUpsertOne) UpdateIconURL() *GuildUpsertOne

UpdateIconURL sets the "icon_url" field to the value that was provided on create.

func (*GuildUpsertOne) UpdateJoinedAt

func (u *GuildUpsertOne) UpdateJoinedAt() *GuildUpsertOne

UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.

func (*GuildUpsertOne) UpdateLarge

func (u *GuildUpsertOne) UpdateLarge() *GuildUpsertOne

UpdateLarge sets the "large" field to the value that was provided on create.

func (*GuildUpsertOne) UpdateMemberCount

func (u *GuildUpsertOne) UpdateMemberCount() *GuildUpsertOne

UpdateMemberCount sets the "member_count" field to the value that was provided on create.

func (*GuildUpsertOne) UpdateName

func (u *GuildUpsertOne) UpdateName() *GuildUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*GuildUpsertOne) UpdateNewValues

func (u *GuildUpsertOne) UpdateNewValues() *GuildUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Guild.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*GuildUpsertOne) UpdateOwnerID

func (u *GuildUpsertOne) UpdateOwnerID() *GuildUpsertOne

UpdateOwnerID sets the "owner_id" field to the value that was provided on create.

func (*GuildUpsertOne) UpdatePermissions

func (u *GuildUpsertOne) UpdatePermissions() *GuildUpsertOne

UpdatePermissions sets the "permissions" field to the value that was provided on create.

func (*GuildUpsertOne) UpdateSystemChannelFlags

func (u *GuildUpsertOne) UpdateSystemChannelFlags() *GuildUpsertOne

UpdateSystemChannelFlags sets the "system_channel_flags" field to the value that was provided on create.

func (*GuildUpsertOne) UpdateUpdateTime

func (u *GuildUpsertOne) UpdateUpdateTime() *GuildUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type GuildWhereInput

type GuildWhereInput struct {
	Predicates []predicate.Guild  `json:"-"`
	Not        *GuildWhereInput   `json:"not,omitempty"`
	Or         []*GuildWhereInput `json:"or,omitempty"`
	And        []*GuildWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "create_time" field predicates.
	CreateTime      *time.Time  `json:"createTime,omitempty"`
	CreateTimeNEQ   *time.Time  `json:"createTimeNEQ,omitempty"`
	CreateTimeIn    []time.Time `json:"createTimeIn,omitempty"`
	CreateTimeNotIn []time.Time `json:"createTimeNotIn,omitempty"`
	CreateTimeGT    *time.Time  `json:"createTimeGT,omitempty"`
	CreateTimeGTE   *time.Time  `json:"createTimeGTE,omitempty"`
	CreateTimeLT    *time.Time  `json:"createTimeLT,omitempty"`
	CreateTimeLTE   *time.Time  `json:"createTimeLTE,omitempty"`

	// "update_time" field predicates.
	UpdateTime      *time.Time  `json:"updateTime,omitempty"`
	UpdateTimeNEQ   *time.Time  `json:"updateTimeNEQ,omitempty"`
	UpdateTimeIn    []time.Time `json:"updateTimeIn,omitempty"`
	UpdateTimeNotIn []time.Time `json:"updateTimeNotIn,omitempty"`
	UpdateTimeGT    *time.Time  `json:"updateTimeGT,omitempty"`
	UpdateTimeGTE   *time.Time  `json:"updateTimeGTE,omitempty"`
	UpdateTimeLT    *time.Time  `json:"updateTimeLT,omitempty"`
	UpdateTimeLTE   *time.Time  `json:"updateTimeLTE,omitempty"`

	// "guild_id" field predicates.
	GuildID             *string  `json:"guildID,omitempty"`
	GuildIDNEQ          *string  `json:"guildIDNEQ,omitempty"`
	GuildIDIn           []string `json:"guildIDIn,omitempty"`
	GuildIDNotIn        []string `json:"guildIDNotIn,omitempty"`
	GuildIDGT           *string  `json:"guildIDGT,omitempty"`
	GuildIDGTE          *string  `json:"guildIDGTE,omitempty"`
	GuildIDLT           *string  `json:"guildIDLT,omitempty"`
	GuildIDLTE          *string  `json:"guildIDLTE,omitempty"`
	GuildIDContains     *string  `json:"guildIDContains,omitempty"`
	GuildIDHasPrefix    *string  `json:"guildIDHasPrefix,omitempty"`
	GuildIDHasSuffix    *string  `json:"guildIDHasSuffix,omitempty"`
	GuildIDEqualFold    *string  `json:"guildIDEqualFold,omitempty"`
	GuildIDContainsFold *string  `json:"guildIDContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "icon_hash" field predicates.
	IconHash             *string  `json:"iconHash,omitempty"`
	IconHashNEQ          *string  `json:"iconHashNEQ,omitempty"`
	IconHashIn           []string `json:"iconHashIn,omitempty"`
	IconHashNotIn        []string `json:"iconHashNotIn,omitempty"`
	IconHashGT           *string  `json:"iconHashGT,omitempty"`
	IconHashGTE          *string  `json:"iconHashGTE,omitempty"`
	IconHashLT           *string  `json:"iconHashLT,omitempty"`
	IconHashLTE          *string  `json:"iconHashLTE,omitempty"`
	IconHashContains     *string  `json:"iconHashContains,omitempty"`
	IconHashHasPrefix    *string  `json:"iconHashHasPrefix,omitempty"`
	IconHashHasSuffix    *string  `json:"iconHashHasSuffix,omitempty"`
	IconHashIsNil        bool     `json:"iconHashIsNil,omitempty"`
	IconHashNotNil       bool     `json:"iconHashNotNil,omitempty"`
	IconHashEqualFold    *string  `json:"iconHashEqualFold,omitempty"`
	IconHashContainsFold *string  `json:"iconHashContainsFold,omitempty"`

	// "icon_url" field predicates.
	IconURL             *string  `json:"iconURL,omitempty"`
	IconURLNEQ          *string  `json:"iconURLNEQ,omitempty"`
	IconURLIn           []string `json:"iconURLIn,omitempty"`
	IconURLNotIn        []string `json:"iconURLNotIn,omitempty"`
	IconURLGT           *string  `json:"iconURLGT,omitempty"`
	IconURLGTE          *string  `json:"iconURLGTE,omitempty"`
	IconURLLT           *string  `json:"iconURLLT,omitempty"`
	IconURLLTE          *string  `json:"iconURLLTE,omitempty"`
	IconURLContains     *string  `json:"iconURLContains,omitempty"`
	IconURLHasPrefix    *string  `json:"iconURLHasPrefix,omitempty"`
	IconURLHasSuffix    *string  `json:"iconURLHasSuffix,omitempty"`
	IconURLEqualFold    *string  `json:"iconURLEqualFold,omitempty"`
	IconURLContainsFold *string  `json:"iconURLContainsFold,omitempty"`

	// "joined_at" field predicates.
	JoinedAt       *time.Time  `json:"joinedAt,omitempty"`
	JoinedAtNEQ    *time.Time  `json:"joinedAtNEQ,omitempty"`
	JoinedAtIn     []time.Time `json:"joinedAtIn,omitempty"`
	JoinedAtNotIn  []time.Time `json:"joinedAtNotIn,omitempty"`
	JoinedAtGT     *time.Time  `json:"joinedAtGT,omitempty"`
	JoinedAtGTE    *time.Time  `json:"joinedAtGTE,omitempty"`
	JoinedAtLT     *time.Time  `json:"joinedAtLT,omitempty"`
	JoinedAtLTE    *time.Time  `json:"joinedAtLTE,omitempty"`
	JoinedAtIsNil  bool        `json:"joinedAtIsNil,omitempty"`
	JoinedAtNotNil bool        `json:"joinedAtNotNil,omitempty"`

	// "large" field predicates.
	Large       *bool `json:"large,omitempty"`
	LargeNEQ    *bool `json:"largeNEQ,omitempty"`
	LargeIsNil  bool  `json:"largeIsNil,omitempty"`
	LargeNotNil bool  `json:"largeNotNil,omitempty"`

	// "member_count" field predicates.
	MemberCount       *int  `json:"memberCount,omitempty"`
	MemberCountNEQ    *int  `json:"memberCountNEQ,omitempty"`
	MemberCountIn     []int `json:"memberCountIn,omitempty"`
	MemberCountNotIn  []int `json:"memberCountNotIn,omitempty"`
	MemberCountGT     *int  `json:"memberCountGT,omitempty"`
	MemberCountGTE    *int  `json:"memberCountGTE,omitempty"`
	MemberCountLT     *int  `json:"memberCountLT,omitempty"`
	MemberCountLTE    *int  `json:"memberCountLTE,omitempty"`
	MemberCountIsNil  bool  `json:"memberCountIsNil,omitempty"`
	MemberCountNotNil bool  `json:"memberCountNotNil,omitempty"`

	// "owner_id" field predicates.
	OwnerID             *string  `json:"ownerID,omitempty"`
	OwnerIDNEQ          *string  `json:"ownerIDNEQ,omitempty"`
	OwnerIDIn           []string `json:"ownerIDIn,omitempty"`
	OwnerIDNotIn        []string `json:"ownerIDNotIn,omitempty"`
	OwnerIDGT           *string  `json:"ownerIDGT,omitempty"`
	OwnerIDGTE          *string  `json:"ownerIDGTE,omitempty"`
	OwnerIDLT           *string  `json:"ownerIDLT,omitempty"`
	OwnerIDLTE          *string  `json:"ownerIDLTE,omitempty"`
	OwnerIDContains     *string  `json:"ownerIDContains,omitempty"`
	OwnerIDHasPrefix    *string  `json:"ownerIDHasPrefix,omitempty"`
	OwnerIDHasSuffix    *string  `json:"ownerIDHasSuffix,omitempty"`
	OwnerIDIsNil        bool     `json:"ownerIDIsNil,omitempty"`
	OwnerIDNotNil       bool     `json:"ownerIDNotNil,omitempty"`
	OwnerIDEqualFold    *string  `json:"ownerIDEqualFold,omitempty"`
	OwnerIDContainsFold *string  `json:"ownerIDContainsFold,omitempty"`

	// "permissions" field predicates.
	Permissions       *uint64  `json:"permissions,omitempty"`
	PermissionsNEQ    *uint64  `json:"permissionsNEQ,omitempty"`
	PermissionsIn     []uint64 `json:"permissionsIn,omitempty"`
	PermissionsNotIn  []uint64 `json:"permissionsNotIn,omitempty"`
	PermissionsGT     *uint64  `json:"permissionsGT,omitempty"`
	PermissionsGTE    *uint64  `json:"permissionsGTE,omitempty"`
	PermissionsLT     *uint64  `json:"permissionsLT,omitempty"`
	PermissionsLTE    *uint64  `json:"permissionsLTE,omitempty"`
	PermissionsIsNil  bool     `json:"permissionsIsNil,omitempty"`
	PermissionsNotNil bool     `json:"permissionsNotNil,omitempty"`

	// "system_channel_flags" field predicates.
	SystemChannelFlags             *string  `json:"systemChannelFlags,omitempty"`
	SystemChannelFlagsNEQ          *string  `json:"systemChannelFlagsNEQ,omitempty"`
	SystemChannelFlagsIn           []string `json:"systemChannelFlagsIn,omitempty"`
	SystemChannelFlagsNotIn        []string `json:"systemChannelFlagsNotIn,omitempty"`
	SystemChannelFlagsGT           *string  `json:"systemChannelFlagsGT,omitempty"`
	SystemChannelFlagsGTE          *string  `json:"systemChannelFlagsGTE,omitempty"`
	SystemChannelFlagsLT           *string  `json:"systemChannelFlagsLT,omitempty"`
	SystemChannelFlagsLTE          *string  `json:"systemChannelFlagsLTE,omitempty"`
	SystemChannelFlagsContains     *string  `json:"systemChannelFlagsContains,omitempty"`
	SystemChannelFlagsHasPrefix    *string  `json:"systemChannelFlagsHasPrefix,omitempty"`
	SystemChannelFlagsHasSuffix    *string  `json:"systemChannelFlagsHasSuffix,omitempty"`
	SystemChannelFlagsIsNil        bool     `json:"systemChannelFlagsIsNil,omitempty"`
	SystemChannelFlagsNotNil       bool     `json:"systemChannelFlagsNotNil,omitempty"`
	SystemChannelFlagsEqualFold    *string  `json:"systemChannelFlagsEqualFold,omitempty"`
	SystemChannelFlagsContainsFold *string  `json:"systemChannelFlagsContainsFold,omitempty"`

	// "guild_config" edge predicates.
	HasGuildConfig     *bool                    `json:"hasGuildConfig,omitempty"`
	HasGuildConfigWith []*GuildConfigWhereInput `json:"hasGuildConfigWith,omitempty"`

	// "guild_admin_config" edge predicates.
	HasGuildAdminConfig     *bool                         `json:"hasGuildAdminConfig,omitempty"`
	HasGuildAdminConfigWith []*GuildAdminConfigWhereInput `json:"hasGuildAdminConfigWith,omitempty"`

	// "guild_events" edge predicates.
	HasGuildEvents     *bool                   `json:"hasGuildEvents,omitempty"`
	HasGuildEventsWith []*GuildEventWhereInput `json:"hasGuildEventsWith,omitempty"`

	// "admins" edge predicates.
	HasAdmins     *bool             `json:"hasAdmins,omitempty"`
	HasAdminsWith []*UserWhereInput `json:"hasAdminsWith,omitempty"`
}

GuildWhereInput represents a where input for filtering Guild queries.

func (*GuildWhereInput) AddPredicates

func (i *GuildWhereInput) AddPredicates(predicates ...predicate.Guild)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*GuildWhereInput) Filter

func (i *GuildWhereInput) Filter(q *GuildQuery) (*GuildQuery, error)

Filter applies the GuildWhereInput filter on the GuildQuery builder.

func (*GuildWhereInput) P

P returns a predicate for filtering guilds. An error is returned if the input is empty or invalid.

type Guilds

type Guilds []*Guild

Guilds is a parsable slice of Guild.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, int) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type PageInfo

type PageInfo = entgql.PageInfo[int]

Common entgql types.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// Guild is the client for interacting with the Guild builders.
	Guild *GuildClient
	// GuildAdminConfig is the client for interacting with the GuildAdminConfig builders.
	GuildAdminConfig *GuildAdminConfigClient
	// GuildConfig is the client for interacting with the GuildConfig builders.
	GuildConfig *GuildConfigClient
	// GuildEvent is the client for interacting with the GuildEvent builders.
	GuildEvent *GuildEventClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type UpdateGuildAdminConfigInput

type UpdateGuildAdminConfigInput struct {
	UpdateTime              *time.Time
	ClearEnabled            bool
	Enabled                 *bool
	ClearDefaultMaxChannels bool
	DefaultMaxChannels      *int
	ClearDefaultMaxClones   bool
	DefaultMaxClones        *int
	ClearComment            bool
	Comment                 *string
}

UpdateGuildAdminConfigInput represents a mutation input for updating guildadminconfigs.

func (*UpdateGuildAdminConfigInput) Mutate

Mutate applies the UpdateGuildAdminConfigInput on the GuildAdminConfigMutation builder.

type UpdateGuildConfigInput

type UpdateGuildConfigInput struct {
	UpdateTime            *time.Time
	ClearEnabled          bool
	Enabled               *bool
	ClearDefaultMaxClones bool
	DefaultMaxClones      *int
	ClearRegexMatch       bool
	RegexMatch            *string
	ClearContactEmail     bool
	ContactEmail          *string
}

UpdateGuildConfigInput represents a mutation input for updating guildconfigs.

func (*UpdateGuildConfigInput) Mutate

Mutate applies the UpdateGuildConfigInput on the GuildConfigMutation builder.

type User

type User struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID string `json:"user_id,omitempty"`
	// Whether or not the user is a spectrograph admin.
	Admin bool `json:"admin,omitempty"`
	// Whether or not the user is banned from using the service.
	Banned bool `json:"banned,omitempty"`
	// Reason for the user being banned (if any).
	BanReason string `json:"ban_reason,omitempty"`
	// The users username, not unique across the platform.
	Username string `json:"username,omitempty"`
	// The users 4-digit discord-tag.
	Discriminator string `json:"discriminator,omitempty"`
	// The users email address.
	Email string `json:"email,omitempty"`
	// The users avatar hash.
	AvatarHash string `json:"avatar_hash,omitempty"`
	// The users avatar URL (generated if no avatar present).
	AvatarURL string `json:"avatar_url,omitempty"`
	// The users chosen language option.
	Locale string `json:"locale,omitempty"`
	// Whether the user belongs to an OAuth2 application.
	Bot bool `json:"bot,omitempty"`
	// Whether the user is an Official Discord System user (part of the urgent message system).
	System bool `json:"system,omitempty"`
	// Whether the user has two factor enabled on their account.
	MfaEnabled bool `json:"mfa_enabled,omitempty"`
	// Whether the email on this account has been verified.
	Verified bool `json:"verified,omitempty"`
	// The flags on a users account.
	Flags uint64 `json:"flags,omitempty"`
	// The type of Nitro subscription on a users account.
	PremiumType int `json:"premium_type,omitempty"`
	// The public flags on a users account.
	PublicFlags uint64 `json:"public_flags,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) BannedBy

func (u *User) BannedBy(ctx context.Context) (*User, error)

func (*User) BannedUsers

func (u *User) BannedUsers(ctx context.Context) (result []*User, err error)

func (*User) IsNode

func (n *User) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*User) NamedBannedUsers

func (u *User) NamedBannedUsers(name string) ([]*User, error)

NamedBannedUsers returns the BannedUsers named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) NamedUserGuilds

func (u *User) NamedUserGuilds(name string) ([]*Guild, error)

NamedUserGuilds returns the UserGuilds named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) QueryBannedBy

func (u *User) QueryBannedBy() *UserQuery

QueryBannedBy queries the "banned_by" edge of the User entity.

func (*User) QueryBannedUsers

func (u *User) QueryBannedUsers() *UserQuery

QueryBannedUsers queries the "banned_users" edge of the User entity.

func (*User) QueryUserGuilds

func (u *User) QueryUserGuilds() *GuildQuery

QueryUserGuilds queries the "user_guilds" edge of the User entity.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) ToEdge

func (u *User) ToEdge(order *UserOrder) *UserEdge

ToEdge converts User into UserEdge.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

func (*User) UserGuilds

func (u *User) UserGuilds(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *GuildOrder, where *GuildWhereInput,
) (*GuildConnection, error)

func (*User) Value

func (u *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryBannedBy

func (c *UserClient) QueryBannedBy(u *User) *UserQuery

QueryBannedBy queries the banned_by edge of a User.

func (*UserClient) QueryBannedUsers

func (c *UserClient) QueryBannedUsers(u *User) *UserQuery

QueryBannedUsers queries the banned_users edge of a User.

func (*UserClient) QueryUserGuilds

func (c *UserClient) QueryUserGuilds(u *User) *GuildQuery

QueryUserGuilds queries the user_guilds edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id int) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserConnection

type UserConnection struct {
	Edges      []*UserEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

UserConnection is the connection containing edges to User.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddBannedUserIDs

func (uc *UserCreate) AddBannedUserIDs(ids ...int) *UserCreate

AddBannedUserIDs adds the "banned_users" edge to the User entity by IDs.

func (*UserCreate) AddBannedUsers

func (uc *UserCreate) AddBannedUsers(u ...*User) *UserCreate

AddBannedUsers adds the "banned_users" edges to the User entity.

func (*UserCreate) AddUserGuildIDs

func (uc *UserCreate) AddUserGuildIDs(ids ...int) *UserCreate

AddUserGuildIDs adds the "user_guilds" edge to the Guild entity by IDs.

func (*UserCreate) AddUserGuilds

func (uc *UserCreate) AddUserGuilds(g ...*Guild) *UserCreate

AddUserGuilds adds the "user_guilds" edges to the Guild entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict

func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns

func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetAdmin

func (uc *UserCreate) SetAdmin(b bool) *UserCreate

SetAdmin sets the "admin" field.

func (*UserCreate) SetAvatarHash

func (uc *UserCreate) SetAvatarHash(s string) *UserCreate

SetAvatarHash sets the "avatar_hash" field.

func (*UserCreate) SetAvatarURL

func (uc *UserCreate) SetAvatarURL(s string) *UserCreate

SetAvatarURL sets the "avatar_url" field.

func (*UserCreate) SetBanReason

func (uc *UserCreate) SetBanReason(s string) *UserCreate

SetBanReason sets the "ban_reason" field.

func (*UserCreate) SetBanned

func (uc *UserCreate) SetBanned(b bool) *UserCreate

SetBanned sets the "banned" field.

func (*UserCreate) SetBannedBy

func (uc *UserCreate) SetBannedBy(u *User) *UserCreate

SetBannedBy sets the "banned_by" edge to the User entity.

func (*UserCreate) SetBannedByID

func (uc *UserCreate) SetBannedByID(id int) *UserCreate

SetBannedByID sets the "banned_by" edge to the User entity by ID.

func (*UserCreate) SetBot

func (uc *UserCreate) SetBot(b bool) *UserCreate

SetBot sets the "bot" field.

func (*UserCreate) SetCreateTime

func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate

SetCreateTime sets the "create_time" field.

func (*UserCreate) SetDiscriminator

func (uc *UserCreate) SetDiscriminator(s string) *UserCreate

SetDiscriminator sets the "discriminator" field.

func (*UserCreate) SetEmail

func (uc *UserCreate) SetEmail(s string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetFlags

func (uc *UserCreate) SetFlags(u uint64) *UserCreate

SetFlags sets the "flags" field.

func (*UserCreate) SetLocale

func (uc *UserCreate) SetLocale(s string) *UserCreate

SetLocale sets the "locale" field.

func (*UserCreate) SetMfaEnabled

func (uc *UserCreate) SetMfaEnabled(b bool) *UserCreate

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserCreate) SetNillableAdmin

func (uc *UserCreate) SetNillableAdmin(b *bool) *UserCreate

SetNillableAdmin sets the "admin" field if the given value is not nil.

func (*UserCreate) SetNillableAvatarHash

func (uc *UserCreate) SetNillableAvatarHash(s *string) *UserCreate

SetNillableAvatarHash sets the "avatar_hash" field if the given value is not nil.

func (*UserCreate) SetNillableBanReason

func (uc *UserCreate) SetNillableBanReason(s *string) *UserCreate

SetNillableBanReason sets the "ban_reason" field if the given value is not nil.

func (*UserCreate) SetNillableBanned

func (uc *UserCreate) SetNillableBanned(b *bool) *UserCreate

SetNillableBanned sets the "banned" field if the given value is not nil.

func (*UserCreate) SetNillableBannedByID

func (uc *UserCreate) SetNillableBannedByID(id *int) *UserCreate

SetNillableBannedByID sets the "banned_by" edge to the User entity by ID if the given value is not nil.

func (*UserCreate) SetNillableBot

func (uc *UserCreate) SetNillableBot(b *bool) *UserCreate

SetNillableBot sets the "bot" field if the given value is not nil.

func (*UserCreate) SetNillableCreateTime

func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*UserCreate) SetNillableFlags

func (uc *UserCreate) SetNillableFlags(u *uint64) *UserCreate

SetNillableFlags sets the "flags" field if the given value is not nil.

func (*UserCreate) SetNillableLocale

func (uc *UserCreate) SetNillableLocale(s *string) *UserCreate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*UserCreate) SetNillableMfaEnabled

func (uc *UserCreate) SetNillableMfaEnabled(b *bool) *UserCreate

SetNillableMfaEnabled sets the "mfa_enabled" field if the given value is not nil.

func (*UserCreate) SetNillablePremiumType

func (uc *UserCreate) SetNillablePremiumType(i *int) *UserCreate

SetNillablePremiumType sets the "premium_type" field if the given value is not nil.

func (*UserCreate) SetNillablePublicFlags

func (uc *UserCreate) SetNillablePublicFlags(u *uint64) *UserCreate

SetNillablePublicFlags sets the "public_flags" field if the given value is not nil.

func (*UserCreate) SetNillableSystem

func (uc *UserCreate) SetNillableSystem(b *bool) *UserCreate

SetNillableSystem sets the "system" field if the given value is not nil.

func (*UserCreate) SetNillableUpdateTime

func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*UserCreate) SetNillableVerified

func (uc *UserCreate) SetNillableVerified(b *bool) *UserCreate

SetNillableVerified sets the "verified" field if the given value is not nil.

func (*UserCreate) SetPremiumType

func (uc *UserCreate) SetPremiumType(i int) *UserCreate

SetPremiumType sets the "premium_type" field.

func (*UserCreate) SetPublicFlags

func (uc *UserCreate) SetPublicFlags(u uint64) *UserCreate

SetPublicFlags sets the "public_flags" field.

func (*UserCreate) SetSystem

func (uc *UserCreate) SetSystem(b bool) *UserCreate

SetSystem sets the "system" field.

func (*UserCreate) SetUpdateTime

func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate

SetUpdateTime sets the "update_time" field.

func (*UserCreate) SetUserID

func (uc *UserCreate) SetUserID(s string) *UserCreate

SetUserID sets the "user_id" field.

func (*UserCreate) SetUsername

func (uc *UserCreate) SetUsername(s string) *UserCreate

SetUsername sets the "username" field.

func (*UserCreate) SetVerified

func (uc *UserCreate) SetVerified(b bool) *UserCreate

SetVerified sets the "verified" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict

func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns

func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserEdge

type UserEdge struct {
	Node   *User  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

UserEdge is the edge representation of User.

type UserEdges

type UserEdges struct {
	// Guilds that the user is either owner or admin of (and thus can add the connection to the bot).
	UserGuilds []*Guild `json:"user_guilds,omitempty"`
	// Users that were banned by this user.
	BannedUsers []*User `json:"banned_users,omitempty"`
	// User that banned this user.
	BannedBy *User `json:"banned_by,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) BannedByOrErr

func (e UserEdges) BannedByOrErr() (*User, error)

BannedByOrErr returns the BannedBy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UserEdges) BannedUsersOrErr

func (e UserEdges) BannedUsersOrErr() ([]*User, error)

BannedUsersOrErr returns the BannedUsers value or an error if the edge was not loaded in eager-loading.

func (UserEdges) UserGuildsOrErr

func (e UserEdges) UserGuildsOrErr() ([]*Guild, error)

UserGuildsOrErr returns the UserGuilds value or an error if the edge was not loaded in eager-loading.

type UserFilter

type UserFilter struct {
	// contains filtered or unexported fields
}

UserFilter provides a generic filtering capability at runtime for UserQuery.

func (*UserFilter) Where

func (f *UserFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*UserFilter) WhereAdmin

func (f *UserFilter) WhereAdmin(p entql.BoolP)

WhereAdmin applies the entql bool predicate on the admin field.

func (*UserFilter) WhereAvatarHash

func (f *UserFilter) WhereAvatarHash(p entql.StringP)

WhereAvatarHash applies the entql string predicate on the avatar_hash field.

func (*UserFilter) WhereAvatarURL

func (f *UserFilter) WhereAvatarURL(p entql.StringP)

WhereAvatarURL applies the entql string predicate on the avatar_url field.

func (*UserFilter) WhereBanReason

func (f *UserFilter) WhereBanReason(p entql.StringP)

WhereBanReason applies the entql string predicate on the ban_reason field.

func (*UserFilter) WhereBanned

func (f *UserFilter) WhereBanned(p entql.BoolP)

WhereBanned applies the entql bool predicate on the banned field.

func (*UserFilter) WhereBot

func (f *UserFilter) WhereBot(p entql.BoolP)

WhereBot applies the entql bool predicate on the bot field.

func (*UserFilter) WhereCreateTime

func (f *UserFilter) WhereCreateTime(p entql.TimeP)

WhereCreateTime applies the entql time.Time predicate on the create_time field.

func (*UserFilter) WhereDiscriminator

func (f *UserFilter) WhereDiscriminator(p entql.StringP)

WhereDiscriminator applies the entql string predicate on the discriminator field.

func (*UserFilter) WhereEmail

func (f *UserFilter) WhereEmail(p entql.StringP)

WhereEmail applies the entql string predicate on the email field.

func (*UserFilter) WhereFlags

func (f *UserFilter) WhereFlags(p entql.Uint64P)

WhereFlags applies the entql uint64 predicate on the flags field.

func (*UserFilter) WhereHasBannedBy

func (f *UserFilter) WhereHasBannedBy()

WhereHasBannedBy applies a predicate to check if query has an edge banned_by.

func (*UserFilter) WhereHasBannedByWith

func (f *UserFilter) WhereHasBannedByWith(preds ...predicate.User)

WhereHasBannedByWith applies a predicate to check if query has an edge banned_by with a given conditions (other predicates).

func (*UserFilter) WhereHasBannedUsers

func (f *UserFilter) WhereHasBannedUsers()

WhereHasBannedUsers applies a predicate to check if query has an edge banned_users.

func (*UserFilter) WhereHasBannedUsersWith

func (f *UserFilter) WhereHasBannedUsersWith(preds ...predicate.User)

WhereHasBannedUsersWith applies a predicate to check if query has an edge banned_users with a given conditions (other predicates).

func (*UserFilter) WhereHasUserGuilds

func (f *UserFilter) WhereHasUserGuilds()

WhereHasUserGuilds applies a predicate to check if query has an edge user_guilds.

func (*UserFilter) WhereHasUserGuildsWith

func (f *UserFilter) WhereHasUserGuildsWith(preds ...predicate.Guild)

WhereHasUserGuildsWith applies a predicate to check if query has an edge user_guilds with a given conditions (other predicates).

func (*UserFilter) WhereID

func (f *UserFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*UserFilter) WhereLocale

func (f *UserFilter) WhereLocale(p entql.StringP)

WhereLocale applies the entql string predicate on the locale field.

func (*UserFilter) WhereMfaEnabled

func (f *UserFilter) WhereMfaEnabled(p entql.BoolP)

WhereMfaEnabled applies the entql bool predicate on the mfa_enabled field.

func (*UserFilter) WherePremiumType

func (f *UserFilter) WherePremiumType(p entql.IntP)

WherePremiumType applies the entql int predicate on the premium_type field.

func (*UserFilter) WherePublicFlags

func (f *UserFilter) WherePublicFlags(p entql.Uint64P)

WherePublicFlags applies the entql uint64 predicate on the public_flags field.

func (*UserFilter) WhereSystem

func (f *UserFilter) WhereSystem(p entql.BoolP)

WhereSystem applies the entql bool predicate on the system field.

func (*UserFilter) WhereUpdateTime

func (f *UserFilter) WhereUpdateTime(p entql.TimeP)

WhereUpdateTime applies the entql time.Time predicate on the update_time field.

func (*UserFilter) WhereUserID

func (f *UserFilter) WhereUserID(p entql.StringP)

WhereUserID applies the entql string predicate on the user_id field.

func (*UserFilter) WhereUsername

func (f *UserFilter) WhereUsername(p entql.StringP)

WhereUsername applies the entql string predicate on the username field.

func (*UserFilter) WhereVerified

func (f *UserFilter) WhereVerified(p entql.BoolP)

WhereVerified applies the entql bool predicate on the verified field.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddBannedUserIDs

func (m *UserMutation) AddBannedUserIDs(ids ...int)

AddBannedUserIDs adds the "banned_users" edge to the User entity by ids.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddFlags

func (m *UserMutation) AddFlags(u int64)

AddFlags adds u to the "flags" field.

func (*UserMutation) AddPremiumType

func (m *UserMutation) AddPremiumType(i int)

AddPremiumType adds i to the "premium_type" field.

func (*UserMutation) AddPublicFlags

func (m *UserMutation) AddPublicFlags(u int64)

AddPublicFlags adds u to the "public_flags" field.

func (*UserMutation) AddUserGuildIDs

func (m *UserMutation) AddUserGuildIDs(ids ...int)

AddUserGuildIDs adds the "user_guilds" edge to the Guild entity by ids.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedFlags

func (m *UserMutation) AddedFlags() (r int64, exists bool)

AddedFlags returns the value that was added to the "flags" field in this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) AddedPremiumType

func (m *UserMutation) AddedPremiumType() (r int, exists bool)

AddedPremiumType returns the value that was added to the "premium_type" field in this mutation.

func (*UserMutation) AddedPublicFlags

func (m *UserMutation) AddedPublicFlags() (r int64, exists bool)

AddedPublicFlags returns the value that was added to the "public_flags" field in this mutation.

func (*UserMutation) Admin

func (m *UserMutation) Admin() (r bool, exists bool)

Admin returns the value of the "admin" field in the mutation.

func (*UserMutation) AdminCleared

func (m *UserMutation) AdminCleared() bool

AdminCleared returns if the "admin" field was cleared in this mutation.

func (*UserMutation) AvatarHash

func (m *UserMutation) AvatarHash() (r string, exists bool)

AvatarHash returns the value of the "avatar_hash" field in the mutation.

func (*UserMutation) AvatarHashCleared

func (m *UserMutation) AvatarHashCleared() bool

AvatarHashCleared returns if the "avatar_hash" field was cleared in this mutation.

func (*UserMutation) AvatarURL

func (m *UserMutation) AvatarURL() (r string, exists bool)

AvatarURL returns the value of the "avatar_url" field in the mutation.

func (*UserMutation) BanReason

func (m *UserMutation) BanReason() (r string, exists bool)

BanReason returns the value of the "ban_reason" field in the mutation.

func (*UserMutation) BanReasonCleared

func (m *UserMutation) BanReasonCleared() bool

BanReasonCleared returns if the "ban_reason" field was cleared in this mutation.

func (*UserMutation) Banned

func (m *UserMutation) Banned() (r bool, exists bool)

Banned returns the value of the "banned" field in the mutation.

func (*UserMutation) BannedByCleared

func (m *UserMutation) BannedByCleared() bool

BannedByCleared reports if the "banned_by" edge to the User entity was cleared.

func (*UserMutation) BannedByID

func (m *UserMutation) BannedByID() (id int, exists bool)

BannedByID returns the "banned_by" edge ID in the mutation.

func (*UserMutation) BannedByIDs

func (m *UserMutation) BannedByIDs() (ids []int)

BannedByIDs returns the "banned_by" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BannedByID instead. It exists only for internal usage by the builders.

func (*UserMutation) BannedCleared

func (m *UserMutation) BannedCleared() bool

BannedCleared returns if the "banned" field was cleared in this mutation.

func (*UserMutation) BannedUsersCleared

func (m *UserMutation) BannedUsersCleared() bool

BannedUsersCleared reports if the "banned_users" edge to the User entity was cleared.

func (*UserMutation) BannedUsersIDs

func (m *UserMutation) BannedUsersIDs() (ids []int)

BannedUsersIDs returns the "banned_users" edge IDs in the mutation.

func (*UserMutation) Bot

func (m *UserMutation) Bot() (r bool, exists bool)

Bot returns the value of the "bot" field in the mutation.

func (*UserMutation) BotCleared

func (m *UserMutation) BotCleared() bool

BotCleared returns if the "bot" field was cleared in this mutation.

func (*UserMutation) ClearAdmin

func (m *UserMutation) ClearAdmin()

ClearAdmin clears the value of the "admin" field.

func (*UserMutation) ClearAvatarHash

func (m *UserMutation) ClearAvatarHash()

ClearAvatarHash clears the value of the "avatar_hash" field.

func (*UserMutation) ClearBanReason

func (m *UserMutation) ClearBanReason()

ClearBanReason clears the value of the "ban_reason" field.

func (*UserMutation) ClearBanned

func (m *UserMutation) ClearBanned()

ClearBanned clears the value of the "banned" field.

func (*UserMutation) ClearBannedBy

func (m *UserMutation) ClearBannedBy()

ClearBannedBy clears the "banned_by" edge to the User entity.

func (*UserMutation) ClearBannedUsers

func (m *UserMutation) ClearBannedUsers()

ClearBannedUsers clears the "banned_users" edge to the User entity.

func (*UserMutation) ClearBot

func (m *UserMutation) ClearBot()

ClearBot clears the value of the "bot" field.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearFlags

func (m *UserMutation) ClearFlags()

ClearFlags clears the value of the "flags" field.

func (*UserMutation) ClearLocale

func (m *UserMutation) ClearLocale()

ClearLocale clears the value of the "locale" field.

func (*UserMutation) ClearMfaEnabled

func (m *UserMutation) ClearMfaEnabled()

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserMutation) ClearPremiumType

func (m *UserMutation) ClearPremiumType()

ClearPremiumType clears the value of the "premium_type" field.

func (*UserMutation) ClearPublicFlags

func (m *UserMutation) ClearPublicFlags()

ClearPublicFlags clears the value of the "public_flags" field.

func (*UserMutation) ClearSystem

func (m *UserMutation) ClearSystem()

ClearSystem clears the value of the "system" field.

func (*UserMutation) ClearUserGuilds

func (m *UserMutation) ClearUserGuilds()

ClearUserGuilds clears the "user_guilds" edge to the Guild entity.

func (*UserMutation) ClearVerified

func (m *UserMutation) ClearVerified()

ClearVerified clears the value of the "verified" field.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreateTime

func (m *UserMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*UserMutation) Discriminator

func (m *UserMutation) Discriminator() (r string, exists bool)

Discriminator returns the value of the "discriminator" field in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Email

func (m *UserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) Filter

func (m *UserMutation) Filter() *UserFilter

Filter returns an entql.Where implementation to apply filters on the UserMutation builder.

func (*UserMutation) Flags

func (m *UserMutation) Flags() (r uint64, exists bool)

Flags returns the value of the "flags" field in the mutation.

func (*UserMutation) FlagsCleared

func (m *UserMutation) FlagsCleared() bool

FlagsCleared returns if the "flags" field was cleared in this mutation.

func (*UserMutation) ID

func (m *UserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserMutation) Locale

func (m *UserMutation) Locale() (r string, exists bool)

Locale returns the value of the "locale" field in the mutation.

func (*UserMutation) LocaleCleared

func (m *UserMutation) LocaleCleared() bool

LocaleCleared returns if the "locale" field was cleared in this mutation.

func (*UserMutation) MfaEnabled

func (m *UserMutation) MfaEnabled() (r bool, exists bool)

MfaEnabled returns the value of the "mfa_enabled" field in the mutation.

func (*UserMutation) MfaEnabledCleared

func (m *UserMutation) MfaEnabledCleared() bool

MfaEnabledCleared returns if the "mfa_enabled" field was cleared in this mutation.

func (*UserMutation) OldAdmin

func (m *UserMutation) OldAdmin(ctx context.Context) (v bool, err error)

OldAdmin returns the old "admin" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldAvatarHash

func (m *UserMutation) OldAvatarHash(ctx context.Context) (v string, err error)

OldAvatarHash returns the old "avatar_hash" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldAvatarURL

func (m *UserMutation) OldAvatarURL(ctx context.Context) (v string, err error)

OldAvatarURL returns the old "avatar_url" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldBanReason

func (m *UserMutation) OldBanReason(ctx context.Context) (v string, err error)

OldBanReason returns the old "ban_reason" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldBanned

func (m *UserMutation) OldBanned(ctx context.Context) (v bool, err error)

OldBanned returns the old "banned" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldBot

func (m *UserMutation) OldBot(ctx context.Context) (v bool, err error)

OldBot returns the old "bot" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldCreateTime

func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldDiscriminator

func (m *UserMutation) OldDiscriminator(ctx context.Context) (v string, err error)

OldDiscriminator returns the old "discriminator" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldEmail

func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserMutation) OldFlags

func (m *UserMutation) OldFlags(ctx context.Context) (v uint64, err error)

OldFlags returns the old "flags" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldLocale

func (m *UserMutation) OldLocale(ctx context.Context) (v string, err error)

OldLocale returns the old "locale" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldMfaEnabled

func (m *UserMutation) OldMfaEnabled(ctx context.Context) (v bool, err error)

OldMfaEnabled returns the old "mfa_enabled" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldPremiumType

func (m *UserMutation) OldPremiumType(ctx context.Context) (v int, err error)

OldPremiumType returns the old "premium_type" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldPublicFlags

func (m *UserMutation) OldPublicFlags(ctx context.Context) (v uint64, err error)

OldPublicFlags returns the old "public_flags" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldSystem

func (m *UserMutation) OldSystem(ctx context.Context) (v bool, err error)

OldSystem returns the old "system" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUpdateTime

func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUserID

func (m *UserMutation) OldUserID(ctx context.Context) (v string, err error)

OldUserID returns the old "user_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUsername

func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldVerified

func (m *UserMutation) OldVerified(ctx context.Context) (v bool, err error)

OldVerified returns the old "verified" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) PremiumType

func (m *UserMutation) PremiumType() (r int, exists bool)

PremiumType returns the value of the "premium_type" field in the mutation.

func (*UserMutation) PremiumTypeCleared

func (m *UserMutation) PremiumTypeCleared() bool

PremiumTypeCleared returns if the "premium_type" field was cleared in this mutation.

func (*UserMutation) PublicFlags

func (m *UserMutation) PublicFlags() (r uint64, exists bool)

PublicFlags returns the value of the "public_flags" field in the mutation.

func (*UserMutation) PublicFlagsCleared

func (m *UserMutation) PublicFlagsCleared() bool

PublicFlagsCleared returns if the "public_flags" field was cleared in this mutation.

func (*UserMutation) RemoveBannedUserIDs

func (m *UserMutation) RemoveBannedUserIDs(ids ...int)

RemoveBannedUserIDs removes the "banned_users" edge to the User entity by IDs.

func (*UserMutation) RemoveUserGuildIDs

func (m *UserMutation) RemoveUserGuildIDs(ids ...int)

RemoveUserGuildIDs removes the "user_guilds" edge to the Guild entity by IDs.

func (*UserMutation) RemovedBannedUsersIDs

func (m *UserMutation) RemovedBannedUsersIDs() (ids []int)

RemovedBannedUsers returns the removed IDs of the "banned_users" edge to the User entity.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) RemovedUserGuildsIDs

func (m *UserMutation) RemovedUserGuildsIDs() (ids []int)

RemovedUserGuilds returns the removed IDs of the "user_guilds" edge to the Guild entity.

func (*UserMutation) ResetAdmin

func (m *UserMutation) ResetAdmin()

ResetAdmin resets all changes to the "admin" field.

func (*UserMutation) ResetAvatarHash

func (m *UserMutation) ResetAvatarHash()

ResetAvatarHash resets all changes to the "avatar_hash" field.

func (*UserMutation) ResetAvatarURL

func (m *UserMutation) ResetAvatarURL()

ResetAvatarURL resets all changes to the "avatar_url" field.

func (*UserMutation) ResetBanReason

func (m *UserMutation) ResetBanReason()

ResetBanReason resets all changes to the "ban_reason" field.

func (*UserMutation) ResetBanned

func (m *UserMutation) ResetBanned()

ResetBanned resets all changes to the "banned" field.

func (*UserMutation) ResetBannedBy

func (m *UserMutation) ResetBannedBy()

ResetBannedBy resets all changes to the "banned_by" edge.

func (*UserMutation) ResetBannedUsers

func (m *UserMutation) ResetBannedUsers()

ResetBannedUsers resets all changes to the "banned_users" edge.

func (*UserMutation) ResetBot

func (m *UserMutation) ResetBot()

ResetBot resets all changes to the "bot" field.

func (*UserMutation) ResetCreateTime

func (m *UserMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*UserMutation) ResetDiscriminator

func (m *UserMutation) ResetDiscriminator()

ResetDiscriminator resets all changes to the "discriminator" field.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetEmail

func (m *UserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetFlags

func (m *UserMutation) ResetFlags()

ResetFlags resets all changes to the "flags" field.

func (*UserMutation) ResetLocale

func (m *UserMutation) ResetLocale()

ResetLocale resets all changes to the "locale" field.

func (*UserMutation) ResetMfaEnabled

func (m *UserMutation) ResetMfaEnabled()

ResetMfaEnabled resets all changes to the "mfa_enabled" field.

func (*UserMutation) ResetPremiumType

func (m *UserMutation) ResetPremiumType()

ResetPremiumType resets all changes to the "premium_type" field.

func (*UserMutation) ResetPublicFlags

func (m *UserMutation) ResetPublicFlags()

ResetPublicFlags resets all changes to the "public_flags" field.

func (*UserMutation) ResetSystem

func (m *UserMutation) ResetSystem()

ResetSystem resets all changes to the "system" field.

func (*UserMutation) ResetUpdateTime

func (m *UserMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*UserMutation) ResetUserGuilds

func (m *UserMutation) ResetUserGuilds()

ResetUserGuilds resets all changes to the "user_guilds" edge.

func (*UserMutation) ResetUserID

func (m *UserMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*UserMutation) ResetUsername

func (m *UserMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*UserMutation) ResetVerified

func (m *UserMutation) ResetVerified()

ResetVerified resets all changes to the "verified" field.

func (*UserMutation) SetAdmin

func (m *UserMutation) SetAdmin(b bool)

SetAdmin sets the "admin" field.

func (*UserMutation) SetAvatarHash

func (m *UserMutation) SetAvatarHash(s string)

SetAvatarHash sets the "avatar_hash" field.

func (*UserMutation) SetAvatarURL

func (m *UserMutation) SetAvatarURL(s string)

SetAvatarURL sets the "avatar_url" field.

func (*UserMutation) SetBanReason

func (m *UserMutation) SetBanReason(s string)

SetBanReason sets the "ban_reason" field.

func (*UserMutation) SetBanned

func (m *UserMutation) SetBanned(b bool)

SetBanned sets the "banned" field.

func (*UserMutation) SetBannedByID

func (m *UserMutation) SetBannedByID(id int)

SetBannedByID sets the "banned_by" edge to the User entity by id.

func (*UserMutation) SetBot

func (m *UserMutation) SetBot(b bool)

SetBot sets the "bot" field.

func (*UserMutation) SetCreateTime

func (m *UserMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*UserMutation) SetDiscriminator

func (m *UserMutation) SetDiscriminator(s string)

SetDiscriminator sets the "discriminator" field.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetFlags

func (m *UserMutation) SetFlags(u uint64)

SetFlags sets the "flags" field.

func (*UserMutation) SetLocale

func (m *UserMutation) SetLocale(s string)

SetLocale sets the "locale" field.

func (*UserMutation) SetMfaEnabled

func (m *UserMutation) SetMfaEnabled(b bool)

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetPremiumType

func (m *UserMutation) SetPremiumType(i int)

SetPremiumType sets the "premium_type" field.

func (*UserMutation) SetPublicFlags

func (m *UserMutation) SetPublicFlags(u uint64)

SetPublicFlags sets the "public_flags" field.

func (*UserMutation) SetSystem

func (m *UserMutation) SetSystem(b bool)

SetSystem sets the "system" field.

func (*UserMutation) SetUpdateTime

func (m *UserMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*UserMutation) SetUserID

func (m *UserMutation) SetUserID(s string)

SetUserID sets the "user_id" field.

func (*UserMutation) SetUsername

func (m *UserMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (*UserMutation) SetVerified

func (m *UserMutation) SetVerified(b bool)

SetVerified sets the "verified" field.

func (*UserMutation) System

func (m *UserMutation) System() (r bool, exists bool)

System returns the value of the "system" field in the mutation.

func (*UserMutation) SystemCleared

func (m *UserMutation) SystemCleared() bool

SystemCleared returns if the "system" field was cleared in this mutation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UpdateTime

func (m *UserMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*UserMutation) UserGuildsCleared

func (m *UserMutation) UserGuildsCleared() bool

UserGuildsCleared reports if the "user_guilds" edge to the Guild entity was cleared.

func (*UserMutation) UserGuildsIDs

func (m *UserMutation) UserGuildsIDs() (ids []int)

UserGuildsIDs returns the "user_guilds" edge IDs in the mutation.

func (*UserMutation) UserID

func (m *UserMutation) UserID() (r string, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*UserMutation) Username

func (m *UserMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*UserMutation) Verified

func (m *UserMutation) Verified() (r bool, exists bool)

Verified returns the value of the "verified" field in the mutation.

func (*UserMutation) VerifiedCleared

func (m *UserMutation) VerifiedCleared() bool

VerifiedCleared returns if the "verified" field was cleared in this mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserOrder

type UserOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *UserOrderField `json:"field"`
}

UserOrder defines the ordering of User.

type UserOrderField

type UserOrderField struct {
	// Value extracts the ordering value from the given User.
	Value func(*User) (ent.Value, error)
	// contains filtered or unexported fields
}

UserOrderField defines the ordering field of User.

func (UserOrderField) MarshalGQL

func (f UserOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (UserOrderField) String

func (f UserOrderField) String() string

String implement fmt.Stringer interface.

func (*UserOrderField) UnmarshalGQL

func (f *UserOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type UserPaginateOption

type UserPaginateOption func(*userPager) error

UserPaginateOption enables pagination customization.

func WithUserFilter

func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption

WithUserFilter configures pagination filter.

func WithUserOrder

func WithUserOrder(order *UserOrder) UserPaginateOption

WithUserOrder configures pagination ordering.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) CollectFields

func (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) Filter

func (uq *UserQuery) Filter() *UserFilter

Filter returns a Filter implementation to apply filters on the UserQuery builder.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) Paginate

func (u *UserQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserPaginateOption,
) (*UserConnection, error)

Paginate executes the query and returns a relay based cursor connection to User.

func (*UserQuery) QueryBannedBy

func (uq *UserQuery) QueryBannedBy() *UserQuery

QueryBannedBy chains the current query on the "banned_by" edge.

func (*UserQuery) QueryBannedUsers

func (uq *UserQuery) QueryBannedUsers() *UserQuery

QueryBannedUsers chains the current query on the "banned_users" edge.

func (*UserQuery) QueryUserGuilds

func (uq *UserQuery) QueryUserGuilds() *GuildQuery

QueryUserGuilds chains the current query on the "user_guilds" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.User.Query().
	Select(user.FieldCreateTime).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithBannedBy

func (uq *UserQuery) WithBannedBy(opts ...func(*UserQuery)) *UserQuery

WithBannedBy tells the query-builder to eager-load the nodes that are connected to the "banned_by" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithBannedUsers

func (uq *UserQuery) WithBannedUsers(opts ...func(*UserQuery)) *UserQuery

WithBannedUsers tells the query-builder to eager-load the nodes that are connected to the "banned_users" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedBannedUsers

func (uq *UserQuery) WithNamedBannedUsers(name string, opts ...func(*UserQuery)) *UserQuery

WithNamedBannedUsers tells the query-builder to eager-load the nodes that are connected to the "banned_users" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedUserGuilds

func (uq *UserQuery) WithNamedUserGuilds(name string, opts ...func(*GuildQuery)) *UserQuery

WithNamedUserGuilds tells the query-builder to eager-load the nodes that are connected to the "user_guilds" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithUserGuilds

func (uq *UserQuery) WithUserGuilds(opts ...func(*GuildQuery)) *UserQuery

WithUserGuilds tells the query-builder to eager-load the nodes that are connected to the "user_guilds" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddBannedUserIDs

func (uu *UserUpdate) AddBannedUserIDs(ids ...int) *UserUpdate

AddBannedUserIDs adds the "banned_users" edge to the User entity by IDs.

func (*UserUpdate) AddBannedUsers

func (uu *UserUpdate) AddBannedUsers(u ...*User) *UserUpdate

AddBannedUsers adds the "banned_users" edges to the User entity.

func (*UserUpdate) AddFlags

func (uu *UserUpdate) AddFlags(u int64) *UserUpdate

AddFlags adds u to the "flags" field.

func (*UserUpdate) AddPremiumType

func (uu *UserUpdate) AddPremiumType(i int) *UserUpdate

AddPremiumType adds i to the "premium_type" field.

func (*UserUpdate) AddPublicFlags

func (uu *UserUpdate) AddPublicFlags(u int64) *UserUpdate

AddPublicFlags adds u to the "public_flags" field.

func (*UserUpdate) AddUserGuildIDs

func (uu *UserUpdate) AddUserGuildIDs(ids ...int) *UserUpdate

AddUserGuildIDs adds the "user_guilds" edge to the Guild entity by IDs.

func (*UserUpdate) AddUserGuilds

func (uu *UserUpdate) AddUserGuilds(g ...*Guild) *UserUpdate

AddUserGuilds adds the "user_guilds" edges to the Guild entity.

func (*UserUpdate) ClearAdmin

func (uu *UserUpdate) ClearAdmin() *UserUpdate

ClearAdmin clears the value of the "admin" field.

func (*UserUpdate) ClearAvatarHash

func (uu *UserUpdate) ClearAvatarHash() *UserUpdate

ClearAvatarHash clears the value of the "avatar_hash" field.

func (*UserUpdate) ClearBanReason

func (uu *UserUpdate) ClearBanReason() *UserUpdate

ClearBanReason clears the value of the "ban_reason" field.

func (*UserUpdate) ClearBanned

func (uu *UserUpdate) ClearBanned() *UserUpdate

ClearBanned clears the value of the "banned" field.

func (*UserUpdate) ClearBannedBy

func (uu *UserUpdate) ClearBannedBy() *UserUpdate

ClearBannedBy clears the "banned_by" edge to the User entity.

func (*UserUpdate) ClearBannedUsers

func (uu *UserUpdate) ClearBannedUsers() *UserUpdate

ClearBannedUsers clears all "banned_users" edges to the User entity.

func (*UserUpdate) ClearBot

func (uu *UserUpdate) ClearBot() *UserUpdate

ClearBot clears the value of the "bot" field.

func (*UserUpdate) ClearFlags

func (uu *UserUpdate) ClearFlags() *UserUpdate

ClearFlags clears the value of the "flags" field.

func (*UserUpdate) ClearLocale

func (uu *UserUpdate) ClearLocale() *UserUpdate

ClearLocale clears the value of the "locale" field.

func (*UserUpdate) ClearMfaEnabled

func (uu *UserUpdate) ClearMfaEnabled() *UserUpdate

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserUpdate) ClearPremiumType

func (uu *UserUpdate) ClearPremiumType() *UserUpdate

ClearPremiumType clears the value of the "premium_type" field.

func (*UserUpdate) ClearPublicFlags

func (uu *UserUpdate) ClearPublicFlags() *UserUpdate

ClearPublicFlags clears the value of the "public_flags" field.

func (*UserUpdate) ClearSystem

func (uu *UserUpdate) ClearSystem() *UserUpdate

ClearSystem clears the value of the "system" field.

func (*UserUpdate) ClearUserGuilds

func (uu *UserUpdate) ClearUserGuilds() *UserUpdate

ClearUserGuilds clears all "user_guilds" edges to the Guild entity.

func (*UserUpdate) ClearVerified

func (uu *UserUpdate) ClearVerified() *UserUpdate

ClearVerified clears the value of the "verified" field.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveBannedUserIDs

func (uu *UserUpdate) RemoveBannedUserIDs(ids ...int) *UserUpdate

RemoveBannedUserIDs removes the "banned_users" edge to User entities by IDs.

func (*UserUpdate) RemoveBannedUsers

func (uu *UserUpdate) RemoveBannedUsers(u ...*User) *UserUpdate

RemoveBannedUsers removes "banned_users" edges to User entities.

func (*UserUpdate) RemoveUserGuildIDs

func (uu *UserUpdate) RemoveUserGuildIDs(ids ...int) *UserUpdate

RemoveUserGuildIDs removes the "user_guilds" edge to Guild entities by IDs.

func (*UserUpdate) RemoveUserGuilds

func (uu *UserUpdate) RemoveUserGuilds(g ...*Guild) *UserUpdate

RemoveUserGuilds removes "user_guilds" edges to Guild entities.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetAdmin

func (uu *UserUpdate) SetAdmin(b bool) *UserUpdate

SetAdmin sets the "admin" field.

func (*UserUpdate) SetAvatarHash

func (uu *UserUpdate) SetAvatarHash(s string) *UserUpdate

SetAvatarHash sets the "avatar_hash" field.

func (*UserUpdate) SetAvatarURL

func (uu *UserUpdate) SetAvatarURL(s string) *UserUpdate

SetAvatarURL sets the "avatar_url" field.

func (*UserUpdate) SetBanReason

func (uu *UserUpdate) SetBanReason(s string) *UserUpdate

SetBanReason sets the "ban_reason" field.

func (*UserUpdate) SetBanned

func (uu *UserUpdate) SetBanned(b bool) *UserUpdate

SetBanned sets the "banned" field.

func (*UserUpdate) SetBannedBy

func (uu *UserUpdate) SetBannedBy(u *User) *UserUpdate

SetBannedBy sets the "banned_by" edge to the User entity.

func (*UserUpdate) SetBannedByID

func (uu *UserUpdate) SetBannedByID(id int) *UserUpdate

SetBannedByID sets the "banned_by" edge to the User entity by ID.

func (*UserUpdate) SetBot

func (uu *UserUpdate) SetBot(b bool) *UserUpdate

SetBot sets the "bot" field.

func (*UserUpdate) SetDiscriminator

func (uu *UserUpdate) SetDiscriminator(s string) *UserUpdate

SetDiscriminator sets the "discriminator" field.

func (*UserUpdate) SetEmail

func (uu *UserUpdate) SetEmail(s string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetFlags

func (uu *UserUpdate) SetFlags(u uint64) *UserUpdate

SetFlags sets the "flags" field.

func (*UserUpdate) SetLocale

func (uu *UserUpdate) SetLocale(s string) *UserUpdate

SetLocale sets the "locale" field.

func (*UserUpdate) SetMfaEnabled

func (uu *UserUpdate) SetMfaEnabled(b bool) *UserUpdate

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserUpdate) SetNillableAdmin

func (uu *UserUpdate) SetNillableAdmin(b *bool) *UserUpdate

SetNillableAdmin sets the "admin" field if the given value is not nil.

func (*UserUpdate) SetNillableAvatarHash

func (uu *UserUpdate) SetNillableAvatarHash(s *string) *UserUpdate

SetNillableAvatarHash sets the "avatar_hash" field if the given value is not nil.

func (*UserUpdate) SetNillableBanReason

func (uu *UserUpdate) SetNillableBanReason(s *string) *UserUpdate

SetNillableBanReason sets the "ban_reason" field if the given value is not nil.

func (*UserUpdate) SetNillableBanned

func (uu *UserUpdate) SetNillableBanned(b *bool) *UserUpdate

SetNillableBanned sets the "banned" field if the given value is not nil.

func (*UserUpdate) SetNillableBannedByID

func (uu *UserUpdate) SetNillableBannedByID(id *int) *UserUpdate

SetNillableBannedByID sets the "banned_by" edge to the User entity by ID if the given value is not nil.

func (*UserUpdate) SetNillableBot

func (uu *UserUpdate) SetNillableBot(b *bool) *UserUpdate

SetNillableBot sets the "bot" field if the given value is not nil.

func (*UserUpdate) SetNillableFlags

func (uu *UserUpdate) SetNillableFlags(u *uint64) *UserUpdate

SetNillableFlags sets the "flags" field if the given value is not nil.

func (*UserUpdate) SetNillableLocale

func (uu *UserUpdate) SetNillableLocale(s *string) *UserUpdate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*UserUpdate) SetNillableMfaEnabled

func (uu *UserUpdate) SetNillableMfaEnabled(b *bool) *UserUpdate

SetNillableMfaEnabled sets the "mfa_enabled" field if the given value is not nil.

func (*UserUpdate) SetNillablePremiumType

func (uu *UserUpdate) SetNillablePremiumType(i *int) *UserUpdate

SetNillablePremiumType sets the "premium_type" field if the given value is not nil.

func (*UserUpdate) SetNillablePublicFlags

func (uu *UserUpdate) SetNillablePublicFlags(u *uint64) *UserUpdate

SetNillablePublicFlags sets the "public_flags" field if the given value is not nil.

func (*UserUpdate) SetNillableSystem

func (uu *UserUpdate) SetNillableSystem(b *bool) *UserUpdate

SetNillableSystem sets the "system" field if the given value is not nil.

func (*UserUpdate) SetNillableVerified

func (uu *UserUpdate) SetNillableVerified(b *bool) *UserUpdate

SetNillableVerified sets the "verified" field if the given value is not nil.

func (*UserUpdate) SetPremiumType

func (uu *UserUpdate) SetPremiumType(i int) *UserUpdate

SetPremiumType sets the "premium_type" field.

func (*UserUpdate) SetPublicFlags

func (uu *UserUpdate) SetPublicFlags(u uint64) *UserUpdate

SetPublicFlags sets the "public_flags" field.

func (*UserUpdate) SetSystem

func (uu *UserUpdate) SetSystem(b bool) *UserUpdate

SetSystem sets the "system" field.

func (*UserUpdate) SetUpdateTime

func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate

SetUpdateTime sets the "update_time" field.

func (*UserUpdate) SetUsername

func (uu *UserUpdate) SetUsername(s string) *UserUpdate

SetUsername sets the "username" field.

func (*UserUpdate) SetVerified

func (uu *UserUpdate) SetVerified(b bool) *UserUpdate

SetVerified sets the "verified" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddBannedUserIDs

func (uuo *UserUpdateOne) AddBannedUserIDs(ids ...int) *UserUpdateOne

AddBannedUserIDs adds the "banned_users" edge to the User entity by IDs.

func (*UserUpdateOne) AddBannedUsers

func (uuo *UserUpdateOne) AddBannedUsers(u ...*User) *UserUpdateOne

AddBannedUsers adds the "banned_users" edges to the User entity.

func (*UserUpdateOne) AddFlags

func (uuo *UserUpdateOne) AddFlags(u int64) *UserUpdateOne

AddFlags adds u to the "flags" field.

func (*UserUpdateOne) AddPremiumType

func (uuo *UserUpdateOne) AddPremiumType(i int) *UserUpdateOne

AddPremiumType adds i to the "premium_type" field.

func (*UserUpdateOne) AddPublicFlags

func (uuo *UserUpdateOne) AddPublicFlags(u int64) *UserUpdateOne

AddPublicFlags adds u to the "public_flags" field.

func (*UserUpdateOne) AddUserGuildIDs

func (uuo *UserUpdateOne) AddUserGuildIDs(ids ...int) *UserUpdateOne

AddUserGuildIDs adds the "user_guilds" edge to the Guild entity by IDs.

func (*UserUpdateOne) AddUserGuilds

func (uuo *UserUpdateOne) AddUserGuilds(g ...*Guild) *UserUpdateOne

AddUserGuilds adds the "user_guilds" edges to the Guild entity.

func (*UserUpdateOne) ClearAdmin

func (uuo *UserUpdateOne) ClearAdmin() *UserUpdateOne

ClearAdmin clears the value of the "admin" field.

func (*UserUpdateOne) ClearAvatarHash

func (uuo *UserUpdateOne) ClearAvatarHash() *UserUpdateOne

ClearAvatarHash clears the value of the "avatar_hash" field.

func (*UserUpdateOne) ClearBanReason

func (uuo *UserUpdateOne) ClearBanReason() *UserUpdateOne

ClearBanReason clears the value of the "ban_reason" field.

func (*UserUpdateOne) ClearBanned

func (uuo *UserUpdateOne) ClearBanned() *UserUpdateOne

ClearBanned clears the value of the "banned" field.

func (*UserUpdateOne) ClearBannedBy

func (uuo *UserUpdateOne) ClearBannedBy() *UserUpdateOne

ClearBannedBy clears the "banned_by" edge to the User entity.

func (*UserUpdateOne) ClearBannedUsers

func (uuo *UserUpdateOne) ClearBannedUsers() *UserUpdateOne

ClearBannedUsers clears all "banned_users" edges to the User entity.

func (*UserUpdateOne) ClearBot

func (uuo *UserUpdateOne) ClearBot() *UserUpdateOne

ClearBot clears the value of the "bot" field.

func (*UserUpdateOne) ClearFlags

func (uuo *UserUpdateOne) ClearFlags() *UserUpdateOne

ClearFlags clears the value of the "flags" field.

func (*UserUpdateOne) ClearLocale

func (uuo *UserUpdateOne) ClearLocale() *UserUpdateOne

ClearLocale clears the value of the "locale" field.

func (*UserUpdateOne) ClearMfaEnabled

func (uuo *UserUpdateOne) ClearMfaEnabled() *UserUpdateOne

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserUpdateOne) ClearPremiumType

func (uuo *UserUpdateOne) ClearPremiumType() *UserUpdateOne

ClearPremiumType clears the value of the "premium_type" field.

func (*UserUpdateOne) ClearPublicFlags

func (uuo *UserUpdateOne) ClearPublicFlags() *UserUpdateOne

ClearPublicFlags clears the value of the "public_flags" field.

func (*UserUpdateOne) ClearSystem

func (uuo *UserUpdateOne) ClearSystem() *UserUpdateOne

ClearSystem clears the value of the "system" field.

func (*UserUpdateOne) ClearUserGuilds

func (uuo *UserUpdateOne) ClearUserGuilds() *UserUpdateOne

ClearUserGuilds clears all "user_guilds" edges to the Guild entity.

func (*UserUpdateOne) ClearVerified

func (uuo *UserUpdateOne) ClearVerified() *UserUpdateOne

ClearVerified clears the value of the "verified" field.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveBannedUserIDs

func (uuo *UserUpdateOne) RemoveBannedUserIDs(ids ...int) *UserUpdateOne

RemoveBannedUserIDs removes the "banned_users" edge to User entities by IDs.

func (*UserUpdateOne) RemoveBannedUsers

func (uuo *UserUpdateOne) RemoveBannedUsers(u ...*User) *UserUpdateOne

RemoveBannedUsers removes "banned_users" edges to User entities.

func (*UserUpdateOne) RemoveUserGuildIDs

func (uuo *UserUpdateOne) RemoveUserGuildIDs(ids ...int) *UserUpdateOne

RemoveUserGuildIDs removes the "user_guilds" edge to Guild entities by IDs.

func (*UserUpdateOne) RemoveUserGuilds

func (uuo *UserUpdateOne) RemoveUserGuilds(g ...*Guild) *UserUpdateOne

RemoveUserGuilds removes "user_guilds" edges to Guild entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetAdmin

func (uuo *UserUpdateOne) SetAdmin(b bool) *UserUpdateOne

SetAdmin sets the "admin" field.

func (*UserUpdateOne) SetAvatarHash

func (uuo *UserUpdateOne) SetAvatarHash(s string) *UserUpdateOne

SetAvatarHash sets the "avatar_hash" field.

func (*UserUpdateOne) SetAvatarURL

func (uuo *UserUpdateOne) SetAvatarURL(s string) *UserUpdateOne

SetAvatarURL sets the "avatar_url" field.

func (*UserUpdateOne) SetBanReason

func (uuo *UserUpdateOne) SetBanReason(s string) *UserUpdateOne

SetBanReason sets the "ban_reason" field.

func (*UserUpdateOne) SetBanned

func (uuo *UserUpdateOne) SetBanned(b bool) *UserUpdateOne

SetBanned sets the "banned" field.

func (*UserUpdateOne) SetBannedBy

func (uuo *UserUpdateOne) SetBannedBy(u *User) *UserUpdateOne

SetBannedBy sets the "banned_by" edge to the User entity.

func (*UserUpdateOne) SetBannedByID

func (uuo *UserUpdateOne) SetBannedByID(id int) *UserUpdateOne

SetBannedByID sets the "banned_by" edge to the User entity by ID.

func (*UserUpdateOne) SetBot

func (uuo *UserUpdateOne) SetBot(b bool) *UserUpdateOne

SetBot sets the "bot" field.

func (*UserUpdateOne) SetDiscriminator

func (uuo *UserUpdateOne) SetDiscriminator(s string) *UserUpdateOne

SetDiscriminator sets the "discriminator" field.

func (*UserUpdateOne) SetEmail

func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetFlags

func (uuo *UserUpdateOne) SetFlags(u uint64) *UserUpdateOne

SetFlags sets the "flags" field.

func (*UserUpdateOne) SetLocale

func (uuo *UserUpdateOne) SetLocale(s string) *UserUpdateOne

SetLocale sets the "locale" field.

func (*UserUpdateOne) SetMfaEnabled

func (uuo *UserUpdateOne) SetMfaEnabled(b bool) *UserUpdateOne

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserUpdateOne) SetNillableAdmin

func (uuo *UserUpdateOne) SetNillableAdmin(b *bool) *UserUpdateOne

SetNillableAdmin sets the "admin" field if the given value is not nil.

func (*UserUpdateOne) SetNillableAvatarHash

func (uuo *UserUpdateOne) SetNillableAvatarHash(s *string) *UserUpdateOne

SetNillableAvatarHash sets the "avatar_hash" field if the given value is not nil.

func (*UserUpdateOne) SetNillableBanReason

func (uuo *UserUpdateOne) SetNillableBanReason(s *string) *UserUpdateOne

SetNillableBanReason sets the "ban_reason" field if the given value is not nil.

func (*UserUpdateOne) SetNillableBanned

func (uuo *UserUpdateOne) SetNillableBanned(b *bool) *UserUpdateOne

SetNillableBanned sets the "banned" field if the given value is not nil.

func (*UserUpdateOne) SetNillableBannedByID

func (uuo *UserUpdateOne) SetNillableBannedByID(id *int) *UserUpdateOne

SetNillableBannedByID sets the "banned_by" edge to the User entity by ID if the given value is not nil.

func (*UserUpdateOne) SetNillableBot

func (uuo *UserUpdateOne) SetNillableBot(b *bool) *UserUpdateOne

SetNillableBot sets the "bot" field if the given value is not nil.

func (*UserUpdateOne) SetNillableFlags

func (uuo *UserUpdateOne) SetNillableFlags(u *uint64) *UserUpdateOne

SetNillableFlags sets the "flags" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLocale

func (uuo *UserUpdateOne) SetNillableLocale(s *string) *UserUpdateOne

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*UserUpdateOne) SetNillableMfaEnabled

func (uuo *UserUpdateOne) SetNillableMfaEnabled(b *bool) *UserUpdateOne

SetNillableMfaEnabled sets the "mfa_enabled" field if the given value is not nil.

func (*UserUpdateOne) SetNillablePremiumType

func (uuo *UserUpdateOne) SetNillablePremiumType(i *int) *UserUpdateOne

SetNillablePremiumType sets the "premium_type" field if the given value is not nil.

func (*UserUpdateOne) SetNillablePublicFlags

func (uuo *UserUpdateOne) SetNillablePublicFlags(u *uint64) *UserUpdateOne

SetNillablePublicFlags sets the "public_flags" field if the given value is not nil.

func (*UserUpdateOne) SetNillableSystem

func (uuo *UserUpdateOne) SetNillableSystem(b *bool) *UserUpdateOne

SetNillableSystem sets the "system" field if the given value is not nil.

func (*UserUpdateOne) SetNillableVerified

func (uuo *UserUpdateOne) SetNillableVerified(b *bool) *UserUpdateOne

SetNillableVerified sets the "verified" field if the given value is not nil.

func (*UserUpdateOne) SetPremiumType

func (uuo *UserUpdateOne) SetPremiumType(i int) *UserUpdateOne

SetPremiumType sets the "premium_type" field.

func (*UserUpdateOne) SetPublicFlags

func (uuo *UserUpdateOne) SetPublicFlags(u uint64) *UserUpdateOne

SetPublicFlags sets the "public_flags" field.

func (*UserUpdateOne) SetSystem

func (uuo *UserUpdateOne) SetSystem(b bool) *UserUpdateOne

SetSystem sets the "system" field.

func (*UserUpdateOne) SetUpdateTime

func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne

SetUpdateTime sets the "update_time" field.

func (*UserUpdateOne) SetUsername

func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne

SetUsername sets the "username" field.

func (*UserUpdateOne) SetVerified

func (uuo *UserUpdateOne) SetVerified(b bool) *UserUpdateOne

SetVerified sets the "verified" field.

func (*UserUpdateOne) Where

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type UserUpsert

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) AddFlags

func (u *UserUpsert) AddFlags(v uint64) *UserUpsert

AddFlags adds v to the "flags" field.

func (*UserUpsert) AddPremiumType

func (u *UserUpsert) AddPremiumType(v int) *UserUpsert

AddPremiumType adds v to the "premium_type" field.

func (*UserUpsert) AddPublicFlags

func (u *UserUpsert) AddPublicFlags(v uint64) *UserUpsert

AddPublicFlags adds v to the "public_flags" field.

func (*UserUpsert) ClearAdmin

func (u *UserUpsert) ClearAdmin() *UserUpsert

ClearAdmin clears the value of the "admin" field.

func (*UserUpsert) ClearAvatarHash

func (u *UserUpsert) ClearAvatarHash() *UserUpsert

ClearAvatarHash clears the value of the "avatar_hash" field.

func (*UserUpsert) ClearBanReason

func (u *UserUpsert) ClearBanReason() *UserUpsert

ClearBanReason clears the value of the "ban_reason" field.

func (*UserUpsert) ClearBanned

func (u *UserUpsert) ClearBanned() *UserUpsert

ClearBanned clears the value of the "banned" field.

func (*UserUpsert) ClearBot

func (u *UserUpsert) ClearBot() *UserUpsert

ClearBot clears the value of the "bot" field.

func (*UserUpsert) ClearFlags

func (u *UserUpsert) ClearFlags() *UserUpsert

ClearFlags clears the value of the "flags" field.

func (*UserUpsert) ClearLocale

func (u *UserUpsert) ClearLocale() *UserUpsert

ClearLocale clears the value of the "locale" field.

func (*UserUpsert) ClearMfaEnabled

func (u *UserUpsert) ClearMfaEnabled() *UserUpsert

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserUpsert) ClearPremiumType

func (u *UserUpsert) ClearPremiumType() *UserUpsert

ClearPremiumType clears the value of the "premium_type" field.

func (*UserUpsert) ClearPublicFlags

func (u *UserUpsert) ClearPublicFlags() *UserUpsert

ClearPublicFlags clears the value of the "public_flags" field.

func (*UserUpsert) ClearSystem

func (u *UserUpsert) ClearSystem() *UserUpsert

ClearSystem clears the value of the "system" field.

func (*UserUpsert) ClearVerified

func (u *UserUpsert) ClearVerified() *UserUpsert

ClearVerified clears the value of the "verified" field.

func (*UserUpsert) SetAdmin

func (u *UserUpsert) SetAdmin(v bool) *UserUpsert

SetAdmin sets the "admin" field.

func (*UserUpsert) SetAvatarHash

func (u *UserUpsert) SetAvatarHash(v string) *UserUpsert

SetAvatarHash sets the "avatar_hash" field.

func (*UserUpsert) SetAvatarURL

func (u *UserUpsert) SetAvatarURL(v string) *UserUpsert

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsert) SetBanReason

func (u *UserUpsert) SetBanReason(v string) *UserUpsert

SetBanReason sets the "ban_reason" field.

func (*UserUpsert) SetBanned

func (u *UserUpsert) SetBanned(v bool) *UserUpsert

SetBanned sets the "banned" field.

func (*UserUpsert) SetBot

func (u *UserUpsert) SetBot(v bool) *UserUpsert

SetBot sets the "bot" field.

func (*UserUpsert) SetDiscriminator

func (u *UserUpsert) SetDiscriminator(v string) *UserUpsert

SetDiscriminator sets the "discriminator" field.

func (*UserUpsert) SetEmail

func (u *UserUpsert) SetEmail(v string) *UserUpsert

SetEmail sets the "email" field.

func (*UserUpsert) SetFlags

func (u *UserUpsert) SetFlags(v uint64) *UserUpsert

SetFlags sets the "flags" field.

func (*UserUpsert) SetLocale

func (u *UserUpsert) SetLocale(v string) *UserUpsert

SetLocale sets the "locale" field.

func (*UserUpsert) SetMfaEnabled

func (u *UserUpsert) SetMfaEnabled(v bool) *UserUpsert

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserUpsert) SetPremiumType

func (u *UserUpsert) SetPremiumType(v int) *UserUpsert

SetPremiumType sets the "premium_type" field.

func (*UserUpsert) SetPublicFlags

func (u *UserUpsert) SetPublicFlags(v uint64) *UserUpsert

SetPublicFlags sets the "public_flags" field.

func (*UserUpsert) SetSystem

func (u *UserUpsert) SetSystem(v bool) *UserUpsert

SetSystem sets the "system" field.

func (*UserUpsert) SetUpdateTime

func (u *UserUpsert) SetUpdateTime(v time.Time) *UserUpsert

SetUpdateTime sets the "update_time" field.

func (*UserUpsert) SetUsername

func (u *UserUpsert) SetUsername(v string) *UserUpsert

SetUsername sets the "username" field.

func (*UserUpsert) SetVerified

func (u *UserUpsert) SetVerified(v bool) *UserUpsert

SetVerified sets the "verified" field.

func (*UserUpsert) UpdateAdmin

func (u *UserUpsert) UpdateAdmin() *UserUpsert

UpdateAdmin sets the "admin" field to the value that was provided on create.

func (*UserUpsert) UpdateAvatarHash

func (u *UserUpsert) UpdateAvatarHash() *UserUpsert

UpdateAvatarHash sets the "avatar_hash" field to the value that was provided on create.

func (*UserUpsert) UpdateAvatarURL

func (u *UserUpsert) UpdateAvatarURL() *UserUpsert

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsert) UpdateBanReason

func (u *UserUpsert) UpdateBanReason() *UserUpsert

UpdateBanReason sets the "ban_reason" field to the value that was provided on create.

func (*UserUpsert) UpdateBanned

func (u *UserUpsert) UpdateBanned() *UserUpsert

UpdateBanned sets the "banned" field to the value that was provided on create.

func (*UserUpsert) UpdateBot

func (u *UserUpsert) UpdateBot() *UserUpsert

UpdateBot sets the "bot" field to the value that was provided on create.

func (*UserUpsert) UpdateDiscriminator

func (u *UserUpsert) UpdateDiscriminator() *UserUpsert

UpdateDiscriminator sets the "discriminator" field to the value that was provided on create.

func (*UserUpsert) UpdateEmail

func (u *UserUpsert) UpdateEmail() *UserUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsert) UpdateFlags

func (u *UserUpsert) UpdateFlags() *UserUpsert

UpdateFlags sets the "flags" field to the value that was provided on create.

func (*UserUpsert) UpdateLocale

func (u *UserUpsert) UpdateLocale() *UserUpsert

UpdateLocale sets the "locale" field to the value that was provided on create.

func (*UserUpsert) UpdateMfaEnabled

func (u *UserUpsert) UpdateMfaEnabled() *UserUpsert

UpdateMfaEnabled sets the "mfa_enabled" field to the value that was provided on create.

func (*UserUpsert) UpdatePremiumType

func (u *UserUpsert) UpdatePremiumType() *UserUpsert

UpdatePremiumType sets the "premium_type" field to the value that was provided on create.

func (*UserUpsert) UpdatePublicFlags

func (u *UserUpsert) UpdatePublicFlags() *UserUpsert

UpdatePublicFlags sets the "public_flags" field to the value that was provided on create.

func (*UserUpsert) UpdateSystem

func (u *UserUpsert) UpdateSystem() *UserUpsert

UpdateSystem sets the "system" field to the value that was provided on create.

func (*UserUpsert) UpdateUpdateTime

func (u *UserUpsert) UpdateUpdateTime() *UserUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*UserUpsert) UpdateUsername

func (u *UserUpsert) UpdateUsername() *UserUpsert

UpdateUsername sets the "username" field to the value that was provided on create.

func (*UserUpsert) UpdateVerified

func (u *UserUpsert) UpdateVerified() *UserUpsert

UpdateVerified sets the "verified" field to the value that was provided on create.

type UserUpsertBulk

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) AddFlags

func (u *UserUpsertBulk) AddFlags(v uint64) *UserUpsertBulk

AddFlags adds v to the "flags" field.

func (*UserUpsertBulk) AddPremiumType

func (u *UserUpsertBulk) AddPremiumType(v int) *UserUpsertBulk

AddPremiumType adds v to the "premium_type" field.

func (*UserUpsertBulk) AddPublicFlags

func (u *UserUpsertBulk) AddPublicFlags(v uint64) *UserUpsertBulk

AddPublicFlags adds v to the "public_flags" field.

func (*UserUpsertBulk) ClearAdmin

func (u *UserUpsertBulk) ClearAdmin() *UserUpsertBulk

ClearAdmin clears the value of the "admin" field.

func (*UserUpsertBulk) ClearAvatarHash

func (u *UserUpsertBulk) ClearAvatarHash() *UserUpsertBulk

ClearAvatarHash clears the value of the "avatar_hash" field.

func (*UserUpsertBulk) ClearBanReason

func (u *UserUpsertBulk) ClearBanReason() *UserUpsertBulk

ClearBanReason clears the value of the "ban_reason" field.

func (*UserUpsertBulk) ClearBanned

func (u *UserUpsertBulk) ClearBanned() *UserUpsertBulk

ClearBanned clears the value of the "banned" field.

func (*UserUpsertBulk) ClearBot

func (u *UserUpsertBulk) ClearBot() *UserUpsertBulk

ClearBot clears the value of the "bot" field.

func (*UserUpsertBulk) ClearFlags

func (u *UserUpsertBulk) ClearFlags() *UserUpsertBulk

ClearFlags clears the value of the "flags" field.

func (*UserUpsertBulk) ClearLocale

func (u *UserUpsertBulk) ClearLocale() *UserUpsertBulk

ClearLocale clears the value of the "locale" field.

func (*UserUpsertBulk) ClearMfaEnabled

func (u *UserUpsertBulk) ClearMfaEnabled() *UserUpsertBulk

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserUpsertBulk) ClearPremiumType

func (u *UserUpsertBulk) ClearPremiumType() *UserUpsertBulk

ClearPremiumType clears the value of the "premium_type" field.

func (*UserUpsertBulk) ClearPublicFlags

func (u *UserUpsertBulk) ClearPublicFlags() *UserUpsertBulk

ClearPublicFlags clears the value of the "public_flags" field.

func (*UserUpsertBulk) ClearSystem

func (u *UserUpsertBulk) ClearSystem() *UserUpsertBulk

ClearSystem clears the value of the "system" field.

func (*UserUpsertBulk) ClearVerified

func (u *UserUpsertBulk) ClearVerified() *UserUpsertBulk

ClearVerified clears the value of the "verified" field.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetAdmin

func (u *UserUpsertBulk) SetAdmin(v bool) *UserUpsertBulk

SetAdmin sets the "admin" field.

func (*UserUpsertBulk) SetAvatarHash

func (u *UserUpsertBulk) SetAvatarHash(v string) *UserUpsertBulk

SetAvatarHash sets the "avatar_hash" field.

func (*UserUpsertBulk) SetAvatarURL

func (u *UserUpsertBulk) SetAvatarURL(v string) *UserUpsertBulk

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsertBulk) SetBanReason

func (u *UserUpsertBulk) SetBanReason(v string) *UserUpsertBulk

SetBanReason sets the "ban_reason" field.

func (*UserUpsertBulk) SetBanned

func (u *UserUpsertBulk) SetBanned(v bool) *UserUpsertBulk

SetBanned sets the "banned" field.

func (*UserUpsertBulk) SetBot

func (u *UserUpsertBulk) SetBot(v bool) *UserUpsertBulk

SetBot sets the "bot" field.

func (*UserUpsertBulk) SetDiscriminator

func (u *UserUpsertBulk) SetDiscriminator(v string) *UserUpsertBulk

SetDiscriminator sets the "discriminator" field.

func (*UserUpsertBulk) SetEmail

func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk

SetEmail sets the "email" field.

func (*UserUpsertBulk) SetFlags

func (u *UserUpsertBulk) SetFlags(v uint64) *UserUpsertBulk

SetFlags sets the "flags" field.

func (*UserUpsertBulk) SetLocale

func (u *UserUpsertBulk) SetLocale(v string) *UserUpsertBulk

SetLocale sets the "locale" field.

func (*UserUpsertBulk) SetMfaEnabled

func (u *UserUpsertBulk) SetMfaEnabled(v bool) *UserUpsertBulk

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserUpsertBulk) SetPremiumType

func (u *UserUpsertBulk) SetPremiumType(v int) *UserUpsertBulk

SetPremiumType sets the "premium_type" field.

func (*UserUpsertBulk) SetPublicFlags

func (u *UserUpsertBulk) SetPublicFlags(v uint64) *UserUpsertBulk

SetPublicFlags sets the "public_flags" field.

func (*UserUpsertBulk) SetSystem

func (u *UserUpsertBulk) SetSystem(v bool) *UserUpsertBulk

SetSystem sets the "system" field.

func (*UserUpsertBulk) SetUpdateTime

func (u *UserUpsertBulk) SetUpdateTime(v time.Time) *UserUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*UserUpsertBulk) SetUsername

func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk

SetUsername sets the "username" field.

func (*UserUpsertBulk) SetVerified

func (u *UserUpsertBulk) SetVerified(v bool) *UserUpsertBulk

SetVerified sets the "verified" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateAdmin

func (u *UserUpsertBulk) UpdateAdmin() *UserUpsertBulk

UpdateAdmin sets the "admin" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateAvatarHash

func (u *UserUpsertBulk) UpdateAvatarHash() *UserUpsertBulk

UpdateAvatarHash sets the "avatar_hash" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateAvatarURL

func (u *UserUpsertBulk) UpdateAvatarURL() *UserUpsertBulk

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateBanReason

func (u *UserUpsertBulk) UpdateBanReason() *UserUpsertBulk

UpdateBanReason sets the "ban_reason" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateBanned

func (u *UserUpsertBulk) UpdateBanned() *UserUpsertBulk

UpdateBanned sets the "banned" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateBot

func (u *UserUpsertBulk) UpdateBot() *UserUpsertBulk

UpdateBot sets the "bot" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateDiscriminator

func (u *UserUpsertBulk) UpdateDiscriminator() *UserUpsertBulk

UpdateDiscriminator sets the "discriminator" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateEmail

func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateFlags

func (u *UserUpsertBulk) UpdateFlags() *UserUpsertBulk

UpdateFlags sets the "flags" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLocale

func (u *UserUpsertBulk) UpdateLocale() *UserUpsertBulk

UpdateLocale sets the "locale" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateMfaEnabled

func (u *UserUpsertBulk) UpdateMfaEnabled() *UserUpsertBulk

UpdateMfaEnabled sets the "mfa_enabled" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdatePremiumType

func (u *UserUpsertBulk) UpdatePremiumType() *UserUpsertBulk

UpdatePremiumType sets the "premium_type" field to the value that was provided on create.

func (*UserUpsertBulk) UpdatePublicFlags

func (u *UserUpsertBulk) UpdatePublicFlags() *UserUpsertBulk

UpdatePublicFlags sets the "public_flags" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateSystem

func (u *UserUpsertBulk) UpdateSystem() *UserUpsertBulk

UpdateSystem sets the "system" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUpdateTime

func (u *UserUpsertBulk) UpdateUpdateTime() *UserUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUsername

func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk

UpdateUsername sets the "username" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateVerified

func (u *UserUpsertBulk) UpdateVerified() *UserUpsertBulk

UpdateVerified sets the "verified" field to the value that was provided on create.

type UserUpsertOne

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) AddFlags

func (u *UserUpsertOne) AddFlags(v uint64) *UserUpsertOne

AddFlags adds v to the "flags" field.

func (*UserUpsertOne) AddPremiumType

func (u *UserUpsertOne) AddPremiumType(v int) *UserUpsertOne

AddPremiumType adds v to the "premium_type" field.

func (*UserUpsertOne) AddPublicFlags

func (u *UserUpsertOne) AddPublicFlags(v uint64) *UserUpsertOne

AddPublicFlags adds v to the "public_flags" field.

func (*UserUpsertOne) ClearAdmin

func (u *UserUpsertOne) ClearAdmin() *UserUpsertOne

ClearAdmin clears the value of the "admin" field.

func (*UserUpsertOne) ClearAvatarHash

func (u *UserUpsertOne) ClearAvatarHash() *UserUpsertOne

ClearAvatarHash clears the value of the "avatar_hash" field.

func (*UserUpsertOne) ClearBanReason

func (u *UserUpsertOne) ClearBanReason() *UserUpsertOne

ClearBanReason clears the value of the "ban_reason" field.

func (*UserUpsertOne) ClearBanned

func (u *UserUpsertOne) ClearBanned() *UserUpsertOne

ClearBanned clears the value of the "banned" field.

func (*UserUpsertOne) ClearBot

func (u *UserUpsertOne) ClearBot() *UserUpsertOne

ClearBot clears the value of the "bot" field.

func (*UserUpsertOne) ClearFlags

func (u *UserUpsertOne) ClearFlags() *UserUpsertOne

ClearFlags clears the value of the "flags" field.

func (*UserUpsertOne) ClearLocale

func (u *UserUpsertOne) ClearLocale() *UserUpsertOne

ClearLocale clears the value of the "locale" field.

func (*UserUpsertOne) ClearMfaEnabled

func (u *UserUpsertOne) ClearMfaEnabled() *UserUpsertOne

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserUpsertOne) ClearPremiumType

func (u *UserUpsertOne) ClearPremiumType() *UserUpsertOne

ClearPremiumType clears the value of the "premium_type" field.

func (*UserUpsertOne) ClearPublicFlags

func (u *UserUpsertOne) ClearPublicFlags() *UserUpsertOne

ClearPublicFlags clears the value of the "public_flags" field.

func (*UserUpsertOne) ClearSystem

func (u *UserUpsertOne) ClearSystem() *UserUpsertOne

ClearSystem clears the value of the "system" field.

func (*UserUpsertOne) ClearVerified

func (u *UserUpsertOne) ClearVerified() *UserUpsertOne

ClearVerified clears the value of the "verified" field.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetAdmin

func (u *UserUpsertOne) SetAdmin(v bool) *UserUpsertOne

SetAdmin sets the "admin" field.

func (*UserUpsertOne) SetAvatarHash

func (u *UserUpsertOne) SetAvatarHash(v string) *UserUpsertOne

SetAvatarHash sets the "avatar_hash" field.

func (*UserUpsertOne) SetAvatarURL

func (u *UserUpsertOne) SetAvatarURL(v string) *UserUpsertOne

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsertOne) SetBanReason

func (u *UserUpsertOne) SetBanReason(v string) *UserUpsertOne

SetBanReason sets the "ban_reason" field.

func (*UserUpsertOne) SetBanned

func (u *UserUpsertOne) SetBanned(v bool) *UserUpsertOne

SetBanned sets the "banned" field.

func (*UserUpsertOne) SetBot

func (u *UserUpsertOne) SetBot(v bool) *UserUpsertOne

SetBot sets the "bot" field.

func (*UserUpsertOne) SetDiscriminator

func (u *UserUpsertOne) SetDiscriminator(v string) *UserUpsertOne

SetDiscriminator sets the "discriminator" field.

func (*UserUpsertOne) SetEmail

func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne

SetEmail sets the "email" field.

func (*UserUpsertOne) SetFlags

func (u *UserUpsertOne) SetFlags(v uint64) *UserUpsertOne

SetFlags sets the "flags" field.

func (*UserUpsertOne) SetLocale

func (u *UserUpsertOne) SetLocale(v string) *UserUpsertOne

SetLocale sets the "locale" field.

func (*UserUpsertOne) SetMfaEnabled

func (u *UserUpsertOne) SetMfaEnabled(v bool) *UserUpsertOne

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserUpsertOne) SetPremiumType

func (u *UserUpsertOne) SetPremiumType(v int) *UserUpsertOne

SetPremiumType sets the "premium_type" field.

func (*UserUpsertOne) SetPublicFlags

func (u *UserUpsertOne) SetPublicFlags(v uint64) *UserUpsertOne

SetPublicFlags sets the "public_flags" field.

func (*UserUpsertOne) SetSystem

func (u *UserUpsertOne) SetSystem(v bool) *UserUpsertOne

SetSystem sets the "system" field.

func (*UserUpsertOne) SetUpdateTime

func (u *UserUpsertOne) SetUpdateTime(v time.Time) *UserUpsertOne

SetUpdateTime sets the "update_time" field.

func (*UserUpsertOne) SetUsername

func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne

SetUsername sets the "username" field.

func (*UserUpsertOne) SetVerified

func (u *UserUpsertOne) SetVerified(v bool) *UserUpsertOne

SetVerified sets the "verified" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateAdmin

func (u *UserUpsertOne) UpdateAdmin() *UserUpsertOne

UpdateAdmin sets the "admin" field to the value that was provided on create.

func (*UserUpsertOne) UpdateAvatarHash

func (u *UserUpsertOne) UpdateAvatarHash() *UserUpsertOne

UpdateAvatarHash sets the "avatar_hash" field to the value that was provided on create.

func (*UserUpsertOne) UpdateAvatarURL

func (u *UserUpsertOne) UpdateAvatarURL() *UserUpsertOne

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsertOne) UpdateBanReason

func (u *UserUpsertOne) UpdateBanReason() *UserUpsertOne

UpdateBanReason sets the "ban_reason" field to the value that was provided on create.

func (*UserUpsertOne) UpdateBanned

func (u *UserUpsertOne) UpdateBanned() *UserUpsertOne

UpdateBanned sets the "banned" field to the value that was provided on create.

func (*UserUpsertOne) UpdateBot

func (u *UserUpsertOne) UpdateBot() *UserUpsertOne

UpdateBot sets the "bot" field to the value that was provided on create.

func (*UserUpsertOne) UpdateDiscriminator

func (u *UserUpsertOne) UpdateDiscriminator() *UserUpsertOne

UpdateDiscriminator sets the "discriminator" field to the value that was provided on create.

func (*UserUpsertOne) UpdateEmail

func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertOne) UpdateFlags

func (u *UserUpsertOne) UpdateFlags() *UserUpsertOne

UpdateFlags sets the "flags" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLocale

func (u *UserUpsertOne) UpdateLocale() *UserUpsertOne

UpdateLocale sets the "locale" field to the value that was provided on create.

func (*UserUpsertOne) UpdateMfaEnabled

func (u *UserUpsertOne) UpdateMfaEnabled() *UserUpsertOne

UpdateMfaEnabled sets the "mfa_enabled" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdatePremiumType

func (u *UserUpsertOne) UpdatePremiumType() *UserUpsertOne

UpdatePremiumType sets the "premium_type" field to the value that was provided on create.

func (*UserUpsertOne) UpdatePublicFlags

func (u *UserUpsertOne) UpdatePublicFlags() *UserUpsertOne

UpdatePublicFlags sets the "public_flags" field to the value that was provided on create.

func (*UserUpsertOne) UpdateSystem

func (u *UserUpsertOne) UpdateSystem() *UserUpsertOne

UpdateSystem sets the "system" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUpdateTime

func (u *UserUpsertOne) UpdateUpdateTime() *UserUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUsername

func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne

UpdateUsername sets the "username" field to the value that was provided on create.

func (*UserUpsertOne) UpdateVerified

func (u *UserUpsertOne) UpdateVerified() *UserUpsertOne

UpdateVerified sets the "verified" field to the value that was provided on create.

type UserWhereInput

type UserWhereInput struct {
	Predicates []predicate.User  `json:"-"`
	Not        *UserWhereInput   `json:"not,omitempty"`
	Or         []*UserWhereInput `json:"or,omitempty"`
	And        []*UserWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "create_time" field predicates.
	CreateTime      *time.Time  `json:"createTime,omitempty"`
	CreateTimeNEQ   *time.Time  `json:"createTimeNEQ,omitempty"`
	CreateTimeIn    []time.Time `json:"createTimeIn,omitempty"`
	CreateTimeNotIn []time.Time `json:"createTimeNotIn,omitempty"`
	CreateTimeGT    *time.Time  `json:"createTimeGT,omitempty"`
	CreateTimeGTE   *time.Time  `json:"createTimeGTE,omitempty"`
	CreateTimeLT    *time.Time  `json:"createTimeLT,omitempty"`
	CreateTimeLTE   *time.Time  `json:"createTimeLTE,omitempty"`

	// "update_time" field predicates.
	UpdateTime      *time.Time  `json:"updateTime,omitempty"`
	UpdateTimeNEQ   *time.Time  `json:"updateTimeNEQ,omitempty"`
	UpdateTimeIn    []time.Time `json:"updateTimeIn,omitempty"`
	UpdateTimeNotIn []time.Time `json:"updateTimeNotIn,omitempty"`
	UpdateTimeGT    *time.Time  `json:"updateTimeGT,omitempty"`
	UpdateTimeGTE   *time.Time  `json:"updateTimeGTE,omitempty"`
	UpdateTimeLT    *time.Time  `json:"updateTimeLT,omitempty"`
	UpdateTimeLTE   *time.Time  `json:"updateTimeLTE,omitempty"`

	// "user_id" field predicates.
	UserID             *string  `json:"userID,omitempty"`
	UserIDNEQ          *string  `json:"userIDNEQ,omitempty"`
	UserIDIn           []string `json:"userIDIn,omitempty"`
	UserIDNotIn        []string `json:"userIDNotIn,omitempty"`
	UserIDGT           *string  `json:"userIDGT,omitempty"`
	UserIDGTE          *string  `json:"userIDGTE,omitempty"`
	UserIDLT           *string  `json:"userIDLT,omitempty"`
	UserIDLTE          *string  `json:"userIDLTE,omitempty"`
	UserIDContains     *string  `json:"userIDContains,omitempty"`
	UserIDHasPrefix    *string  `json:"userIDHasPrefix,omitempty"`
	UserIDHasSuffix    *string  `json:"userIDHasSuffix,omitempty"`
	UserIDEqualFold    *string  `json:"userIDEqualFold,omitempty"`
	UserIDContainsFold *string  `json:"userIDContainsFold,omitempty"`

	// "admin" field predicates.
	Admin       *bool `json:"admin,omitempty"`
	AdminNEQ    *bool `json:"adminNEQ,omitempty"`
	AdminIsNil  bool  `json:"adminIsNil,omitempty"`
	AdminNotNil bool  `json:"adminNotNil,omitempty"`

	// "banned" field predicates.
	Banned       *bool `json:"banned,omitempty"`
	BannedNEQ    *bool `json:"bannedNEQ,omitempty"`
	BannedIsNil  bool  `json:"bannedIsNil,omitempty"`
	BannedNotNil bool  `json:"bannedNotNil,omitempty"`

	// "ban_reason" field predicates.
	BanReason             *string  `json:"banReason,omitempty"`
	BanReasonNEQ          *string  `json:"banReasonNEQ,omitempty"`
	BanReasonIn           []string `json:"banReasonIn,omitempty"`
	BanReasonNotIn        []string `json:"banReasonNotIn,omitempty"`
	BanReasonGT           *string  `json:"banReasonGT,omitempty"`
	BanReasonGTE          *string  `json:"banReasonGTE,omitempty"`
	BanReasonLT           *string  `json:"banReasonLT,omitempty"`
	BanReasonLTE          *string  `json:"banReasonLTE,omitempty"`
	BanReasonContains     *string  `json:"banReasonContains,omitempty"`
	BanReasonHasPrefix    *string  `json:"banReasonHasPrefix,omitempty"`
	BanReasonHasSuffix    *string  `json:"banReasonHasSuffix,omitempty"`
	BanReasonIsNil        bool     `json:"banReasonIsNil,omitempty"`
	BanReasonNotNil       bool     `json:"banReasonNotNil,omitempty"`
	BanReasonEqualFold    *string  `json:"banReasonEqualFold,omitempty"`
	BanReasonContainsFold *string  `json:"banReasonContainsFold,omitempty"`

	// "username" field predicates.
	Username             *string  `json:"username,omitempty"`
	UsernameNEQ          *string  `json:"usernameNEQ,omitempty"`
	UsernameIn           []string `json:"usernameIn,omitempty"`
	UsernameNotIn        []string `json:"usernameNotIn,omitempty"`
	UsernameGT           *string  `json:"usernameGT,omitempty"`
	UsernameGTE          *string  `json:"usernameGTE,omitempty"`
	UsernameLT           *string  `json:"usernameLT,omitempty"`
	UsernameLTE          *string  `json:"usernameLTE,omitempty"`
	UsernameContains     *string  `json:"usernameContains,omitempty"`
	UsernameHasPrefix    *string  `json:"usernameHasPrefix,omitempty"`
	UsernameHasSuffix    *string  `json:"usernameHasSuffix,omitempty"`
	UsernameEqualFold    *string  `json:"usernameEqualFold,omitempty"`
	UsernameContainsFold *string  `json:"usernameContainsFold,omitempty"`

	// "discriminator" field predicates.
	Discriminator             *string  `json:"discriminator,omitempty"`
	DiscriminatorNEQ          *string  `json:"discriminatorNEQ,omitempty"`
	DiscriminatorIn           []string `json:"discriminatorIn,omitempty"`
	DiscriminatorNotIn        []string `json:"discriminatorNotIn,omitempty"`
	DiscriminatorGT           *string  `json:"discriminatorGT,omitempty"`
	DiscriminatorGTE          *string  `json:"discriminatorGTE,omitempty"`
	DiscriminatorLT           *string  `json:"discriminatorLT,omitempty"`
	DiscriminatorLTE          *string  `json:"discriminatorLTE,omitempty"`
	DiscriminatorContains     *string  `json:"discriminatorContains,omitempty"`
	DiscriminatorHasPrefix    *string  `json:"discriminatorHasPrefix,omitempty"`
	DiscriminatorHasSuffix    *string  `json:"discriminatorHasSuffix,omitempty"`
	DiscriminatorEqualFold    *string  `json:"discriminatorEqualFold,omitempty"`
	DiscriminatorContainsFold *string  `json:"discriminatorContainsFold,omitempty"`

	// "email" field predicates.
	Email             *string  `json:"email,omitempty"`
	EmailNEQ          *string  `json:"emailNEQ,omitempty"`
	EmailIn           []string `json:"emailIn,omitempty"`
	EmailNotIn        []string `json:"emailNotIn,omitempty"`
	EmailGT           *string  `json:"emailGT,omitempty"`
	EmailGTE          *string  `json:"emailGTE,omitempty"`
	EmailLT           *string  `json:"emailLT,omitempty"`
	EmailLTE          *string  `json:"emailLTE,omitempty"`
	EmailContains     *string  `json:"emailContains,omitempty"`
	EmailHasPrefix    *string  `json:"emailHasPrefix,omitempty"`
	EmailHasSuffix    *string  `json:"emailHasSuffix,omitempty"`
	EmailEqualFold    *string  `json:"emailEqualFold,omitempty"`
	EmailContainsFold *string  `json:"emailContainsFold,omitempty"`

	// "avatar_hash" field predicates.
	AvatarHash             *string  `json:"avatarHash,omitempty"`
	AvatarHashNEQ          *string  `json:"avatarHashNEQ,omitempty"`
	AvatarHashIn           []string `json:"avatarHashIn,omitempty"`
	AvatarHashNotIn        []string `json:"avatarHashNotIn,omitempty"`
	AvatarHashGT           *string  `json:"avatarHashGT,omitempty"`
	AvatarHashGTE          *string  `json:"avatarHashGTE,omitempty"`
	AvatarHashLT           *string  `json:"avatarHashLT,omitempty"`
	AvatarHashLTE          *string  `json:"avatarHashLTE,omitempty"`
	AvatarHashContains     *string  `json:"avatarHashContains,omitempty"`
	AvatarHashHasPrefix    *string  `json:"avatarHashHasPrefix,omitempty"`
	AvatarHashHasSuffix    *string  `json:"avatarHashHasSuffix,omitempty"`
	AvatarHashIsNil        bool     `json:"avatarHashIsNil,omitempty"`
	AvatarHashNotNil       bool     `json:"avatarHashNotNil,omitempty"`
	AvatarHashEqualFold    *string  `json:"avatarHashEqualFold,omitempty"`
	AvatarHashContainsFold *string  `json:"avatarHashContainsFold,omitempty"`

	// "avatar_url" field predicates.
	AvatarURL             *string  `json:"avatarURL,omitempty"`
	AvatarURLNEQ          *string  `json:"avatarURLNEQ,omitempty"`
	AvatarURLIn           []string `json:"avatarURLIn,omitempty"`
	AvatarURLNotIn        []string `json:"avatarURLNotIn,omitempty"`
	AvatarURLGT           *string  `json:"avatarURLGT,omitempty"`
	AvatarURLGTE          *string  `json:"avatarURLGTE,omitempty"`
	AvatarURLLT           *string  `json:"avatarURLLT,omitempty"`
	AvatarURLLTE          *string  `json:"avatarURLLTE,omitempty"`
	AvatarURLContains     *string  `json:"avatarURLContains,omitempty"`
	AvatarURLHasPrefix    *string  `json:"avatarURLHasPrefix,omitempty"`
	AvatarURLHasSuffix    *string  `json:"avatarURLHasSuffix,omitempty"`
	AvatarURLEqualFold    *string  `json:"avatarURLEqualFold,omitempty"`
	AvatarURLContainsFold *string  `json:"avatarURLContainsFold,omitempty"`

	// "locale" field predicates.
	Locale             *string  `json:"locale,omitempty"`
	LocaleNEQ          *string  `json:"localeNEQ,omitempty"`
	LocaleIn           []string `json:"localeIn,omitempty"`
	LocaleNotIn        []string `json:"localeNotIn,omitempty"`
	LocaleGT           *string  `json:"localeGT,omitempty"`
	LocaleGTE          *string  `json:"localeGTE,omitempty"`
	LocaleLT           *string  `json:"localeLT,omitempty"`
	LocaleLTE          *string  `json:"localeLTE,omitempty"`
	LocaleContains     *string  `json:"localeContains,omitempty"`
	LocaleHasPrefix    *string  `json:"localeHasPrefix,omitempty"`
	LocaleHasSuffix    *string  `json:"localeHasSuffix,omitempty"`
	LocaleIsNil        bool     `json:"localeIsNil,omitempty"`
	LocaleNotNil       bool     `json:"localeNotNil,omitempty"`
	LocaleEqualFold    *string  `json:"localeEqualFold,omitempty"`
	LocaleContainsFold *string  `json:"localeContainsFold,omitempty"`

	// "bot" field predicates.
	Bot       *bool `json:"bot,omitempty"`
	BotNEQ    *bool `json:"botNEQ,omitempty"`
	BotIsNil  bool  `json:"botIsNil,omitempty"`
	BotNotNil bool  `json:"botNotNil,omitempty"`

	// "system" field predicates.
	System       *bool `json:"system,omitempty"`
	SystemNEQ    *bool `json:"systemNEQ,omitempty"`
	SystemIsNil  bool  `json:"systemIsNil,omitempty"`
	SystemNotNil bool  `json:"systemNotNil,omitempty"`

	// "mfa_enabled" field predicates.
	MfaEnabled       *bool `json:"mfaEnabled,omitempty"`
	MfaEnabledNEQ    *bool `json:"mfaEnabledNEQ,omitempty"`
	MfaEnabledIsNil  bool  `json:"mfaEnabledIsNil,omitempty"`
	MfaEnabledNotNil bool  `json:"mfaEnabledNotNil,omitempty"`

	// "verified" field predicates.
	Verified       *bool `json:"verified,omitempty"`
	VerifiedNEQ    *bool `json:"verifiedNEQ,omitempty"`
	VerifiedIsNil  bool  `json:"verifiedIsNil,omitempty"`
	VerifiedNotNil bool  `json:"verifiedNotNil,omitempty"`

	// "flags" field predicates.
	Flags       *uint64  `json:"flags,omitempty"`
	FlagsNEQ    *uint64  `json:"flagsNEQ,omitempty"`
	FlagsIn     []uint64 `json:"flagsIn,omitempty"`
	FlagsNotIn  []uint64 `json:"flagsNotIn,omitempty"`
	FlagsGT     *uint64  `json:"flagsGT,omitempty"`
	FlagsGTE    *uint64  `json:"flagsGTE,omitempty"`
	FlagsLT     *uint64  `json:"flagsLT,omitempty"`
	FlagsLTE    *uint64  `json:"flagsLTE,omitempty"`
	FlagsIsNil  bool     `json:"flagsIsNil,omitempty"`
	FlagsNotNil bool     `json:"flagsNotNil,omitempty"`

	// "premium_type" field predicates.
	PremiumType       *int  `json:"premiumType,omitempty"`
	PremiumTypeNEQ    *int  `json:"premiumTypeNEQ,omitempty"`
	PremiumTypeIn     []int `json:"premiumTypeIn,omitempty"`
	PremiumTypeNotIn  []int `json:"premiumTypeNotIn,omitempty"`
	PremiumTypeGT     *int  `json:"premiumTypeGT,omitempty"`
	PremiumTypeGTE    *int  `json:"premiumTypeGTE,omitempty"`
	PremiumTypeLT     *int  `json:"premiumTypeLT,omitempty"`
	PremiumTypeLTE    *int  `json:"premiumTypeLTE,omitempty"`
	PremiumTypeIsNil  bool  `json:"premiumTypeIsNil,omitempty"`
	PremiumTypeNotNil bool  `json:"premiumTypeNotNil,omitempty"`

	// "public_flags" field predicates.
	PublicFlags       *uint64  `json:"publicFlags,omitempty"`
	PublicFlagsNEQ    *uint64  `json:"publicFlagsNEQ,omitempty"`
	PublicFlagsIn     []uint64 `json:"publicFlagsIn,omitempty"`
	PublicFlagsNotIn  []uint64 `json:"publicFlagsNotIn,omitempty"`
	PublicFlagsGT     *uint64  `json:"publicFlagsGT,omitempty"`
	PublicFlagsGTE    *uint64  `json:"publicFlagsGTE,omitempty"`
	PublicFlagsLT     *uint64  `json:"publicFlagsLT,omitempty"`
	PublicFlagsLTE    *uint64  `json:"publicFlagsLTE,omitempty"`
	PublicFlagsIsNil  bool     `json:"publicFlagsIsNil,omitempty"`
	PublicFlagsNotNil bool     `json:"publicFlagsNotNil,omitempty"`

	// "user_guilds" edge predicates.
	HasUserGuilds     *bool              `json:"hasUserGuilds,omitempty"`
	HasUserGuildsWith []*GuildWhereInput `json:"hasUserGuildsWith,omitempty"`

	// "banned_users" edge predicates.
	HasBannedUsers     *bool             `json:"hasBannedUsers,omitempty"`
	HasBannedUsersWith []*UserWhereInput `json:"hasBannedUsersWith,omitempty"`

	// "banned_by" edge predicates.
	HasBannedBy     *bool             `json:"hasBannedBy,omitempty"`
	HasBannedByWith []*UserWhereInput `json:"hasBannedByWith,omitempty"`
}

UserWhereInput represents a where input for filtering User queries.

func (*UserWhereInput) AddPredicates

func (i *UserWhereInput) AddPredicates(predicates ...predicate.User)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*UserWhereInput) Filter

func (i *UserWhereInput) Filter(q *UserQuery) (*UserQuery, error)

Filter applies the UserWhereInput filter on the UserQuery builder.

func (*UserWhereInput) P

func (i *UserWhereInput) P() (predicate.User, error)

P returns a predicate for filtering users. An error is returned if the input is empty or invalid.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL