models

package
v0.0.0-...-a1ba3ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AirportColumns = struct {
	ID   string
	Size string
}{
	ID:   "id",
	Size: "size",
}
View Source
var AirportRels = struct {
	Jets string
}{
	Jets: "Jets",
}

AirportRels is where relationship names are stored.

View Source
var AirportWhere = struct {
	ID   whereHelperint
	Size whereHelpernull_Int
}{
	ID:   whereHelperint{/* contains filtered or unexported fields */},
	Size: whereHelpernull_Int{/* contains filtered or unexported fields */},
}
View Source
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.

View Source
var HangarColumns = struct {
	ID   string
	Name string
}{
	ID:   "id",
	Name: "name",
}
View Source
var HangarRels = struct {
}{}

HangarRels is where relationship names are stored.

View Source
var HangarWhere = struct {
	ID   whereHelperint
	Name whereHelperstring
}{
	ID:   whereHelperint{/* contains filtered or unexported fields */},
	Name: whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var JetColumns = struct {
	ID         string
	PilotID    string
	AirportID  string
	Name       string
	Color      string
	UUID       string
	Identifier string
	Cargo      string
	Manifest   string
}{
	ID:         "id",
	PilotID:    "pilot_id",
	AirportID:  "airport_id",
	Name:       "name",
	Color:      "color",
	UUID:       "uuid",
	Identifier: "identifier",
	Cargo:      "cargo",
	Manifest:   "manifest",
}
View Source
var JetRels = struct {
	Airport string
	Pilot   string
}{
	Airport: "Airport",
	Pilot:   "Pilot",
}

JetRels is where relationship names are stored.

View Source
var JetWhere = struct {
	ID         whereHelperint
	PilotID    whereHelperint
	AirportID  whereHelperint
	Name       whereHelperstring
	Color      whereHelpernull_String
	UUID       whereHelperstring
	Identifier whereHelperstring
	Cargo      whereHelper__byte
	Manifest   whereHelper__byte
}{
	ID:         whereHelperint{/* contains filtered or unexported fields */},
	PilotID:    whereHelperint{/* contains filtered or unexported fields */},
	AirportID:  whereHelperint{/* contains filtered or unexported fields */},
	Name:       whereHelperstring{/* contains filtered or unexported fields */},
	Color:      whereHelpernull_String{/* contains filtered or unexported fields */},
	UUID:       whereHelperstring{/* contains filtered or unexported fields */},
	Identifier: whereHelperstring{/* contains filtered or unexported fields */},
	Cargo:      whereHelper__byte{/* contains filtered or unexported fields */},
	Manifest:   whereHelper__byte{/* contains filtered or unexported fields */},
}
View Source
var LanguageColumns = struct {
	ID       string
	Language string
}{
	ID:       "id",
	Language: "language",
}
View Source
var LanguageRels = struct {
	Pilots string
}{
	Pilots: "Pilots",
}

LanguageRels is where relationship names are stored.

View Source
var LanguageWhere = struct {
	ID       whereHelperint
	Language whereHelperstring
}{
	ID:       whereHelperint{/* contains filtered or unexported fields */},
	Language: whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var LicenseColumns = struct {
	ID      string
	PilotID string
}{
	ID:      "id",
	PilotID: "pilot_id",
}
View Source
var LicenseRels = struct {
	Pilot string
}{
	Pilot: "Pilot",
}

LicenseRels is where relationship names are stored.

View Source
var LicenseWhere = struct {
	ID      whereHelperint
	PilotID whereHelpernull_Int
}{
	ID:      whereHelperint{/* contains filtered or unexported fields */},
	PilotID: whereHelpernull_Int{/* contains filtered or unexported fields */},
}
View Source
var PilotColumns = struct {
	ID   string
	Name string
}{
	ID:   "id",
	Name: "name",
}
View Source
var PilotRels = struct {
	Jets      string
	Licenses  string
	Languages string
}{
	Jets:      "Jets",
	Licenses:  "Licenses",
	Languages: "Languages",
}

PilotRels is where relationship names are stored.

View Source
var PilotWhere = struct {
	ID   whereHelperint
	Name whereHelperstring
}{
	ID:   whereHelperint{/* contains filtered or unexported fields */},
	Name: whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	Airports       string
	Hangars        string
	Jets           string
	Languages      string
	Licenses       string
	PilotLanguages string
	Pilots         string
}{
	Airports:       "airports",
	Hangars:        "hangars",
	Jets:           "jets",
	Languages:      "languages",
	Licenses:       "licenses",
	PilotLanguages: "pilot_languages",
	Pilots:         "pilots",
}

Functions

func AddAirportHook

func AddAirportHook(hookPoint boil.HookPoint, airportHook AirportHook)

AddAirportHook registers your hook function for all future operations.

func AddHangarHook

func AddHangarHook(hookPoint boil.HookPoint, hangarHook HangarHook)

AddHangarHook registers your hook function for all future operations.

func AddJetHook

func AddJetHook(hookPoint boil.HookPoint, jetHook JetHook)

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 AddLicenseHook

func AddLicenseHook(hookPoint boil.HookPoint, licenseHook LicenseHook)

AddLicenseHook registers your hook function for all future operations.

func AddPilotHook

func AddPilotHook(hookPoint boil.HookPoint, pilotHook PilotHook)

AddPilotHook registers your hook function for all future operations.

func AirportExists

func AirportExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

AirportExists checks if the Airport row exists.

func Airports

func Airports(mods ...qm.QueryMod) airportQuery

Airports retrieves all the records using an executor.

func HangarExists

func HangarExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

HangarExists checks if the Hangar row exists.

func Hangars

func Hangars(mods ...qm.QueryMod) hangarQuery

Hangars retrieves all the records using an executor.

func JetExists

func JetExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

JetExists checks if the Jet row exists.

func Jets

func Jets(mods ...qm.QueryMod) jetQuery

Jets retrieves all the records using an executor.

func LanguageExists

func LanguageExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

LanguageExists checks if the Language row exists.

func Languages

func Languages(mods ...qm.QueryMod) languageQuery

Languages retrieves all the records using an executor.

func LicenseExists

func LicenseExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

LicenseExists checks if the License row exists.

func Licenses

func Licenses(mods ...qm.QueryMod) licenseQuery

Licenses retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func PilotExists

func PilotExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

PilotExists checks if the Pilot row exists.

func Pilots

func Pilots(mods ...qm.QueryMod) pilotQuery

Pilots retrieves all the records using an executor.

Types

type Airport

type Airport struct {
	ID   int      `db:"id" boil:"id" json:"id" toml:"id" yaml:"id"`
	Size null.Int `db:"size" boil:"size" json:"size,omitempty" toml:"size" yaml:"size,omitempty"`

	R *airportR `db:"-" boil:"-" json:"-" toml:"-" yaml:"-"`
	L airportL  `db:"-" boil:"-" json:"-" toml:"-" yaml:"-"`
}

Airport is an object representing the database table.

func FindAirport

func FindAirport(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Airport, error)

FindAirport retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Airport) AddJets

func (o *Airport) AddJets(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Jet) error

AddJets adds the given related objects to the existing relationships of the airport, optionally inserting them as new records. Appends related to o.R.Jets. Sets related.R.Airport appropriately.

func (*Airport) Delete

func (o *Airport) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Airport record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Airport) Insert

