Documentation ¶
Index ¶
- Variables
- func AliasExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Aliases(mods ...qm.QueryMod) aliasQuery
- func ClientExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Clients(mods ...qm.QueryMod) clientQuery
- func ElectionExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Elections(mods ...qm.QueryMod) electionQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- func VoteExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Votes(mods ...qm.QueryMod) voteQuery
- type Alias
- func (o *Alias) Client(mods ...qm.QueryMod) clientQuery
- func (o *Alias) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Alias) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Alias) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Alias) SetClient(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Client) error
- func (o *Alias) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Alias) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Alias) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Alias) User(mods ...qm.QueryMod) userQuery
- type AliasSlice
- type Client
- func (o *Client) AddAliases(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Alias) error
- func (o *Client) Aliases(mods ...qm.QueryMod) aliasQuery
- func (o *Client) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Client) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Client) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Client) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Client) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type ClientSlice
- type Election
- func (o *Election) AddVotes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Vote) error
- func (o *Election) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Election) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Election) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Election) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Election) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Election) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Election) User(mods ...qm.QueryMod) userQuery
- func (o *Election) Votes(mods ...qm.QueryMod) voteQuery
- type ElectionSlice
- type M
- type User
- func (o *User) AddAliases(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Alias) error
- func (o *User) AddElections(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddVotes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Vote) error
- func (o *User) Aliases(mods ...qm.QueryMod) aliasQuery
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Elections(mods ...qm.QueryMod) electionQuery
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *User) Votes(mods ...qm.QueryMod) voteQuery
- type UserSlice
- type Vote
- func (o *Vote) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Vote) Election(mods ...qm.QueryMod) electionQuery
- func (o *Vote) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Vote) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Vote) SetElection(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Election) error
- func (o *Vote) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Vote) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Vote) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Vote) User(mods ...qm.QueryMod) userQuery
- type VoteSlice
Constants ¶
This section is empty.
Variables ¶
var AliasColumns = struct { ID string UserID string ClientID string Alias string }{ ID: "id", UserID: "user_id", ClientID: "client_id", Alias: "alias", }
var AliasRels = struct { Client string User string }{ Client: "Client", User: "User", }
AliasRels is where relationship names are stored.
var AliasWhere = struct { ID whereHelperint64 UserID whereHelperint64 ClientID whereHelperint64 Alias whereHelperstring }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, UserID: whereHelperint64{/* contains filtered or unexported fields */}, ClientID: whereHelperint64{/* contains filtered or unexported fields */}, Alias: whereHelperstring{/* contains filtered or unexported fields */}, }
var ClientColumns = struct { ID string Name string Secret string }{ ID: "id", Name: "name", Secret: "secret", }
var ClientRels = struct { Aliases string }{ Aliases: "Aliases", }
ClientRels is where relationship names are stored.
var ClientWhere = struct { ID whereHelperint64 Name whereHelperstring Secret whereHelper__byte }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Secret: whereHelper__byte{/* contains filtered or unexported fields */}, }
var ElectionColumns = struct { ID string Key string Question string Choices string CreatedAt string BallotKey string Close string CloseTZ string Flags string UserID string }{ ID: "id", Key: "key", Question: "question", Choices: "choices", CreatedAt: "created_at", BallotKey: "ballot_key", Close: "close", CloseTZ: "close_tz", Flags: "flags", UserID: "user_id", }
var ElectionRels = struct { User string Votes string }{ User: "User", Votes: "Votes", }
ElectionRels is where relationship names are stored.
var ElectionWhere = struct { ID whereHelperint64 Key whereHelperstring Question whereHelperstring Choices whereHelpertypes_StringArray CreatedAt whereHelperpgtype_Timestamptz BallotKey whereHelperstring Close whereHelperpgtype_Timestamptz CloseTZ whereHelpernull_String Flags whereHelpertypes_StringArray UserID whereHelperint64 }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Key: whereHelperstring{/* contains filtered or unexported fields */}, Question: whereHelperstring{/* contains filtered or unexported fields */}, Choices: whereHelpertypes_StringArray{/* contains filtered or unexported fields */}, CreatedAt: whereHelperpgtype_Timestamptz{/* contains filtered or unexported fields */}, BallotKey: whereHelperstring{/* contains filtered or unexported fields */}, Close: whereHelperpgtype_Timestamptz{/* contains filtered or unexported fields */}, CloseTZ: whereHelpernull_String{/* contains filtered or unexported fields */}, Flags: whereHelpertypes_StringArray{/* contains filtered or unexported fields */}, UserID: whereHelperint64{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")
ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.
var TableNames = struct { Alias string Client string Election string User string Vote string }{ Alias: "alias", Client: "client", Election: "election", User: "user", Vote: "vote", }
var UserColumns = struct { ID string }{ ID: "id", }
var UserRels = struct { Aliases string Elections string Votes string }{ Aliases: "Aliases", Elections: "Elections", Votes: "Votes", }
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperint64 }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, }
var VoteColumns = struct { ID string ElectionID string Name string Choices string CreatedAt string UserID string }{ ID: "id", ElectionID: "election_id", Name: "name", Choices: "choices", CreatedAt: "created_at", UserID: "user_id", }
var VoteRels = struct { Election string User string }{ Election: "Election", User: "User", }
VoteRels is where relationship names are stored.
var VoteWhere = struct { ID whereHelperint64 ElectionID whereHelperint64 Name whereHelperstring Choices whereHelpertypes_StringArray CreatedAt whereHelperpgtype_Timestamptz UserID whereHelperint64 }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, ElectionID: whereHelperint64{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Choices: whereHelpertypes_StringArray{/* contains filtered or unexported fields */}, CreatedAt: whereHelperpgtype_Timestamptz{/* contains filtered or unexported fields */}, UserID: whereHelperint64{/* contains filtered or unexported fields */}, }
Functions ¶
func AliasExists ¶
AliasExists checks if the Alias row exists.
func ClientExists ¶
ClientExists checks if the Client row exists.
func ElectionExists ¶
ElectionExists checks if the Election row exists.
func UserExists ¶
UserExists checks if the User row exists.
func VoteExists ¶
VoteExists checks if the Vote row exists.
Types ¶
type Alias ¶
type Alias struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` UserID int64 `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` ClientID int64 `boil:"client_id" json:"client_id" toml:"client_id" yaml:"client_id"` Alias string `boil:"alias" json:"alias" toml:"alias" yaml:"alias"` R *aliasR `boil:"-" json:"-" toml:"-" yaml:"-"` L aliasL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Alias is an object representing the database table.
func FindAlias ¶
func FindAlias(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Alias, error)
FindAlias retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Alias) Delete ¶
Delete deletes a single Alias record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Alias) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Alias) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Alias) SetClient ¶
func (o *Alias) SetClient(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Client) error
SetClient of the alias to the related item. Sets o.R.Client to related. Adds o to related.R.Aliases.
func (*Alias) SetUser ¶
func (o *Alias) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the alias to the related item. Sets o.R.User to related. Adds o to related.R.Aliases.
func (*Alias) Update ¶
func (o *Alias) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Alias. 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 (*Alias) Upsert ¶
func (o *Alias) 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 AliasSlice ¶
type AliasSlice []*Alias
AliasSlice is an alias for a slice of pointers to Alias. This should generally be used opposed to []Alias.
func (AliasSlice) DeleteAll ¶
func (o AliasSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*AliasSlice) ReloadAll ¶
func (o *AliasSlice) 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 (AliasSlice) UpdateAll ¶
func (o AliasSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Client ¶
type Client struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` Secret []byte `boil:"secret" json:"secret" toml:"secret" yaml:"secret"` R *clientR `boil:"-" json:"-" toml:"-" yaml:"-"` L clientL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Client is an object representing the database table.
func FindClient ¶
func FindClient(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Client, error)
FindClient retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Client) AddAliases ¶
func (o *Client) AddAliases(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Alias) error
AddAliases adds the given related objects to the existing relationships of the client, optionally inserting them as new records. Appends related to o.R.Aliases. Sets related.R.Client appropriately.
func (*Client) Delete ¶
Delete deletes a single Client record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Client) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Client) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Client) Update ¶
func (o *Client) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Client. 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 (*Client) Upsert ¶
func (o *Client) 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 ClientSlice ¶
type ClientSlice []*Client
ClientSlice is an alias for a slice of pointers to Client. This should generally be used opposed to []Client.
func (ClientSlice) DeleteAll ¶
func (o ClientSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ClientSlice) ReloadAll ¶
func (o *ClientSlice) 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 (ClientSlice) UpdateAll ¶
func (o ClientSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Election ¶
type Election struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Key string `boil:"key" json:"key" toml:"key" yaml:"key"` Question string `boil:"question" json:"question" toml:"question" yaml:"question"` Choices types.StringArray `boil:"choices" json:"choices" toml:"choices" yaml:"choices"` CreatedAt pgtype.Timestamptz `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` BallotKey string `boil:"ballot_key" json:"ballot_key" toml:"ballot_key" yaml:"ballot_key"` Close pgtype.Timestamptz `boil:"close" json:"close,omitempty" toml:"close" yaml:"close,omitempty"` CloseTZ null.String `boil:"close_tz" json:"close_tz,omitempty" toml:"close_tz" yaml:"close_tz,omitempty"` Flags types.StringArray `boil:"flags" json:"flags" toml:"flags" yaml:"flags"` UserID int64 `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` R *electionR `boil:"-" json:"-" toml:"-" yaml:"-"` L electionL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Election is an object representing the database table.
func FindElection ¶
func FindElection(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Election, error)
FindElection retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Election) AddVotes ¶
func (o *Election) AddVotes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Vote) error
AddVotes adds the given related objects to the existing relationships of the election, optionally inserting them as new records. Appends related to o.R.Votes. Sets related.R.Election appropriately.
func (*Election) Delete ¶
Delete deletes a single Election record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Election) Insert ¶
func (o *Election) 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 (*Election) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Election) SetUser ¶
func (o *Election) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the election to the related item. Sets o.R.User to related. Adds o to related.R.Elections.
func (*Election) Update ¶
func (o *Election) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Election. 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 (*Election) Upsert ¶
func (o *Election) 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 ElectionSlice ¶
type ElectionSlice []*Election
ElectionSlice is an alias for a slice of pointers to Election. This should generally be used opposed to []Election.
func (ElectionSlice) DeleteAll ¶
func (o ElectionSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ElectionSlice) ReloadAll ¶
func (o *ElectionSlice) 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 (ElectionSlice) UpdateAll ¶
func (o ElectionSlice) 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 User ¶
type User struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` R *userR `boil:"-" json:"-" toml:"-" yaml:"-"` L userL `boil:"-" json:"-" toml:"-" yaml:"-"` }
User is an object representing the database table.
func FindUser ¶
func FindUser(ctx context.Context, exec boil.ContextExecutor, 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 (*User) AddAliases ¶
func (o *User) AddAliases(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Alias) error
AddAliases adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Aliases. Sets related.R.User appropriately.
func (*User) AddElections ¶
func (o *User) AddElections(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Election) error
AddElections adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Elections. Sets related.R.User appropriately.
func (*User) AddVotes ¶
func (o *User) AddVotes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Vote) error
AddVotes adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Votes. Sets related.R.User appropriately.
func (*User) Delete ¶
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) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*User) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*User) Update ¶
func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the User. 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 (*User) Upsert ¶
func (o *User) 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 UserSlice ¶
type UserSlice []*User
UserSlice is an alias for a slice of pointers to User. This should generally be used opposed to []User.
type Vote ¶
type Vote struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` ElectionID int64 `boil:"election_id" json:"election_id" toml:"election_id" yaml:"election_id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` Choices types.StringArray `boil:"choices" json:"choices" toml:"choices" yaml:"choices"` CreatedAt pgtype.Timestamptz `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UserID int64 `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` R *voteR `boil:"-" json:"-" toml:"-" yaml:"-"` L voteL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Vote is an object representing the database table.
func FindVote ¶
func FindVote(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Vote, error)
FindVote retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Vote) Delete ¶
Delete deletes a single Vote record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Vote) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Vote) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Vote) SetElection ¶
func (o *Vote) SetElection(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Election) error
SetElection of the vote to the related item. Sets o.R.Election to related. Adds o to related.R.Votes.
func (*Vote) SetUser ¶
func (o *Vote) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the vote to the related item. Sets o.R.User to related. Adds o to related.R.Votes.
func (*Vote) Update ¶
func (o *Vote) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Vote. 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 (*Vote) Upsert ¶
func (o *Vote) 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 VoteSlice ¶
type VoteSlice []*Vote
VoteSlice is an alias for a slice of pointers to Vote. This should generally be used opposed to []Vote.