models

package
v1.11.5 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2018 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 ServerStatsConfigColumns = struct {
	GuildID        string
	CreatedAt      string
	UpdatedAt      string
	Public         string
	IgnoreChannels string
}{
	GuildID:        "guild_id",
	CreatedAt:      "created_at",
	UpdatedAt:      "updated_at",
	Public:         "public",
	IgnoreChannels: "ignore_channels",
}
View Source
var ServerStatsConfigRels = struct {
}{}

ServerStatsConfigRels is where relationship names are stored.

View Source
var ServerStatsPeriodColumns = struct {
	ID        string
	Started   string
	Duration  string
	GuildID   string
	UserID    string
	ChannelID string
	Count     string
}{
	ID:        "id",
	Started:   "started",
	Duration:  "duration",
	GuildID:   "guild_id",
	UserID:    "user_id",
	ChannelID: "channel_id",
	Count:     "count",
}
View Source
var ServerStatsPeriodRels = struct {
}{}

ServerStatsPeriodRels is where relationship names are stored.

View Source
var TableNames = struct {
	ServerStatsConfigs string
	ServerStatsPeriods string
}{
	ServerStatsConfigs: "server_stats_configs",
	ServerStatsPeriods: "server_stats_periods",
}

Functions

func NewQuery added in v1.7.4

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

NewQuery initializes a new Query using the passed in QueryMods

func ServerStatsConfigExists added in v1.7.4

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

ServerStatsConfigExists checks if the ServerStatsConfig row exists.

func ServerStatsConfigExistsG added in v1.7.4

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

ServerStatsConfigExistsG checks if the ServerStatsConfig row exists.

func ServerStatsConfigs added in v1.7.4

func ServerStatsConfigs(mods ...qm.QueryMod) serverStatsConfigQuery

ServerStatsConfigs retrieves all the records using an executor.

func ServerStatsPeriodExists added in v1.7.4

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

ServerStatsPeriodExists checks if the ServerStatsPeriod row exists.

func ServerStatsPeriodExistsG added in v1.7.4

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

ServerStatsPeriodExistsG checks if the ServerStatsPeriod row exists.

func ServerStatsPeriods added in v1.7.4

func ServerStatsPeriods(mods ...qm.QueryMod) serverStatsPeriodQuery

ServerStatsPeriods retrieves all the records using an executor.

Types

type M added in v1.7.4

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type ServerStatsConfig added in v1.7.4