func (o *Airport) 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 (*Airport) Jets

func (o *Airport) Jets(mods ...qm.QueryMod) jetQuery

Jets retrieves all the jet's Jets with an executor.

func (*Airport) Reload

func (o *Airport) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Airport) Update

func (o *Airport) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Airport. 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 (*Airport) Upsert

func (o *Airport) 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 AirportHook

type AirportHook func(context.Context, boil.ContextExecutor, *Airport) error

AirportHook is the signature for custom Airport hook methods

type AirportSlice

type AirportSlice []*Airport

AirportSlice is an alias for a slice of pointers to Airport. This should generally be used opposed to []Airport.

func (AirportSlice) DeleteAll

func (o AirportSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*AirportSlice) ReloadAll

func (o *AirportSlice) 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 (AirportSlice) UpdateAll

func (o AirportSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Hangar

type Hangar struct {
	ID   int    `db:"id" boil:"id" json:"id" toml:"id" yaml:"id"`
	Name string `db:"name" boil:"name" json:"name" toml:"name" yaml:"name"`

	R *hangarR `db:"-" boil:"-" json:"-" toml:"-" yaml:"-"`
	L hangarL  `db:"-" boil:"-" json:"-" toml:"-" yaml:"-"`
}

Hangar is an object representing the database table.

func FindHangar

func FindHangar(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Hangar, error)

FindHangar retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Hangar) Delete

