models

package
v0.0.0-...-fb67095 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 17 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 GeneralNotificationConfigColumns = struct {
	GuildID           string
	CreatedAt         string
	UpdatedAt         string
	JoinServerEnabled string
	JoinServerChannel string
	JoinServerMsgs    string
	JoinDMEnabled     string
	JoinDMMsg         string
	LeaveEnabled      string
	LeaveChannel      string
	LeaveMsgs         string
	TopicEnabled      string
	TopicChannel      string
	CensorInvites     string
}{
	GuildID:           "guild_id",
	CreatedAt:         "created_at",
	UpdatedAt:         "updated_at",
	JoinServerEnabled: "join_server_enabled",
	JoinServerChannel: "join_server_channel",
	JoinServerMsgs:    "join_server_msgs",
	JoinDMEnabled:     "join_dm_enabled",
	JoinDMMsg:         "join_dm_msg",
	LeaveEnabled:      "leave_enabled",
	LeaveChannel:      "leave_channel",
	LeaveMsgs:         "leave_msgs",
	TopicEnabled:      "topic_enabled",
	TopicChannel:      "topic_channel",
	CensorInvites:     "censor_invites",
}
View Source
var GeneralNotificationConfigRels = struct {
}{}

GeneralNotificationConfigRels is where relationship names are stored.

