models

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomCommandColumns = struct {
	ID             string
	GuildSnowflake string
	Trigger        string
	Body           string
	CreatedAt      string
	UpdatedAt      string
}{
	ID:             "id",
	GuildSnowflake: "guild_snowflake",
	Trigger:        "trigger",
	Body:           "body",
	CreatedAt:      "created_at",
	UpdatedAt:      "updated_at",
}
View Source
var CustomCommandRels = struct {
}{}

CustomCommandRels is where relationship names are stored.

View Source
var CustomCommandTableColumns = struct {
	ID             string
	GuildSnowflake string
	Trigger        string
	Body           string
	CreatedAt      string
	UpdatedAt      string
}{
	ID:             "custom_commands.id",
	GuildSnowflake: "custom_commands.guild_snowflake",
	Trigger:        "custom_commands.trigger",
	Body:           "custom_commands.body",
	CreatedAt:      "custom_commands.created_at",
	UpdatedAt:      "custom_commands.updated_at",
}
View Source
var CustomCommandWhere = struct {
	ID             whereHelperint64
	GuildSnowflake whereHelperstring
	Trigger        whereHelperstring
	Body           whereHelperstring
	CreatedAt      whereHelpertime_Time
	UpdatedAt      whereHelpertime_Time
}{
	ID:             whereHelperint64{/* contains filtered or unexported fields */},
	GuildSnowflake: whereHelperstring{/* contains filtered or unexported fields */},
	Trigger:        whereHelperstring{/* contains filtered or unexported fields */},
	Body:           whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:      whereHelpertime_Time{/* 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 GuildColumns = struct {
	ID                 string
	GuildSnowflake     string
	CreatedAt          string
	UpdatedAt          string
	EmbedTwitterVideos string
}{
	ID:                 "id",
	GuildSnowflake:     "guild_snowflake",
	CreatedAt:          "created_at",
	UpdatedAt:          "updated_at",
	EmbedTwitterVideos: "embed_twitter_videos",
}
View Source
var GuildRels = struct {
	GuildSnowflakePrefixes string
	GuildSnowflakePronouns string
}{
	GuildSnowflakePrefixes: "GuildSnowflakePrefixes",
	GuildSnowflakePronouns: "GuildSnowflakePronouns",
}

GuildRels is where relationship names are stored.

View Source
var GuildTableColumns = struct {
	ID                 string
	GuildSnowflake     string
	CreatedAt          string
	UpdatedAt          string
	EmbedTwitterVideos string
}{
	ID:                 "guilds.id",
	GuildSnowflake:     "guilds.guild_snowflake",
	CreatedAt:          "guilds.created_at",
	UpdatedAt:          "guilds.updated_at",
	EmbedTwitterVideos: "guilds.embed_twitter_videos",
}
View Source
var GuildWhere = struct {
	ID                 whereHelperint64
	GuildSnowflake     whereHelperstring
	CreatedAt          whereHelpertime_Time
	UpdatedAt          whereHelpertime_Time
	EmbedTwitterVideos whereHelperbool
}{
	ID:                 whereHelperint64{/* contains filtered or unexported fields */},
	GuildSnowflake:     whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	EmbedTwitterVideos: whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var PrefixColumns = struct {
	ID             string
	GuildSnowflake string
	Prefix         string
	CreatedAt      string
	UpdatedAt      string
}{
	ID:             "id",
	GuildSnowflake: "guild_snowflake",
	Prefix:         "prefix",
	CreatedAt:      "created_at",
	UpdatedAt:      "updated_at",
}
View Source
var PrefixRels = struct {
	GuildSnowflakeGuild string
}{
	GuildSnowflakeGuild: "GuildSnowflakeGuild",
}

PrefixRels is where relationship names are stored.

View Source
var PrefixTableColumns = struct {
	ID             string
	GuildSnowflake string
	Prefix         string
	CreatedAt      string
	UpdatedAt      string
}{
	ID:             "prefixes.id",
	GuildSnowflake: "prefixes.guild_snowflake",
	Prefix:         "prefixes.prefix",
	CreatedAt:      "prefixes.created_at",
	UpdatedAt:      "prefixes.updated_at",
}
View Source
var PrefixWhere = struct {
	ID             whereHelperint64
	GuildSnowflake whereHelperstring
	Prefix         whereHelperstring
	CreatedAt      whereHelpertime_Time
	UpdatedAt      whereHelpertime_Time
}{
	ID:             whereHelperint64{/* contains filtered or unexported fields */},
	GuildSnowflake: whereHelperstring{/* contains filtered or unexported fields */},
	Prefix:         whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var PronounColumns = struct {
	ID             string
	GuildSnowflake string
	Pronoun        string
	RoleSnowflake  string
	CreatedAt      string
	UpdatedAt      string
}{
	ID:             "id",
	GuildSnowflake: "guild_snowflake",
	Pronoun:        "pronoun",
	RoleSnowflake:  "role_snowflake",
	CreatedAt:      "created_at",
	UpdatedAt:      "updated_at",
}
View Source
var PronounRels = struct {
	GuildSnowflakeGuild string
}{
	GuildSnowflakeGuild: "GuildSnowflakeGuild",
}

PronounRels is where relationship names are stored.

View Source
var PronounTableColumns = struct {
	ID             string
	GuildSnowflake string
	Pronoun        string
	RoleSnowflake  string
	CreatedAt      string
	UpdatedAt      string
}{
	ID:             "pronouns.id",
	GuildSnowflake: "pronouns.guild_snowflake",
	Pronoun:        "pronouns.pronoun",
	RoleSnowflake:  "pronouns.role_snowflake",
	CreatedAt:      "pronouns.created_at",
	UpdatedAt:      "pronouns.updated_at",
}
View Source
var PronounWhere = struct {
	ID             whereHelperint64
	GuildSnowflake whereHelperstring
	Pronoun        whereHelperstring
	RoleSnowflake  whereHelperstring
	CreatedAt      whereHelpertime_Time
	UpdatedAt      whereHelpertime_Time
}{
	ID:             whereHelperint64{/* contains filtered or unexported fields */},
	GuildSnowflake: whereHelperstring{/* contains filtered or unexported fields */},
	Pronoun:        whereHelperstring{/* contains filtered or unexported fields */},
	RoleSnowflake:  whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	CustomCommands string
	Guilds         string
	Prefixes       string
	Pronouns       string
}{
	CustomCommands: "custom_commands",
	Guilds:         "guilds",
	Prefixes:       "prefixes",
	Pronouns:       "pronouns",
}

Functions

func CustomCommandExists

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

CustomCommandExists checks if the CustomCommand row exists.

func CustomCommands

func CustomCommands(mods ...qm.QueryMod) customCommandQuery

CustomCommands retrieves all the records using an executor.

func GuildExists

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

GuildExists checks if the Guild row exists.

func Guilds

func Guilds(mods ...qm.QueryMod) guildQuery

Guilds 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

func PrefixExists

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

PrefixExists checks if the Prefix row exists.

func Prefixes

func Prefixes(mods ...qm.QueryMod) prefixQuery

Prefixes retrieves all the records using an executor.

func PronounExists

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

PronounExists checks if the Pronoun row exists.

func Pronouns

func Pronouns(mods ...qm.QueryMod) pronounQuery

Pronouns retrieves all the records using an executor.

Types

type CustomCommand

type CustomCommand struct {
	ID             int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	GuildSnowflake string    `boil:"guild_snowflake" json:"guild_snowflake" toml:"guild_snowflake" yaml:"guild_snowflake"`
	Trigger        string    `boil:"trigger" json:"trigger" toml:"trigger" yaml:"trigger"`
	Body           string    `boil:"body" json:"body" toml:"body" yaml:"body"`
	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"`

	R *customCommandR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L customCommandL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

CustomCommand is an object representing the database table.

func FindCustomCommand

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

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

func (*CustomCommand) Delete

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

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

func (*CustomCommand) Insert

func (o *CustomCommand) 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 (*CustomCommand) Reload

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

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

func (*CustomCommand) Update

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

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

func (o *CustomCommand) 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.

type CustomCommandSlice

type CustomCommandSlice []*CustomCommand

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

func (CustomCommandSlice) DeleteAll

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

func (*CustomCommandSlice) ReloadAll

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

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

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

type Guild

type Guild struct {
	ID                 int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	GuildSnowflake     string    `boil:"guild_snowflake" json:"guild_snowflake" toml:"guild_snowflake" yaml:"guild_snowflake"`
	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"`
	EmbedTwitterVideos bool      `boil:"embed_twitter_videos" json:"embed_twitter_videos" toml:"embed_twitter_videos" yaml:"embed_twitter_videos"`

	R *guildR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L guildL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Guild is an object representing the database table.

func FindGuild

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

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

func (*Guild) AddGuildSnowflakePrefixes

func (o *Guild) AddGuildSnowflakePrefixes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Prefix) error

AddGuildSnowflakePrefixes adds the given related objects to the existing relationships of the guild, optionally inserting them as new records. Appends related to o.R.GuildSnowflakePrefixes. Sets related.R.GuildSnowflakeGuild appropriately.

func (*Guild) AddGuildSnowflakePronouns

func (o *Guild) AddGuildSnowflakePronouns(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Pronoun) error

AddGuildSnowflakePronouns adds the given related objects to the existing relationships of the guild, optionally inserting them as new records. Appends related to o.R.GuildSnowflakePronouns. Sets related.R.GuildSnowflakeGuild appropriately.

func (*Guild) Delete

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

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

func (*Guild) GuildSnowflakePrefixes

func (o *Guild) GuildSnowflakePrefixes(mods ...qm.QueryMod) prefixQuery

GuildSnowflakePrefixes retrieves all the prefix's Prefixes with an executor via guild_snowflake column.

func (*Guild) GuildSnowflakePronouns

func (o *Guild) GuildSnowflakePronouns(mods ...qm.QueryMod) pronounQuery

GuildSnowflakePronouns retrieves all the pronoun's Pronouns with an executor via guild_snowflake column.

func (*Guild) Insert

func (o *Guild) 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 (*Guild) Reload

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

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

func (*Guild) Update

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

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

func (o *Guild) 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.

type GuildSlice

type GuildSlice []*Guild

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

func (GuildSlice) DeleteAll

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

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

func (*GuildSlice) ReloadAll

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

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

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

type M

type M map[string]interface{}

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

type Prefix

type Prefix struct {
	ID             int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	GuildSnowflake string    `boil:"guild_snowflake" json:"guild_snowflake" toml:"guild_snowflake" yaml:"guild_snowflake"`
	Prefix         string    `boil:"prefix" json:"prefix" toml:"prefix" yaml:"prefix"`
	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"`

	R *prefixR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L prefixL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Prefix is an object representing the database table.

func FindPrefix

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

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

func (*Prefix) Delete

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

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

func (*Prefix) GuildSnowflakeGuild

func (o *Prefix) GuildSnowflakeGuild(mods ...qm.QueryMod) guildQuery

GuildSnowflakeGuild pointed to by the foreign key.

func (*Prefix) Insert

func (o *Prefix) 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 (*Prefix) Reload

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

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

func (*Prefix) SetGuildSnowflakeGuild

func (o *Prefix) SetGuildSnowflakeGuild(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Guild) error

SetGuildSnowflakeGuild of the prefix to the related item. Sets o.R.GuildSnowflakeGuild to related. Adds o to related.R.GuildSnowflakePrefixes.

func (*Prefix) Update

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

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

func (o *Prefix) 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.

type PrefixSlice

type PrefixSlice []*Prefix

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

func (PrefixSlice) DeleteAll

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

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

func (*PrefixSlice) ReloadAll

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

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

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

type Pronoun

type Pronoun struct {
	ID             int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	GuildSnowflake string    `boil:"guild_snowflake" json:"guild_snowflake" toml:"guild_snowflake" yaml:"guild_snowflake"`
	Pronoun        string    `boil:"pronoun" json:"pronoun" toml:"pronoun" yaml:"pronoun"`
	RoleSnowflake  string    `boil:"role_snowflake" json:"role_snowflake" toml:"role_snowflake" yaml:"role_snowflake"`
	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"`

	R *pronounR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L pronounL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Pronoun is an object representing the database table.

func FindPronoun

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

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

func (*Pronoun) Delete

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

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

func (*Pronoun) GuildSnowflakeGuild

func (o *Pronoun) GuildSnowflakeGuild(mods ...qm.QueryMod) guildQuery

GuildSnowflakeGuild pointed to by the foreign key.

func (*Pronoun) Insert

func (o *Pronoun) 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 (*Pronoun) Reload

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

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

func (*Pronoun) SetGuildSnowflakeGuild

func (o *Pronoun) SetGuildSnowflakeGuild(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Guild) error

SetGuildSnowflakeGuild of the pronoun to the related item. Sets o.R.GuildSnowflakeGuild to related. Adds o to related.R.GuildSnowflakePronouns.

func (*Pronoun) Update

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

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

func (o *Pronoun) 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.

type PronounSlice

type PronounSlice []*Pronoun

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

func (PronounSlice) DeleteAll

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

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

func (*PronounSlice) ReloadAll

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

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL