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 RSSFeedSubscriptionColumns = struct {
	ID              string
	CreatedAt       string
	UpdatedAt       string
	GuildID         string
	ChannelID       string
	FeedURL         string
	MentionEveryone string
	MentionRoles    string
	Enabled         string
}{
	ID:              "id",
	CreatedAt:       "created_at",
	UpdatedAt:       "updated_at",
	GuildID:         "guild_id",
	ChannelID:       "channel_id",
	FeedURL:         "feed_url",
	MentionEveryone: "mention_everyone",
	MentionRoles:    "mention_roles",
	Enabled:         "enabled",
}
View Source
var RSSFeedSubscriptionRels = struct {
}{}

RSSFeedSubscriptionRels is where relationship names are stored.

View Source
var RSSFeedSubscriptionTableColumns = struct {
	ID              string
	CreatedAt       string
	UpdatedAt       string
	GuildID         string
	ChannelID       string
	FeedURL         string
	MentionEveryone string
	MentionRoles    string
	Enabled         string
}{
	ID:              "rss_feed_subscriptions.id",
	CreatedAt:       "rss_feed_subscriptions.created_at",
	UpdatedAt:       "rss_feed_subscriptions.updated_at",
	GuildID:         "rss_feed_subscriptions.guild_id",
	ChannelID:       "rss_feed_subscriptions.channel_id",
	FeedURL:         "rss_feed_subscriptions.feed_url",
	MentionEveryone: "rss_feed_subscriptions.mention_everyone",
	MentionRoles:    "rss_feed_subscriptions.mention_roles",
	Enabled:         "rss_feed_subscriptions.enabled",
}
View Source
var RSSFeedSubscriptionWhere = struct {
	ID              whereHelperint
	CreatedAt       whereHelpertime_Time
	UpdatedAt       whereHelpertime_Time
	GuildID         whereHelperint64
	ChannelID       whereHelperint64
	FeedURL         whereHelperstring
	MentionEveryone whereHelperbool
	MentionRoles    whereHelpertypes_Int64Array
	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:         whereHelperint64{/* contains filtered or unexported fields */},
	ChannelID:       whereHelperint64{/* contains filtered or unexported fields */},
	FeedURL:         whereHelperstring{/* contains filtered or unexported fields */},
	MentionEveryone: whereHelperbool{/* contains filtered or unexported fields */},
	MentionRoles:    whereHelpertypes_Int64Array{/* contains filtered or unexported fields */},
	Enabled:         whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	RSSFeedSubscriptions string
}{
	RSSFeedSubscriptions: "rss_feed_subscriptions",
}
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 RSSFeedSubscriptionExists

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

RSSFeedSubscriptionExists checks if the RSSFeedSubscription row exists.

func RSSFeedSubscriptionExistsG

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

RSSFeedSubscriptionExistsG checks if the RSSFeedSubscription row exists.

func RSSFeedSubscriptions

func RSSFeedSubscriptions(mods ...qm.QueryMod) rssFeedSubscriptionQuery

RSSFeedSubscriptions 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 RSSFeedSubscription

type RSSFeedSubscription 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         int64            `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	ChannelID       int64            `boil:"channel_id" json:"channel_id" toml:"channel_id" yaml:"channel_id"`
	FeedURL         string           `boil:"feed_url" json:"feed_url" toml:"feed_url" yaml:"feed_url"`
	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"`
	Enabled         bool             `boil:"enabled" json:"enabled" toml:"enabled" yaml:"enabled"`

	R *rssFeedSubscriptionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L rssFeedSubscriptionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

RSSFeedSubscription is an object representing the database table.

func FindRSSFeedSubscription

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

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

func FindRSSFeedSubscriptionG

func FindRSSFeedSubscriptionG(ctx context.Context, iD int, selectCols ...string) (*RSSFeedSubscription, error)

FindRSSFeedSubscriptionG retrieves a single record by ID.

func (*RSSFeedSubscription) Delete

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

func (*RSSFeedSubscription) DeleteG

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

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

func (*RSSFeedSubscription) Exists

Exists checks if the RSSFeedSubscription row exists.

func (*RSSFeedSubscription) Insert

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

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

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

func (*RSSFeedSubscription) Reload

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

func (*RSSFeedSubscription) ReloadG

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

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

func (*RSSFeedSubscription) Update

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

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

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

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

func (*RSSFeedSubscription) Upsert

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

func (o *RSSFeedSubscription) 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 RSSFeedSubscriptionSlice

type RSSFeedSubscriptionSlice []*RSSFeedSubscription

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

func (RSSFeedSubscriptionSlice) DeleteAll

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

func (RSSFeedSubscriptionSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*RSSFeedSubscriptionSlice) ReloadAll

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

func (*RSSFeedSubscriptionSlice) ReloadAllG

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

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

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

func (RSSFeedSubscriptionSlice) UpdateAllG

func (o RSSFeedSubscriptionSlice) 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
⌂ 换网址