models

package
v2.49.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CoreConfigColumns = struct {
	GuildID                 string
	AllowedReadOnlyRoles    string
	AllowedWriteRoles       string
	AllowAllMembersReadOnly string
	AllowNonMembersReadOnly string
}{
	GuildID:                 "guild_id",
	AllowedReadOnlyRoles:    "allowed_read_only_roles",
	AllowedWriteRoles:       "allowed_write_roles",
	AllowAllMembersReadOnly: "allow_all_members_read_only",
	AllowNonMembersReadOnly: "allow_non_members_read_only",
}
View Source
var CoreConfigRels = struct {
}{}

CoreConfigRels is where relationship names are stored.

View Source
var CoreConfigTableColumns = struct {
	GuildID                 string
	AllowedReadOnlyRoles    string
	AllowedWriteRoles       string
	AllowAllMembersReadOnly string
	AllowNonMembersReadOnly string
}{
	GuildID:                 "core_configs.guild_id",
	AllowedReadOnlyRoles:    "core_configs.allowed_read_only_roles",
	AllowedWriteRoles:       "core_configs.allowed_write_roles",
	AllowAllMembersReadOnly: "core_configs.allow_all_members_read_only",
	AllowNonMembersReadOnly: "core_configs.allow_non_members_read_only",
}
View Source
var CoreConfigWhere = struct {
	GuildID                 whereHelperint64
	AllowedReadOnlyRoles    whereHelpertypes_Int64Array
	AllowedWriteRoles       whereHelpertypes_Int64Array
	AllowAllMembersReadOnly whereHelperbool
	AllowNonMembersReadOnly whereHelperbool
}{
	GuildID:                 whereHelperint64{/* contains filtered or unexported fields */},
	AllowedReadOnlyRoles:    whereHelpertypes_Int64Array{/* contains filtered or unexported fields */},
	AllowedWriteRoles:       whereHelpertypes_Int64Array{/* contains filtered or unexported fields */},
	AllowAllMembersReadOnly: whereHelperbool{/* contains filtered or unexported fields */},
	AllowNonMembersReadOnly: whereHelperbool{/* contains filtered or unexported fields */},
}
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 ExecutedCommandColumns = struct {
	ID           string
	CreatedAt    string
	UpdatedAt    string
	UserID       string
	ChannelID    string
	GuildID      string
	Command      string
	RawCommand   string
	Error        string
	TimeStamp    string
	ResponseTime string
}{
	ID:           "id",
	CreatedAt:    "created_at",
	UpdatedAt:    "updated_at",
	UserID:       "user_id",
	ChannelID:    "channel_id",
	GuildID:      "guild_id",
	Command:      "command",
	RawCommand:   "raw_command",
	Error:        "error",
	TimeStamp:    "time_stamp",
	ResponseTime: "response_time",
}
View Source
var ExecutedCommandRels = struct {
}{}

ExecutedCommandRels is where relationship names are stored.

