models

package
v1.2.17 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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.

Functions

func NewQuery

func NewQuery(exec boil.Executor, mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func NewQueryG

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

NewQueryG initializes a new Query using the passed in QueryMods

func People

func People(exec boil.Executor, mods ...qm.QueryMod) personQuery

People retrieves all the records using an executor.

func PeopleG

func PeopleG(mods ...qm.QueryMod) personQuery

PeopleG retrieves all records.

func PersonExists

func PersonExists(exec boil.Executor, id int) (bool, error)

PersonExists checks if the Person row exists.

func PersonExistsG

func PersonExistsG(id int) (bool, error)

PersonExistsG checks if the Person row exists.

func PersonExistsGP

func PersonExistsGP(id int) bool

PersonExistsGP checks if the Person row exists. Panics on error.

func PersonExistsP

func PersonExistsP(exec boil.Executor, id int) bool

PersonExistsP checks if the Person row exists. Panics on error.

func PetExists

func PetExists(exec boil.Executor, id int) (bool, error)

PetExists checks if the Pet row exists.

func PetExistsG

func PetExistsG(id int) (bool, error)

PetExistsG checks if the Pet row exists.

func PetExistsGP

func PetExistsGP(id int) bool

PetExistsGP checks if the Pet row exists. Panics on error.

func PetExistsP

func PetExistsP(exec boil.Executor, id int) bool

PetExistsP checks if the Pet row exists. Panics on error.

func Pets

func Pets(exec boil.Executor, mods ...qm.QueryMod) petQuery

Pets retrieves all the records using an executor.

func PetsG

func PetsG(mods ...qm.QueryMod) petQuery

PetsG retrieves all records.

func SchemaMigrationExists

func SchemaMigrationExists(exec boil.Executor, version int64) (bool, error)

SchemaMigrationExists checks if the SchemaMigration row exists.

func SchemaMigrationExistsG

func SchemaMigrationExistsG(version int64) (bool, error)

SchemaMigrationExistsG checks if the SchemaMigration row exists.

func SchemaMigrationExistsGP

func SchemaMigrationExistsGP(version int64) bool

SchemaMigrationExistsGP checks if the SchemaMigration row exists. Panics on error.

func SchemaMigrationExistsP

func SchemaMigrationExistsP(exec boil.Executor, version int64) bool

SchemaMigrationExistsP checks if the SchemaMigration row exists. Panics on error.

func SchemaMigrations

func SchemaMigrations(exec boil.Executor, mods ...qm.QueryMod) schemaMigrationQuery

SchemaMigrations retrieves all the records using an executor.

func SchemaMigrationsG

func SchemaMigrationsG(mods ...qm.QueryMod) schemaMigrationQuery

SchemaMigrationsG retrieves all records.

Types

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type Person

type Person struct {
	ID   int         `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name null.String `boil:"name" json:"name,omitempty" toml:"name" yaml:"name,omitempty"`

	R *personR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L personL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Person is an object representing the database table.

func FindPerson

func FindPerson(exec boil.Executor, id int, selectCols ...string) (*Person, error)

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

func FindPersonG

func FindPersonG(id int, selectCols ...string) (*Person, error)

FindPersonG retrieves a single record by ID.

func FindPersonGP

func FindPersonGP(id int, selectCols ...string) *Person

FindPersonGP retrieves a single record by ID, and panics on error.

func FindPersonP

func FindPersonP(exec boil.Executor, id int, selectCols ...string) *Person

FindPersonP retrieves a single record by ID with an executor, and panics on error.

func (*Person) AddPets

func (o *Person) AddPets(exec boil.Executor, insert bool, related ...*Pet) error

AddPets adds the given related objects to the existing relationships of the person, optionally inserting them as new records. Appends related to o.R.Pets. Sets related.R.Person appropriately.

func (*Person) AddPetsG

func (o *Person) AddPetsG(insert bool, related ...*Pet) error

AddPetsG adds the given related objects to the existing relationships of the person, optionally inserting them as new records. Appends related to o.R.Pets. Sets related.R.Person appropriately. Uses the global database handle.

func (*Person) AddPetsGP

func (o *Person) AddPetsGP(insert bool, related ...*Pet)

AddPetsGP adds the given related objects to the existing relationships of the person, optionally inserting them as new records. Appends related to o.R.Pets. Sets related.R.Person appropriately. Uses the global database handle and panics on error.

func (*Person) AddPetsP

func (o *Person) AddPetsP(exec boil.Executor, insert bool, related ...*Pet)

AddPetsP adds the given related objects to the existing relationships of the person, optionally inserting them as new records. Appends related to o.R.Pets. Sets related.R.Person appropriately. Panics on error.

func (*Person) Delete

func (o *Person) Delete(exec boil.Executor) error

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

func (*Person) DeleteG

func (o *Person) DeleteG() error

DeleteG deletes a single Person record. DeleteG will match against the primary key column to find the record to delete.

func (*Person) DeleteGP

func (o *Person) DeleteGP()

DeleteGP deletes a single Person record. DeleteGP will match against the primary key column to find the record to delete. Panics on error.

func (*Person) DeleteP

func (o *Person) DeleteP(exec boil.Executor)

DeleteP deletes a single Person record with an executor. DeleteP will match against the primary key column to find the record to delete. Panics on error.

func (*Person) Insert

func (o *Person) Insert(exec boil.Executor, whitelist ...string) error

Insert a single record using an executor. Whitelist behavior: If a whitelist is provided, only those columns supplied are inserted No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns without a default value are included (i.e. name, age) - All columns with a default, but non-zero are included (i.e. health = 75)

func (*Person) InsertG

func (o *Person) InsertG(whitelist ...string) error

InsertG a single record. See Insert for whitelist behavior description.

func (*Person) InsertGP

func (o *Person) InsertGP(whitelist ...string)

InsertGP a single record, and panics on error. See Insert for whitelist behavior description.

func (*Person) InsertP

func (o *Person) InsertP(exec boil.Executor, whitelist ...string)

InsertP a single record using an executor, and panics on error. See Insert for whitelist behavior description.

func (*Person) Pets

func (o *Person) Pets(exec boil.Executor, mods ...qm.QueryMod) petQuery

Pets retrieves all the pet's pets with an executor.

func (*Person) PetsG

func (o *Person) PetsG(mods ...qm.QueryMod) petQuery

PetsG retrieves all the pet's pets.

func (*Person) Reload

func (o *Person) Reload(exec boil.Executor) error

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

func (*Person) ReloadG

func (o *Person) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*Person) ReloadGP

func (o *Person) ReloadGP()

ReloadGP refetches the object from the database and panics on error.

func (*Person) ReloadP

func (o *Person) ReloadP(exec boil.Executor)

ReloadP refetches the object from the database with an executor. Panics on error.

func (*Person) RemovePets

func (o *Person) RemovePets(exec boil.Executor, related ...*Pet) error

RemovePets relationships from objects passed in. Removes related items from R.Pets (uses pointer comparison, removal does not keep order) Sets related.R.Person.

func (*Person) RemovePetsG

func (o *Person) RemovePetsG(related ...*Pet) error

RemovePetsG relationships from objects passed in. Removes related items from R.Pets (uses pointer comparison, removal does not keep order) Sets related.R.Person. Uses the global database handle.

func (*Person) RemovePetsGP

func (o *Person) RemovePetsGP(related ...*Pet)

RemovePetsGP relationships from objects passed in. Removes related items from R.Pets (uses pointer comparison, removal does not keep order) Sets related.R.Person. Uses the global database handle and panics on error.

func (*Person) RemovePetsP

func (o *Person) RemovePetsP(exec boil.Executor, related ...*Pet)

RemovePetsP relationships from objects passed in. Removes related items from R.Pets (uses pointer comparison, removal does not keep order) Sets related.R.Person. Panics on error.

func (*Person) SetPets

func (o *Person) SetPets(exec boil.Executor, insert bool, related ...*Pet) error

SetPets removes all previously related items of the person replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Person's Pets accordingly. Replaces o.R.Pets with related. Sets related.R.Person's Pets accordingly.

func (*Person) SetPetsG

func (o *Person) SetPetsG(insert bool, related ...*Pet) error

SetPetsG removes all previously related items of the person replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Person's Pets accordingly. Replaces o.R.Pets with related. Sets related.R.Person's Pets accordingly. Uses the global database handle.

func (*Person) SetPetsGP

func (o *Person) SetPetsGP(insert bool, related ...*Pet)

SetPetsGP removes all previously related items of the person replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Person's Pets accordingly. Replaces o.R.Pets with related. Sets related.R.Person's Pets accordingly. Uses the global database handle and panics on error.

func (*Person) SetPetsP

func (o *Person) SetPetsP(exec boil.Executor, insert bool, related ...*Pet)

SetPetsP removes all previously related items of the person replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Person's Pets accordingly. Replaces o.R.Pets with related. Sets related.R.Person's Pets accordingly. Panics on error.

func (*Person) Update

func (o *Person) Update(exec boil.Executor, whitelist ...string) error

Update uses an executor to update the Person. Whitelist behavior: If a whitelist is provided, only the columns given are updated. No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns are inferred to start with - All primary keys are subtracted from this set Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Person) UpdateG

func (o *Person) UpdateG(whitelist ...string) error

UpdateG a single Person record. See Update for whitelist behavior description.

func (*Person) UpdateGP

func (o *Person) UpdateGP(whitelist ...string)

UpdateGP a single Person record. UpdateGP takes a whitelist of column names that should be updated. Panics on error. See Update for whitelist behavior description.

func (*Person) UpdateP

func (o *Person) UpdateP(exec boil.Executor, whitelist ...string)

UpdateP uses an executor to update the Person, and panics on error. See Update for whitelist behavior description.

func (*Person) Upsert

func (o *Person) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict.

func (*Person) UpsertG

func (o *Person) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

UpsertG attempts an insert, and does an update or ignore on conflict.

func (*Person) UpsertGP

func (o *Person) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertGP attempts an insert, and does an update or ignore on conflict. Panics on error.

func (*Person) UpsertP

func (o *Person) UpsertP(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertP attempts an insert using an executor, and does an update or ignore on conflict. UpsertP panics on error.

type PersonSlice

type PersonSlice []*Person

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

func (PersonSlice) DeleteAll

func (o PersonSlice) DeleteAll(exec boil.Executor) error

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

func (PersonSlice) DeleteAllG

func (o PersonSlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (PersonSlice) DeleteAllGP

func (o PersonSlice) DeleteAllGP()

DeleteAllGP deletes all rows in the slice, and panics on error.

func (PersonSlice) DeleteAllP

func (o PersonSlice) DeleteAllP(exec boil.Executor)

DeleteAllP deletes all rows in the slice, using an executor, and panics on error.

func (*PersonSlice) ReloadAll

func (o *PersonSlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*PersonSlice) ReloadAllG

func (o *PersonSlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*PersonSlice) ReloadAllGP

func (o *PersonSlice) ReloadAllGP()

ReloadAllGP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (*PersonSlice) ReloadAllP

func (o *PersonSlice) ReloadAllP(exec boil.Executor)

ReloadAllP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (PersonSlice) UpdateAll

func (o PersonSlice) UpdateAll(exec boil.Executor, cols M) error

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

func (PersonSlice) UpdateAllG

func (o PersonSlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (PersonSlice) UpdateAllGP

func (o PersonSlice) UpdateAllGP(cols M)

UpdateAllGP updates all rows with the specified column values, and panics on error.

func (PersonSlice) UpdateAllP

func (o PersonSlice) UpdateAllP(exec boil.Executor, cols M)

UpdateAllP updates all rows with the specified column values, and panics on error.

type Pet

type Pet struct {
	ID       int         `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name     null.String `boil:"name" json:"name,omitempty" toml:"name" yaml:"name,omitempty"`
	Kind     null.String `boil:"kind" json:"kind,omitempty" toml:"kind" yaml:"kind,omitempty"`
	PersonID null.Int    `boil:"person_id" json:"person_id,omitempty" toml:"person_id" yaml:"person_id,omitempty"`

	R *petR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L petL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Pet is an object representing the database table.

func FindPet

func FindPet(exec boil.Executor, id int, selectCols ...string) (*Pet, error)

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

func FindPetG

func FindPetG(id int, selectCols ...string) (*Pet, error)

FindPetG retrieves a single record by ID.

func FindPetGP

func FindPetGP(id int, selectCols ...string) *Pet

FindPetGP retrieves a single record by ID, and panics on error.

func FindPetP

func FindPetP(exec boil.Executor, id int, selectCols ...string) *Pet

FindPetP retrieves a single record by ID with an executor, and panics on error.

func (*Pet) Delete

func (o *Pet) Delete(exec boil.Executor) error

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

func (*Pet) DeleteG

func (o *Pet) DeleteG() error

DeleteG deletes a single Pet record. DeleteG will match against the primary key column to find the record to delete.

func (*Pet) DeleteGP

func (o *Pet) DeleteGP()

DeleteGP deletes a single Pet record. DeleteGP will match against the primary key column to find the record to delete. Panics on error.

func (*Pet) DeleteP

func (o *Pet) DeleteP(exec boil.Executor)

DeleteP deletes a single Pet record with an executor. DeleteP will match against the primary key column to find the record to delete. Panics on error.

func (*Pet) Insert

func (o *Pet) Insert(exec boil.Executor, whitelist ...string) error

Insert a single record using an executor. Whitelist behavior: If a whitelist is provided, only those columns supplied are inserted No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns without a default value are included (i.e. name, age) - All columns with a default, but non-zero are included (i.e. health = 75)

func (*Pet) InsertG

func (o *Pet) InsertG(whitelist ...string) error

InsertG a single record. See Insert for whitelist behavior description.

func (*Pet) InsertGP

func (o *Pet) InsertGP(whitelist ...string)

InsertGP a single record, and panics on error. See Insert for whitelist behavior description.

func (*Pet) InsertP

func (o *Pet) InsertP(exec boil.Executor, whitelist ...string)

InsertP a single record using an executor, and panics on error. See Insert for whitelist behavior description.

func (*Pet) Person

func (o *Pet) Person(exec boil.Executor, mods ...qm.QueryMod) personQuery

Person pointed to by the foreign key.

func (*Pet) PersonG

func (o *Pet) PersonG(mods ...qm.QueryMod) personQuery

PersonG pointed to by the foreign key.

func (*Pet) Reload

func (o *Pet) Reload(exec boil.Executor) error

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

func (*Pet) ReloadG

func (o *Pet) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*Pet) ReloadGP

func (o *Pet) ReloadGP()

ReloadGP refetches the object from the database and panics on error.

func (*Pet) ReloadP

func (o *Pet) ReloadP(exec boil.Executor)

ReloadP refetches the object from the database with an executor. Panics on error.

func (*Pet) RemovePerson

func (o *Pet) RemovePerson(exec boil.Executor, related *Person) error

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

func (*Pet) RemovePersonG

func (o *Pet) RemovePersonG(related *Person) error

RemovePersonG relationship. Sets o.R.Person to nil. Removes o from all passed in related items' relationships struct (Optional). Uses the global database handle.

func (*Pet) RemovePersonGP

func (o *Pet) RemovePersonGP(related *Person)

RemovePersonGP relationship. Sets o.R.Person to nil. Removes o from all passed in related items' relationships struct (Optional). Uses the global database handle and panics on error.

func (*Pet) RemovePersonP

func (o *Pet) RemovePersonP(exec boil.Executor, related *Person)

RemovePersonP relationship. Sets o.R.Person to nil. Removes o from all passed in related items' relationships struct (Optional). Panics on error.

func (*Pet) SetPerson

func (o *Pet) SetPerson(exec boil.Executor, insert bool, related *Person) error

SetPerson of the pet to the related item. Sets o.R.Person to related. Adds o to related.R.Pets.

func (*Pet) SetPersonG

func (o *Pet) SetPersonG(insert bool, related *Person) error

SetPersonG of the pet to the related item. Sets o.R.Person to related. Adds o to related.R.Pets. Uses the global database handle.

func (*Pet) SetPersonGP

func (o *Pet) SetPersonGP(insert bool, related *Person)

SetPersonGP of the pet to the related item. Sets o.R.Person to related. Adds o to related.R.Pets. Uses the global database handle and panics on error.

func (*Pet) SetPersonP

func (o *Pet) SetPersonP(exec boil.Executor, insert bool, related *Person)

SetPersonP of the pet to the related item. Sets o.R.Person to related. Adds o to related.R.Pets. Panics on error.

func (*Pet) Update

func (o *Pet) Update(exec boil.Executor, whitelist ...string) error

Update uses an executor to update the Pet. Whitelist behavior: If a whitelist is provided, only the columns given are updated. No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns are inferred to start with - All primary keys are subtracted from this set Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Pet) UpdateG

