Documentation
¶
Index ¶
- Variables
- func AddDummyHook(hookPoint boil.HookPoint, dummyHook DummyHook)
- func AddMigrationHook(hookPoint boil.HookPoint, migrationHook MigrationHook)
- func Dummies(mods ...qm.QueryMod) dummyQuery
- func DummyExists(ctx context.Context, exec boil.ContextExecutor, iD uint) (bool, error)
- func MigrationExists(ctx context.Context, exec boil.ContextExecutor, iD uint) (bool, error)
- func Migrations(mods ...qm.QueryMod) migrationQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- type Dummy
- func (o *Dummy) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Dummy) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Dummy) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Dummy) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Dummy) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type DummyHook
- type DummySlice
- type M
- type Migration
- func (o *Migration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Migration) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Migration) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Migration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Migration) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type MigrationHook
- type MigrationSlice
Constants ¶
This section is empty.
Variables ¶
var DummyColumns = struct { ID string CreatedAt string UpdatedAt string DeletedAt string Text string }{ ID: "id", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", Text: "text", }
var DummyRels = struct {
}{}
DummyRels is where relationship names are stored.
var DummyWhere = struct { ID whereHelperuint CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time DeletedAt whereHelpernull_Time Text whereHelpernull_String }{ ID: whereHelperuint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, Text: 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 MigrationColumns = struct { ID string CreatedAt string Name string }{ ID: "id", CreatedAt: "created_at", Name: "name", }
var MigrationRels = struct {
}{}
MigrationRels is where relationship names are stored.
var MigrationWhere = struct { ID whereHelperuint CreatedAt whereHelpernull_Time Name whereHelperstring }{ ID: whereHelperuint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, }
var TableNames = struct { Dummy string Migrations string }{ Dummy: "dummy", Migrations: "migrations", }
Functions ¶
func AddDummyHook ¶
AddDummyHook registers your hook function for all future operations.
func AddMigrationHook ¶
func AddMigrationHook(hookPoint boil.HookPoint, migrationHook MigrationHook)
AddMigrationHook registers your hook function for all future operations.
func DummyExists ¶
DummyExists checks if the Dummy row exists.
func MigrationExists ¶
MigrationExists checks if the Migration row exists.
func Migrations ¶
Migrations retrieves all the records using an executor.
Types ¶
type Dummy ¶
type Dummy struct { ID uint `boil:"id" json:"id" toml:"id" yaml:"id"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` Text null.String `boil:"text" json:"text,omitempty" toml:"text" yaml:"text,omitempty"` R *dummyR `boil:"-" json:"-" toml:"-" yaml:"-"` L dummyL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Dummy is an object representing the database table.
func FindDummy ¶
func FindDummy(ctx context.Context, exec boil.ContextExecutor, iD uint, selectCols ...string) (*Dummy, error)
FindDummy retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Dummy) Delete ¶
Delete deletes a single Dummy record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Dummy) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Dummy) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Dummy) Update ¶
func (o *Dummy) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Dummy. 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 (*Dummy) Upsert ¶
func (o *Dummy) 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 DummySlice ¶
type DummySlice []*Dummy
DummySlice is an alias for a slice of pointers to Dummy. This should generally be used opposed to []Dummy.
func (DummySlice) DeleteAll ¶
func (o DummySlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*DummySlice) ReloadAll ¶
func (o *DummySlice) 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 (DummySlice) UpdateAll ¶
func (o DummySlice) 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.
type Migration ¶
type Migration struct { ID uint `boil:"id" json:"id" toml:"id" yaml:"id"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` R *migrationR `boil:"-" json:"-" toml:"-" yaml:"-"` L migrationL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Migration is an object representing the database table.
func FindMigration ¶
func FindMigration(ctx context.Context, exec boil.ContextExecutor, iD uint, selectCols ...string) (*Migration, error)
FindMigration retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Migration) Delete ¶
Delete deletes a single Migration record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Migration) Insert ¶
func (o *Migration) 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 (*Migration) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Migration) Update ¶
func (o *Migration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Migration. 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 (*Migration) Upsert ¶
func (o *Migration) 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 MigrationHook ¶
MigrationHook is the signature for custom Migration hook methods
type MigrationSlice ¶
type MigrationSlice []*Migration
MigrationSlice is an alias for a slice of pointers to Migration. This should generally be used opposed to []Migration.
func (MigrationSlice) DeleteAll ¶
func (o MigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*MigrationSlice) ReloadAll ¶
func (o *MigrationSlice) 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 (MigrationSlice) UpdateAll ¶
func (o MigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.