Documentation ¶
Index ¶
- Variables
- func AddJetHook(hookPoint boil.HookPoint, jetHook JetHook)
- func AddLanguageHook(hookPoint boil.HookPoint, languageHook LanguageHook)
- func AddPilotHook(hookPoint boil.HookPoint, pilotHook PilotHook)
- func AddSchemaMigrationHook(hookPoint boil.HookPoint, schemaMigrationHook SchemaMigrationHook)
- func JetExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Jets(mods ...qm.QueryMod) jetQuery
- func LanguageExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Languages(mods ...qm.QueryMod) languageQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func PilotExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Pilots(mods ...qm.QueryMod) pilotQuery
- func SchemaMigrationExists(ctx context.Context, exec boil.ContextExecutor, version int64) (bool, error)
- func SchemaMigrations(mods ...qm.QueryMod) schemaMigrationQuery
- type Jet
- func (o *Jet) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Jet) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Jet) Pilot(mods ...qm.QueryMod) pilotQuery
- func (o *Jet) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Jet) SetPilot(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Pilot) error
- func (o *Jet) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Jet) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type JetHook
- type JetSlice
- type Language
- func (o *Language) AddPilots(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Pilot) error
- func (o *Language) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Language) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Language) Pilots(mods ...qm.QueryMod) pilotQuery
- func (o *Language) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Language) RemovePilots(ctx context.Context, exec boil.ContextExecutor, related ...*Pilot) error
- func (o *Language) SetPilots(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Pilot) error
- func (o *Language) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Language) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type LanguageHook
- type LanguageSlice
- type M
- type NameAndLanguage
- type Pilot
- func (o *Pilot) AddJets(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Jet) error
- func (o *Pilot) AddLanguages(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Pilot) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Pilot) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Pilot) Jets(mods ...qm.QueryMod) jetQuery
- func (o *Pilot) Languages(mods ...qm.QueryMod) languageQuery
- func (o *Pilot) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Pilot) RemoveLanguages(ctx context.Context, exec boil.ContextExecutor, related ...*Language) error
- func (o *Pilot) SetLanguages(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Pilot) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Pilot) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type PilotHook
- type PilotSlice
- type SchemaMigration
- func (o *SchemaMigration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *SchemaMigration) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *SchemaMigration) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *SchemaMigration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *SchemaMigration) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type SchemaMigrationHook
- type SchemaMigrationSlice
- func (o SchemaMigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *SchemaMigrationSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o SchemaMigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
Constants ¶
This section is empty.
Variables ¶
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 JetColumns = struct { ID string PilotID string Age string Name string Color string }{ ID: "id", PilotID: "pilot_id", Age: "age", Name: "name", Color: "color", }
var JetRels = struct { Pilot string }{ Pilot: "Pilot", }
JetRels is where relationship names are stored.
var LanguageColumns = struct { ID string Language string }{ ID: "id", Language: "language", }
var LanguageRels = struct { Pilots string }{ Pilots: "Pilots", }
LanguageRels is where relationship names are stored.
var PilotColumns = struct { ID string Name string }{ ID: "id", Name: "name", }
var PilotRels = struct { Jets string Languages string }{ Jets: "Jets", Languages: "Languages", }
PilotRels is where relationship names are stored.
var SchemaMigrationColumns = struct { Version string Dirty string }{ Version: "version", Dirty: "dirty", }
var SchemaMigrationRels = struct {
}{}
SchemaMigrationRels is where relationship names are stored.
Functions ¶
func AddJetHook ¶
AddJetHook registers your hook function for all future operations.
func AddLanguageHook ¶
func AddLanguageHook(hookPoint boil.HookPoint, languageHook LanguageHook)
AddLanguageHook registers your hook function for all future operations.
func AddPilotHook ¶
AddPilotHook registers your hook function for all future operations.
func AddSchemaMigrationHook ¶
func AddSchemaMigrationHook(hookPoint boil.HookPoint, schemaMigrationHook SchemaMigrationHook)
AddSchemaMigrationHook registers your hook function for all future operations.
func LanguageExists ¶
LanguageExists checks if the Language row exists.
func PilotExists ¶
PilotExists checks if the Pilot row exists.
func SchemaMigrationExists ¶
func SchemaMigrationExists(ctx context.Context, exec boil.ContextExecutor, version int64) (bool, error)
SchemaMigrationExists checks if the SchemaMigration row exists.
func SchemaMigrations ¶
SchemaMigrations retrieves all the records using an executor.
Types ¶
type Jet ¶
type Jet struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` PilotID int `boil:"pilot_id" json:"pilot_id" toml:"pilot_id" yaml:"pilot_id"` Age int `boil:"age" json:"age" toml:"age" yaml:"age"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` Color string `boil:"color" json:"color" toml:"color" yaml:"color"` R *jetR `boil:"-" json:"-" toml:"-" yaml:"-"` L jetL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Jet is an object representing the database table.
func FindJet ¶
func FindJet(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Jet, error)
FindJet retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Jet) Delete ¶
Delete deletes a single Jet record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Jet) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Jet) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Jet) SetPilot ¶
func (o *Jet) SetPilot(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Pilot) error
SetPilot of the jet to the related item. Sets o.R.Pilot to related. Adds o to related.R.Jets.
func (*Jet) Update ¶
func (o *Jet) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Jet. 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 (*Jet) Upsert ¶
func (o *Jet) 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 JetSlice ¶
type JetSlice []*Jet
JetSlice is an alias for a slice of pointers to Jet. This should generally be used opposed to []Jet.
type Language ¶
type Language struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` Language string `boil:"language" json:"language" toml:"language" yaml:"language"` R *languageR `boil:"-" json:"-" toml:"-" yaml:"-"` L languageL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Language is an object representing the database table.
func FindLanguage ¶
func FindLanguage(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Language, error)
FindLanguage retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Language) AddPilots ¶
func (o *Language) AddPilots(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Pilot) error
AddPilots adds the given related objects to the existing relationships of the language, optionally inserting them as new records. Appends related to o.R.Pilots. Sets related.R.Languages appropriately.
func (*Language) Delete ¶
Delete deletes a single Language record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Language) Insert ¶
func (o *Language) 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 (*Language) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Language) RemovePilots ¶
func (o *Language) RemovePilots(ctx context.Context, exec boil.ContextExecutor, related ...*Pilot) error
RemovePilots relationships from objects passed in. Removes related items from R.Pilots (uses pointer comparison, removal does not keep order) Sets related.R.Languages.
func (*Language) SetPilots ¶
func (o *Language) SetPilots(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Pilot) error
SetPilots removes all previously related items of the language replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Languages's Pilots accordingly. Replaces o.R.Pilots with related. Sets related.R.Languages's Pilots accordingly.
func (*Language) Update ¶
func (o *Language) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Language. 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 (*Language) Upsert ¶
func (o *Language) 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 LanguageHook ¶
LanguageHook is the signature for custom Language hook methods
type LanguageSlice ¶
type LanguageSlice []*Language
LanguageSlice is an alias for a slice of pointers to Language. This should generally be used opposed to []Language.
func (LanguageSlice) DeleteAll ¶
func (o LanguageSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*LanguageSlice) ReloadAll ¶
func (o *LanguageSlice) 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 (LanguageSlice) UpdateAll ¶
func (o LanguageSlice) 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 NameAndLanguage ¶
type Pilot ¶
type Pilot struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` R *pilotR `boil:"-" json:"-" toml:"-" yaml:"-"` L pilotL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Pilot is an object representing the database table.
func FindPilot ¶
func FindPilot(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Pilot, error)
FindPilot retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Pilot) AddJets ¶
func (o *Pilot) AddJets(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Jet) error
AddJets adds the given related objects to the existing relationships of the pilot, optionally inserting them as new records. Appends related to o.R.Jets. Sets related.R.Pilot appropriately.
func (*Pilot) AddLanguages ¶
func (o *Pilot) AddLanguages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Language) error
AddLanguages adds the given related objects to the existing relationships of the pilot, optionally inserting them as new records. Appends related to o.R.Languages. Sets related.R.Pilots appropriately.
func (*Pilot) Delete ¶
Delete deletes a single Pilot record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Pilot) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Pilot) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Pilot) RemoveLanguages ¶
func (o *Pilot) RemoveLanguages(ctx context.Context, exec boil.ContextExecutor, related ...*Language) error
RemoveLanguages relationships from objects passed in. Removes related items from R.Languages (uses pointer comparison, removal does not keep order) Sets related.R.Pilots.
func (*Pilot) SetLanguages ¶
func (o *Pilot) SetLanguages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Language) error
SetLanguages removes all previously related items of the pilot replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Pilots's Languages accordingly. Replaces o.R.Languages with related. Sets related.R.Pilots's Languages accordingly.
func (*Pilot) Update ¶
func (o *Pilot) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Pilot. 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 (*Pilot) Upsert ¶
func (o *Pilot) 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 PilotSlice ¶
type PilotSlice []*Pilot
PilotSlice is an alias for a slice of pointers to Pilot. This should generally be used opposed to []Pilot.
func (PilotSlice) DeleteAll ¶
func (o PilotSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*PilotSlice) ReloadAll ¶
func (o *PilotSlice) 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 (PilotSlice) UpdateAll ¶
func (o PilotSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type SchemaMigration ¶
type SchemaMigration struct { Version int64 `boil:"version" json:"version" toml:"version" yaml:"version"` Dirty bool `boil:"dirty" json:"dirty" toml:"dirty" yaml:"dirty"` R *schemaMigrationR `boil:"-" json:"-" toml:"-" yaml:"-"` L schemaMigrationL `boil:"-" json:"-" toml:"-" yaml:"-"` }
SchemaMigration is an object representing the database table.
func FindSchemaMigration ¶
func FindSchemaMigration(ctx context.Context, exec boil.ContextExecutor, version int64, selectCols ...string) (*SchemaMigration, error)
FindSchemaMigration retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*SchemaMigration) Delete ¶
func (o *SchemaMigration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single SchemaMigration record with an executor. Delete will match against the primary key column to find the record to delete.
func (*SchemaMigration) Insert ¶
func (o *SchemaMigration) 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 (*SchemaMigration) Reload ¶
func (o *SchemaMigration) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*SchemaMigration) Update ¶
func (o *SchemaMigration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the SchemaMigration. 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 (*SchemaMigration) Upsert ¶
func (o *SchemaMigration) 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 SchemaMigrationHook ¶
type SchemaMigrationHook func(context.Context, boil.ContextExecutor, *SchemaMigration) error
SchemaMigrationHook is the signature for custom SchemaMigration hook methods
type SchemaMigrationSlice ¶
type SchemaMigrationSlice []*SchemaMigration
SchemaMigrationSlice is an alias for a slice of pointers to SchemaMigration. This should generally be used opposed to []SchemaMigration.
func (SchemaMigrationSlice) DeleteAll ¶
func (o SchemaMigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*SchemaMigrationSlice) ReloadAll ¶
func (o *SchemaMigrationSlice) 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 (SchemaMigrationSlice) UpdateAll ¶
func (o SchemaMigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.