models

package
v1.19.18 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2019 License: MIT Imports: 16 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 ServerStatsConfigWhere = struct {
	GuildID        whereHelperint64
	CreatedAt      whereHelpernull_Time
	UpdatedAt      whereHelpernull_Time
	Public         whereHelpernull_Bool
	IgnoreChannels whereHelpernull_String
}{
	GuildID:        whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:      whereHelpernull_Time{/* contains filtered or unexported fields */},
	UpdatedAt:      whereHelpernull_Time{/* contains filtered or unexported fields */},
	Public:         whereHelpernull_Bool{/* contains filtered or unexported fields */},
	IgnoreChannels: whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var ServerStatsMemberPeriodColumns = struct {
	ID         string
	GuildID    string
	CreatedAt  string
	NumMembers string
	Joins      string
	Leaves     string
	MaxOnline  string
}{
	ID:         "id",
	GuildID:    "guild_id",
	CreatedAt:  "created_at",
	NumMembers: "num_members",
	Joins:      "joins",
	Leaves:     "leaves",
	MaxOnline:  "max_online",
}
View Source
var ServerStatsMemberPeriodRels = struct {
}{}

ServerStatsMemberPeriodRels is where relationship names are stored.

View Source
var ServerStatsMemberPeriodWhere = struct {
	ID         whereHelperint64
	GuildID    whereHelperint64
	CreatedAt  whereHelpertime_Time
	NumMembers whereHelperint64
	Joins      whereHelperint64
	Leaves     whereHelperint64
	MaxOnline  whereHelperint64
}{
	ID:         whereHelperint64{/* contains filtered or unexported fields */},
	GuildID:    whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	NumMembers: whereHelperint64{/* contains filtered or unexported fields */},
	Joins:      whereHelperint64{/* contains filtered or unexported fields */},
	Leaves:     whereHelperint64{/* contains filtered or unexported fields */},
	MaxOnline:  whereHelperint64{/* contains filtered or unexported fields */},
}
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 ServerStatsPeriodWhere = struct {
	ID        whereHelperint64
	Started   whereHelpernull_Time
	Duration  whereHelpernull_Int64
	GuildID   whereHelpernull_Int64
	UserID    whereHelpernull_Int64
	ChannelID whereHelpernull_Int64
	Count     whereHelpernull_Int64
}{
	ID:        whereHelperint64{/* contains filtered or unexported fields */},
	Started:   whereHelpernull_Time{/* contains filtered or unexported fields */},
	Duration:  whereHelpernull_Int64{/* contains filtered or unexported fields */},
	GuildID:   whereHelpernull_Int64{/* contains filtered or unexported fields */},
	UserID:    whereHelpernull_Int64{/* contains filtered or unexported fields */},
	ChannelID: whereHelpernull_Int64{/* contains filtered or unexported fields */},
	Count:     whereHelpernull_Int64{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	ServerStatsConfigs       string
	ServerStatsMemberPeriods string
	ServerStatsPeriods       string
}{
	ServerStatsConfigs:       "server_stats_configs",
	ServerStatsMemberPeriods: "server_stats_member_periods",
	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 ServerStatsMemberPeriodExists added in v1.16.0

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

ServerStatsMemberPeriodExists checks if the ServerStatsMemberPeriod row exists.

func ServerStatsMemberPeriodExistsG added in v1.16.0

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

ServerStatsMemberPeriodExistsG checks if the ServerStatsMemberPeriod row exists.

func ServerStatsMemberPeriods added in v1.16.0

func ServerStatsMemberPeriods(mods ...qm.QueryMod) serverStatsMemberPeriodQuery

ServerStatsMemberPeriods 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 ServerStatsMemberPeriod added in v1.16.0

type ServerStatsMemberPeriod 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"`
	NumMembers int64     `boil:"num_members" json:"num_members" toml:"num_members" yaml:"num_members"`
	Joins      int64     `boil:"joins" json:"joins" toml:"joins" yaml:"joins"`
	Leaves     int64     `boil:"leaves" json:"leaves" toml:"leaves" yaml:"leaves"`
	MaxOnline  int64     `boil:"max_online" json:"max_online" toml:"max_online" yaml:"max_online"`

	R *serverStatsMemberPeriodR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L serverStatsMemberPeriodL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

ServerStatsMemberPeriod is an object representing the database table.

func FindServerStatsMemberPeriod added in v1.16.0

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

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

func FindServerStatsMemberPeriodG added in v1.16.0

func FindServerStatsMemberPeriodG(ctx context.Context, iD int64, selectCols ...string) (*ServerStatsMemberPeriod, error)

FindServerStatsMemberPeriodG retrieves a single record by ID.

func (*ServerStatsMemberPeriod) Delete added in v1.16.0

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

func (*ServerStatsMemberPeriod) DeleteG added in v1.16.0

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

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

func (*ServerStatsMemberPeriod) Insert added in v1.16.0

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

func (*ServerStatsMemberPeriod) InsertG added in v1.16.0

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

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

func (*ServerStatsMemberPeriod) Reload added in v1.16.0

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

func (*ServerStatsMemberPeriod) ReloadG added in v1.16.0

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

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

func (*ServerStatsMemberPeriod) Update added in v1.16.0

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

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

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

func (*ServerStatsMemberPeriod) Upsert added in v1.16.0

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

func (o *ServerStatsMemberPeriod) 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 ServerStatsMemberPeriodSlice added in v1.16.0

type ServerStatsMemberPeriodSlice []*ServerStatsMemberPeriod

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

func (ServerStatsMemberPeriodSlice) DeleteAll added in v1.16.0

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

func (ServerStatsMemberPeriodSlice) DeleteAllG added in v1.16.0

DeleteAllG deletes all rows in the slice.

func (*ServerStatsMemberPeriodSlice) ReloadAll added in v1.16.0

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

func (*ServerStatsMemberPeriodSlice) ReloadAllG added in v1.16.0

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

func (ServerStatsMemberPeriodSlice) UpdateAll added in v1.16.0

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

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

func (ServerStatsMemberPeriodSlice) UpdateAllG added in v1.16.0

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