models

package
v0.0.0-...-93edf92 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2018 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyRespose = Response{}
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 GuestListExists

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

GuestListExists checks if the GuestList row exists.

func GuestListExistsG

func GuestListExistsG(id int) (bool, error)

GuestListExistsG checks if the GuestList row exists.

func GuestListExistsGP

func GuestListExistsGP(id int) bool

GuestListExistsGP checks if the GuestList row exists. Panics on error.

func GuestListExistsP

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

GuestListExistsP checks if the GuestList row exists. Panics on error.

func GuestLists

func GuestLists(exec boil.Executor, mods ...qm.QueryMod) guestListQuery

GuestLists retrieves all the records using an executor.

func GuestListsG

func GuestListsG(mods ...qm.QueryMod) guestListQuery

GuestListsG retrieves all records.

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 Parties

func Parties(exec boil.Executor, mods ...qm.QueryMod) partyQuery

Parties retrieves all the records using an executor.

func PartiesG

func PartiesG(mods ...qm.QueryMod) partyQuery

PartiesG retrieves all records.

func PartyExists

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

PartyExists checks if the Party row exists.

func PartyExistsG

func PartyExistsG(id int) (bool, error)

PartyExistsG checks if the Party row exists.

func PartyExistsGP

func PartyExistsGP(id int) bool

PartyExistsGP checks if the Party row exists. Panics on error.

func PartyExistsP

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

PartyExistsP checks if the Party row exists. Panics on error.

func Shuffle

func Shuffle(playlist *[]Track) *[]Track

Shuffle a playlist distributing the same artist "evenly" throughout

func TrackListExists

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

TrackListExists checks if the TrackList row exists.

func TrackListExistsG

func TrackListExistsG(id int) (bool, error)

TrackListExistsG checks if the TrackList row exists.

func TrackListExistsGP

func TrackListExistsGP(id int) bool

TrackListExistsGP checks if the TrackList row exists. Panics on error.

func TrackListExistsP

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

TrackListExistsP checks if the TrackList row exists. Panics on error.

func TrackLists

func TrackLists(exec boil.Executor, mods ...qm.QueryMod) trackListQuery

TrackLists retrieves all the records using an executor.

func TrackListsG

func TrackListsG(mods ...qm.QueryMod) trackListQuery

TrackListsG retrieves all records.

func UserExists

func UserExists(exec boil.Executor, id int64) (bool, error)

UserExists checks if the User row exists.

func UserExistsG

func UserExistsG(id int64) (bool, error)

UserExistsG checks if the User row exists.

func UserExistsGP

func UserExistsGP(id int64) bool

UserExistsGP checks if the User row exists. Panics on error.

func UserExistsP

func UserExistsP(exec boil.Executor, id int64) bool

UserExistsP checks if the User row exists. Panics on error.

func Users

func Users(exec boil.Executor, mods ...qm.QueryMod) userQuery

Users retrieves all the records using an executor.

func UsersG

func UsersG(mods ...qm.QueryMod) userQuery

UsersG retrieves all records.

Types

type CachedPlaylist

type CachedPlaylist struct {
	Playlist Playlist `json:"playlist"`
	Tracks   []Track  `json:"tracks"`
}

type Guest

type Guest struct {
	Name      string `json:"name"`
	Alias     string `json:"alias"`
	CheckedIn bool   `json:"checked_in"`
	Token     string `json:"token"`
}

func GetGuestByToken

func GetGuestByToken(db *sql.DB, token string) (uint32, *Guest, error)

func NewGuest

func NewGuest(name, token string) Guest

func (Guest) Public

func (g Guest) Public() PublicGuest

type GuestList