func (o *Hangar) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Hangar record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Hangar) Insert

func (o *Hangar) 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 (*Hangar) Reload

func (o *Hangar) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Hangar) Update

func (o *Hangar) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Hangar. 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 (*Hangar) Upsert

func (o *Hangar) 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 HangarHook

type HangarHook func(context.Context, boil.ContextExecutor, *Hangar) error

HangarHook is the signature for custom Hangar hook methods

type HangarSlice

type HangarSlice []*Hangar

HangarSlice is an alias for a slice of pointers to Hangar. This should generally be used opposed to []Hangar.

func (HangarSlice) DeleteAll

func (o HangarSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*HangarSlice) ReloadAll

func (o *HangarSlice) 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 (HangarSlice) UpdateAll

func (o HangarSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Jet

type Jet struct {
	ID         int         `db:"id" boil:"id" json:"id" toml:"id" yaml:"id"`
	PilotID    int         `db:"pilot_id" boil:"pilot_id" json:"pilot_id" toml:"pilot_id" yaml:"pilot_id"`
	AirportID  int         `db:"airport_id" boil:"airport_id" json:"airport_id" toml:"airport_id" yaml:"airport_id"`
	Name       string      `db:"name" boil:"name" json:"name" toml:"name" yaml:"name"`
	Color      null.String `db:"color" boil:"color" json:"color,omitempty" toml:"color" yaml:"color,omitempty"`
	UUID       string      `db:"uuid" boil:"uuid" json:"uuid" toml:"uuid" yaml:"uuid"`
	Identifier string      `db:"identifier" boil:"identifier" json:"identifier" toml:"identifier" yaml:"identifier"`
	Cargo      []byte      `db:"cargo" boil:"cargo" json:"cargo" toml:"cargo" yaml:"cargo"`
	Manifest   []byte      `db:"manifest" boil:"manifest" json:"manifest" toml:"manifest" yaml:"manifest"`

	R *jetR `db:"-" boil:"-" json:"-" toml:"-" yaml:"-"`
	L jetL  `db:"-" 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) Airport

func (o *Jet) Airport(mods ...qm.QueryMod) airportQuery

Airport pointed to by the foreign key.

func (*Jet) Delete

func (o *Jet) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (o *Jet) 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 (*Jet) Pilot

func (o *Jet) Pilot(mods ...qm.QueryMod) pilotQuery

Pilot pointed to by the foreign key.

func (*Jet) Reload

func (o *Jet) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Jet) SetAirport

func (o *Jet) SetAirport(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Airport) error

SetAirport of the jet to the related item. Sets o.R.Airport to related. Adds o to related.R.Jets.

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 JetHook

type JetHook func(context.Context, boil.ContextExecutor, *Jet) error

JetHook is the signature for custom Jet hook methods

type JetSlice

type JetSlice []*Jet

JetSlice is an alias for a slice of pointers to Jet. This should generally be used opposed to []Jet.

func (JetSlice) DeleteAll

func (o JetSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*JetSlice) ReloadAll

func (o *JetSlice) 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 (JetSlice) UpdateAll

func (o JetSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Language

type Language struct {
	ID       int    `db:"id" boil:"id" json:"id" toml:"id" yaml:"id"`
	Language string `db:"language" boil:"language" json:"language" toml:"language" yaml:"language"`

	R *languageR `db:"-" boil:"-" json:"-" toml:"-" yaml:"-"`
	L languageL  `db:"-" 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

func (o *Language) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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) Pilots

func (o *Language) Pilots(mods ...qm.QueryMod) pilotQuery

Pilots retrieves all the pilot's Pilots with an executor.

func (*Language) Reload

func (o *Language) Reload(ctx context.Context, exec boil.ContextExecutor) error

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

type LanguageHook func(context.Context, boil.ContextExecutor, *Language) error

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 License

type License struct {
	ID      int      `db:"id" boil:"id" json:"id" toml:"id" yaml:"id"`
	PilotID null.Int `db:"pilot_id" boil:"pilot_id" json:"pilot_id,omitempty" toml:"pilot_id" yaml:"pilot_id,omitempty"`

	R *licenseR `db:"-" boil:"-" json:"-" toml:"-" yaml:"-"`
	L licenseL  `db:"-" boil:"-" json:"-" toml:"-" yaml:"-"`
}

License is an object representing the database table.

func FindLicense

func FindLicense(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*License, error)

FindLicense retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*License) Delete

