models

package
v0.0.0-...-4ac5823 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Zlib Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CachedPageColumns = struct {
	ID      string
	Season  string
	Team    string
	Content string
}{
	ID:      "id",
	Season:  "season",
	Team:    "team",
	Content: "content",
}
View Source
var CachedPageRels = struct {
}{}

CachedPageRels is where relationship names are stored.

View Source
var CachedPageTableColumns = struct {
	ID      string
	Season  string
	Team    string
	Content string
}{
	ID:      "cached_pages.id",
	Season:  "cached_pages.season",
	Team:    "cached_pages.team",
	Content: "cached_pages.content",
}
View Source
var CachedPageWhere = struct {
	ID      whereHelperint64
	Season  whereHelperstring
	Team    whereHelpernull_String
	Content whereHelper__byte
}{
	ID:      whereHelperint64{/* contains filtered or unexported fields */},
	Season:  whereHelperstring{/* contains filtered or unexported fields */},
	Team:    whereHelpernull_String{/* contains filtered or unexported fields */},
	Content: whereHelper__byte{/* 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 GameColumns = struct {
	GameID   string
	Date     string
	Type     string
	Away     string
	Home     string
	Season   string
	Recap    string
	Extended string
}{
	GameID:   "game_id",
	Date:     "date",
	Type:     "type",
	Away:     "away",
	Home:     "home",
	Season:   "season",
	Recap:    "recap",
	Extended: "extended",
}
View Source
var GameRels = struct {
}{}

GameRels is where relationship names are stored.

View Source
var GameTableColumns = struct {
	GameID   string
	Date     string
	Type     string
	Away     string
	Home     string
	Season   string
	Recap    string
	Extended string
}{
	GameID:   "games.game_id",
	Date:     "games.date",
	Type:     "games.type",
	Away:     "games.away",
	Home:     "games.home",
	Season:   "games.season",
	Recap:    "games.recap",
	Extended: "games.extended",
}
View Source
var GameWhere = struct {
	GameID   whereHelperint64
	Date     whereHelperstring
	Type     whereHelperstring
	Away     whereHelperstring
	Home     whereHelperstring
	Season   whereHelperstring
	Recap    whereHelpernull_String
	Extended whereHelpernull_String
}{
	GameID:   whereHelperint64{/* contains filtered or unexported fields */},
	Date:     whereHelperstring{/* contains filtered or unexported fields */},
	Type:     whereHelperstring{/* contains filtered or unexported fields */},
	Away:     whereHelperstring{/* contains filtered or unexported fields */},
	Home:     whereHelperstring{/* contains filtered or unexported fields */},
	Season:   whereHelperstring{/* contains filtered or unexported fields */},
	Recap:    whereHelpernull_String{/* contains filtered or unexported fields */},
	Extended: whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	CachedPages string
	Games       string
}{
	CachedPages: "cached_pages",
	Games:       "games",
}
View Source
var ViewNames = struct {
}{}

Functions

func CachedPageExists

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

CachedPageExists checks if the CachedPage row exists.

func CachedPages

func CachedPages(mods ...qm.QueryMod) cachedPageQuery

CachedPages retrieves all the records using an executor.

func GameExists

func GameExists(ctx context.Context, exec boil.ContextExecutor, gameID int64) (bool, error)

GameExists checks if the Game row exists.

func Games

func Games(mods ...qm.QueryMod) gameQuery

Games 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 CachedPage

type CachedPage struct {
	ID      int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Season  string      `boil:"season" json:"season" toml:"season" yaml:"season"`
	Team    null.String `boil:"team" json:"team,omitempty" toml:"team" yaml:"team,omitempty"`
	Content []byte      `boil:"content" json:"content" toml:"content" yaml:"content"`

	R *cachedPageR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L cachedPageL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

CachedPage is an object representing the database table.

func FindCachedPage

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

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

func (*CachedPage) Delete

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

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

func (*CachedPage) Exists

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

Exists checks if the CachedPage row exists.

func (*CachedPage) Insert

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

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

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

func (*CachedPage) Update

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

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

func (o *CachedPage) 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 CachedPageSlice

type CachedPageSlice []*CachedPage

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

func (CachedPageSlice) DeleteAll

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

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

func (*CachedPageSlice) ReloadAll

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

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

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

type Game

type Game struct {
	GameID   int64       `boil:"game_id" json:"game_id" toml:"game_id" yaml:"game_id"`
	Date     string      `boil:"date" json:"date" toml:"date" yaml:"date"`
	Type     string      `boil:"type" json:"type" toml:"type" yaml:"type"`
	Away     string      `boil:"away" json:"away" toml:"away" yaml:"away"`
	Home     string      `boil:"home" json:"home" toml:"home" yaml:"home"`
	Season   string      `boil:"season" json:"season" toml:"season" yaml:"season"`
	Recap    null.String `boil:"recap" json:"recap,omitempty" toml:"recap" yaml:"recap,omitempty"`
	Extended null.String `boil:"extended" json:"extended,omitempty" toml:"extended" yaml:"extended,omitempty"`

	R *gameR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L gameL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Game is an object representing the database table.

func FindGame

func FindGame(ctx context.Context, exec boil.ContextExecutor, gameID int64, selectCols ...string) (*Game, error)

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

func (*Game) Delete

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

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

func (*Game) Exists

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

Exists checks if the Game row exists.

func (*Game) Insert

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

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

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

func (*Game) Update

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

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

func (o *Game) 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 GameSlice

type GameSlice []*Game

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

func (GameSlice) DeleteAll

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

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

func (*GameSlice) ReloadAll

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

func (o GameSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, 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.

Jump to

Keyboard shortcuts

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