models

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BannedGuildColumns = struct {
	GuildID string
}{
	GuildID: "guild_id",
}
View Source
var BannedGuildRels = struct {
}{}

BannedGuildRels is where relationship names are stored.

View Source
var BannedGuildTableColumns = struct {
	GuildID string
}{
	GuildID: "banned_guilds.guild_id",
}
View Source
var BannedGuildWhere = struct {
	GuildID whereHelperstring
}{
	GuildID: whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var CoreConfigColumns = struct {
	GuildID     string
	GuildPrefix string
}{
	GuildID:     "guild_id",
	GuildPrefix: "guild_prefix",
}
View Source
var CoreConfigRels = struct {
}{}

CoreConfigRels is where relationship names are stored.

View Source
var CoreConfigTableColumns = struct {
	GuildID     string
	GuildPrefix string
}{
	GuildID:     "core_config.guild_id",
	GuildPrefix: "core_config.guild_prefix",
}
View Source
var CoreConfigWhere = struct {
	GuildID     whereHelperstring
	GuildPrefix whereHelperstring
}{
	GuildID:     whereHelperstring{/* contains filtered or unexported fields */},
	GuildPrefix: whereHelperstring{/* contains filtered or unexported fields */},
}
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 TableNames = struct {
	BannedGuilds string
	CoreConfig   string
}{
	BannedGuilds: "banned_guilds",
	CoreConfig:   "core_config",
}
View Source
var ViewNames = struct {
}{}

Functions

func BannedGuildExists

func BannedGuildExists(ctx context.Context, exec boil.ContextExecutor, guildID string) (bool, error)

BannedGuildExists checks if the BannedGuild row exists.

func BannedGuildExistsG

func BannedGuildExistsG(ctx context.Context, guildID string) (bool, error)

BannedGuildExistsG checks if the BannedGuild row exists.

func BannedGuilds

func BannedGuilds(mods ...qm.QueryMod) bannedGuildQuery

BannedGuilds retrieves all the records using an executor.

func CoreConfigExists

func CoreConfigExists(ctx context.Context, exec boil.ContextExecutor, guildID string) (bool, error)

CoreConfigExists checks if the CoreConfig row exists.

func CoreConfigExistsG

func CoreConfigExistsG(ctx context.Context, guildID string) (bool, error)

CoreConfigExistsG checks if the CoreConfig row exists.

func CoreConfigs

func CoreConfigs(mods ...qm.QueryMod) coreConfigQuery

CoreConfigs retrieves all the records using an executor.

func NewQuery

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

NewQuery initializes a new Query using the passed in QueryMods

Types

type BannedGuild

type BannedGuild struct {
	GuildID string `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`

	R *bannedGuildR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L bannedGuildL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

BannedGuild is an object representing the database table.

func FindBannedGuild

func FindBannedGuild(ctx context.Context, exec boil.ContextExecutor, guildID string, selectCols ...string) (*BannedGuild, error)

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

func FindBannedGuildG

func FindBannedGuildG(ctx context.Context, guildID string, selectCols ...string) (*BannedGuild, error)

FindBannedGuildG retrieves a single record by ID.

func (*BannedGuild) Delete

func (o *BannedGuild) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*BannedGuild) DeleteG

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

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

func (*BannedGuild) Exists

func (o *BannedGuild) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the BannedGuild row exists.

func (*BannedGuild) Insert

func (o *BannedGuild) 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 (*BannedGuild) InsertG

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

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

func (*BannedGuild) Reload

func (o *BannedGuild) Reload(ctx context.Context, exec boil.ContextExecutor) error

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

func (*BannedGuild) ReloadG

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

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

func (*BannedGuild) Update

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

Update uses an executor to update the BannedGuild. 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 (*BannedGuild) UpdateG

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

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

func (*BannedGuild) Upsert

func (o *BannedGuild) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 (*BannedGuild) UpsertG

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

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

type BannedGuildSlice

type BannedGuildSlice []*BannedGuild

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

func (BannedGuildSlice) DeleteAll

func (o BannedGuildSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (BannedGuildSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*BannedGuildSlice) ReloadAll

func (o *BannedGuildSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

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

func (*BannedGuildSlice) ReloadAllG

func (o *BannedGuildSlice) 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 (BannedGuildSlice) UpdateAll

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

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

func (BannedGuildSlice) UpdateAllG

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

UpdateAllG updates all rows with the specified column values.

type CoreConfig

type CoreConfig struct {
	GuildID     string `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	GuildPrefix string `boil:"guild_prefix" json:"guild_prefix" toml:"guild_prefix" yaml:"guild_prefix"`

	R *coreConfigR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L coreConfigL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

CoreConfig is an object representing the database table.

func FindCoreConfig

func FindCoreConfig(ctx context.Context, exec boil.ContextExecutor, guildID string, selectCols ...string) (*CoreConfig, error)

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

func FindCoreConfigG

func FindCoreConfigG(ctx context.Context, guildID string, selectCols ...string) (*CoreConfig, error)

FindCoreConfigG retrieves a single record by ID.

func (*CoreConfig) Delete

func (o *CoreConfig) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*CoreConfig) DeleteG

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

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

func (*CoreConfig) Exists

func (o *CoreConfig) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the CoreConfig row exists.

func (*CoreConfig) Insert

func (o *CoreConfig) 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 (*CoreConfig) InsertG

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

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

func (*CoreConfig) Reload

func (o *CoreConfig) Reload(ctx context.Context, exec boil.ContextExecutor) error

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

func (*CoreConfig) ReloadG

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

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

func (*CoreConfig) Update

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

Update uses an executor to update the CoreConfig. 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 (*CoreConfig) UpdateG

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

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

func (*CoreConfig) Upsert

func (o *CoreConfig) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 (*CoreConfig) UpsertG

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

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

type CoreConfigSlice

type CoreConfigSlice []*CoreConfig

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

func (CoreConfigSlice) DeleteAll

func (o CoreConfigSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (CoreConfigSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*CoreConfigSlice) ReloadAll

func (o *CoreConfigSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

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

func (*CoreConfigSlice) ReloadAllG

func (o *CoreConfigSlice) 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 (CoreConfigSlice) UpdateAll

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

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

func (CoreConfigSlice) UpdateAllG

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

UpdateAllG updates all rows with the specified column values.

type M

type M map[string]interface{}

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

type UpsertOptionFunc

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions

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

Jump to

Keyboard shortcuts

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