View Source
var ExecutedCommandTableColumns = struct {
	ID           string
	CreatedAt    string
	UpdatedAt    string
	UserID       string
	ChannelID    string
	GuildID      string
	Command      string
	RawCommand   string
	Error        string
	TimeStamp    string
	ResponseTime string
}{
	ID:           "executed_commands.id",
	CreatedAt:    "executed_commands.created_at",
	UpdatedAt:    "executed_commands.updated_at",
	UserID:       "executed_commands.user_id",
	ChannelID:    "executed_commands.channel_id",
	GuildID:      "executed_commands.guild_id",
	Command:      "executed_commands.command",
	RawCommand:   "executed_commands.raw_command",
	Error:        "executed_commands.error",
	TimeStamp:    "executed_commands.time_stamp",
	ResponseTime: "executed_commands.response_time",
}
View Source
var ExecutedCommandWhere = struct {
	ID           whereHelperint
	CreatedAt    whereHelpertime_Time
	UpdatedAt    whereHelpertime_Time
	UserID       whereHelperstring
	ChannelID    whereHelperstring
	GuildID      whereHelpernull_String
	Command      whereHelperstring
	RawCommand   whereHelperstring
	Error        whereHelpernull_String
	TimeStamp    whereHelpertime_Time
	ResponseTime whereHelperint64
}{
	ID:           whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	UserID:       whereHelperstring{/* contains filtered or unexported fields */},
	ChannelID:    whereHelperstring{/* contains filtered or unexported fields */},
	GuildID:      whereHelpernull_String{/* contains filtered or unexported fields */},
	Command:      whereHelperstring{/* contains filtered or unexported fields */},
	RawCommand:   whereHelperstring{/* contains filtered or unexported fields */},
	Error:        whereHelpernull_String{/* contains filtered or unexported fields */},
	TimeStamp:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	ResponseTime: whereHelperint64{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	CoreConfigs      string
	ExecutedCommands string
}{
	CoreConfigs:      "core_configs",
	ExecutedCommands: "executed_commands",
}
View Source
var ViewNames = struct {
}{}

Functions

func CoreConfigExists

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

CoreConfigExists checks if the CoreConfig row exists.

func CoreConfigExistsG

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

CoreConfigExistsG checks if the CoreConfig row exists.

func CoreConfigs

func CoreConfigs(mods ...qm.QueryMod) coreConfigQuery

CoreConfigs retrieves all the records using an executor.

func ExecutedCommandExists added in v2.40.0

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

ExecutedCommandExists checks if the ExecutedCommand row exists.

func ExecutedCommandExistsG added in v2.40.0

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

ExecutedCommandExistsG checks if the ExecutedCommand row exists.

func ExecutedCommands added in v2.40.0

func ExecutedCommands(mods ...qm.QueryMod) executedCommandQuery

ExecutedCommands retrieves all the records using an executor.

func NewQuery

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

NewQuery initializes a new Query using the passed in QueryMods

Types

type CoreConfig

type CoreConfig struct {
	GuildID                 int64            `boil:"guild_id" json:"guild_id" toml:"guild_id" yaml:"guild_id"`
	AllowedReadOnlyRoles    types.Int64Array `` /* 143-byte string literal not displayed */
	AllowedWriteRoles       types.Int64Array `` /* 127-byte string literal not displayed */
	AllowAllMembersReadOnly bool             `` /* 139-byte string literal not displayed */
	AllowNonMembersReadOnly bool             `` /* 139-byte string literal not displayed */

	R *coreConfigR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L coreConfigL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

CoreConfig is an object representing the database table.

func FindCoreConfig

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

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

func FindCoreConfigG

func FindCoreConfigG(ctx context.Context, guildID int64, selectCols ...string) (*CoreConfig, error)

FindCoreConfigG retrieves a single record by ID.

func (*CoreConfig) Delete

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

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

func (*CoreConfig) DeleteG

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

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

func (*CoreConfig) Exists added in v2.36.0

func (o *CoreConfig) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the CoreConfig row exists.

func (*CoreConfig) Insert

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

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

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

func (*CoreConfig) Reload

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

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

func (*CoreConfig) ReloadG

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

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

func (*CoreConfig) Update

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

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

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

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

func (*CoreConfig) Upsert

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

func (o *CoreConfig) 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 CoreConfigSlice

type CoreConfigSlice []*CoreConfig

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

func (CoreConfigSlice) DeleteAll

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

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

func (CoreConfigSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*CoreConfigSlice) ReloadAll

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

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

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

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

func (CoreConfigSlice) UpdateAllG

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

UpdateAllG updates all rows with the specified column values.

type ExecutedCommand added in v2.40.0

type ExecutedCommand 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"`
	UserID       string      `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	ChannelID    string      `boil:"channel_id" json:"channel_id" toml:"channel_id" yaml:"channel_id"`
	GuildID      null.String `boil:"guild_id" json:"guild_id,omitempty" toml:"guild_id" yaml:"guild_id,omitempty"`
	Command      string      `boil:"command" json:"command" toml:"command" yaml:"command"`
	RawCommand   string      `boil:"raw_command" json:"raw_command" toml:"raw_command" yaml:"raw_command"`
	Error        null.String `boil:"error" json:"error,omitempty" toml:"error" yaml:"error,omitempty"`
	TimeStamp    time.Time   `boil:"time_stamp" json:"time_stamp" toml:"time_stamp" yaml:"time_stamp"`
	ResponseTime int64       `boil:"response_time" json:"response_time" toml:"response_time" yaml:"response_time"`

	R *executedCommandR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L executedCommandL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

ExecutedCommand is an object representing the database table.

func FindExecutedCommand added in v2.40.0

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

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

func FindExecutedCommandG added in v2.40.0

func FindExecutedCommandG(ctx context.Context, iD int, selectCols ...string) (*ExecutedCommand, error)

FindExecutedCommandG retrieves a single record by ID.

func (*ExecutedCommand) Delete added in v2.40.0

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

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

func (*ExecutedCommand) DeleteG added in v2.40.0

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

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

func (*ExecutedCommand) Exists added in v2.40.0

func (o *ExecutedCommand) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the ExecutedCommand row exists.

func (*ExecutedCommand) Insert added in v2.40.0

func (o *ExecutedCommand) 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 (*ExecutedCommand) InsertG added in v2.40.0

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

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

func (*ExecutedCommand) Reload added in v2.40.0

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

func (*ExecutedCommand) ReloadG added in v2.40.0

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

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

func (*ExecutedCommand) Update added in v2.40.0

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

Update uses an executor to update the ExecutedCommand. 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 (*ExecutedCommand) UpdateG added in v2.40.0

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

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

func (*ExecutedCommand) Upsert added in v2.40.0

func (o *ExecutedCommand) 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 (*ExecutedCommand) UpsertG added in v2.40.0

func (o *ExecutedCommand) 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 ExecutedCommandSlice added in v2.40.0

type ExecutedCommandSlice []*ExecutedCommand

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

func (ExecutedCommandSlice) DeleteAll added in v2.40.0

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

func (ExecutedCommandSlice) DeleteAllG added in v2.40.0

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

DeleteAllG deletes all rows in the slice.

func (*ExecutedCommandSlice) ReloadAll added in v2.40.0

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

func (*ExecutedCommandSlice) ReloadAllG added in v2.40.0

func (o *ExecutedCommandSlice) 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 (ExecutedCommandSlice) UpdateAll added in v2.40.0

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

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

func (ExecutedCommandSlice) UpdateAllG added in v2.40.0

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

UpdateAllG updates all rows with the specified column values.

type M

type M map[string]interface{}

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

type UpsertOptionFunc added in v2.36.0

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget added in v2.36.0

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet added in v2.36.0

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions added in v2.36.0

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