Documentation ¶
Index ¶
- Variables
- func AddEntryHook(hookPoint boil.HookPoint, entryHook EntryHook)
- func Entries(mods ...qm.QueryMod) entryQuery
- func EntryExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- type Entry
- func (o *Entry) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Entry) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Entry) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Entry) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Entry) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type EntryHook
- type EntrySlice
- type M
Constants ¶
This section is empty.
Variables ¶
var EntryColumns = struct { ID string Value string }{ ID: "id", Value: "value", }
var EntryRels = struct {
}{}
EntryRels is where relationship names are stored.
var EntryTableColumns = struct { ID string Value string }{ ID: "entries.id", Value: "entries.value", }
var EntryWhere = struct { ID whereHelperint Value whereHelpernull_String }{ ID: whereHelperint{/* contains filtered or unexported fields */}, Value: whereHelpernull_String{/* 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 { Entries string }{ Entries: "entries", }
Functions ¶
func AddEntryHook ¶
AddEntryHook registers your hook function for all future operations.
func EntryExists ¶
EntryExists checks if the Entry row exists.
Types ¶
type Entry ¶
type Entry struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` Value null.String `boil:"value" json:"value,omitempty" toml:"value" yaml:"value,omitempty"` R *entryR `boil:"-" json:"-" toml:"-" yaml:"-"` L entryL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Entry is an object representing the database table.
func FindEntry ¶
func FindEntry(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Entry, error)
FindEntry retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Entry) Delete ¶
Delete deletes a single Entry record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Entry) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Entry) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Entry) Update ¶
func (o *Entry) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Entry. 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 (*Entry) Upsert ¶
func (o *Entry) 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 EntrySlice ¶
type EntrySlice []*Entry
EntrySlice is an alias for a slice of pointers to Entry. This should almost always be used instead of []Entry.
func (EntrySlice) DeleteAll ¶
func (o EntrySlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*EntrySlice) ReloadAll ¶
func (o *EntrySlice) 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 (EntrySlice) UpdateAll ¶
func (o EntrySlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.