func (o *License) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single License record with an executor. Delete will match against the primary key column to find the record to delete.

func (*License) Insert

func (o *License) 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 (*License) Pilot

func (o *License) Pilot(mods ...qm.QueryMod) pilotQuery

Pilot pointed to by the foreign key.

func (*License) Reload

func (o *License) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*License) RemovePilot

func (o *License) RemovePilot(ctx context.Context, exec boil.ContextExecutor, related *Pilot) error

RemovePilot relationship. Sets o.R.Pilot to nil. Removes o from all passed in related items' relationships struct (Optional).

func (*License) SetPilot

func (o *License) SetPilot(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Pilot) error

SetPilot of the license to the related item. Sets o.R.Pilot to related. Adds o to related.R.Licenses.

func (*License) Update

func (o *License) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the License. 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 (*License) Upsert

func (o *License) 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 LicenseHook

type LicenseHook func(context.Context, boil.ContextExecutor, *License) error

LicenseHook is the signature for custom License hook methods

type LicenseSlice

type LicenseSlice []*License

LicenseSlice is an alias for a slice of pointers to License. This should generally be used opposed to []License.

func (LicenseSlice) DeleteAll

func (o LicenseSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*LicenseSlice) ReloadAll

func (o *LicenseSlice) 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 (LicenseSlice) UpdateAll

func (o LicenseSlice) 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 Pilot

type Pilot struct {
	ID   int    `db:"id" boil:"id" json:"id" toml:"id" yaml:"id"`
	Name string `db:"name" boil:"name" json:"name" toml:"name" yaml:"name"`

	R *pilotR `db:"-" boil:"-" json:"-" toml:"-" yaml:"-"`
	L pilotL  `db:"-" 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) AddLicenses

func (o *Pilot) AddLicenses(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*License) error

AddLicenses adds the given related objects to the existing relationships of the pilot, optionally inserting them as new records. Appends related to o.R.Licenses. Sets related.R.Pilot appropriately.

func (*Pilot) Delete

func (o *Pilot) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (o *Pilot) 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 (*Pilot) Jets

func (o *Pilot) Jets(mods ...qm.QueryMod) jetQuery

Jets retrieves all the jet's Jets with an executor.

func (*Pilot) Languages

func (o *Pilot) Languages(mods ...qm.QueryMod) languageQuery

Languages retrieves all the language's Languages with an executor.

func (*Pilot) Licenses

func (o *Pilot) Licenses(mods ...qm.QueryMod) licenseQuery

Licenses retrieves all the license's Licenses with an executor.

func (*Pilot) Reload

func (o *Pilot) Reload(ctx context.Context, exec boil.ContextExecutor) error

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) RemoveLicenses

func (o *Pilot) RemoveLicenses(ctx context.Context, exec boil.ContextExecutor, related ...*License) error

RemoveLicenses relationships from objects passed in. Removes related items from R.Licenses (uses pointer comparison, removal does not keep order) Sets related.R.Pilot.

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) SetLicenses

func (o *Pilot) SetLicenses(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*License) error

SetLicenses 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.Pilot's Licenses accordingly. Replaces o.R.Licenses with related. Sets related.R.Pilot's Licenses 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 PilotHook

type PilotHook func(context.Context, boil.ContextExecutor, *Pilot) error

PilotHook is the signature for custom Pilot hook methods

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL