Documentation ¶
Index ¶
- Variables
- func AddArticleHook(hookPoint boil.HookPoint, articleHook ArticleHook)
- func ArticleExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Articles(mods ...qm.QueryMod) articleQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- type Article
- func (o *Article) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Article) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Article) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Article) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Article) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Article) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type ArticleHook
- type ArticleSlice
- type M
Constants ¶
This section is empty.
Variables ¶
var ArticleColumns = struct { ID string Title string Body string }{ ID: "id", Title: "title", Body: "body", }
var ArticleRels = struct {
}{}
ArticleRels is where relationship names are stored.
var ArticleTableColumns = struct { ID string Title string Body string }{ ID: "articles.id", Title: "articles.title", Body: "articles.body", }
var ArticleWhere = struct { ID whereHelperint64 Title whereHelperstring Body whereHelperstring }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Title: whereHelperstring{/* contains filtered or unexported fields */}, Body: whereHelperstring{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("entities: 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 { Articles string }{ Articles: "articles", }
var ViewNames = struct {
}{}
Functions ¶
func AddArticleHook ¶
func AddArticleHook(hookPoint boil.HookPoint, articleHook ArticleHook)
AddArticleHook registers your hook function for all future operations.
func ArticleExists ¶
ArticleExists checks if the Article row exists.
Types ¶
type Article ¶
type Article struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Title string `boil:"title" json:"title" toml:"title" yaml:"title"` Body string `boil:"body" json:"body" toml:"body" yaml:"body"` R *articleR `boil:"-" json:"-" toml:"-" yaml:"-"` L articleL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Article is an object representing the database table.
func FindArticle ¶
func FindArticle(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Article, error)
FindArticle retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Article) Delete ¶
Delete deletes a single Article record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Article) Insert ¶
func (o *Article) 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 (*Article) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Article) Update ¶
func (o *Article) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Article. 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 (*Article) Upsert ¶
func (o *Article) Upsert(ctx context.Context, exec boil.ContextExecutor, 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 ArticleHook ¶
ArticleHook is the signature for custom Article hook methods
type ArticleSlice ¶
type ArticleSlice []*Article
ArticleSlice is an alias for a slice of pointers to Article. This should almost always be used instead of []Article.
func (ArticleSlice) DeleteAll ¶
func (o ArticleSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ArticleSlice) ReloadAll ¶
func (o *ArticleSlice) 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 (ArticleSlice) UpdateAll ¶
func (o ArticleSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.