models

package
v0.0.0-...-fb67095 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 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 {
	YoutubeAnnouncements        string
	YoutubeChannelSubscriptions string
}{
	YoutubeAnnouncements:        "youtube_announcements",
	YoutubeChannelSubscriptions: "youtube_channel_subscriptions",
}
View Source
var ViewNames = struct {
}{}
View Source
var YoutubeAnnouncementColumns = struct {
	GuildID string
	Message string
	Enabled string
}{
	GuildID: "guild_id",
	Message: "message",
	Enabled: "enabled",
}
View Source
var YoutubeAnnouncementRels = struct {
}{}

YoutubeAnnouncementRels is where relationship names are stored.

View Source
var YoutubeAnnouncementTableColumns = struct {
	GuildID string
	Message string
	Enabled string
}{
	GuildID: "youtube_announcements.guild_id",
	Message: "youtube_announcements.message",
	Enabled: "youtube_announcements.enabled",
}
View Source
var YoutubeAnnouncementWhere = 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 YoutubeChannelSubscriptionColumns = struct {
	ID                 string
	CreatedAt          string
	UpdatedAt          string
	GuildID            string
	ChannelID          string
	YoutubeChannelID   string
	YoutubeChannelName string
	MentionEveryone    string
	MentionRoles       string
	PublishLivestream  string
	PublishShorts      string
	Enabled            string
}{
	ID:                 "id",
	CreatedAt:          "created_at",
	UpdatedAt:          "updated_at",
	GuildID:            "guild_id",
	ChannelID:          "channel_id",
	YoutubeChannelID:   "youtube_channel_id",
	YoutubeChannelName: "youtube_channel_name",
	MentionEveryone:    "mention_everyone",
	MentionRoles:       "mention_roles",
	PublishLivestream:  "publish_livestream",
	PublishShorts:      "publish_shorts",
	Enabled:            "enabled",
}
View Source
var YoutubeChannelSubscriptionRels = struct {
}{}

YoutubeChannelSubscriptionRels is where relationship names are stored.

View Source
var YoutubeChannelSubscriptionTableColumns = struct {
	ID                 string
	CreatedAt          string
	UpdatedAt          string
	GuildID            string
	ChannelID          string
	YoutubeChannelID   string
	YoutubeChannelName string
	MentionEveryone    string
	MentionRoles       string
	PublishLivestream  string
	PublishShorts      string
	Enabled            string
}{
	ID:                 "youtube_channel_subscriptions.id",
	CreatedAt:          "youtube_channel_subscriptions.created_at",
	UpdatedAt:          "youtube_channel_subscriptions.updated_at",
	GuildID:            "youtube_channel_subscriptions.guild_id",
	ChannelID:          "youtube_channel_subscriptions.channel_id",
	YoutubeChannelID:   "youtube_channel_subscriptions.youtube_channel_id",
	YoutubeChannelName: "youtube_channel_subscriptions.youtube_channel_name",
	MentionEveryone:    "youtube_channel_subscriptions.mention_everyone",
	MentionRoles:       "youtube_channel_subscriptions.mention_roles",
	PublishLivestream:  "youtube_channel_subscriptions.publish_livestream",
	PublishShorts:      "youtube_channel_subscriptions.publish_shorts",
	Enabled:            "youtube_channel_subscriptions.enabled",
}
View Source
var YoutubeChannelSubscriptionWhere = struct {
	ID                 whereHelperint
	CreatedAt          whereHelpertime_Time
	UpdatedAt          whereHelpertime_Time
	GuildID            whereHelperstring
	ChannelID          whereHelperstring
	YoutubeChannelID   whereHelperstring
	YoutubeChannelName whereHelperstring
	MentionEveryone    whereHelperbool
	MentionRoles       whereHelpertypes_Int64Array
	PublishLivestream  whereHelperbool
	PublishShorts      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 */},
	YoutubeChannelID:   whereHelperstring{/* contains filtered or unexported fields */},
	YoutubeChannelName: whereHelperstring{/* contains filtered or unexported fields */},
	MentionEveryone:    whereHelperbool{/* contains filtered or unexported fields */},
	MentionRoles:       whereHelpertypes_Int64Array{/* contains filtered or unexported fields */},
	PublishLivestream:  whereHelperbool{/* contains filtered or unexported fields */},
	PublishShorts:      whereHelperbool{/* contains filtered or unexported fields */},
	Enabled:            whereHelperbool{/* contains filtered or unexported fields */},
}

Functions

func NewQuery

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

NewQuery initializes a new Query using the passed in QueryMods

func YoutubeAnnouncementExists

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

YoutubeAnnouncementExists checks if the YoutubeAnnouncement row exists.

func YoutubeAnnouncementExistsG

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

YoutubeAnnouncementExistsG checks if the YoutubeAnnouncement row exists.

