Documentation
¶
Index ¶
- Variables
- func AddAnswerHook(hookPoint boil.HookPoint, answerHook AnswerHook)
- func AddQuestionHook(hookPoint boil.HookPoint, questionHook QuestionHook)
- func AddRatingHook(hookPoint boil.HookPoint, ratingHook RatingHook)
- func AddRevokeTokenHook(hookPoint boil.HookPoint, revokeTokenHook RevokeTokenHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func AnswerExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Answers(mods ...qm.QueryMod) answerQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func QuestionExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Questions(mods ...qm.QueryMod) questionQuery
- func RatingExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Ratings(mods ...qm.QueryMod) ratingQuery
- func RevokeTokenExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func RevokeTokens(mods ...qm.QueryMod) revokeTokenQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Answer
- func (o *Answer) CreatedByUser(mods ...qm.QueryMod) userQuery
- func (o *Answer) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Answer) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Answer) Question(mods ...qm.QueryMod) questionQuery
- func (o *Answer) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Answer) SetCreatedByUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Answer) SetQuestion(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Question) error
- func (o *Answer) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Answer) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type AnswerHook
- type AnswerSlice
- type M
- type Question
- func (o *Question) AddAnswers(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Question) Answers(mods ...qm.QueryMod) answerQuery
- func (o *Question) CreatedByUser(mods ...qm.QueryMod) userQuery
- func (o *Question) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Question) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Question) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Question) SetCreatedByUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Question) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Question) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type QuestionHook
- type QuestionSlice
- type Rating
- func (o *Rating) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Rating) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Rating) RatedByUser(mods ...qm.QueryMod) userQuery
- func (o *Rating) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Rating) SetRatedByUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Rating) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Rating) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type RatingHook
- type RatingSlice
- type RevokeToken
- func (o *RevokeToken) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *RevokeToken) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *RevokeToken) Owner(mods ...qm.QueryMod) userQuery
- func (o *RevokeToken) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *RevokeToken) SetOwner(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *RevokeToken) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *RevokeToken) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type RevokeTokenHook
- type RevokeTokenSlice
- type User
- func (o *User) AddCreatedByAnswers(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddCreatedByQuestions(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddOwnerRevokeTokens(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddRatedByRatings(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) CreatedByAnswers(mods ...qm.QueryMod) answerQuery
- func (o *User) CreatedByQuestions(mods ...qm.QueryMod) questionQuery
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) OwnerRevokeTokens(mods ...qm.QueryMod) revokeTokenQuery
- func (o *User) RatedByRatings(mods ...qm.QueryMod) ratingQuery
- 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
- type UserHook
- type UserSlice
Constants ¶
This section is empty.
Variables ¶
var AnswerColumns = struct { ID string QuestionID string CreatedBy string CreatedAt string Answered string Answer string }{ ID: "id", QuestionID: "question_id", CreatedBy: "created_by", CreatedAt: "created_at", Answered: "answered", Answer: "answer", }
var AnswerRels = struct { CreatedByUser string Question string }{ CreatedByUser: "CreatedByUser", Question: "Question", }
AnswerRels is where relationship names are stored.
var AnswerWhere = struct { ID whereHelperstring QuestionID whereHelperstring CreatedBy whereHelperstring CreatedAt whereHelpernull_Time Answered whereHelpernull_Bool Answer whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, QuestionID: whereHelperstring{/* contains filtered or unexported fields */}, CreatedBy: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, Answered: whereHelpernull_Bool{/* contains filtered or unexported fields */}, Answer: whereHelperstring{/* 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 QuestionColumns = struct { ID string Title string Description string CreatedBy string CreatedAt string Status string }{ ID: "id", Title: "title", Description: "description", CreatedBy: "created_by", CreatedAt: "created_at", Status: "status", }
var QuestionRels = struct { CreatedByUser string Answers string }{ CreatedByUser: "CreatedByUser", Answers: "Answers", }
QuestionRels is where relationship names are stored.
var QuestionWhere = struct { ID whereHelperstring Title whereHelperstring Description whereHelperstring CreatedBy whereHelperstring CreatedAt whereHelpernull_Time Status whereHelpernull_String }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Title: whereHelperstring{/* contains filtered or unexported fields */}, Description: whereHelperstring{/* contains filtered or unexported fields */}, CreatedBy: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, Status: whereHelpernull_String{/* contains filtered or unexported fields */}, }
var RatingColumns = struct { ID string Kind string RecordID string RatedBy string RatedAt string Value string }{ ID: "id", Kind: "kind", RecordID: "record_id", RatedBy: "rated_by", RatedAt: "rated_at", Value: "value", }
var RatingRels = struct { RatedByUser string }{ RatedByUser: "RatedByUser", }
RatingRels is where relationship names are stored.
var RatingWhere = struct { ID whereHelperstring Kind whereHelperstring RecordID whereHelperstring RatedBy whereHelperstring RatedAt whereHelpertime_Time Value whereHelperint16 }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Kind: whereHelperstring{/* contains filtered or unexported fields */}, RecordID: whereHelperstring{/* contains filtered or unexported fields */}, RatedBy: whereHelperstring{/* contains filtered or unexported fields */}, RatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Value: whereHelperint16{/* contains filtered or unexported fields */}, }
var RevokeTokenColumns = struct { ID string OwnerID string Token string }{ ID: "id", OwnerID: "owner_id", Token: "token", }
var RevokeTokenRels = struct { Owner string }{ Owner: "Owner", }
RevokeTokenRels is where relationship names are stored.
var RevokeTokenWhere = struct { ID whereHelperstring OwnerID whereHelperstring Token whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, OwnerID: whereHelperstring{/* contains filtered or unexported fields */}, Token: whereHelperstring{/* contains filtered or unexported fields */}, }
var TableNames = struct { Answers string Questions string Ratings string RevokeTokens string Users string }{ Answers: "answers", Questions: "questions", Ratings: "ratings", RevokeTokens: "revoke_tokens", Users: "users", }
var UserColumns = struct { ID string Username string Password string FullName string AccessToken string }{ ID: "id", Username: "username", Password: "password", FullName: "full_name", AccessToken: "access_token", }
var UserRels = struct { CreatedByAnswers string CreatedByQuestions string RatedByRatings string OwnerRevokeTokens string }{ CreatedByAnswers: "CreatedByAnswers", CreatedByQuestions: "CreatedByQuestions", RatedByRatings: "RatedByRatings", OwnerRevokeTokens: "OwnerRevokeTokens", }
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperstring Username whereHelperstring Password whereHelpernull_String FullName whereHelpernull_String AccessToken whereHelpernull_String }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Username: whereHelperstring{/* contains filtered or unexported fields */}, Password: whereHelpernull_String{/* contains filtered or unexported fields */}, FullName: whereHelpernull_String{/* contains filtered or unexported fields */}, AccessToken: whereHelpernull_String{/* contains filtered or unexported fields */}, }
Functions ¶
func AddAnswerHook ¶
func AddAnswerHook(hookPoint boil.HookPoint, answerHook AnswerHook)
AddAnswerHook registers your hook function for all future operations.
func AddQuestionHook ¶
func AddQuestionHook(hookPoint boil.HookPoint, questionHook QuestionHook)
AddQuestionHook registers your hook function for all future operations.
func AddRatingHook ¶
func AddRatingHook(hookPoint boil.HookPoint, ratingHook RatingHook)
AddRatingHook registers your hook function for all future operations.
func AddRevokeTokenHook ¶
func AddRevokeTokenHook(hookPoint boil.HookPoint, revokeTokenHook RevokeTokenHook)
AddRevokeTokenHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func AnswerExists ¶
AnswerExists checks if the Answer row exists.
func QuestionExists ¶
QuestionExists checks if the Question row exists.
func RatingExists ¶
RatingExists checks if the Rating row exists.
func RevokeTokenExists ¶
RevokeTokenExists checks if the RevokeToken row exists.
func RevokeTokens ¶
RevokeTokens retrieves all the records using an executor.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Answer ¶
type Answer struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` QuestionID string `boil:"question_id" json:"question_id" toml:"question_id" yaml:"question_id"` CreatedBy string `boil:"created_by" json:"created_by" toml:"created_by" yaml:"created_by"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` Answered null.Bool `boil:"answered" json:"answered,omitempty" toml:"answered" yaml:"answered,omitempty"` Answer string `boil:"answer" json:"answer" toml:"answer" yaml:"answer"` R *answerR `boil:"-" json:"-" toml:"-" yaml:"-"` L answerL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Answer is an object representing the database table.
func FindAnswer ¶
func FindAnswer(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Answer, error)
FindAnswer retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Answer) CreatedByUser ¶
CreatedByUser pointed to by the foreign key.
func (*Answer) Delete ¶
Delete deletes a single Answer record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Answer) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Answer) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Answer) SetCreatedByUser ¶
func (o *Answer) SetCreatedByUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetCreatedByUser of the answer to the related item. Sets o.R.CreatedByUser to related. Adds o to related.R.CreatedByAnswers.
func (*Answer) SetQuestion ¶
func (o *Answer) SetQuestion(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Question) error
SetQuestion of the answer to the related item. Sets o.R.Question to related. Adds o to related.R.Answers.
func (*Answer) Update ¶
func (o *Answer) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Answer. 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 (*Answer) Upsert ¶
func (o *Answer) 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 AnswerHook ¶
AnswerHook is the signature for custom Answer hook methods
type AnswerSlice ¶
type AnswerSlice []*Answer
AnswerSlice is an alias for a slice of pointers to Answer. This should generally be used opposed to []Answer.
func (AnswerSlice) DeleteAll ¶
func (o AnswerSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*AnswerSlice) ReloadAll ¶
func (o *AnswerSlice) 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 (AnswerSlice) UpdateAll ¶
func (o AnswerSlice) 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 Question ¶
type Question struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Title string `boil:"title" json:"title" toml:"title" yaml:"title"` Description string `boil:"description" json:"description" toml:"description" yaml:"description"` CreatedBy string `boil:"created_by" json:"created_by" toml:"created_by" yaml:"created_by"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` Status null.String `boil:"status" json:"status,omitempty" toml:"status" yaml:"status,omitempty"` R *questionR `boil:"-" json:"-" toml:"-" yaml:"-"` L questionL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Question is an object representing the database table.
func FindQuestion ¶
func FindQuestion(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Question, error)
FindQuestion retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Question) AddAnswers ¶
func (o *Question) AddAnswers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Answer) error
AddAnswers adds the given related objects to the existing relationships of the question, optionally inserting them as new records. Appends related to o.R.Answers. Sets related.R.Question appropriately.
func (*Question) CreatedByUser ¶
CreatedByUser pointed to by the foreign key.
func (*Question) Delete ¶
Delete deletes a single Question record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Question) Insert ¶
func (o *Question) 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 (*Question) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Question) SetCreatedByUser ¶
func (o *Question) SetCreatedByUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetCreatedByUser of the question to the related item. Sets o.R.CreatedByUser to related. Adds o to related.R.CreatedByQuestions.
func (*Question) Update ¶
func (o *Question) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Question. 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 (*Question) Upsert ¶
func (o *Question) 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 QuestionHook ¶
QuestionHook is the signature for custom Question hook methods
type QuestionSlice ¶
type QuestionSlice []*Question
QuestionSlice is an alias for a slice of pointers to Question. This should generally be used opposed to []Question.
func (QuestionSlice) DeleteAll ¶
func (o QuestionSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*QuestionSlice) ReloadAll ¶
func (o *QuestionSlice) 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 (QuestionSlice) UpdateAll ¶
func (o QuestionSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Rating ¶
type Rating struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Kind string `boil:"kind" json:"kind" toml:"kind" yaml:"kind"` RecordID string `boil:"record_id" json:"record_id" toml:"record_id" yaml:"record_id"` RatedBy string `boil:"rated_by" json:"rated_by" toml:"rated_by" yaml:"rated_by"` RatedAt time.Time `boil:"rated_at" json:"rated_at" toml:"rated_at" yaml:"rated_at"` Value int16 `boil:"value" json:"value" toml:"value" yaml:"value"` R *ratingR `boil:"-" json:"-" toml:"-" yaml:"-"` L ratingL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Rating is an object representing the database table.
func FindRating ¶
func FindRating(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Rating, error)
FindRating retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Rating) Delete ¶
Delete deletes a single Rating record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Rating) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Rating) RatedByUser ¶
RatedByUser pointed to by the foreign key.
func (*Rating) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Rating) SetRatedByUser ¶
func (o *Rating) SetRatedByUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetRatedByUser of the rating to the related item. Sets o.R.RatedByUser to related. Adds o to related.R.RatedByRatings.
func (*Rating) Update ¶
func (o *Rating) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Rating. 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 (*Rating) Upsert ¶
func (o *Rating) 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 RatingHook ¶
RatingHook is the signature for custom Rating hook methods
type RatingSlice ¶
type RatingSlice []*Rating
RatingSlice is an alias for a slice of pointers to Rating. This should generally be used opposed to []Rating.
func (RatingSlice) DeleteAll ¶
func (o RatingSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*RatingSlice) ReloadAll ¶
func (o *RatingSlice) 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 (RatingSlice) UpdateAll ¶
func (o RatingSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type RevokeToken ¶
type RevokeToken struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` OwnerID string `boil:"owner_id" json:"owner_id" toml:"owner_id" yaml:"owner_id"` Token string `boil:"token" json:"token" toml:"token" yaml:"token"` R *revokeTokenR `boil:"-" json:"-" toml:"-" yaml:"-"` L revokeTokenL `boil:"-" json:"-" toml:"-" yaml:"-"` }
RevokeToken is an object representing the database table.
func FindRevokeToken ¶
func FindRevokeToken(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*RevokeToken, error)
FindRevokeToken retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*RevokeToken) Delete ¶
func (o *RevokeToken) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single RevokeToken record with an executor. Delete will match against the primary key column to find the record to delete.
func (*RevokeToken) Insert ¶
func (o *RevokeToken) 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 (*RevokeToken) Owner ¶
func (o *RevokeToken) Owner(mods ...qm.QueryMod) userQuery
Owner pointed to by the foreign key.
func (*RevokeToken) Reload ¶
func (o *RevokeToken) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*RevokeToken) SetOwner ¶
func (o *RevokeToken) SetOwner(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetOwner of the revokeToken to the related item. Sets o.R.Owner to related. Adds o to related.R.OwnerRevokeTokens.
func (*RevokeToken) Update ¶
func (o *RevokeToken) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the RevokeToken. 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 (*RevokeToken) Upsert ¶
func (o *RevokeToken) 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 RevokeTokenHook ¶
type RevokeTokenHook func(context.Context, boil.ContextExecutor, *RevokeToken) error
RevokeTokenHook is the signature for custom RevokeToken hook methods
type RevokeTokenSlice ¶
type RevokeTokenSlice []*RevokeToken
RevokeTokenSlice is an alias for a slice of pointers to RevokeToken. This should generally be used opposed to []RevokeToken.
func (RevokeTokenSlice) DeleteAll ¶
func (o RevokeTokenSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*RevokeTokenSlice) ReloadAll ¶
func (o *RevokeTokenSlice) 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 (RevokeTokenSlice) UpdateAll ¶
func (o RevokeTokenSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type User ¶
type User struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Username string `boil:"username" json:"username" toml:"username" yaml:"username"` Password null.String `boil:"password" json:"password,omitempty" toml:"password" yaml:"password,omitempty"` FullName null.String `boil:"full_name" json:"full_name,omitempty" toml:"full_name" yaml:"full_name,omitempty"` AccessToken null.String `boil:"access_token" json:"access_token,omitempty" toml:"access_token" yaml:"access_token,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(ctx context.Context, exec boil.ContextExecutor, iD string, 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) AddCreatedByAnswers ¶
func (o *User) AddCreatedByAnswers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Answer) error
AddCreatedByAnswers adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.CreatedByAnswers. Sets related.R.CreatedByUser appropriately.
func (*User) AddCreatedByQuestions ¶
func (o *User) AddCreatedByQuestions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Question) error
AddCreatedByQuestions adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.CreatedByQuestions. Sets related.R.CreatedByUser appropriately.
func (*User) AddOwnerRevokeTokens ¶
func (o *User) AddOwnerRevokeTokens(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*RevokeToken) error
AddOwnerRevokeTokens adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.OwnerRevokeTokens. Sets related.R.Owner appropriately.
func (*User) AddRatedByRatings ¶
func (o *User) AddRatedByRatings(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Rating) error
AddRatedByRatings adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.RatedByRatings. Sets related.R.RatedByUser appropriately.
func (*User) CreatedByAnswers ¶
CreatedByAnswers retrieves all the answer's Answers with an executor via created_by column.
func (*User) CreatedByQuestions ¶
CreatedByQuestions retrieves all the question's Questions with an executor via created_by column.
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) OwnerRevokeTokens ¶
OwnerRevokeTokens retrieves all the revoke_token's RevokeTokens with an executor via owner_id column.
func (*User) RatedByRatings ¶
RatedByRatings retrieves all the rating's Ratings with an executor via rated_by column.
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.