models

package
Version: v1.31.9 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 16 Imported by: 11

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 JoinedGuildColumns = struct {
	ID          string
	JoinedAt    string
	LeftAt      string
	MemberCount string
	Name        string
	OwnerID     string
	Avatar      string
}{
	ID:          "id",
	JoinedAt:    "joined_at",
	LeftAt:      "left_at",
	MemberCount: "member_count",
	Name:        "name",
	OwnerID:     "owner_id",
	Avatar:      "avatar",
}
View Source
var JoinedGuildRels = struct {
}{}

JoinedGuildRels is where relationship names are stored.

View Source
var JoinedGuildWhere = struct {
	ID          whereHelperint64
	JoinedAt    whereHelpertime_Time
	LeftAt      whereHelpernull_Time
	MemberCount whereHelperint64
	Name        whereHelperstring
	OwnerID     whereHelperint64
	Avatar      whereHelperstring
}{
	ID:          whereHelperint64{/* contains filtered or unexported fields */},
	JoinedAt:    whereHelpertime_Time{/* contains filtered or unexported fields */},
	LeftAt:      whereHelpernull_Time{/* contains filtered or unexported fields */},
	MemberCount: whereHelperint64{/* contains filtered or unexported fields */},
	Name:        whereHelperstring{/* contains filtered or unexported fields */},
	OwnerID:     whereHelperint64{/* contains filtered or unexported fields */},
	Avatar:      whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	JoinedGuilds string
}{
	JoinedGuilds: "joined_guilds",
}

Functions

func JoinedGuildExists

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

JoinedGuildExists checks if the JoinedGuild row exists.

func JoinedGuildExistsG

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

JoinedGuildExistsG checks if the JoinedGuild row exists.

func JoinedGuilds

func JoinedGuilds(mods ...qm.QueryMod) joinedGuildQuery

JoinedGuilds 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 JoinedGuild

type JoinedGuild struct {
	ID          int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	JoinedAt    time.Time `boil:"joined_at" json:"joined_at" toml:"joined_at" yaml:"joined_at"`
	LeftAt      null.Time `boil:"left_at" json:"left_at,omitempty" toml:"left_at" yaml:"left_at,omitempty"`
	MemberCount int64     `boil:"member_count" json:"member_count" toml:"member_count" yaml:"member_count"`
	Name        string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	OwnerID     int64     `boil:"owner_id" json:"owner_id" toml:"owner_id" yaml:"owner_id"`
	Avatar      string    `boil:"avatar" json:"avatar" toml:"avatar" yaml:"avatar"`

	R *joinedGuildR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L joinedGuildL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

JoinedGuild is an object representing the database table.

func FindJoinedGuild

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

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

func FindJoinedGuildG

func FindJoinedGuildG(ctx context.Context, iD int64, selectCols ...string) (*JoinedGuild, error)

FindJoinedGuildG retrieves a single record by ID.

func (*JoinedGuild) Delete

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

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

func (*JoinedGuild) DeleteG

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

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

func (*JoinedGuild) Insert

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

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

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

func (*JoinedGuild) Reload

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

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

func (*JoinedGuild) ReloadG

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

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

func (*JoinedGuild) Update

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

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

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

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

func (*JoinedGuild) Upsert

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

func (o *JoinedGuild) 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 JoinedGuildSlice

type JoinedGuildSlice []*JoinedGuild

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

func (JoinedGuildSlice) DeleteAll

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

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

func (JoinedGuildSlice) DeleteAllG

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

DeleteAllG deletes all rows in the slice.

func (*JoinedGuildSlice) ReloadAll

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

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

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

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

func (JoinedGuildSlice) UpdateAllG

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

Jump to

Keyboard shortcuts

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