models

package
v2.94.5 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var PersonalizedGuildColumns = struct {
	GuildID   string
	Nick      string
	Avatar    string
	Banner    string
	UpdatedAt string
}{
	GuildID:   "guild_id",
	Nick:      "nick",
	Avatar:    "avatar",
	Banner:    "banner",
	UpdatedAt: "updated_at",
}
View Source
var PersonalizedGuildRels = struct {
}{}

PersonalizedGuildRels is where relationship names are stored.

View Source
var PersonalizedGuildTableColumns = struct {
	GuildID   string
	Nick      string
	Avatar    string
	Banner    string
	UpdatedAt string
}{
	GuildID:   "personalized_guilds.guild_id",
	Nick:      "personalized_guilds.nick",
	Avatar:    "personalized_guilds.avatar",
	Banner:    "personalized_guilds.banner",
	UpdatedAt: "personalized_guilds.updated_at",
}
View Source
var PersonalizedGuildWhere = struct {
	GuildID   whereHelperint64
	Nick      whereHelpernull_String
	Avatar    whereHelpernull_String
	Banner    whereHelpernull_String
	UpdatedAt whereHelpertime_Time
}{
	GuildID:   whereHelperint64{/* contains filtered or unexported fields */},
	Nick:      whereHelpernull_String{/* contains filtered or unexported fields */},
	Avatar:    whereHelpernull_String{/* contains filtered or unexported fields */},
	Banner:    whereHelpernull_String{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	PersonalizedGuilds string
}{
	PersonalizedGuilds: "personalized_guilds",
}
View Source
var ViewNames = struct {
}{}

Functions

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func PersonalizedGuildExists

func PersonalizedGuildExists(ctx context.Context, exec boil.ContextExecutor, guildID int64) (bool, error)

PersonalizedGuildExists checks if the PersonalizedGuild row exists.

func PersonalizedGuildExistsG

func PersonalizedGuildExistsG(ctx context.Context, guildID int64) (bool, error)

PersonalizedGuildExistsG checks if the PersonalizedGuild row exists.

func PersonalizedGuilds

func PersonalizedGuilds(mods ...qm.QueryMod) personalizedGuildQuery

PersonalizedGuilds retrieves all the records using an executor.

Types

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type PersonalizedGuild

type PersonalizedGuild struct {
	GuildID   int64       `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	Nick      null.String `boil:"nick" json:"nick,omitempty" toml:"nick" yaml:"nick,omitempty"`
	Avatar    null.String `boil:"avatar" json:"avatar,omitempty" toml:"avatar" yaml:"avatar,omitempty"`
	Banner    null.String `boil:"banner" json:"banner,omitempty" toml:"banner" yaml:"banner,omitempty"`
	UpdatedAt time.Time   `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *personalizedGuildR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L personalizedGuildL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

PersonalizedGuild is an object representing the database table.

func FindPersonalizedGuild

func FindPersonalizedGuild(ctx context.Context, exec boil.ContextExecutor, guildID int64, selectCols ...string) (*PersonalizedGuild, error)

FindPersonalizedGuild retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindPersonalizedGuildG

func FindPersonalizedGuildG(ctx context.Context, guildID int64, selectCols ...string) (*PersonalizedGuild, error)

FindPersonalizedGuildG retrieves a single record by ID.

func (*PersonalizedGuild) Delete

Delete deletes a single PersonalizedGuild record with an executor. Delete will match against the primary key column to find the record to delete.

func (*PersonalizedGuild) DeleteG

func (o *PersonalizedGuild) DeleteG(ctx context.Context) (int64, error)

DeleteG deletes a single PersonalizedGuild record. DeleteG will match against the primary key column to find the record to delete.

func (*PersonalizedGuild) Exists

Exists checks if the PersonalizedGuild row exists.

func (*PersonalizedGuild) Insert

func (o *PersonalizedGuild) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*PersonalizedGuild) InsertG

func (o *PersonalizedGuild) InsertG(ctx context.Context, columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*PersonalizedGuild) Reload

Reload refetches the object from the database using the primary keys with an executor.

func (*PersonalizedGuild) ReloadG

func (o *PersonalizedGuild) ReloadG(ctx context.Context) error

ReloadG refetches the object from the database using the primary keys.

func (*PersonalizedGuild) Update

func (o *PersonalizedGuild) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the PersonalizedGuild. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*PersonalizedGuild) UpdateG

func (o *PersonalizedGuild) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)

UpdateG a single PersonalizedGuild record using the global executor. See Update for more documentation.

func (*PersonalizedGuild) Upsert

func (o *PersonalizedGuild) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

func (*PersonalizedGuild) UpsertG

func (o *PersonalizedGuild) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type PersonalizedGuildSlice

type PersonalizedGuildSlice []*PersonalizedGuild

PersonalizedGuildSlice is an alias for a slice of pointers to PersonalizedGuild. This should almost always be used instead of []PersonalizedGuild.

func (PersonalizedGuildSlice) DeleteAll

DeleteAll deletes all rows in the slice, using an executor.

func (PersonalizedGuildSlice) DeleteAllG

func (o PersonalizedGuildSlice) DeleteAllG(ctx context.Context) (int64, error)

DeleteAllG deletes all rows in the slice.

func (*PersonalizedGuildSlice) ReloadAll

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*PersonalizedGuildSlice) ReloadAllG

func (o *PersonalizedGuildSlice) ReloadAllG(ctx context.Context) error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (PersonalizedGuildSlice) UpdateAll

func (o PersonalizedGuildSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (PersonalizedGuildSlice) UpdateAllG

func (o PersonalizedGuildSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址