models

package
v1.24.19 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 15 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 {
	TwitterFeeds string
}{
	TwitterFeeds: "twitter_feeds",
}
View Source
var TwitterFeedColumns = struct {
	ID              string
	GuildID         string
	CreatedAt       string
	TwitterUsername string
	TwitterUserID   string
	ChannelID       string
	Enabled         string
	IncludeReplies  string
	IncludeRT       string
}{
	ID:              "id",
	GuildID:         "guild_id",
	CreatedAt:       "created_at",
	TwitterUsername: "twitter_username",
	TwitterUserID:   "twitter_user_id",
	ChannelID:       "channel_id",
	Enabled:         "enabled",
	IncludeReplies:  "include_replies",
	IncludeRT:       "include_rt",
}
View Source
var TwitterFeedRels = struct {
}{}

TwitterFeedRels is where relationship names are stored.

View Source
var TwitterFeedWhere = struct {
	ID              whereHelperint64
	GuildID         whereHelperint64
	CreatedAt       whereHelpertime_Time
	TwitterUsername whereHelperstring
	TwitterUserID   whereHelperint64
	ChannelID       whereHelperint64
	Enabled         whereHelperbool
	IncludeReplies  whereHelperbool
	IncludeRT       whereHelperbool
}{
	ID:              whereHelperint64{/* contains filtered or unexported fields */},
	GuildID:         whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	TwitterUsername: whereHelperstring{/* contains filtered or unexported fields */},
	TwitterUserID:   whereHelperint64{/* contains filtered or unexported fields */},
	ChannelID:       whereHelperint64{/* contains filtered or unexported fields */},
	Enabled:         whereHelperbool{/* contains filtered or unexported fields */},
	IncludeReplies:  whereHelperbool{/* contains filtered or unexported fields */},
	IncludeRT:       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 TwitterFeedExists

func TwitterFeedExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

TwitterFeedExists checks if the TwitterFeed row exists.

func TwitterFeedExistsG

func TwitterFeedExistsG(ctx context.Context, iD int64) (bool, error)

TwitterFeedExistsG checks if the TwitterFeed row exists.

func TwitterFeeds

func TwitterFeeds(mods ...qm.QueryMod) twitterFeedQuery

TwitterFeeds 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 TwitterFeed

type TwitterFeed struct {
	ID              int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	GuildID         int64     `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	CreatedAt       time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	TwitterUsername string    `boil:"twitter_username" json:"twitter_username" toml:"twitter_username" yaml:"twitter_username"`
	TwitterUserID   int64     `boil:"twitter_user_id" json:"twitter_user_id" toml:"twitter_user_id" yaml:"twitter_user_id"`
	ChannelID       int64     `boil:"channel_id" json:"channel_id" toml:"channel_id" yaml:"channel_id"`
	Enabled         bool      `boil:"enabled" json:"enabled" toml:"enabled" yaml:"enabled"`
	IncludeReplies  bool      `boil:"include_replies" json:"include_replies" toml:"include_replies" yaml:"include_replies"`
	IncludeRT       bool      `boil:"include_rt" json:"include_rt" toml:"include_rt" yaml:"include_rt"`

	R *twitterFeedR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L twitterFeedL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

TwitterFeed is an object representing the database table.

func FindTwitterFeed

func FindTwitterFeed(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*TwitterFeed, error)

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

func FindTwitterFeedG

func FindTwitterFeedG(ctx context.Context, iD int64, selectCols ...string) (*TwitterFeed, error)

FindTwitterFeedG retrieves a single record by ID.

func (*TwitterFeed) Delete

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

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

func (*TwitterFeed) DeleteG

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

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

func (*TwitterFeed) Insert

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

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

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

func (*TwitterFeed) Reload

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

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

func (*TwitterFeed) ReloadG

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

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

func (*TwitterFeed) Update

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

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

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

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

func (*TwitterFeed) Upsert

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

func (o *TwitterFeed) 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 TwitterFeedSlice

type TwitterFeedSlice []*TwitterFeed

TwitterFeedSlice is an alias for a slice of pointers to TwitterFeed. This should generally be used opposed to []TwitterFeed.

func (TwitterFeedSlice) DeleteAll

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

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

func (TwitterFeedSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*TwitterFeedSlice) ReloadAll

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

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

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

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

func (TwitterFeedSlice) UpdateAllG

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