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 TableNames = struct {
	TwitchAnnouncements        string
	TwitchChannelSubscriptions string
}{
	TwitchAnnouncements:        "twitch_announcements",
	TwitchChannelSubscriptions: "twitch_channel_subscriptions",
}
View Source
var TwitchAnnouncementColumns = struct {
	GuildID string
	Message string
	Enabled string
}{
	GuildID: "guild_id",
	Message: "message",
	Enabled: "enabled",
}
View Source
var TwitchAnnouncementRels = struct {
}{}

TwitchAnnouncementRels is where relationship names are stored.

View Source
var TwitchAnnouncementTableColumns = struct {
	GuildID string
	Message string
	Enabled string
}{
	GuildID: "twitch_announcements.guild_id",
	Message: "twitch_announcements.message",
	Enabled: "twitch_announcements.enabled",
}
View Source
var TwitchAnnouncementWhere = struct {
	GuildID whereHelperint64
	Message whereHelperstring
	Enabled whereHelperbool
}{
	GuildID: whereHelperint64{/* contains filtered or unexported fields */},
	Message: whereHelperstring{/* contains filtered or unexported fields */},
	Enabled: whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var TwitchChannelSubscriptionColumns = struct {
	ID              string
	CreatedAt       string
	UpdatedAt       string
	GuildID         string
	ChannelID       string
	TwitchUserID    string
	TwitchUsername  string
	MentionEveryone string
	MentionRoles    string
	PublishVod      string
	Enabled         string
}{
	ID:              "id",
	CreatedAt:       "created_at",
	UpdatedAt:       "updated_at",
	GuildID:         "guild_id",
	ChannelID:       "channel_id",
	TwitchUserID:    "twitch_user_id",
	TwitchUsername:  "twitch_username",
	MentionEveryone: "mention_everyone",
	MentionRoles:    "mention_roles",
	PublishVod:      "publish_vod",
	Enabled:         "enabled",
}
View Source
var TwitchChannelSubscriptionRels = struct {
}{}

TwitchChannelSubscriptionRels is where relationship names are stored.

View Source
var TwitchChannelSubscriptionTableColumns = struct {
	ID              string
	CreatedAt       string
	UpdatedAt       string
	GuildID         string
	ChannelID       string
	TwitchUserID    string
	TwitchUsername  string
	MentionEveryone string
	MentionRoles    string
	PublishVod      string
	Enabled         string
}{
	ID:              "twitch_channel_subscriptions.id",
	CreatedAt:       "twitch_channel_subscriptions.created_at",
	UpdatedAt:       "twitch_channel_subscriptions.updated_at",
	GuildID:         "twitch_channel_subscriptions.guild_id",
	ChannelID:       "twitch_channel_subscriptions.channel_id",
	TwitchUserID:    "twitch_channel_subscriptions.twitch_user_id",
	TwitchUsername:  "twitch_channel_subscriptions.twitch_username",
	MentionEveryone: "twitch_channel_subscriptions.mention_everyone",
	MentionRoles:    "twitch_channel_subscriptions.mention_roles",
	PublishVod:      "twitch_channel_subscriptions.publish_vod",
	Enabled:         "twitch_channel_subscriptions.enabled",
}
View Source
var TwitchChannelSubscriptionWhere = struct {
	ID              whereHelperint
	CreatedAt       whereHelpertime_Time
	UpdatedAt       whereHelpertime_Time
	GuildID         whereHelperstring
	ChannelID       whereHelperstring
	TwitchUserID    whereHelperstring
	TwitchUsername  whereHelperstring
	MentionEveryone whereHelperbool
	MentionRoles    whereHelpertypes_Int64Array
	PublishVod      whereHelperbool
	Enabled         whereHelperbool
}{
	ID:              whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	GuildID:         whereHelperstring{/* contains filtered or unexported fields */},
	ChannelID:       whereHelperstring{/* contains filtered or unexported fields */},
	TwitchUserID:    whereHelperstring{/* contains filtered or unexported fields */},
	TwitchUsername:  whereHelperstring{/* contains filtered or unexported fields */},
	MentionEveryone: whereHelperbool{/* contains filtered or unexported fields */},
	MentionRoles:    whereHelpertypes_Int64Array{/* contains filtered or unexported fields */},
	PublishVod:      whereHelperbool{/* contains filtered or unexported fields */},
	Enabled:         whereHelperbool{/* contains filtered or unexported fields */},
}
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 TwitchAnnouncementExists

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

TwitchAnnouncementExists checks if the TwitchAnnouncement row exists.

func TwitchAnnouncementExistsG

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

TwitchAnnouncementExistsG checks if the TwitchAnnouncement row exists.

func TwitchAnnouncements

func TwitchAnnouncements(mods ...qm.QueryMod) twitchAnnouncementQuery

TwitchAnnouncements retrieves all the records using an executor.

func TwitchChannelSubscriptionExists

func TwitchChannelSubscriptionExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

TwitchChannelSubscriptionExists checks if the TwitchChannelSubscription row exists.

func TwitchChannelSubscriptionExistsG

func TwitchChannelSubscriptionExistsG(ctx context.Context, iD int) (bool, error)

TwitchChannelSubscriptionExistsG checks if the TwitchChannelSubscription row exists.

func TwitchChannelSubscriptions

func TwitchChannelSubscriptions(mods ...qm.QueryMod) twitchChannelSubscriptionQuery

TwitchChannelSubscriptions 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 TwitchAnnouncement

type TwitchAnnouncement struct {
	GuildID int64  `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	Message string `boil:"message" json:"message" toml:"message" yaml:"message"`
	Enabled bool   `boil:"enabled" json:"enabled" toml:"enabled" yaml:"enabled"`

	R *twitchAnnouncementR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L twitchAnnouncementL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

TwitchAnnouncement is an object representing the database table.

func FindTwitchAnnouncement

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

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

func FindTwitchAnnouncementG

func FindTwitchAnnouncementG(ctx context.Context, guildID int64, selectCols ...string) (*TwitchAnnouncement, error)

FindTwitchAnnouncementG retrieves a single record by ID.

func (*TwitchAnnouncement) Delete

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

func (*TwitchAnnouncement) DeleteG

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

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

func (*TwitchAnnouncement) Exists

Exists checks if the TwitchAnnouncement row exists.

func (*TwitchAnnouncement) Insert

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

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

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

func (*TwitchAnnouncement) Reload

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

func (*TwitchAnnouncement) ReloadG

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

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

func (*TwitchAnnouncement) Update

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

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

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

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

func (*TwitchAnnouncement) Upsert

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

func (o *TwitchAnnouncement) 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 TwitchAnnouncementSlice

type TwitchAnnouncementSlice []*TwitchAnnouncement

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

func (TwitchAnnouncementSlice) DeleteAll

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

func (TwitchAnnouncementSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*TwitchAnnouncementSlice) ReloadAll

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

func (*TwitchAnnouncementSlice) ReloadAllG

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

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

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

func (TwitchAnnouncementSlice) UpdateAllG

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

UpdateAllG updates all rows with the specified column values.

type TwitchChannelSubscription

type TwitchChannelSubscription struct {
	ID              int              `boil:"id" json:"id" toml:"id" yaml:"id"`
	CreatedAt       time.Time        `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt       time.Time        `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	GuildID         string           `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	ChannelID       string           `boil:"channel_id" json:"channel_id" toml:"channel_id" yaml:"channel_id"`
	TwitchUserID    string           `boil:"twitch_user_id" json:"twitch_user_id" toml:"twitch_user_id" yaml:"twitch_user_id"`
	TwitchUsername  string           `boil:"twitch_username" json:"twitch_username" toml:"twitch_username" yaml:"twitch_username"`
	MentionEveryone bool             `boil:"mention_everyone" json:"mention_everyone" toml:"mention_everyone" yaml:"mention_everyone"`
	MentionRoles    types.Int64Array `boil:"mention_roles" json:"mention_roles,omitempty" toml:"mention_roles" yaml:"mention_roles,omitempty"`
	PublishVod      bool             `boil:"publish_vod" json:"publish_vod" toml:"publish_vod" yaml:"publish_vod"`
	Enabled         bool             `boil:"enabled" json:"enabled" toml:"enabled" yaml:"enabled"`

	R *twitchChannelSubscriptionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L twitchChannelSubscriptionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

TwitchChannelSubscription is an object representing the database table.

func FindTwitchChannelSubscription

func FindTwitchChannelSubscription(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*TwitchChannelSubscription, error)

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

func FindTwitchChannelSubscriptionG

func FindTwitchChannelSubscriptionG(ctx context.Context, iD int, selectCols ...string) (*TwitchChannelSubscription, error)

FindTwitchChannelSubscriptionG retrieves a single record by ID.

func (*TwitchChannelSubscription) Delete

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

func (*TwitchChannelSubscription) DeleteG

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

func (*TwitchChannelSubscription) Exists

Exists checks if the TwitchChannelSubscription row exists.

func (*TwitchChannelSubscription) Insert

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

func (*TwitchChannelSubscription) InsertG

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

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

func (*TwitchChannelSubscription) Reload

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

func (*TwitchChannelSubscription) ReloadG

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

func (*TwitchChannelSubscription) Update

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

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

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

func (*TwitchChannelSubscription) Upsert

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

func (o *TwitchChannelSubscription) 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 TwitchChannelSubscriptionSlice

type TwitchChannelSubscriptionSlice []*TwitchChannelSubscription

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

func (TwitchChannelSubscriptionSlice) DeleteAll

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

func (TwitchChannelSubscriptionSlice) DeleteAllG

DeleteAllG deletes all rows in the slice.

func (*TwitchChannelSubscriptionSlice) ReloadAll

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

func (*TwitchChannelSubscriptionSlice) ReloadAllG

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

func (TwitchChannelSubscriptionSlice) UpdateAll

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

func (TwitchChannelSubscriptionSlice) UpdateAllG

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

UpdateAllG updates all rows with the specified column values.

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
⌂ 换网址