type GuestList struct {
	ID   int        `boil:"id" json:"id" toml:"id" yaml:"id"`
	Data types.JSON `boil:"data" json:"data" toml:"data" yaml:"data"`

	R *guestListR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L guestListL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

GuestList is an object representing the database table.

func FindGuestList

func FindGuestList(exec boil.Executor, id int, selectCols ...string) (*GuestList, error)

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

func FindGuestListG

func FindGuestListG(id int, selectCols ...string) (*GuestList, error)

FindGuestListG retrieves a single record by ID.

func FindGuestListGP

func FindGuestListGP(id int, selectCols ...string) *GuestList

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

func FindGuestListP

func FindGuestListP(exec boil.Executor, id int, selectCols ...string) *GuestList

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

func (*GuestList) AddGuestParties

func (o *GuestList) AddGuestParties(exec boil.Executor, insert bool, related ...*Party) error

AddGuestParties adds the given related objects to the existing relationships of the guest_list, optionally inserting them as new records. Appends related to o.R.GuestParties. Sets related.R.Guest appropriately.

func (*GuestList) AddGuestPartiesG

func (o *GuestList) AddGuestPartiesG(insert bool, related ...*Party) error

AddGuestPartiesG adds the given related objects to the existing relationships of the guest_list, optionally inserting them as new records. Appends related to o.R.GuestParties. Sets related.R.Guest appropriately. Uses the global database handle.

func (*GuestList) AddGuestPartiesGP

func (o *GuestList) AddGuestPartiesGP(insert bool, related ...*Party)

AddGuestPartiesGP adds the given related objects to the existing relationships of the guest_list, optionally inserting them as new records. Appends related to o.R.GuestParties. Sets related.R.Guest appropriately. Uses the global database handle and panics on error.

func (*GuestList) AddGuestPartiesP

func (o *GuestList) AddGuestPartiesP(exec boil.Executor, insert bool, related ...*Party)

AddGuestPartiesP adds the given related objects to the existing relationships of the guest_list, optionally inserting them as new records. Appends related to o.R.GuestParties. Sets related.R.Guest appropriately. Panics on error.

func (*GuestList) Delete

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

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

func (*GuestList) DeleteG

func (o *GuestList) DeleteG() error

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

func (*GuestList) DeleteGP

func (o *GuestList) DeleteGP()

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

func (*GuestList) DeleteP

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

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

func (*GuestList) GuestParties

func (o *GuestList) GuestParties(exec boil.Executor, mods ...qm.QueryMod) partyQuery

GuestParties retrieves all the party's party with an executor via guests_id column.

func (*GuestList) GuestPartiesG

func (o *GuestList) GuestPartiesG(mods ...qm.QueryMod) partyQuery

GuestPartiesG retrieves all the party's party via guests_id column.

func (*GuestList) Insert

func (o *GuestList) 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 (*GuestList) InsertG

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

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

func (*GuestList) InsertGP

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

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

func (*GuestList) InsertP

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

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

func (*GuestList) Reload

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

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

func (*GuestList) ReloadG

func (o *GuestList) ReloadG() error

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

func (*GuestList) ReloadGP

func (o *GuestList) ReloadGP()

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

func (*GuestList) ReloadP

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

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

func (*GuestList) Update

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

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

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

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

func (*GuestList) UpdateGP

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

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

func (*GuestList) UpdateP

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

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

func (*GuestList) Upsert

func (o *GuestList) 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 (*GuestList) UpsertG

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

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

func (*GuestList) UpsertGP

func (o *GuestList) 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 (*GuestList) UpsertP

func (o *GuestList) 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 GuestListSlice

type GuestListSlice []*GuestList

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

func (GuestListSlice) DeleteAll

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

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

func (GuestListSlice) DeleteAllG

func (o GuestListSlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (GuestListSlice) DeleteAllGP

func (o GuestListSlice) DeleteAllGP()

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

func (GuestListSlice) DeleteAllP

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

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

func (*GuestListSlice) ReloadAll

func (o *GuestListSlice) 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 (*GuestListSlice) ReloadAllG

func (o *GuestListSlice) ReloadAllG() error

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

func (*GuestListSlice) ReloadAllGP

func (o *GuestListSlice) 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 (*GuestListSlice) ReloadAllP

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

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

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

func (GuestListSlice) UpdateAllG

func (o GuestListSlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (GuestListSlice) UpdateAllGP

func (o GuestListSlice) UpdateAllGP(cols M)

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

func (GuestListSlice) UpdateAllP

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

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

type Link struct {
	Href string `json:"href"`
	Meta
}
type Links struct {
	Self    string `json:"self,omitempty"`
	Related string `json:"related,omitempty"`
}

type M

type M map[string]interface{}

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

type Meta

type Meta struct {
	Meta interface{} `json:"meta,omitempty"`
}

type Party

type Party struct {
	ID           int        `boil:"id" json:"id" toml:"id" yaml:"id"`
	Location     types.JSON `boil:"location" json:"location" toml:"location" yaml:"location"`
	RoomCode     string     `boil:"room_code" json:"room_code" toml:"room_code" yaml:"room_code"`
	Ended        bool       `boil:"ended" json:"ended" toml:"ended" yaml:"ended"`
	CurrentTrack null.JSON  `boil:"current_track" json:"current_track,omitempty" toml:"current_track" yaml:"current_track,omitempty"`
	QueueID      int        `boil:"queue_id" json:"queue_id" toml:"queue_id" yaml:"queue_id"`
	HistoryID    int        `boil:"history_id" json:"history_id" toml:"history_id" yaml:"history_id"`
	GuestsID     int        `boil:"guests_id" json:"guests_id" toml:"guests_id" yaml:"guests_id"`

	R *partyR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L partyL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Party is an object representing the database table.

func FindParty

func FindParty(exec boil.Executor, id int, selectCols ...string) (*Party, error)

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

func FindPartyG

func FindPartyG(id int, selectCols ...string) (*Party, error)

FindPartyG retrieves a single record by ID.

func FindPartyGP

func FindPartyGP(id int, selectCols ...string) *Party

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

func FindPartyP

func FindPartyP(exec boil.Executor, id int, selectCols ...string) *Party

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

func (*Party) Delete

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

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

func (*Party) DeleteG

func (o *Party) DeleteG() error

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

func (*Party) DeleteGP

func (o *Party) DeleteGP()

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

func (*Party) DeleteP

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

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

func (*Party) Guest

func (o *Party) Guest(exec boil.Executor, mods ...qm.QueryMod) guestListQuery

Guest pointed to by the foreign key.

func (*Party) GuestG

func (o *Party) GuestG(mods ...qm.QueryMod) guestListQuery

GuestG pointed to by the foreign key.

func (*Party) Guests

func (o *Party) Guests() ([]Guest, error)

func (*Party) History

func (o *Party) History(exec boil.Executor, mods ...qm.QueryMod) trackListQuery

History pointed to by the foreign key.

func (*Party) HistoryG

func (o *Party) HistoryG(mods ...qm.QueryMod) trackListQuery

HistoryG pointed to by the foreign key.

func (*Party) HistoryTracks

func (p *Party) HistoryTracks() (*[]Track, error)

HistoryTracks gets this party's history track list

func (*Party) Insert

func (o *Party) 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 (*Party) InsertG

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

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

func (*Party) InsertGP

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

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

func (*Party) InsertP

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

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

func (*Party) Public

func (p *Party) Public() (PublicParty, error)

func (*Party) Queue

func (o *Party) Queue(exec boil.Executor, mods ...qm.QueryMod) trackListQuery

Queue pointed to by the foreign key.

func (*Party) QueueG

func (o *Party) QueueG(mods ...qm.QueryMod) trackListQuery

QueueG pointed to by the foreign key.

func (*Party) QueueTracks

func (p *Party) QueueTracks() (*[]Track, error)

QueueTracks gets this party's queue track list

func (*Party) Reload

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

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

func (*Party) ReloadG

func (o *Party) ReloadG() error

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

func (*Party) ReloadGP

func (o *Party) ReloadGP()

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

func (*Party) ReloadP

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

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

func (*Party) RemoveUser

func (o *Party) RemoveUser(exec boil.Executor, related *User) error

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

func (*Party) RemoveUserG

func (o *Party) RemoveUserG(related *User) error

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

func (*Party) RemoveUserGP

func (o *Party) RemoveUserGP(related *User)

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

func (*Party) RemoveUserP

func (o *Party) RemoveUserP(exec boil.Executor, related *User)

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

func (*Party) SetGuest

func (o *Party) SetGuest(exec boil.Executor, insert bool, related *GuestList) error

SetGuest of the party to the related item. Sets o.R.Guest to related. Adds o to related.R.GuestParties.

func (*Party) SetGuestG

func (o *Party) SetGuestG(insert bool, related *GuestList) error

SetGuestG of the party to the related item. Sets o.R.Guest to related. Adds o to related.R.GuestParties. Uses the global database handle.

func (*Party) SetGuestGP

func (o *Party) SetGuestGP(insert bool, related *GuestList)

SetGuestGP of the party to the related item. Sets o.R.Guest to related. Adds o to related.R.GuestParties. Uses the global database handle and panics on error.

func (*Party) SetGuestP

func (o *Party) SetGuestP(exec boil.Executor, insert bool, related *GuestList)

SetGuestP of the party to the related item. Sets o.R.Guest to related. Adds o to related.R.GuestParties. Panics on error.

func (*Party) SetHistory

func (o *Party) SetHistory(exec boil.Executor, insert bool, related *TrackList) error

SetHistory of the party to the related item. Sets o.R.History to related. Adds o to related.R.HistoryParties.

func (*Party) SetHistoryG

func (o *Party) SetHistoryG(insert bool, related *TrackList) error

SetHistoryG of the party to the related item. Sets o.R.History to related. Adds o to related.R.HistoryParties. Uses the global database handle.

func (*Party) SetHistoryGP

func (o *Party) SetHistoryGP(insert bool, related *TrackList)

SetHistoryGP of the party to the related item. Sets o.R.History to related. Adds o to related.R.HistoryParties. Uses the global database handle and panics on error.

func (*Party) SetHistoryP

func (o *Party) SetHistoryP(exec boil.Executor, insert bool, related *TrackList)

SetHistoryP of the party to the related item. Sets o.R.History to related. Adds o to related.R.HistoryParties. Panics on error.

func (*Party) SetQueue

func (o *Party) SetQueue(exec boil.Executor, insert bool, related *TrackList) error

SetQueue of the party to the related item. Sets o.R.Queue to related. Adds o to related.R.QueueParties.

func (*Party) SetQueueG

func (o *Party) SetQueueG(insert bool, related *TrackList) error

SetQueueG of the party to the related item. Sets o.R.Queue to related. Adds o to related.R.QueueParties. Uses the global database handle.

func (*Party) SetQueueGP

func (o *Party) SetQueueGP(insert bool, related *TrackList)

SetQueueGP of the party to the related item. Sets o.R.Queue to related. Adds o to related.R.QueueParties. Uses the global database handle and panics on error.

func (*Party) SetQueueP

func (o *Party) SetQueueP(exec boil.Executor, insert bool, related *TrackList)

SetQueueP of the party to the related item. Sets o.R.Queue to related. Adds o to related.R.QueueParties. Panics on error.

func (*Party) SetUser

func (o *Party) SetUser(exec boil.Executor, insert bool, related *User) error

SetUser of the party to the related item. Sets o.R.User to related. Adds o to related.R.Party.

func (*Party) SetUserG

func (o *Party) SetUserG(insert bool, related *User) error

SetUserG of the party to the related item. Sets o.R.User to related. Adds o to related.R.Party. Uses the global database handle.

func (*Party) SetUserGP

func (o *Party) SetUserGP(insert bool, related *User)

SetUserGP of the party to the related item. Sets o.R.User to related. Adds o to related.R.Party. Uses the global database handle and panics on error.

func (*Party) SetUserP

func (o *Party) SetUserP(exec boil.Executor, insert bool, related *User)

SetUserP of the party to the related item. Sets o.R.User to related. Adds o to related.R.Party. Panics on error.

func (*Party) Update

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

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

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

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

func (*Party) UpdateGP

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

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

func (*Party) UpdateGuestList

func (o *Party) UpdateGuestList(guests []Guest) error

func (*Party) UpdateP

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

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

func (*Party) Upsert

func (o *Party) 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 (*Party) UpsertG

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

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

func (*Party) UpsertGP

func (o *Party) 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 (*Party) UpsertP

func (o *Party) 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.

func (*Party) User

func (o *Party) User(exec boil.Executor, mods ...qm.QueryMod) userQuery

User pointed to by the foreign key.

func (*Party) UserG

func (o *Party) UserG(mods ...qm.QueryMod) userQuery

UserG pointed to by the foreign key.

type PartySlice

type PartySlice []*Party

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

func (PartySlice) DeleteAll

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

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

func (PartySlice) DeleteAllG

func (o PartySlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (PartySlice) DeleteAllGP

func (o PartySlice) DeleteAllGP()

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

func (PartySlice) DeleteAllP

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

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

func (*PartySlice) ReloadAll

func (o *PartySlice) 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 (*PartySlice) ReloadAllG

func (o *PartySlice) ReloadAllG() error

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

func (*PartySlice) ReloadAllGP

func (o *PartySlice) 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 (*PartySlice) ReloadAllP

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

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

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

func (PartySlice) UpdateAllG

func (o PartySlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (PartySlice) UpdateAllGP

func (o PartySlice) UpdateAllGP(cols M)

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

func (PartySlice) UpdateAllP

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

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

type PlayingTrack

type PlayingTrack struct {
	Track
	Paused  bool `json:"paused,omitempty"`
	Elapsed uint `json:"elapsed,omitempty"`
}

type Playlist

type Playlist struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Owner       string `json:"owner"`
	Endpoint    string `json:"endpoint"`
	TotalTracks uint   `json:"total_tracks"`
}

func NewPlaylist

func NewPlaylist(p spotify.SimplePlaylist) Playlist

func NewPlaylistFromFullPlaylist

func NewPlaylistFromFullPlaylist(p *spotify.FullPlaylist) Playlist

type Playlists

type Playlists struct {
	Playlists []Playlist
}

type PublicGuest

type PublicGuest struct {
	Name      string `json:"name"`
	Alias     string `json:"alias"`
	CheckedIn bool   `json:"checked_in"`
}

type PublicParty

type PublicParty struct {
	Location     types.JSON    `json:"location"`
	RoomCode     string        `json:"room_code"`
	Ended        bool          `json:"ended"`
	Guests       *types.JSON   `json:"guests,omitempty"`
	CurrentTrack *PlayingTrack `json:"current_track,omitempty"`
}

type Relationship

type Relationship struct {
	Links Links        `json:"links,omitempty"`
	Data  ResponseData `json:"data,omitempty"`
	Meta
}

type Response

type Response struct {
	Data ResponseData `json:"data"`
	Meta
}

func NewResponse

func NewResponse(id, resourceType, selfUri string, attributes interface{}) Response

type ResponseData

type ResponseData struct {
	ID            string      `json:"id"`
	Type          string      `json:"type"`
	Attributes    interface{} `json:"attributes"`
	Relationships interface{} `json:"relationships,omitempty"`
	Links         Links       `json:"links,omitempty"`
	Meta
}

type SpotifyToken

type SpotifyToken struct {
	AccessToken string    `json:"access_token"`
	TokenExpiry time.Time `json:"token_expiry"`
}

type Track

type Track struct {
	ID            string          `json:"id"`
	Name          string          `json:"name"`
	Artists       []TrackArtist   `json:"artists"`
	Images        []spotify.Image `json:"images"`
	Endpoint      string          `json:"endpoint"`
	BeganPlaying  time.Time       `json:"began_playing"`
	Duration      uint            `json:"duration"`
	Contributor   string          `json:"contributor"`
	ContributorID int             `json:"contributor_id"`
}

func NewTrack

func NewTrack(t spotify.FullTrack) Track

func NewTracks

func NewTracks(t []spotify.PlaylistTrack) []Track

func (*Track) FirstArtist

func (t *Track) FirstArtist() string

FirstArtist gets a track's first artist, or "Unknown" if no artists exist

type TrackArtist

type TrackArtist struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type TrackList

type TrackList struct {
	ID                int         `boil:"id" json:"id" toml:"id" yaml:"id"`
	Data              types.JSON  `boil:"data" json:"data" toml:"data" yaml:"data"`
	CreatedAt         time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt         time.Time   `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	SpotifyPlaylistID null.String `` /* 127-byte string literal not displayed */

	R *trackListR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L trackListL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

TrackList is an object representing the database table.

func FindTrackList

func FindTrackList(exec boil.Executor, id int, selectCols ...string) (*TrackList, error)

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

func FindTrackListG

func FindTrackListG(id int, selectCols ...string) (*TrackList, error)

FindTrackListG retrieves a single record by ID.

func FindTrackListGP

func FindTrackListGP(id int, selectCols ...string) *TrackList

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

func FindTrackListP

func FindTrackListP(exec boil.Executor, id int, selectCols ...string) *TrackList

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

func (*TrackList) AddHistoryParties

func (o *TrackList) AddHistoryParties(exec boil.Executor, insert bool, related ...*Party) error

AddHistoryParties adds the given related objects to the existing relationships of the track_list, optionally inserting them as new records. Appends related to o.R.HistoryParties. Sets related.R.History appropriately.

func (*TrackList) AddHistoryPartiesG

func (o *TrackList) AddHistoryPartiesG(insert bool, related ...*Party) error

AddHistoryPartiesG adds the given related objects to the existing relationships of the track_list, optionally inserting them as new records. Appends related to o.R.HistoryParties. Sets related.R.History appropriately. Uses the global database handle.

func (*TrackList) AddHistoryPartiesGP

func (o *TrackList) AddHistoryPartiesGP(insert bool, related ...*Party)

AddHistoryPartiesGP adds the given related objects to the existing relationships of the track_list, optionally inserting them as new records. Appends related to o.R.HistoryParties. Sets related.R.History appropriately. Uses the global database handle and panics on error.

func (*TrackList) AddHistoryPartiesP

func (o *TrackList) AddHistoryPartiesP(exec boil.Executor, insert bool, related ...*Party)

AddHistoryPartiesP adds the given related objects to the existing relationships of the track_list, optionally inserting them as new records. Appends related to o.R.HistoryParties. Sets related.R.History appropriately. Panics on error.

func (*TrackList) AddQueueParties

func (o *TrackList) AddQueueParties(exec boil.Executor, insert bool, related ...*Party) error

AddQueueParties adds the given related objects to the existing relationships of the track_list, optionally inserting them as new records. Appends related to o.R.QueueParties. Sets related.R.Queue appropriately.

func (*TrackList) AddQueuePartiesG

func (o *TrackList) AddQueuePartiesG(insert bool, related ...*Party) error

AddQueuePartiesG adds the given related objects to the existing relationships of the track_list, optionally inserting them as new records. Appends related to o.R.QueueParties. Sets related.R.Queue appropriately. Uses the global database handle.

func (*TrackList) AddQueuePartiesGP

func (o *TrackList) AddQueuePartiesGP(insert bool, related ...*Party)

AddQueuePartiesGP adds the given related objects to the existing relationships of the track_list, optionally inserting them as new records. Appends related to o.R.QueueParties. Sets related.R.Queue appropriately. Uses the global database handle and panics on error.

func (*TrackList) AddQueuePartiesP

func (o *TrackList) AddQueuePartiesP(exec boil.Executor, insert bool, related ...*Party)

AddQueuePartiesP adds the given related objects to the existing relationships of the track_list, optionally inserting them as new records. Appends related to o.R.QueueParties. Sets related.R.Queue appropriately. Panics on error.

func (*TrackList) Delete

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

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

func (*TrackList) DeleteG

func (o *TrackList) DeleteG() error

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

func (*TrackList) DeleteGP

func (o *TrackList) DeleteGP()

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

func (*TrackList) DeleteP

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

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

func (*TrackList) HistoryParties

func (o *TrackList) HistoryParties(exec boil.Executor, mods ...qm.QueryMod) partyQuery

HistoryParties retrieves all the party's party with an executor via history_id column.

func (*TrackList) HistoryPartiesG

func (o *TrackList) HistoryPartiesG(mods ...qm.QueryMod) partyQuery

HistoryPartiesG retrieves all the party's party via history_id column.

func (*TrackList) Insert

func (o *TrackList) 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 (*TrackList) InsertG

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

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

func (*TrackList) InsertGP

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

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

func (*TrackList) InsertP

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

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

func (*TrackList) QueueParties

func (o *TrackList) QueueParties(exec boil.Executor, mods ...qm.QueryMod) partyQuery

QueueParties retrieves all the party's party with an executor via queue_id column.

func (*TrackList) QueuePartiesG

func (o *TrackList) QueuePartiesG(mods ...qm.QueryMod) partyQuery

QueuePartiesG retrieves all the party's party via queue_id column.

func (*TrackList) Reload

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

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

func (*TrackList) ReloadG

func (o *TrackList) ReloadG() error

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

func (*TrackList) ReloadGP

func (o *TrackList) ReloadGP()

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

func (*TrackList) ReloadP

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

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

func (*TrackList) Tracks

func (list *TrackList) Tracks() []Track

func (*TrackList) Update

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

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

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

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

func (*TrackList) UpdateGP

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

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

func (*TrackList) UpdateP

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

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

func (*TrackList) Upsert

func (o *TrackList) 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 (*TrackList) UpsertG

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

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

func (*TrackList) UpsertGP

func (o *TrackList) 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 (*TrackList) UpsertP

func (o *TrackList) 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 TrackListSlice

type TrackListSlice []*TrackList

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

func (TrackListSlice) DeleteAll

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

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

func (TrackListSlice) DeleteAllG

func (o TrackListSlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (TrackListSlice) DeleteAllGP

func (o TrackListSlice) DeleteAllGP()

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

func (TrackListSlice) DeleteAllP

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

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

func (*TrackListSlice) ReloadAll

func (o *TrackListSlice) 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 (*TrackListSlice) ReloadAllG

func (o *TrackListSlice) ReloadAllG() error

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

func (*TrackListSlice) ReloadAllGP

func (o *TrackListSlice) 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 (*TrackListSlice) ReloadAllP

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

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

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

func (TrackListSlice) UpdateAllG

func (o TrackListSlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (TrackListSlice) UpdateAllGP

func (o TrackListSlice) UpdateAllGP(cols M)

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

func (TrackListSlice) UpdateAllP

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

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

type User

type User struct {
	ID                int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Username          string      `boil:"username" json:"username" toml:"username" yaml:"username"`
	SpotifyUser       types.JSON  `boil:"spotify_user" json:"spotify_user" toml:"spotify_user" yaml:"spotify_user"`
	SpotifyPlaylistID null.String `` /* 127-byte string literal not displayed */
	AccessToken       string      `boil:"access_token" json:"access_token" toml:"access_token" yaml:"access_token"`
	RefreshToken      string      `boil:"refresh_token" json:"refresh_token" toml:"refresh_token" yaml:"refresh_token"`
	TokenExpiryDate   time.Time   `boil:"token_expiry_date" json:"token_expiry_date" toml:"token_expiry_date" yaml:"token_expiry_date"`
	TokenScope        string      `boil:"token_scope" json:"token_scope" toml:"token_scope" yaml:"token_scope"`
	CreatedAt         time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt         time.Time   `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	PartyID           null.Int    `boil:"party_id" json:"party_id,omitempty" toml:"party_id" yaml:"party_id,omitempty"`

	R *userR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

User is an object representing the database table.

func FindUser

func FindUser(exec boil.Executor, id int64, selectCols ...string) (*User, error)

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

func FindUserG

func FindUserG(id int64, selectCols ...string) (*User, error)

FindUserG retrieves a single record by ID.

func FindUserGP

func FindUserGP(id int64, selectCols ...string) *User

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

func FindUserP

func FindUserP(exec boil.Executor, id int64, selectCols ...string) *User

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

func (*User) Delete

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

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

func (*User) DeleteG

func (o *User) DeleteG() error

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

func (*User) DeleteGP

func (o *User) DeleteGP()

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

func (*User) DeleteP

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

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

func (*User) Insert

func (o *User) 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 (*User) InsertG

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

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

func (*User) InsertGP

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

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

func (*User) InsertP

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

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

func (*User) Party

func (o *User) Party(exec boil.Executor, mods ...qm.QueryMod) partyQuery

Party pointed to by the foreign key.

func (*User) PartyG

func (o *User) PartyG(mods ...qm.QueryMod) partyQuery

PartyG pointed to by the foreign key.

func (*User) Reload

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

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

func (*User) ReloadG

func (o *User) ReloadG() error

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

func (*User) ReloadGP

func (o *User) ReloadGP()

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

func (*User) ReloadP

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

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

func (*User) RemoveParty

func (o *User) RemoveParty(exec boil.Executor, related *Party) error

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

func (*User) RemovePartyG

func (o *User) RemovePartyG(related *Party) error

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

func (*User) RemovePartyGP

func (o *User) RemovePartyGP(related *Party)

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

func (*User) RemovePartyP

func (o *User) RemovePartyP(exec boil.Executor, related *Party)

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

func (*User) SetParty

func (o *User) SetParty(exec boil.Executor, insert bool, related *Party) error

SetParty of the user to the related item. Sets o.R.Party to related. Adds o to related.R.User.

func (*User) SetPartyG

func (o *User) SetPartyG(insert bool, related *Party) error

SetPartyG of the user to the related item. Sets o.R.Party to related. Adds o to related.R.User. Uses the global database handle.

func (*User) SetPartyGP

func (o *User) SetPartyGP(insert bool, related *Party)

SetPartyGP of the user to the related item. Sets o.R.Party to related. Adds o to related.R.User. Uses the global database handle and panics on error.

func (*User) SetPartyP

func (o *User) SetPartyP(exec boil.Executor, insert bool, related *Party)

SetPartyP of the user to the related item. Sets o.R.Party to related. Adds o to related.R.User. Panics on error.

func (*User) Update

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

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

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

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

func (*User) UpdateGP

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

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

func (*User) UpdateP

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

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

func (*User) Upsert

func (o *User) 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 (*User) UpsertG

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

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

func (*User) UpsertGP

func (o *User) 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 (*User) UpsertP

func (o *User) 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 UserSlice

type UserSlice []*User

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

func (UserSlice) DeleteAll

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

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

func (UserSlice) DeleteAllG

func (o UserSlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (UserSlice) DeleteAllGP

func (o UserSlice) DeleteAllGP()

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

func (UserSlice) DeleteAllP

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

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

func (*UserSlice) ReloadAll

func (o *UserSlice) 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 (*UserSlice) ReloadAllG

func (o *UserSlice) ReloadAllG() error

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

func (*UserSlice) ReloadAllGP

func (o *UserSlice) 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 (*UserSlice) ReloadAllP

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

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

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

func (UserSlice) UpdateAllG

func (o UserSlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (UserSlice) UpdateAllGP

func (o UserSlice) UpdateAllGP(cols M)

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

func (UserSlice) UpdateAllP

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