ent

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 34 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"
	TypeMember          = "Member"
	TypeMessagePin      = "MessagePin"
	TypeMessageRemind   = "MessageRemind"
	TypeRolePanel       = "RolePanel"
	TypeRolePanelEdit   = "RolePanelEdit"
	TypeRolePanelPlaced = "RolePanelPlaced"
	TypeUser            = "User"
	TypeWordSuffix      = "WordSuffix"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

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.

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
	// Member is the client for interacting with the Member builders.
	Member *MemberClient
	// MessagePin is the client for interacting with the MessagePin builders.
	MessagePin *MessagePinClient
	// MessageRemind is the client for interacting with the MessageRemind builders.
	MessageRemind *MessageRemindClient
	// RolePanel is the client for interacting with the RolePanel builders.
	RolePanel *RolePanelClient
	// RolePanelEdit is the client for interacting with the RolePanelEdit builders.
	RolePanelEdit *RolePanelEditClient
	// RolePanelPlaced is the client for interacting with the RolePanelPlaced builders.
	RolePanelPlaced *RolePanelPlacedClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// WordSuffix is the client for interacting with the WordSuffix builders.
	WordSuffix *WordSuffixClient
	// 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) 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 Guild

type Guild struct {

	// ID of the ent.
	ID snowflake.ID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Locale holds the value of the "locale" field.
	Locale discord.Locale `json:"locale,omitempty"`
	// LevelUpMessage holds the value of the "level_up_message" field.
	LevelUpMessage string `json:"level_up_message,omitempty"`
	// LevelUpChannel holds the value of the "level_up_channel" field.
	LevelUpChannel *snowflake.ID `json:"level_up_channel,omitempty"`
	// LevelUpExcludeChannel holds the value of the "level_up_exclude_channel" field.
	LevelUpExcludeChannel []snowflake.ID `json:"level_up_exclude_channel,omitempty"`
	// LevelMee6Imported holds the value of the "level_mee6_imported" field.
	LevelMee6Imported bool `json:"level_mee6_imported,omitempty"`
	// LevelRole holds the value of the "level_role" field.
	LevelRole map[int]snowflake.ID `json:"level_role,omitempty"`
	// Permissions holds the value of the "permissions" field.
	Permissions map[snowflake.ID]permissions.Permission `json:"permissions,omitempty"`
	// RemindCount holds the value of the "remind_count" field.
	RemindCount int `json:"remind_count,omitempty"`
	// RolePanelEditTimes holds the value of the "role_panel_edit_times" field.
	RolePanelEditTimes []time.Time `json:"role_panel_edit_times,omitempty"`
	// BumpEnabled holds the value of the "bump_enabled" field.
	BumpEnabled bool `json:"bump_enabled,omitempty"`
	// BumpMessageTitle holds the value of the "bump_message_title" field.
	BumpMessageTitle string `json:"bump_message_title,omitempty"`
	// BumpMessage holds the value of the "bump_message" field.
	BumpMessage string `json:"bump_message,omitempty"`
	// BumpRemindMessageTitle holds the value of the "bump_remind_message_title" field.
	BumpRemindMessageTitle string `json:"bump_remind_message_title,omitempty"`
	// BumpRemindMessage holds the value of the "bump_remind_message" field.
	BumpRemindMessage string `json:"bump_remind_message,omitempty"`
	// UpEnabled holds the value of the "up_enabled" field.
	UpEnabled bool `json:"up_enabled,omitempty"`
	// UpMessageTitle holds the value of the "up_message_title" field.
	UpMessageTitle string `json:"up_message_title,omitempty"`
	// UpMessage holds the value of the "up_message" field.
	UpMessage string `json:"up_message,omitempty"`
	// UpRemindMessageTitle holds the value of the "up_remind_message_title" field.
	UpRemindMessageTitle string `json:"up_remind_message_title,omitempty"`
	// UpRemindMessage holds the value of the "up_remind_message" field.
	UpRemindMessage string `json:"up_remind_message,omitempty"`
	// BumpMention holds the value of the "bump_mention" field.
	BumpMention *snowflake.ID `json:"bump_mention,omitempty"`
	// UpMention holds the value of the "up_mention" field.
	UpMention *snowflake.ID `json:"up_mention,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) QueryMembers

func (gu *Guild) QueryMembers() *MemberQuery

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

func (*Guild) QueryMessagePins

func (gu *Guild) QueryMessagePins() *MessagePinQuery

QueryMessagePins queries the "message_pins" edge of the Guild entity.

func (*Guild) QueryOwner

func (gu *Guild) QueryOwner() *UserQuery

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

func (*Guild) QueryReminds

func (gu *Guild) QueryReminds() *MessageRemindQuery

QueryReminds queries the "reminds" edge of the Guild entity.

func (*Guild) QueryRolePanelEdits

func (gu *Guild) QueryRolePanelEdits() *RolePanelEditQuery

QueryRolePanelEdits queries the "role_panel_edits" edge of the Guild entity.

func (*Guild) QueryRolePanelPlacements

func (gu *Guild) QueryRolePanelPlacements() *RolePanelPlacedQuery

QueryRolePanelPlacements queries the "role_panel_placements" edge of the Guild entity.

func (*Guild) QueryRolePanels

func (gu *Guild) QueryRolePanels() *RolePanelQuery

QueryRolePanels queries the "role_panels" edge of the Guild entity.

func (*Guild) String

func (gu *Guild) String() string

String implements the fmt.Stringer.

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 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 snowflake.ID) *GuildDeleteOne

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

func (*GuildClient) Get

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

Get returns a Guild entity by its id.

func (*GuildClient) GetX

func (c *GuildClient) GetX(ctx context.Context, id snowflake.ID) *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) MapCreateBulk

func (c *GuildClient) MapCreateBulk(slice any, setFunc func(*GuildCreate, int)) *GuildCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*GuildClient) Query

func (c *GuildClient) Query() *GuildQuery

Query returns a query builder for Guild.

func (*GuildClient) QueryMembers

func (c *GuildClient) QueryMembers(gu *Guild) *MemberQuery

QueryMembers queries the members edge of a Guild.

func (*GuildClient) QueryMessagePins

func (c *GuildClient) QueryMessagePins(gu *Guild) *MessagePinQuery

QueryMessagePins queries the message_pins edge of a Guild.

func (*GuildClient) QueryOwner

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

QueryOwner queries the owner edge of a Guild.

func (*GuildClient) QueryReminds

func (c *GuildClient) QueryReminds(gu *Guild) *MessageRemindQuery

QueryReminds queries the reminds edge of a Guild.

func (*GuildClient) QueryRolePanelEdits

func (c *GuildClient) QueryRolePanelEdits(gu *Guild) *RolePanelEditQuery

QueryRolePanelEdits queries the role_panel_edits edge of a Guild.

func (*GuildClient) QueryRolePanelPlacements

func (c *GuildClient) QueryRolePanelPlacements(gu *Guild) *RolePanelPlacedQuery

QueryRolePanelPlacements queries the role_panel_placements edge of a Guild.

func (*GuildClient) QueryRolePanels

func (c *GuildClient) QueryRolePanels(gu *Guild) *RolePanelQuery

QueryRolePanels queries the role_panels 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 snowflake.ID) *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 GuildCreate

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

GuildCreate is the builder for creating a Guild entity.

func (*GuildCreate) AddMemberIDs

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

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

func (*GuildCreate) AddMembers

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

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

func (*GuildCreate) AddMessagePinIDs

func (gc *GuildCreate) AddMessagePinIDs(ids ...uuid.UUID) *GuildCreate

AddMessagePinIDs adds the "message_pins" edge to the MessagePin entity by IDs.

func (*GuildCreate) AddMessagePins

func (gc *GuildCreate) AddMessagePins(m ...*MessagePin) *GuildCreate

AddMessagePins adds the "message_pins" edges to the MessagePin entity.

func (*GuildCreate) AddRemindIDs

func (gc *GuildCreate) AddRemindIDs(ids ...uuid.UUID) *GuildCreate

AddRemindIDs adds the "reminds" edge to the MessageRemind entity by IDs.

func (*GuildCreate) AddReminds

func (gc *GuildCreate) AddReminds(m ...*MessageRemind) *GuildCreate

AddReminds adds the "reminds" edges to the MessageRemind entity.

func (*GuildCreate) AddRolePanelEditIDs

func (gc *GuildCreate) AddRolePanelEditIDs(ids ...uuid.UUID) *GuildCreate

AddRolePanelEditIDs adds the "role_panel_edits" edge to the RolePanelEdit entity by IDs.

func (*GuildCreate) AddRolePanelEdits

func (gc *GuildCreate) AddRolePanelEdits(r ...*RolePanelEdit) *GuildCreate

AddRolePanelEdits adds the "role_panel_edits" edges to the RolePanelEdit entity.

func (*GuildCreate) AddRolePanelIDs

func (gc *GuildCreate) AddRolePanelIDs(ids ...uuid.UUID) *GuildCreate

AddRolePanelIDs adds the "role_panels" edge to the RolePanel entity by IDs.

func (*GuildCreate) AddRolePanelPlacementIDs

func (gc *GuildCreate) AddRolePanelPlacementIDs(ids ...uuid.UUID) *GuildCreate

AddRolePanelPlacementIDs adds the "role_panel_placements" edge to the RolePanelPlaced entity by IDs.

func (*GuildCreate) AddRolePanelPlacements

func (gc *GuildCreate) AddRolePanelPlacements(r ...*RolePanelPlaced) *GuildCreate

AddRolePanelPlacements adds the "role_panel_placements" edges to the RolePanelPlaced entity.

func (*GuildCreate) AddRolePanels

func (gc *GuildCreate) AddRolePanels(r ...*RolePanel) *GuildCreate

AddRolePanels adds the "role_panels" edges to the RolePanel 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) 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) SetBumpEnabled

func (gc *GuildCreate) SetBumpEnabled(b bool) *GuildCreate

SetBumpEnabled sets the "bump_enabled" field.

func (*GuildCreate) SetBumpMention

func (gc *GuildCreate) SetBumpMention(s snowflake.ID) *GuildCreate

SetBumpMention sets the "bump_mention" field.

func (*GuildCreate) SetBumpMessage

func (gc *GuildCreate) SetBumpMessage(s string) *GuildCreate

SetBumpMessage sets the "bump_message" field.

func (*GuildCreate) SetBumpMessageTitle

func (gc *GuildCreate) SetBumpMessageTitle(s string) *GuildCreate

SetBumpMessageTitle sets the "bump_message_title" field.

func (*GuildCreate) SetBumpRemindMessage

func (gc *GuildCreate) SetBumpRemindMessage(s string) *GuildCreate

SetBumpRemindMessage sets the "bump_remind_message" field.

func (*GuildCreate) SetBumpRemindMessageTitle

func (gc *GuildCreate) SetBumpRemindMessageTitle(s string) *GuildCreate

SetBumpRemindMessageTitle sets the "bump_remind_message_title" field.

func (*GuildCreate) SetID

func (gc *GuildCreate) SetID(s snowflake.ID) *GuildCreate

SetID sets the "id" field.

func (*GuildCreate) SetLevelMee6Imported

func (gc *GuildCreate) SetLevelMee6Imported(b bool) *GuildCreate

SetLevelMee6Imported sets the "level_mee6_imported" field.

func (*GuildCreate) SetLevelRole

func (gc *GuildCreate) SetLevelRole(m map[int]snowflake.ID) *GuildCreate

SetLevelRole sets the "level_role" field.

func (*GuildCreate) SetLevelUpChannel

func (gc *GuildCreate) SetLevelUpChannel(s snowflake.ID) *GuildCreate

SetLevelUpChannel sets the "level_up_channel" field.

func (*GuildCreate) SetLevelUpExcludeChannel

func (gc *GuildCreate) SetLevelUpExcludeChannel(s []snowflake.ID) *GuildCreate

SetLevelUpExcludeChannel sets the "level_up_exclude_channel" field.

func (*GuildCreate) SetLevelUpMessage

func (gc *GuildCreate) SetLevelUpMessage(s string) *GuildCreate

SetLevelUpMessage sets the "level_up_message" field.

func (*GuildCreate) SetLocale

func (gc *GuildCreate) SetLocale(d discord.Locale) *GuildCreate

SetLocale sets the "locale" field.

func (*GuildCreate) SetName

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

SetName sets the "name" field.

func (*GuildCreate) SetNillableBumpEnabled

func (gc *GuildCreate) SetNillableBumpEnabled(b *bool) *GuildCreate

SetNillableBumpEnabled sets the "bump_enabled" field if the given value is not nil.

func (*GuildCreate) SetNillableBumpMention

func (gc *GuildCreate) SetNillableBumpMention(s *snowflake.ID) *GuildCreate

SetNillableBumpMention sets the "bump_mention" field if the given value is not nil.

func (*GuildCreate) SetNillableBumpMessage

func (gc *GuildCreate) SetNillableBumpMessage(s *string) *GuildCreate

SetNillableBumpMessage sets the "bump_message" field if the given value is not nil.

func (*GuildCreate) SetNillableBumpMessageTitle

func (gc *GuildCreate) SetNillableBumpMessageTitle(s *string) *GuildCreate

SetNillableBumpMessageTitle sets the "bump_message_title" field if the given value is not nil.

func (*GuildCreate) SetNillableBumpRemindMessage

func (gc *GuildCreate) SetNillableBumpRemindMessage(s *string) *GuildCreate

SetNillableBumpRemindMessage sets the "bump_remind_message" field if the given value is not nil.

func (*GuildCreate) SetNillableBumpRemindMessageTitle

func (gc *GuildCreate) SetNillableBumpRemindMessageTitle(s *string) *GuildCreate

SetNillableBumpRemindMessageTitle sets the "bump_remind_message_title" field if the given value is not nil.

func (*GuildCreate) SetNillableLevelMee6Imported

func (gc *GuildCreate) SetNillableLevelMee6Imported(b *bool) *GuildCreate

SetNillableLevelMee6Imported sets the "level_mee6_imported" field if the given value is not nil.

func (*GuildCreate) SetNillableLevelUpChannel

func (gc *GuildCreate) SetNillableLevelUpChannel(s *snowflake.ID) *GuildCreate

SetNillableLevelUpChannel sets the "level_up_channel" field if the given value is not nil.

func (*GuildCreate) SetNillableLevelUpMessage

func (gc *GuildCreate) SetNillableLevelUpMessage(s *string) *GuildCreate

SetNillableLevelUpMessage sets the "level_up_message" field if the given value is not nil.

func (*GuildCreate) SetNillableLocale

func (gc *GuildCreate) SetNillableLocale(d *discord.Locale) *GuildCreate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*GuildCreate) SetNillableRemindCount

func (gc *GuildCreate) SetNillableRemindCount(i *int) *GuildCreate

SetNillableRemindCount sets the "remind_count" field if the given value is not nil.

func (*GuildCreate) SetNillableUpEnabled

func (gc *GuildCreate) SetNillableUpEnabled(b *bool) *GuildCreate

SetNillableUpEnabled sets the "up_enabled" field if the given value is not nil.

func (*GuildCreate) SetNillableUpMention

func (gc *GuildCreate) SetNillableUpMention(s *snowflake.ID) *GuildCreate

SetNillableUpMention sets the "up_mention" field if the given value is not nil.

func (*GuildCreate) SetNillableUpMessage

func (gc *GuildCreate) SetNillableUpMessage(s *string) *GuildCreate

SetNillableUpMessage sets the "up_message" field if the given value is not nil.

func (*GuildCreate) SetNillableUpMessageTitle

func (gc *GuildCreate) SetNillableUpMessageTitle(s *string) *GuildCreate

SetNillableUpMessageTitle sets the "up_message_title" field if the given value is not nil.

func (*GuildCreate) SetNillableUpRemindMessage

func (gc *GuildCreate) SetNillableUpRemindMessage(s *string) *GuildCreate

SetNillableUpRemindMessage sets the "up_remind_message" field if the given value is not nil.

func (*GuildCreate) SetNillableUpRemindMessageTitle

func (gc *GuildCreate) SetNillableUpRemindMessageTitle(s *string) *GuildCreate

SetNillableUpRemindMessageTitle sets the "up_remind_message_title" field if the given value is not nil.

func (*GuildCreate) SetOwner

func (gc *GuildCreate) SetOwner(u *User) *GuildCreate

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

func (*GuildCreate) SetOwnerID

func (gc *GuildCreate) SetOwnerID(id snowflake.ID) *GuildCreate

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

func (*GuildCreate) SetPermissions

func (gc *GuildCreate) SetPermissions(m map[snowflake.ID]permissions.Permission) *GuildCreate

SetPermissions sets the "permissions" field.

func (*GuildCreate) SetRemindCount

func (gc *GuildCreate) SetRemindCount(i int) *GuildCreate

SetRemindCount sets the "remind_count" field.

func (*GuildCreate) SetRolePanelEditTimes

func (gc *GuildCreate) SetRolePanelEditTimes(t []time.Time) *GuildCreate

SetRolePanelEditTimes sets the "role_panel_edit_times" field.

func (*GuildCreate) SetUpEnabled

func (gc *GuildCreate) SetUpEnabled(b bool) *GuildCreate

SetUpEnabled sets the "up_enabled" field.

func (*GuildCreate) SetUpMention

func (gc *GuildCreate) SetUpMention(s snowflake.ID) *GuildCreate

SetUpMention sets the "up_mention" field.

func (*GuildCreate) SetUpMessage

func (gc *GuildCreate) SetUpMessage(s string) *GuildCreate

SetUpMessage sets the "up_message" field.

func (*GuildCreate) SetUpMessageTitle

func (gc *GuildCreate) SetUpMessageTitle(s string) *GuildCreate

SetUpMessageTitle sets the "up_message_title" field.

func (*GuildCreate) SetUpRemindMessage

func (gc *GuildCreate) SetUpRemindMessage(s string) *GuildCreate

SetUpRemindMessage sets the "up_remind_message" field.

func (*GuildCreate) SetUpRemindMessageTitle

func (gc *GuildCreate) SetUpRemindMessageTitle(s string) *GuildCreate

SetUpRemindMessageTitle sets the "up_remind_message_title" 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) 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 GuildEdges

type GuildEdges struct {
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// Members holds the value of the members edge.
	Members []*Member `json:"members,omitempty"`
	// MessagePins holds the value of the message_pins edge.
	MessagePins []*MessagePin `json:"message_pins,omitempty"`
	// Reminds holds the value of the reminds edge.
	Reminds []*MessageRemind `json:"reminds,omitempty"`
	// RolePanels holds the value of the role_panels edge.
	RolePanels []*RolePanel `json:"role_panels,omitempty"`
	// RolePanelPlacements holds the value of the role_panel_placements edge.
	RolePanelPlacements []*RolePanelPlaced `json:"role_panel_placements,omitempty"`
	// RolePanelEdits holds the value of the role_panel_edits edge.
	RolePanelEdits []*RolePanelEdit `json:"role_panel_edits,omitempty"`
	// contains filtered or unexported fields
}

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

func (GuildEdges) MembersOrErr

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

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

func (GuildEdges) MessagePinsOrErr

func (e GuildEdges) MessagePinsOrErr() ([]*MessagePin, error)

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

func (GuildEdges) OwnerOrErr

func (e GuildEdges) OwnerOrErr() (*User, error)

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

func (GuildEdges) RemindsOrErr

func (e GuildEdges) RemindsOrErr() ([]*MessageRemind, error)

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

func (GuildEdges) RolePanelEditsOrErr

func (e GuildEdges) RolePanelEditsOrErr() ([]*RolePanelEdit, error)

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

func (GuildEdges) RolePanelPlacementsOrErr

func (e GuildEdges) RolePanelPlacementsOrErr() ([]*RolePanelPlaced, error)

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

func (GuildEdges) RolePanelsOrErr

func (e GuildEdges) RolePanelsOrErr() ([]*RolePanel, error)

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

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

func (m *GuildMutation) AddBumpMention(s snowflake.ID)

AddBumpMention adds s to the "bump_mention" field.

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

func (m *GuildMutation) AddLevelUpChannel(s snowflake.ID)

AddLevelUpChannel adds s to the "level_up_channel" field.

func (*GuildMutation) AddMemberIDs

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

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

func (*GuildMutation) AddMessagePinIDs

func (m *GuildMutation) AddMessagePinIDs(ids ...uuid.UUID)

AddMessagePinIDs adds the "message_pins" edge to the MessagePin entity by ids.

func (*GuildMutation) AddRemindCount

func (m *GuildMutation) AddRemindCount(i int)

AddRemindCount adds i to the "remind_count" field.

func (*GuildMutation) AddRemindIDs

func (m *GuildMutation) AddRemindIDs(ids ...uuid.UUID)

AddRemindIDs adds the "reminds" edge to the MessageRemind entity by ids.

func (*GuildMutation) AddRolePanelEditIDs

func (m *GuildMutation) AddRolePanelEditIDs(ids ...uuid.UUID)

AddRolePanelEditIDs adds the "role_panel_edits" edge to the RolePanelEdit entity by ids.

func (*GuildMutation) AddRolePanelIDs

func (m *GuildMutation) AddRolePanelIDs(ids ...uuid.UUID)

AddRolePanelIDs adds the "role_panels" edge to the RolePanel entity by ids.

func (*GuildMutation) AddRolePanelPlacementIDs

func (m *GuildMutation) AddRolePanelPlacementIDs(ids ...uuid.UUID)

AddRolePanelPlacementIDs adds the "role_panel_placements" edge to the RolePanelPlaced entity by ids.

func (*GuildMutation) AddUpMention

func (m *GuildMutation) AddUpMention(s snowflake.ID)

AddUpMention adds s to the "up_mention" field.

func (*GuildMutation) AddedBumpMention

func (m *GuildMutation) AddedBumpMention() (r snowflake.ID, exists bool)

AddedBumpMention returns the value that was added to the "bump_mention" field in this mutation.

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

func (m *GuildMutation) AddedLevelUpChannel() (r snowflake.ID, exists bool)

AddedLevelUpChannel returns the value that was added to the "level_up_channel" field in this mutation.

func (*GuildMutation) AddedRemindCount

func (m *GuildMutation) AddedRemindCount() (r int, exists bool)

AddedRemindCount returns the value that was added to the "remind_count" field in this mutation.

func (*GuildMutation) AddedUpMention

func (m *GuildMutation) AddedUpMention() (r snowflake.ID, exists bool)

AddedUpMention returns the value that was added to the "up_mention" field in this mutation.

func (*GuildMutation) AppendLevelUpExcludeChannel

func (m *GuildMutation) AppendLevelUpExcludeChannel(s []snowflake.ID)

AppendLevelUpExcludeChannel adds s to the "level_up_exclude_channel" field.

func (*GuildMutation) AppendRolePanelEditTimes

func (m *GuildMutation) AppendRolePanelEditTimes(t []time.Time)

AppendRolePanelEditTimes adds t to the "role_panel_edit_times" field.

func (*GuildMutation) AppendedLevelUpExcludeChannel

func (m *GuildMutation) AppendedLevelUpExcludeChannel() ([]snowflake.ID, bool)

AppendedLevelUpExcludeChannel returns the list of values that were appended to the "level_up_exclude_channel" field in this mutation.

func (*GuildMutation) AppendedRolePanelEditTimes

func (m *GuildMutation) AppendedRolePanelEditTimes() ([]time.Time, bool)

AppendedRolePanelEditTimes returns the list of values that were appended to the "role_panel_edit_times" field in this mutation.

func (*GuildMutation) BumpEnabled

func (m *GuildMutation) BumpEnabled() (r bool, exists bool)

BumpEnabled returns the value of the "bump_enabled" field in the mutation.

func (*GuildMutation) BumpMention

func (m *GuildMutation) BumpMention() (r snowflake.ID, exists bool)

BumpMention returns the value of the "bump_mention" field in the mutation.

func (*GuildMutation) BumpMentionCleared

func (m *GuildMutation) BumpMentionCleared() bool

BumpMentionCleared returns if the "bump_mention" field was cleared in this mutation.

func (*GuildMutation) BumpMessage

func (m *GuildMutation) BumpMessage() (r string, exists bool)

BumpMessage returns the value of the "bump_message" field in the mutation.

func (*GuildMutation) BumpMessageTitle

func (m *GuildMutation) BumpMessageTitle() (r string, exists bool)

BumpMessageTitle returns the value of the "bump_message_title" field in the mutation.

func (*GuildMutation) BumpRemindMessage

func (m *GuildMutation) BumpRemindMessage() (r string, exists bool)

BumpRemindMessage returns the value of the "bump_remind_message" field in the mutation.

func (*GuildMutation) BumpRemindMessageTitle

func (m *GuildMutation) BumpRemindMessageTitle() (r string, exists bool)

BumpRemindMessageTitle returns the value of the "bump_remind_message_title" field in the mutation.

func (*GuildMutation) ClearBumpMention

func (m *GuildMutation) ClearBumpMention()

ClearBumpMention clears the value of the "bump_mention" field.

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

func (m *GuildMutation) ClearLevelRole()

ClearLevelRole clears the value of the "level_role" field.

func (*GuildMutation) ClearLevelUpChannel

func (m *GuildMutation) ClearLevelUpChannel()

ClearLevelUpChannel clears the value of the "level_up_channel" field.

func (*GuildMutation) ClearLevelUpExcludeChannel

func (m *GuildMutation) ClearLevelUpExcludeChannel()

ClearLevelUpExcludeChannel clears the value of the "level_up_exclude_channel" field.

func (*GuildMutation) ClearMembers

func (m *GuildMutation) ClearMembers()

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

func (*GuildMutation) ClearMessagePins

func (m *GuildMutation) ClearMessagePins()

ClearMessagePins clears the "message_pins" edge to the MessagePin entity.

func (*GuildMutation) ClearOwner

func (m *GuildMutation) ClearOwner()

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

func (*GuildMutation) ClearReminds

func (m *GuildMutation) ClearReminds()

ClearReminds clears the "reminds" edge to the MessageRemind entity.

func (*GuildMutation) ClearRolePanelEdits

func (m *GuildMutation) ClearRolePanelEdits()

ClearRolePanelEdits clears the "role_panel_edits" edge to the RolePanelEdit entity.

func (*GuildMutation) ClearRolePanelPlacements

func (m *GuildMutation) ClearRolePanelPlacements()

ClearRolePanelPlacements clears the "role_panel_placements" edge to the RolePanelPlaced entity.

func (*GuildMutation) ClearRolePanels

func (m *GuildMutation) ClearRolePanels()

ClearRolePanels clears the "role_panels" edge to the RolePanel entity.

func (*GuildMutation) ClearUpMention

func (m *GuildMutation) ClearUpMention()

ClearUpMention clears the value of the "up_mention" 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) 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) 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) ID

func (m *GuildMutation) ID() (id snowflake.ID, 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) ([]snowflake.ID, 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) LevelMee6Imported

func (m *GuildMutation) LevelMee6Imported() (r bool, exists bool)

LevelMee6Imported returns the value of the "level_mee6_imported" field in the mutation.

func (*GuildMutation) LevelRole

func (m *GuildMutation) LevelRole() (r map[int]snowflake.ID, exists bool)

LevelRole returns the value of the "level_role" field in the mutation.

func (*GuildMutation) LevelRoleCleared

func (m *GuildMutation) LevelRoleCleared() bool

LevelRoleCleared returns if the "level_role" field was cleared in this mutation.

func (*GuildMutation) LevelUpChannel

func (m *GuildMutation) LevelUpChannel() (r snowflake.ID, exists bool)

LevelUpChannel returns the value of the "level_up_channel" field in the mutation.

func (*GuildMutation) LevelUpChannelCleared

func (m *GuildMutation) LevelUpChannelCleared() bool

LevelUpChannelCleared returns if the "level_up_channel" field was cleared in this mutation.

func (*GuildMutation) LevelUpExcludeChannel

func (m *GuildMutation) LevelUpExcludeChannel() (r []snowflake.ID, exists bool)

LevelUpExcludeChannel returns the value of the "level_up_exclude_channel" field in the mutation.

func (*GuildMutation) LevelUpExcludeChannelCleared

func (m *GuildMutation) LevelUpExcludeChannelCleared() bool

LevelUpExcludeChannelCleared returns if the "level_up_exclude_channel" field was cleared in this mutation.

func (*GuildMutation) LevelUpMessage

func (m *GuildMutation) LevelUpMessage() (r string, exists bool)

LevelUpMessage returns the value of the "level_up_message" field in the mutation.

func (*GuildMutation) Locale

func (m *GuildMutation) Locale() (r discord.Locale, exists bool)

Locale returns the value of the "locale" field in the mutation.

func (*GuildMutation) MembersCleared

func (m *GuildMutation) MembersCleared() bool

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

func (*GuildMutation) MembersIDs

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

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

func (*GuildMutation) MessagePinsCleared

func (m *GuildMutation) MessagePinsCleared() bool

MessagePinsCleared reports if the "message_pins" edge to the MessagePin entity was cleared.

func (*GuildMutation) MessagePinsIDs

func (m *GuildMutation) MessagePinsIDs() (ids []uuid.UUID)

MessagePinsIDs returns the "message_pins" edge IDs in the 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) OldBumpEnabled

func (m *GuildMutation) OldBumpEnabled(ctx context.Context) (v bool, err error)

OldBumpEnabled returns the old "bump_enabled" 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) OldBumpMention

func (m *GuildMutation) OldBumpMention(ctx context.Context) (v *snowflake.ID, err error)

OldBumpMention returns the old "bump_mention" 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) OldBumpMessage

func (m *GuildMutation) OldBumpMessage(ctx context.Context) (v string, err error)

OldBumpMessage returns the old "bump_message" 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) OldBumpMessageTitle

func (m *GuildMutation) OldBumpMessageTitle(ctx context.Context) (v string, err error)

OldBumpMessageTitle returns the old "bump_message_title" 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) OldBumpRemindMessage

func (m *GuildMutation) OldBumpRemindMessage(ctx context.Context) (v string, err error)

OldBumpRemindMessage returns the old "bump_remind_message" 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) OldBumpRemindMessageTitle

func (m *GuildMutation) OldBumpRemindMessageTitle(ctx context.Context) (v string, err error)

OldBumpRemindMessageTitle returns the old "bump_remind_message_title" 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) OldLevelMee6Imported

func (m *GuildMutation) OldLevelMee6Imported(ctx context.Context) (v bool, err error)

OldLevelMee6Imported returns the old "level_mee6_imported" 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) OldLevelRole

func (m *GuildMutation) OldLevelRole(ctx context.Context) (v map[int]snowflake.ID, err error)

OldLevelRole returns the old "level_role" 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) OldLevelUpChannel

func (m *GuildMutation) OldLevelUpChannel(ctx context.Context) (v *snowflake.ID, err error)

OldLevelUpChannel returns the old "level_up_channel" 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) OldLevelUpExcludeChannel

func (m *GuildMutation) OldLevelUpExcludeChannel(ctx context.Context) (v []snowflake.ID, err error)

OldLevelUpExcludeChannel returns the old "level_up_exclude_channel" 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) OldLevelUpMessage

func (m *GuildMutation) OldLevelUpMessage(ctx context.Context) (v string, err error)

OldLevelUpMessage returns the old "level_up_message" 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) OldLocale

func (m *GuildMutation) OldLocale(ctx context.Context) (v discord.Locale, err error)

OldLocale returns the old "locale" 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) OldPermissions

func (m *GuildMutation) OldPermissions(ctx context.Context) (v map[snowflake.ID]permissions.Permission, 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) OldRemindCount

func (m *GuildMutation) OldRemindCount(ctx context.Context) (v int, err error)

OldRemindCount returns the old "remind_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) OldRolePanelEditTimes

func (m *GuildMutation) OldRolePanelEditTimes(ctx context.Context) (v []time.Time, err error)

OldRolePanelEditTimes returns the old "role_panel_edit_times" 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) OldUpEnabled

func (m *GuildMutation) OldUpEnabled(ctx context.Context) (v bool, err error)

OldUpEnabled returns the old "up_enabled" 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) OldUpMention

func (m *GuildMutation) OldUpMention(ctx context.Context) (v *snowflake.ID, err error)

OldUpMention returns the old "up_mention" 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) OldUpMessage

func (m *GuildMutation) OldUpMessage(ctx context.Context) (v string, err error)

OldUpMessage returns the old "up_message" 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) OldUpMessageTitle

func (m *GuildMutation) OldUpMessageTitle(ctx context.Context) (v string, err error)

OldUpMessageTitle returns the old "up_message_title" 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) OldUpRemindMessage

func (m *GuildMutation) OldUpRemindMessage(ctx context.Context) (v string, err error)

OldUpRemindMessage returns the old "up_remind_message" 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) OldUpRemindMessageTitle

func (m *GuildMutation) OldUpRemindMessageTitle(ctx context.Context) (v string, err error)

OldUpRemindMessageTitle returns the old "up_remind_message_title" 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) OwnerCleared

func (m *GuildMutation) OwnerCleared() bool

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

func (*GuildMutation) OwnerID

func (m *GuildMutation) OwnerID() (id snowflake.ID, exists bool)

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

func (*GuildMutation) OwnerIDs

func (m *GuildMutation) OwnerIDs() (ids []snowflake.ID)

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

func (*GuildMutation) Permissions

func (m *GuildMutation) Permissions() (r map[snowflake.ID]permissions.Permission, exists bool)

Permissions returns the value of the "permissions" field in the mutation.

func (*GuildMutation) RemindCount

func (m *GuildMutation) RemindCount() (r int, exists bool)

RemindCount returns the value of the "remind_count" field in the mutation.

func (*GuildMutation) RemindsCleared

func (m *GuildMutation) RemindsCleared() bool

RemindsCleared reports if the "reminds" edge to the MessageRemind entity was cleared.

func (*GuildMutation) RemindsIDs

func (m *GuildMutation) RemindsIDs() (ids []uuid.UUID)

RemindsIDs returns the "reminds" edge IDs in the mutation.

func (*GuildMutation) RemoveMemberIDs

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

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

func (*GuildMutation) RemoveMessagePinIDs

func (m *GuildMutation) RemoveMessagePinIDs(ids ...uuid.UUID)

RemoveMessagePinIDs removes the "message_pins" edge to the MessagePin entity by IDs.

func (*GuildMutation) RemoveRemindIDs

func (m *GuildMutation) RemoveRemindIDs(ids ...uuid.UUID)

RemoveRemindIDs removes the "reminds" edge to the MessageRemind entity by IDs.

func (*GuildMutation) RemoveRolePanelEditIDs

func (m *GuildMutation) RemoveRolePanelEditIDs(ids ...uuid.UUID)

RemoveRolePanelEditIDs removes the "role_panel_edits" edge to the RolePanelEdit entity by IDs.

func (*GuildMutation) RemoveRolePanelIDs

func (m *GuildMutation) RemoveRolePanelIDs(ids ...uuid.UUID)

RemoveRolePanelIDs removes the "role_panels" edge to the RolePanel entity by IDs.

func (*GuildMutation) RemoveRolePanelPlacementIDs

func (m *GuildMutation) RemoveRolePanelPlacementIDs(ids ...uuid.UUID)

RemoveRolePanelPlacementIDs removes the "role_panel_placements" edge to the RolePanelPlaced entity by IDs.

func (*GuildMutation) RemovedEdges

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

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

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

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

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

func (*GuildMutation) RemovedMessagePinsIDs

func (m *GuildMutation) RemovedMessagePinsIDs() (ids []uuid.UUID)

RemovedMessagePins returns the removed IDs of the "message_pins" edge to the MessagePin entity.

func (*GuildMutation) RemovedRemindsIDs

func (m *GuildMutation) RemovedRemindsIDs() (ids []uuid.UUID)

RemovedReminds returns the removed IDs of the "reminds" edge to the MessageRemind entity.

func (*GuildMutation) RemovedRolePanelEditsIDs

func (m *GuildMutation) RemovedRolePanelEditsIDs() (ids []uuid.UUID)

RemovedRolePanelEdits returns the removed IDs of the "role_panel_edits" edge to the RolePanelEdit entity.

func (*GuildMutation) RemovedRolePanelPlacementsIDs

func (m *GuildMutation) RemovedRolePanelPlacementsIDs() (ids []uuid.UUID)

RemovedRolePanelPlacements returns the removed IDs of the "role_panel_placements" edge to the RolePanelPlaced entity.

func (*GuildMutation) RemovedRolePanelsIDs

func (m *GuildMutation) RemovedRolePanelsIDs() (ids []uuid.UUID)

RemovedRolePanels returns the removed IDs of the "role_panels" edge to the RolePanel entity.

func (*GuildMutation) ResetBumpEnabled

func (m *GuildMutation) ResetBumpEnabled()

ResetBumpEnabled resets all changes to the "bump_enabled" field.

func (*GuildMutation) ResetBumpMention

func (m *GuildMutation) ResetBumpMention()

ResetBumpMention resets all changes to the "bump_mention" field.

func (*GuildMutation) ResetBumpMessage

func (m *GuildMutation) ResetBumpMessage()

ResetBumpMessage resets all changes to the "bump_message" field.

func (*GuildMutation) ResetBumpMessageTitle

func (m *GuildMutation) ResetBumpMessageTitle()

ResetBumpMessageTitle resets all changes to the "bump_message_title" field.

func (*GuildMutation) ResetBumpRemindMessage

func (m *GuildMutation) ResetBumpRemindMessage()

ResetBumpRemindMessage resets all changes to the "bump_remind_message" field.

func (*GuildMutation) ResetBumpRemindMessageTitle

func (m *GuildMutation) ResetBumpRemindMessageTitle()

ResetBumpRemindMessageTitle resets all changes to the "bump_remind_message_title" 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) 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) ResetLevelMee6Imported

func (m *GuildMutation) ResetLevelMee6Imported()

ResetLevelMee6Imported resets all changes to the "level_mee6_imported" field.

func (*GuildMutation) ResetLevelRole

func (m *GuildMutation) ResetLevelRole()

ResetLevelRole resets all changes to the "level_role" field.

func (*GuildMutation) ResetLevelUpChannel

func (m *GuildMutation) ResetLevelUpChannel()

ResetLevelUpChannel resets all changes to the "level_up_channel" field.

func (*GuildMutation) ResetLevelUpExcludeChannel

func (m *GuildMutation) ResetLevelUpExcludeChannel()

ResetLevelUpExcludeChannel resets all changes to the "level_up_exclude_channel" field.

func (*GuildMutation) ResetLevelUpMessage

func (m *GuildMutation) ResetLevelUpMessage()

ResetLevelUpMessage resets all changes to the "level_up_message" field.

func (*GuildMutation) ResetLocale

func (m *GuildMutation) ResetLocale()

ResetLocale resets all changes to the "locale" field.

func (*GuildMutation) ResetMembers

func (m *GuildMutation) ResetMembers()

ResetMembers resets all changes to the "members" edge.

func (*GuildMutation) ResetMessagePins

func (m *GuildMutation) ResetMessagePins()

ResetMessagePins resets all changes to the "message_pins" edge.

func (*GuildMutation) ResetName

func (m *GuildMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*GuildMutation) ResetOwner

func (m *GuildMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*GuildMutation) ResetPermissions

func (m *GuildMutation) ResetPermissions()

ResetPermissions resets all changes to the "permissions" field.

func (*GuildMutation) ResetRemindCount

func (m *GuildMutation) ResetRemindCount()

ResetRemindCount resets all changes to the "remind_count" field.

func (*GuildMutation) ResetReminds

func (m *GuildMutation) ResetReminds()

ResetReminds resets all changes to the "reminds" edge.

func (*GuildMutation) ResetRolePanelEditTimes

func (m *GuildMutation) ResetRolePanelEditTimes()

ResetRolePanelEditTimes resets all changes to the "role_panel_edit_times" field.

func (*GuildMutation) ResetRolePanelEdits

func (m *GuildMutation) ResetRolePanelEdits()

ResetRolePanelEdits resets all changes to the "role_panel_edits" edge.

func (*GuildMutation) ResetRolePanelPlacements

func (m *GuildMutation) ResetRolePanelPlacements()

ResetRolePanelPlacements resets all changes to the "role_panel_placements" edge.

func (*GuildMutation) ResetRolePanels

func (m *GuildMutation) ResetRolePanels()

ResetRolePanels resets all changes to the "role_panels" edge.

func (*GuildMutation) ResetUpEnabled

func (m *GuildMutation) ResetUpEnabled()

ResetUpEnabled resets all changes to the "up_enabled" field.

func (*GuildMutation) ResetUpMention

func (m *GuildMutation) ResetUpMention()

ResetUpMention resets all changes to the "up_mention" field.

func (*GuildMutation) ResetUpMessage

func (m *GuildMutation) ResetUpMessage()

ResetUpMessage resets all changes to the "up_message" field.

func (*GuildMutation) ResetUpMessageTitle

func (m *GuildMutation) ResetUpMessageTitle()

ResetUpMessageTitle resets all changes to the "up_message_title" field.

func (*GuildMutation) ResetUpRemindMessage

func (m *GuildMutation) ResetUpRemindMessage()

ResetUpRemindMessage resets all changes to the "up_remind_message" field.

func (*GuildMutation) ResetUpRemindMessageTitle

func (m *GuildMutation) ResetUpRemindMessageTitle()

ResetUpRemindMessageTitle resets all changes to the "up_remind_message_title" field.

func (*GuildMutation) RolePanelEditTimes

func (m *GuildMutation) RolePanelEditTimes() (r []time.Time, exists bool)

RolePanelEditTimes returns the value of the "role_panel_edit_times" field in the mutation.

func (*GuildMutation) RolePanelEditsCleared

func (m *GuildMutation) RolePanelEditsCleared() bool

RolePanelEditsCleared reports if the "role_panel_edits" edge to the RolePanelEdit entity was cleared.

func (*GuildMutation) RolePanelEditsIDs

func (m *GuildMutation) RolePanelEditsIDs() (ids []uuid.UUID)

RolePanelEditsIDs returns the "role_panel_edits" edge IDs in the mutation.

func (*GuildMutation) RolePanelPlacementsCleared

func (m *GuildMutation) RolePanelPlacementsCleared() bool

RolePanelPlacementsCleared reports if the "role_panel_placements" edge to the RolePanelPlaced entity was cleared.

func (*GuildMutation) RolePanelPlacementsIDs

func (m *GuildMutation) RolePanelPlacementsIDs() (ids []uuid.UUID)

RolePanelPlacementsIDs returns the "role_panel_placements" edge IDs in the mutation.

func (*GuildMutation) RolePanelsCleared

func (m *GuildMutation) RolePanelsCleared() bool

RolePanelsCleared reports if the "role_panels" edge to the RolePanel entity was cleared.

func (*GuildMutation) RolePanelsIDs

func (m *GuildMutation) RolePanelsIDs() (ids []uuid.UUID)

RolePanelsIDs returns the "role_panels" edge IDs in the mutation.

func (*GuildMutation) SetBumpEnabled

func (m *GuildMutation) SetBumpEnabled(b bool)

SetBumpEnabled sets the "bump_enabled" field.

func (*GuildMutation) SetBumpMention

func (m *GuildMutation) SetBumpMention(s snowflake.ID)

SetBumpMention sets the "bump_mention" field.

func (*GuildMutation) SetBumpMessage

func (m *GuildMutation) SetBumpMessage(s string)

SetBumpMessage sets the "bump_message" field.

func (*GuildMutation) SetBumpMessageTitle

func (m *GuildMutation) SetBumpMessageTitle(s string)

SetBumpMessageTitle sets the "bump_message_title" field.

func (*GuildMutation) SetBumpRemindMessage

func (m *GuildMutation) SetBumpRemindMessage(s string)

SetBumpRemindMessage sets the "bump_remind_message" field.

func (*GuildMutation) SetBumpRemindMessageTitle

func (m *GuildMutation) SetBumpRemindMessageTitle(s string)

SetBumpRemindMessageTitle sets the "bump_remind_message_title" 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) SetID

func (m *GuildMutation) SetID(id snowflake.ID)

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

func (*GuildMutation) SetLevelMee6Imported

func (m *GuildMutation) SetLevelMee6Imported(b bool)

SetLevelMee6Imported sets the "level_mee6_imported" field.

func (*GuildMutation) SetLevelRole

func (m *GuildMutation) SetLevelRole(value map[int]snowflake.ID)

SetLevelRole sets the "level_role" field.

func (*GuildMutation) SetLevelUpChannel

func (m *GuildMutation) SetLevelUpChannel(s snowflake.ID)

SetLevelUpChannel sets the "level_up_channel" field.

func (*GuildMutation) SetLevelUpExcludeChannel

func (m *GuildMutation) SetLevelUpExcludeChannel(s []snowflake.ID)

SetLevelUpExcludeChannel sets the "level_up_exclude_channel" field.

func (*GuildMutation) SetLevelUpMessage

func (m *GuildMutation) SetLevelUpMessage(s string)

SetLevelUpMessage sets the "level_up_message" field.

func (*GuildMutation) SetLocale

func (m *GuildMutation) SetLocale(d discord.Locale)

SetLocale sets the "locale" 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(id snowflake.ID)

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

func (*GuildMutation) SetPermissions

func (m *GuildMutation) SetPermissions(value map[snowflake.ID]permissions.Permission)

SetPermissions sets the "permissions" field.

func (*GuildMutation) SetRemindCount

func (m *GuildMutation) SetRemindCount(i int)

SetRemindCount sets the "remind_count" field.

func (*GuildMutation) SetRolePanelEditTimes

func (m *GuildMutation) SetRolePanelEditTimes(t []time.Time)

SetRolePanelEditTimes sets the "role_panel_edit_times" field.

func (*GuildMutation) SetUpEnabled

func (m *GuildMutation) SetUpEnabled(b bool)

SetUpEnabled sets the "up_enabled" field.

func (*GuildMutation) SetUpMention

func (m *GuildMutation) SetUpMention(s snowflake.ID)

SetUpMention sets the "up_mention" field.

func (*GuildMutation) SetUpMessage

func (m *GuildMutation) SetUpMessage(s string)

SetUpMessage sets the "up_message" field.

func (*GuildMutation) SetUpMessageTitle

func (m *GuildMutation) SetUpMessageTitle(s string)

SetUpMessageTitle sets the "up_message_title" field.

func (*GuildMutation) SetUpRemindMessage

func (m *GuildMutation) SetUpRemindMessage(s string)

SetUpRemindMessage sets the "up_remind_message" field.

func (*GuildMutation) SetUpRemindMessageTitle

func (m *GuildMutation) SetUpRemindMessageTitle(s string)

SetUpRemindMessageTitle sets the "up_remind_message_title" field.

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

func (m *GuildMutation) UpEnabled() (r bool, exists bool)

UpEnabled returns the value of the "up_enabled" field in the mutation.

func (*GuildMutation) UpMention

func (m *GuildMutation) UpMention() (r snowflake.ID, exists bool)

UpMention returns the value of the "up_mention" field in the mutation.

func (*GuildMutation) UpMentionCleared

func (m *GuildMutation) UpMentionCleared() bool

UpMentionCleared returns if the "up_mention" field was cleared in this mutation.

func (*GuildMutation) UpMessage

func (m *GuildMutation) UpMessage() (r string, exists bool)

UpMessage returns the value of the "up_message" field in the mutation.

func (*GuildMutation) UpMessageTitle

func (m *GuildMutation) UpMessageTitle() (r string, exists bool)

UpMessageTitle returns the value of the "up_message_title" field in the mutation.

func (*GuildMutation) UpRemindMessage

func (m *GuildMutation) UpRemindMessage() (r string, exists bool)

UpRemindMessage returns the value of the "up_remind_message" field in the mutation.

func (*GuildMutation) UpRemindMessageTitle

func (m *GuildMutation) UpRemindMessageTitle() (r string, exists bool)

UpRemindMessageTitle returns the value of the "up_remind_message_title" 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 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) 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) 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 snowflake.ID, 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) snowflake.ID

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

client.Guild.Query().
	GroupBy(guild.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GuildQuery) IDs

func (gq *GuildQuery) IDs(ctx context.Context) (ids []snowflake.ID, err error)

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

func (*GuildQuery) IDsX

func (gq *GuildQuery) IDsX(ctx context.Context) []snowflake.ID

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 snowflake.ID, 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) snowflake.ID

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

func (gq *GuildQuery) QueryMembers() *MemberQuery

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

func (*GuildQuery) QueryMessagePins

func (gq *GuildQuery) QueryMessagePins() *MessagePinQuery

QueryMessagePins chains the current query on the "message_pins" edge.

func (*GuildQuery) QueryOwner

func (gq *GuildQuery) QueryOwner() *UserQuery

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

func (*GuildQuery) QueryReminds

func (gq *GuildQuery) QueryReminds() *MessageRemindQuery

QueryReminds chains the current query on the "reminds" edge.

func (*GuildQuery) QueryRolePanelEdits

func (gq *GuildQuery) QueryRolePanelEdits() *RolePanelEditQuery

QueryRolePanelEdits chains the current query on the "role_panel_edits" edge.

func (*GuildQuery) QueryRolePanelPlacements

func (gq *GuildQuery) QueryRolePanelPlacements() *RolePanelPlacedQuery

QueryRolePanelPlacements chains the current query on the "role_panel_placements" edge.

func (*GuildQuery) QueryRolePanels

func (gq *GuildQuery) QueryRolePanels() *RolePanelQuery

QueryRolePanels chains the current query on the "role_panels" 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 {
	Name string `json:"name,omitempty"`
}

client.Guild.Query().
	Select(guild.FieldName).
	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) WithMembers

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

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

func (*GuildQuery) WithMessagePins

func (gq *GuildQuery) WithMessagePins(opts ...func(*MessagePinQuery)) *GuildQuery

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

func (*GuildQuery) WithOwner

func (gq *GuildQuery) WithOwner(opts ...func(*UserQuery)) *GuildQuery

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

func (*GuildQuery) WithReminds

func (gq *GuildQuery) WithReminds(opts ...func(*MessageRemindQuery)) *GuildQuery

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

func (*GuildQuery) WithRolePanelEdits

func (gq *GuildQuery) WithRolePanelEdits(opts ...func(*RolePanelEditQuery)) *GuildQuery

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

func (*GuildQuery) WithRolePanelPlacements

func (gq *GuildQuery) WithRolePanelPlacements(opts ...func(*RolePanelPlacedQuery)) *GuildQuery

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

func (*GuildQuery) WithRolePanels

func (gq *GuildQuery) WithRolePanels(opts ...func(*RolePanelQuery)) *GuildQuery

WithRolePanels tells the query-builder to eager-load the nodes that are connected to the "role_panels" edge. 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) AddBumpMention

func (gu *GuildUpdate) AddBumpMention(s snowflake.ID) *GuildUpdate

AddBumpMention adds s to the "bump_mention" field.

func (*GuildUpdate) AddLevelUpChannel

func (gu *GuildUpdate) AddLevelUpChannel(s snowflake.ID) *GuildUpdate

AddLevelUpChannel adds s to the "level_up_channel" field.

func (*GuildUpdate) AddMemberIDs

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

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

func (*GuildUpdate) AddMembers

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

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

func (*GuildUpdate) AddMessagePinIDs

func (gu *GuildUpdate) AddMessagePinIDs(ids ...uuid.UUID) *GuildUpdate

AddMessagePinIDs adds the "message_pins" edge to the MessagePin entity by IDs.

func (*GuildUpdate) AddMessagePins

func (gu *GuildUpdate) AddMessagePins(m ...*MessagePin) *GuildUpdate

AddMessagePins adds the "message_pins" edges to the MessagePin entity.

func (*GuildUpdate) AddRemindCount

func (gu *GuildUpdate) AddRemindCount(i int) *GuildUpdate

AddRemindCount adds i to the "remind_count" field.

func (*GuildUpdate) AddRemindIDs

func (gu *GuildUpdate) AddRemindIDs(ids ...uuid.UUID) *GuildUpdate

AddRemindIDs adds the "reminds" edge to the MessageRemind entity by IDs.

func (*GuildUpdate) AddReminds

func (gu *GuildUpdate) AddReminds(m ...*MessageRemind) *GuildUpdate

AddReminds adds the "reminds" edges to the MessageRemind entity.

func (*GuildUpdate) AddRolePanelEditIDs

func (gu *GuildUpdate) AddRolePanelEditIDs(ids ...uuid.UUID) *GuildUpdate

AddRolePanelEditIDs adds the "role_panel_edits" edge to the RolePanelEdit entity by IDs.

func (*GuildUpdate) AddRolePanelEdits

func (gu *GuildUpdate) AddRolePanelEdits(r ...*RolePanelEdit) *GuildUpdate

AddRolePanelEdits adds the "role_panel_edits" edges to the RolePanelEdit entity.

func (*GuildUpdate) AddRolePanelIDs

func (gu *GuildUpdate) AddRolePanelIDs(ids ...uuid.UUID) *GuildUpdate

AddRolePanelIDs adds the "role_panels" edge to the RolePanel entity by IDs.

func (*GuildUpdate) AddRolePanelPlacementIDs

func (gu *GuildUpdate) AddRolePanelPlacementIDs(ids ...uuid.UUID) *GuildUpdate

AddRolePanelPlacementIDs adds the "role_panel_placements" edge to the RolePanelPlaced entity by IDs.

func (*GuildUpdate) AddRolePanelPlacements

func (gu *GuildUpdate) AddRolePanelPlacements(r ...*RolePanelPlaced) *GuildUpdate

AddRolePanelPlacements adds the "role_panel_placements" edges to the RolePanelPlaced entity.

func (*GuildUpdate) AddRolePanels

func (gu *GuildUpdate) AddRolePanels(r ...*RolePanel) *GuildUpdate

AddRolePanels adds the "role_panels" edges to the RolePanel entity.

func (*GuildUpdate) AddUpMention

func (gu *GuildUpdate) AddUpMention(s snowflake.ID) *GuildUpdate

AddUpMention adds s to the "up_mention" field.

func (*GuildUpdate) AppendLevelUpExcludeChannel

func (gu *GuildUpdate) AppendLevelUpExcludeChannel(s []snowflake.ID) *GuildUpdate

AppendLevelUpExcludeChannel appends s to the "level_up_exclude_channel" field.

func (*GuildUpdate) AppendRolePanelEditTimes

func (gu *GuildUpdate) AppendRolePanelEditTimes(t []time.Time) *GuildUpdate

AppendRolePanelEditTimes appends t to the "role_panel_edit_times" field.

func (*GuildUpdate) ClearBumpMention

func (gu *GuildUpdate) ClearBumpMention() *GuildUpdate

ClearBumpMention clears the value of the "bump_mention" field.

func (*GuildUpdate) ClearLevelRole

func (gu *GuildUpdate) ClearLevelRole() *GuildUpdate

ClearLevelRole clears the value of the "level_role" field.

func (*GuildUpdate) ClearLevelUpChannel

func (gu *GuildUpdate) ClearLevelUpChannel() *GuildUpdate

ClearLevelUpChannel clears the value of the "level_up_channel" field.

func (*GuildUpdate) ClearLevelUpExcludeChannel

func (gu *GuildUpdate) ClearLevelUpExcludeChannel() *GuildUpdate

ClearLevelUpExcludeChannel clears the value of the "level_up_exclude_channel" field.

func (*GuildUpdate) ClearMembers

func (gu *GuildUpdate) ClearMembers() *GuildUpdate

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

func (*GuildUpdate) ClearMessagePins

func (gu *GuildUpdate) ClearMessagePins() *GuildUpdate

ClearMessagePins clears all "message_pins" edges to the MessagePin entity.

func (*GuildUpdate) ClearOwner

func (gu *GuildUpdate) ClearOwner() *GuildUpdate

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

func (*GuildUpdate) ClearReminds

func (gu *GuildUpdate) ClearReminds() *GuildUpdate

ClearReminds clears all "reminds" edges to the MessageRemind entity.

func (*GuildUpdate) ClearRolePanelEdits

func (gu *GuildUpdate) ClearRolePanelEdits() *GuildUpdate

ClearRolePanelEdits clears all "role_panel_edits" edges to the RolePanelEdit entity.

func (*GuildUpdate) ClearRolePanelPlacements

func (gu *GuildUpdate) ClearRolePanelPlacements() *GuildUpdate

ClearRolePanelPlacements clears all "role_panel_placements" edges to the RolePanelPlaced entity.

func (*GuildUpdate) ClearRolePanels

func (gu *GuildUpdate) ClearRolePanels() *GuildUpdate

ClearRolePanels clears all "role_panels" edges to the RolePanel entity.

func (*GuildUpdate) ClearUpMention

func (gu *GuildUpdate) ClearUpMention() *GuildUpdate

ClearUpMention clears the value of the "up_mention" 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) RemoveMemberIDs

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

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

func (*GuildUpdate) RemoveMembers

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

RemoveMembers removes "members" edges to Member entities.

func (*GuildUpdate) RemoveMessagePinIDs

func (gu *GuildUpdate) RemoveMessagePinIDs(ids ...uuid.UUID) *GuildUpdate

RemoveMessagePinIDs removes the "message_pins" edge to MessagePin entities by IDs.

func (*GuildUpdate) RemoveMessagePins

func (gu *GuildUpdate) RemoveMessagePins(m ...*MessagePin) *GuildUpdate

RemoveMessagePins removes "message_pins" edges to MessagePin entities.

func (*GuildUpdate) RemoveRemindIDs

func (gu *GuildUpdate) RemoveRemindIDs(ids ...uuid.UUID) *GuildUpdate

RemoveRemindIDs removes the "reminds" edge to MessageRemind entities by IDs.

func (*GuildUpdate) RemoveReminds

func (gu *GuildUpdate) RemoveReminds(m ...*MessageRemind) *GuildUpdate

RemoveReminds removes "reminds" edges to MessageRemind entities.

func (*GuildUpdate) RemoveRolePanelEditIDs

func (gu *GuildUpdate) RemoveRolePanelEditIDs(ids ...uuid.UUID) *GuildUpdate

RemoveRolePanelEditIDs removes the "role_panel_edits" edge to RolePanelEdit entities by IDs.

func (*GuildUpdate) RemoveRolePanelEdits

func (gu *GuildUpdate) RemoveRolePanelEdits(r ...*RolePanelEdit) *GuildUpdate

RemoveRolePanelEdits removes "role_panel_edits" edges to RolePanelEdit entities.

func (*GuildUpdate) RemoveRolePanelIDs

func (gu *GuildUpdate) RemoveRolePanelIDs(ids ...uuid.UUID) *GuildUpdate

RemoveRolePanelIDs removes the "role_panels" edge to RolePanel entities by IDs.

func (*GuildUpdate) RemoveRolePanelPlacementIDs

func (gu *GuildUpdate) RemoveRolePanelPlacementIDs(ids ...uuid.UUID) *GuildUpdate

RemoveRolePanelPlacementIDs removes the "role_panel_placements" edge to RolePanelPlaced entities by IDs.

func (*GuildUpdate) RemoveRolePanelPlacements

func (gu *GuildUpdate) RemoveRolePanelPlacements(r ...*RolePanelPlaced) *GuildUpdate

RemoveRolePanelPlacements removes "role_panel_placements" edges to RolePanelPlaced entities.

func (*GuildUpdate) RemoveRolePanels

func (gu *GuildUpdate) RemoveRolePanels(r ...*RolePanel) *GuildUpdate

RemoveRolePanels removes "role_panels" edges to RolePanel 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) SetBumpEnabled

func (gu *GuildUpdate) SetBumpEnabled(b bool) *GuildUpdate

SetBumpEnabled sets the "bump_enabled" field.

func (*GuildUpdate) SetBumpMention

func (gu *GuildUpdate) SetBumpMention(s snowflake.ID) *GuildUpdate

SetBumpMention sets the "bump_mention" field.

func (*GuildUpdate) SetBumpMessage

func (gu *GuildUpdate) SetBumpMessage(s string) *GuildUpdate

SetBumpMessage sets the "bump_message" field.

func (*GuildUpdate) SetBumpMessageTitle

func (gu *GuildUpdate) SetBumpMessageTitle(s string) *GuildUpdate

SetBumpMessageTitle sets the "bump_message_title" field.

func (*GuildUpdate) SetBumpRemindMessage

func (gu *GuildUpdate) SetBumpRemindMessage(s string) *GuildUpdate

SetBumpRemindMessage sets the "bump_remind_message" field.

func (*GuildUpdate) SetBumpRemindMessageTitle

func (gu *GuildUpdate) SetBumpRemindMessageTitle(s string) *GuildUpdate

SetBumpRemindMessageTitle sets the "bump_remind_message_title" field.

func (*GuildUpdate) SetLevelMee6Imported

func (gu *GuildUpdate) SetLevelMee6Imported(b bool) *GuildUpdate

SetLevelMee6Imported sets the "level_mee6_imported" field.

func (*GuildUpdate) SetLevelRole

func (gu *GuildUpdate) SetLevelRole(m map[int]snowflake.ID) *GuildUpdate

SetLevelRole sets the "level_role" field.

func (*GuildUpdate) SetLevelUpChannel

func (gu *GuildUpdate) SetLevelUpChannel(s snowflake.ID) *GuildUpdate

SetLevelUpChannel sets the "level_up_channel" field.

func (*GuildUpdate) SetLevelUpExcludeChannel

func (gu *GuildUpdate) SetLevelUpExcludeChannel(s []snowflake.ID) *GuildUpdate

SetLevelUpExcludeChannel sets the "level_up_exclude_channel" field.

func (*GuildUpdate) SetLevelUpMessage

func (gu *GuildUpdate) SetLevelUpMessage(s string) *GuildUpdate

SetLevelUpMessage sets the "level_up_message" field.

func (*GuildUpdate) SetLocale

func (gu *GuildUpdate) SetLocale(d discord.Locale) *GuildUpdate

SetLocale sets the "locale" field.

func (*GuildUpdate) SetName

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

SetName sets the "name" field.

func (*GuildUpdate) SetNillableBumpEnabled

func (gu *GuildUpdate) SetNillableBumpEnabled(b *bool) *GuildUpdate

SetNillableBumpEnabled sets the "bump_enabled" field if the given value is not nil.

func (*GuildUpdate) SetNillableBumpMention

func (gu *GuildUpdate) SetNillableBumpMention(s *snowflake.ID) *GuildUpdate

SetNillableBumpMention sets the "bump_mention" field if the given value is not nil.

func (*GuildUpdate) SetNillableBumpMessage

func (gu *GuildUpdate) SetNillableBumpMessage(s *string) *GuildUpdate

SetNillableBumpMessage sets the "bump_message" field if the given value is not nil.

func (*GuildUpdate) SetNillableBumpMessageTitle

func (gu *GuildUpdate) SetNillableBumpMessageTitle(s *string) *GuildUpdate

SetNillableBumpMessageTitle sets the "bump_message_title" field if the given value is not nil.

func (*GuildUpdate) SetNillableBumpRemindMessage

func (gu *GuildUpdate) SetNillableBumpRemindMessage(s *string) *GuildUpdate

SetNillableBumpRemindMessage sets the "bump_remind_message" field if the given value is not nil.

func (*GuildUpdate) SetNillableBumpRemindMessageTitle

func (gu *GuildUpdate) SetNillableBumpRemindMessageTitle(s *string) *GuildUpdate

SetNillableBumpRemindMessageTitle sets the "bump_remind_message_title" field if the given value is not nil.

func (*GuildUpdate) SetNillableLevelMee6Imported

func (gu *GuildUpdate) SetNillableLevelMee6Imported(b *bool) *GuildUpdate

SetNillableLevelMee6Imported sets the "level_mee6_imported" field if the given value is not nil.

func (*GuildUpdate) SetNillableLevelUpChannel

func (gu *GuildUpdate) SetNillableLevelUpChannel(s *snowflake.ID) *GuildUpdate

SetNillableLevelUpChannel sets the "level_up_channel" field if the given value is not nil.

func (*GuildUpdate) SetNillableLevelUpMessage

func (gu *GuildUpdate) SetNillableLevelUpMessage(s *string) *GuildUpdate

SetNillableLevelUpMessage sets the "level_up_message" field if the given value is not nil.

func (*GuildUpdate) SetNillableLocale

func (gu *GuildUpdate) SetNillableLocale(d *discord.Locale) *GuildUpdate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*GuildUpdate) SetNillableName

func (gu *GuildUpdate) SetNillableName(s *string) *GuildUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*GuildUpdate) SetNillableRemindCount

func (gu *GuildUpdate) SetNillableRemindCount(i *int) *GuildUpdate

SetNillableRemindCount sets the "remind_count" field if the given value is not nil.

func (*GuildUpdate) SetNillableUpEnabled

func (gu *GuildUpdate) SetNillableUpEnabled(b *bool) *GuildUpdate

SetNillableUpEnabled sets the "up_enabled" field if the given value is not nil.

func (*GuildUpdate) SetNillableUpMention

func (gu *GuildUpdate) SetNillableUpMention(s *snowflake.ID) *GuildUpdate

SetNillableUpMention sets the "up_mention" field if the given value is not nil.

func (*GuildUpdate) SetNillableUpMessage

func (gu *GuildUpdate) SetNillableUpMessage(s *string) *GuildUpdate

SetNillableUpMessage sets the "up_message" field if the given value is not nil.

func (*GuildUpdate) SetNillableUpMessageTitle

func (gu *GuildUpdate) SetNillableUpMessageTitle(s *string) *GuildUpdate

SetNillableUpMessageTitle sets the "up_message_title" field if the given value is not nil.

func (*GuildUpdate) SetNillableUpRemindMessage

func (gu *GuildUpdate) SetNillableUpRemindMessage(s *string) *GuildUpdate

SetNillableUpRemindMessage sets the "up_remind_message" field if the given value is not nil.

func (*GuildUpdate) SetNillableUpRemindMessageTitle

func (gu *GuildUpdate) SetNillableUpRemindMessageTitle(s *string) *GuildUpdate

SetNillableUpRemindMessageTitle sets the "up_remind_message_title" field if the given value is not nil.

func (*GuildUpdate) SetOwner

func (gu *GuildUpdate) SetOwner(u *User) *GuildUpdate

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

func (*GuildUpdate) SetOwnerID

func (gu *GuildUpdate) SetOwnerID(id snowflake.ID) *GuildUpdate

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

func (*GuildUpdate) SetPermissions

func (gu *GuildUpdate) SetPermissions(m map[snowflake.ID]permissions.Permission) *GuildUpdate

SetPermissions sets the "permissions" field.

func (*GuildUpdate) SetRemindCount

func (gu *GuildUpdate) SetRemindCount(i int) *GuildUpdate

SetRemindCount sets the "remind_count" field.

func (*GuildUpdate) SetRolePanelEditTimes

func (gu *GuildUpdate) SetRolePanelEditTimes(t []time.Time) *GuildUpdate

SetRolePanelEditTimes sets the "role_panel_edit_times" field.

func (*GuildUpdate) SetUpEnabled

func (gu *GuildUpdate) SetUpEnabled(b bool) *GuildUpdate

SetUpEnabled sets the "up_enabled" field.

func (*GuildUpdate) SetUpMention

func (gu *GuildUpdate) SetUpMention(s snowflake.ID) *GuildUpdate

SetUpMention sets the "up_mention" field.

func (*GuildUpdate) SetUpMessage

func (gu *GuildUpdate) SetUpMessage(s string) *GuildUpdate

SetUpMessage sets the "up_message" field.

func (*GuildUpdate) SetUpMessageTitle

func (gu *GuildUpdate) SetUpMessageTitle(s string) *GuildUpdate

SetUpMessageTitle sets the "up_message_title" field.

func (*GuildUpdate) SetUpRemindMessage

func (gu *GuildUpdate) SetUpRemindMessage(s string) *GuildUpdate

SetUpRemindMessage sets the "up_remind_message" field.

func (*GuildUpdate) SetUpRemindMessageTitle

func (gu *GuildUpdate) SetUpRemindMessageTitle(s string) *GuildUpdate

SetUpRemindMessageTitle sets the "up_remind_message_title" 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) AddBumpMention

func (guo *GuildUpdateOne) AddBumpMention(s snowflake.ID) *GuildUpdateOne

AddBumpMention adds s to the "bump_mention" field.

func (*GuildUpdateOne) AddLevelUpChannel

func (guo *GuildUpdateOne) AddLevelUpChannel(s snowflake.ID) *GuildUpdateOne

AddLevelUpChannel adds s to the "level_up_channel" field.

func (*GuildUpdateOne) AddMemberIDs

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

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

func (*GuildUpdateOne) AddMembers

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

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

func (*GuildUpdateOne) AddMessagePinIDs

func (guo *GuildUpdateOne) AddMessagePinIDs(ids ...uuid.UUID) *GuildUpdateOne

AddMessagePinIDs adds the "message_pins" edge to the MessagePin entity by IDs.

func (*GuildUpdateOne) AddMessagePins

func (guo *GuildUpdateOne) AddMessagePins(m ...*MessagePin) *GuildUpdateOne

AddMessagePins adds the "message_pins" edges to the MessagePin entity.

func (*GuildUpdateOne) AddRemindCount

func (guo *GuildUpdateOne) AddRemindCount(i int) *GuildUpdateOne

AddRemindCount adds i to the "remind_count" field.

func (*GuildUpdateOne) AddRemindIDs

func (guo *GuildUpdateOne) AddRemindIDs(ids ...uuid.UUID) *GuildUpdateOne

AddRemindIDs adds the "reminds" edge to the MessageRemind entity by IDs.

func (*GuildUpdateOne) AddReminds

func (guo *GuildUpdateOne) AddReminds(m ...*MessageRemind) *GuildUpdateOne

AddReminds adds the "reminds" edges to the MessageRemind entity.

func (*GuildUpdateOne) AddRolePanelEditIDs

func (guo *GuildUpdateOne) AddRolePanelEditIDs(ids ...uuid.UUID) *GuildUpdateOne

AddRolePanelEditIDs adds the "role_panel_edits" edge to the RolePanelEdit entity by IDs.

func (*GuildUpdateOne) AddRolePanelEdits

func (guo *GuildUpdateOne) AddRolePanelEdits(r ...*RolePanelEdit) *GuildUpdateOne

AddRolePanelEdits adds the "role_panel_edits" edges to the RolePanelEdit entity.

func (*GuildUpdateOne) AddRolePanelIDs

func (guo *GuildUpdateOne) AddRolePanelIDs(ids ...uuid.UUID) *GuildUpdateOne

AddRolePanelIDs adds the "role_panels" edge to the RolePanel entity by IDs.

func (*GuildUpdateOne) AddRolePanelPlacementIDs

func (guo *GuildUpdateOne) AddRolePanelPlacementIDs(ids ...uuid.UUID) *GuildUpdateOne

AddRolePanelPlacementIDs adds the "role_panel_placements" edge to the RolePanelPlaced entity by IDs.

func (*GuildUpdateOne) AddRolePanelPlacements

func (guo *GuildUpdateOne) AddRolePanelPlacements(r ...*RolePanelPlaced) *GuildUpdateOne

AddRolePanelPlacements adds the "role_panel_placements" edges to the RolePanelPlaced entity.

func (*GuildUpdateOne) AddRolePanels

func (guo *GuildUpdateOne) AddRolePanels(r ...*RolePanel) *GuildUpdateOne

AddRolePanels adds the "role_panels" edges to the RolePanel entity.

func (*GuildUpdateOne) AddUpMention

func (guo *GuildUpdateOne) AddUpMention(s snowflake.ID) *GuildUpdateOne

AddUpMention adds s to the "up_mention" field.

func (*GuildUpdateOne) AppendLevelUpExcludeChannel

func (guo *GuildUpdateOne) AppendLevelUpExcludeChannel(s []snowflake.ID) *GuildUpdateOne

AppendLevelUpExcludeChannel appends s to the "level_up_exclude_channel" field.

func (*GuildUpdateOne) AppendRolePanelEditTimes

func (guo *GuildUpdateOne) AppendRolePanelEditTimes(t []time.Time) *GuildUpdateOne

AppendRolePanelEditTimes appends t to the "role_panel_edit_times" field.

func (*GuildUpdateOne) ClearBumpMention

func (guo *GuildUpdateOne) ClearBumpMention() *GuildUpdateOne

ClearBumpMention clears the value of the "bump_mention" field.

func (*GuildUpdateOne) ClearLevelRole

func (guo *GuildUpdateOne) ClearLevelRole() *GuildUpdateOne

ClearLevelRole clears the value of the "level_role" field.

func (*GuildUpdateOne) ClearLevelUpChannel

func (guo *GuildUpdateOne) ClearLevelUpChannel() *GuildUpdateOne

ClearLevelUpChannel clears the value of the "level_up_channel" field.

func (*GuildUpdateOne) ClearLevelUpExcludeChannel

func (guo *GuildUpdateOne) ClearLevelUpExcludeChannel() *GuildUpdateOne

ClearLevelUpExcludeChannel clears the value of the "level_up_exclude_channel" field.

func (*GuildUpdateOne) ClearMembers

func (guo *GuildUpdateOne) ClearMembers() *GuildUpdateOne

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

func (*GuildUpdateOne) ClearMessagePins

func (guo *GuildUpdateOne) ClearMessagePins() *GuildUpdateOne

ClearMessagePins clears all "message_pins" edges to the MessagePin entity.

func (*GuildUpdateOne) ClearOwner

func (guo *GuildUpdateOne) ClearOwner() *GuildUpdateOne

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

func (*GuildUpdateOne) ClearReminds

func (guo *GuildUpdateOne) ClearReminds() *GuildUpdateOne

ClearReminds clears all "reminds" edges to the MessageRemind entity.

func (*GuildUpdateOne) ClearRolePanelEdits

func (guo *GuildUpdateOne) ClearRolePanelEdits() *GuildUpdateOne

ClearRolePanelEdits clears all "role_panel_edits" edges to the RolePanelEdit entity.

func (*GuildUpdateOne) ClearRolePanelPlacements

func (guo *GuildUpdateOne) ClearRolePanelPlacements() *GuildUpdateOne

ClearRolePanelPlacements clears all "role_panel_placements" edges to the RolePanelPlaced entity.

func (*GuildUpdateOne) ClearRolePanels

func (guo *GuildUpdateOne) ClearRolePanels() *GuildUpdateOne

ClearRolePanels clears all "role_panels" edges to the RolePanel entity.

func (*GuildUpdateOne) ClearUpMention

func (guo *GuildUpdateOne) ClearUpMention() *GuildUpdateOne

ClearUpMention clears the value of the "up_mention" 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) RemoveMemberIDs

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

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

func (*GuildUpdateOne) RemoveMembers

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

RemoveMembers removes "members" edges to Member entities.

func (*GuildUpdateOne) RemoveMessagePinIDs

func (guo *GuildUpdateOne) RemoveMessagePinIDs(ids ...uuid.UUID) *GuildUpdateOne

RemoveMessagePinIDs removes the "message_pins" edge to MessagePin entities by IDs.

func (*GuildUpdateOne) RemoveMessagePins

func (guo *GuildUpdateOne) RemoveMessagePins(m ...*MessagePin) *GuildUpdateOne

RemoveMessagePins removes "message_pins" edges to MessagePin entities.

func (*GuildUpdateOne) RemoveRemindIDs

func (guo *GuildUpdateOne) RemoveRemindIDs(ids ...uuid.UUID) *GuildUpdateOne

RemoveRemindIDs removes the "reminds" edge to MessageRemind entities by IDs.

func (*GuildUpdateOne) RemoveReminds

func (guo *GuildUpdateOne) RemoveReminds(m ...*MessageRemind) *GuildUpdateOne

RemoveReminds removes "reminds" edges to MessageRemind entities.

func (*GuildUpdateOne) RemoveRolePanelEditIDs

func (guo *GuildUpdateOne) RemoveRolePanelEditIDs(ids ...uuid.UUID) *GuildUpdateOne

RemoveRolePanelEditIDs removes the "role_panel_edits" edge to RolePanelEdit entities by IDs.

func (*GuildUpdateOne) RemoveRolePanelEdits

func (guo *GuildUpdateOne) RemoveRolePanelEdits(r ...*RolePanelEdit) *GuildUpdateOne

RemoveRolePanelEdits removes "role_panel_edits" edges to RolePanelEdit entities.

func (*GuildUpdateOne) RemoveRolePanelIDs

func (guo *GuildUpdateOne) RemoveRolePanelIDs(ids ...uuid.UUID) *GuildUpdateOne

RemoveRolePanelIDs removes the "role_panels" edge to RolePanel entities by IDs.

func (*GuildUpdateOne) RemoveRolePanelPlacementIDs

func (guo *GuildUpdateOne) RemoveRolePanelPlacementIDs(ids ...uuid.UUID) *GuildUpdateOne

RemoveRolePanelPlacementIDs removes the "role_panel_placements" edge to RolePanelPlaced entities by IDs.

func (*GuildUpdateOne) RemoveRolePanelPlacements

func (guo *GuildUpdateOne) RemoveRolePanelPlacements(r ...*RolePanelPlaced) *GuildUpdateOne

RemoveRolePanelPlacements removes "role_panel_placements" edges to RolePanelPlaced entities.

func (*GuildUpdateOne) RemoveRolePanels

func (guo *GuildUpdateOne) RemoveRolePanels(r ...*RolePanel) *GuildUpdateOne

RemoveRolePanels removes "role_panels" edges to RolePanel 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) SetBumpEnabled

func (guo *GuildUpdateOne) SetBumpEnabled(b bool) *GuildUpdateOne

SetBumpEnabled sets the "bump_enabled" field.

func (*GuildUpdateOne) SetBumpMention

func (guo *GuildUpdateOne) SetBumpMention(s snowflake.ID) *GuildUpdateOne

SetBumpMention sets the "bump_mention" field.

func (*GuildUpdateOne) SetBumpMessage

func (guo *GuildUpdateOne) SetBumpMessage(s string) *GuildUpdateOne

SetBumpMessage sets the "bump_message" field.

func (*GuildUpdateOne) SetBumpMessageTitle

func (guo *GuildUpdateOne) SetBumpMessageTitle(s string) *GuildUpdateOne

SetBumpMessageTitle sets the "bump_message_title" field.

func (*GuildUpdateOne) SetBumpRemindMessage

func (guo *GuildUpdateOne) SetBumpRemindMessage(s string) *GuildUpdateOne

SetBumpRemindMessage sets the "bump_remind_message" field.

func (*GuildUpdateOne) SetBumpRemindMessageTitle

func (guo *GuildUpdateOne) SetBumpRemindMessageTitle(s string) *GuildUpdateOne

SetBumpRemindMessageTitle sets the "bump_remind_message_title" field.

func (*GuildUpdateOne) SetLevelMee6Imported

func (guo *GuildUpdateOne) SetLevelMee6Imported(b bool) *GuildUpdateOne

SetLevelMee6Imported sets the "level_mee6_imported" field.

func (*GuildUpdateOne) SetLevelRole

func (guo *GuildUpdateOne) SetLevelRole(m map[int]snowflake.ID) *GuildUpdateOne

SetLevelRole sets the "level_role" field.

func (*GuildUpdateOne) SetLevelUpChannel

func (guo *GuildUpdateOne) SetLevelUpChannel(s snowflake.ID) *GuildUpdateOne

SetLevelUpChannel sets the "level_up_channel" field.

func (*GuildUpdateOne) SetLevelUpExcludeChannel

func (guo *GuildUpdateOne) SetLevelUpExcludeChannel(s []snowflake.ID) *GuildUpdateOne

SetLevelUpExcludeChannel sets the "level_up_exclude_channel" field.

func (*GuildUpdateOne) SetLevelUpMessage

func (guo *GuildUpdateOne) SetLevelUpMessage(s string) *GuildUpdateOne

SetLevelUpMessage sets the "level_up_message" field.

func (*GuildUpdateOne) SetLocale

func (guo *GuildUpdateOne) SetLocale(d discord.Locale) *GuildUpdateOne

SetLocale sets the "locale" field.

func (*GuildUpdateOne) SetName

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

SetName sets the "name" field.

func (*GuildUpdateOne) SetNillableBumpEnabled

func (guo *GuildUpdateOne) SetNillableBumpEnabled(b *bool) *GuildUpdateOne

SetNillableBumpEnabled sets the "bump_enabled" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableBumpMention

func (guo *GuildUpdateOne) SetNillableBumpMention(s *snowflake.ID) *GuildUpdateOne

SetNillableBumpMention sets the "bump_mention" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableBumpMessage

func (guo *GuildUpdateOne) SetNillableBumpMessage(s *string) *GuildUpdateOne

SetNillableBumpMessage sets the "bump_message" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableBumpMessageTitle

func (guo *GuildUpdateOne) SetNillableBumpMessageTitle(s *string) *GuildUpdateOne

SetNillableBumpMessageTitle sets the "bump_message_title" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableBumpRemindMessage

func (guo *GuildUpdateOne) SetNillableBumpRemindMessage(s *string) *GuildUpdateOne

SetNillableBumpRemindMessage sets the "bump_remind_message" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableBumpRemindMessageTitle

func (guo *GuildUpdateOne) SetNillableBumpRemindMessageTitle(s *string) *GuildUpdateOne

SetNillableBumpRemindMessageTitle sets the "bump_remind_message_title" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableLevelMee6Imported

func (guo *GuildUpdateOne) SetNillableLevelMee6Imported(b *bool) *GuildUpdateOne

SetNillableLevelMee6Imported sets the "level_mee6_imported" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableLevelUpChannel

func (guo *GuildUpdateOne) SetNillableLevelUpChannel(s *snowflake.ID) *GuildUpdateOne

SetNillableLevelUpChannel sets the "level_up_channel" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableLevelUpMessage

func (guo *GuildUpdateOne) SetNillableLevelUpMessage(s *string) *GuildUpdateOne

SetNillableLevelUpMessage sets the "level_up_message" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableLocale

func (guo *GuildUpdateOne) SetNillableLocale(d *discord.Locale) *GuildUpdateOne

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableName

func (guo *GuildUpdateOne) SetNillableName(s *string) *GuildUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableRemindCount

func (guo *GuildUpdateOne) SetNillableRemindCount(i *int) *GuildUpdateOne

SetNillableRemindCount sets the "remind_count" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableUpEnabled

func (guo *GuildUpdateOne) SetNillableUpEnabled(b *bool) *GuildUpdateOne

SetNillableUpEnabled sets the "up_enabled" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableUpMention

func (guo *GuildUpdateOne) SetNillableUpMention(s *snowflake.ID) *GuildUpdateOne

SetNillableUpMention sets the "up_mention" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableUpMessage

func (guo *GuildUpdateOne) SetNillableUpMessage(s *string) *GuildUpdateOne

SetNillableUpMessage sets the "up_message" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableUpMessageTitle

func (guo *GuildUpdateOne) SetNillableUpMessageTitle(s *string) *GuildUpdateOne

SetNillableUpMessageTitle sets the "up_message_title" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableUpRemindMessage

func (guo *GuildUpdateOne) SetNillableUpRemindMessage(s *string) *GuildUpdateOne

SetNillableUpRemindMessage sets the "up_remind_message" field if the given value is not nil.

func (*GuildUpdateOne) SetNillableUpRemindMessageTitle

func (guo *GuildUpdateOne) SetNillableUpRemindMessageTitle(s *string) *GuildUpdateOne

SetNillableUpRemindMessageTitle sets the "up_remind_message_title" field if the given value is not nil.

func (*GuildUpdateOne) SetOwner

func (guo *GuildUpdateOne) SetOwner(u *User) *GuildUpdateOne

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

func (*GuildUpdateOne) SetOwnerID

func (guo *GuildUpdateOne) SetOwnerID(id snowflake.ID) *GuildUpdateOne

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

func (*GuildUpdateOne) SetPermissions

func (guo *GuildUpdateOne) SetPermissions(m map[snowflake.ID]permissions.Permission) *GuildUpdateOne

SetPermissions sets the "permissions" field.

func (*GuildUpdateOne) SetRemindCount

func (guo *GuildUpdateOne) SetRemindCount(i int) *GuildUpdateOne

SetRemindCount sets the "remind_count" field.

func (*GuildUpdateOne) SetRolePanelEditTimes

func (guo *GuildUpdateOne) SetRolePanelEditTimes(t []time.Time) *GuildUpdateOne

SetRolePanelEditTimes sets the "role_panel_edit_times" field.

func (*GuildUpdateOne) SetUpEnabled

func (guo *GuildUpdateOne) SetUpEnabled(b bool) *GuildUpdateOne

SetUpEnabled sets the "up_enabled" field.

func (*GuildUpdateOne) SetUpMention

func (guo *GuildUpdateOne) SetUpMention(s snowflake.ID) *GuildUpdateOne

SetUpMention sets the "up_mention" field.

func (*GuildUpdateOne) SetUpMessage

func (guo *GuildUpdateOne) SetUpMessage(s string) *GuildUpdateOne

SetUpMessage sets the "up_message" field.

func (*GuildUpdateOne) SetUpMessageTitle

func (guo *GuildUpdateOne) SetUpMessageTitle(s string) *GuildUpdateOne

SetUpMessageTitle sets the "up_message_title" field.

func (*GuildUpdateOne) SetUpRemindMessage

func (guo *GuildUpdateOne) SetUpRemindMessage(s string) *GuildUpdateOne

SetUpRemindMessage sets the "up_remind_message" field.

func (*GuildUpdateOne) SetUpRemindMessageTitle

func (guo *GuildUpdateOne) SetUpRemindMessageTitle(s string) *GuildUpdateOne

SetUpRemindMessageTitle sets the "up_remind_message_title" field.

func (*GuildUpdateOne) Where

func (guo *GuildUpdateOne) Where(ps ...predicate.Guild) *GuildUpdateOne

Where appends a list predicates to the GuildUpdate builder.

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 Member

type Member struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Permission holds the value of the "permission" field.
	Permission permissions.Permission `json:"permission,omitempty"`
	// Xp holds the value of the "xp" field.
	Xp xppoint.XP `json:"xp,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID snowflake.ID `json:"user_id,omitempty"`
	// LastXp holds the value of the "last_xp" field.
	LastXp time.Time `json:"last_xp,omitempty"`
	// MessageCount holds the value of the "message_count" field.
	MessageCount uint64 `json:"message_count,omitempty"`
	// LastNotifiedLevel holds the value of the "last_notified_level" field.
	LastNotifiedLevel *uint64 `json:"last_notified_level,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MemberQuery when eager-loading is set.
	Edges MemberEdges `json:"edges"`
	// contains filtered or unexported fields
}

Member is the model entity for the Member schema.

func (*Member) QueryGuild

func (m *Member) QueryGuild() *GuildQuery

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

func (*Member) QueryUser

func (m *Member) QueryUser() *UserQuery

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

func (*Member) String

func (m *Member) String() string

String implements the fmt.Stringer.

func (*Member) Unwrap

func (m *Member) Unwrap() *Member

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

func (*Member) Update

func (m *Member) Update() *MemberUpdateOne

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

func (*Member) Value

func (m *Member) Value(name string) (ent.Value, error)

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

type MemberClient

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

MemberClient is a client for the Member schema.

func NewMemberClient

func NewMemberClient(c config) *MemberClient

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

func (*MemberClient) Create

func (c *MemberClient) Create() *MemberCreate

Create returns a builder for creating a Member entity.

func (*MemberClient) CreateBulk

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

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

func (*MemberClient) Delete

func (c *MemberClient) Delete() *MemberDelete

Delete returns a delete builder for Member.

func (*MemberClient) DeleteOne

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

DeleteOne returns a builder for deleting the given entity.

func (*MemberClient) DeleteOneID

func (c *MemberClient) DeleteOneID(id int) *MemberDeleteOne

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

func (*MemberClient) Get

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

Get returns a Member entity by its id.

func (*MemberClient) GetX

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

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

func (*MemberClient) Hooks

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

Hooks returns the client hooks.

func (*MemberClient) Intercept

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

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

func (*MemberClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MemberClient) MapCreateBulk

func (c *MemberClient) MapCreateBulk(slice any, setFunc func(*MemberCreate, int)) *MemberCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MemberClient) Query

func (c *MemberClient) Query() *MemberQuery

Query returns a query builder for Member.

func (*MemberClient) QueryGuild

func (c *MemberClient) QueryGuild(m *Member) *GuildQuery

QueryGuild queries the guild edge of a Member.

func (*MemberClient) QueryUser

func (c *MemberClient) QueryUser(m *Member) *UserQuery

QueryUser queries the user edge of a Member.

func (*MemberClient) Update

func (c *MemberClient) Update() *MemberUpdate

Update returns an update builder for Member.

func (*MemberClient) UpdateOne

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

UpdateOne returns an update builder for the given entity.

func (*MemberClient) UpdateOneID

func (c *MemberClient) UpdateOneID(id int) *MemberUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MemberClient) Use

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

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

type MemberCreate

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

MemberCreate is the builder for creating a Member entity.

func (*MemberCreate) Exec

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

Exec executes the query.

func (*MemberCreate) ExecX

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

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

func (*MemberCreate) Mutation

func (mc *MemberCreate) Mutation() *MemberMutation

Mutation returns the MemberMutation object of the builder.

func (*MemberCreate) Save

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

Save creates the Member in the database.

func (*MemberCreate) SaveX

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

SaveX calls Save and panics if Save returns an error.

func (*MemberCreate) SetGuild

func (mc *MemberCreate) SetGuild(g *Guild) *MemberCreate

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

func (*MemberCreate) SetGuildID

func (mc *MemberCreate) SetGuildID(id snowflake.ID) *MemberCreate

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

func (*MemberCreate) SetLastNotifiedLevel

func (mc *MemberCreate) SetLastNotifiedLevel(u uint64) *MemberCreate

SetLastNotifiedLevel sets the "last_notified_level" field.

func (*MemberCreate) SetLastXp

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

SetLastXp sets the "last_xp" field.

func (*MemberCreate) SetMessageCount

func (mc *MemberCreate) SetMessageCount(u uint64) *MemberCreate

SetMessageCount sets the "message_count" field.

func (*MemberCreate) SetNillableLastNotifiedLevel

func (mc *MemberCreate) SetNillableLastNotifiedLevel(u *uint64) *MemberCreate

SetNillableLastNotifiedLevel sets the "last_notified_level" field if the given value is not nil.

func (*MemberCreate) SetNillableLastXp

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

SetNillableLastXp sets the "last_xp" field if the given value is not nil.

func (*MemberCreate) SetNillableMessageCount

func (mc *MemberCreate) SetNillableMessageCount(u *uint64) *MemberCreate

SetNillableMessageCount sets the "message_count" field if the given value is not nil.

func (*MemberCreate) SetNillablePermission

func (mc *MemberCreate) SetNillablePermission(pe *permissions.Permission) *MemberCreate

SetNillablePermission sets the "permission" field if the given value is not nil.

func (*MemberCreate) SetNillableXp

func (mc *MemberCreate) SetNillableXp(x *xppoint.XP) *MemberCreate

SetNillableXp sets the "xp" field if the given value is not nil.

func (*MemberCreate) SetPermission

func (mc *MemberCreate) SetPermission(pe permissions.Permission) *MemberCreate

SetPermission sets the "permission" field.

func (*MemberCreate) SetUser

func (mc *MemberCreate) SetUser(u *User) *MemberCreate

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

func (*MemberCreate) SetUserID

func (mc *MemberCreate) SetUserID(s snowflake.ID) *MemberCreate

SetUserID sets the "user_id" field.

func (*MemberCreate) SetXp

func (mc *MemberCreate) SetXp(x xppoint.XP) *MemberCreate

SetXp sets the "xp" field.

type MemberCreateBulk

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

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

func (*MemberCreateBulk) Exec

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

Exec executes the query.

func (*MemberCreateBulk) ExecX

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

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

func (*MemberCreateBulk) Save

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

Save creates the Member entities in the database.

func (*MemberCreateBulk) SaveX

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

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

type MemberDelete

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

MemberDelete is the builder for deleting a Member entity.

func (*MemberDelete) Exec

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

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

func (*MemberDelete) ExecX

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

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

func (*MemberDelete) Where

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

Where appends a list predicates to the MemberDelete builder.

type MemberDeleteOne

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

MemberDeleteOne is the builder for deleting a single Member entity.

func (*MemberDeleteOne) Exec

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

Exec executes the deletion query.

func (*MemberDeleteOne) ExecX

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

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

func (*MemberDeleteOne) Where

func (mdo *MemberDeleteOne) Where(ps ...predicate.Member) *MemberDeleteOne

Where appends a list predicates to the MemberDelete builder.

type MemberEdges

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

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

func (MemberEdges) GuildOrErr

func (e MemberEdges) 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.

func (MemberEdges) UserOrErr

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

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

type MemberGroupBy

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

MemberGroupBy is the group-by builder for Member entities.

func (*MemberGroupBy) Aggregate

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

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

func (*MemberGroupBy) Bool

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

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

func (*MemberGroupBy) BoolX

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

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

func (*MemberGroupBy) Bools

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

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

func (*MemberGroupBy) BoolsX

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

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

func (*MemberGroupBy) Float64

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

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

func (*MemberGroupBy) Float64X

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

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

func (*MemberGroupBy) Float64s

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

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

func (*MemberGroupBy) Float64sX

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

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

func (*MemberGroupBy) Int

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

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

func (*MemberGroupBy) IntX

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

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

func (*MemberGroupBy) Ints

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

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

func (*MemberGroupBy) IntsX

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

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

func (*MemberGroupBy) Scan

func (mgb *MemberGroupBy) Scan(ctx context.Context, v any) error

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

func (*MemberGroupBy) ScanX

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

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

func (*MemberGroupBy) String

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

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

func (*MemberGroupBy) StringX

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

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

func (*MemberGroupBy) Strings

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

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

func (*MemberGroupBy) StringsX

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

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

type MemberMutation

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

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

func (*MemberMutation) AddField

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

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

func (*MemberMutation) AddLastNotifiedLevel

func (m *MemberMutation) AddLastNotifiedLevel(u int64)

AddLastNotifiedLevel adds u to the "last_notified_level" field.

func (*MemberMutation) AddMessageCount

func (m *MemberMutation) AddMessageCount(u int64)

AddMessageCount adds u to the "message_count" field.

func (*MemberMutation) AddXp

func (m *MemberMutation) AddXp(x xppoint.XP)

AddXp adds x to the "xp" field.

func (*MemberMutation) AddedEdges

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

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

func (*MemberMutation) AddedField

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

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

func (*MemberMutation) AddedFields

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

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

func (*MemberMutation) AddedIDs

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

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

func (*MemberMutation) AddedLastNotifiedLevel

func (m *MemberMutation) AddedLastNotifiedLevel() (r int64, exists bool)

AddedLastNotifiedLevel returns the value that was added to the "last_notified_level" field in this mutation.

func (*MemberMutation) AddedMessageCount

func (m *MemberMutation) AddedMessageCount() (r int64, exists bool)

AddedMessageCount returns the value that was added to the "message_count" field in this mutation.

func (*MemberMutation) AddedXp

func (m *MemberMutation) AddedXp() (r xppoint.XP, exists bool)

AddedXp returns the value that was added to the "xp" field in this mutation.

func (*MemberMutation) ClearEdge

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

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

func (*MemberMutation) ClearField

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

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

func (*MemberMutation) ClearGuild

func (m *MemberMutation) ClearGuild()

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

func (*MemberMutation) ClearLastNotifiedLevel

func (m *MemberMutation) ClearLastNotifiedLevel()

ClearLastNotifiedLevel clears the value of the "last_notified_level" field.

func (*MemberMutation) ClearLastXp

func (m *MemberMutation) ClearLastXp()

ClearLastXp clears the value of the "last_xp" field.

func (*MemberMutation) ClearPermission

func (m *MemberMutation) ClearPermission()

ClearPermission clears the value of the "permission" field.

func (*MemberMutation) ClearUser

func (m *MemberMutation) ClearUser()

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

func (*MemberMutation) ClearedEdges

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

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

func (*MemberMutation) ClearedFields

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

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

func (MemberMutation) Client

func (m MemberMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*MemberMutation) EdgeCleared

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

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

func (*MemberMutation) Field

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

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

func (*MemberMutation) FieldCleared

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

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

func (*MemberMutation) Fields

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

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

func (*MemberMutation) GuildCleared

func (m *MemberMutation) GuildCleared() bool

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

func (*MemberMutation) GuildID

func (m *MemberMutation) GuildID() (id snowflake.ID, exists bool)

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

func (*MemberMutation) GuildIDs

func (m *MemberMutation) GuildIDs() (ids []snowflake.ID)

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 (*MemberMutation) ID

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

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

func (*MemberMutation) IDs

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

func (m *MemberMutation) LastNotifiedLevel() (r uint64, exists bool)

LastNotifiedLevel returns the value of the "last_notified_level" field in the mutation.

func (*MemberMutation) LastNotifiedLevelCleared

func (m *MemberMutation) LastNotifiedLevelCleared() bool

LastNotifiedLevelCleared returns if the "last_notified_level" field was cleared in this mutation.

func (*MemberMutation) LastXp

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

LastXp returns the value of the "last_xp" field in the mutation.

func (*MemberMutation) LastXpCleared

func (m *MemberMutation) LastXpCleared() bool

LastXpCleared returns if the "last_xp" field was cleared in this mutation.

func (*MemberMutation) MessageCount

func (m *MemberMutation) MessageCount() (r uint64, exists bool)

MessageCount returns the value of the "message_count" field in the mutation.

func (*MemberMutation) OldField

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

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

func (*MemberMutation) OldLastNotifiedLevel

func (m *MemberMutation) OldLastNotifiedLevel(ctx context.Context) (v *uint64, err error)

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

func (*MemberMutation) OldLastXp

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

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

func (*MemberMutation) OldMessageCount

func (m *MemberMutation) OldMessageCount(ctx context.Context) (v uint64, err error)

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

func (*MemberMutation) OldPermission

func (m *MemberMutation) OldPermission(ctx context.Context) (v permissions.Permission, err error)

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

func (*MemberMutation) OldUserID

func (m *MemberMutation) OldUserID(ctx context.Context) (v snowflake.ID, err error)

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

func (*MemberMutation) OldXp

func (m *MemberMutation) OldXp(ctx context.Context) (v xppoint.XP, err error)

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

func (*MemberMutation) Op

func (m *MemberMutation) Op() Op

Op returns the operation name.

func (*MemberMutation) Permission

func (m *MemberMutation) Permission() (r permissions.Permission, exists bool)

Permission returns the value of the "permission" field in the mutation.

func (*MemberMutation) PermissionCleared

func (m *MemberMutation) PermissionCleared() bool

PermissionCleared returns if the "permission" field was cleared in this mutation.

func (*MemberMutation) RemovedEdges

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

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

func (*MemberMutation) RemovedIDs

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

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

func (*MemberMutation) ResetEdge

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

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

func (*MemberMutation) ResetField

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

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

func (*MemberMutation) ResetGuild

func (m *MemberMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*MemberMutation) ResetLastNotifiedLevel

func (m *MemberMutation) ResetLastNotifiedLevel()

ResetLastNotifiedLevel resets all changes to the "last_notified_level" field.

func (*MemberMutation) ResetLastXp

func (m *MemberMutation) ResetLastXp()

ResetLastXp resets all changes to the "last_xp" field.

func (*MemberMutation) ResetMessageCount

func (m *MemberMutation) ResetMessageCount()

ResetMessageCount resets all changes to the "message_count" field.

func (*MemberMutation) ResetPermission

func (m *MemberMutation) ResetPermission()

ResetPermission resets all changes to the "permission" field.

func (*MemberMutation) ResetUser

func (m *MemberMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*MemberMutation) ResetUserID

func (m *MemberMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*MemberMutation) ResetXp

func (m *MemberMutation) ResetXp()

ResetXp resets all changes to the "xp" field.

func (*MemberMutation) SetField

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

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

func (*MemberMutation) SetGuildID

func (m *MemberMutation) SetGuildID(id snowflake.ID)

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

func (*MemberMutation) SetLastNotifiedLevel

func (m *MemberMutation) SetLastNotifiedLevel(u uint64)

SetLastNotifiedLevel sets the "last_notified_level" field.

func (*MemberMutation) SetLastXp

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

SetLastXp sets the "last_xp" field.

func (*MemberMutation) SetMessageCount

func (m *MemberMutation) SetMessageCount(u uint64)

SetMessageCount sets the "message_count" field.

func (*MemberMutation) SetOp

func (m *MemberMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MemberMutation) SetPermission

func (m *MemberMutation) SetPermission(pe permissions.Permission)

SetPermission sets the "permission" field.

func (*MemberMutation) SetUserID

func (m *MemberMutation) SetUserID(s snowflake.ID)

SetUserID sets the "user_id" field.

func (*MemberMutation) SetXp

func (m *MemberMutation) SetXp(x xppoint.XP)

SetXp sets the "xp" field.

func (MemberMutation) Tx

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

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

func (*MemberMutation) Type

func (m *MemberMutation) Type() string

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

func (*MemberMutation) UserCleared

func (m *MemberMutation) UserCleared() bool

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

func (*MemberMutation) UserID

func (m *MemberMutation) UserID() (r snowflake.ID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*MemberMutation) UserIDs

func (m *MemberMutation) UserIDs() (ids []snowflake.ID)

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

func (*MemberMutation) Where

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

Where appends a list predicates to the MemberMutation builder.

func (*MemberMutation) WhereP

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

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

func (*MemberMutation) Xp

func (m *MemberMutation) Xp() (r xppoint.XP, exists bool)

Xp returns the value of the "xp" field in the mutation.

type MemberQuery

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

MemberQuery is the builder for querying Member entities.

func (*MemberQuery) Aggregate

func (mq *MemberQuery) Aggregate(fns ...AggregateFunc) *MemberSelect

Aggregate returns a MemberSelect configured with the given aggregations.

func (*MemberQuery) All

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

All executes the query and returns a list of Members.

func (*MemberQuery) AllX

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

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

func (*MemberQuery) Clone

func (mq *MemberQuery) Clone() *MemberQuery

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

func (*MemberQuery) Count

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

Count returns the count of the given query.

func (*MemberQuery) CountX

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

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

func (*MemberQuery) Exist

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

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

func (*MemberQuery) ExistX

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

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

func (*MemberQuery) First

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

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

func (*MemberQuery) FirstID

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

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

func (*MemberQuery) FirstIDX

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

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

func (*MemberQuery) FirstX

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

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

func (*MemberQuery) GroupBy

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

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

Example:

var v []struct {
	Permission permissions.Permission `json:"permission,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Member.Query().
	GroupBy(member.FieldPermission).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MemberQuery) IDs

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

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

func (*MemberQuery) IDsX

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

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

func (*MemberQuery) Limit

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

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

func (*MemberQuery) Offset

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

Offset to start from.

func (*MemberQuery) Only

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

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

func (*MemberQuery) OnlyID

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

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

func (*MemberQuery) OnlyIDX

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

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

func (*MemberQuery) OnlyX

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

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

func (*MemberQuery) Order

func (mq *MemberQuery) Order(o ...member.OrderOption) *MemberQuery

Order specifies how the records should be ordered.

func (*MemberQuery) QueryGuild

func (mq *MemberQuery) QueryGuild() *GuildQuery

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

func (*MemberQuery) QueryUser

func (mq *MemberQuery) QueryUser() *UserQuery

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

func (*MemberQuery) Select

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

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

Example:

var v []struct {
	Permission permissions.Permission `json:"permission,omitempty"`
}

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

func (*MemberQuery) Unique

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

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

func (*MemberQuery) Where

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

Where adds a new predicate for the MemberQuery builder.

func (*MemberQuery) WithGuild

func (mq *MemberQuery) WithGuild(opts ...func(*GuildQuery)) *MemberQuery

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.

func (*MemberQuery) WithUser

func (mq *MemberQuery) WithUser(opts ...func(*UserQuery)) *MemberQuery

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

type MemberSelect

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

MemberSelect is the builder for selecting fields of Member entities.

func (*MemberSelect) Aggregate

func (ms *MemberSelect) Aggregate(fns ...AggregateFunc) *MemberSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MemberSelect) Bool

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

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

func (*MemberSelect) BoolX

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

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

func (*MemberSelect) Bools

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

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

func (*MemberSelect) BoolsX

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

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

func (*MemberSelect) Float64

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

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

func (*MemberSelect) Float64X

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

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

func (*MemberSelect) Float64s

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

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

func (*MemberSelect) Float64sX

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

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

func (*MemberSelect) Int

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

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

func (*MemberSelect) IntX

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

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

func (*MemberSelect) Ints

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

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

func (*MemberSelect) IntsX

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

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

func (*MemberSelect) Scan

func (ms *MemberSelect) Scan(ctx context.Context, v any) error

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

func (*MemberSelect) ScanX

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

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

func (*MemberSelect) String

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

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

func (*MemberSelect) StringX

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

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

func (*MemberSelect) Strings

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

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

func (*MemberSelect) StringsX

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

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

type MemberUpdate

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

MemberUpdate is the builder for updating Member entities.

func (*MemberUpdate) AddLastNotifiedLevel

func (mu *MemberUpdate) AddLastNotifiedLevel(u int64) *MemberUpdate

AddLastNotifiedLevel adds u to the "last_notified_level" field.

func (*MemberUpdate) AddMessageCount

func (mu *MemberUpdate) AddMessageCount(u int64) *MemberUpdate

AddMessageCount adds u to the "message_count" field.

func (*MemberUpdate) AddXp

func (mu *MemberUpdate) AddXp(x xppoint.XP) *MemberUpdate

AddXp adds x to the "xp" field.

func (*MemberUpdate) ClearGuild

func (mu *MemberUpdate) ClearGuild() *MemberUpdate

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

func (*MemberUpdate) ClearLastNotifiedLevel

func (mu *MemberUpdate) ClearLastNotifiedLevel() *MemberUpdate

ClearLastNotifiedLevel clears the value of the "last_notified_level" field.

func (*MemberUpdate) ClearLastXp

func (mu *MemberUpdate) ClearLastXp() *MemberUpdate

ClearLastXp clears the value of the "last_xp" field.

func (*MemberUpdate) ClearPermission

func (mu *MemberUpdate) ClearPermission() *MemberUpdate

ClearPermission clears the value of the "permission" field.

func (*MemberUpdate) Exec

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

Exec executes the query.

func (*MemberUpdate) ExecX

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

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

func (*MemberUpdate) Mutation

func (mu *MemberUpdate) Mutation() *MemberMutation

Mutation returns the MemberMutation object of the builder.

func (*MemberUpdate) Save

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

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

func (*MemberUpdate) SaveX

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

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

func (*MemberUpdate) SetGuild

func (mu *MemberUpdate) SetGuild(g *Guild) *MemberUpdate

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

func (*MemberUpdate) SetGuildID

func (mu *MemberUpdate) SetGuildID(id snowflake.ID) *MemberUpdate

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

func (*MemberUpdate) SetLastNotifiedLevel

func (mu *MemberUpdate) SetLastNotifiedLevel(u uint64) *MemberUpdate

SetLastNotifiedLevel sets the "last_notified_level" field.

func (*MemberUpdate) SetLastXp

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

SetLastXp sets the "last_xp" field.

func (*MemberUpdate) SetMessageCount

func (mu *MemberUpdate) SetMessageCount(u uint64) *MemberUpdate

SetMessageCount sets the "message_count" field.

func (*MemberUpdate) SetNillableLastNotifiedLevel

func (mu *MemberUpdate) SetNillableLastNotifiedLevel(u *uint64) *MemberUpdate

SetNillableLastNotifiedLevel sets the "last_notified_level" field if the given value is not nil.

func (*MemberUpdate) SetNillableLastXp

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

SetNillableLastXp sets the "last_xp" field if the given value is not nil.

func (*MemberUpdate) SetNillableMessageCount

func (mu *MemberUpdate) SetNillableMessageCount(u *uint64) *MemberUpdate

SetNillableMessageCount sets the "message_count" field if the given value is not nil.

func (*MemberUpdate) SetNillablePermission

func (mu *MemberUpdate) SetNillablePermission(pe *permissions.Permission) *MemberUpdate

SetNillablePermission sets the "permission" field if the given value is not nil.

func (*MemberUpdate) SetNillableXp

func (mu *MemberUpdate) SetNillableXp(x *xppoint.XP) *MemberUpdate

SetNillableXp sets the "xp" field if the given value is not nil.

func (*MemberUpdate) SetPermission

func (mu *MemberUpdate) SetPermission(pe permissions.Permission) *MemberUpdate

SetPermission sets the "permission" field.

func (*MemberUpdate) SetXp

func (mu *MemberUpdate) SetXp(x xppoint.XP) *MemberUpdate

SetXp sets the "xp" field.

func (*MemberUpdate) Where

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

Where appends a list predicates to the MemberUpdate builder.

type MemberUpdateOne

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

MemberUpdateOne is the builder for updating a single Member entity.

func (*MemberUpdateOne) AddLastNotifiedLevel

func (muo *MemberUpdateOne) AddLastNotifiedLevel(u int64) *MemberUpdateOne

AddLastNotifiedLevel adds u to the "last_notified_level" field.

func (*MemberUpdateOne) AddMessageCount

func (muo *MemberUpdateOne) AddMessageCount(u int64) *MemberUpdateOne

AddMessageCount adds u to the "message_count" field.

func (*MemberUpdateOne) AddXp

func (muo *MemberUpdateOne) AddXp(x xppoint.XP) *MemberUpdateOne

AddXp adds x to the "xp" field.

func (*MemberUpdateOne) ClearGuild

func (muo *MemberUpdateOne) ClearGuild() *MemberUpdateOne

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

func (*MemberUpdateOne) ClearLastNotifiedLevel

func (muo *MemberUpdateOne) ClearLastNotifiedLevel() *MemberUpdateOne

ClearLastNotifiedLevel clears the value of the "last_notified_level" field.

func (*MemberUpdateOne) ClearLastXp

func (muo *MemberUpdateOne) ClearLastXp() *MemberUpdateOne

ClearLastXp clears the value of the "last_xp" field.

func (*MemberUpdateOne) ClearPermission

func (muo *MemberUpdateOne) ClearPermission() *MemberUpdateOne

ClearPermission clears the value of the "permission" field.

func (*MemberUpdateOne) Exec

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

Exec executes the query on the entity.

func (*MemberUpdateOne) ExecX

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

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

func (*MemberUpdateOne) Mutation

func (muo *MemberUpdateOne) Mutation() *MemberMutation

Mutation returns the MemberMutation object of the builder.

func (*MemberUpdateOne) Save

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

Save executes the query and returns the updated Member entity.

func (*MemberUpdateOne) SaveX

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

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

func (*MemberUpdateOne) Select

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

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

func (*MemberUpdateOne) SetGuild

func (muo *MemberUpdateOne) SetGuild(g *Guild) *MemberUpdateOne

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

func (*MemberUpdateOne) SetGuildID

func (muo *MemberUpdateOne) SetGuildID(id snowflake.ID) *MemberUpdateOne

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

func (*MemberUpdateOne) SetLastNotifiedLevel

func (muo *MemberUpdateOne) SetLastNotifiedLevel(u uint64) *MemberUpdateOne

SetLastNotifiedLevel sets the "last_notified_level" field.

func (*MemberUpdateOne) SetLastXp

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

SetLastXp sets the "last_xp" field.

func (*MemberUpdateOne) SetMessageCount

func (muo *MemberUpdateOne) SetMessageCount(u uint64) *MemberUpdateOne

SetMessageCount sets the "message_count" field.

func (*MemberUpdateOne) SetNillableLastNotifiedLevel

func (muo *MemberUpdateOne) SetNillableLastNotifiedLevel(u *uint64) *MemberUpdateOne

SetNillableLastNotifiedLevel sets the "last_notified_level" field if the given value is not nil.

func (*MemberUpdateOne) SetNillableLastXp

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

SetNillableLastXp sets the "last_xp" field if the given value is not nil.

func (*MemberUpdateOne) SetNillableMessageCount

func (muo *MemberUpdateOne) SetNillableMessageCount(u *uint64) *MemberUpdateOne

SetNillableMessageCount sets the "message_count" field if the given value is not nil.

func (*MemberUpdateOne) SetNillablePermission

func (muo *MemberUpdateOne) SetNillablePermission(pe *permissions.Permission) *MemberUpdateOne

SetNillablePermission sets the "permission" field if the given value is not nil.

func (*MemberUpdateOne) SetNillableXp

func (muo *MemberUpdateOne) SetNillableXp(x *xppoint.XP) *MemberUpdateOne

SetNillableXp sets the "xp" field if the given value is not nil.

func (*MemberUpdateOne) SetPermission

func (muo *MemberUpdateOne) SetPermission(pe permissions.Permission) *MemberUpdateOne

SetPermission sets the "permission" field.

func (*MemberUpdateOne) SetXp

func (muo *MemberUpdateOne) SetXp(x xppoint.XP) *MemberUpdateOne

SetXp sets the "xp" field.

func (*MemberUpdateOne) Where

func (muo *MemberUpdateOne) Where(ps ...predicate.Member) *MemberUpdateOne

Where appends a list predicates to the MemberUpdate builder.

type Members

type Members []*Member

Members is a parsable slice of Member.

type MessagePin

type MessagePin struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ChannelID holds the value of the "channel_id" field.
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
	// Content holds the value of the "content" field.
	Content string `json:"content,omitempty"`
	// Embeds holds the value of the "embeds" field.
	Embeds []discord.Embed `json:"embeds,omitempty"`
	// BeforeID holds the value of the "before_id" field.
	BeforeID *snowflake.ID `json:"before_id,omitempty"`
	// RateLimit holds the value of the "rate_limit" field.
	RateLimit schema.RateLimit `json:"rate_limit,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MessagePinQuery when eager-loading is set.
	Edges MessagePinEdges `json:"edges"`
	// contains filtered or unexported fields
}

MessagePin is the model entity for the MessagePin schema.

func (*MessagePin) QueryGuild

func (mp *MessagePin) QueryGuild() *GuildQuery

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

func (*MessagePin) String

func (mp *MessagePin) String() string

String implements the fmt.Stringer.

func (*MessagePin) Unwrap

func (mp *MessagePin) Unwrap() *MessagePin

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

func (mp *MessagePin) Update() *MessagePinUpdateOne

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

func (*MessagePin) Value

func (mp *MessagePin) Value(name string) (ent.Value, error)

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

type MessagePinClient

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

MessagePinClient is a client for the MessagePin schema.

func NewMessagePinClient

func NewMessagePinClient(c config) *MessagePinClient

NewMessagePinClient returns a client for the MessagePin from the given config.

func (*MessagePinClient) Create

func (c *MessagePinClient) Create() *MessagePinCreate

Create returns a builder for creating a MessagePin entity.

func (*MessagePinClient) CreateBulk

func (c *MessagePinClient) CreateBulk(builders ...*MessagePinCreate) *MessagePinCreateBulk

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

func (*MessagePinClient) Delete

func (c *MessagePinClient) Delete() *MessagePinDelete

Delete returns a delete builder for MessagePin.

func (*MessagePinClient) DeleteOne

func (c *MessagePinClient) DeleteOne(mp *MessagePin) *MessagePinDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MessagePinClient) DeleteOneID

func (c *MessagePinClient) DeleteOneID(id uuid.UUID) *MessagePinDeleteOne

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

func (*MessagePinClient) Get

Get returns a MessagePin entity by its id.

func (*MessagePinClient) GetX

func (c *MessagePinClient) GetX(ctx context.Context, id uuid.UUID) *MessagePin

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

func (*MessagePinClient) Hooks

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

Hooks returns the client hooks.

func (*MessagePinClient) Intercept

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

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

func (*MessagePinClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MessagePinClient) MapCreateBulk

func (c *MessagePinClient) MapCreateBulk(slice any, setFunc func(*MessagePinCreate, int)) *MessagePinCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MessagePinClient) Query

func (c *MessagePinClient) Query() *MessagePinQuery

Query returns a query builder for MessagePin.

func (*MessagePinClient) QueryGuild

func (c *MessagePinClient) QueryGuild(mp *MessagePin) *GuildQuery

QueryGuild queries the guild edge of a MessagePin.

func (*MessagePinClient) Update

func (c *MessagePinClient) Update() *MessagePinUpdate

Update returns an update builder for MessagePin.

func (*MessagePinClient) UpdateOne

func (c *MessagePinClient) UpdateOne(mp *MessagePin) *MessagePinUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MessagePinClient) UpdateOneID

func (c *MessagePinClient) UpdateOneID(id uuid.UUID) *MessagePinUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MessagePinClient) Use

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

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

type MessagePinCreate

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

MessagePinCreate is the builder for creating a MessagePin entity.

func (*MessagePinCreate) Exec

func (mpc *MessagePinCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessagePinCreate) ExecX

func (mpc *MessagePinCreate) ExecX(ctx context.Context)

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

func (*MessagePinCreate) Mutation

func (mpc *MessagePinCreate) Mutation() *MessagePinMutation

Mutation returns the MessagePinMutation object of the builder.

func (*MessagePinCreate) Save

func (mpc *MessagePinCreate) Save(ctx context.Context) (*MessagePin, error)

Save creates the MessagePin in the database.

func (*MessagePinCreate) SaveX

func (mpc *MessagePinCreate) SaveX(ctx context.Context) *MessagePin

SaveX calls Save and panics if Save returns an error.

func (*MessagePinCreate) SetBeforeID

func (mpc *MessagePinCreate) SetBeforeID(s snowflake.ID) *MessagePinCreate

SetBeforeID sets the "before_id" field.

func (*MessagePinCreate) SetChannelID

func (mpc *MessagePinCreate) SetChannelID(s snowflake.ID) *MessagePinCreate

SetChannelID sets the "channel_id" field.

func (*MessagePinCreate) SetContent

func (mpc *MessagePinCreate) SetContent(s string) *MessagePinCreate

SetContent sets the "content" field.

func (*MessagePinCreate) SetEmbeds

func (mpc *MessagePinCreate) SetEmbeds(d []discord.Embed) *MessagePinCreate

SetEmbeds sets the "embeds" field.

func (*MessagePinCreate) SetGuild

func (mpc *MessagePinCreate) SetGuild(g *Guild) *MessagePinCreate

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

func (*MessagePinCreate) SetGuildID

func (mpc *MessagePinCreate) SetGuildID(id snowflake.ID) *MessagePinCreate

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

func (*MessagePinCreate) SetID

func (mpc *MessagePinCreate) SetID(u uuid.UUID) *MessagePinCreate

SetID sets the "id" field.

func (*MessagePinCreate) SetNillableBeforeID

func (mpc *MessagePinCreate) SetNillableBeforeID(s *snowflake.ID) *MessagePinCreate

SetNillableBeforeID sets the "before_id" field if the given value is not nil.

func (*MessagePinCreate) SetNillableContent

func (mpc *MessagePinCreate) SetNillableContent(s *string) *MessagePinCreate

SetNillableContent sets the "content" field if the given value is not nil.

func (*MessagePinCreate) SetNillableID

func (mpc *MessagePinCreate) SetNillableID(u *uuid.UUID) *MessagePinCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*MessagePinCreate) SetNillableRateLimit

func (mpc *MessagePinCreate) SetNillableRateLimit(sl *schema.RateLimit) *MessagePinCreate

SetNillableRateLimit sets the "rate_limit" field if the given value is not nil.

func (*MessagePinCreate) SetRateLimit

func (mpc *MessagePinCreate) SetRateLimit(sl schema.RateLimit) *MessagePinCreate

SetRateLimit sets the "rate_limit" field.

type MessagePinCreateBulk

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

MessagePinCreateBulk is the builder for creating many MessagePin entities in bulk.

func (*MessagePinCreateBulk) Exec

func (mpcb *MessagePinCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MessagePinCreateBulk) ExecX

func (mpcb *MessagePinCreateBulk) ExecX(ctx context.Context)

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

func (*MessagePinCreateBulk) Save

func (mpcb *MessagePinCreateBulk) Save(ctx context.Context) ([]*MessagePin, error)

Save creates the MessagePin entities in the database.

func (*MessagePinCreateBulk) SaveX

func (mpcb *MessagePinCreateBulk) SaveX(ctx context.Context) []*MessagePin

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

type MessagePinDelete

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

MessagePinDelete is the builder for deleting a MessagePin entity.

func (*MessagePinDelete) Exec

func (mpd *MessagePinDelete) Exec(ctx context.Context) (int, error)

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

func (*MessagePinDelete) ExecX

func (mpd *MessagePinDelete) ExecX(ctx context.Context) int

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

func (*MessagePinDelete) Where

Where appends a list predicates to the MessagePinDelete builder.

type MessagePinDeleteOne

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

MessagePinDeleteOne is the builder for deleting a single MessagePin entity.

func (*MessagePinDeleteOne) Exec

func (mpdo *MessagePinDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MessagePinDeleteOne) ExecX

func (mpdo *MessagePinDeleteOne) ExecX(ctx context.Context)

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

func (*MessagePinDeleteOne) Where

Where appends a list predicates to the MessagePinDelete builder.

type MessagePinEdges

type MessagePinEdges struct {
	// Guild holds the value of the guild edge.
	Guild *Guild `json:"guild,omitempty"`
	// contains filtered or unexported fields
}

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

func (MessagePinEdges) GuildOrErr

func (e MessagePinEdges) 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 MessagePinGroupBy

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

MessagePinGroupBy is the group-by builder for MessagePin entities.

func (*MessagePinGroupBy) Aggregate

func (mpgb *MessagePinGroupBy) Aggregate(fns ...AggregateFunc) *MessagePinGroupBy

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

func (*MessagePinGroupBy) Bool

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

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

func (*MessagePinGroupBy) BoolX

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

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

func (*MessagePinGroupBy) Bools

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

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

func (*MessagePinGroupBy) BoolsX

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

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

func (*MessagePinGroupBy) Float64

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

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

func (*MessagePinGroupBy) Float64X

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

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

func (*MessagePinGroupBy) Float64s

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

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

func (*MessagePinGroupBy) Float64sX

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

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

func (*MessagePinGroupBy) Int

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

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

func (*MessagePinGroupBy) IntX

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

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

func (*MessagePinGroupBy) Ints

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

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

func (*MessagePinGroupBy) IntsX

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

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

func (*MessagePinGroupBy) Scan

func (mpgb *MessagePinGroupBy) Scan(ctx context.Context, v any) error

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

func (*MessagePinGroupBy) ScanX

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

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

func (*MessagePinGroupBy) String

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

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

func (*MessagePinGroupBy) StringX

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

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

func (*MessagePinGroupBy) Strings

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

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

func (*MessagePinGroupBy) StringsX

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

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

type MessagePinMutation

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

MessagePinMutation represents an operation that mutates the MessagePin nodes in the graph.

func (*MessagePinMutation) AddBeforeID

func (m *MessagePinMutation) AddBeforeID(s snowflake.ID)

AddBeforeID adds s to the "before_id" field.

func (*MessagePinMutation) AddChannelID

func (m *MessagePinMutation) AddChannelID(s snowflake.ID)

AddChannelID adds s to the "channel_id" field.

func (*MessagePinMutation) AddField

func (m *MessagePinMutation) 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 (*MessagePinMutation) AddedBeforeID

func (m *MessagePinMutation) AddedBeforeID() (r snowflake.ID, exists bool)

AddedBeforeID returns the value that was added to the "before_id" field in this mutation.

func (*MessagePinMutation) AddedChannelID

func (m *MessagePinMutation) AddedChannelID() (r snowflake.ID, exists bool)

AddedChannelID returns the value that was added to the "channel_id" field in this mutation.

func (*MessagePinMutation) AddedEdges

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

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

func (*MessagePinMutation) AddedField

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

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

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

func (*MessagePinMutation) AddedIDs

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

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

func (*MessagePinMutation) AppendEmbeds

func (m *MessagePinMutation) AppendEmbeds(d []discord.Embed)

AppendEmbeds adds d to the "embeds" field.

func (*MessagePinMutation) AppendedEmbeds

func (m *MessagePinMutation) AppendedEmbeds() ([]discord.Embed, bool)

AppendedEmbeds returns the list of values that were appended to the "embeds" field in this mutation.

func (*MessagePinMutation) BeforeID

func (m *MessagePinMutation) BeforeID() (r snowflake.ID, exists bool)

BeforeID returns the value of the "before_id" field in the mutation.

func (*MessagePinMutation) BeforeIDCleared

func (m *MessagePinMutation) BeforeIDCleared() bool

BeforeIDCleared returns if the "before_id" field was cleared in this mutation.

func (*MessagePinMutation) ChannelID

func (m *MessagePinMutation) ChannelID() (r snowflake.ID, exists bool)

ChannelID returns the value of the "channel_id" field in the mutation.

func (*MessagePinMutation) ClearBeforeID

func (m *MessagePinMutation) ClearBeforeID()

ClearBeforeID clears the value of the "before_id" field.

func (*MessagePinMutation) ClearContent

func (m *MessagePinMutation) ClearContent()

ClearContent clears the value of the "content" field.

func (*MessagePinMutation) ClearEdge

func (m *MessagePinMutation) 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 (*MessagePinMutation) ClearEmbeds

func (m *MessagePinMutation) ClearEmbeds()

ClearEmbeds clears the value of the "embeds" field.

func (*MessagePinMutation) ClearField

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

func (m *MessagePinMutation) ClearGuild()

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

func (*MessagePinMutation) ClearedEdges

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

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

func (*MessagePinMutation) ClearedFields

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

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

func (MessagePinMutation) Client

func (m MessagePinMutation) 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 (*MessagePinMutation) Content

func (m *MessagePinMutation) Content() (r string, exists bool)

Content returns the value of the "content" field in the mutation.

func (*MessagePinMutation) ContentCleared

func (m *MessagePinMutation) ContentCleared() bool

ContentCleared returns if the "content" field was cleared in this mutation.

func (*MessagePinMutation) EdgeCleared

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

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

func (*MessagePinMutation) Embeds

func (m *MessagePinMutation) Embeds() (r []discord.Embed, exists bool)

Embeds returns the value of the "embeds" field in the mutation.

func (*MessagePinMutation) EmbedsCleared

func (m *MessagePinMutation) EmbedsCleared() bool

EmbedsCleared returns if the "embeds" field was cleared in this mutation.

func (*MessagePinMutation) Field

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

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

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

func (*MessagePinMutation) Fields

func (m *MessagePinMutation) 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 (*MessagePinMutation) GuildCleared

func (m *MessagePinMutation) GuildCleared() bool

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

func (*MessagePinMutation) GuildID

func (m *MessagePinMutation) GuildID() (id snowflake.ID, exists bool)

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

func (*MessagePinMutation) GuildIDs

func (m *MessagePinMutation) GuildIDs() (ids []snowflake.ID)

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 (*MessagePinMutation) ID

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

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

func (*MessagePinMutation) IDs

func (m *MessagePinMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*MessagePinMutation) OldBeforeID

func (m *MessagePinMutation) OldBeforeID(ctx context.Context) (v *snowflake.ID, err error)

OldBeforeID returns the old "before_id" field's value of the MessagePin entity. If the MessagePin 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 (*MessagePinMutation) OldChannelID

func (m *MessagePinMutation) OldChannelID(ctx context.Context) (v snowflake.ID, err error)

OldChannelID returns the old "channel_id" field's value of the MessagePin entity. If the MessagePin 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 (*MessagePinMutation) OldContent

func (m *MessagePinMutation) OldContent(ctx context.Context) (v string, err error)

OldContent returns the old "content" field's value of the MessagePin entity. If the MessagePin 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 (*MessagePinMutation) OldEmbeds

func (m *MessagePinMutation) OldEmbeds(ctx context.Context) (v []discord.Embed, err error)

OldEmbeds returns the old "embeds" field's value of the MessagePin entity. If the MessagePin 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 (*MessagePinMutation) OldField

func (m *MessagePinMutation) 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 (*MessagePinMutation) OldRateLimit

func (m *MessagePinMutation) OldRateLimit(ctx context.Context) (v schema.RateLimit, err error)

OldRateLimit returns the old "rate_limit" field's value of the MessagePin entity. If the MessagePin 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 (*MessagePinMutation) Op

func (m *MessagePinMutation) Op() Op

Op returns the operation name.

func (*MessagePinMutation) RateLimit

func (m *MessagePinMutation) RateLimit() (r schema.RateLimit, exists bool)

RateLimit returns the value of the "rate_limit" field in the mutation.

func (*MessagePinMutation) RemovedEdges

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

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

func (*MessagePinMutation) RemovedIDs

func (m *MessagePinMutation) 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 (*MessagePinMutation) ResetBeforeID

func (m *MessagePinMutation) ResetBeforeID()

ResetBeforeID resets all changes to the "before_id" field.

func (*MessagePinMutation) ResetChannelID

func (m *MessagePinMutation) ResetChannelID()

ResetChannelID resets all changes to the "channel_id" field.

func (*MessagePinMutation) ResetContent

func (m *MessagePinMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*MessagePinMutation) ResetEdge

func (m *MessagePinMutation) 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 (*MessagePinMutation) ResetEmbeds

func (m *MessagePinMutation) ResetEmbeds()

ResetEmbeds resets all changes to the "embeds" field.

func (*MessagePinMutation) ResetField

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

func (m *MessagePinMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*MessagePinMutation) ResetRateLimit

func (m *MessagePinMutation) ResetRateLimit()

ResetRateLimit resets all changes to the "rate_limit" field.

func (*MessagePinMutation) SetBeforeID

func (m *MessagePinMutation) SetBeforeID(s snowflake.ID)

SetBeforeID sets the "before_id" field.

func (*MessagePinMutation) SetChannelID

func (m *MessagePinMutation) SetChannelID(s snowflake.ID)

SetChannelID sets the "channel_id" field.

func (*MessagePinMutation) SetContent

func (m *MessagePinMutation) SetContent(s string)

SetContent sets the "content" field.

func (*MessagePinMutation) SetEmbeds

func (m *MessagePinMutation) SetEmbeds(d []discord.Embed)

SetEmbeds sets the "embeds" field.

func (*MessagePinMutation) SetField

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

func (m *MessagePinMutation) SetGuildID(id snowflake.ID)

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

func (*MessagePinMutation) SetID

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

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

func (*MessagePinMutation) SetOp

func (m *MessagePinMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MessagePinMutation) SetRateLimit

func (m *MessagePinMutation) SetRateLimit(sl schema.RateLimit)

SetRateLimit sets the "rate_limit" field.

func (MessagePinMutation) Tx

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

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

func (*MessagePinMutation) Type

func (m *MessagePinMutation) Type() string

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

func (*MessagePinMutation) Where

func (m *MessagePinMutation) Where(ps ...predicate.MessagePin)

Where appends a list predicates to the MessagePinMutation builder.

func (*MessagePinMutation) WhereP

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

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

type MessagePinQuery

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

MessagePinQuery is the builder for querying MessagePin entities.

func (*MessagePinQuery) Aggregate

func (mpq *MessagePinQuery) Aggregate(fns ...AggregateFunc) *MessagePinSelect

Aggregate returns a MessagePinSelect configured with the given aggregations.

func (*MessagePinQuery) All

func (mpq *MessagePinQuery) All(ctx context.Context) ([]*MessagePin, error)

All executes the query and returns a list of MessagePins.

func (*MessagePinQuery) AllX

func (mpq *MessagePinQuery) AllX(ctx context.Context) []*MessagePin

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

func (*MessagePinQuery) Clone

func (mpq *MessagePinQuery) Clone() *MessagePinQuery

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

func (*MessagePinQuery) Count

func (mpq *MessagePinQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MessagePinQuery) CountX

func (mpq *MessagePinQuery) CountX(ctx context.Context) int

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

func (*MessagePinQuery) Exist

func (mpq *MessagePinQuery) Exist(ctx context.Context) (bool, error)

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

func (*MessagePinQuery) ExistX

func (mpq *MessagePinQuery) ExistX(ctx context.Context) bool

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

func (*MessagePinQuery) First

func (mpq *MessagePinQuery) First(ctx context.Context) (*MessagePin, error)

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

func (*MessagePinQuery) FirstID

func (mpq *MessagePinQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*MessagePinQuery) FirstIDX

func (mpq *MessagePinQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*MessagePinQuery) FirstX

func (mpq *MessagePinQuery) FirstX(ctx context.Context) *MessagePin

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

func (*MessagePinQuery) GroupBy

func (mpq *MessagePinQuery) GroupBy(field string, fields ...string) *MessagePinGroupBy

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 {
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MessagePin.Query().
	GroupBy(messagepin.FieldChannelID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MessagePinQuery) IDs

func (mpq *MessagePinQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*MessagePinQuery) IDsX

func (mpq *MessagePinQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*MessagePinQuery) Limit

func (mpq *MessagePinQuery) Limit(limit int) *MessagePinQuery

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

func (*MessagePinQuery) Offset

func (mpq *MessagePinQuery) Offset(offset int) *MessagePinQuery

Offset to start from.

func (*MessagePinQuery) Only

func (mpq *MessagePinQuery) Only(ctx context.Context) (*MessagePin, error)

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

func (*MessagePinQuery) OnlyID

func (mpq *MessagePinQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*MessagePinQuery) OnlyIDX

func (mpq *MessagePinQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*MessagePinQuery) OnlyX

func (mpq *MessagePinQuery) OnlyX(ctx context.Context) *MessagePin

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

func (*MessagePinQuery) Order

Order specifies how the records should be ordered.

func (*MessagePinQuery) QueryGuild

func (mpq *MessagePinQuery) QueryGuild() *GuildQuery

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

func (*MessagePinQuery) Select

func (mpq *MessagePinQuery) Select(fields ...string) *MessagePinSelect

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 {
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
}

client.MessagePin.Query().
	Select(messagepin.FieldChannelID).
	Scan(ctx, &v)

func (*MessagePinQuery) Unique

func (mpq *MessagePinQuery) Unique(unique bool) *MessagePinQuery

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

Where adds a new predicate for the MessagePinQuery builder.

func (*MessagePinQuery) WithGuild

func (mpq *MessagePinQuery) WithGuild(opts ...func(*GuildQuery)) *MessagePinQuery

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 MessagePinSelect

type MessagePinSelect struct {
	*MessagePinQuery
	// contains filtered or unexported fields
}

MessagePinSelect is the builder for selecting fields of MessagePin entities.

func (*MessagePinSelect) Aggregate

func (mps *MessagePinSelect) Aggregate(fns ...AggregateFunc) *MessagePinSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MessagePinSelect) Bool

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

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

func (*MessagePinSelect) BoolX

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

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

func (*MessagePinSelect) Bools

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

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

func (*MessagePinSelect) BoolsX

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

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

func (*MessagePinSelect) Float64

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

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

func (*MessagePinSelect) Float64X

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

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

func (*MessagePinSelect) Float64s

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

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

func (*MessagePinSelect) Float64sX

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

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

func (*MessagePinSelect) Int

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

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

func (*MessagePinSelect) IntX

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

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

func (*MessagePinSelect) Ints

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

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

func (*MessagePinSelect) IntsX

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

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

func (*MessagePinSelect) Scan

func (mps *MessagePinSelect) Scan(ctx context.Context, v any) error

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

func (*MessagePinSelect) ScanX

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

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

func (*MessagePinSelect) String

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

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

func (*MessagePinSelect) StringX

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

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

func (*MessagePinSelect) Strings

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

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

func (*MessagePinSelect) StringsX

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

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

type MessagePinUpdate

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

MessagePinUpdate is the builder for updating MessagePin entities.

func (*MessagePinUpdate) AddBeforeID

func (mpu *MessagePinUpdate) AddBeforeID(s snowflake.ID) *MessagePinUpdate

AddBeforeID adds s to the "before_id" field.

func (*MessagePinUpdate) AddChannelID

func (mpu *MessagePinUpdate) AddChannelID(s snowflake.ID) *MessagePinUpdate

AddChannelID adds s to the "channel_id" field.

func (*MessagePinUpdate) AppendEmbeds

func (mpu *MessagePinUpdate) AppendEmbeds(d []discord.Embed) *MessagePinUpdate

AppendEmbeds appends d to the "embeds" field.

func (*MessagePinUpdate) ClearBeforeID

func (mpu *MessagePinUpdate) ClearBeforeID() *MessagePinUpdate

ClearBeforeID clears the value of the "before_id" field.

func (*MessagePinUpdate) ClearContent

func (mpu *MessagePinUpdate) ClearContent() *MessagePinUpdate

ClearContent clears the value of the "content" field.

func (*MessagePinUpdate) ClearEmbeds

func (mpu *MessagePinUpdate) ClearEmbeds() *MessagePinUpdate

ClearEmbeds clears the value of the "embeds" field.

func (*MessagePinUpdate) ClearGuild

func (mpu *MessagePinUpdate) ClearGuild() *MessagePinUpdate

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

func (*MessagePinUpdate) Exec

func (mpu *MessagePinUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessagePinUpdate) ExecX

func (mpu *MessagePinUpdate) ExecX(ctx context.Context)

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

func (*MessagePinUpdate) Mutation

func (mpu *MessagePinUpdate) Mutation() *MessagePinMutation

Mutation returns the MessagePinMutation object of the builder.

func (*MessagePinUpdate) Save

func (mpu *MessagePinUpdate) Save(ctx context.Context) (int, error)

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

func (*MessagePinUpdate) SaveX

func (mpu *MessagePinUpdate) SaveX(ctx context.Context) int

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

func (*MessagePinUpdate) SetBeforeID

func (mpu *MessagePinUpdate) SetBeforeID(s snowflake.ID) *MessagePinUpdate

SetBeforeID sets the "before_id" field.

func (*MessagePinUpdate) SetChannelID

func (mpu *MessagePinUpdate) SetChannelID(s snowflake.ID) *MessagePinUpdate

SetChannelID sets the "channel_id" field.

func (*MessagePinUpdate) SetContent

func (mpu *MessagePinUpdate) SetContent(s string) *MessagePinUpdate

SetContent sets the "content" field.

func (*MessagePinUpdate) SetEmbeds

func (mpu *MessagePinUpdate) SetEmbeds(d []discord.Embed) *MessagePinUpdate

SetEmbeds sets the "embeds" field.

func (*MessagePinUpdate) SetGuild

func (mpu *MessagePinUpdate) SetGuild(g *Guild) *MessagePinUpdate

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

func (*MessagePinUpdate) SetGuildID

func (mpu *MessagePinUpdate) SetGuildID(id snowflake.ID) *MessagePinUpdate

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

func (*MessagePinUpdate) SetNillableBeforeID

func (mpu *MessagePinUpdate) SetNillableBeforeID(s *snowflake.ID) *MessagePinUpdate

SetNillableBeforeID sets the "before_id" field if the given value is not nil.

func (*MessagePinUpdate) SetNillableChannelID

func (mpu *MessagePinUpdate) SetNillableChannelID(s *snowflake.ID) *MessagePinUpdate

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*MessagePinUpdate) SetNillableContent

func (mpu *MessagePinUpdate) SetNillableContent(s *string) *MessagePinUpdate

SetNillableContent sets the "content" field if the given value is not nil.

func (*MessagePinUpdate) SetNillableRateLimit

func (mpu *MessagePinUpdate) SetNillableRateLimit(sl *schema.RateLimit) *MessagePinUpdate

SetNillableRateLimit sets the "rate_limit" field if the given value is not nil.

func (*MessagePinUpdate) SetRateLimit

func (mpu *MessagePinUpdate) SetRateLimit(sl schema.RateLimit) *MessagePinUpdate

SetRateLimit sets the "rate_limit" field.

func (*MessagePinUpdate) Where

Where appends a list predicates to the MessagePinUpdate builder.

type MessagePinUpdateOne

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

MessagePinUpdateOne is the builder for updating a single MessagePin entity.

func (*MessagePinUpdateOne) AddBeforeID

func (mpuo *MessagePinUpdateOne) AddBeforeID(s snowflake.ID) *MessagePinUpdateOne

AddBeforeID adds s to the "before_id" field.

func (*MessagePinUpdateOne) AddChannelID

func (mpuo *MessagePinUpdateOne) AddChannelID(s snowflake.ID) *MessagePinUpdateOne

AddChannelID adds s to the "channel_id" field.

func (*MessagePinUpdateOne) AppendEmbeds

func (mpuo *MessagePinUpdateOne) AppendEmbeds(d []discord.Embed) *MessagePinUpdateOne

AppendEmbeds appends d to the "embeds" field.

func (*MessagePinUpdateOne) ClearBeforeID

func (mpuo *MessagePinUpdateOne) ClearBeforeID() *MessagePinUpdateOne

ClearBeforeID clears the value of the "before_id" field.

func (*MessagePinUpdateOne) ClearContent

func (mpuo *MessagePinUpdateOne) ClearContent() *MessagePinUpdateOne

ClearContent clears the value of the "content" field.

func (*MessagePinUpdateOne) ClearEmbeds

func (mpuo *MessagePinUpdateOne) ClearEmbeds() *MessagePinUpdateOne

ClearEmbeds clears the value of the "embeds" field.

func (*MessagePinUpdateOne) ClearGuild

func (mpuo *MessagePinUpdateOne) ClearGuild() *MessagePinUpdateOne

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

func (*MessagePinUpdateOne) Exec

func (mpuo *MessagePinUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MessagePinUpdateOne) ExecX

func (mpuo *MessagePinUpdateOne) ExecX(ctx context.Context)

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

func (*MessagePinUpdateOne) Mutation

func (mpuo *MessagePinUpdateOne) Mutation() *MessagePinMutation

Mutation returns the MessagePinMutation object of the builder.

func (*MessagePinUpdateOne) Save

func (mpuo *MessagePinUpdateOne) Save(ctx context.Context) (*MessagePin, error)

Save executes the query and returns the updated MessagePin entity.

func (*MessagePinUpdateOne) SaveX

func (mpuo *MessagePinUpdateOne) SaveX(ctx context.Context) *MessagePin

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

func (*MessagePinUpdateOne) Select

func (mpuo *MessagePinUpdateOne) Select(field string, fields ...string) *MessagePinUpdateOne

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

func (*MessagePinUpdateOne) SetBeforeID

func (mpuo *MessagePinUpdateOne) SetBeforeID(s snowflake.ID) *MessagePinUpdateOne

SetBeforeID sets the "before_id" field.

func (*MessagePinUpdateOne) SetChannelID

func (mpuo *MessagePinUpdateOne) SetChannelID(s snowflake.ID) *MessagePinUpdateOne

SetChannelID sets the "channel_id" field.

func (*MessagePinUpdateOne) SetContent

func (mpuo *MessagePinUpdateOne) SetContent(s string) *MessagePinUpdateOne

SetContent sets the "content" field.

func (*MessagePinUpdateOne) SetEmbeds

func (mpuo *MessagePinUpdateOne) SetEmbeds(d []discord.Embed) *MessagePinUpdateOne

SetEmbeds sets the "embeds" field.

func (*MessagePinUpdateOne) SetGuild

func (mpuo *MessagePinUpdateOne) SetGuild(g *Guild) *MessagePinUpdateOne

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

func (*MessagePinUpdateOne) SetGuildID

func (mpuo *MessagePinUpdateOne) SetGuildID(id snowflake.ID) *MessagePinUpdateOne

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

func (*MessagePinUpdateOne) SetNillableBeforeID

func (mpuo *MessagePinUpdateOne) SetNillableBeforeID(s *snowflake.ID) *MessagePinUpdateOne

SetNillableBeforeID sets the "before_id" field if the given value is not nil.

func (*MessagePinUpdateOne) SetNillableChannelID

func (mpuo *MessagePinUpdateOne) SetNillableChannelID(s *snowflake.ID) *MessagePinUpdateOne

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*MessagePinUpdateOne) SetNillableContent

func (mpuo *MessagePinUpdateOne) SetNillableContent(s *string) *MessagePinUpdateOne

SetNillableContent sets the "content" field if the given value is not nil.

func (*MessagePinUpdateOne) SetNillableRateLimit

func (mpuo *MessagePinUpdateOne) SetNillableRateLimit(sl *schema.RateLimit) *MessagePinUpdateOne

SetNillableRateLimit sets the "rate_limit" field if the given value is not nil.

func (*MessagePinUpdateOne) SetRateLimit

func (mpuo *MessagePinUpdateOne) SetRateLimit(sl schema.RateLimit) *MessagePinUpdateOne

SetRateLimit sets the "rate_limit" field.

func (*MessagePinUpdateOne) Where

Where appends a list predicates to the MessagePinUpdate builder.

type MessagePins

type MessagePins []*MessagePin

MessagePins is a parsable slice of MessagePin.

type MessageRemind

type MessageRemind struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ChannelID holds the value of the "channel_id" field.
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
	// AuthorID holds the value of the "author_id" field.
	AuthorID snowflake.ID `json:"author_id,omitempty"`
	// Time holds the value of the "time" field.
	Time time.Time `json:"time,omitempty"`
	// Content holds the value of the "content" field.
	Content string `json:"content,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MessageRemindQuery when eager-loading is set.
	Edges MessageRemindEdges `json:"edges"`
	// contains filtered or unexported fields
}

MessageRemind is the model entity for the MessageRemind schema.

func (*MessageRemind) QueryGuild

func (mr *MessageRemind) QueryGuild() *GuildQuery

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

func (*MessageRemind) String

func (mr *MessageRemind) String() string

String implements the fmt.Stringer.

func (*MessageRemind) Unwrap

func (mr *MessageRemind) Unwrap() *MessageRemind

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

func (mr *MessageRemind) Update() *MessageRemindUpdateOne

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

func (*MessageRemind) Value

func (mr *MessageRemind) Value(name string) (ent.Value, error)

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

type MessageRemindClient

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

MessageRemindClient is a client for the MessageRemind schema.

func NewMessageRemindClient

func NewMessageRemindClient(c config) *MessageRemindClient

NewMessageRemindClient returns a client for the MessageRemind from the given config.

func (*MessageRemindClient) Create

Create returns a builder for creating a MessageRemind entity.

func (*MessageRemindClient) CreateBulk

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

func (*MessageRemindClient) Delete

Delete returns a delete builder for MessageRemind.

func (*MessageRemindClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MessageRemindClient) DeleteOneID

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

func (*MessageRemindClient) Get

Get returns a MessageRemind entity by its id.

func (*MessageRemindClient) GetX

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

func (*MessageRemindClient) Hooks

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

Hooks returns the client hooks.

func (*MessageRemindClient) Intercept

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

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

func (*MessageRemindClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MessageRemindClient) MapCreateBulk

func (c *MessageRemindClient) MapCreateBulk(slice any, setFunc func(*MessageRemindCreate, int)) *MessageRemindCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MessageRemindClient) Query

Query returns a query builder for MessageRemind.

func (*MessageRemindClient) QueryGuild

func (c *MessageRemindClient) QueryGuild(mr *MessageRemind) *GuildQuery

QueryGuild queries the guild edge of a MessageRemind.

func (*MessageRemindClient) Update

Update returns an update builder for MessageRemind.

func (*MessageRemindClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MessageRemindClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*MessageRemindClient) Use

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

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

type MessageRemindCreate

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

MessageRemindCreate is the builder for creating a MessageRemind entity.

func (*MessageRemindCreate) Exec

func (mrc *MessageRemindCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageRemindCreate) ExecX

func (mrc *MessageRemindCreate) ExecX(ctx context.Context)

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

func (*MessageRemindCreate) Mutation

func (mrc *MessageRemindCreate) Mutation() *MessageRemindMutation

Mutation returns the MessageRemindMutation object of the builder.

func (*MessageRemindCreate) Save

Save creates the MessageRemind in the database.

func (*MessageRemindCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MessageRemindCreate) SetAuthorID

func (mrc *MessageRemindCreate) SetAuthorID(s snowflake.ID) *MessageRemindCreate

SetAuthorID sets the "author_id" field.

func (*MessageRemindCreate) SetChannelID

func (mrc *MessageRemindCreate) SetChannelID(s snowflake.ID) *MessageRemindCreate

SetChannelID sets the "channel_id" field.

func (*MessageRemindCreate) SetContent

func (mrc *MessageRemindCreate) SetContent(s string) *MessageRemindCreate

SetContent sets the "content" field.

func (*MessageRemindCreate) SetGuild

func (mrc *MessageRemindCreate) SetGuild(g *Guild) *MessageRemindCreate

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

func (*MessageRemindCreate) SetGuildID

func (mrc *MessageRemindCreate) SetGuildID(id snowflake.ID) *MessageRemindCreate

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

func (*MessageRemindCreate) SetID

SetID sets the "id" field.

func (*MessageRemindCreate) SetName

SetName sets the "name" field.

func (*MessageRemindCreate) SetNillableID

func (mrc *MessageRemindCreate) SetNillableID(u *uuid.UUID) *MessageRemindCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*MessageRemindCreate) SetTime

SetTime sets the "time" field.

type MessageRemindCreateBulk

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

MessageRemindCreateBulk is the builder for creating many MessageRemind entities in bulk.

func (*MessageRemindCreateBulk) Exec

func (mrcb *MessageRemindCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageRemindCreateBulk) ExecX

func (mrcb *MessageRemindCreateBulk) ExecX(ctx context.Context)

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

func (*MessageRemindCreateBulk) Save

Save creates the MessageRemind entities in the database.

func (*MessageRemindCreateBulk) SaveX

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

type MessageRemindDelete

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

MessageRemindDelete is the builder for deleting a MessageRemind entity.

func (*MessageRemindDelete) Exec

func (mrd *MessageRemindDelete) Exec(ctx context.Context) (int, error)

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

func (*MessageRemindDelete) ExecX

func (mrd *MessageRemindDelete) ExecX(ctx context.Context) int

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

func (*MessageRemindDelete) Where

Where appends a list predicates to the MessageRemindDelete builder.

type MessageRemindDeleteOne

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

MessageRemindDeleteOne is the builder for deleting a single MessageRemind entity.

func (*MessageRemindDeleteOne) Exec

func (mrdo *MessageRemindDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MessageRemindDeleteOne) ExecX

func (mrdo *MessageRemindDeleteOne) ExecX(ctx context.Context)

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

func (*MessageRemindDeleteOne) Where

Where appends a list predicates to the MessageRemindDelete builder.

type MessageRemindEdges

type MessageRemindEdges struct {
	// Guild holds the value of the guild edge.
	Guild *Guild `json:"guild,omitempty"`
	// contains filtered or unexported fields
}

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

func (MessageRemindEdges) GuildOrErr

func (e MessageRemindEdges) 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 MessageRemindGroupBy

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

MessageRemindGroupBy is the group-by builder for MessageRemind entities.

func (*MessageRemindGroupBy) Aggregate

func (mrgb *MessageRemindGroupBy) Aggregate(fns ...AggregateFunc) *MessageRemindGroupBy

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

func (*MessageRemindGroupBy) Bool

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

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

func (*MessageRemindGroupBy) BoolX

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

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

func (*MessageRemindGroupBy) Bools

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

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

func (*MessageRemindGroupBy) BoolsX

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

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

func (*MessageRemindGroupBy) Float64

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

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

func (*MessageRemindGroupBy) Float64X

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

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

func (*MessageRemindGroupBy) Float64s

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

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

func (*MessageRemindGroupBy) Float64sX

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

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

func (*MessageRemindGroupBy) Int

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

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

func (*MessageRemindGroupBy) IntX

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

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

func (*MessageRemindGroupBy) Ints

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

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

func (*MessageRemindGroupBy) IntsX

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

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

func (*MessageRemindGroupBy) Scan

func (mrgb *MessageRemindGroupBy) Scan(ctx context.Context, v any) error

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

func (*MessageRemindGroupBy) ScanX

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

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

func (*MessageRemindGroupBy) String

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

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

func (*MessageRemindGroupBy) StringX

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

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

func (*MessageRemindGroupBy) Strings

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

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

func (*MessageRemindGroupBy) StringsX

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

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

type MessageRemindMutation

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

MessageRemindMutation represents an operation that mutates the MessageRemind nodes in the graph.

func (*MessageRemindMutation) AddAuthorID

func (m *MessageRemindMutation) AddAuthorID(s snowflake.ID)

AddAuthorID adds s to the "author_id" field.

func (*MessageRemindMutation) AddChannelID

func (m *MessageRemindMutation) AddChannelID(s snowflake.ID)

AddChannelID adds s to the "channel_id" field.

func (*MessageRemindMutation) AddField

func (m *MessageRemindMutation) 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 (*MessageRemindMutation) AddedAuthorID

func (m *MessageRemindMutation) AddedAuthorID() (r snowflake.ID, exists bool)

AddedAuthorID returns the value that was added to the "author_id" field in this mutation.

func (*MessageRemindMutation) AddedChannelID

func (m *MessageRemindMutation) AddedChannelID() (r snowflake.ID, exists bool)

AddedChannelID returns the value that was added to the "channel_id" field in this mutation.

func (*MessageRemindMutation) AddedEdges

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

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

func (*MessageRemindMutation) AddedField

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

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

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

func (*MessageRemindMutation) AddedIDs

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

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

func (*MessageRemindMutation) AuthorID

func (m *MessageRemindMutation) AuthorID() (r snowflake.ID, exists bool)

AuthorID returns the value of the "author_id" field in the mutation.

func (*MessageRemindMutation) ChannelID

func (m *MessageRemindMutation) ChannelID() (r snowflake.ID, exists bool)

ChannelID returns the value of the "channel_id" field in the mutation.

func (*MessageRemindMutation) ClearEdge

func (m *MessageRemindMutation) 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 (*MessageRemindMutation) ClearField

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

func (m *MessageRemindMutation) ClearGuild()

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

func (*MessageRemindMutation) ClearedEdges

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

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

func (*MessageRemindMutation) ClearedFields

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

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

func (MessageRemindMutation) Client

func (m MessageRemindMutation) 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 (*MessageRemindMutation) Content

func (m *MessageRemindMutation) Content() (r string, exists bool)

Content returns the value of the "content" field in the mutation.

func (*MessageRemindMutation) EdgeCleared

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

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

func (*MessageRemindMutation) Field

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

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

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

func (*MessageRemindMutation) Fields

func (m *MessageRemindMutation) 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 (*MessageRemindMutation) GuildCleared

func (m *MessageRemindMutation) GuildCleared() bool

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

func (*MessageRemindMutation) GuildID

func (m *MessageRemindMutation) GuildID() (id snowflake.ID, exists bool)

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

func (*MessageRemindMutation) GuildIDs

func (m *MessageRemindMutation) GuildIDs() (ids []snowflake.ID)

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 (*MessageRemindMutation) ID

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

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

func (*MessageRemindMutation) 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 (*MessageRemindMutation) Name

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

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

func (*MessageRemindMutation) OldAuthorID

func (m *MessageRemindMutation) OldAuthorID(ctx context.Context) (v snowflake.ID, err error)

OldAuthorID returns the old "author_id" field's value of the MessageRemind entity. If the MessageRemind 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 (*MessageRemindMutation) OldChannelID

func (m *MessageRemindMutation) OldChannelID(ctx context.Context) (v snowflake.ID, err error)

OldChannelID returns the old "channel_id" field's value of the MessageRemind entity. If the MessageRemind 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 (*MessageRemindMutation) OldContent

func (m *MessageRemindMutation) OldContent(ctx context.Context) (v string, err error)

OldContent returns the old "content" field's value of the MessageRemind entity. If the MessageRemind 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 (*MessageRemindMutation) OldField

func (m *MessageRemindMutation) 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 (*MessageRemindMutation) OldName

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

OldName returns the old "name" field's value of the MessageRemind entity. If the MessageRemind 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 (*MessageRemindMutation) OldTime

func (m *MessageRemindMutation) OldTime(ctx context.Context) (v time.Time, err error)

OldTime returns the old "time" field's value of the MessageRemind entity. If the MessageRemind 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 (*MessageRemindMutation) Op

func (m *MessageRemindMutation) Op() Op

Op returns the operation name.

func (*MessageRemindMutation) RemovedEdges

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

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

func (*MessageRemindMutation) RemovedIDs

func (m *MessageRemindMutation) 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 (*MessageRemindMutation) ResetAuthorID

func (m *MessageRemindMutation) ResetAuthorID()

ResetAuthorID resets all changes to the "author_id" field.

func (*MessageRemindMutation) ResetChannelID

func (m *MessageRemindMutation) ResetChannelID()

ResetChannelID resets all changes to the "channel_id" field.

func (*MessageRemindMutation) ResetContent

func (m *MessageRemindMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*MessageRemindMutation) ResetEdge

func (m *MessageRemindMutation) 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 (*MessageRemindMutation) ResetField

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

func (m *MessageRemindMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*MessageRemindMutation) ResetName

func (m *MessageRemindMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*MessageRemindMutation) ResetTime

func (m *MessageRemindMutation) ResetTime()

ResetTime resets all changes to the "time" field.

func (*MessageRemindMutation) SetAuthorID

func (m *MessageRemindMutation) SetAuthorID(s snowflake.ID)

SetAuthorID sets the "author_id" field.

func (*MessageRemindMutation) SetChannelID

func (m *MessageRemindMutation) SetChannelID(s snowflake.ID)

SetChannelID sets the "channel_id" field.

func (*MessageRemindMutation) SetContent

func (m *MessageRemindMutation) SetContent(s string)

SetContent sets the "content" field.

func (*MessageRemindMutation) SetField

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

func (m *MessageRemindMutation) SetGuildID(id snowflake.ID)

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

func (*MessageRemindMutation) SetID

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

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

func (*MessageRemindMutation) SetName

func (m *MessageRemindMutation) SetName(s string)

SetName sets the "name" field.

func (*MessageRemindMutation) SetOp

func (m *MessageRemindMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MessageRemindMutation) SetTime

func (m *MessageRemindMutation) SetTime(t time.Time)

SetTime sets the "time" field.

func (*MessageRemindMutation) Time

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

Time returns the value of the "time" field in the mutation.

func (MessageRemindMutation) Tx

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

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

func (*MessageRemindMutation) Type

func (m *MessageRemindMutation) Type() string

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

func (*MessageRemindMutation) Where

Where appends a list predicates to the MessageRemindMutation builder.

func (*MessageRemindMutation) WhereP

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

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

type MessageRemindQuery

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

MessageRemindQuery is the builder for querying MessageRemind entities.

func (*MessageRemindQuery) Aggregate

func (mrq *MessageRemindQuery) Aggregate(fns ...AggregateFunc) *MessageRemindSelect

Aggregate returns a MessageRemindSelect configured with the given aggregations.

func (*MessageRemindQuery) All

All executes the query and returns a list of MessageReminds.

func (*MessageRemindQuery) AllX

func (mrq *MessageRemindQuery) AllX(ctx context.Context) []*MessageRemind

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

func (*MessageRemindQuery) Clone

func (mrq *MessageRemindQuery) Clone() *MessageRemindQuery

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

func (*MessageRemindQuery) Count

func (mrq *MessageRemindQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MessageRemindQuery) CountX

func (mrq *MessageRemindQuery) CountX(ctx context.Context) int

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

func (*MessageRemindQuery) Exist

func (mrq *MessageRemindQuery) Exist(ctx context.Context) (bool, error)

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

func (*MessageRemindQuery) ExistX

func (mrq *MessageRemindQuery) ExistX(ctx context.Context) bool

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

func (*MessageRemindQuery) First

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

func (*MessageRemindQuery) FirstID

func (mrq *MessageRemindQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*MessageRemindQuery) FirstIDX

func (mrq *MessageRemindQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*MessageRemindQuery) FirstX

func (mrq *MessageRemindQuery) FirstX(ctx context.Context) *MessageRemind

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

func (*MessageRemindQuery) GroupBy

func (mrq *MessageRemindQuery) GroupBy(field string, fields ...string) *MessageRemindGroupBy

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 {
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MessageRemind.Query().
	GroupBy(messageremind.FieldChannelID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MessageRemindQuery) IDs

func (mrq *MessageRemindQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*MessageRemindQuery) IDsX

func (mrq *MessageRemindQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*MessageRemindQuery) Limit

func (mrq *MessageRemindQuery) Limit(limit int) *MessageRemindQuery

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

func (*MessageRemindQuery) Offset

func (mrq *MessageRemindQuery) Offset(offset int) *MessageRemindQuery

Offset to start from.

func (*MessageRemindQuery) Only

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

func (*MessageRemindQuery) OnlyID

func (mrq *MessageRemindQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*MessageRemindQuery) OnlyIDX

func (mrq *MessageRemindQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*MessageRemindQuery) OnlyX

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

func (*MessageRemindQuery) Order

Order specifies how the records should be ordered.

func (*MessageRemindQuery) QueryGuild

func (mrq *MessageRemindQuery) QueryGuild() *GuildQuery

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

func (*MessageRemindQuery) Select

func (mrq *MessageRemindQuery) Select(fields ...string) *MessageRemindSelect

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 {
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
}

client.MessageRemind.Query().
	Select(messageremind.FieldChannelID).
	Scan(ctx, &v)

func (*MessageRemindQuery) Unique

func (mrq *MessageRemindQuery) Unique(unique bool) *MessageRemindQuery

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

Where adds a new predicate for the MessageRemindQuery builder.

func (*MessageRemindQuery) WithGuild

func (mrq *MessageRemindQuery) WithGuild(opts ...func(*GuildQuery)) *MessageRemindQuery

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 MessageRemindSelect

type MessageRemindSelect struct {
	*MessageRemindQuery
	// contains filtered or unexported fields
}

MessageRemindSelect is the builder for selecting fields of MessageRemind entities.

func (*MessageRemindSelect) Aggregate

func (mrs *MessageRemindSelect) Aggregate(fns ...AggregateFunc) *MessageRemindSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MessageRemindSelect) Bool

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

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

func (*MessageRemindSelect) BoolX

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

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

func (*MessageRemindSelect) Bools

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

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

func (*MessageRemindSelect) BoolsX

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

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

func (*MessageRemindSelect) Float64

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

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

func (*MessageRemindSelect) Float64X

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

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

func (*MessageRemindSelect) Float64s

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

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

func (*MessageRemindSelect) Float64sX

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

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

func (*MessageRemindSelect) Int

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

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

func (*MessageRemindSelect) IntX

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

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

func (*MessageRemindSelect) Ints

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

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

func (*MessageRemindSelect) IntsX

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

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

func (*MessageRemindSelect) Scan

func (mrs *MessageRemindSelect) Scan(ctx context.Context, v any) error

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

func (*MessageRemindSelect) ScanX

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

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

func (*MessageRemindSelect) String

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

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

func (*MessageRemindSelect) StringX

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

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

func (*MessageRemindSelect) Strings

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

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

func (*MessageRemindSelect) StringsX

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

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

type MessageRemindUpdate

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

MessageRemindUpdate is the builder for updating MessageRemind entities.

func (*MessageRemindUpdate) AddAuthorID

func (mru *MessageRemindUpdate) AddAuthorID(s snowflake.ID) *MessageRemindUpdate

AddAuthorID adds s to the "author_id" field.

func (*MessageRemindUpdate) AddChannelID

func (mru *MessageRemindUpdate) AddChannelID(s snowflake.ID) *MessageRemindUpdate

AddChannelID adds s to the "channel_id" field.

func (*MessageRemindUpdate) ClearGuild

func (mru *MessageRemindUpdate) ClearGuild() *MessageRemindUpdate

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

func (*MessageRemindUpdate) Exec

func (mru *MessageRemindUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageRemindUpdate) ExecX

func (mru *MessageRemindUpdate) ExecX(ctx context.Context)

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

func (*MessageRemindUpdate) Mutation

func (mru *MessageRemindUpdate) Mutation() *MessageRemindMutation

Mutation returns the MessageRemindMutation object of the builder.

func (*MessageRemindUpdate) Save

func (mru *MessageRemindUpdate) Save(ctx context.Context) (int, error)

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

func (*MessageRemindUpdate) SaveX

func (mru *MessageRemindUpdate) SaveX(ctx context.Context) int

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

func (*MessageRemindUpdate) SetAuthorID

func (mru *MessageRemindUpdate) SetAuthorID(s snowflake.ID) *MessageRemindUpdate

SetAuthorID sets the "author_id" field.

func (*MessageRemindUpdate) SetChannelID

func (mru *MessageRemindUpdate) SetChannelID(s snowflake.ID) *MessageRemindUpdate

SetChannelID sets the "channel_id" field.

func (*MessageRemindUpdate) SetContent

func (mru *MessageRemindUpdate) SetContent(s string) *MessageRemindUpdate

SetContent sets the "content" field.

func (*MessageRemindUpdate) SetGuild

func (mru *MessageRemindUpdate) SetGuild(g *Guild) *MessageRemindUpdate

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

func (*MessageRemindUpdate) SetGuildID

func (mru *MessageRemindUpdate) SetGuildID(id snowflake.ID) *MessageRemindUpdate

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

func (*MessageRemindUpdate) SetName

SetName sets the "name" field.

func (*MessageRemindUpdate) SetNillableAuthorID

func (mru *MessageRemindUpdate) SetNillableAuthorID(s *snowflake.ID) *MessageRemindUpdate

SetNillableAuthorID sets the "author_id" field if the given value is not nil.

func (*MessageRemindUpdate) SetNillableChannelID

func (mru *MessageRemindUpdate) SetNillableChannelID(s *snowflake.ID) *MessageRemindUpdate

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*MessageRemindUpdate) SetNillableContent

func (mru *MessageRemindUpdate) SetNillableContent(s *string) *MessageRemindUpdate

SetNillableContent sets the "content" field if the given value is not nil.

func (*MessageRemindUpdate) SetNillableName

func (mru *MessageRemindUpdate) SetNillableName(s *string) *MessageRemindUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*MessageRemindUpdate) SetNillableTime

func (mru *MessageRemindUpdate) SetNillableTime(t *time.Time) *MessageRemindUpdate

SetNillableTime sets the "time" field if the given value is not nil.

func (*MessageRemindUpdate) SetTime

SetTime sets the "time" field.

func (*MessageRemindUpdate) Where

Where appends a list predicates to the MessageRemindUpdate builder.

type MessageRemindUpdateOne

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

MessageRemindUpdateOne is the builder for updating a single MessageRemind entity.

func (*MessageRemindUpdateOne) AddAuthorID

AddAuthorID adds s to the "author_id" field.

func (*MessageRemindUpdateOne) AddChannelID

AddChannelID adds s to the "channel_id" field.

func (*MessageRemindUpdateOne) ClearGuild

func (mruo *MessageRemindUpdateOne) ClearGuild() *MessageRemindUpdateOne

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

func (*MessageRemindUpdateOne) Exec

func (mruo *MessageRemindUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MessageRemindUpdateOne) ExecX

func (mruo *MessageRemindUpdateOne) ExecX(ctx context.Context)

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

func (*MessageRemindUpdateOne) Mutation

Mutation returns the MessageRemindMutation object of the builder.

func (*MessageRemindUpdateOne) Save

Save executes the query and returns the updated MessageRemind entity.

func (*MessageRemindUpdateOne) SaveX

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

func (*MessageRemindUpdateOne) Select

func (mruo *MessageRemindUpdateOne) Select(field string, fields ...string) *MessageRemindUpdateOne

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

func (*MessageRemindUpdateOne) SetAuthorID

SetAuthorID sets the "author_id" field.

func (*MessageRemindUpdateOne) SetChannelID

SetChannelID sets the "channel_id" field.

func (*MessageRemindUpdateOne) SetContent

SetContent sets the "content" field.

func (*MessageRemindUpdateOne) SetGuild

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

func (*MessageRemindUpdateOne) SetGuildID

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

func (*MessageRemindUpdateOne) SetName

SetName sets the "name" field.

func (*MessageRemindUpdateOne) SetNillableAuthorID

func (mruo *MessageRemindUpdateOne) SetNillableAuthorID(s *snowflake.ID) *MessageRemindUpdateOne

SetNillableAuthorID sets the "author_id" field if the given value is not nil.

func (*MessageRemindUpdateOne) SetNillableChannelID

func (mruo *MessageRemindUpdateOne) SetNillableChannelID(s *snowflake.ID) *MessageRemindUpdateOne

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*MessageRemindUpdateOne) SetNillableContent

func (mruo *MessageRemindUpdateOne) SetNillableContent(s *string) *MessageRemindUpdateOne

SetNillableContent sets the "content" field if the given value is not nil.

func (*MessageRemindUpdateOne) SetNillableName

func (mruo *MessageRemindUpdateOne) SetNillableName(s *string) *MessageRemindUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*MessageRemindUpdateOne) SetNillableTime

func (mruo *MessageRemindUpdateOne) SetNillableTime(t *time.Time) *MessageRemindUpdateOne

SetNillableTime sets the "time" field if the given value is not nil.

func (*MessageRemindUpdateOne) SetTime

SetTime sets the "time" field.

func (*MessageRemindUpdateOne) Where

Where appends a list predicates to the MessageRemindUpdate builder.

type MessageReminds

type MessageReminds []*MessageRemind

MessageReminds is a parsable slice of MessageRemind.

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

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

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

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

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

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 RolePanel

type RolePanel struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Roles holds the value of the "roles" field.
	Roles []schema.Role `json:"roles,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// AppliedAt holds the value of the "applied_at" field.
	AppliedAt time.Time `json:"applied_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RolePanelQuery when eager-loading is set.
	Edges RolePanelEdges `json:"edges"`
	// contains filtered or unexported fields
}

RolePanel is the model entity for the RolePanel schema.

func (*RolePanel) QueryEdit

func (rp *RolePanel) QueryEdit() *RolePanelEditQuery

QueryEdit queries the "edit" edge of the RolePanel entity.

func (*RolePanel) QueryGuild

func (rp *RolePanel) QueryGuild() *GuildQuery

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

func (*RolePanel) QueryPlacements

func (rp *RolePanel) QueryPlacements() *RolePanelPlacedQuery

QueryPlacements queries the "placements" edge of the RolePanel entity.

func (*RolePanel) String

func (rp *RolePanel) String() string

String implements the fmt.Stringer.

func (*RolePanel) Unwrap

func (rp *RolePanel) Unwrap() *RolePanel

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

func (rp *RolePanel) Update() *RolePanelUpdateOne

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

func (*RolePanel) Value

func (rp *RolePanel) Value(name string) (ent.Value, error)

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

type RolePanelClient

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

RolePanelClient is a client for the RolePanel schema.

func NewRolePanelClient

func NewRolePanelClient(c config) *RolePanelClient

NewRolePanelClient returns a client for the RolePanel from the given config.

func (*RolePanelClient) Create

func (c *RolePanelClient) Create() *RolePanelCreate

Create returns a builder for creating a RolePanel entity.

func (*RolePanelClient) CreateBulk

func (c *RolePanelClient) CreateBulk(builders ...*RolePanelCreate) *RolePanelCreateBulk

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

func (*RolePanelClient) Delete

func (c *RolePanelClient) Delete() *RolePanelDelete

Delete returns a delete builder for RolePanel.

func (*RolePanelClient) DeleteOne

func (c *RolePanelClient) DeleteOne(rp *RolePanel) *RolePanelDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RolePanelClient) DeleteOneID

func (c *RolePanelClient) DeleteOneID(id uuid.UUID) *RolePanelDeleteOne

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

func (*RolePanelClient) Get

func (c *RolePanelClient) Get(ctx context.Context, id uuid.UUID) (*RolePanel, error)

Get returns a RolePanel entity by its id.

func (*RolePanelClient) GetX

func (c *RolePanelClient) GetX(ctx context.Context, id uuid.UUID) *RolePanel

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

func (*RolePanelClient) Hooks

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

Hooks returns the client hooks.

func (*RolePanelClient) Intercept

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

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

func (*RolePanelClient) Interceptors

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

Interceptors returns the client interceptors.

func (*RolePanelClient) MapCreateBulk

func (c *RolePanelClient) MapCreateBulk(slice any, setFunc func(*RolePanelCreate, int)) *RolePanelCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*RolePanelClient) Query

func (c *RolePanelClient) Query() *RolePanelQuery

Query returns a query builder for RolePanel.

func (*RolePanelClient) QueryEdit

func (c *RolePanelClient) QueryEdit(rp *RolePanel) *RolePanelEditQuery

QueryEdit queries the edit edge of a RolePanel.

func (*RolePanelClient) QueryGuild

func (c *RolePanelClient) QueryGuild(rp *RolePanel) *GuildQuery

QueryGuild queries the guild edge of a RolePanel.

func (*RolePanelClient) QueryPlacements

func (c *RolePanelClient) QueryPlacements(rp *RolePanel) *RolePanelPlacedQuery

QueryPlacements queries the placements edge of a RolePanel.

func (*RolePanelClient) Update

func (c *RolePanelClient) Update() *RolePanelUpdate

Update returns an update builder for RolePanel.

func (*RolePanelClient) UpdateOne

func (c *RolePanelClient) UpdateOne(rp *RolePanel) *RolePanelUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RolePanelClient) UpdateOneID

func (c *RolePanelClient) UpdateOneID(id uuid.UUID) *RolePanelUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RolePanelClient) Use

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

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

type RolePanelCreate

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

RolePanelCreate is the builder for creating a RolePanel entity.

func (*RolePanelCreate) AddPlacementIDs

func (rpc *RolePanelCreate) AddPlacementIDs(ids ...uuid.UUID) *RolePanelCreate

AddPlacementIDs adds the "placements" edge to the RolePanelPlaced entity by IDs.

func (*RolePanelCreate) AddPlacements

func (rpc *RolePanelCreate) AddPlacements(r ...*RolePanelPlaced) *RolePanelCreate

AddPlacements adds the "placements" edges to the RolePanelPlaced entity.

func (*RolePanelCreate) Exec

func (rpc *RolePanelCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RolePanelCreate) ExecX

func (rpc *RolePanelCreate) ExecX(ctx context.Context)

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

func (*RolePanelCreate) Mutation

func (rpc *RolePanelCreate) Mutation() *RolePanelMutation

Mutation returns the RolePanelMutation object of the builder.

func (*RolePanelCreate) Save

func (rpc *RolePanelCreate) Save(ctx context.Context) (*RolePanel, error)

Save creates the RolePanel in the database.

func (*RolePanelCreate) SaveX

func (rpc *RolePanelCreate) SaveX(ctx context.Context) *RolePanel

SaveX calls Save and panics if Save returns an error.

func (*RolePanelCreate) SetAppliedAt

func (rpc *RolePanelCreate) SetAppliedAt(t time.Time) *RolePanelCreate

SetAppliedAt sets the "applied_at" field.

func (*RolePanelCreate) SetDescription

func (rpc *RolePanelCreate) SetDescription(s string) *RolePanelCreate

SetDescription sets the "description" field.

func (*RolePanelCreate) SetEdit

func (rpc *RolePanelCreate) SetEdit(r *RolePanelEdit) *RolePanelCreate

SetEdit sets the "edit" edge to the RolePanelEdit entity.

func (*RolePanelCreate) SetEditID

func (rpc *RolePanelCreate) SetEditID(id uuid.UUID) *RolePanelCreate

SetEditID sets the "edit" edge to the RolePanelEdit entity by ID.

func (*RolePanelCreate) SetGuild

func (rpc *RolePanelCreate) SetGuild(g *Guild) *RolePanelCreate

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

func (*RolePanelCreate) SetGuildID

func (rpc *RolePanelCreate) SetGuildID(id snowflake.ID) *RolePanelCreate

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

func (*RolePanelCreate) SetID

func (rpc *RolePanelCreate) SetID(u uuid.UUID) *RolePanelCreate

SetID sets the "id" field.

func (*RolePanelCreate) SetName

func (rpc *RolePanelCreate) SetName(s string) *RolePanelCreate

SetName sets the "name" field.

func (*RolePanelCreate) SetNillableAppliedAt

func (rpc *RolePanelCreate) SetNillableAppliedAt(t *time.Time) *RolePanelCreate

SetNillableAppliedAt sets the "applied_at" field if the given value is not nil.

func (*RolePanelCreate) SetNillableEditID

func (rpc *RolePanelCreate) SetNillableEditID(id *uuid.UUID) *RolePanelCreate

SetNillableEditID sets the "edit" edge to the RolePanelEdit entity by ID if the given value is not nil.

func (*RolePanelCreate) SetNillableID

func (rpc *RolePanelCreate) SetNillableID(u *uuid.UUID) *RolePanelCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*RolePanelCreate) SetNillableUpdatedAt

func (rpc *RolePanelCreate) SetNillableUpdatedAt(t *time.Time) *RolePanelCreate

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

func (*RolePanelCreate) SetRoles

func (rpc *RolePanelCreate) SetRoles(s []schema.Role) *RolePanelCreate

SetRoles sets the "roles" field.

func (*RolePanelCreate) SetUpdatedAt

func (rpc *RolePanelCreate) SetUpdatedAt(t time.Time) *RolePanelCreate

SetUpdatedAt sets the "updated_at" field.

type RolePanelCreateBulk

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

RolePanelCreateBulk is the builder for creating many RolePanel entities in bulk.

func (*RolePanelCreateBulk) Exec

func (rpcb *RolePanelCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RolePanelCreateBulk) ExecX

func (rpcb *RolePanelCreateBulk) ExecX(ctx context.Context)

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

func (*RolePanelCreateBulk) Save

func (rpcb *RolePanelCreateBulk) Save(ctx context.Context) ([]*RolePanel, error)

Save creates the RolePanel entities in the database.

func (*RolePanelCreateBulk) SaveX

func (rpcb *RolePanelCreateBulk) SaveX(ctx context.Context) []*RolePanel

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

type RolePanelDelete

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

RolePanelDelete is the builder for deleting a RolePanel entity.

func (*RolePanelDelete) Exec

func (rpd *RolePanelDelete) Exec(ctx context.Context) (int, error)

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

func (*RolePanelDelete) ExecX

func (rpd *RolePanelDelete) ExecX(ctx context.Context) int

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

func (*RolePanelDelete) Where

Where appends a list predicates to the RolePanelDelete builder.

type RolePanelDeleteOne

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

RolePanelDeleteOne is the builder for deleting a single RolePanel entity.

func (*RolePanelDeleteOne) Exec

func (rpdo *RolePanelDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RolePanelDeleteOne) ExecX

func (rpdo *RolePanelDeleteOne) ExecX(ctx context.Context)

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

func (*RolePanelDeleteOne) Where

Where appends a list predicates to the RolePanelDelete builder.

type RolePanelEdges

type RolePanelEdges struct {
	// Guild holds the value of the guild edge.
	Guild *Guild `json:"guild,omitempty"`
	// Placements holds the value of the placements edge.
	Placements []*RolePanelPlaced `json:"placements,omitempty"`
	// Edit holds the value of the edit edge.
	Edit *RolePanelEdit `json:"edit,omitempty"`
	// contains filtered or unexported fields
}

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

func (RolePanelEdges) EditOrErr

func (e RolePanelEdges) EditOrErr() (*RolePanelEdit, error)

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

func (RolePanelEdges) GuildOrErr

func (e RolePanelEdges) 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.

func (RolePanelEdges) PlacementsOrErr

func (e RolePanelEdges) PlacementsOrErr() ([]*RolePanelPlaced, error)

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

type RolePanelEdit

type RolePanelEdit struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ChannelID holds the value of the "channel_id" field.
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
	// EmojiAuthor holds the value of the "emoji_author" field.
	EmojiAuthor *snowflake.ID `json:"emoji_author,omitempty"`
	// Token holds the value of the "token" field.
	Token *string `json:"token,omitempty"`
	// SelectedRole holds the value of the "selected_role" field.
	SelectedRole *snowflake.ID `json:"selected_role,omitempty"`
	// Modified holds the value of the "modified" field.
	Modified bool `json:"modified,omitempty"`
	// Name holds the value of the "name" field.
	Name *string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description *string `json:"description,omitempty"`
	// Roles holds the value of the "roles" field.
	Roles []schema.Role `json:"roles,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RolePanelEditQuery when eager-loading is set.
	Edges RolePanelEditEdges `json:"edges"`
	// contains filtered or unexported fields
}

RolePanelEdit is the model entity for the RolePanelEdit schema.

func (*RolePanelEdit) QueryGuild

func (rpe *RolePanelEdit) QueryGuild() *GuildQuery

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

func (*RolePanelEdit) QueryParent

func (rpe *RolePanelEdit) QueryParent() *RolePanelQuery

QueryParent queries the "parent" edge of the RolePanelEdit entity.

func (*RolePanelEdit) String

func (rpe *RolePanelEdit) String() string

String implements the fmt.Stringer.

func (*RolePanelEdit) Unwrap

func (rpe *RolePanelEdit) Unwrap() *RolePanelEdit

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

func (rpe *RolePanelEdit) Update() *RolePanelEditUpdateOne

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

func (*RolePanelEdit) Value

func (rpe *RolePanelEdit) Value(name string) (ent.Value, error)

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

type RolePanelEditClient

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

RolePanelEditClient is a client for the RolePanelEdit schema.

func NewRolePanelEditClient

func NewRolePanelEditClient(c config) *RolePanelEditClient

NewRolePanelEditClient returns a client for the RolePanelEdit from the given config.

func (*RolePanelEditClient) Create

Create returns a builder for creating a RolePanelEdit entity.

func (*RolePanelEditClient) CreateBulk

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

func (*RolePanelEditClient) Delete

Delete returns a delete builder for RolePanelEdit.

func (*RolePanelEditClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RolePanelEditClient) DeleteOneID

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

func (*RolePanelEditClient) Get

Get returns a RolePanelEdit entity by its id.

func (*RolePanelEditClient) GetX

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

func (*RolePanelEditClient) Hooks

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

Hooks returns the client hooks.

func (*RolePanelEditClient) Intercept

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

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

func (*RolePanelEditClient) Interceptors

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

Interceptors returns the client interceptors.

func (*RolePanelEditClient) MapCreateBulk

func (c *RolePanelEditClient) MapCreateBulk(slice any, setFunc func(*RolePanelEditCreate, int)) *RolePanelEditCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*RolePanelEditClient) Query

Query returns a query builder for RolePanelEdit.

func (*RolePanelEditClient) QueryGuild

func (c *RolePanelEditClient) QueryGuild(rpe *RolePanelEdit) *GuildQuery

QueryGuild queries the guild edge of a RolePanelEdit.

func (*RolePanelEditClient) QueryParent

func (c *RolePanelEditClient) QueryParent(rpe *RolePanelEdit) *RolePanelQuery

QueryParent queries the parent edge of a RolePanelEdit.

func (*RolePanelEditClient) Update

Update returns an update builder for RolePanelEdit.

func (*RolePanelEditClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RolePanelEditClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*RolePanelEditClient) Use

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

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

type RolePanelEditCreate

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

RolePanelEditCreate is the builder for creating a RolePanelEdit entity.

func (*RolePanelEditCreate) Exec

func (rpec *RolePanelEditCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RolePanelEditCreate) ExecX

func (rpec *RolePanelEditCreate) ExecX(ctx context.Context)

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

func (*RolePanelEditCreate) Mutation

func (rpec *RolePanelEditCreate) Mutation() *RolePanelEditMutation

Mutation returns the RolePanelEditMutation object of the builder.

func (*RolePanelEditCreate) Save

Save creates the RolePanelEdit in the database.

func (*RolePanelEditCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*RolePanelEditCreate) SetChannelID

func (rpec *RolePanelEditCreate) SetChannelID(s snowflake.ID) *RolePanelEditCreate

SetChannelID sets the "channel_id" field.

func (*RolePanelEditCreate) SetDescription

func (rpec *RolePanelEditCreate) SetDescription(s string) *RolePanelEditCreate

SetDescription sets the "description" field.

func (*RolePanelEditCreate) SetEmojiAuthor

func (rpec *RolePanelEditCreate) SetEmojiAuthor(s snowflake.ID) *RolePanelEditCreate

SetEmojiAuthor sets the "emoji_author" field.

func (*RolePanelEditCreate) SetGuild

func (rpec *RolePanelEditCreate) SetGuild(g *Guild) *RolePanelEditCreate

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

func (*RolePanelEditCreate) SetGuildID

func (rpec *RolePanelEditCreate) SetGuildID(id snowflake.ID) *RolePanelEditCreate

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

func (*RolePanelEditCreate) SetID

SetID sets the "id" field.

func (*RolePanelEditCreate) SetModified

func (rpec *RolePanelEditCreate) SetModified(b bool) *RolePanelEditCreate

SetModified sets the "modified" field.

func (*RolePanelEditCreate) SetName

SetName sets the "name" field.

func (*RolePanelEditCreate) SetNillableDescription

func (rpec *RolePanelEditCreate) SetNillableDescription(s *string) *RolePanelEditCreate

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

func (*RolePanelEditCreate) SetNillableEmojiAuthor

func (rpec *RolePanelEditCreate) SetNillableEmojiAuthor(s *snowflake.ID) *RolePanelEditCreate

SetNillableEmojiAuthor sets the "emoji_author" field if the given value is not nil.

func (*RolePanelEditCreate) SetNillableID

func (rpec *RolePanelEditCreate) SetNillableID(u *uuid.UUID) *RolePanelEditCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*RolePanelEditCreate) SetNillableModified

func (rpec *RolePanelEditCreate) SetNillableModified(b *bool) *RolePanelEditCreate

SetNillableModified sets the "modified" field if the given value is not nil.

func (*RolePanelEditCreate) SetNillableName

func (rpec *RolePanelEditCreate) SetNillableName(s *string) *RolePanelEditCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*RolePanelEditCreate) SetNillableSelectedRole

func (rpec *RolePanelEditCreate) SetNillableSelectedRole(s *snowflake.ID) *RolePanelEditCreate

SetNillableSelectedRole sets the "selected_role" field if the given value is not nil.

func (*RolePanelEditCreate) SetNillableToken

func (rpec *RolePanelEditCreate) SetNillableToken(s *string) *RolePanelEditCreate

SetNillableToken sets the "token" field if the given value is not nil.

func (*RolePanelEditCreate) SetParent

func (rpec *RolePanelEditCreate) SetParent(r *RolePanel) *RolePanelEditCreate

SetParent sets the "parent" edge to the RolePanel entity.

func (*RolePanelEditCreate) SetParentID

func (rpec *RolePanelEditCreate) SetParentID(id uuid.UUID) *RolePanelEditCreate

SetParentID sets the "parent" edge to the RolePanel entity by ID.

func (*RolePanelEditCreate) SetRoles

func (rpec *RolePanelEditCreate) SetRoles(s []schema.Role) *RolePanelEditCreate

SetRoles sets the "roles" field.

func (*RolePanelEditCreate) SetSelectedRole

func (rpec *RolePanelEditCreate) SetSelectedRole(s snowflake.ID) *RolePanelEditCreate

SetSelectedRole sets the "selected_role" field.

func (*RolePanelEditCreate) SetToken

func (rpec *RolePanelEditCreate) SetToken(s string) *RolePanelEditCreate

SetToken sets the "token" field.

type RolePanelEditCreateBulk

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

RolePanelEditCreateBulk is the builder for creating many RolePanelEdit entities in bulk.

func (*RolePanelEditCreateBulk) Exec

func (rpecb *RolePanelEditCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RolePanelEditCreateBulk) ExecX

func (rpecb *RolePanelEditCreateBulk) ExecX(ctx context.Context)

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

func (*RolePanelEditCreateBulk) Save

Save creates the RolePanelEdit entities in the database.

func (*RolePanelEditCreateBulk) SaveX

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

type RolePanelEditDelete

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

RolePanelEditDelete is the builder for deleting a RolePanelEdit entity.

func (*RolePanelEditDelete) Exec

func (rped *RolePanelEditDelete) Exec(ctx context.Context) (int, error)

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

func (*RolePanelEditDelete) ExecX

func (rped *RolePanelEditDelete) ExecX(ctx context.Context) int

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

func (*RolePanelEditDelete) Where

Where appends a list predicates to the RolePanelEditDelete builder.

type RolePanelEditDeleteOne

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

RolePanelEditDeleteOne is the builder for deleting a single RolePanelEdit entity.

func (*RolePanelEditDeleteOne) Exec

func (rpedo *RolePanelEditDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RolePanelEditDeleteOne) ExecX

func (rpedo *RolePanelEditDeleteOne) ExecX(ctx context.Context)

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

func (*RolePanelEditDeleteOne) Where

Where appends a list predicates to the RolePanelEditDelete builder.

type RolePanelEditEdges

type RolePanelEditEdges struct {
	// Guild holds the value of the guild edge.
	Guild *Guild `json:"guild,omitempty"`
	// Parent holds the value of the parent edge.
	Parent *RolePanel `json:"parent,omitempty"`
	// contains filtered or unexported fields
}

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

func (RolePanelEditEdges) GuildOrErr

func (e RolePanelEditEdges) 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.

func (RolePanelEditEdges) ParentOrErr

func (e RolePanelEditEdges) ParentOrErr() (*RolePanel, error)

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

type RolePanelEditGroupBy

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

RolePanelEditGroupBy is the group-by builder for RolePanelEdit entities.

func (*RolePanelEditGroupBy) Aggregate

func (rpegb *RolePanelEditGroupBy) Aggregate(fns ...AggregateFunc) *RolePanelEditGroupBy

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

func (*RolePanelEditGroupBy) Bool

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

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

func (*RolePanelEditGroupBy) BoolX

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

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

func (*RolePanelEditGroupBy) Bools

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

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

func (*RolePanelEditGroupBy) BoolsX

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

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

func (*RolePanelEditGroupBy) Float64

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

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

func (*RolePanelEditGroupBy) Float64X

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

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

func (*RolePanelEditGroupBy) Float64s

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

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

func (*RolePanelEditGroupBy) Float64sX

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

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

func (*RolePanelEditGroupBy) Int

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

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

func (*RolePanelEditGroupBy) IntX

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

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

func (*RolePanelEditGroupBy) Ints

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

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

func (*RolePanelEditGroupBy) IntsX

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

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

func (*RolePanelEditGroupBy) Scan

func (rpegb *RolePanelEditGroupBy) Scan(ctx context.Context, v any) error

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

func (*RolePanelEditGroupBy) ScanX

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

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

func (*RolePanelEditGroupBy) String

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

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

func (*RolePanelEditGroupBy) StringX

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

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

func (*RolePanelEditGroupBy) Strings

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

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

func (*RolePanelEditGroupBy) StringsX

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

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

type RolePanelEditMutation

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

RolePanelEditMutation represents an operation that mutates the RolePanelEdit nodes in the graph.

func (*RolePanelEditMutation) AddChannelID

func (m *RolePanelEditMutation) AddChannelID(s snowflake.ID)

AddChannelID adds s to the "channel_id" field.

func (*RolePanelEditMutation) AddEmojiAuthor

func (m *RolePanelEditMutation) AddEmojiAuthor(s snowflake.ID)

AddEmojiAuthor adds s to the "emoji_author" field.

func (*RolePanelEditMutation) AddField

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) AddSelectedRole

func (m *RolePanelEditMutation) AddSelectedRole(s snowflake.ID)

AddSelectedRole adds s to the "selected_role" field.

func (*RolePanelEditMutation) AddedChannelID

func (m *RolePanelEditMutation) AddedChannelID() (r snowflake.ID, exists bool)

AddedChannelID returns the value that was added to the "channel_id" field in this mutation.

func (*RolePanelEditMutation) AddedEdges

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

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

func (*RolePanelEditMutation) AddedEmojiAuthor

func (m *RolePanelEditMutation) AddedEmojiAuthor() (r snowflake.ID, exists bool)

AddedEmojiAuthor returns the value that was added to the "emoji_author" field in this mutation.

func (*RolePanelEditMutation) AddedField

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

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

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

func (*RolePanelEditMutation) AddedIDs

func (m *RolePanelEditMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RolePanelEditMutation) AddedSelectedRole

func (m *RolePanelEditMutation) AddedSelectedRole() (r snowflake.ID, exists bool)

AddedSelectedRole returns the value that was added to the "selected_role" field in this mutation.

func (*RolePanelEditMutation) AppendRoles

func (m *RolePanelEditMutation) AppendRoles(s []schema.Role)

AppendRoles adds s to the "roles" field.

func (*RolePanelEditMutation) AppendedRoles

func (m *RolePanelEditMutation) AppendedRoles() ([]schema.Role, bool)

AppendedRoles returns the list of values that were appended to the "roles" field in this mutation.

func (*RolePanelEditMutation) ChannelID

func (m *RolePanelEditMutation) ChannelID() (r snowflake.ID, exists bool)

ChannelID returns the value of the "channel_id" field in the mutation.

func (*RolePanelEditMutation) ClearDescription

func (m *RolePanelEditMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*RolePanelEditMutation) ClearEdge

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) ClearEmojiAuthor

func (m *RolePanelEditMutation) ClearEmojiAuthor()

ClearEmojiAuthor clears the value of the "emoji_author" field.

func (*RolePanelEditMutation) ClearField

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) ClearGuild

func (m *RolePanelEditMutation) ClearGuild()

ClearGuild clears the "guild" edge to the Guild entity.

func (*RolePanelEditMutation) ClearName

func (m *RolePanelEditMutation) ClearName()

ClearName clears the value of the "name" field.

func (*RolePanelEditMutation) ClearParent

func (m *RolePanelEditMutation) ClearParent()

ClearParent clears the "parent" edge to the RolePanel entity.

func (*RolePanelEditMutation) ClearRoles

func (m *RolePanelEditMutation) ClearRoles()

ClearRoles clears the value of the "roles" field.

func (*RolePanelEditMutation) ClearSelectedRole

func (m *RolePanelEditMutation) ClearSelectedRole()

ClearSelectedRole clears the value of the "selected_role" field.

func (*RolePanelEditMutation) ClearToken

func (m *RolePanelEditMutation) ClearToken()

ClearToken clears the value of the "token" field.

func (*RolePanelEditMutation) ClearedEdges

func (m *RolePanelEditMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RolePanelEditMutation) ClearedFields

func (m *RolePanelEditMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RolePanelEditMutation) Client

func (m RolePanelEditMutation) 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 (*RolePanelEditMutation) Description

func (m *RolePanelEditMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*RolePanelEditMutation) DescriptionCleared

func (m *RolePanelEditMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*RolePanelEditMutation) EdgeCleared

func (m *RolePanelEditMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RolePanelEditMutation) EmojiAuthor

func (m *RolePanelEditMutation) EmojiAuthor() (r snowflake.ID, exists bool)

EmojiAuthor returns the value of the "emoji_author" field in the mutation.

func (*RolePanelEditMutation) EmojiAuthorCleared

func (m *RolePanelEditMutation) EmojiAuthorCleared() bool

EmojiAuthorCleared returns if the "emoji_author" field was cleared in this mutation.

func (*RolePanelEditMutation) Field

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) FieldCleared

func (m *RolePanelEditMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RolePanelEditMutation) Fields

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) GuildCleared

func (m *RolePanelEditMutation) GuildCleared() bool

GuildCleared reports if the "guild" edge to the Guild entity was cleared.

func (*RolePanelEditMutation) GuildID

func (m *RolePanelEditMutation) GuildID() (id snowflake.ID, exists bool)

GuildID returns the "guild" edge ID in the mutation.

func (*RolePanelEditMutation) GuildIDs

func (m *RolePanelEditMutation) GuildIDs() (ids []snowflake.ID)

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 (*RolePanelEditMutation) ID

func (m *RolePanelEditMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RolePanelEditMutation) 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 (*RolePanelEditMutation) Modified

func (m *RolePanelEditMutation) Modified() (r bool, exists bool)

Modified returns the value of the "modified" field in the mutation.

func (*RolePanelEditMutation) Name

func (m *RolePanelEditMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RolePanelEditMutation) NameCleared

func (m *RolePanelEditMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*RolePanelEditMutation) OldChannelID

func (m *RolePanelEditMutation) OldChannelID(ctx context.Context) (v snowflake.ID, err error)

OldChannelID returns the old "channel_id" field's value of the RolePanelEdit entity. If the RolePanelEdit 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 (*RolePanelEditMutation) OldDescription

func (m *RolePanelEditMutation) OldDescription(ctx context.Context) (v *string, err error)

OldDescription returns the old "description" field's value of the RolePanelEdit entity. If the RolePanelEdit 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 (*RolePanelEditMutation) OldEmojiAuthor

func (m *RolePanelEditMutation) OldEmojiAuthor(ctx context.Context) (v *snowflake.ID, err error)

OldEmojiAuthor returns the old "emoji_author" field's value of the RolePanelEdit entity. If the RolePanelEdit 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 (*RolePanelEditMutation) OldField

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) OldModified

func (m *RolePanelEditMutation) OldModified(ctx context.Context) (v bool, err error)

OldModified returns the old "modified" field's value of the RolePanelEdit entity. If the RolePanelEdit 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 (*RolePanelEditMutation) OldName

func (m *RolePanelEditMutation) OldName(ctx context.Context) (v *string, err error)

OldName returns the old "name" field's value of the RolePanelEdit entity. If the RolePanelEdit 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 (*RolePanelEditMutation) OldRoles

func (m *RolePanelEditMutation) OldRoles(ctx context.Context) (v []schema.Role, err error)

OldRoles returns the old "roles" field's value of the RolePanelEdit entity. If the RolePanelEdit 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 (*RolePanelEditMutation) OldSelectedRole

func (m *RolePanelEditMutation) OldSelectedRole(ctx context.Context) (v *snowflake.ID, err error)

OldSelectedRole returns the old "selected_role" field's value of the RolePanelEdit entity. If the RolePanelEdit 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 (*RolePanelEditMutation) OldToken

func (m *RolePanelEditMutation) OldToken(ctx context.Context) (v *string, err error)

OldToken returns the old "token" field's value of the RolePanelEdit entity. If the RolePanelEdit 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 (*RolePanelEditMutation) Op

func (m *RolePanelEditMutation) Op() Op

Op returns the operation name.

func (*RolePanelEditMutation) ParentCleared

func (m *RolePanelEditMutation) ParentCleared() bool

ParentCleared reports if the "parent" edge to the RolePanel entity was cleared.

func (*RolePanelEditMutation) ParentID

func (m *RolePanelEditMutation) ParentID() (id uuid.UUID, exists bool)

ParentID returns the "parent" edge ID in the mutation.

func (*RolePanelEditMutation) ParentIDs

func (m *RolePanelEditMutation) ParentIDs() (ids []uuid.UUID)

ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.

func (*RolePanelEditMutation) RemovedEdges

func (m *RolePanelEditMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RolePanelEditMutation) RemovedIDs

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) ResetChannelID

func (m *RolePanelEditMutation) ResetChannelID()

ResetChannelID resets all changes to the "channel_id" field.

func (*RolePanelEditMutation) ResetDescription

func (m *RolePanelEditMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*RolePanelEditMutation) ResetEdge

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) ResetEmojiAuthor

func (m *RolePanelEditMutation) ResetEmojiAuthor()

ResetEmojiAuthor resets all changes to the "emoji_author" field.

func (*RolePanelEditMutation) ResetField

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) ResetGuild

func (m *RolePanelEditMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*RolePanelEditMutation) ResetModified

func (m *RolePanelEditMutation) ResetModified()

ResetModified resets all changes to the "modified" field.

func (*RolePanelEditMutation) ResetName

func (m *RolePanelEditMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RolePanelEditMutation) ResetParent

func (m *RolePanelEditMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

func (*RolePanelEditMutation) ResetRoles

func (m *RolePanelEditMutation) ResetRoles()

ResetRoles resets all changes to the "roles" field.

func (*RolePanelEditMutation) ResetSelectedRole

func (m *RolePanelEditMutation) ResetSelectedRole()

ResetSelectedRole resets all changes to the "selected_role" field.

func (*RolePanelEditMutation) ResetToken

func (m *RolePanelEditMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*RolePanelEditMutation) Roles

func (m *RolePanelEditMutation) Roles() (r []schema.Role, exists bool)

Roles returns the value of the "roles" field in the mutation.

func (*RolePanelEditMutation) RolesCleared

func (m *RolePanelEditMutation) RolesCleared() bool

RolesCleared returns if the "roles" field was cleared in this mutation.

func (*RolePanelEditMutation) SelectedRole

func (m *RolePanelEditMutation) SelectedRole() (r snowflake.ID, exists bool)

SelectedRole returns the value of the "selected_role" field in the mutation.

func (*RolePanelEditMutation) SelectedRoleCleared

func (m *RolePanelEditMutation) SelectedRoleCleared() bool

SelectedRoleCleared returns if the "selected_role" field was cleared in this mutation.

func (*RolePanelEditMutation) SetChannelID

func (m *RolePanelEditMutation) SetChannelID(s snowflake.ID)

SetChannelID sets the "channel_id" field.

func (*RolePanelEditMutation) SetDescription

func (m *RolePanelEditMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*RolePanelEditMutation) SetEmojiAuthor

func (m *RolePanelEditMutation) SetEmojiAuthor(s snowflake.ID)

SetEmojiAuthor sets the "emoji_author" field.

func (*RolePanelEditMutation) SetField

func (m *RolePanelEditMutation) 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 (*RolePanelEditMutation) SetGuildID

func (m *RolePanelEditMutation) SetGuildID(id snowflake.ID)

SetGuildID sets the "guild" edge to the Guild entity by id.

func (*RolePanelEditMutation) SetID

func (m *RolePanelEditMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of RolePanelEdit entities.

func (*RolePanelEditMutation) SetModified

func (m *RolePanelEditMutation) SetModified(b bool)

SetModified sets the "modified" field.

func (*RolePanelEditMutation) SetName

func (m *RolePanelEditMutation) SetName(s string)

SetName sets the "name" field.

func (*RolePanelEditMutation) SetOp

func (m *RolePanelEditMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RolePanelEditMutation) SetParentID

func (m *RolePanelEditMutation) SetParentID(id uuid.UUID)

SetParentID sets the "parent" edge to the RolePanel entity by id.

func (*RolePanelEditMutation) SetRoles

func (m *RolePanelEditMutation) SetRoles(s []schema.Role)

SetRoles sets the "roles" field.

func (*RolePanelEditMutation) SetSelectedRole

func (m *RolePanelEditMutation) SetSelectedRole(s snowflake.ID)

SetSelectedRole sets the "selected_role" field.

func (*RolePanelEditMutation) SetToken

func (m *RolePanelEditMutation) SetToken(s string)

SetToken sets the "token" field.

func (*RolePanelEditMutation) Token

func (m *RolePanelEditMutation) Token() (r string, exists bool)

Token returns the value of the "token" field in the mutation.

func (*RolePanelEditMutation) TokenCleared

func (m *RolePanelEditMutation) TokenCleared() bool

TokenCleared returns if the "token" field was cleared in this mutation.

func (RolePanelEditMutation) Tx

func (m RolePanelEditMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RolePanelEditMutation) Type

func (m *RolePanelEditMutation) Type() string

Type returns the node type of this mutation (RolePanelEdit).

func (*RolePanelEditMutation) Where

Where appends a list predicates to the RolePanelEditMutation builder.

func (*RolePanelEditMutation) WhereP

func (m *RolePanelEditMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RolePanelEditMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RolePanelEditQuery

type RolePanelEditQuery struct {
	// contains filtered or unexported fields
}

RolePanelEditQuery is the builder for querying RolePanelEdit entities.

func (*RolePanelEditQuery) Aggregate

func (rpeq *RolePanelEditQuery) Aggregate(fns ...AggregateFunc) *RolePanelEditSelect

Aggregate returns a RolePanelEditSelect configured with the given aggregations.

func (*RolePanelEditQuery) All

func (rpeq *RolePanelEditQuery) All(ctx context.Context) ([]*RolePanelEdit, error)

All executes the query and returns a list of RolePanelEdits.

func (*RolePanelEditQuery) AllX

func (rpeq *RolePanelEditQuery) AllX(ctx context.Context) []*RolePanelEdit

AllX is like All, but panics if an error occurs.

func (*RolePanelEditQuery) Clone

func (rpeq *RolePanelEditQuery) Clone() *RolePanelEditQuery

Clone returns a duplicate of the RolePanelEditQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RolePanelEditQuery) Count

func (rpeq *RolePanelEditQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RolePanelEditQuery) CountX

func (rpeq *RolePanelEditQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RolePanelEditQuery) Exist

func (rpeq *RolePanelEditQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RolePanelEditQuery) ExistX

func (rpeq *RolePanelEditQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RolePanelEditQuery) First

func (rpeq *RolePanelEditQuery) First(ctx context.Context) (*RolePanelEdit, error)

First returns the first RolePanelEdit entity from the query. Returns a *NotFoundError when no RolePanelEdit was found.

func (*RolePanelEditQuery) FirstID

func (rpeq *RolePanelEditQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first RolePanelEdit ID from the query. Returns a *NotFoundError when no RolePanelEdit ID was found.

func (*RolePanelEditQuery) FirstIDX

func (rpeq *RolePanelEditQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*RolePanelEditQuery) FirstX

func (rpeq *RolePanelEditQuery) FirstX(ctx context.Context) *RolePanelEdit

FirstX is like First, but panics if an error occurs.

func (*RolePanelEditQuery) GroupBy

func (rpeq *RolePanelEditQuery) GroupBy(field string, fields ...string) *RolePanelEditGroupBy

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 {
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RolePanelEdit.Query().
	GroupBy(rolepaneledit.FieldChannelID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RolePanelEditQuery) IDs

func (rpeq *RolePanelEditQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of RolePanelEdit IDs.

func (*RolePanelEditQuery) IDsX

func (rpeq *RolePanelEditQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*RolePanelEditQuery) Limit

func (rpeq *RolePanelEditQuery) Limit(limit int) *RolePanelEditQuery

Limit the number of records to be returned by this query.

func (*RolePanelEditQuery) Offset

func (rpeq *RolePanelEditQuery) Offset(offset int) *RolePanelEditQuery

Offset to start from.

func (*RolePanelEditQuery) Only

Only returns a single RolePanelEdit entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RolePanelEdit entity is found. Returns a *NotFoundError when no RolePanelEdit entities are found.

func (*RolePanelEditQuery) OnlyID

func (rpeq *RolePanelEditQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only RolePanelEdit ID in the query. Returns a *NotSingularError when more than one RolePanelEdit ID is found. Returns a *NotFoundError when no entities are found.

func (*RolePanelEditQuery) OnlyIDX

func (rpeq *RolePanelEditQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RolePanelEditQuery) OnlyX

func (rpeq *RolePanelEditQuery) OnlyX(ctx context.Context) *RolePanelEdit

OnlyX is like Only, but panics if an error occurs.

func (*RolePanelEditQuery) Order

Order specifies how the records should be ordered.

func (*RolePanelEditQuery) QueryGuild

func (rpeq *RolePanelEditQuery) QueryGuild() *GuildQuery

QueryGuild chains the current query on the "guild" edge.

func (*RolePanelEditQuery) QueryParent

func (rpeq *RolePanelEditQuery) QueryParent() *RolePanelQuery

QueryParent chains the current query on the "parent" edge.

func (*RolePanelEditQuery) Select

func (rpeq *RolePanelEditQuery) Select(fields ...string) *RolePanelEditSelect

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 {
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
}

client.RolePanelEdit.Query().
	Select(rolepaneledit.FieldChannelID).
	Scan(ctx, &v)

func (*RolePanelEditQuery) Unique

func (rpeq *RolePanelEditQuery) Unique(unique bool) *RolePanelEditQuery

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 (*RolePanelEditQuery) Where

Where adds a new predicate for the RolePanelEditQuery builder.

func (*RolePanelEditQuery) WithGuild

func (rpeq *RolePanelEditQuery) WithGuild(opts ...func(*GuildQuery)) *RolePanelEditQuery

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.

func (*RolePanelEditQuery) WithParent

func (rpeq *RolePanelEditQuery) WithParent(opts ...func(*RolePanelQuery)) *RolePanelEditQuery

WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.

type RolePanelEditSelect

type RolePanelEditSelect struct {
	*RolePanelEditQuery
	// contains filtered or unexported fields
}

RolePanelEditSelect is the builder for selecting fields of RolePanelEdit entities.

func (*RolePanelEditSelect) Aggregate

func (rpes *RolePanelEditSelect) Aggregate(fns ...AggregateFunc) *RolePanelEditSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RolePanelEditSelect) Bool

func (s *RolePanelEditSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RolePanelEditSelect) BoolX

func (s *RolePanelEditSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RolePanelEditSelect) Bools

func (s *RolePanelEditSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RolePanelEditSelect) BoolsX

func (s *RolePanelEditSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RolePanelEditSelect) Float64

func (s *RolePanelEditSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RolePanelEditSelect) Float64X

func (s *RolePanelEditSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RolePanelEditSelect) Float64s

func (s *RolePanelEditSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RolePanelEditSelect) Float64sX

func (s *RolePanelEditSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RolePanelEditSelect) Int

func (s *RolePanelEditSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RolePanelEditSelect) IntX

func (s *RolePanelEditSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RolePanelEditSelect) Ints

func (s *RolePanelEditSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RolePanelEditSelect) IntsX

func (s *RolePanelEditSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RolePanelEditSelect) Scan

func (rpes *RolePanelEditSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RolePanelEditSelect) ScanX

func (s *RolePanelEditSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RolePanelEditSelect) String

func (s *RolePanelEditSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RolePanelEditSelect) StringX

func (s *RolePanelEditSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RolePanelEditSelect) Strings

func (s *RolePanelEditSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RolePanelEditSelect) StringsX

func (s *RolePanelEditSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RolePanelEditUpdate

type RolePanelEditUpdate struct {
	// contains filtered or unexported fields
}

RolePanelEditUpdate is the builder for updating RolePanelEdit entities.

func (*RolePanelEditUpdate) AddChannelID

func (rpeu *RolePanelEditUpdate) AddChannelID(s snowflake.ID) *RolePanelEditUpdate

AddChannelID adds s to the "channel_id" field.

func (*RolePanelEditUpdate) AddEmojiAuthor

func (rpeu *RolePanelEditUpdate) AddEmojiAuthor(s snowflake.ID) *RolePanelEditUpdate

AddEmojiAuthor adds s to the "emoji_author" field.

func (*RolePanelEditUpdate) AddSelectedRole

func (rpeu *RolePanelEditUpdate) AddSelectedRole(s snowflake.ID) *RolePanelEditUpdate

AddSelectedRole adds s to the "selected_role" field.

func (*RolePanelEditUpdate) AppendRoles

func (rpeu *RolePanelEditUpdate) AppendRoles(s []schema.Role) *RolePanelEditUpdate

AppendRoles appends s to the "roles" field.

func (*RolePanelEditUpdate) ClearDescription

func (rpeu *RolePanelEditUpdate) ClearDescription() *RolePanelEditUpdate

ClearDescription clears the value of the "description" field.

func (*RolePanelEditUpdate) ClearEmojiAuthor

func (rpeu *RolePanelEditUpdate) ClearEmojiAuthor() *RolePanelEditUpdate

ClearEmojiAuthor clears the value of the "emoji_author" field.

func (*RolePanelEditUpdate) ClearName

func (rpeu *RolePanelEditUpdate) ClearName() *RolePanelEditUpdate

ClearName clears the value of the "name" field.

func (*RolePanelEditUpdate) ClearRoles

func (rpeu *RolePanelEditUpdate) ClearRoles() *RolePanelEditUpdate

ClearRoles clears the value of the "roles" field.

func (*RolePanelEditUpdate) ClearSelectedRole

func (rpeu *RolePanelEditUpdate) ClearSelectedRole() *RolePanelEditUpdate

ClearSelectedRole clears the value of the "selected_role" field.

func (*RolePanelEditUpdate) ClearToken

func (rpeu *RolePanelEditUpdate) ClearToken() *RolePanelEditUpdate

ClearToken clears the value of the "token" field.

func (*RolePanelEditUpdate) Exec

func (rpeu *RolePanelEditUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RolePanelEditUpdate) ExecX

func (rpeu *RolePanelEditUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelEditUpdate) Mutation

func (rpeu *RolePanelEditUpdate) Mutation() *RolePanelEditMutation

Mutation returns the RolePanelEditMutation object of the builder.

func (*RolePanelEditUpdate) Save

func (rpeu *RolePanelEditUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RolePanelEditUpdate) SaveX

func (rpeu *RolePanelEditUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RolePanelEditUpdate) SetChannelID

func (rpeu *RolePanelEditUpdate) SetChannelID(s snowflake.ID) *RolePanelEditUpdate

SetChannelID sets the "channel_id" field.

func (*RolePanelEditUpdate) SetDescription

func (rpeu *RolePanelEditUpdate) SetDescription(s string) *RolePanelEditUpdate

SetDescription sets the "description" field.

func (*RolePanelEditUpdate) SetEmojiAuthor

func (rpeu *RolePanelEditUpdate) SetEmojiAuthor(s snowflake.ID) *RolePanelEditUpdate

SetEmojiAuthor sets the "emoji_author" field.

func (*RolePanelEditUpdate) SetModified

func (rpeu *RolePanelEditUpdate) SetModified(b bool) *RolePanelEditUpdate

SetModified sets the "modified" field.

func (*RolePanelEditUpdate) SetName

SetName sets the "name" field.

func (*RolePanelEditUpdate) SetNillableChannelID

func (rpeu *RolePanelEditUpdate) SetNillableChannelID(s *snowflake.ID) *RolePanelEditUpdate

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*RolePanelEditUpdate) SetNillableDescription

func (rpeu *RolePanelEditUpdate) SetNillableDescription(s *string) *RolePanelEditUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RolePanelEditUpdate) SetNillableEmojiAuthor

func (rpeu *RolePanelEditUpdate) SetNillableEmojiAuthor(s *snowflake.ID) *RolePanelEditUpdate

SetNillableEmojiAuthor sets the "emoji_author" field if the given value is not nil.

func (*RolePanelEditUpdate) SetNillableModified

func (rpeu *RolePanelEditUpdate) SetNillableModified(b *bool) *RolePanelEditUpdate

SetNillableModified sets the "modified" field if the given value is not nil.

func (*RolePanelEditUpdate) SetNillableName

func (rpeu *RolePanelEditUpdate) SetNillableName(s *string) *RolePanelEditUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*RolePanelEditUpdate) SetNillableSelectedRole

func (rpeu *RolePanelEditUpdate) SetNillableSelectedRole(s *snowflake.ID) *RolePanelEditUpdate

SetNillableSelectedRole sets the "selected_role" field if the given value is not nil.

func (*RolePanelEditUpdate) SetNillableToken

func (rpeu *RolePanelEditUpdate) SetNillableToken(s *string) *RolePanelEditUpdate

SetNillableToken sets the "token" field if the given value is not nil.

func (*RolePanelEditUpdate) SetRoles

func (rpeu *RolePanelEditUpdate) SetRoles(s []schema.Role) *RolePanelEditUpdate

SetRoles sets the "roles" field.

func (*RolePanelEditUpdate) SetSelectedRole

func (rpeu *RolePanelEditUpdate) SetSelectedRole(s snowflake.ID) *RolePanelEditUpdate

SetSelectedRole sets the "selected_role" field.

func (*RolePanelEditUpdate) SetToken

func (rpeu *RolePanelEditUpdate) SetToken(s string) *RolePanelEditUpdate

SetToken sets the "token" field.

func (*RolePanelEditUpdate) Where

Where appends a list predicates to the RolePanelEditUpdate builder.

type RolePanelEditUpdateOne

type RolePanelEditUpdateOne struct {
	// contains filtered or unexported fields
}

RolePanelEditUpdateOne is the builder for updating a single RolePanelEdit entity.

func (*RolePanelEditUpdateOne) AddChannelID

AddChannelID adds s to the "channel_id" field.

func (*RolePanelEditUpdateOne) AddEmojiAuthor

func (rpeuo *RolePanelEditUpdateOne) AddEmojiAuthor(s snowflake.ID) *RolePanelEditUpdateOne

AddEmojiAuthor adds s to the "emoji_author" field.

func (*RolePanelEditUpdateOne) AddSelectedRole

func (rpeuo *RolePanelEditUpdateOne) AddSelectedRole(s snowflake.ID) *RolePanelEditUpdateOne

AddSelectedRole adds s to the "selected_role" field.

func (*RolePanelEditUpdateOne) AppendRoles

func (rpeuo *RolePanelEditUpdateOne) AppendRoles(s []schema.Role) *RolePanelEditUpdateOne

AppendRoles appends s to the "roles" field.

func (*RolePanelEditUpdateOne) ClearDescription

func (rpeuo *RolePanelEditUpdateOne) ClearDescription() *RolePanelEditUpdateOne

ClearDescription clears the value of the "description" field.

func (*RolePanelEditUpdateOne) ClearEmojiAuthor

func (rpeuo *RolePanelEditUpdateOne) ClearEmojiAuthor() *RolePanelEditUpdateOne

ClearEmojiAuthor clears the value of the "emoji_author" field.

func (*RolePanelEditUpdateOne) ClearName

func (rpeuo *RolePanelEditUpdateOne) ClearName() *RolePanelEditUpdateOne

ClearName clears the value of the "name" field.

func (*RolePanelEditUpdateOne) ClearRoles

func (rpeuo *RolePanelEditUpdateOne) ClearRoles() *RolePanelEditUpdateOne

ClearRoles clears the value of the "roles" field.

func (*RolePanelEditUpdateOne) ClearSelectedRole

func (rpeuo *RolePanelEditUpdateOne) ClearSelectedRole() *RolePanelEditUpdateOne

ClearSelectedRole clears the value of the "selected_role" field.

func (*RolePanelEditUpdateOne) ClearToken

func (rpeuo *RolePanelEditUpdateOne) ClearToken() *RolePanelEditUpdateOne

ClearToken clears the value of the "token" field.

func (*RolePanelEditUpdateOne) Exec

func (rpeuo *RolePanelEditUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RolePanelEditUpdateOne) ExecX

func (rpeuo *RolePanelEditUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelEditUpdateOne) Mutation

func (rpeuo *RolePanelEditUpdateOne) Mutation() *RolePanelEditMutation

Mutation returns the RolePanelEditMutation object of the builder.

func (*RolePanelEditUpdateOne) Save

Save executes the query and returns the updated RolePanelEdit entity.

func (*RolePanelEditUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*RolePanelEditUpdateOne) Select

func (rpeuo *RolePanelEditUpdateOne) Select(field string, fields ...string) *RolePanelEditUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RolePanelEditUpdateOne) SetChannelID

SetChannelID sets the "channel_id" field.

func (*RolePanelEditUpdateOne) SetDescription

func (rpeuo *RolePanelEditUpdateOne) SetDescription(s string) *RolePanelEditUpdateOne

SetDescription sets the "description" field.

func (*RolePanelEditUpdateOne) SetEmojiAuthor

func (rpeuo *RolePanelEditUpdateOne) SetEmojiAuthor(s snowflake.ID) *RolePanelEditUpdateOne

SetEmojiAuthor sets the "emoji_author" field.

func (*RolePanelEditUpdateOne) SetModified

func (rpeuo *RolePanelEditUpdateOne) SetModified(b bool) *RolePanelEditUpdateOne

SetModified sets the "modified" field.

func (*RolePanelEditUpdateOne) SetName

SetName sets the "name" field.

func (*RolePanelEditUpdateOne) SetNillableChannelID

func (rpeuo *RolePanelEditUpdateOne) SetNillableChannelID(s *snowflake.ID) *RolePanelEditUpdateOne

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*RolePanelEditUpdateOne) SetNillableDescription

func (rpeuo *RolePanelEditUpdateOne) SetNillableDescription(s *string) *RolePanelEditUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RolePanelEditUpdateOne) SetNillableEmojiAuthor

func (rpeuo *RolePanelEditUpdateOne) SetNillableEmojiAuthor(s *snowflake.ID) *RolePanelEditUpdateOne

SetNillableEmojiAuthor sets the "emoji_author" field if the given value is not nil.

func (*RolePanelEditUpdateOne) SetNillableModified

func (rpeuo *RolePanelEditUpdateOne) SetNillableModified(b *bool) *RolePanelEditUpdateOne

SetNillableModified sets the "modified" field if the given value is not nil.

func (*RolePanelEditUpdateOne) SetNillableName

func (rpeuo *RolePanelEditUpdateOne) SetNillableName(s *string) *RolePanelEditUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*RolePanelEditUpdateOne) SetNillableSelectedRole

func (rpeuo *RolePanelEditUpdateOne) SetNillableSelectedRole(s *snowflake.ID) *RolePanelEditUpdateOne

SetNillableSelectedRole sets the "selected_role" field if the given value is not nil.

func (*RolePanelEditUpdateOne) SetNillableToken

func (rpeuo *RolePanelEditUpdateOne) SetNillableToken(s *string) *RolePanelEditUpdateOne

SetNillableToken sets the "token" field if the given value is not nil.

func (*RolePanelEditUpdateOne) SetRoles

SetRoles sets the "roles" field.

func (*RolePanelEditUpdateOne) SetSelectedRole

func (rpeuo *RolePanelEditUpdateOne) SetSelectedRole(s snowflake.ID) *RolePanelEditUpdateOne

SetSelectedRole sets the "selected_role" field.

func (*RolePanelEditUpdateOne) SetToken

SetToken sets the "token" field.

func (*RolePanelEditUpdateOne) Where

Where appends a list predicates to the RolePanelEditUpdate builder.

type RolePanelEdits

type RolePanelEdits []*RolePanelEdit

RolePanelEdits is a parsable slice of RolePanelEdit.

type RolePanelGroupBy

type RolePanelGroupBy struct {
	// contains filtered or unexported fields
}

RolePanelGroupBy is the group-by builder for RolePanel entities.

func (*RolePanelGroupBy) Aggregate

func (rpgb *RolePanelGroupBy) Aggregate(fns ...AggregateFunc) *RolePanelGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RolePanelGroupBy) Bool

func (s *RolePanelGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RolePanelGroupBy) BoolX

func (s *RolePanelGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RolePanelGroupBy) Bools

func (s *RolePanelGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RolePanelGroupBy) BoolsX

func (s *RolePanelGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RolePanelGroupBy) Float64

func (s *RolePanelGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RolePanelGroupBy) Float64X

func (s *RolePanelGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RolePanelGroupBy) Float64s

func (s *RolePanelGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RolePanelGroupBy) Float64sX

func (s *RolePanelGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RolePanelGroupBy) Int

func (s *RolePanelGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RolePanelGroupBy) IntX

func (s *RolePanelGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RolePanelGroupBy) Ints

func (s *RolePanelGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RolePanelGroupBy) IntsX

func (s *RolePanelGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RolePanelGroupBy) Scan

func (rpgb *RolePanelGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RolePanelGroupBy) ScanX

func (s *RolePanelGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RolePanelGroupBy) String

func (s *RolePanelGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RolePanelGroupBy) StringX

func (s *RolePanelGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RolePanelGroupBy) Strings

func (s *RolePanelGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RolePanelGroupBy) StringsX

func (s *RolePanelGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RolePanelMutation

type RolePanelMutation struct {
	// contains filtered or unexported fields
}

RolePanelMutation represents an operation that mutates the RolePanel nodes in the graph.

func (*RolePanelMutation) AddField

func (m *RolePanelMutation) 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 (*RolePanelMutation) AddPlacementIDs

func (m *RolePanelMutation) AddPlacementIDs(ids ...uuid.UUID)

AddPlacementIDs adds the "placements" edge to the RolePanelPlaced entity by ids.

func (*RolePanelMutation) AddedEdges

func (m *RolePanelMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RolePanelMutation) AddedField

func (m *RolePanelMutation) 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 (*RolePanelMutation) AddedFields

func (m *RolePanelMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RolePanelMutation) AddedIDs

func (m *RolePanelMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RolePanelMutation) AppendRoles

func (m *RolePanelMutation) AppendRoles(s []schema.Role)

AppendRoles adds s to the "roles" field.

func (*RolePanelMutation) AppendedRoles

func (m *RolePanelMutation) AppendedRoles() ([]schema.Role, bool)

AppendedRoles returns the list of values that were appended to the "roles" field in this mutation.

func (*RolePanelMutation) AppliedAt

func (m *RolePanelMutation) AppliedAt() (r time.Time, exists bool)

AppliedAt returns the value of the "applied_at" field in the mutation.

func (*RolePanelMutation) AppliedAtCleared

func (m *RolePanelMutation) AppliedAtCleared() bool

AppliedAtCleared returns if the "applied_at" field was cleared in this mutation.

func (*RolePanelMutation) ClearAppliedAt

func (m *RolePanelMutation) ClearAppliedAt()

ClearAppliedAt clears the value of the "applied_at" field.

func (*RolePanelMutation) ClearEdge

func (m *RolePanelMutation) 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 (*RolePanelMutation) ClearEdit

func (m *RolePanelMutation) ClearEdit()

ClearEdit clears the "edit" edge to the RolePanelEdit entity.

func (*RolePanelMutation) ClearField

func (m *RolePanelMutation) 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 (*RolePanelMutation) ClearGuild

func (m *RolePanelMutation) ClearGuild()

ClearGuild clears the "guild" edge to the Guild entity.

func (*RolePanelMutation) ClearPlacements

func (m *RolePanelMutation) ClearPlacements()

ClearPlacements clears the "placements" edge to the RolePanelPlaced entity.

func (*RolePanelMutation) ClearRoles

func (m *RolePanelMutation) ClearRoles()

ClearRoles clears the value of the "roles" field.

func (*RolePanelMutation) ClearUpdatedAt

func (m *RolePanelMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RolePanelMutation) ClearedEdges

func (m *RolePanelMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RolePanelMutation) ClearedFields

func (m *RolePanelMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RolePanelMutation) Client

func (m RolePanelMutation) 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 (*RolePanelMutation) Description

func (m *RolePanelMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*RolePanelMutation) EdgeCleared

func (m *RolePanelMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RolePanelMutation) EditCleared

func (m *RolePanelMutation) EditCleared() bool

EditCleared reports if the "edit" edge to the RolePanelEdit entity was cleared.

func (*RolePanelMutation) EditID

func (m *RolePanelMutation) EditID() (id uuid.UUID, exists bool)

EditID returns the "edit" edge ID in the mutation.

func (*RolePanelMutation) EditIDs

func (m *RolePanelMutation) EditIDs() (ids []uuid.UUID)

EditIDs returns the "edit" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EditID instead. It exists only for internal usage by the builders.

func (*RolePanelMutation) Field

func (m *RolePanelMutation) 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 (*RolePanelMutation) FieldCleared

func (m *RolePanelMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RolePanelMutation) Fields

func (m *RolePanelMutation) 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 (*RolePanelMutation) GuildCleared

func (m *RolePanelMutation) GuildCleared() bool

GuildCleared reports if the "guild" edge to the Guild entity was cleared.

func (*RolePanelMutation) GuildID

func (m *RolePanelMutation) GuildID() (id snowflake.ID, exists bool)

GuildID returns the "guild" edge ID in the mutation.

func (*RolePanelMutation) GuildIDs

func (m *RolePanelMutation) GuildIDs() (ids []snowflake.ID)

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 (*RolePanelMutation) ID

func (m *RolePanelMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RolePanelMutation) IDs

func (m *RolePanelMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*RolePanelMutation) Name

func (m *RolePanelMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RolePanelMutation) OldAppliedAt

func (m *RolePanelMutation) OldAppliedAt(ctx context.Context) (v time.Time, err error)

OldAppliedAt returns the old "applied_at" field's value of the RolePanel entity. If the RolePanel 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 (*RolePanelMutation) OldDescription

func (m *RolePanelMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the RolePanel entity. If the RolePanel 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 (*RolePanelMutation) OldField

func (m *RolePanelMutation) 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 (*RolePanelMutation) OldName

func (m *RolePanelMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the RolePanel entity. If the RolePanel 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 (*RolePanelMutation) OldRoles

func (m *RolePanelMutation) OldRoles(ctx context.Context) (v []schema.Role, err error)

OldRoles returns the old "roles" field's value of the RolePanel entity. If the RolePanel 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 (*RolePanelMutation) OldUpdatedAt

func (m *RolePanelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the RolePanel entity. If the RolePanel 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 (*RolePanelMutation) Op

func (m *RolePanelMutation) Op() Op

Op returns the operation name.

func (*RolePanelMutation) PlacementsCleared

func (m *RolePanelMutation) PlacementsCleared() bool

PlacementsCleared reports if the "placements" edge to the RolePanelPlaced entity was cleared.

func (*RolePanelMutation) PlacementsIDs

func (m *RolePanelMutation) PlacementsIDs() (ids []uuid.UUID)

PlacementsIDs returns the "placements" edge IDs in the mutation.

func (*RolePanelMutation) RemovePlacementIDs

func (m *RolePanelMutation) RemovePlacementIDs(ids ...uuid.UUID)

RemovePlacementIDs removes the "placements" edge to the RolePanelPlaced entity by IDs.

func (*RolePanelMutation) RemovedEdges

func (m *RolePanelMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RolePanelMutation) RemovedIDs

func (m *RolePanelMutation) 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 (*RolePanelMutation) RemovedPlacementsIDs

func (m *RolePanelMutation) RemovedPlacementsIDs() (ids []uuid.UUID)

RemovedPlacements returns the removed IDs of the "placements" edge to the RolePanelPlaced entity.

func (*RolePanelMutation) ResetAppliedAt

func (m *RolePanelMutation) ResetAppliedAt()

ResetAppliedAt resets all changes to the "applied_at" field.

func (*RolePanelMutation) ResetDescription

func (m *RolePanelMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*RolePanelMutation) ResetEdge

func (m *RolePanelMutation) 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 (*RolePanelMutation) ResetEdit

func (m *RolePanelMutation) ResetEdit()

ResetEdit resets all changes to the "edit" edge.

func (*RolePanelMutation) ResetField

func (m *RolePanelMutation) 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 (*RolePanelMutation) ResetGuild

func (m *RolePanelMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*RolePanelMutation) ResetName

func (m *RolePanelMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RolePanelMutation) ResetPlacements

func (m *RolePanelMutation) ResetPlacements()

ResetPlacements resets all changes to the "placements" edge.

func (*RolePanelMutation) ResetRoles

func (m *RolePanelMutation) ResetRoles()

ResetRoles resets all changes to the "roles" field.

func (*RolePanelMutation) ResetUpdatedAt

func (m *RolePanelMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*RolePanelMutation) Roles

func (m *RolePanelMutation) Roles() (r []schema.Role, exists bool)

Roles returns the value of the "roles" field in the mutation.

func (*RolePanelMutation) RolesCleared

func (m *RolePanelMutation) RolesCleared() bool

RolesCleared returns if the "roles" field was cleared in this mutation.

func (*RolePanelMutation) SetAppliedAt

func (m *RolePanelMutation) SetAppliedAt(t time.Time)

SetAppliedAt sets the "applied_at" field.

func (*RolePanelMutation) SetDescription

func (m *RolePanelMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*RolePanelMutation) SetEditID

func (m *RolePanelMutation) SetEditID(id uuid.UUID)

SetEditID sets the "edit" edge to the RolePanelEdit entity by id.

func (*RolePanelMutation) SetField

func (m *RolePanelMutation) 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 (*RolePanelMutation) SetGuildID

func (m *RolePanelMutation) SetGuildID(id snowflake.ID)

SetGuildID sets the "guild" edge to the Guild entity by id.

func (*RolePanelMutation) SetID

func (m *RolePanelMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of RolePanel entities.

func (*RolePanelMutation) SetName

func (m *RolePanelMutation) SetName(s string)

SetName sets the "name" field.

func (*RolePanelMutation) SetOp

func (m *RolePanelMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RolePanelMutation) SetRoles

func (m *RolePanelMutation) SetRoles(s []schema.Role)

SetRoles sets the "roles" field.

func (*RolePanelMutation) SetUpdatedAt

func (m *RolePanelMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (RolePanelMutation) Tx

func (m RolePanelMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RolePanelMutation) Type

func (m *RolePanelMutation) Type() string

Type returns the node type of this mutation (RolePanel).

func (*RolePanelMutation) UpdatedAt

func (m *RolePanelMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*RolePanelMutation) UpdatedAtCleared

func (m *RolePanelMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*RolePanelMutation) Where

func (m *RolePanelMutation) Where(ps ...predicate.RolePanel)

Where appends a list predicates to the RolePanelMutation builder.

func (*RolePanelMutation) WhereP

func (m *RolePanelMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RolePanelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RolePanelPlaced

type RolePanelPlaced struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// MessageID holds the value of the "message_id" field.
	MessageID *snowflake.ID `json:"message_id,omitempty"`
	// ChannelID holds the value of the "channel_id" field.
	ChannelID snowflake.ID `json:"channel_id,omitempty"`
	// Type holds the value of the "type" field.
	Type rolepanelplaced.Type `json:"type,omitempty"`
	// ButtonType holds the value of the "button_type" field.
	ButtonType discord.ButtonStyle `json:"button_type,omitempty"`
	// ShowName holds the value of the "show_name" field.
	ShowName bool `json:"show_name,omitempty"`
	// FoldingSelectMenu holds the value of the "folding_select_menu" field.
	FoldingSelectMenu bool `json:"folding_select_menu,omitempty"`
	// HideNotice holds the value of the "hide_notice" field.
	HideNotice bool `json:"hide_notice,omitempty"`
	// UseDisplayName holds the value of the "use_display_name" field.
	UseDisplayName bool `json:"use_display_name,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Uses holds the value of the "uses" field.
	Uses int `json:"uses,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Roles holds the value of the "roles" field.
	Roles []schema.Role `json:"roles,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RolePanelPlacedQuery when eager-loading is set.
	Edges RolePanelPlacedEdges `json:"edges"`
	// contains filtered or unexported fields
}

RolePanelPlaced is the model entity for the RolePanelPlaced schema.

func (*RolePanelPlaced) QueryGuild

func (rpp *RolePanelPlaced) QueryGuild() *GuildQuery

QueryGuild queries the "guild" edge of the RolePanelPlaced entity.

func (*RolePanelPlaced) QueryRolePanel

func (rpp *RolePanelPlaced) QueryRolePanel() *RolePanelQuery

QueryRolePanel queries the "role_panel" edge of the RolePanelPlaced entity.

func (*RolePanelPlaced) String

func (rpp *RolePanelPlaced) String() string

String implements the fmt.Stringer.

func (*RolePanelPlaced) Unwrap

func (rpp *RolePanelPlaced) Unwrap() *RolePanelPlaced

Unwrap unwraps the RolePanelPlaced 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 (*RolePanelPlaced) Update

Update returns a builder for updating this RolePanelPlaced. Note that you need to call RolePanelPlaced.Unwrap() before calling this method if this RolePanelPlaced was returned from a transaction, and the transaction was committed or rolled back.

func (*RolePanelPlaced) Value

func (rpp *RolePanelPlaced) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the RolePanelPlaced. This includes values selected through modifiers, order, etc.

type RolePanelPlacedClient

type RolePanelPlacedClient struct {
	// contains filtered or unexported fields
}

RolePanelPlacedClient is a client for the RolePanelPlaced schema.

func NewRolePanelPlacedClient

func NewRolePanelPlacedClient(c config) *RolePanelPlacedClient

NewRolePanelPlacedClient returns a client for the RolePanelPlaced from the given config.

func (*RolePanelPlacedClient) Create

Create returns a builder for creating a RolePanelPlaced entity.

func (*RolePanelPlacedClient) CreateBulk

CreateBulk returns a builder for creating a bulk of RolePanelPlaced entities.

func (*RolePanelPlacedClient) Delete

Delete returns a delete builder for RolePanelPlaced.

func (*RolePanelPlacedClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RolePanelPlacedClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RolePanelPlacedClient) Get

Get returns a RolePanelPlaced entity by its id.

func (*RolePanelPlacedClient) GetX

GetX is like Get, but panics if an error occurs.

func (*RolePanelPlacedClient) Hooks

func (c *RolePanelPlacedClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RolePanelPlacedClient) Intercept

func (c *RolePanelPlacedClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rolepanelplaced.Intercept(f(g(h())))`.

func (*RolePanelPlacedClient) Interceptors

func (c *RolePanelPlacedClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RolePanelPlacedClient) MapCreateBulk

func (c *RolePanelPlacedClient) MapCreateBulk(slice any, setFunc func(*RolePanelPlacedCreate, int)) *RolePanelPlacedCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*RolePanelPlacedClient) Query

Query returns a query builder for RolePanelPlaced.

func (*RolePanelPlacedClient) QueryGuild

func (c *RolePanelPlacedClient) QueryGuild(rpp *RolePanelPlaced) *GuildQuery

QueryGuild queries the guild edge of a RolePanelPlaced.

func (*RolePanelPlacedClient) QueryRolePanel

func (c *RolePanelPlacedClient) QueryRolePanel(rpp *RolePanelPlaced) *RolePanelQuery

QueryRolePanel queries the role_panel edge of a RolePanelPlaced.

func (*RolePanelPlacedClient) Update

Update returns an update builder for RolePanelPlaced.

func (*RolePanelPlacedClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RolePanelPlacedClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*RolePanelPlacedClient) Use

func (c *RolePanelPlacedClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rolepanelplaced.Hooks(f(g(h())))`.

type RolePanelPlacedCreate

type RolePanelPlacedCreate struct {
	// contains filtered or unexported fields
}

RolePanelPlacedCreate is the builder for creating a RolePanelPlaced entity.

func (*RolePanelPlacedCreate) Exec

func (rppc *RolePanelPlacedCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RolePanelPlacedCreate) ExecX

func (rppc *RolePanelPlacedCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelPlacedCreate) Mutation

Mutation returns the RolePanelPlacedMutation object of the builder.

func (*RolePanelPlacedCreate) Save

Save creates the RolePanelPlaced in the database.

func (*RolePanelPlacedCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*RolePanelPlacedCreate) SetButtonType

SetButtonType sets the "button_type" field.

func (*RolePanelPlacedCreate) SetChannelID

SetChannelID sets the "channel_id" field.

func (*RolePanelPlacedCreate) SetCreatedAt

func (rppc *RolePanelPlacedCreate) SetCreatedAt(t time.Time) *RolePanelPlacedCreate

SetCreatedAt sets the "created_at" field.

func (*RolePanelPlacedCreate) SetDescription

func (rppc *RolePanelPlacedCreate) SetDescription(s string) *RolePanelPlacedCreate

SetDescription sets the "description" field.

func (*RolePanelPlacedCreate) SetFoldingSelectMenu

func (rppc *RolePanelPlacedCreate) SetFoldingSelectMenu(b bool) *RolePanelPlacedCreate

SetFoldingSelectMenu sets the "folding_select_menu" field.

func (*RolePanelPlacedCreate) SetGuild

SetGuild sets the "guild" edge to the Guild entity.

func (*RolePanelPlacedCreate) SetGuildID

SetGuildID sets the "guild" edge to the Guild entity by ID.

func (*RolePanelPlacedCreate) SetHideNotice

func (rppc *RolePanelPlacedCreate) SetHideNotice(b bool) *RolePanelPlacedCreate

SetHideNotice sets the "hide_notice" field.

func (*RolePanelPlacedCreate) SetID

SetID sets the "id" field.

func (*RolePanelPlacedCreate) SetMessageID

SetMessageID sets the "message_id" field.

func (*RolePanelPlacedCreate) SetName

SetName sets the "name" field.

func (*RolePanelPlacedCreate) SetNillableButtonType

func (rppc *RolePanelPlacedCreate) SetNillableButtonType(ds *discord.ButtonStyle) *RolePanelPlacedCreate

SetNillableButtonType sets the "button_type" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableCreatedAt

func (rppc *RolePanelPlacedCreate) SetNillableCreatedAt(t *time.Time) *RolePanelPlacedCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableFoldingSelectMenu

func (rppc *RolePanelPlacedCreate) SetNillableFoldingSelectMenu(b *bool) *RolePanelPlacedCreate

SetNillableFoldingSelectMenu sets the "folding_select_menu" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableHideNotice

func (rppc *RolePanelPlacedCreate) SetNillableHideNotice(b *bool) *RolePanelPlacedCreate

SetNillableHideNotice sets the "hide_notice" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableID

func (rppc *RolePanelPlacedCreate) SetNillableID(u *uuid.UUID) *RolePanelPlacedCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableMessageID

func (rppc *RolePanelPlacedCreate) SetNillableMessageID(s *snowflake.ID) *RolePanelPlacedCreate

SetNillableMessageID sets the "message_id" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableShowName

func (rppc *RolePanelPlacedCreate) SetNillableShowName(b *bool) *RolePanelPlacedCreate

SetNillableShowName sets the "show_name" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableType

SetNillableType sets the "type" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableUpdatedAt

func (rppc *RolePanelPlacedCreate) SetNillableUpdatedAt(t *time.Time) *RolePanelPlacedCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableUseDisplayName

func (rppc *RolePanelPlacedCreate) SetNillableUseDisplayName(b *bool) *RolePanelPlacedCreate

SetNillableUseDisplayName sets the "use_display_name" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetNillableUses

func (rppc *RolePanelPlacedCreate) SetNillableUses(i *int) *RolePanelPlacedCreate

SetNillableUses sets the "uses" field if the given value is not nil.

func (*RolePanelPlacedCreate) SetRolePanel

func (rppc *RolePanelPlacedCreate) SetRolePanel(r *RolePanel) *RolePanelPlacedCreate

SetRolePanel sets the "role_panel" edge to the RolePanel entity.

func (*RolePanelPlacedCreate) SetRolePanelID

func (rppc *RolePanelPlacedCreate) SetRolePanelID(id uuid.UUID) *RolePanelPlacedCreate

SetRolePanelID sets the "role_panel" edge to the RolePanel entity by ID.

func (*RolePanelPlacedCreate) SetRoles

SetRoles sets the "roles" field.

func (*RolePanelPlacedCreate) SetShowName

func (rppc *RolePanelPlacedCreate) SetShowName(b bool) *RolePanelPlacedCreate

SetShowName sets the "show_name" field.

func (*RolePanelPlacedCreate) SetType

SetType sets the "type" field.

func (*RolePanelPlacedCreate) SetUpdatedAt

func (rppc *RolePanelPlacedCreate) SetUpdatedAt(t time.Time) *RolePanelPlacedCreate

SetUpdatedAt sets the "updated_at" field.

func (*RolePanelPlacedCreate) SetUseDisplayName

func (rppc *RolePanelPlacedCreate) SetUseDisplayName(b bool) *RolePanelPlacedCreate

SetUseDisplayName sets the "use_display_name" field.

func (*RolePanelPlacedCreate) SetUses

SetUses sets the "uses" field.

type RolePanelPlacedCreateBulk

type RolePanelPlacedCreateBulk struct {
	// contains filtered or unexported fields
}

RolePanelPlacedCreateBulk is the builder for creating many RolePanelPlaced entities in bulk.

func (*RolePanelPlacedCreateBulk) Exec

Exec executes the query.

func (*RolePanelPlacedCreateBulk) ExecX

func (rppcb *RolePanelPlacedCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelPlacedCreateBulk) Save

Save creates the RolePanelPlaced entities in the database.

func (*RolePanelPlacedCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type RolePanelPlacedDelete

type RolePanelPlacedDelete struct {
	// contains filtered or unexported fields
}

RolePanelPlacedDelete is the builder for deleting a RolePanelPlaced entity.

func (*RolePanelPlacedDelete) Exec

func (rppd *RolePanelPlacedDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RolePanelPlacedDelete) ExecX

func (rppd *RolePanelPlacedDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelPlacedDelete) Where

Where appends a list predicates to the RolePanelPlacedDelete builder.

type RolePanelPlacedDeleteOne

type RolePanelPlacedDeleteOne struct {
	// contains filtered or unexported fields
}

RolePanelPlacedDeleteOne is the builder for deleting a single RolePanelPlaced entity.

func (*RolePanelPlacedDeleteOne) Exec

func (rppdo *RolePanelPlacedDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RolePanelPlacedDeleteOne) ExecX

func (rppdo *RolePanelPlacedDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelPlacedDeleteOne) Where

Where appends a list predicates to the RolePanelPlacedDelete builder.

type RolePanelPlacedEdges

type RolePanelPlacedEdges struct {
	// Guild holds the value of the guild edge.
	Guild *Guild `json:"guild,omitempty"`
	// RolePanel holds the value of the role_panel edge.
	RolePanel *RolePanel `json:"role_panel,omitempty"`
	// contains filtered or unexported fields
}

RolePanelPlacedEdges holds the relations/edges for other nodes in the graph.

func (RolePanelPlacedEdges) GuildOrErr

func (e RolePanelPlacedEdges) 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.

func (RolePanelPlacedEdges) RolePanelOrErr

func (e RolePanelPlacedEdges) RolePanelOrErr() (*RolePanel, error)

RolePanelOrErr returns the RolePanel value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type RolePanelPlacedGroupBy

type RolePanelPlacedGroupBy struct {
	// contains filtered or unexported fields
}

RolePanelPlacedGroupBy is the group-by builder for RolePanelPlaced entities.

func (*RolePanelPlacedGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*RolePanelPlacedGroupBy) Bool

func (s *RolePanelPlacedGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedGroupBy) BoolX

func (s *RolePanelPlacedGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RolePanelPlacedGroupBy) Bools

func (s *RolePanelPlacedGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedGroupBy) BoolsX

func (s *RolePanelPlacedGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RolePanelPlacedGroupBy) Float64

func (s *RolePanelPlacedGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedGroupBy) Float64X

func (s *RolePanelPlacedGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RolePanelPlacedGroupBy) Float64s

func (s *RolePanelPlacedGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedGroupBy) Float64sX

func (s *RolePanelPlacedGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RolePanelPlacedGroupBy) Int

func (s *RolePanelPlacedGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedGroupBy) IntX

func (s *RolePanelPlacedGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RolePanelPlacedGroupBy) Ints

func (s *RolePanelPlacedGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedGroupBy) IntsX

func (s *RolePanelPlacedGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RolePanelPlacedGroupBy) Scan

func (rppgb *RolePanelPlacedGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RolePanelPlacedGroupBy) ScanX

func (s *RolePanelPlacedGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RolePanelPlacedGroupBy) String

func (s *RolePanelPlacedGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedGroupBy) StringX

func (s *RolePanelPlacedGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RolePanelPlacedGroupBy) Strings

func (s *RolePanelPlacedGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedGroupBy) StringsX

func (s *RolePanelPlacedGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RolePanelPlacedMutation

type RolePanelPlacedMutation struct {
	// contains filtered or unexported fields
}

RolePanelPlacedMutation represents an operation that mutates the RolePanelPlaced nodes in the graph.

func (*RolePanelPlacedMutation) AddButtonType

func (m *RolePanelPlacedMutation) AddButtonType(ds discord.ButtonStyle)

AddButtonType adds ds to the "button_type" field.

func (*RolePanelPlacedMutation) AddChannelID

func (m *RolePanelPlacedMutation) AddChannelID(s snowflake.ID)

AddChannelID adds s to the "channel_id" field.

func (*RolePanelPlacedMutation) AddField

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) AddMessageID

func (m *RolePanelPlacedMutation) AddMessageID(s snowflake.ID)

AddMessageID adds s to the "message_id" field.

func (*RolePanelPlacedMutation) AddUses

func (m *RolePanelPlacedMutation) AddUses(i int)

AddUses adds i to the "uses" field.

func (*RolePanelPlacedMutation) AddedButtonType

func (m *RolePanelPlacedMutation) AddedButtonType() (r discord.ButtonStyle, exists bool)

AddedButtonType returns the value that was added to the "button_type" field in this mutation.

func (*RolePanelPlacedMutation) AddedChannelID

func (m *RolePanelPlacedMutation) AddedChannelID() (r snowflake.ID, exists bool)

AddedChannelID returns the value that was added to the "channel_id" field in this mutation.

func (*RolePanelPlacedMutation) AddedEdges

func (m *RolePanelPlacedMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RolePanelPlacedMutation) AddedField

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) AddedFields

func (m *RolePanelPlacedMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RolePanelPlacedMutation) AddedIDs

func (m *RolePanelPlacedMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RolePanelPlacedMutation) AddedMessageID

func (m *RolePanelPlacedMutation) AddedMessageID() (r snowflake.ID, exists bool)

AddedMessageID returns the value that was added to the "message_id" field in this mutation.

func (*RolePanelPlacedMutation) AddedUses

func (m *RolePanelPlacedMutation) AddedUses() (r int, exists bool)

AddedUses returns the value that was added to the "uses" field in this mutation.

func (*RolePanelPlacedMutation) AppendRoles

func (m *RolePanelPlacedMutation) AppendRoles(s []schema.Role)

AppendRoles adds s to the "roles" field.

func (*RolePanelPlacedMutation) AppendedRoles

func (m *RolePanelPlacedMutation) AppendedRoles() ([]schema.Role, bool)

AppendedRoles returns the list of values that were appended to the "roles" field in this mutation.

func (*RolePanelPlacedMutation) ButtonType

func (m *RolePanelPlacedMutation) ButtonType() (r discord.ButtonStyle, exists bool)

ButtonType returns the value of the "button_type" field in the mutation.

func (*RolePanelPlacedMutation) ChannelID

func (m *RolePanelPlacedMutation) ChannelID() (r snowflake.ID, exists bool)

ChannelID returns the value of the "channel_id" field in the mutation.

func (*RolePanelPlacedMutation) ClearEdge

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) ClearField

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) ClearGuild

func (m *RolePanelPlacedMutation) ClearGuild()

ClearGuild clears the "guild" edge to the Guild entity.

func (*RolePanelPlacedMutation) ClearMessageID

func (m *RolePanelPlacedMutation) ClearMessageID()

ClearMessageID clears the value of the "message_id" field.

func (*RolePanelPlacedMutation) ClearRolePanel

func (m *RolePanelPlacedMutation) ClearRolePanel()

ClearRolePanel clears the "role_panel" edge to the RolePanel entity.

func (*RolePanelPlacedMutation) ClearRoles

func (m *RolePanelPlacedMutation) ClearRoles()

ClearRoles clears the value of the "roles" field.

func (*RolePanelPlacedMutation) ClearType

func (m *RolePanelPlacedMutation) ClearType()

ClearType clears the value of the "type" field.

func (*RolePanelPlacedMutation) ClearUpdatedAt

func (m *RolePanelPlacedMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RolePanelPlacedMutation) ClearedEdges

func (m *RolePanelPlacedMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RolePanelPlacedMutation) ClearedFields

func (m *RolePanelPlacedMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RolePanelPlacedMutation) Client

func (m RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) CreatedAt

func (m *RolePanelPlacedMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RolePanelPlacedMutation) Description

func (m *RolePanelPlacedMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*RolePanelPlacedMutation) EdgeCleared

func (m *RolePanelPlacedMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RolePanelPlacedMutation) Field

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) FieldCleared

func (m *RolePanelPlacedMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RolePanelPlacedMutation) Fields

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) FoldingSelectMenu

func (m *RolePanelPlacedMutation) FoldingSelectMenu() (r bool, exists bool)

FoldingSelectMenu returns the value of the "folding_select_menu" field in the mutation.

func (*RolePanelPlacedMutation) GetType

func (m *RolePanelPlacedMutation) GetType() (r rolepanelplaced.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*RolePanelPlacedMutation) GuildCleared

func (m *RolePanelPlacedMutation) GuildCleared() bool

GuildCleared reports if the "guild" edge to the Guild entity was cleared.

func (*RolePanelPlacedMutation) GuildID

func (m *RolePanelPlacedMutation) GuildID() (id snowflake.ID, exists bool)

GuildID returns the "guild" edge ID in the mutation.

func (*RolePanelPlacedMutation) GuildIDs

func (m *RolePanelPlacedMutation) GuildIDs() (ids []snowflake.ID)

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 (*RolePanelPlacedMutation) HideNotice

func (m *RolePanelPlacedMutation) HideNotice() (r bool, exists bool)

HideNotice returns the value of the "hide_notice" field in the mutation.

func (*RolePanelPlacedMutation) ID

func (m *RolePanelPlacedMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) MessageID

func (m *RolePanelPlacedMutation) MessageID() (r snowflake.ID, exists bool)

MessageID returns the value of the "message_id" field in the mutation.

func (*RolePanelPlacedMutation) MessageIDCleared

func (m *RolePanelPlacedMutation) MessageIDCleared() bool

MessageIDCleared returns if the "message_id" field was cleared in this mutation.

func (*RolePanelPlacedMutation) Name

func (m *RolePanelPlacedMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RolePanelPlacedMutation) OldButtonType

func (m *RolePanelPlacedMutation) OldButtonType(ctx context.Context) (v discord.ButtonStyle, err error)

OldButtonType returns the old "button_type" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldChannelID

func (m *RolePanelPlacedMutation) OldChannelID(ctx context.Context) (v snowflake.ID, err error)

OldChannelID returns the old "channel_id" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldCreatedAt

func (m *RolePanelPlacedMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldDescription

func (m *RolePanelPlacedMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldField

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) OldFoldingSelectMenu

func (m *RolePanelPlacedMutation) OldFoldingSelectMenu(ctx context.Context) (v bool, err error)

OldFoldingSelectMenu returns the old "folding_select_menu" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldHideNotice

func (m *RolePanelPlacedMutation) OldHideNotice(ctx context.Context) (v bool, err error)

OldHideNotice returns the old "hide_notice" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldMessageID

func (m *RolePanelPlacedMutation) OldMessageID(ctx context.Context) (v *snowflake.ID, err error)

OldMessageID returns the old "message_id" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldName

func (m *RolePanelPlacedMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldRoles

func (m *RolePanelPlacedMutation) OldRoles(ctx context.Context) (v []schema.Role, err error)

OldRoles returns the old "roles" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldShowName

func (m *RolePanelPlacedMutation) OldShowName(ctx context.Context) (v bool, err error)

OldShowName returns the old "show_name" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldType

OldType returns the old "type" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldUpdatedAt

func (m *RolePanelPlacedMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldUseDisplayName

func (m *RolePanelPlacedMutation) OldUseDisplayName(ctx context.Context) (v bool, err error)

OldUseDisplayName returns the old "use_display_name" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) OldUses

func (m *RolePanelPlacedMutation) OldUses(ctx context.Context) (v int, err error)

OldUses returns the old "uses" field's value of the RolePanelPlaced entity. If the RolePanelPlaced 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 (*RolePanelPlacedMutation) Op

func (m *RolePanelPlacedMutation) Op() Op

Op returns the operation name.

func (*RolePanelPlacedMutation) RemovedEdges

func (m *RolePanelPlacedMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RolePanelPlacedMutation) RemovedIDs

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) ResetButtonType

func (m *RolePanelPlacedMutation) ResetButtonType()

ResetButtonType resets all changes to the "button_type" field.

func (*RolePanelPlacedMutation) ResetChannelID

func (m *RolePanelPlacedMutation) ResetChannelID()

ResetChannelID resets all changes to the "channel_id" field.

func (*RolePanelPlacedMutation) ResetCreatedAt

func (m *RolePanelPlacedMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RolePanelPlacedMutation) ResetDescription

func (m *RolePanelPlacedMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*RolePanelPlacedMutation) ResetEdge

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) ResetField

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) ResetFoldingSelectMenu

func (m *RolePanelPlacedMutation) ResetFoldingSelectMenu()

ResetFoldingSelectMenu resets all changes to the "folding_select_menu" field.

func (*RolePanelPlacedMutation) ResetGuild

func (m *RolePanelPlacedMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*RolePanelPlacedMutation) ResetHideNotice

func (m *RolePanelPlacedMutation) ResetHideNotice()

ResetHideNotice resets all changes to the "hide_notice" field.

func (*RolePanelPlacedMutation) ResetMessageID

func (m *RolePanelPlacedMutation) ResetMessageID()

ResetMessageID resets all changes to the "message_id" field.

func (*RolePanelPlacedMutation) ResetName

func (m *RolePanelPlacedMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RolePanelPlacedMutation) ResetRolePanel

func (m *RolePanelPlacedMutation) ResetRolePanel()

ResetRolePanel resets all changes to the "role_panel" edge.

func (*RolePanelPlacedMutation) ResetRoles

func (m *RolePanelPlacedMutation) ResetRoles()

ResetRoles resets all changes to the "roles" field.

func (*RolePanelPlacedMutation) ResetShowName

func (m *RolePanelPlacedMutation) ResetShowName()

ResetShowName resets all changes to the "show_name" field.

func (*RolePanelPlacedMutation) ResetType

func (m *RolePanelPlacedMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*RolePanelPlacedMutation) ResetUpdatedAt

func (m *RolePanelPlacedMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*RolePanelPlacedMutation) ResetUseDisplayName

func (m *RolePanelPlacedMutation) ResetUseDisplayName()

ResetUseDisplayName resets all changes to the "use_display_name" field.

func (*RolePanelPlacedMutation) ResetUses

func (m *RolePanelPlacedMutation) ResetUses()

ResetUses resets all changes to the "uses" field.

func (*RolePanelPlacedMutation) RolePanelCleared

func (m *RolePanelPlacedMutation) RolePanelCleared() bool

RolePanelCleared reports if the "role_panel" edge to the RolePanel entity was cleared.

func (*RolePanelPlacedMutation) RolePanelID

func (m *RolePanelPlacedMutation) RolePanelID() (id uuid.UUID, exists bool)

RolePanelID returns the "role_panel" edge ID in the mutation.

func (*RolePanelPlacedMutation) RolePanelIDs

func (m *RolePanelPlacedMutation) RolePanelIDs() (ids []uuid.UUID)

RolePanelIDs returns the "role_panel" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RolePanelID instead. It exists only for internal usage by the builders.

func (*RolePanelPlacedMutation) Roles

func (m *RolePanelPlacedMutation) Roles() (r []schema.Role, exists bool)

Roles returns the value of the "roles" field in the mutation.

func (*RolePanelPlacedMutation) RolesCleared

func (m *RolePanelPlacedMutation) RolesCleared() bool

RolesCleared returns if the "roles" field was cleared in this mutation.

func (*RolePanelPlacedMutation) SetButtonType

func (m *RolePanelPlacedMutation) SetButtonType(ds discord.ButtonStyle)

SetButtonType sets the "button_type" field.

func (*RolePanelPlacedMutation) SetChannelID

func (m *RolePanelPlacedMutation) SetChannelID(s snowflake.ID)

SetChannelID sets the "channel_id" field.

func (*RolePanelPlacedMutation) SetCreatedAt

func (m *RolePanelPlacedMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RolePanelPlacedMutation) SetDescription

func (m *RolePanelPlacedMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*RolePanelPlacedMutation) SetField

func (m *RolePanelPlacedMutation) 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 (*RolePanelPlacedMutation) SetFoldingSelectMenu

func (m *RolePanelPlacedMutation) SetFoldingSelectMenu(b bool)

SetFoldingSelectMenu sets the "folding_select_menu" field.

func (*RolePanelPlacedMutation) SetGuildID

func (m *RolePanelPlacedMutation) SetGuildID(id snowflake.ID)

SetGuildID sets the "guild" edge to the Guild entity by id.

func (*RolePanelPlacedMutation) SetHideNotice

func (m *RolePanelPlacedMutation) SetHideNotice(b bool)

SetHideNotice sets the "hide_notice" field.

func (*RolePanelPlacedMutation) SetID

func (m *RolePanelPlacedMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of RolePanelPlaced entities.

func (*RolePanelPlacedMutation) SetMessageID

func (m *RolePanelPlacedMutation) SetMessageID(s snowflake.ID)

SetMessageID sets the "message_id" field.

func (*RolePanelPlacedMutation) SetName

func (m *RolePanelPlacedMutation) SetName(s string)

SetName sets the "name" field.

func (*RolePanelPlacedMutation) SetOp

func (m *RolePanelPlacedMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RolePanelPlacedMutation) SetRolePanelID

func (m *RolePanelPlacedMutation) SetRolePanelID(id uuid.UUID)

SetRolePanelID sets the "role_panel" edge to the RolePanel entity by id.

func (*RolePanelPlacedMutation) SetRoles

func (m *RolePanelPlacedMutation) SetRoles(s []schema.Role)

SetRoles sets the "roles" field.

func (*RolePanelPlacedMutation) SetShowName

func (m *RolePanelPlacedMutation) SetShowName(b bool)

SetShowName sets the "show_name" field.

func (*RolePanelPlacedMutation) SetType

SetType sets the "type" field.

func (*RolePanelPlacedMutation) SetUpdatedAt

func (m *RolePanelPlacedMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*RolePanelPlacedMutation) SetUseDisplayName

func (m *RolePanelPlacedMutation) SetUseDisplayName(b bool)

SetUseDisplayName sets the "use_display_name" field.

func (*RolePanelPlacedMutation) SetUses

func (m *RolePanelPlacedMutation) SetUses(i int)

SetUses sets the "uses" field.

func (*RolePanelPlacedMutation) ShowName

func (m *RolePanelPlacedMutation) ShowName() (r bool, exists bool)

ShowName returns the value of the "show_name" field in the mutation.

func (RolePanelPlacedMutation) Tx

func (m RolePanelPlacedMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RolePanelPlacedMutation) Type

func (m *RolePanelPlacedMutation) Type() string

Type returns the node type of this mutation (RolePanelPlaced).

func (*RolePanelPlacedMutation) TypeCleared

func (m *RolePanelPlacedMutation) TypeCleared() bool

TypeCleared returns if the "type" field was cleared in this mutation.

func (*RolePanelPlacedMutation) UpdatedAt

func (m *RolePanelPlacedMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*RolePanelPlacedMutation) UpdatedAtCleared

func (m *RolePanelPlacedMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*RolePanelPlacedMutation) UseDisplayName

func (m *RolePanelPlacedMutation) UseDisplayName() (r bool, exists bool)

UseDisplayName returns the value of the "use_display_name" field in the mutation.

func (*RolePanelPlacedMutation) Uses

func (m *RolePanelPlacedMutation) Uses() (r int, exists bool)

Uses returns the value of the "uses" field in the mutation.

func (*RolePanelPlacedMutation) Where

Where appends a list predicates to the RolePanelPlacedMutation builder.

func (*RolePanelPlacedMutation) WhereP

func (m *RolePanelPlacedMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RolePanelPlacedMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RolePanelPlacedQuery

type RolePanelPlacedQuery struct {
	// contains filtered or unexported fields
}

RolePanelPlacedQuery is the builder for querying RolePanelPlaced entities.

func (*RolePanelPlacedQuery) Aggregate

func (rppq *RolePanelPlacedQuery) Aggregate(fns ...AggregateFunc) *RolePanelPlacedSelect

Aggregate returns a RolePanelPlacedSelect configured with the given aggregations.

func (*RolePanelPlacedQuery) All

All executes the query and returns a list of RolePanelPlaceds.

func (*RolePanelPlacedQuery) AllX

AllX is like All, but panics if an error occurs.

func (*RolePanelPlacedQuery) Clone

Clone returns a duplicate of the RolePanelPlacedQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RolePanelPlacedQuery) Count

func (rppq *RolePanelPlacedQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RolePanelPlacedQuery) CountX

func (rppq *RolePanelPlacedQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RolePanelPlacedQuery) Exist

func (rppq *RolePanelPlacedQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RolePanelPlacedQuery) ExistX

func (rppq *RolePanelPlacedQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RolePanelPlacedQuery) First

First returns the first RolePanelPlaced entity from the query. Returns a *NotFoundError when no RolePanelPlaced was found.

func (*RolePanelPlacedQuery) FirstID

func (rppq *RolePanelPlacedQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first RolePanelPlaced ID from the query. Returns a *NotFoundError when no RolePanelPlaced ID was found.

func (*RolePanelPlacedQuery) FirstIDX

func (rppq *RolePanelPlacedQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*RolePanelPlacedQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*RolePanelPlacedQuery) GroupBy

func (rppq *RolePanelPlacedQuery) GroupBy(field string, fields ...string) *RolePanelPlacedGroupBy

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 {
	MessageID snowflake.ID `json:"message_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RolePanelPlaced.Query().
	GroupBy(rolepanelplaced.FieldMessageID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RolePanelPlacedQuery) IDs

func (rppq *RolePanelPlacedQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of RolePanelPlaced IDs.

func (*RolePanelPlacedQuery) IDsX

func (rppq *RolePanelPlacedQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*RolePanelPlacedQuery) Limit

func (rppq *RolePanelPlacedQuery) Limit(limit int) *RolePanelPlacedQuery

Limit the number of records to be returned by this query.

func (*RolePanelPlacedQuery) Offset

func (rppq *RolePanelPlacedQuery) Offset(offset int) *RolePanelPlacedQuery

Offset to start from.

func (*RolePanelPlacedQuery) Only

Only returns a single RolePanelPlaced entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RolePanelPlaced entity is found. Returns a *NotFoundError when no RolePanelPlaced entities are found.

func (*RolePanelPlacedQuery) OnlyID

func (rppq *RolePanelPlacedQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only RolePanelPlaced ID in the query. Returns a *NotSingularError when more than one RolePanelPlaced ID is found. Returns a *NotFoundError when no entities are found.

func (*RolePanelPlacedQuery) OnlyIDX

func (rppq *RolePanelPlacedQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RolePanelPlacedQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*RolePanelPlacedQuery) Order

Order specifies how the records should be ordered.

func (*RolePanelPlacedQuery) QueryGuild

func (rppq *RolePanelPlacedQuery) QueryGuild() *GuildQuery

QueryGuild chains the current query on the "guild" edge.

func (*RolePanelPlacedQuery) QueryRolePanel

func (rppq *RolePanelPlacedQuery) QueryRolePanel() *RolePanelQuery

QueryRolePanel chains the current query on the "role_panel" edge.

func (*RolePanelPlacedQuery) Select

func (rppq *RolePanelPlacedQuery) Select(fields ...string) *RolePanelPlacedSelect

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 {
	MessageID snowflake.ID `json:"message_id,omitempty"`
}

client.RolePanelPlaced.Query().
	Select(rolepanelplaced.FieldMessageID).
	Scan(ctx, &v)

func (*RolePanelPlacedQuery) Unique

func (rppq *RolePanelPlacedQuery) Unique(unique bool) *RolePanelPlacedQuery

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 (*RolePanelPlacedQuery) Where

Where adds a new predicate for the RolePanelPlacedQuery builder.

func (*RolePanelPlacedQuery) WithGuild

func (rppq *RolePanelPlacedQuery) WithGuild(opts ...func(*GuildQuery)) *RolePanelPlacedQuery

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.

func (*RolePanelPlacedQuery) WithRolePanel

func (rppq *RolePanelPlacedQuery) WithRolePanel(opts ...func(*RolePanelQuery)) *RolePanelPlacedQuery

WithRolePanel tells the query-builder to eager-load the nodes that are connected to the "role_panel" edge. The optional arguments are used to configure the query builder of the edge.

type RolePanelPlacedSelect

type RolePanelPlacedSelect struct {
	*RolePanelPlacedQuery
	// contains filtered or unexported fields
}

RolePanelPlacedSelect is the builder for selecting fields of RolePanelPlaced entities.

func (*RolePanelPlacedSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*RolePanelPlacedSelect) Bool

func (s *RolePanelPlacedSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedSelect) BoolX

func (s *RolePanelPlacedSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RolePanelPlacedSelect) Bools

func (s *RolePanelPlacedSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedSelect) BoolsX

func (s *RolePanelPlacedSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RolePanelPlacedSelect) Float64

func (s *RolePanelPlacedSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedSelect) Float64X

func (s *RolePanelPlacedSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RolePanelPlacedSelect) Float64s

func (s *RolePanelPlacedSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedSelect) Float64sX

func (s *RolePanelPlacedSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RolePanelPlacedSelect) Int

func (s *RolePanelPlacedSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedSelect) IntX

func (s *RolePanelPlacedSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RolePanelPlacedSelect) Ints

func (s *RolePanelPlacedSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedSelect) IntsX

func (s *RolePanelPlacedSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RolePanelPlacedSelect) Scan

func (rpps *RolePanelPlacedSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RolePanelPlacedSelect) ScanX

func (s *RolePanelPlacedSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RolePanelPlacedSelect) String

func (s *RolePanelPlacedSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedSelect) StringX

func (s *RolePanelPlacedSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RolePanelPlacedSelect) Strings

func (s *RolePanelPlacedSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RolePanelPlacedSelect) StringsX

func (s *RolePanelPlacedSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RolePanelPlacedUpdate

type RolePanelPlacedUpdate struct {
	// contains filtered or unexported fields
}

RolePanelPlacedUpdate is the builder for updating RolePanelPlaced entities.

func (*RolePanelPlacedUpdate) AddButtonType

AddButtonType adds ds to the "button_type" field.

func (*RolePanelPlacedUpdate) AddChannelID

AddChannelID adds s to the "channel_id" field.

func (*RolePanelPlacedUpdate) AddMessageID

AddMessageID adds s to the "message_id" field.

func (*RolePanelPlacedUpdate) AddUses

AddUses adds i to the "uses" field.

func (*RolePanelPlacedUpdate) AppendRoles

func (rppu *RolePanelPlacedUpdate) AppendRoles(s []schema.Role) *RolePanelPlacedUpdate

AppendRoles appends s to the "roles" field.

func (*RolePanelPlacedUpdate) ClearGuild

func (rppu *RolePanelPlacedUpdate) ClearGuild() *RolePanelPlacedUpdate

ClearGuild clears the "guild" edge to the Guild entity.

func (*RolePanelPlacedUpdate) ClearMessageID

func (rppu *RolePanelPlacedUpdate) ClearMessageID() *RolePanelPlacedUpdate

ClearMessageID clears the value of the "message_id" field.

func (*RolePanelPlacedUpdate) ClearRolePanel

func (rppu *RolePanelPlacedUpdate) ClearRolePanel() *RolePanelPlacedUpdate

ClearRolePanel clears the "role_panel" edge to the RolePanel entity.

func (*RolePanelPlacedUpdate) ClearRoles

func (rppu *RolePanelPlacedUpdate) ClearRoles() *RolePanelPlacedUpdate

ClearRoles clears the value of the "roles" field.

func (*RolePanelPlacedUpdate) ClearType

func (rppu *RolePanelPlacedUpdate) ClearType() *RolePanelPlacedUpdate

ClearType clears the value of the "type" field.

func (*RolePanelPlacedUpdate) ClearUpdatedAt

func (rppu *RolePanelPlacedUpdate) ClearUpdatedAt() *RolePanelPlacedUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RolePanelPlacedUpdate) Exec

func (rppu *RolePanelPlacedUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RolePanelPlacedUpdate) ExecX

func (rppu *RolePanelPlacedUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelPlacedUpdate) Mutation

Mutation returns the RolePanelPlacedMutation object of the builder.

func (*RolePanelPlacedUpdate) Save

func (rppu *RolePanelPlacedUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RolePanelPlacedUpdate) SaveX

func (rppu *RolePanelPlacedUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RolePanelPlacedUpdate) SetButtonType

SetButtonType sets the "button_type" field.

func (*RolePanelPlacedUpdate) SetChannelID

SetChannelID sets the "channel_id" field.

func (*RolePanelPlacedUpdate) SetDescription

func (rppu *RolePanelPlacedUpdate) SetDescription(s string) *RolePanelPlacedUpdate

SetDescription sets the "description" field.

func (*RolePanelPlacedUpdate) SetFoldingSelectMenu

func (rppu *RolePanelPlacedUpdate) SetFoldingSelectMenu(b bool) *RolePanelPlacedUpdate

SetFoldingSelectMenu sets the "folding_select_menu" field.

func (*RolePanelPlacedUpdate) SetGuild

SetGuild sets the "guild" edge to the Guild entity.

func (*RolePanelPlacedUpdate) SetGuildID

SetGuildID sets the "guild" edge to the Guild entity by ID.

func (*RolePanelPlacedUpdate) SetHideNotice

func (rppu *RolePanelPlacedUpdate) SetHideNotice(b bool) *RolePanelPlacedUpdate

SetHideNotice sets the "hide_notice" field.

func (*RolePanelPlacedUpdate) SetMessageID

SetMessageID sets the "message_id" field.

func (*RolePanelPlacedUpdate) SetName

SetName sets the "name" field.

func (*RolePanelPlacedUpdate) SetNillableButtonType

func (rppu *RolePanelPlacedUpdate) SetNillableButtonType(ds *discord.ButtonStyle) *RolePanelPlacedUpdate

SetNillableButtonType sets the "button_type" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableChannelID

func (rppu *RolePanelPlacedUpdate) SetNillableChannelID(s *snowflake.ID) *RolePanelPlacedUpdate

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableDescription

func (rppu *RolePanelPlacedUpdate) SetNillableDescription(s *string) *RolePanelPlacedUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableFoldingSelectMenu

func (rppu *RolePanelPlacedUpdate) SetNillableFoldingSelectMenu(b *bool) *RolePanelPlacedUpdate

SetNillableFoldingSelectMenu sets the "folding_select_menu" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableHideNotice

func (rppu *RolePanelPlacedUpdate) SetNillableHideNotice(b *bool) *RolePanelPlacedUpdate

SetNillableHideNotice sets the "hide_notice" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableMessageID

func (rppu *RolePanelPlacedUpdate) SetNillableMessageID(s *snowflake.ID) *RolePanelPlacedUpdate

SetNillableMessageID sets the "message_id" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableName

func (rppu *RolePanelPlacedUpdate) SetNillableName(s *string) *RolePanelPlacedUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableShowName

func (rppu *RolePanelPlacedUpdate) SetNillableShowName(b *bool) *RolePanelPlacedUpdate

SetNillableShowName sets the "show_name" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableType

SetNillableType sets the "type" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableUpdatedAt

func (rppu *RolePanelPlacedUpdate) SetNillableUpdatedAt(t *time.Time) *RolePanelPlacedUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableUseDisplayName

func (rppu *RolePanelPlacedUpdate) SetNillableUseDisplayName(b *bool) *RolePanelPlacedUpdate

SetNillableUseDisplayName sets the "use_display_name" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetNillableUses

func (rppu *RolePanelPlacedUpdate) SetNillableUses(i *int) *RolePanelPlacedUpdate

SetNillableUses sets the "uses" field if the given value is not nil.

func (*RolePanelPlacedUpdate) SetRolePanel

func (rppu *RolePanelPlacedUpdate) SetRolePanel(r *RolePanel) *RolePanelPlacedUpdate

SetRolePanel sets the "role_panel" edge to the RolePanel entity.

func (*RolePanelPlacedUpdate) SetRolePanelID

func (rppu *RolePanelPlacedUpdate) SetRolePanelID(id uuid.UUID) *RolePanelPlacedUpdate

SetRolePanelID sets the "role_panel" edge to the RolePanel entity by ID.

func (*RolePanelPlacedUpdate) SetRoles

SetRoles sets the "roles" field.

func (*RolePanelPlacedUpdate) SetShowName

func (rppu *RolePanelPlacedUpdate) SetShowName(b bool) *RolePanelPlacedUpdate

SetShowName sets the "show_name" field.

func (*RolePanelPlacedUpdate) SetType

SetType sets the "type" field.

func (*RolePanelPlacedUpdate) SetUpdatedAt

func (rppu *RolePanelPlacedUpdate) SetUpdatedAt(t time.Time) *RolePanelPlacedUpdate

SetUpdatedAt sets the "updated_at" field.

func (*RolePanelPlacedUpdate) SetUseDisplayName

func (rppu *RolePanelPlacedUpdate) SetUseDisplayName(b bool) *RolePanelPlacedUpdate

SetUseDisplayName sets the "use_display_name" field.

func (*RolePanelPlacedUpdate) SetUses

SetUses sets the "uses" field.

func (*RolePanelPlacedUpdate) Where

Where appends a list predicates to the RolePanelPlacedUpdate builder.

type RolePanelPlacedUpdateOne

type RolePanelPlacedUpdateOne struct {
	// contains filtered or unexported fields
}

RolePanelPlacedUpdateOne is the builder for updating a single RolePanelPlaced entity.

func (*RolePanelPlacedUpdateOne) AddButtonType

AddButtonType adds ds to the "button_type" field.

func (*RolePanelPlacedUpdateOne) AddChannelID

AddChannelID adds s to the "channel_id" field.

func (*RolePanelPlacedUpdateOne) AddMessageID

AddMessageID adds s to the "message_id" field.

func (*RolePanelPlacedUpdateOne) AddUses

AddUses adds i to the "uses" field.

func (*RolePanelPlacedUpdateOne) AppendRoles

AppendRoles appends s to the "roles" field.

func (*RolePanelPlacedUpdateOne) ClearGuild

ClearGuild clears the "guild" edge to the Guild entity.

func (*RolePanelPlacedUpdateOne) ClearMessageID

func (rppuo *RolePanelPlacedUpdateOne) ClearMessageID() *RolePanelPlacedUpdateOne

ClearMessageID clears the value of the "message_id" field.

func (*RolePanelPlacedUpdateOne) ClearRolePanel

func (rppuo *RolePanelPlacedUpdateOne) ClearRolePanel() *RolePanelPlacedUpdateOne

ClearRolePanel clears the "role_panel" edge to the RolePanel entity.

func (*RolePanelPlacedUpdateOne) ClearRoles

ClearRoles clears the value of the "roles" field.

func (*RolePanelPlacedUpdateOne) ClearType

ClearType clears the value of the "type" field.

func (*RolePanelPlacedUpdateOne) ClearUpdatedAt

func (rppuo *RolePanelPlacedUpdateOne) ClearUpdatedAt() *RolePanelPlacedUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RolePanelPlacedUpdateOne) Exec

func (rppuo *RolePanelPlacedUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RolePanelPlacedUpdateOne) ExecX

func (rppuo *RolePanelPlacedUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelPlacedUpdateOne) Mutation

Mutation returns the RolePanelPlacedMutation object of the builder.

func (*RolePanelPlacedUpdateOne) Save

Save executes the query and returns the updated RolePanelPlaced entity.

func (*RolePanelPlacedUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*RolePanelPlacedUpdateOne) Select

func (rppuo *RolePanelPlacedUpdateOne) Select(field string, fields ...string) *RolePanelPlacedUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RolePanelPlacedUpdateOne) SetButtonType

SetButtonType sets the "button_type" field.

func (*RolePanelPlacedUpdateOne) SetChannelID

SetChannelID sets the "channel_id" field.

func (*RolePanelPlacedUpdateOne) SetDescription

func (rppuo *RolePanelPlacedUpdateOne) SetDescription(s string) *RolePanelPlacedUpdateOne

SetDescription sets the "description" field.

func (*RolePanelPlacedUpdateOne) SetFoldingSelectMenu

func (rppuo *RolePanelPlacedUpdateOne) SetFoldingSelectMenu(b bool) *RolePanelPlacedUpdateOne

SetFoldingSelectMenu sets the "folding_select_menu" field.

func (*RolePanelPlacedUpdateOne) SetGuild

SetGuild sets the "guild" edge to the Guild entity.

func (*RolePanelPlacedUpdateOne) SetGuildID

SetGuildID sets the "guild" edge to the Guild entity by ID.

func (*RolePanelPlacedUpdateOne) SetHideNotice

func (rppuo *RolePanelPlacedUpdateOne) SetHideNotice(b bool) *RolePanelPlacedUpdateOne

SetHideNotice sets the "hide_notice" field.

func (*RolePanelPlacedUpdateOne) SetMessageID

SetMessageID sets the "message_id" field.

func (*RolePanelPlacedUpdateOne) SetName

SetName sets the "name" field.

func (*RolePanelPlacedUpdateOne) SetNillableButtonType

func (rppuo *RolePanelPlacedUpdateOne) SetNillableButtonType(ds *discord.ButtonStyle) *RolePanelPlacedUpdateOne

SetNillableButtonType sets the "button_type" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableChannelID

func (rppuo *RolePanelPlacedUpdateOne) SetNillableChannelID(s *snowflake.ID) *RolePanelPlacedUpdateOne

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableDescription

func (rppuo *RolePanelPlacedUpdateOne) SetNillableDescription(s *string) *RolePanelPlacedUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableFoldingSelectMenu

func (rppuo *RolePanelPlacedUpdateOne) SetNillableFoldingSelectMenu(b *bool) *RolePanelPlacedUpdateOne

SetNillableFoldingSelectMenu sets the "folding_select_menu" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableHideNotice

func (rppuo *RolePanelPlacedUpdateOne) SetNillableHideNotice(b *bool) *RolePanelPlacedUpdateOne

SetNillableHideNotice sets the "hide_notice" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableMessageID

func (rppuo *RolePanelPlacedUpdateOne) SetNillableMessageID(s *snowflake.ID) *RolePanelPlacedUpdateOne

SetNillableMessageID sets the "message_id" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableName

func (rppuo *RolePanelPlacedUpdateOne) SetNillableName(s *string) *RolePanelPlacedUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableShowName

func (rppuo *RolePanelPlacedUpdateOne) SetNillableShowName(b *bool) *RolePanelPlacedUpdateOne

SetNillableShowName sets the "show_name" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableType

SetNillableType sets the "type" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableUpdatedAt

func (rppuo *RolePanelPlacedUpdateOne) SetNillableUpdatedAt(t *time.Time) *RolePanelPlacedUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableUseDisplayName

func (rppuo *RolePanelPlacedUpdateOne) SetNillableUseDisplayName(b *bool) *RolePanelPlacedUpdateOne

SetNillableUseDisplayName sets the "use_display_name" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetNillableUses

func (rppuo *RolePanelPlacedUpdateOne) SetNillableUses(i *int) *RolePanelPlacedUpdateOne

SetNillableUses sets the "uses" field if the given value is not nil.

func (*RolePanelPlacedUpdateOne) SetRolePanel

SetRolePanel sets the "role_panel" edge to the RolePanel entity.

func (*RolePanelPlacedUpdateOne) SetRolePanelID

func (rppuo *RolePanelPlacedUpdateOne) SetRolePanelID(id uuid.UUID) *RolePanelPlacedUpdateOne

SetRolePanelID sets the "role_panel" edge to the RolePanel entity by ID.

func (*RolePanelPlacedUpdateOne) SetRoles

SetRoles sets the "roles" field.

func (*RolePanelPlacedUpdateOne) SetShowName

SetShowName sets the "show_name" field.

func (*RolePanelPlacedUpdateOne) SetType

SetType sets the "type" field.

func (*RolePanelPlacedUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*RolePanelPlacedUpdateOne) SetUseDisplayName

func (rppuo *RolePanelPlacedUpdateOne) SetUseDisplayName(b bool) *RolePanelPlacedUpdateOne

SetUseDisplayName sets the "use_display_name" field.

func (*RolePanelPlacedUpdateOne) SetUses

SetUses sets the "uses" field.

func (*RolePanelPlacedUpdateOne) Where

Where appends a list predicates to the RolePanelPlacedUpdate builder.

type RolePanelPlaceds

type RolePanelPlaceds []*RolePanelPlaced

RolePanelPlaceds is a parsable slice of RolePanelPlaced.

type RolePanelQuery

type RolePanelQuery struct {
	// contains filtered or unexported fields
}

RolePanelQuery is the builder for querying RolePanel entities.

func (*RolePanelQuery) Aggregate

func (rpq *RolePanelQuery) Aggregate(fns ...AggregateFunc) *RolePanelSelect

Aggregate returns a RolePanelSelect configured with the given aggregations.

func (*RolePanelQuery) All

func (rpq *RolePanelQuery) All(ctx context.Context) ([]*RolePanel, error)

All executes the query and returns a list of RolePanels.

func (*RolePanelQuery) AllX

func (rpq *RolePanelQuery) AllX(ctx context.Context) []*RolePanel

AllX is like All, but panics if an error occurs.

func (*RolePanelQuery) Clone

func (rpq *RolePanelQuery) Clone() *RolePanelQuery

Clone returns a duplicate of the RolePanelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RolePanelQuery) Count

func (rpq *RolePanelQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RolePanelQuery) CountX

func (rpq *RolePanelQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RolePanelQuery) Exist

func (rpq *RolePanelQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RolePanelQuery) ExistX

func (rpq *RolePanelQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RolePanelQuery) First

func (rpq *RolePanelQuery) First(ctx context.Context) (*RolePanel, error)

First returns the first RolePanel entity from the query. Returns a *NotFoundError when no RolePanel was found.

func (*RolePanelQuery) FirstID

func (rpq *RolePanelQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first RolePanel ID from the query. Returns a *NotFoundError when no RolePanel ID was found.

func (*RolePanelQuery) FirstIDX

func (rpq *RolePanelQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*RolePanelQuery) FirstX

func (rpq *RolePanelQuery) FirstX(ctx context.Context) *RolePanel

FirstX is like First, but panics if an error occurs.

func (*RolePanelQuery) GroupBy

func (rpq *RolePanelQuery) GroupBy(field string, fields ...string) *RolePanelGroupBy

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RolePanel.Query().
	GroupBy(rolepanel.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RolePanelQuery) IDs

func (rpq *RolePanelQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of RolePanel IDs.

func (*RolePanelQuery) IDsX

func (rpq *RolePanelQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*RolePanelQuery) Limit

func (rpq *RolePanelQuery) Limit(limit int) *RolePanelQuery

Limit the number of records to be returned by this query.

func (*RolePanelQuery) Offset

func (rpq *RolePanelQuery) Offset(offset int) *RolePanelQuery

Offset to start from.

func (*RolePanelQuery) Only

func (rpq *RolePanelQuery) Only(ctx context.Context) (*RolePanel, error)

Only returns a single RolePanel entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RolePanel entity is found. Returns a *NotFoundError when no RolePanel entities are found.

func (*RolePanelQuery) OnlyID

func (rpq *RolePanelQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only RolePanel ID in the query. Returns a *NotSingularError when more than one RolePanel ID is found. Returns a *NotFoundError when no entities are found.

func (*RolePanelQuery) OnlyIDX

func (rpq *RolePanelQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RolePanelQuery) OnlyX

func (rpq *RolePanelQuery) OnlyX(ctx context.Context) *RolePanel

OnlyX is like Only, but panics if an error occurs.

func (*RolePanelQuery) Order

Order specifies how the records should be ordered.

func (*RolePanelQuery) QueryEdit

func (rpq *RolePanelQuery) QueryEdit() *RolePanelEditQuery

QueryEdit chains the current query on the "edit" edge.

func (*RolePanelQuery) QueryGuild

func (rpq *RolePanelQuery) QueryGuild() *GuildQuery

QueryGuild chains the current query on the "guild" edge.

func (*RolePanelQuery) QueryPlacements

func (rpq *RolePanelQuery) QueryPlacements() *RolePanelPlacedQuery

QueryPlacements chains the current query on the "placements" edge.

func (*RolePanelQuery) Select

func (rpq *RolePanelQuery) Select(fields ...string) *RolePanelSelect

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 {
	Name string `json:"name,omitempty"`
}

client.RolePanel.Query().
	Select(rolepanel.FieldName).
	Scan(ctx, &v)

func (*RolePanelQuery) Unique

func (rpq *RolePanelQuery) Unique(unique bool) *RolePanelQuery

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 (*RolePanelQuery) Where

func (rpq *RolePanelQuery) Where(ps ...predicate.RolePanel) *RolePanelQuery

Where adds a new predicate for the RolePanelQuery builder.

func (*RolePanelQuery) WithEdit

func (rpq *RolePanelQuery) WithEdit(opts ...func(*RolePanelEditQuery)) *RolePanelQuery

WithEdit tells the query-builder to eager-load the nodes that are connected to the "edit" edge. The optional arguments are used to configure the query builder of the edge.

func (*RolePanelQuery) WithGuild

func (rpq *RolePanelQuery) WithGuild(opts ...func(*GuildQuery)) *RolePanelQuery

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.

func (*RolePanelQuery) WithPlacements

func (rpq *RolePanelQuery) WithPlacements(opts ...func(*RolePanelPlacedQuery)) *RolePanelQuery

WithPlacements tells the query-builder to eager-load the nodes that are connected to the "placements" edge. The optional arguments are used to configure the query builder of the edge.

type RolePanelSelect

type RolePanelSelect struct {
	*RolePanelQuery
	// contains filtered or unexported fields
}

RolePanelSelect is the builder for selecting fields of RolePanel entities.

func (*RolePanelSelect) Aggregate

func (rps *RolePanelSelect) Aggregate(fns ...AggregateFunc) *RolePanelSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RolePanelSelect) Bool

func (s *RolePanelSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RolePanelSelect) BoolX

func (s *RolePanelSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RolePanelSelect) Bools

func (s *RolePanelSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RolePanelSelect) BoolsX

func (s *RolePanelSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RolePanelSelect) Float64

func (s *RolePanelSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RolePanelSelect) Float64X

func (s *RolePanelSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RolePanelSelect) Float64s

func (s *RolePanelSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RolePanelSelect) Float64sX

func (s *RolePanelSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RolePanelSelect) Int

func (s *RolePanelSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RolePanelSelect) IntX

func (s *RolePanelSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RolePanelSelect) Ints

func (s *RolePanelSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RolePanelSelect) IntsX

func (s *RolePanelSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RolePanelSelect) Scan

func (rps *RolePanelSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RolePanelSelect) ScanX

func (s *RolePanelSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RolePanelSelect) String

func (s *RolePanelSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RolePanelSelect) StringX

func (s *RolePanelSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RolePanelSelect) Strings

func (s *RolePanelSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RolePanelSelect) StringsX

func (s *RolePanelSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RolePanelUpdate

type RolePanelUpdate struct {
	// contains filtered or unexported fields
}

RolePanelUpdate is the builder for updating RolePanel entities.

func (*RolePanelUpdate) AddPlacementIDs

func (rpu *RolePanelUpdate) AddPlacementIDs(ids ...uuid.UUID) *RolePanelUpdate

AddPlacementIDs adds the "placements" edge to the RolePanelPlaced entity by IDs.

func (*RolePanelUpdate) AddPlacements

func (rpu *RolePanelUpdate) AddPlacements(r ...*RolePanelPlaced) *RolePanelUpdate

AddPlacements adds the "placements" edges to the RolePanelPlaced entity.

func (*RolePanelUpdate) AppendRoles

func (rpu *RolePanelUpdate) AppendRoles(s []schema.Role) *RolePanelUpdate

AppendRoles appends s to the "roles" field.

func (*RolePanelUpdate) ClearAppliedAt

func (rpu *RolePanelUpdate) ClearAppliedAt() *RolePanelUpdate

ClearAppliedAt clears the value of the "applied_at" field.

func (*RolePanelUpdate) ClearEdit

func (rpu *RolePanelUpdate) ClearEdit() *RolePanelUpdate

ClearEdit clears the "edit" edge to the RolePanelEdit entity.

func (*RolePanelUpdate) ClearGuild

func (rpu *RolePanelUpdate) ClearGuild() *RolePanelUpdate

ClearGuild clears the "guild" edge to the Guild entity.

func (*RolePanelUpdate) ClearPlacements

func (rpu *RolePanelUpdate) ClearPlacements() *RolePanelUpdate

ClearPlacements clears all "placements" edges to the RolePanelPlaced entity.

func (*RolePanelUpdate) ClearRoles

func (rpu *RolePanelUpdate) ClearRoles() *RolePanelUpdate

ClearRoles clears the value of the "roles" field.

func (*RolePanelUpdate) ClearUpdatedAt

func (rpu *RolePanelUpdate) ClearUpdatedAt() *RolePanelUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RolePanelUpdate) Exec

func (rpu *RolePanelUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RolePanelUpdate) ExecX

func (rpu *RolePanelUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelUpdate) Mutation

func (rpu *RolePanelUpdate) Mutation() *RolePanelMutation

Mutation returns the RolePanelMutation object of the builder.

func (*RolePanelUpdate) RemovePlacementIDs

func (rpu *RolePanelUpdate) RemovePlacementIDs(ids ...uuid.UUID) *RolePanelUpdate

RemovePlacementIDs removes the "placements" edge to RolePanelPlaced entities by IDs.

func (*RolePanelUpdate) RemovePlacements

func (rpu *RolePanelUpdate) RemovePlacements(r ...*RolePanelPlaced) *RolePanelUpdate

RemovePlacements removes "placements" edges to RolePanelPlaced entities.

func (*RolePanelUpdate) Save

func (rpu *RolePanelUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RolePanelUpdate) SaveX

func (rpu *RolePanelUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RolePanelUpdate) SetAppliedAt

func (rpu *RolePanelUpdate) SetAppliedAt(t time.Time) *RolePanelUpdate

SetAppliedAt sets the "applied_at" field.

func (*RolePanelUpdate) SetDescription

func (rpu *RolePanelUpdate) SetDescription(s string) *RolePanelUpdate

SetDescription sets the "description" field.

func (*RolePanelUpdate) SetEdit

func (rpu *RolePanelUpdate) SetEdit(r *RolePanelEdit) *RolePanelUpdate

SetEdit sets the "edit" edge to the RolePanelEdit entity.

func (*RolePanelUpdate) SetEditID

func (rpu *RolePanelUpdate) SetEditID(id uuid.UUID) *RolePanelUpdate

SetEditID sets the "edit" edge to the RolePanelEdit entity by ID.

func (*RolePanelUpdate) SetGuild

func (rpu *RolePanelUpdate) SetGuild(g *Guild) *RolePanelUpdate

SetGuild sets the "guild" edge to the Guild entity.

func (*RolePanelUpdate) SetGuildID

func (rpu *RolePanelUpdate) SetGuildID(id snowflake.ID) *RolePanelUpdate

SetGuildID sets the "guild" edge to the Guild entity by ID.

func (*RolePanelUpdate) SetName

func (rpu *RolePanelUpdate) SetName(s string) *RolePanelUpdate

SetName sets the "name" field.

func (*RolePanelUpdate) SetNillableAppliedAt

func (rpu *RolePanelUpdate) SetNillableAppliedAt(t *time.Time) *RolePanelUpdate

SetNillableAppliedAt sets the "applied_at" field if the given value is not nil.

func (*RolePanelUpdate) SetNillableDescription

func (rpu *RolePanelUpdate) SetNillableDescription(s *string) *RolePanelUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RolePanelUpdate) SetNillableEditID

func (rpu *RolePanelUpdate) SetNillableEditID(id *uuid.UUID) *RolePanelUpdate

SetNillableEditID sets the "edit" edge to the RolePanelEdit entity by ID if the given value is not nil.

func (*RolePanelUpdate) SetNillableName

func (rpu *RolePanelUpdate) SetNillableName(s *string) *RolePanelUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*RolePanelUpdate) SetNillableUpdatedAt

func (rpu *RolePanelUpdate) SetNillableUpdatedAt(t *time.Time) *RolePanelUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RolePanelUpdate) SetRoles

func (rpu *RolePanelUpdate) SetRoles(s []schema.Role) *RolePanelUpdate

SetRoles sets the "roles" field.

func (*RolePanelUpdate) SetUpdatedAt

func (rpu *RolePanelUpdate) SetUpdatedAt(t time.Time) *RolePanelUpdate

SetUpdatedAt sets the "updated_at" field.

func (*RolePanelUpdate) Where

Where appends a list predicates to the RolePanelUpdate builder.

type RolePanelUpdateOne

type RolePanelUpdateOne struct {
	// contains filtered or unexported fields
}

RolePanelUpdateOne is the builder for updating a single RolePanel entity.

func (*RolePanelUpdateOne) AddPlacementIDs

func (rpuo *RolePanelUpdateOne) AddPlacementIDs(ids ...uuid.UUID) *RolePanelUpdateOne

AddPlacementIDs adds the "placements" edge to the RolePanelPlaced entity by IDs.

func (*RolePanelUpdateOne) AddPlacements

func (rpuo *RolePanelUpdateOne) AddPlacements(r ...*RolePanelPlaced) *RolePanelUpdateOne

AddPlacements adds the "placements" edges to the RolePanelPlaced entity.

func (*RolePanelUpdateOne) AppendRoles

func (rpuo *RolePanelUpdateOne) AppendRoles(s []schema.Role) *RolePanelUpdateOne

AppendRoles appends s to the "roles" field.

func (*RolePanelUpdateOne) ClearAppliedAt

func (rpuo *RolePanelUpdateOne) ClearAppliedAt() *RolePanelUpdateOne

ClearAppliedAt clears the value of the "applied_at" field.

func (*RolePanelUpdateOne) ClearEdit

func (rpuo *RolePanelUpdateOne) ClearEdit() *RolePanelUpdateOne

ClearEdit clears the "edit" edge to the RolePanelEdit entity.

func (*RolePanelUpdateOne) ClearGuild

func (rpuo *RolePanelUpdateOne) ClearGuild() *RolePanelUpdateOne

ClearGuild clears the "guild" edge to the Guild entity.

func (*RolePanelUpdateOne) ClearPlacements

func (rpuo *RolePanelUpdateOne) ClearPlacements() *RolePanelUpdateOne

ClearPlacements clears all "placements" edges to the RolePanelPlaced entity.

func (*RolePanelUpdateOne) ClearRoles

func (rpuo *RolePanelUpdateOne) ClearRoles() *RolePanelUpdateOne

ClearRoles clears the value of the "roles" field.

func (*RolePanelUpdateOne) ClearUpdatedAt

func (rpuo *RolePanelUpdateOne) ClearUpdatedAt() *RolePanelUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RolePanelUpdateOne) Exec

func (rpuo *RolePanelUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RolePanelUpdateOne) ExecX

func (rpuo *RolePanelUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RolePanelUpdateOne) Mutation

func (rpuo *RolePanelUpdateOne) Mutation() *RolePanelMutation

Mutation returns the RolePanelMutation object of the builder.

func (*RolePanelUpdateOne) RemovePlacementIDs

func (rpuo *RolePanelUpdateOne) RemovePlacementIDs(ids ...uuid.UUID) *RolePanelUpdateOne

RemovePlacementIDs removes the "placements" edge to RolePanelPlaced entities by IDs.

func (*RolePanelUpdateOne) RemovePlacements

func (rpuo *RolePanelUpdateOne) RemovePlacements(r ...*RolePanelPlaced) *RolePanelUpdateOne

RemovePlacements removes "placements" edges to RolePanelPlaced entities.

func (*RolePanelUpdateOne) Save

func (rpuo *RolePanelUpdateOne) Save(ctx context.Context) (*RolePanel, error)

Save executes the query and returns the updated RolePanel entity.

func (*RolePanelUpdateOne) SaveX

func (rpuo *RolePanelUpdateOne) SaveX(ctx context.Context) *RolePanel

SaveX is like Save, but panics if an error occurs.

func (*RolePanelUpdateOne) Select

func (rpuo *RolePanelUpdateOne) Select(field string, fields ...string) *RolePanelUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RolePanelUpdateOne) SetAppliedAt

func (rpuo *RolePanelUpdateOne) SetAppliedAt(t time.Time) *RolePanelUpdateOne

SetAppliedAt sets the "applied_at" field.

func (*RolePanelUpdateOne) SetDescription

func (rpuo *RolePanelUpdateOne) SetDescription(s string) *RolePanelUpdateOne

SetDescription sets the "description" field.

func (*RolePanelUpdateOne) SetEdit

SetEdit sets the "edit" edge to the RolePanelEdit entity.

func (*RolePanelUpdateOne) SetEditID

func (rpuo *RolePanelUpdateOne) SetEditID(id uuid.UUID) *RolePanelUpdateOne

SetEditID sets the "edit" edge to the RolePanelEdit entity by ID.

func (*RolePanelUpdateOne) SetGuild

func (rpuo *RolePanelUpdateOne) SetGuild(g *Guild) *RolePanelUpdateOne

SetGuild sets the "guild" edge to the Guild entity.

func (*RolePanelUpdateOne) SetGuildID

func (rpuo *RolePanelUpdateOne) SetGuildID(id snowflake.ID) *RolePanelUpdateOne

SetGuildID sets the "guild" edge to the Guild entity by ID.

func (*RolePanelUpdateOne) SetName

func (rpuo *RolePanelUpdateOne) SetName(s string) *RolePanelUpdateOne

SetName sets the "name" field.

func (*RolePanelUpdateOne) SetNillableAppliedAt

func (rpuo *RolePanelUpdateOne) SetNillableAppliedAt(t *time.Time) *RolePanelUpdateOne

SetNillableAppliedAt sets the "applied_at" field if the given value is not nil.

func (*RolePanelUpdateOne) SetNillableDescription

func (rpuo *RolePanelUpdateOne) SetNillableDescription(s *string) *RolePanelUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RolePanelUpdateOne) SetNillableEditID

func (rpuo *RolePanelUpdateOne) SetNillableEditID(id *uuid.UUID) *RolePanelUpdateOne

SetNillableEditID sets the "edit" edge to the RolePanelEdit entity by ID if the given value is not nil.

func (*RolePanelUpdateOne) SetNillableName

func (rpuo *RolePanelUpdateOne) SetNillableName(s *string) *RolePanelUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*RolePanelUpdateOne) SetNillableUpdatedAt

func (rpuo *RolePanelUpdateOne) SetNillableUpdatedAt(t *time.Time) *RolePanelUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RolePanelUpdateOne) SetRoles

func (rpuo *RolePanelUpdateOne) SetRoles(s []schema.Role) *RolePanelUpdateOne

SetRoles sets the "roles" field.

func (*RolePanelUpdateOne) SetUpdatedAt

func (rpuo *RolePanelUpdateOne) SetUpdatedAt(t time.Time) *RolePanelUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*RolePanelUpdateOne) Where

Where appends a list predicates to the RolePanelUpdate builder.

type RolePanels

type RolePanels []*RolePanel

RolePanels is a parsable slice of RolePanel.

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
	// Member is the client for interacting with the Member builders.
	Member *MemberClient
	// MessagePin is the client for interacting with the MessagePin builders.
	MessagePin *MessagePinClient
	// MessageRemind is the client for interacting with the MessageRemind builders.
	MessageRemind *MessageRemindClient
	// RolePanel is the client for interacting with the RolePanel builders.
	RolePanel *RolePanelClient
	// RolePanelEdit is the client for interacting with the RolePanelEdit builders.
	RolePanelEdit *RolePanelEditClient
	// RolePanelPlaced is the client for interacting with the RolePanelPlaced builders.
	RolePanelPlaced *RolePanelPlacedClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// WordSuffix is the client for interacting with the WordSuffix builders.
	WordSuffix *WordSuffixClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type User

type User struct {

	// ID of the ent.
	ID snowflake.ID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Locale holds the value of the "locale" field.
	Locale discord.Locale `json:"locale,omitempty"`
	// Xp holds the value of the "xp" field.
	Xp xppoint.XP `json:"xp,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) QueryGuilds

func (u *User) QueryGuilds() *MemberQuery

QueryGuilds queries the "guilds" edge of the User entity.

func (*User) QueryOwnGuilds

func (u *User) QueryOwnGuilds() *GuildQuery

QueryOwnGuilds queries the "own_guilds" edge of the User entity.

func (*User) QueryWordSuffix

func (u *User) QueryWordSuffix() *WordSuffixQuery

QueryWordSuffix queries the "word_suffix" edge of the User entity.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

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 snowflake.ID) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id snowflake.ID) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id snowflake.ID) *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) MapCreateBulk

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryGuilds

func (c *UserClient) QueryGuilds(u *User) *MemberQuery

QueryGuilds queries the guilds edge of a User.

func (*UserClient) QueryOwnGuilds

func (c *UserClient) QueryOwnGuilds(u *User) *GuildQuery

QueryOwnGuilds queries the own_guilds edge of a User.

func (*UserClient) QueryWordSuffix

func (c *UserClient) QueryWordSuffix(u *User) *WordSuffixQuery

QueryWordSuffix queries the word_suffix 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 snowflake.ID) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddGuildIDs

func (uc *UserCreate) AddGuildIDs(ids ...int) *UserCreate

AddGuildIDs adds the "guilds" edge to the Member entity by IDs.

func (*UserCreate) AddGuilds

func (uc *UserCreate) AddGuilds(m ...*Member) *UserCreate

AddGuilds adds the "guilds" edges to the Member entity.

func (*UserCreate) AddOwnGuildIDs

func (uc *UserCreate) AddOwnGuildIDs(ids ...snowflake.ID) *UserCreate

AddOwnGuildIDs adds the "own_guilds" edge to the Guild entity by IDs.

func (*UserCreate) AddOwnGuilds

func (uc *UserCreate) AddOwnGuilds(g ...*Guild) *UserCreate

AddOwnGuilds adds the "own_guilds" edges to the Guild entity.

func (*UserCreate) AddWordSuffix

func (uc *UserCreate) AddWordSuffix(w ...*WordSuffix) *UserCreate

AddWordSuffix adds the "word_suffix" edges to the WordSuffix entity.

func (*UserCreate) AddWordSuffixIDs

func (uc *UserCreate) AddWordSuffixIDs(ids ...uuid.UUID) *UserCreate

AddWordSuffixIDs adds the "word_suffix" edge to the WordSuffix entity by IDs.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetCreatedAt

func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(s snowflake.ID) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetLocale

func (uc *UserCreate) SetLocale(d discord.Locale) *UserCreate

SetLocale sets the "locale" field.

func (*UserCreate) SetName

func (uc *UserCreate) SetName(s string) *UserCreate

SetName sets the "name" field.

func (*UserCreate) SetNillableCreatedAt

func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableLocale

func (uc *UserCreate) SetNillableLocale(d *discord.Locale) *UserCreate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*UserCreate) SetNillableXp

func (uc *UserCreate) SetNillableXp(x *xppoint.XP) *UserCreate

SetNillableXp sets the "xp" field if the given value is not nil.

func (*UserCreate) SetXp

func (uc *UserCreate) SetXp(x xppoint.XP) *UserCreate

SetXp sets the "xp" 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) 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 UserEdges

type UserEdges struct {
	// OwnGuilds holds the value of the own_guilds edge.
	OwnGuilds []*Guild `json:"own_guilds,omitempty"`
	// Guilds holds the value of the guilds edge.
	Guilds []*Member `json:"guilds,omitempty"`
	// WordSuffix holds the value of the word_suffix edge.
	WordSuffix []*WordSuffix `json:"word_suffix,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) GuildsOrErr

func (e UserEdges) GuildsOrErr() ([]*Member, error)

GuildsOrErr returns the Guilds value or an error if the edge was not loaded in eager-loading.

func (UserEdges) OwnGuildsOrErr

func (e UserEdges) OwnGuildsOrErr() ([]*Guild, error)

OwnGuildsOrErr returns the OwnGuilds value or an error if the edge was not loaded in eager-loading.

func (UserEdges) WordSuffixOrErr

func (e UserEdges) WordSuffixOrErr() ([]*WordSuffix, error)

WordSuffixOrErr returns the WordSuffix value or an error if the edge was not loaded in eager-loading.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) 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) AddGuildIDs

func (m *UserMutation) AddGuildIDs(ids ...int)

AddGuildIDs adds the "guilds" edge to the Member entity by ids.

func (*UserMutation) AddOwnGuildIDs

func (m *UserMutation) AddOwnGuildIDs(ids ...snowflake.ID)

AddOwnGuildIDs adds the "own_guilds" edge to the Guild entity by ids.

func (*UserMutation) AddWordSuffixIDs

func (m *UserMutation) AddWordSuffixIDs(ids ...uuid.UUID)

AddWordSuffixIDs adds the "word_suffix" edge to the WordSuffix entity by ids.

func (*UserMutation) AddXp

func (m *UserMutation) AddXp(x xppoint.XP)

AddXp adds x to the "xp" field.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) AddedXp

func (m *UserMutation) AddedXp() (r xppoint.XP, exists bool)

AddedXp returns the value that was added to the "xp" field in this mutation.

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) ClearGuilds

func (m *UserMutation) ClearGuilds()

ClearGuilds clears the "guilds" edge to the Member entity.

func (*UserMutation) ClearOwnGuilds

func (m *UserMutation) ClearOwnGuilds()

ClearOwnGuilds clears the "own_guilds" edge to the Guild entity.

func (*UserMutation) ClearWordSuffix

func (m *UserMutation) ClearWordSuffix()

ClearWordSuffix clears the "word_suffix" edge to the WordSuffix entity.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" 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) 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) GuildsCleared

func (m *UserMutation) GuildsCleared() bool

GuildsCleared reports if the "guilds" edge to the Member entity was cleared.

func (*UserMutation) GuildsIDs

func (m *UserMutation) GuildsIDs() (ids []int)

GuildsIDs returns the "guilds" edge IDs in the mutation.

func (*UserMutation) ID

func (m *UserMutation) ID() (id snowflake.ID, 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) ([]snowflake.ID, 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 discord.Locale, exists bool)

Locale returns the value of the "locale" field in the mutation.

func (*UserMutation) Name

func (m *UserMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserMutation) OldLocale

func (m *UserMutation) OldLocale(ctx context.Context) (v discord.Locale, 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) OldName

func (m *UserMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" 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) OldXp

func (m *UserMutation) OldXp(ctx context.Context) (v xppoint.XP, err error)

OldXp returns the old "xp" 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) OwnGuildsCleared

func (m *UserMutation) OwnGuildsCleared() bool

OwnGuildsCleared reports if the "own_guilds" edge to the Guild entity was cleared.

func (*UserMutation) OwnGuildsIDs

func (m *UserMutation) OwnGuildsIDs() (ids []snowflake.ID)

OwnGuildsIDs returns the "own_guilds" edge IDs in the mutation.

func (*UserMutation) RemoveGuildIDs

func (m *UserMutation) RemoveGuildIDs(ids ...int)

RemoveGuildIDs removes the "guilds" edge to the Member entity by IDs.

func (*UserMutation) RemoveOwnGuildIDs

func (m *UserMutation) RemoveOwnGuildIDs(ids ...snowflake.ID)

RemoveOwnGuildIDs removes the "own_guilds" edge to the Guild entity by IDs.

func (*UserMutation) RemoveWordSuffixIDs

func (m *UserMutation) RemoveWordSuffixIDs(ids ...uuid.UUID)

RemoveWordSuffixIDs removes the "word_suffix" edge to the WordSuffix entity by IDs.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedGuildsIDs

func (m *UserMutation) RemovedGuildsIDs() (ids []int)

RemovedGuilds returns the removed IDs of the "guilds" edge to the Member entity.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) RemovedOwnGuildsIDs

func (m *UserMutation) RemovedOwnGuildsIDs() (ids []snowflake.ID)

RemovedOwnGuilds returns the removed IDs of the "own_guilds" edge to the Guild entity.

func (*UserMutation) RemovedWordSuffixIDs

func (m *UserMutation) RemovedWordSuffixIDs() (ids []uuid.UUID)

RemovedWordSuffix returns the removed IDs of the "word_suffix" edge to the WordSuffix entity.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" 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) 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) ResetGuilds

func (m *UserMutation) ResetGuilds()

ResetGuilds resets all changes to the "guilds" edge.

func (*UserMutation) ResetLocale

func (m *UserMutation) ResetLocale()

ResetLocale resets all changes to the "locale" field.

func (*UserMutation) ResetName

func (m *UserMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*UserMutation) ResetOwnGuilds

func (m *UserMutation) ResetOwnGuilds()

ResetOwnGuilds resets all changes to the "own_guilds" edge.

func (*UserMutation) ResetWordSuffix

func (m *UserMutation) ResetWordSuffix()

ResetWordSuffix resets all changes to the "word_suffix" edge.

func (*UserMutation) ResetXp

func (m *UserMutation) ResetXp()

ResetXp resets all changes to the "xp" field.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" 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) SetID

func (m *UserMutation) SetID(id snowflake.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetLocale

func (m *UserMutation) SetLocale(d discord.Locale)

SetLocale sets the "locale" field.

func (*UserMutation) SetName

func (m *UserMutation) SetName(s string)

SetName sets the "name" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetXp

func (m *UserMutation) SetXp(x xppoint.XP)

SetXp sets the "xp" field.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) 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.

func (*UserMutation) WordSuffixCleared

func (m *UserMutation) WordSuffixCleared() bool

WordSuffixCleared reports if the "word_suffix" edge to the WordSuffix entity was cleared.

func (*UserMutation) WordSuffixIDs

func (m *UserMutation) WordSuffixIDs() (ids []uuid.UUID)

WordSuffixIDs returns the "word_suffix" edge IDs in the mutation.

func (*UserMutation) Xp

func (m *UserMutation) Xp() (r xppoint.XP, exists bool)

Xp returns the value of the "xp" field in the mutation.

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) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id snowflake.ID, 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) snowflake.ID

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []snowflake.ID, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []snowflake.ID

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 snowflake.ID, 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) snowflake.ID

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) QueryGuilds

func (uq *UserQuery) QueryGuilds() *MemberQuery

QueryGuilds chains the current query on the "guilds" edge.

func (*UserQuery) QueryOwnGuilds

func (uq *UserQuery) QueryOwnGuilds() *GuildQuery

QueryOwnGuilds chains the current query on the "own_guilds" edge.

func (*UserQuery) QueryWordSuffix

func (uq *UserQuery) QueryWordSuffix() *WordSuffixQuery

QueryWordSuffix chains the current query on the "word_suffix" 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 {
	Name string `json:"name,omitempty"`
}

client.User.Query().
	Select(user.FieldName).
	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) WithGuilds

func (uq *UserQuery) WithGuilds(opts ...func(*MemberQuery)) *UserQuery

WithGuilds tells the query-builder to eager-load the nodes that are connected to the "guilds" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOwnGuilds

func (uq *UserQuery) WithOwnGuilds(opts ...func(*GuildQuery)) *UserQuery

WithOwnGuilds tells the query-builder to eager-load the nodes that are connected to the "own_guilds" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithWordSuffix

func (uq *UserQuery) WithWordSuffix(opts ...func(*WordSuffixQuery)) *UserQuery

WithWordSuffix tells the query-builder to eager-load the nodes that are connected to the "word_suffix" 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) AddGuildIDs

func (uu *UserUpdate) AddGuildIDs(ids ...int) *UserUpdate

AddGuildIDs adds the "guilds" edge to the Member entity by IDs.

func (*UserUpdate) AddGuilds

func (uu *UserUpdate) AddGuilds(m ...*Member) *UserUpdate

AddGuilds adds the "guilds" edges to the Member entity.

func (*UserUpdate) AddOwnGuildIDs

func (uu *UserUpdate) AddOwnGuildIDs(ids ...snowflake.ID) *UserUpdate

AddOwnGuildIDs adds the "own_guilds" edge to the Guild entity by IDs.

func (*UserUpdate) AddOwnGuilds

func (uu *UserUpdate) AddOwnGuilds(g ...*Guild) *UserUpdate

AddOwnGuilds adds the "own_guilds" edges to the Guild entity.

func (*UserUpdate) AddWordSuffix

func (uu *UserUpdate) AddWordSuffix(w ...*WordSuffix) *UserUpdate

AddWordSuffix adds the "word_suffix" edges to the WordSuffix entity.

func (*UserUpdate) AddWordSuffixIDs

func (uu *UserUpdate) AddWordSuffixIDs(ids ...uuid.UUID) *UserUpdate

AddWordSuffixIDs adds the "word_suffix" edge to the WordSuffix entity by IDs.

func (*UserUpdate) AddXp

func (uu *UserUpdate) AddXp(x xppoint.XP) *UserUpdate

AddXp adds x to the "xp" field.

func (*UserUpdate) ClearGuilds

func (uu *UserUpdate) ClearGuilds() *UserUpdate

ClearGuilds clears all "guilds" edges to the Member entity.

func (*UserUpdate) ClearOwnGuilds

func (uu *UserUpdate) ClearOwnGuilds() *UserUpdate

ClearOwnGuilds clears all "own_guilds" edges to the Guild entity.

func (*UserUpdate) ClearWordSuffix

func (uu *UserUpdate) ClearWordSuffix() *UserUpdate

ClearWordSuffix clears all "word_suffix" edges to the WordSuffix entity.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveGuildIDs

func (uu *UserUpdate) RemoveGuildIDs(ids ...int) *UserUpdate

RemoveGuildIDs removes the "guilds" edge to Member entities by IDs.

func (*UserUpdate) RemoveGuilds

func (uu *UserUpdate) RemoveGuilds(m ...*Member) *UserUpdate

RemoveGuilds removes "guilds" edges to Member entities.

func (*UserUpdate) RemoveOwnGuildIDs

func (uu *UserUpdate) RemoveOwnGuildIDs(ids ...snowflake.ID) *UserUpdate

RemoveOwnGuildIDs removes the "own_guilds" edge to Guild entities by IDs.

func (*UserUpdate) RemoveOwnGuilds

func (uu *UserUpdate) RemoveOwnGuilds(g ...*Guild) *UserUpdate

RemoveOwnGuilds removes "own_guilds" edges to Guild entities.

func (*UserUpdate) RemoveWordSuffix

func (uu *UserUpdate) RemoveWordSuffix(w ...*WordSuffix) *UserUpdate

RemoveWordSuffix removes "word_suffix" edges to WordSuffix entities.

func (*UserUpdate) RemoveWordSuffixIDs

func (uu *UserUpdate) RemoveWordSuffixIDs(ids ...uuid.UUID) *UserUpdate

RemoveWordSuffixIDs removes the "word_suffix" edge to WordSuffix entities by IDs.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetLocale

func (uu *UserUpdate) SetLocale(d discord.Locale) *UserUpdate

SetLocale sets the "locale" field.

func (*UserUpdate) SetName

func (uu *UserUpdate) SetName(s string) *UserUpdate

SetName sets the "name" field.

func (*UserUpdate) SetNillableLocale

func (uu *UserUpdate) SetNillableLocale(d *discord.Locale) *UserUpdate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*UserUpdate) SetNillableName

func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*UserUpdate) SetNillableXp

func (uu *UserUpdate) SetNillableXp(x *xppoint.XP) *UserUpdate

SetNillableXp sets the "xp" field if the given value is not nil.

func (*UserUpdate) SetXp

func (uu *UserUpdate) SetXp(x xppoint.XP) *UserUpdate

SetXp sets the "xp" 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) AddGuildIDs

func (uuo *UserUpdateOne) AddGuildIDs(ids ...int) *UserUpdateOne

AddGuildIDs adds the "guilds" edge to the Member entity by IDs.

func (*UserUpdateOne) AddGuilds

func (uuo *UserUpdateOne) AddGuilds(m ...*Member) *UserUpdateOne

AddGuilds adds the "guilds" edges to the Member entity.

func (*UserUpdateOne) AddOwnGuildIDs

func (uuo *UserUpdateOne) AddOwnGuildIDs(ids ...snowflake.ID) *UserUpdateOne

AddOwnGuildIDs adds the "own_guilds" edge to the Guild entity by IDs.

func (*UserUpdateOne) AddOwnGuilds

func (uuo *UserUpdateOne) AddOwnGuilds(g ...*Guild) *UserUpdateOne

AddOwnGuilds adds the "own_guilds" edges to the Guild entity.

func (*UserUpdateOne) AddWordSuffix

func (uuo *UserUpdateOne) AddWordSuffix(w ...*WordSuffix) *UserUpdateOne

AddWordSuffix adds the "word_suffix" edges to the WordSuffix entity.

func (*UserUpdateOne) AddWordSuffixIDs

func (uuo *UserUpdateOne) AddWordSuffixIDs(ids ...uuid.UUID) *UserUpdateOne

AddWordSuffixIDs adds the "word_suffix" edge to the WordSuffix entity by IDs.

func (*UserUpdateOne) AddXp

func (uuo *UserUpdateOne) AddXp(x xppoint.XP) *UserUpdateOne

AddXp adds x to the "xp" field.

func (*UserUpdateOne) ClearGuilds

func (uuo *UserUpdateOne) ClearGuilds() *UserUpdateOne

ClearGuilds clears all "guilds" edges to the Member entity.

func (*UserUpdateOne) ClearOwnGuilds

func (uuo *UserUpdateOne) ClearOwnGuilds() *UserUpdateOne

ClearOwnGuilds clears all "own_guilds" edges to the Guild entity.

func (*UserUpdateOne) ClearWordSuffix

func (uuo *UserUpdateOne) ClearWordSuffix() *UserUpdateOne

ClearWordSuffix clears all "word_suffix" edges to the WordSuffix entity.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveGuildIDs

func (uuo *UserUpdateOne) RemoveGuildIDs(ids ...int) *UserUpdateOne

RemoveGuildIDs removes the "guilds" edge to Member entities by IDs.

func (*UserUpdateOne) RemoveGuilds

func (uuo *UserUpdateOne) RemoveGuilds(m ...*Member) *UserUpdateOne

RemoveGuilds removes "guilds" edges to Member entities.

func (*UserUpdateOne) RemoveOwnGuildIDs

func (uuo *UserUpdateOne) RemoveOwnGuildIDs(ids ...snowflake.ID) *UserUpdateOne

RemoveOwnGuildIDs removes the "own_guilds" edge to Guild entities by IDs.

func (*UserUpdateOne) RemoveOwnGuilds

func (uuo *UserUpdateOne) RemoveOwnGuilds(g ...*Guild) *UserUpdateOne

RemoveOwnGuilds removes "own_guilds" edges to Guild entities.

func (*UserUpdateOne) RemoveWordSuffix

func (uuo *UserUpdateOne) RemoveWordSuffix(w ...*WordSuffix) *UserUpdateOne

RemoveWordSuffix removes "word_suffix" edges to WordSuffix entities.

func (*UserUpdateOne) RemoveWordSuffixIDs

func (uuo *UserUpdateOne) RemoveWordSuffixIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveWordSuffixIDs removes the "word_suffix" edge to WordSuffix entities by IDs.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetLocale

func (uuo *UserUpdateOne) SetLocale(d discord.Locale) *UserUpdateOne

SetLocale sets the "locale" field.

func (*UserUpdateOne) SetName

func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne

SetName sets the "name" field.

func (*UserUpdateOne) SetNillableLocale

func (uuo *UserUpdateOne) SetNillableLocale(d *discord.Locale) *UserUpdateOne

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*UserUpdateOne) SetNillableName

func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*UserUpdateOne) SetNillableXp

func (uuo *UserUpdateOne) SetNillableXp(x *xppoint.XP) *UserUpdateOne

SetNillableXp sets the "xp" field if the given value is not nil.

func (*UserUpdateOne) SetXp

func (uuo *UserUpdateOne) SetXp(x xppoint.XP) *UserUpdateOne

SetXp sets the "xp" field.

func (*UserUpdateOne) Where

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

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.

type WordSuffix

type WordSuffix struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Suffix holds the value of the "suffix" field.
	Suffix string `json:"suffix,omitempty"`
	// Expired holds the value of the "expired" field.
	Expired *time.Time `json:"expired,omitempty"`
	// GuildID holds the value of the "guild_id" field.
	GuildID *snowflake.ID `json:"guild_id,omitempty"`
	// Rule holds the value of the "rule" field.
	Rule wordsuffix.Rule `json:"rule,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WordSuffixQuery when eager-loading is set.
	Edges WordSuffixEdges `json:"edges"`
	// contains filtered or unexported fields
}

WordSuffix is the model entity for the WordSuffix schema.

func (*WordSuffix) QueryGuild

func (ws *WordSuffix) QueryGuild() *GuildQuery

QueryGuild queries the "guild" edge of the WordSuffix entity.

func (*WordSuffix) QueryOwner

func (ws *WordSuffix) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the WordSuffix entity.

func (*WordSuffix) String

func (ws *WordSuffix) String() string

String implements the fmt.Stringer.

func (*WordSuffix) Unwrap

func (ws *WordSuffix) Unwrap() *WordSuffix

Unwrap unwraps the WordSuffix 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 (*WordSuffix) Update

func (ws *WordSuffix) Update() *WordSuffixUpdateOne

Update returns a builder for updating this WordSuffix. Note that you need to call WordSuffix.Unwrap() before calling this method if this WordSuffix was returned from a transaction, and the transaction was committed or rolled back.

func (*WordSuffix) Value

func (ws *WordSuffix) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WordSuffix. This includes values selected through modifiers, order, etc.

type WordSuffixClient

type WordSuffixClient struct {
	// contains filtered or unexported fields
}

WordSuffixClient is a client for the WordSuffix schema.

func NewWordSuffixClient

func NewWordSuffixClient(c config) *WordSuffixClient

NewWordSuffixClient returns a client for the WordSuffix from the given config.

func (*WordSuffixClient) Create

func (c *WordSuffixClient) Create() *WordSuffixCreate

Create returns a builder for creating a WordSuffix entity.

func (*WordSuffixClient) CreateBulk

func (c *WordSuffixClient) CreateBulk(builders ...*WordSuffixCreate) *WordSuffixCreateBulk

CreateBulk returns a builder for creating a bulk of WordSuffix entities.

func (*WordSuffixClient) Delete

func (c *WordSuffixClient) Delete() *WordSuffixDelete

Delete returns a delete builder for WordSuffix.

func (*WordSuffixClient) DeleteOne

func (c *WordSuffixClient) DeleteOne(ws *WordSuffix) *WordSuffixDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WordSuffixClient) DeleteOneID

func (c *WordSuffixClient) DeleteOneID(id uuid.UUID) *WordSuffixDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WordSuffixClient) Get

Get returns a WordSuffix entity by its id.

func (*WordSuffixClient) GetX

func (c *WordSuffixClient) GetX(ctx context.Context, id uuid.UUID) *WordSuffix

GetX is like Get, but panics if an error occurs.

func (*WordSuffixClient) Hooks

func (c *WordSuffixClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WordSuffixClient) Intercept

func (c *WordSuffixClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `wordsuffix.Intercept(f(g(h())))`.

func (*WordSuffixClient) Interceptors

func (c *WordSuffixClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WordSuffixClient) MapCreateBulk

func (c *WordSuffixClient) MapCreateBulk(slice any, setFunc func(*WordSuffixCreate, int)) *WordSuffixCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*WordSuffixClient) Query

func (c *WordSuffixClient) Query() *WordSuffixQuery

Query returns a query builder for WordSuffix.

func (*WordSuffixClient) QueryGuild

func (c *WordSuffixClient) QueryGuild(ws *WordSuffix) *GuildQuery

QueryGuild queries the guild edge of a WordSuffix.

func (*WordSuffixClient) QueryOwner

func (c *WordSuffixClient) QueryOwner(ws *WordSuffix) *UserQuery

QueryOwner queries the owner edge of a WordSuffix.

func (*WordSuffixClient) Update

func (c *WordSuffixClient) Update() *WordSuffixUpdate

Update returns an update builder for WordSuffix.

func (*WordSuffixClient) UpdateOne

func (c *WordSuffixClient) UpdateOne(ws *WordSuffix) *WordSuffixUpdateOne

UpdateOne returns an update builder for the given entity.

func (*WordSuffixClient) UpdateOneID

func (c *WordSuffixClient) UpdateOneID(id uuid.UUID) *WordSuffixUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WordSuffixClient) Use

func (c *WordSuffixClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `wordsuffix.Hooks(f(g(h())))`.

type WordSuffixCreate

type WordSuffixCreate struct {
	// contains filtered or unexported fields
}

WordSuffixCreate is the builder for creating a WordSuffix entity.

func (*WordSuffixCreate) Exec

func (wsc *WordSuffixCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WordSuffixCreate) ExecX

func (wsc *WordSuffixCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WordSuffixCreate) Mutation

func (wsc *WordSuffixCreate) Mutation() *WordSuffixMutation

Mutation returns the WordSuffixMutation object of the builder.

func (*WordSuffixCreate) Save

func (wsc *WordSuffixCreate) Save(ctx context.Context) (*WordSuffix, error)

Save creates the WordSuffix in the database.

func (*WordSuffixCreate) SaveX

func (wsc *WordSuffixCreate) SaveX(ctx context.Context) *WordSuffix

SaveX calls Save and panics if Save returns an error.

func (*WordSuffixCreate) SetExpired

func (wsc *WordSuffixCreate) SetExpired(t time.Time) *WordSuffixCreate

SetExpired sets the "expired" field.

func (*WordSuffixCreate) SetGuild

func (wsc *WordSuffixCreate) SetGuild(g *Guild) *WordSuffixCreate

SetGuild sets the "guild" edge to the Guild entity.

func (*WordSuffixCreate) SetGuildID

func (wsc *WordSuffixCreate) SetGuildID(s snowflake.ID) *WordSuffixCreate

SetGuildID sets the "guild_id" field.

func (*WordSuffixCreate) SetID

func (wsc *WordSuffixCreate) SetID(u uuid.UUID) *WordSuffixCreate

SetID sets the "id" field.

func (*WordSuffixCreate) SetNillableExpired

func (wsc *WordSuffixCreate) SetNillableExpired(t *time.Time) *WordSuffixCreate

SetNillableExpired sets the "expired" field if the given value is not nil.

func (*WordSuffixCreate) SetNillableGuildID

func (wsc *WordSuffixCreate) SetNillableGuildID(s *snowflake.ID) *WordSuffixCreate

SetNillableGuildID sets the "guild_id" field if the given value is not nil.

func (*WordSuffixCreate) SetNillableID

func (wsc *WordSuffixCreate) SetNillableID(u *uuid.UUID) *WordSuffixCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*WordSuffixCreate) SetNillableRule

func (wsc *WordSuffixCreate) SetNillableRule(w *wordsuffix.Rule) *WordSuffixCreate

SetNillableRule sets the "rule" field if the given value is not nil.

func (*WordSuffixCreate) SetOwner

func (wsc *WordSuffixCreate) SetOwner(u *User) *WordSuffixCreate

SetOwner sets the "owner" edge to the User entity.

func (*WordSuffixCreate) SetOwnerID

func (wsc *WordSuffixCreate) SetOwnerID(id snowflake.ID) *WordSuffixCreate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*WordSuffixCreate) SetRule

SetRule sets the "rule" field.

func (*WordSuffixCreate) SetSuffix

func (wsc *WordSuffixCreate) SetSuffix(s string) *WordSuffixCreate

SetSuffix sets the "suffix" field.

type WordSuffixCreateBulk

type WordSuffixCreateBulk struct {
	// contains filtered or unexported fields
}

WordSuffixCreateBulk is the builder for creating many WordSuffix entities in bulk.

func (*WordSuffixCreateBulk) Exec

func (wscb *WordSuffixCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WordSuffixCreateBulk) ExecX

func (wscb *WordSuffixCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WordSuffixCreateBulk) Save

func (wscb *WordSuffixCreateBulk) Save(ctx context.Context) ([]*WordSuffix, error)

Save creates the WordSuffix entities in the database.

func (*WordSuffixCreateBulk) SaveX

func (wscb *WordSuffixCreateBulk) SaveX(ctx context.Context) []*WordSuffix

SaveX is like Save, but panics if an error occurs.

type WordSuffixDelete

type WordSuffixDelete struct {
	// contains filtered or unexported fields
}

WordSuffixDelete is the builder for deleting a WordSuffix entity.

func (*WordSuffixDelete) Exec

func (wsd *WordSuffixDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WordSuffixDelete) ExecX

func (wsd *WordSuffixDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WordSuffixDelete) Where

Where appends a list predicates to the WordSuffixDelete builder.

type WordSuffixDeleteOne

type WordSuffixDeleteOne struct {
	// contains filtered or unexported fields
}

WordSuffixDeleteOne is the builder for deleting a single WordSuffix entity.

func (*WordSuffixDeleteOne) Exec

func (wsdo *WordSuffixDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WordSuffixDeleteOne) ExecX

func (wsdo *WordSuffixDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WordSuffixDeleteOne) Where

Where appends a list predicates to the WordSuffixDelete builder.

type WordSuffixEdges

type WordSuffixEdges struct {
	// Guild holds the value of the guild edge.
	Guild *Guild `json:"guild,omitempty"`
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// contains filtered or unexported fields
}

WordSuffixEdges holds the relations/edges for other nodes in the graph.

func (WordSuffixEdges) GuildOrErr

func (e WordSuffixEdges) 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.

func (WordSuffixEdges) OwnerOrErr

func (e WordSuffixEdges) OwnerOrErr() (*User, error)

OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WordSuffixGroupBy

type WordSuffixGroupBy struct {
	// contains filtered or unexported fields
}

WordSuffixGroupBy is the group-by builder for WordSuffix entities.

func (*WordSuffixGroupBy) Aggregate

func (wsgb *WordSuffixGroupBy) Aggregate(fns ...AggregateFunc) *WordSuffixGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WordSuffixGroupBy) Bool

func (s *WordSuffixGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WordSuffixGroupBy) BoolX

func (s *WordSuffixGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WordSuffixGroupBy) Bools

func (s *WordSuffixGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WordSuffixGroupBy) BoolsX

func (s *WordSuffixGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WordSuffixGroupBy) Float64

func (s *WordSuffixGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WordSuffixGroupBy) Float64X

func (s *WordSuffixGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WordSuffixGroupBy) Float64s

func (s *WordSuffixGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WordSuffixGroupBy) Float64sX

func (s *WordSuffixGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WordSuffixGroupBy) Int

func (s *WordSuffixGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WordSuffixGroupBy) IntX

func (s *WordSuffixGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WordSuffixGroupBy) Ints

func (s *WordSuffixGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WordSuffixGroupBy) IntsX

func (s *WordSuffixGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WordSuffixGroupBy) Scan

func (wsgb *WordSuffixGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WordSuffixGroupBy) ScanX

func (s *WordSuffixGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WordSuffixGroupBy) String

func (s *WordSuffixGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WordSuffixGroupBy) StringX

func (s *WordSuffixGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WordSuffixGroupBy) Strings

func (s *WordSuffixGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WordSuffixGroupBy) StringsX

func (s *WordSuffixGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WordSuffixMutation

type WordSuffixMutation struct {
	// contains filtered or unexported fields
}

WordSuffixMutation represents an operation that mutates the WordSuffix nodes in the graph.

func (*WordSuffixMutation) AddField

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) AddedEdges

func (m *WordSuffixMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WordSuffixMutation) AddedField

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) AddedFields

func (m *WordSuffixMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WordSuffixMutation) AddedIDs

func (m *WordSuffixMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WordSuffixMutation) ClearEdge

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) ClearExpired

func (m *WordSuffixMutation) ClearExpired()

ClearExpired clears the value of the "expired" field.

func (*WordSuffixMutation) ClearField

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) ClearGuild

func (m *WordSuffixMutation) ClearGuild()

ClearGuild clears the "guild" edge to the Guild entity.

func (*WordSuffixMutation) ClearGuildID

func (m *WordSuffixMutation) ClearGuildID()

ClearGuildID clears the value of the "guild_id" field.

func (*WordSuffixMutation) ClearOwner

func (m *WordSuffixMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*WordSuffixMutation) ClearedEdges

func (m *WordSuffixMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WordSuffixMutation) ClearedFields

func (m *WordSuffixMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WordSuffixMutation) Client

func (m WordSuffixMutation) 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 (*WordSuffixMutation) EdgeCleared

func (m *WordSuffixMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WordSuffixMutation) Expired

func (m *WordSuffixMutation) Expired() (r time.Time, exists bool)

Expired returns the value of the "expired" field in the mutation.

func (*WordSuffixMutation) ExpiredCleared

func (m *WordSuffixMutation) ExpiredCleared() bool

ExpiredCleared returns if the "expired" field was cleared in this mutation.

func (*WordSuffixMutation) Field

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) FieldCleared

func (m *WordSuffixMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WordSuffixMutation) Fields

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) GuildCleared

func (m *WordSuffixMutation) GuildCleared() bool

GuildCleared reports if the "guild" edge to the Guild entity was cleared.

func (*WordSuffixMutation) GuildID

func (m *WordSuffixMutation) GuildID() (r snowflake.ID, exists bool)

GuildID returns the value of the "guild_id" field in the mutation.

func (*WordSuffixMutation) GuildIDCleared

func (m *WordSuffixMutation) GuildIDCleared() bool

GuildIDCleared returns if the "guild_id" field was cleared in this mutation.

func (*WordSuffixMutation) GuildIDs

func (m *WordSuffixMutation) GuildIDs() (ids []snowflake.ID)

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 (*WordSuffixMutation) ID

func (m *WordSuffixMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WordSuffixMutation) IDs

func (m *WordSuffixMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*WordSuffixMutation) OldExpired

func (m *WordSuffixMutation) OldExpired(ctx context.Context) (v *time.Time, err error)

OldExpired returns the old "expired" field's value of the WordSuffix entity. If the WordSuffix 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 (*WordSuffixMutation) OldField

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) OldGuildID

func (m *WordSuffixMutation) OldGuildID(ctx context.Context) (v *snowflake.ID, err error)

OldGuildID returns the old "guild_id" field's value of the WordSuffix entity. If the WordSuffix 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 (*WordSuffixMutation) OldRule

func (m *WordSuffixMutation) OldRule(ctx context.Context) (v wordsuffix.Rule, err error)

OldRule returns the old "rule" field's value of the WordSuffix entity. If the WordSuffix 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 (*WordSuffixMutation) OldSuffix

func (m *WordSuffixMutation) OldSuffix(ctx context.Context) (v string, err error)

OldSuffix returns the old "suffix" field's value of the WordSuffix entity. If the WordSuffix 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 (*WordSuffixMutation) Op

func (m *WordSuffixMutation) Op() Op

Op returns the operation name.

func (*WordSuffixMutation) OwnerCleared

func (m *WordSuffixMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*WordSuffixMutation) OwnerID

func (m *WordSuffixMutation) OwnerID() (id snowflake.ID, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*WordSuffixMutation) OwnerIDs

func (m *WordSuffixMutation) OwnerIDs() (ids []snowflake.ID)

OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.

func (*WordSuffixMutation) RemovedEdges

func (m *WordSuffixMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WordSuffixMutation) RemovedIDs

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) ResetEdge

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) ResetExpired

func (m *WordSuffixMutation) ResetExpired()

ResetExpired resets all changes to the "expired" field.

func (*WordSuffixMutation) ResetField

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) ResetGuild

func (m *WordSuffixMutation) ResetGuild()

ResetGuild resets all changes to the "guild" edge.

func (*WordSuffixMutation) ResetGuildID

func (m *WordSuffixMutation) ResetGuildID()

ResetGuildID resets all changes to the "guild_id" field.

func (*WordSuffixMutation) ResetOwner

func (m *WordSuffixMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*WordSuffixMutation) ResetRule

func (m *WordSuffixMutation) ResetRule()

ResetRule resets all changes to the "rule" field.

func (*WordSuffixMutation) ResetSuffix

func (m *WordSuffixMutation) ResetSuffix()

ResetSuffix resets all changes to the "suffix" field.

func (*WordSuffixMutation) Rule

func (m *WordSuffixMutation) Rule() (r wordsuffix.Rule, exists bool)

Rule returns the value of the "rule" field in the mutation.

func (*WordSuffixMutation) SetExpired

func (m *WordSuffixMutation) SetExpired(t time.Time)

SetExpired sets the "expired" field.

func (*WordSuffixMutation) SetField

func (m *WordSuffixMutation) 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 (*WordSuffixMutation) SetGuildID

func (m *WordSuffixMutation) SetGuildID(s snowflake.ID)

SetGuildID sets the "guild_id" field.

func (*WordSuffixMutation) SetID

func (m *WordSuffixMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of WordSuffix entities.

func (*WordSuffixMutation) SetOp

func (m *WordSuffixMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WordSuffixMutation) SetOwnerID

func (m *WordSuffixMutation) SetOwnerID(id snowflake.ID)

SetOwnerID sets the "owner" edge to the User entity by id.

func (*WordSuffixMutation) SetRule

func (m *WordSuffixMutation) SetRule(w wordsuffix.Rule)

SetRule sets the "rule" field.

func (*WordSuffixMutation) SetSuffix

func (m *WordSuffixMutation) SetSuffix(s string)

SetSuffix sets the "suffix" field.

func (*WordSuffixMutation) Suffix

func (m *WordSuffixMutation) Suffix() (r string, exists bool)

Suffix returns the value of the "suffix" field in the mutation.

func (WordSuffixMutation) Tx

func (m WordSuffixMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WordSuffixMutation) Type

func (m *WordSuffixMutation) Type() string

Type returns the node type of this mutation (WordSuffix).

func (*WordSuffixMutation) Where

func (m *WordSuffixMutation) Where(ps ...predicate.WordSuffix)

Where appends a list predicates to the WordSuffixMutation builder.

func (*WordSuffixMutation) WhereP

func (m *WordSuffixMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WordSuffixMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type WordSuffixQuery

type WordSuffixQuery struct {
	// contains filtered or unexported fields
}

WordSuffixQuery is the builder for querying WordSuffix entities.

func (*WordSuffixQuery) Aggregate

func (wsq *WordSuffixQuery) Aggregate(fns ...AggregateFunc) *WordSuffixSelect

Aggregate returns a WordSuffixSelect configured with the given aggregations.

func (*WordSuffixQuery) All

func (wsq *WordSuffixQuery) All(ctx context.Context) ([]*WordSuffix, error)

All executes the query and returns a list of WordSuffixes.

func (*WordSuffixQuery) AllX

func (wsq *WordSuffixQuery) AllX(ctx context.Context) []*WordSuffix

AllX is like All, but panics if an error occurs.

func (*WordSuffixQuery) Clone

func (wsq *WordSuffixQuery) Clone() *WordSuffixQuery

Clone returns a duplicate of the WordSuffixQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WordSuffixQuery) Count

func (wsq *WordSuffixQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WordSuffixQuery) CountX

func (wsq *WordSuffixQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WordSuffixQuery) Exist

func (wsq *WordSuffixQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WordSuffixQuery) ExistX

func (wsq *WordSuffixQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WordSuffixQuery) First

func (wsq *WordSuffixQuery) First(ctx context.Context) (*WordSuffix, error)

First returns the first WordSuffix entity from the query. Returns a *NotFoundError when no WordSuffix was found.

func (*WordSuffixQuery) FirstID

func (wsq *WordSuffixQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first WordSuffix ID from the query. Returns a *NotFoundError when no WordSuffix ID was found.

func (*WordSuffixQuery) FirstIDX

func (wsq *WordSuffixQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WordSuffixQuery) FirstX

func (wsq *WordSuffixQuery) FirstX(ctx context.Context) *WordSuffix

FirstX is like First, but panics if an error occurs.

func (*WordSuffixQuery) GroupBy

func (wsq *WordSuffixQuery) GroupBy(field string, fields ...string) *WordSuffixGroupBy

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 {
	Suffix string `json:"suffix,omitempty"`
	Count int `json:"count,omitempty"`
}

client.WordSuffix.Query().
	GroupBy(wordsuffix.FieldSuffix).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WordSuffixQuery) IDs

func (wsq *WordSuffixQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of WordSuffix IDs.

func (*WordSuffixQuery) IDsX

func (wsq *WordSuffixQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*WordSuffixQuery) Limit

func (wsq *WordSuffixQuery) Limit(limit int) *WordSuffixQuery

Limit the number of records to be returned by this query.

func (*WordSuffixQuery) Offset

func (wsq *WordSuffixQuery) Offset(offset int) *WordSuffixQuery

Offset to start from.

func (*WordSuffixQuery) Only

func (wsq *WordSuffixQuery) Only(ctx context.Context) (*WordSuffix, error)

Only returns a single WordSuffix entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WordSuffix entity is found. Returns a *NotFoundError when no WordSuffix entities are found.

func (*WordSuffixQuery) OnlyID

func (wsq *WordSuffixQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only WordSuffix ID in the query. Returns a *NotSingularError when more than one WordSuffix ID is found. Returns a *NotFoundError when no entities are found.

func (*WordSuffixQuery) OnlyIDX

func (wsq *WordSuffixQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WordSuffixQuery) OnlyX

func (wsq *WordSuffixQuery) OnlyX(ctx context.Context) *WordSuffix

OnlyX is like Only, but panics if an error occurs.

func (*WordSuffixQuery) Order

Order specifies how the records should be ordered.

func (*WordSuffixQuery) QueryGuild

func (wsq *WordSuffixQuery) QueryGuild() *GuildQuery

QueryGuild chains the current query on the "guild" edge.

func (*WordSuffixQuery) QueryOwner

func (wsq *WordSuffixQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*WordSuffixQuery) Select

func (wsq *WordSuffixQuery) Select(fields ...string) *WordSuffixSelect

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 {
	Suffix string `json:"suffix,omitempty"`
}

client.WordSuffix.Query().
	Select(wordsuffix.FieldSuffix).
	Scan(ctx, &v)

func (*WordSuffixQuery) Unique

func (wsq *WordSuffixQuery) Unique(unique bool) *WordSuffixQuery

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 (*WordSuffixQuery) Where

Where adds a new predicate for the WordSuffixQuery builder.

func (*WordSuffixQuery) WithGuild

func (wsq *WordSuffixQuery) WithGuild(opts ...func(*GuildQuery)) *WordSuffixQuery

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.

func (*WordSuffixQuery) WithOwner

func (wsq *WordSuffixQuery) WithOwner(opts ...func(*UserQuery)) *WordSuffixQuery

WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.

type WordSuffixSelect

type WordSuffixSelect struct {
	*WordSuffixQuery
	// contains filtered or unexported fields
}

WordSuffixSelect is the builder for selecting fields of WordSuffix entities.

func (*WordSuffixSelect) Aggregate

func (wss *WordSuffixSelect) Aggregate(fns ...AggregateFunc) *WordSuffixSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WordSuffixSelect) Bool

func (s *WordSuffixSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WordSuffixSelect) BoolX

func (s *WordSuffixSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WordSuffixSelect) Bools

func (s *WordSuffixSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WordSuffixSelect) BoolsX

func (s *WordSuffixSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WordSuffixSelect) Float64

func (s *WordSuffixSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WordSuffixSelect) Float64X

func (s *WordSuffixSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WordSuffixSelect) Float64s

func (s *WordSuffixSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WordSuffixSelect) Float64sX

func (s *WordSuffixSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WordSuffixSelect) Int

func (s *WordSuffixSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WordSuffixSelect) IntX

func (s *WordSuffixSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WordSuffixSelect) Ints

func (s *WordSuffixSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WordSuffixSelect) IntsX

func (s *WordSuffixSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WordSuffixSelect) Scan

func (wss *WordSuffixSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WordSuffixSelect) ScanX

func (s *WordSuffixSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WordSuffixSelect) String

func (s *WordSuffixSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WordSuffixSelect) StringX

func (s *WordSuffixSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WordSuffixSelect) Strings

func (s *WordSuffixSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WordSuffixSelect) StringsX

func (s *WordSuffixSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WordSuffixUpdate

type WordSuffixUpdate struct {
	// contains filtered or unexported fields
}

WordSuffixUpdate is the builder for updating WordSuffix entities.

func (*WordSuffixUpdate) ClearExpired

func (wsu *WordSuffixUpdate) ClearExpired() *WordSuffixUpdate

ClearExpired clears the value of the "expired" field.

func (*WordSuffixUpdate) ClearGuild

func (wsu *WordSuffixUpdate) ClearGuild() *WordSuffixUpdate

ClearGuild clears the "guild" edge to the Guild entity.

func (*WordSuffixUpdate) ClearGuildID

func (wsu *WordSuffixUpdate) ClearGuildID() *WordSuffixUpdate

ClearGuildID clears the value of the "guild_id" field.

func (*WordSuffixUpdate) ClearOwner

func (wsu *WordSuffixUpdate) ClearOwner() *WordSuffixUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*WordSuffixUpdate) Exec

func (wsu *WordSuffixUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WordSuffixUpdate) ExecX

func (wsu *WordSuffixUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WordSuffixUpdate) Mutation

func (wsu *WordSuffixUpdate) Mutation() *WordSuffixMutation

Mutation returns the WordSuffixMutation object of the builder.

func (*WordSuffixUpdate) Save

func (wsu *WordSuffixUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WordSuffixUpdate) SaveX

func (wsu *WordSuffixUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WordSuffixUpdate) SetExpired

func (wsu *WordSuffixUpdate) SetExpired(t time.Time) *WordSuffixUpdate

SetExpired sets the "expired" field.

func (*WordSuffixUpdate) SetGuild

func (wsu *WordSuffixUpdate) SetGuild(g *Guild) *WordSuffixUpdate

SetGuild sets the "guild" edge to the Guild entity.

func (*WordSuffixUpdate) SetGuildID

func (wsu *WordSuffixUpdate) SetGuildID(s snowflake.ID) *WordSuffixUpdate

SetGuildID sets the "guild_id" field.

func (*WordSuffixUpdate) SetNillableExpired

func (wsu *WordSuffixUpdate) SetNillableExpired(t *time.Time) *WordSuffixUpdate

SetNillableExpired sets the "expired" field if the given value is not nil.

func (*WordSuffixUpdate) SetNillableGuildID

func (wsu *WordSuffixUpdate) SetNillableGuildID(s *snowflake.ID) *WordSuffixUpdate

SetNillableGuildID sets the "guild_id" field if the given value is not nil.

func (*WordSuffixUpdate) SetNillableRule

func (wsu *WordSuffixUpdate) SetNillableRule(w *wordsuffix.Rule) *WordSuffixUpdate

SetNillableRule sets the "rule" field if the given value is not nil.

func (*WordSuffixUpdate) SetNillableSuffix

func (wsu *WordSuffixUpdate) SetNillableSuffix(s *string) *WordSuffixUpdate

SetNillableSuffix sets the "suffix" field if the given value is not nil.

func (*WordSuffixUpdate) SetOwner

func (wsu *WordSuffixUpdate) SetOwner(u *User) *WordSuffixUpdate

SetOwner sets the "owner" edge to the User entity.

func (*WordSuffixUpdate) SetOwnerID

func (wsu *WordSuffixUpdate) SetOwnerID(id snowflake.ID) *WordSuffixUpdate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*WordSuffixUpdate) SetRule

SetRule sets the "rule" field.

func (*WordSuffixUpdate) SetSuffix

func (wsu *WordSuffixUpdate) SetSuffix(s string) *WordSuffixUpdate

SetSuffix sets the "suffix" field.

func (*WordSuffixUpdate) Where

Where appends a list predicates to the WordSuffixUpdate builder.

type WordSuffixUpdateOne

type WordSuffixUpdateOne struct {
	// contains filtered or unexported fields
}

WordSuffixUpdateOne is the builder for updating a single WordSuffix entity.

func (*WordSuffixUpdateOne) ClearExpired

func (wsuo *WordSuffixUpdateOne) ClearExpired() *WordSuffixUpdateOne

ClearExpired clears the value of the "expired" field.

func (*WordSuffixUpdateOne) ClearGuild

func (wsuo *WordSuffixUpdateOne) ClearGuild() *WordSuffixUpdateOne

ClearGuild clears the "guild" edge to the Guild entity.

func (*WordSuffixUpdateOne) ClearGuildID

func (wsuo *WordSuffixUpdateOne) ClearGuildID() *WordSuffixUpdateOne

ClearGuildID clears the value of the "guild_id" field.

func (*WordSuffixUpdateOne) ClearOwner

func (wsuo *WordSuffixUpdateOne) ClearOwner() *WordSuffixUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*WordSuffixUpdateOne) Exec

func (wsuo *WordSuffixUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WordSuffixUpdateOne) ExecX

func (wsuo *WordSuffixUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WordSuffixUpdateOne) Mutation

func (wsuo *WordSuffixUpdateOne) Mutation() *WordSuffixMutation

Mutation returns the WordSuffixMutation object of the builder.

func (*WordSuffixUpdateOne) Save

func (wsuo *WordSuffixUpdateOne) Save(ctx context.Context) (*WordSuffix, error)

Save executes the query and returns the updated WordSuffix entity.

func (*WordSuffixUpdateOne) SaveX

func (wsuo *WordSuffixUpdateOne) SaveX(ctx context.Context) *WordSuffix

SaveX is like Save, but panics if an error occurs.

func (*WordSuffixUpdateOne) Select

func (wsuo *WordSuffixUpdateOne) Select(field string, fields ...string) *WordSuffixUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WordSuffixUpdateOne) SetExpired

func (wsuo *WordSuffixUpdateOne) SetExpired(t time.Time) *WordSuffixUpdateOne

SetExpired sets the "expired" field.

func (*WordSuffixUpdateOne) SetGuild

func (wsuo *WordSuffixUpdateOne) SetGuild(g *Guild) *WordSuffixUpdateOne

SetGuild sets the "guild" edge to the Guild entity.

func (*WordSuffixUpdateOne) SetGuildID

func (wsuo *WordSuffixUpdateOne) SetGuildID(s snowflake.ID) *WordSuffixUpdateOne

SetGuildID sets the "guild_id" field.

func (*WordSuffixUpdateOne) SetNillableExpired

func (wsuo *WordSuffixUpdateOne) SetNillableExpired(t *time.Time) *WordSuffixUpdateOne

SetNillableExpired sets the "expired" field if the given value is not nil.

func (*WordSuffixUpdateOne) SetNillableGuildID

func (wsuo *WordSuffixUpdateOne) SetNillableGuildID(s *snowflake.ID) *WordSuffixUpdateOne

SetNillableGuildID sets the "guild_id" field if the given value is not nil.

func (*WordSuffixUpdateOne) SetNillableRule

func (wsuo *WordSuffixUpdateOne) SetNillableRule(w *wordsuffix.Rule) *WordSuffixUpdateOne

SetNillableRule sets the "rule" field if the given value is not nil.

func (*WordSuffixUpdateOne) SetNillableSuffix

func (wsuo *WordSuffixUpdateOne) SetNillableSuffix(s *string) *WordSuffixUpdateOne

SetNillableSuffix sets the "suffix" field if the given value is not nil.

func (*WordSuffixUpdateOne) SetOwner

func (wsuo *WordSuffixUpdateOne) SetOwner(u *User) *WordSuffixUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*WordSuffixUpdateOne) SetOwnerID

func (wsuo *WordSuffixUpdateOne) SetOwnerID(id snowflake.ID) *WordSuffixUpdateOne

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*WordSuffixUpdateOne) SetRule

SetRule sets the "rule" field.

func (*WordSuffixUpdateOne) SetSuffix

func (wsuo *WordSuffixUpdateOne) SetSuffix(s string) *WordSuffixUpdateOne

SetSuffix sets the "suffix" field.

func (*WordSuffixUpdateOne) Where

Where appends a list predicates to the WordSuffixUpdate builder.

type WordSuffixes

type WordSuffixes []*WordSuffix

WordSuffixes is a parsable slice of WordSuffix.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL