Documentation
¶
Index ¶
- Variables
- func ComicExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Comics(mods ...qm.QueryMod) comicQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- type Comic
- func (o *Comic) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Comic) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Comic) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Comic) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Comic) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type ComicSlice
- type M
Constants ¶
This section is empty.
Variables ¶
var ComicColumns = struct { ID string Num string HashID string FP string Title string CreatedAt string UpdatedAt string }{ ID: "id", Num: "num", HashID: "hash_id", FP: "fp", Title: "title", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var ComicRels = struct {
}{}
ComicRels is where relationship names are stored.
var ComicWhere = struct { ID whereHelperint64 Num whereHelpernull_Int HashID whereHelperstring FP whereHelperstring Title whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Num: whereHelpernull_Int{/* contains filtered or unexported fields */}, HashID: whereHelperstring{/* contains filtered or unexported fields */}, FP: whereHelperstring{/* contains filtered or unexported fields */}, Title: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
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.
var TableNames = struct { Comics string }{ Comics: "comics", }
Functions ¶
func ComicExists ¶
ComicExists checks if the Comic row exists.
Types ¶
type Comic ¶
type Comic struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Num null.Int `boil:"num" json:"num,omitempty" toml:"num" yaml:"num,omitempty"` HashID string `boil:"hash_id" json:"hash_id" toml:"hash_id" yaml:"hash_id"` FP string `boil:"fp" json:"fp" toml:"fp" yaml:"fp"` Title string `boil:"title" json:"title" toml:"title" yaml:"title"` 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 *comicR `boil:"m" json:"m" toml:"m" yaml:"m"` L comicL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Comic is an object representing the database table.
func FindComic ¶
func FindComic(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Comic, error)
FindComic retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Comic) Delete ¶
Delete deletes a single Comic record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Comic) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Comic) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Comic) Update ¶
func (o *Comic) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Comic. 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 (*Comic) Upsert ¶
func (o *Comic) 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 ComicSlice ¶
type ComicSlice []*Comic
ComicSlice is an alias for a slice of pointers to Comic. This should generally be used opposed to []Comic.
func (ComicSlice) DeleteAll ¶
func (o ComicSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ComicSlice) ReloadAll ¶
func (o *ComicSlice) 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 (ComicSlice) UpdateAll ¶
func (o ComicSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.