View Source
var GeneralNotificationConfigTableColumns = struct {
	GuildID           string
	CreatedAt         string
	UpdatedAt         string
	JoinServerEnabled string
	JoinServerChannel string
	JoinServerMsgs    string
	JoinDMEnabled     string
	JoinDMMsg         string
	LeaveEnabled      string
	LeaveChannel      string
	LeaveMsgs         string
	TopicEnabled      string
	TopicChannel      string
	CensorInvites     string
}{
	GuildID:           "general_notification_configs.guild_id",
	CreatedAt:         "general_notification_configs.created_at",
	UpdatedAt:         "general_notification_configs.updated_at",
	JoinServerEnabled: "general_notification_configs.join_server_enabled",
	JoinServerChannel: "general_notification_configs.join_server_channel",
	JoinServerMsgs:    "general_notification_configs.join_server_msgs",
	JoinDMEnabled:     "general_notification_configs.join_dm_enabled",
	JoinDMMsg:         "general_notification_configs.join_dm_msg",
	LeaveEnabled:      "general_notification_configs.leave_enabled",
	LeaveChannel:      "general_notification_configs.leave_channel",
	LeaveMsgs:         "general_notification_configs.leave_msgs",
	TopicEnabled:      "general_notification_configs.topic_enabled",
	TopicChannel:      "general_notification_configs.topic_channel",
	CensorInvites:     "general_notification_configs.censor_invites",
}
View Source
var GeneralNotificationConfigWhere = struct {
	GuildID           whereHelperint64
	CreatedAt         whereHelpertime_Time
	UpdatedAt         whereHelpertime_Time
	JoinServerEnabled whereHelpernull_Bool
	JoinServerChannel whereHelpernull_String
	JoinServerMsgs    whereHelpernull_String
	JoinDMEnabled     whereHelpernull_Bool
	JoinDMMsg         whereHelpernull_String
	LeaveEnabled      whereHelpernull_Bool
	LeaveChannel      whereHelpernull_String
	LeaveMsgs         whereHelpernull_String
	TopicEnabled      whereHelpernull_Bool
	TopicChannel      whereHelpernull_String
	CensorInvites     whereHelpernull_Bool
}{
	GuildID:           whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:         whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:         whereHelpertime_Time{/* contains filtered or unexported fields */},
	JoinServerEnabled: whereHelpernull_Bool{/* contains filtered or unexported fields */},
	JoinServerChannel: whereHelpernull_String{/* contains filtered or unexported fields */},
	JoinServerMsgs:    whereHelpernull_String{/* contains filtered or unexported fields */},
	JoinDMEnabled:     whereHelpernull_Bool{/* contains filtered or unexported fields */},
	JoinDMMsg:         whereHelpernull_String{/* contains filtered or unexported fields */},
	LeaveEnabled:      whereHelpernull_Bool{/* contains filtered or unexported fields */},
	LeaveChannel:      whereHelpernull_String{/* contains filtered or unexported fields */},
	LeaveMsgs:         whereHelpernull_String{/* contains filtered or unexported fields */},
	TopicEnabled:      whereHelpernull_Bool{/* contains filtered or unexported fields */},
	TopicChannel:      whereHelpernull_String{/* contains filtered or unexported fields */},
	CensorInvites:     whereHelpernull_Bool{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	GeneralNotificationConfigs string
}{
	GeneralNotificationConfigs: "general_notification_configs",
}
View Source
var ViewNames = struct {
}{}

Functions

func GeneralNotificationConfigExists

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

GeneralNotificationConfigExists checks if the GeneralNotificationConfig row exists.

func GeneralNotificationConfigExistsG

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

GeneralNotificationConfigExistsG checks if the GeneralNotificationConfig row exists.

func GeneralNotificationConfigs

func GeneralNotificationConfigs(mods ...qm.QueryMod) generalNotificationConfigQuery

GeneralNotificationConfigs 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 GeneralNotificationConfig

type GeneralNotificationConfig struct {
	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"`
	UpdatedAt         time.Time   `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	JoinServerEnabled null.Bool   `` /* 127-byte string literal not displayed */
	JoinServerChannel null.String `` /* 127-byte string literal not displayed */
	JoinServerMsgs    null.String `boil:"join_server_msgs" json:"join_server_msgs,omitempty" toml:"join_server_msgs" yaml:"join_server_msgs,omitempty"`
	JoinDMEnabled     null.Bool   `boil:"join_dm_enabled" json:"join_dm_enabled,omitempty" toml:"join_dm_enabled" yaml:"join_dm_enabled,omitempty"`
	JoinDMMsg         null.String `boil:"join_dm_msg" json:"join_dm_msg,omitempty" toml:"join_dm_msg" yaml:"join_dm_msg,omitempty"`
	LeaveEnabled      null.Bool   `boil:"leave_enabled" json:"leave_enabled,omitempty" toml:"leave_enabled" yaml:"leave_enabled,omitempty"`
	LeaveChannel      null.String `boil:"leave_channel" json:"leave_channel,omitempty" toml:"leave_channel" yaml:"leave_channel,omitempty"`
	LeaveMsgs         null.String `boil:"leave_msgs" json:"leave_msgs,omitempty" toml:"leave_msgs" yaml:"leave_msgs,omitempty"`
	TopicEnabled      null.Bool   `boil:"topic_enabled" json:"topic_enabled,omitempty" toml:"topic_enabled" yaml:"topic_enabled,omitempty"`
	TopicChannel      null.String `boil:"topic_channel" json:"topic_channel,omitempty" toml:"topic_channel" yaml:"topic_channel,omitempty"`
	CensorInvites     null.Bool   `boil:"censor_invites" json:"censor_invites,omitempty" toml:"censor_invites" yaml:"censor_invites,omitempty"`

	R *generalNotificationConfigR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L generalNotificationConfigL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

GeneralNotificationConfig is an object representing the database table.

func FindGeneralNotificationConfig

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

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

func FindGeneralNotificationConfigG

func FindGeneralNotificationConfigG(ctx context.Context, guildID int64, selectCols ...string) (*GeneralNotificationConfig, error)

FindGeneralNotificationConfigG retrieves a single record by ID.

func (*GeneralNotificationConfig) Delete

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

func (*GeneralNotificationConfig) DeleteG

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

func (*GeneralNotificationConfig) Exists

Exists checks if the GeneralNotificationConfig row exists.

func (*GeneralNotificationConfig) Insert

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

func (*GeneralNotificationConfig) InsertG

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

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

func (*GeneralNotificationConfig) Reload

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

func (*GeneralNotificationConfig) ReloadG

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

func (*GeneralNotificationConfig) Update

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

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

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

func (*GeneralNotificationConfig) Upsert

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

func (o *GeneralNotificationConfig) 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 GeneralNotificationConfigSlice

type GeneralNotificationConfigSlice []*GeneralNotificationConfig

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

func (GeneralNotificationConfigSlice) DeleteAll

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

func (GeneralNotificationConfigSlice) DeleteAllG

DeleteAllG deletes all rows in the slice.

func (*GeneralNotificationConfigSlice) ReloadAll

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

func (*GeneralNotificationConfigSlice) ReloadAllG

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

func (GeneralNotificationConfigSlice) UpdateAll

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

func (GeneralNotificationConfigSlice) UpdateAllG

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

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions

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