func YoutubeAnnouncements

func YoutubeAnnouncements(mods ...qm.QueryMod) youtubeAnnouncementQuery

YoutubeAnnouncements retrieves all the records using an executor.

func YoutubeChannelSubscriptionExists

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

YoutubeChannelSubscriptionExists checks if the YoutubeChannelSubscription row exists.

func YoutubeChannelSubscriptionExistsG

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

YoutubeChannelSubscriptionExistsG checks if the YoutubeChannelSubscription row exists.

func YoutubeChannelSubscriptions

func YoutubeChannelSubscriptions(mods ...qm.QueryMod) youtubeChannelSubscriptionQuery

YoutubeChannelSubscriptions 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 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
}

type YoutubeAnnouncement

type YoutubeAnnouncement 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 *youtubeAnnouncementR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L youtubeAnnouncementL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

YoutubeAnnouncement is an object representing the database table.

func FindYoutubeAnnouncement

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

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

func FindYoutubeAnnouncementG

func FindYoutubeAnnouncementG(ctx context.Context, guildID int64, selectCols ...string) (*YoutubeAnnouncement, error)

FindYoutubeAnnouncementG retrieves a single record by ID.

func (*YoutubeAnnouncement) Delete

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

func (*YoutubeAnnouncement) DeleteG

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

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

func (*YoutubeAnnouncement) Exists

Exists checks if the YoutubeAnnouncement row exists.

func (*YoutubeAnnouncement) Insert

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

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

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

func (*YoutubeAnnouncement) Reload

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

func (*YoutubeAnnouncement) ReloadG

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

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

func (*YoutubeAnnouncement) Update

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

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

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

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

func (*YoutubeAnnouncement) Upsert

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

func (o *YoutubeAnnouncement) 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 YoutubeAnnouncementSlice

type YoutubeAnnouncementSlice []*YoutubeAnnouncement

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

func (YoutubeAnnouncementSlice) DeleteAll

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

func (YoutubeAnnouncementSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*YoutubeAnnouncementSlice) ReloadAll

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

func (*YoutubeAnnouncementSlice) ReloadAllG

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

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

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

func (YoutubeAnnouncementSlice) UpdateAllG

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

UpdateAllG updates all rows with the specified column values.

type YoutubeChannelSubscription

type YoutubeChannelSubscription 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"`
	YoutubeChannelID   string           `boil:"youtube_channel_id" json:"youtube_channel_id" toml:"youtube_channel_id" yaml:"youtube_channel_id"`
	YoutubeChannelName string           `boil:"youtube_channel_name" json:"youtube_channel_name" toml:"youtube_channel_name" yaml:"youtube_channel_name"`
	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"`
	PublishLivestream  bool             `boil:"publish_livestream" json:"publish_livestream" toml:"publish_livestream" yaml:"publish_livestream"`
	PublishShorts      bool             `boil:"publish_shorts" json:"publish_shorts" toml:"publish_shorts" yaml:"publish_shorts"`
	Enabled            bool             `boil:"enabled" json:"enabled" toml:"enabled" yaml:"enabled"`

	R *youtubeChannelSubscriptionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L youtubeChannelSubscriptionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

YoutubeChannelSubscription is an object representing the database table.

func FindYoutubeChannelSubscription

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

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

func FindYoutubeChannelSubscriptionG

func FindYoutubeChannelSubscriptionG(ctx context.Context, iD int, selectCols ...string) (*YoutubeChannelSubscription, error)

FindYoutubeChannelSubscriptionG retrieves a single record by ID.

func (*YoutubeChannelSubscription) Delete

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

func (*YoutubeChannelSubscription) DeleteG

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

func (*YoutubeChannelSubscription) Exists

Exists checks if the YoutubeChannelSubscription row exists.

func (*YoutubeChannelSubscription) Insert

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

func (*YoutubeChannelSubscription) InsertG

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

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

func (*YoutubeChannelSubscription) Reload

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

func (*YoutubeChannelSubscription) ReloadG

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

func (*YoutubeChannelSubscription) Update

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

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

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

func (*YoutubeChannelSubscription) Upsert

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

func (o *YoutubeChannelSubscription) 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 YoutubeChannelSubscriptionSlice

type YoutubeChannelSubscriptionSlice []*YoutubeChannelSubscription

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

func (YoutubeChannelSubscriptionSlice) DeleteAll

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

func (YoutubeChannelSubscriptionSlice) DeleteAllG

DeleteAllG deletes all rows in the slice.

func (*YoutubeChannelSubscriptionSlice) ReloadAll

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

func (*YoutubeChannelSubscriptionSlice) ReloadAllG

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

func (YoutubeChannelSubscriptionSlice) UpdateAll

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

func (YoutubeChannelSubscriptionSlice) UpdateAllG

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