models

package
v1.19.8 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 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 TableNames = struct {
	TimezoneGuildConfigs string
	UserTimezones        string
}{
	TimezoneGuildConfigs: "timezone_guild_configs",
	UserTimezones:        "user_timezones",
}
View Source
var TimezoneGuildConfigColumns = struct {
	GuildID             string
	DisabledInChannels  string
	EnabledInChannels   string
	NewChannelsDisabled string
}{
	GuildID:             "guild_id",
	DisabledInChannels:  "disabled_in_channels",
	EnabledInChannels:   "enabled_in_channels",
	NewChannelsDisabled: "new_channels_disabled",
}
View Source
var TimezoneGuildConfigRels = struct {
}{}

TimezoneGuildConfigRels is where relationship names are stored.

View Source
var TimezoneGuildConfigWhere = struct {
	GuildID             whereHelperint64
	DisabledInChannels  whereHelpertypes_Int64Array
	EnabledInChannels   whereHelpertypes_Int64Array
	NewChannelsDisabled whereHelperbool
}{
	GuildID:             whereHelperint64{/* contains filtered or unexported fields */},
	DisabledInChannels:  whereHelpertypes_Int64Array{/* contains filtered or unexported fields */},
	EnabledInChannels:   whereHelpertypes_Int64Array{/* contains filtered or unexported fields */},
	NewChannelsDisabled: whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var UserTimezoneColumns = struct {
	UserID       string
	TimezoneName string
}{
	UserID:       "user_id",
	TimezoneName: "timezone_name",
}
View Source
var UserTimezoneRels = struct {
}{}

UserTimezoneRels is where relationship names are stored.

View Source
var UserTimezoneWhere = struct {
	UserID       whereHelperint64
	TimezoneName whereHelperstring
}{
	UserID:       whereHelperint64{/* contains filtered or unexported fields */},
	TimezoneName: whereHelperstring{/* 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 TimezoneGuildConfigExists

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

TimezoneGuildConfigExists checks if the TimezoneGuildConfig row exists.

func TimezoneGuildConfigExistsG

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

TimezoneGuildConfigExistsG checks if the TimezoneGuildConfig row exists.

func TimezoneGuildConfigs

func TimezoneGuildConfigs(mods ...qm.QueryMod) timezoneGuildConfigQuery

TimezoneGuildConfigs retrieves all the records using an executor.

func UserTimezoneExists

func UserTimezoneExists(ctx context.Context, exec boil.ContextExecutor, userID int64) (bool, error)

UserTimezoneExists checks if the UserTimezone row exists.

func UserTimezoneExistsG

func UserTimezoneExistsG(ctx context.Context, userID int64) (bool, error)

UserTimezoneExistsG checks if the UserTimezone row exists.

func UserTimezones

func UserTimezones(mods ...qm.QueryMod) userTimezoneQuery

UserTimezones 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 TimezoneGuildConfig

type TimezoneGuildConfig struct {
	GuildID             int64            `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	DisabledInChannels  types.Int64Array `` /* 131-byte string literal not displayed */
	EnabledInChannels   types.Int64Array `` /* 127-byte string literal not displayed */
	NewChannelsDisabled bool             `boil:"new_channels_disabled" json:"new_channels_disabled" toml:"new_channels_disabled" yaml:"new_channels_disabled"`

	R *timezoneGuildConfigR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L timezoneGuildConfigL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

TimezoneGuildConfig is an object representing the database table.

func FindTimezoneGuildConfig

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

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

func FindTimezoneGuildConfigG

func FindTimezoneGuildConfigG(ctx context.Context, guildID int64, selectCols ...string) (*TimezoneGuildConfig, error)

FindTimezoneGuildConfigG retrieves a single record by ID.

func (*TimezoneGuildConfig) Delete

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

func (*TimezoneGuildConfig) DeleteG

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

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

func (*TimezoneGuildConfig) Insert

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

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

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

func (*TimezoneGuildConfig) Reload

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

func (*TimezoneGuildConfig) ReloadG

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

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

func (*TimezoneGuildConfig) Update

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

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

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

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

func (*TimezoneGuildConfig) Upsert

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

func (o *TimezoneGuildConfig) 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 TimezoneGuildConfigSlice

type TimezoneGuildConfigSlice []*TimezoneGuildConfig

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

func (TimezoneGuildConfigSlice) DeleteAll

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

func (TimezoneGuildConfigSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*TimezoneGuildConfigSlice) ReloadAll

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

func (*TimezoneGuildConfigSlice) ReloadAllG

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

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

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

func (TimezoneGuildConfigSlice) UpdateAllG

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

UpdateAllG updates all rows with the specified column values.

type UserTimezone

type UserTimezone struct {
	UserID       int64  `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	TimezoneName string `boil:"timezone_name" json:"timezone_name" toml:"timezone_name" yaml:"timezone_name"`

	R *userTimezoneR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userTimezoneL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

UserTimezone is an object representing the database table.

func FindUserTimezone

func FindUserTimezone(ctx context.Context, exec boil.ContextExecutor, userID int64, selectCols ...string) (*UserTimezone, error)

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

func FindUserTimezoneG

func FindUserTimezoneG(ctx context.Context, userID int64, selectCols ...string) (*UserTimezone, error)

FindUserTimezoneG retrieves a single record by ID.

func (*UserTimezone) Delete

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

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

func (*UserTimezone) DeleteG

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

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

func (*UserTimezone) Insert

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

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

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

func (*UserTimezone) Reload

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

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

func (*UserTimezone) ReloadG

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

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

func (*UserTimezone) Update

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

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

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

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

func (*UserTimezone) Upsert

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

func (o *UserTimezone) 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 UserTimezoneSlice

type UserTimezoneSlice []*UserTimezone

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

func (UserTimezoneSlice) DeleteAll

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

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

func (UserTimezoneSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*UserTimezoneSlice) ReloadAll

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

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

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

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

func (UserTimezoneSlice) UpdateAllG

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