type ServerStatsConfig struct {
	GuildID        int64       `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	CreatedAt      null.Time   `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"`
	UpdatedAt      null.Time   `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`
	Public         null.Bool   `boil:"public" json:"public,omitempty" toml:"public" yaml:"public,omitempty"`
	IgnoreChannels null.String `boil:"ignore_channels" json:"ignore_channels,omitempty" toml:"ignore_channels" yaml:"ignore_channels,omitempty"`

	R *serverStatsConfigR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L serverStatsConfigL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

ServerStatsConfig is an object representing the database table.

func FindServerStatsConfig added in v1.7.4

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

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

func FindServerStatsConfigG added in v1.7.4

func FindServerStatsConfigG(ctx context.Context, guildID int64, selectCols ...string) (*ServerStatsConfig, error)

FindServerStatsConfigG retrieves a single record by ID.

func (*ServerStatsConfig) Delete added in v1.7.4

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

func (*ServerStatsConfig) DeleteG added in v1.7.4

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

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

func (*ServerStatsConfig) Insert added in v1.7.4

func (o *ServerStatsConfig) 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 (*ServerStatsConfig) InsertG added in v1.7.4

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

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

func (*ServerStatsConfig) Reload added in v1.7.4

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

func (*ServerStatsConfig) ReloadG added in v1.7.4

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

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

func (*ServerStatsConfig) Update added in v1.7.4

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

Update uses an executor to update the ServerStatsConfig. 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 (*ServerStatsConfig) UpdateG added in v1.7.4

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

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

func (*ServerStatsConfig) Upsert added in v1.7.4

func (o *ServerStatsConfig) 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 (*ServerStatsConfig) UpsertG added in v1.7.4

func (o *ServerStatsConfig) 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 ServerStatsConfigSlice added in v1.7.4

type ServerStatsConfigSlice []*ServerStatsConfig

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

func (ServerStatsConfigSlice) DeleteAll added in v1.7.4

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

func (ServerStatsConfigSlice) DeleteAllG added in v1.7.4

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

DeleteAllG deletes all rows in the slice.

func (*ServerStatsConfigSlice) ReloadAll added in v1.7.4

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

func (*ServerStatsConfigSlice) ReloadAllG added in v1.7.4

func (o *ServerStatsConfigSlice) 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 (ServerStatsConfigSlice) UpdateAll added in v1.7.4

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

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

func (ServerStatsConfigSlice) UpdateAllG added in v1.7.4

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

UpdateAllG updates all rows with the specified column values.

type ServerStatsPeriod added in v1.7.4

type ServerStatsPeriod struct {
	ID        int64      `boil:"id" json:"id" toml:"id" yaml:"id"`
	Started   null.Time  `boil:"started" json:"started,omitempty" toml:"started" yaml:"started,omitempty"`
	Duration  null.Int64 `boil:"duration" json:"duration,omitempty" toml:"duration" yaml:"duration,omitempty"`
	GuildID   null.Int64 `boil:"guild_id" json:"guild_id,omitempty" toml:"guild_id" yaml:"guild_id,omitempty"`
	UserID    null.Int64 `boil:"user_id" json:"user_id,omitempty" toml:"user_id" yaml:"user_id,omitempty"`
	ChannelID null.Int64 `boil:"channel_id" json:"channel_id,omitempty" toml:"channel_id" yaml:"channel_id,omitempty"`
	Count     null.Int64 `boil:"count" json:"count,omitempty" toml:"count" yaml:"count,omitempty"`

	R *serverStatsPeriodR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L serverStatsPeriodL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

ServerStatsPeriod is an object representing the database table.

func FindServerStatsPeriod added in v1.7.4

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

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

func FindServerStatsPeriodG added in v1.7.4

func FindServerStatsPeriodG(ctx context.Context, iD int64, selectCols ...string) (*ServerStatsPeriod, error)

FindServerStatsPeriodG retrieves a single record by ID.

func (*ServerStatsPeriod) Delete added in v1.7.4

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

func (*ServerStatsPeriod) DeleteG added in v1.7.4

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

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

func (*ServerStatsPeriod) Insert added in v1.7.4

func (o *ServerStatsPeriod) 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 (*ServerStatsPeriod) InsertG added in v1.7.4

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

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

func (*ServerStatsPeriod) Reload added in v1.7.4

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

func (*ServerStatsPeriod) ReloadG added in v1.7.4

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

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

func (*ServerStatsPeriod) Update added in v1.7.4

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

Update uses an executor to update the ServerStatsPeriod. 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 (*ServerStatsPeriod) UpdateG added in v1.7.4

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

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

func (*ServerStatsPeriod) Upsert added in v1.7.4

func (o *ServerStatsPeriod) 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 (*ServerStatsPeriod) UpsertG added in v1.7.4

func (o *ServerStatsPeriod) 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 ServerStatsPeriodSlice added in v1.7.4

type ServerStatsPeriodSlice []*ServerStatsPeriod

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

func (ServerStatsPeriodSlice) DeleteAll added in v1.7.4

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

func (ServerStatsPeriodSlice) DeleteAllG added in v1.7.4

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

DeleteAllG deletes all rows in the slice.

func (*ServerStatsPeriodSlice) ReloadAll added in v1.7.4

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

func (*ServerStatsPeriodSlice) ReloadAllG added in v1.7.4

func (o *ServerStatsPeriodSlice) 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 (ServerStatsPeriodSlice) UpdateAll added in v1.7.4

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

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

func (ServerStatsPeriodSlice) UpdateAllG added in v1.7.4

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