func (o *Pet) UpdateG(whitelist ...string) error

UpdateG a single Pet record. See Update for whitelist behavior description.

func (*Pet) UpdateGP

func (o *Pet) UpdateGP(whitelist ...string)

UpdateGP a single Pet record. UpdateGP takes a whitelist of column names that should be updated. Panics on error. See Update for whitelist behavior description.

func (*Pet) UpdateP

func (o *Pet) UpdateP(exec boil.Executor, whitelist ...string)

UpdateP uses an executor to update the Pet, and panics on error. See Update for whitelist behavior description.

func (*Pet) Upsert

func (o *Pet) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict.

func (*Pet) UpsertG

func (o *Pet) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

UpsertG attempts an insert, and does an update or ignore on conflict.

func (*Pet) UpsertGP

func (o *Pet) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertGP attempts an insert, and does an update or ignore on conflict. Panics on error.

func (*Pet) UpsertP

func (o *Pet) UpsertP(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertP attempts an insert using an executor, and does an update or ignore on conflict. UpsertP panics on error.

type PetSlice

type PetSlice []*Pet

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

func (PetSlice) DeleteAll

func (o PetSlice) DeleteAll(exec boil.Executor) error

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

func (PetSlice) DeleteAllG

func (o PetSlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (PetSlice) DeleteAllGP

func (o PetSlice) DeleteAllGP()

DeleteAllGP deletes all rows in the slice, and panics on error.

func (PetSlice) DeleteAllP

func (o PetSlice) DeleteAllP(exec boil.Executor)

DeleteAllP deletes all rows in the slice, using an executor, and panics on error.

func (*PetSlice) ReloadAll

func (o *PetSlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*PetSlice) ReloadAllG

func (o *PetSlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*PetSlice) ReloadAllGP

func (o *PetSlice) ReloadAllGP()

ReloadAllGP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (*PetSlice) ReloadAllP

func (o *PetSlice) ReloadAllP(exec boil.Executor)

ReloadAllP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (PetSlice) UpdateAll

func (o PetSlice) UpdateAll(exec boil.Executor, cols M) error

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

func (PetSlice) UpdateAllG

func (o PetSlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (PetSlice) UpdateAllGP

func (o PetSlice) UpdateAllGP(cols M)

UpdateAllGP updates all rows with the specified column values, and panics on error.

func (PetSlice) UpdateAllP

func (o PetSlice) UpdateAllP(exec boil.Executor, cols M)

UpdateAllP updates all rows with the specified column values, and panics on error.

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(exec boil.Executor, 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 FindSchemaMigrationG

func FindSchemaMigrationG(version int64, selectCols ...string) (*SchemaMigration, error)

FindSchemaMigrationG retrieves a single record by ID.

func FindSchemaMigrationGP

func FindSchemaMigrationGP(version int64, selectCols ...string) *SchemaMigration

FindSchemaMigrationGP retrieves a single record by ID, and panics on error.

func FindSchemaMigrationP

func FindSchemaMigrationP(exec boil.Executor, version int64, selectCols ...string) *SchemaMigration

FindSchemaMigrationP retrieves a single record by ID with an executor, and panics on error.

func (*SchemaMigration) Delete

func (o *SchemaMigration) Delete(exec boil.Executor) 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) DeleteG

func (o *SchemaMigration) DeleteG() error

DeleteG deletes a single SchemaMigration record. DeleteG will match against the primary key column to find the record to delete.

func (*SchemaMigration) DeleteGP

func (o *SchemaMigration) DeleteGP()

DeleteGP deletes a single SchemaMigration record. DeleteGP will match against the primary key column to find the record to delete. Panics on error.

func (*SchemaMigration) DeleteP

func (o *SchemaMigration) DeleteP(exec boil.Executor)

DeleteP deletes a single SchemaMigration record with an executor. DeleteP will match against the primary key column to find the record to delete. Panics on error.

func (*SchemaMigration) Insert

func (o *SchemaMigration) Insert(exec boil.Executor, whitelist ...string) error

Insert a single record using an executor. Whitelist behavior: If a whitelist is provided, only those columns supplied are inserted No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns without a default value are included (i.e. name, age) - All columns with a default, but non-zero are included (i.e. health = 75)

func (*SchemaMigration) InsertG

func (o *SchemaMigration) InsertG(whitelist ...string) error

InsertG a single record. See Insert for whitelist behavior description.

func (*SchemaMigration) InsertGP

func (o *SchemaMigration) InsertGP(whitelist ...string)

InsertGP a single record, and panics on error. See Insert for whitelist behavior description.

func (*SchemaMigration) InsertP

func (o *SchemaMigration) InsertP(exec boil.Executor, whitelist ...string)

InsertP a single record using an executor, and panics on error. See Insert for whitelist behavior description.

func (*SchemaMigration) Reload

func (o *SchemaMigration) Reload(exec boil.Executor) error

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

func (*SchemaMigration) ReloadG

func (o *SchemaMigration) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*SchemaMigration) ReloadGP

func (o *SchemaMigration) ReloadGP()

ReloadGP refetches the object from the database and panics on error.

func (*SchemaMigration) ReloadP

func (o *SchemaMigration) ReloadP(exec boil.Executor)

ReloadP refetches the object from the database with an executor. Panics on error.

func (*SchemaMigration) Update

func (o *SchemaMigration) Update(exec boil.Executor, whitelist ...string) error

Update uses an executor to update the SchemaMigration. Whitelist behavior: If a whitelist is provided, only the columns given are updated. No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns are inferred to start with - All primary keys are subtracted from this set Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*SchemaMigration) UpdateG

func (o *SchemaMigration) UpdateG(whitelist ...string) error

UpdateG a single SchemaMigration record. See Update for whitelist behavior description.

func (*SchemaMigration) UpdateGP

func (o *SchemaMigration) UpdateGP(whitelist ...string)

UpdateGP a single SchemaMigration record. UpdateGP takes a whitelist of column names that should be updated. Panics on error. See Update for whitelist behavior description.

func (*SchemaMigration) UpdateP

func (o *SchemaMigration) UpdateP(exec boil.Executor, whitelist ...string)

UpdateP uses an executor to update the SchemaMigration, and panics on error. See Update for whitelist behavior description.

func (*SchemaMigration) Upsert

func (o *SchemaMigration) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict.

func (*SchemaMigration) UpsertG

func (o *SchemaMigration) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

UpsertG attempts an insert, and does an update or ignore on conflict.

func (*SchemaMigration) UpsertGP

func (o *SchemaMigration) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertGP attempts an insert, and does an update or ignore on conflict. Panics on error.

func (*SchemaMigration) UpsertP

func (o *SchemaMigration) UpsertP(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertP attempts an insert using an executor, and does an update or ignore on conflict. UpsertP panics on error.

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(exec boil.Executor) error

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

func (SchemaMigrationSlice) DeleteAllG

func (o SchemaMigrationSlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (SchemaMigrationSlice) DeleteAllGP

func (o SchemaMigrationSlice) DeleteAllGP()

DeleteAllGP deletes all rows in the slice, and panics on error.

func (SchemaMigrationSlice) DeleteAllP

func (o SchemaMigrationSlice) DeleteAllP(exec boil.Executor)

DeleteAllP deletes all rows in the slice, using an executor, and panics on error.

func (*SchemaMigrationSlice) ReloadAll

func (o *SchemaMigrationSlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*SchemaMigrationSlice) ReloadAllG

func (o *SchemaMigrationSlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*SchemaMigrationSlice) ReloadAllGP

func (o *SchemaMigrationSlice) ReloadAllGP()

ReloadAllGP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (*SchemaMigrationSlice) ReloadAllP

func (o *SchemaMigrationSlice) ReloadAllP(exec boil.Executor)

ReloadAllP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (SchemaMigrationSlice) UpdateAll

func (o SchemaMigrationSlice) UpdateAll(exec boil.Executor, cols M) error

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

func (SchemaMigrationSlice) UpdateAllG

func (o SchemaMigrationSlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (SchemaMigrationSlice) UpdateAllGP

func (o SchemaMigrationSlice) UpdateAllGP(cols M)

UpdateAllGP updates all rows with the specified column values, and panics on error.

func (SchemaMigrationSlice) UpdateAllP

func (o SchemaMigrationSlice) UpdateAllP(exec boil.Executor, cols M)

UpdateAllP updates all rows with the specified column values, and panics on error.

Jump to

Keyboard shortcuts

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