models

package
v0.0.0-...-7ecd1d8 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 16 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 FunSettingColumns = struct {
	GuildID    string
	Topics     string
	NSFWTopics string
	DadJokes   string
	Wyrs       string
	NSFWWyrs   string
}{
	GuildID:    "guild_id",
	Topics:     "topics",
	NSFWTopics: "nsfw_topics",
	DadJokes:   "dad_jokes",
	Wyrs:       "wyrs",
	NSFWWyrs:   "nsfw_wyrs",
}
View Source
var FunSettingRels = struct {
}{}

FunSettingRels is where relationship names are stored.

View Source
var FunSettingTableColumns = struct {
	GuildID    string
	Topics     string
	NSFWTopics string
	DadJokes   string
	Wyrs       string
	NSFWWyrs   string
}{
	GuildID:    "fun_settings.guild_id",
	Topics:     "fun_settings.topics",
	NSFWTopics: "fun_settings.nsfw_topics",
	DadJokes:   "fun_settings.dad_jokes",
	Wyrs:       "fun_settings.wyrs",
	NSFWWyrs:   "fun_settings.nsfw_wyrs",
}
View Source
var FunSettingWhere = struct {
	GuildID    whereHelperint64
	Topics     whereHelperstring
	NSFWTopics whereHelperstring
	DadJokes   whereHelperstring
	Wyrs       whereHelperstring
	NSFWWyrs   whereHelperstring
}{
	GuildID:    whereHelperint64{/* contains filtered or unexported fields */},
	Topics:     whereHelperstring{/* contains filtered or unexported fields */},
	NSFWTopics: whereHelperstring{/* contains filtered or unexported fields */},
	DadJokes:   whereHelperstring{/* contains filtered or unexported fields */},
	Wyrs:       whereHelperstring{/* contains filtered or unexported fields */},
	NSFWWyrs:   whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	FunSettings string
}{
	FunSettings: "fun_settings",
}
View Source
var ViewNames = struct {
}{}

Functions

func FunSettingExists

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

FunSettingExists checks if the FunSetting row exists.

func FunSettingExistsG

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

FunSettingExistsG checks if the FunSetting row exists.

func FunSettings

func FunSettings(mods ...qm.QueryMod) funSettingQuery

FunSettings 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 FunSetting

type FunSetting struct {
	GuildID    int64  `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	Topics     string `boil:"topics" json:"topics" toml:"topics" yaml:"topics"`
	NSFWTopics string `boil:"nsfw_topics" json:"nsfw_topics" toml:"nsfw_topics" yaml:"nsfw_topics"`
	DadJokes   string `boil:"dad_jokes" json:"dad_jokes" toml:"dad_jokes" yaml:"dad_jokes"`
	Wyrs       string `boil:"wyrs" json:"wyrs" toml:"wyrs" yaml:"wyrs"`
	NSFWWyrs   string `boil:"nsfw_wyrs" json:"nsfw_wyrs" toml:"nsfw_wyrs" yaml:"nsfw_wyrs"`

	R *funSettingR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L funSettingL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

FunSetting is an object representing the database table.

func FindFunSetting

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

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

func FindFunSettingG

func FindFunSettingG(ctx context.Context, guildID int64, selectCols ...string) (*FunSetting, error)

FindFunSettingG retrieves a single record by ID.

func (*FunSetting) Delete

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

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

func (*FunSetting) DeleteG

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

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

func (*FunSetting) Exists

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

Exists checks if the FunSetting row exists.

func (*FunSetting) Insert

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

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

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

func (*FunSetting) Reload

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

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

func (*FunSetting) ReloadG

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

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

func (*FunSetting) Update

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

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

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

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

func (*FunSetting) Upsert

func (o *FunSetting) 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 (*FunSetting) UpsertG

func (o *FunSetting) 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 FunSettingSlice

type FunSettingSlice []*FunSetting

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

func (FunSettingSlice) DeleteAll

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

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

func (FunSettingSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*FunSettingSlice) ReloadAll

func (o *FunSettingSlice) 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 (*FunSettingSlice) ReloadAllG

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

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

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

func (FunSettingSlice) UpdateAllG

func (o FunSettingSlice) 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.

Jump to

Keyboard shortcuts

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